Documentation ¶
Index ¶
- type AdministratorListResult
- type AdministratorName
- type AdministratorProperties
- type AdministratorType
- type AdvancedThreatProtectionName
- type AdvancedThreatProtectionProperties
- type AdvancedThreatProtectionState
- type Advisor
- type AdvisorProperties
- type AdvisorStatus
- type AgentClient
- func (client *AgentClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (AgentClientCreateOrUpdateResponse, error)
- func (client *AgentClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (AgentClientGetResponse, error)
- type AgentClientCreateOrUpdateOptions
- type AgentClientCreateOrUpdateResponse
- type AgentClientGetOptions
- type AgentClientGetResponse
- type AgentConfiguration
- type AgentConfigurationProperties
- type AggregationFunctionType
- type AuthenticationName
- type AutoExecuteStatus
- type AutoExecuteStatusInheritedFrom
- type AutoPauseDelayTimeRange
- type AutomaticTuningDisabledReason
- type AutomaticTuningMode
- type AutomaticTuningOptionModeActual
- type AutomaticTuningOptionModeDesired
- type AutomaticTuningOptions
- type AutomaticTuningServerMode
- type AutomaticTuningServerOptions
- type AutomaticTuningServerProperties
- type AutomaticTuningServerReason
- type AzureADOnlyAuthListResult
- type AzureADOnlyAuthProperties
- type BackupShortTermRetentionPoliciesClient
- func (client *BackupShortTermRetentionPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[BackupShortTermRetentionPoliciesClientCreateOrUpdateResponse], ...)
- func (client *BackupShortTermRetentionPoliciesClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[BackupShortTermRetentionPoliciesClientUpdateResponse], error)
- func (client *BackupShortTermRetentionPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (BackupShortTermRetentionPoliciesClientGetResponse, error)
- func (client *BackupShortTermRetentionPoliciesClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[BackupShortTermRetentionPoliciesClientListByDatabaseResponse]
- type BackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions
- type BackupShortTermRetentionPoliciesClientBeginUpdateOptions
- type BackupShortTermRetentionPoliciesClientCreateOrUpdateResponse
- type BackupShortTermRetentionPoliciesClientGetOptions
- type BackupShortTermRetentionPoliciesClientGetResponse
- type BackupShortTermRetentionPoliciesClientListByDatabaseOptions
- type BackupShortTermRetentionPoliciesClientListByDatabaseResponse
- type BackupShortTermRetentionPoliciesClientUpdateResponse
- type BackupShortTermRetentionPolicy
- type BackupShortTermRetentionPolicyListResult
- type BackupShortTermRetentionPolicyProperties
- type BackupStorageRedundancy
- type BaseLongTermRetentionPolicyProperties
- type BlobAuditingPolicyState
- type CapabilitiesClient
- type CapabilitiesClientListByLocationOptions
- type CapabilitiesClientListByLocationResponse
- type CapabilityGroup
- type CapabilityStatus
- type CatalogCollationType
- type CheckNameAvailabilityReason
- type CheckNameAvailabilityRequest
- type CheckNameAvailabilityResponse
- type ClientFactory
- func (c *ClientFactory) NewAgentClient() *AgentClient
- func (c *ClientFactory) NewBackupShortTermRetentionPoliciesClient() *BackupShortTermRetentionPoliciesClient
- func (c *ClientFactory) NewCapabilitiesClient() *CapabilitiesClient
- func (c *ClientFactory) NewDataMaskingPoliciesClient() *DataMaskingPoliciesClient
- func (c *ClientFactory) NewDataMaskingRulesClient() *DataMaskingRulesClient
- func (c *ClientFactory) NewDataWarehouseUserActivitiesClient() *DataWarehouseUserActivitiesClient
- func (c *ClientFactory) NewDatabaseAdvancedThreatProtectionSettingsClient() *DatabaseAdvancedThreatProtectionSettingsClient
- func (c *ClientFactory) NewDatabaseAdvisorsClient() *DatabaseAdvisorsClient
- func (c *ClientFactory) NewDatabaseAutomaticTuningClient() *DatabaseAutomaticTuningClient
- func (c *ClientFactory) NewDatabaseBlobAuditingPoliciesClient() *DatabaseBlobAuditingPoliciesClient
- func (c *ClientFactory) NewDatabaseColumnsClient() *DatabaseColumnsClient
- func (c *ClientFactory) NewDatabaseExtensionsClient() *DatabaseExtensionsClient
- func (c *ClientFactory) NewDatabaseOperationsClient() *DatabaseOperationsClient
- func (c *ClientFactory) NewDatabaseRecommendedActionsClient() *DatabaseRecommendedActionsClient
- func (c *ClientFactory) NewDatabaseSchemasClient() *DatabaseSchemasClient
- func (c *ClientFactory) NewDatabaseSecurityAlertPoliciesClient() *DatabaseSecurityAlertPoliciesClient
- func (c *ClientFactory) NewDatabaseTablesClient() *DatabaseTablesClient
- func (c *ClientFactory) NewDatabaseUsagesClient() *DatabaseUsagesClient
- func (c *ClientFactory) NewDatabaseVulnerabilityAssessmentRuleBaselinesClient() *DatabaseVulnerabilityAssessmentRuleBaselinesClient
- func (c *ClientFactory) NewDatabaseVulnerabilityAssessmentScansClient() *DatabaseVulnerabilityAssessmentScansClient
- func (c *ClientFactory) NewDatabaseVulnerabilityAssessmentsClient() *DatabaseVulnerabilityAssessmentsClient
- func (c *ClientFactory) NewDatabasesClient() *DatabasesClient
- func (c *ClientFactory) NewDeletedServersClient() *DeletedServersClient
- func (c *ClientFactory) NewDistributedAvailabilityGroupsClient() *DistributedAvailabilityGroupsClient
- func (c *ClientFactory) NewElasticPoolActivitiesClient() *ElasticPoolActivitiesClient
- func (c *ClientFactory) NewElasticPoolDatabaseActivitiesClient() *ElasticPoolDatabaseActivitiesClient
- func (c *ClientFactory) NewElasticPoolOperationsClient() *ElasticPoolOperationsClient
- func (c *ClientFactory) NewElasticPoolsClient() *ElasticPoolsClient
- func (c *ClientFactory) NewEncryptionProtectorsClient() *EncryptionProtectorsClient
- func (c *ClientFactory) NewEndpointCertificatesClient() *EndpointCertificatesClient
- func (c *ClientFactory) NewExtendedDatabaseBlobAuditingPoliciesClient() *ExtendedDatabaseBlobAuditingPoliciesClient
- func (c *ClientFactory) NewExtendedServerBlobAuditingPoliciesClient() *ExtendedServerBlobAuditingPoliciesClient
- func (c *ClientFactory) NewFailoverGroupsClient() *FailoverGroupsClient
- func (c *ClientFactory) NewFirewallRulesClient() *FirewallRulesClient
- func (c *ClientFactory) NewGeoBackupPoliciesClient() *GeoBackupPoliciesClient
- func (c *ClientFactory) NewIPv6FirewallRulesClient() *IPv6FirewallRulesClient
- func (c *ClientFactory) NewInstanceFailoverGroupsClient() *InstanceFailoverGroupsClient
- func (c *ClientFactory) NewInstancePoolsClient() *InstancePoolsClient
- func (c *ClientFactory) NewJobAgentsClient() *JobAgentsClient
- func (c *ClientFactory) NewJobCredentialsClient() *JobCredentialsClient
- func (c *ClientFactory) NewJobExecutionsClient() *JobExecutionsClient
- func (c *ClientFactory) NewJobStepExecutionsClient() *JobStepExecutionsClient
- func (c *ClientFactory) NewJobStepsClient() *JobStepsClient
- func (c *ClientFactory) NewJobTargetExecutionsClient() *JobTargetExecutionsClient
- func (c *ClientFactory) NewJobTargetGroupsClient() *JobTargetGroupsClient
- func (c *ClientFactory) NewJobVersionsClient() *JobVersionsClient
- func (c *ClientFactory) NewJobsClient() *JobsClient
- func (c *ClientFactory) NewLedgerDigestUploadsClient() *LedgerDigestUploadsClient
- func (c *ClientFactory) NewLongTermRetentionBackupsClient() *LongTermRetentionBackupsClient
- func (c *ClientFactory) NewLongTermRetentionManagedInstanceBackupsClient() *LongTermRetentionManagedInstanceBackupsClient
- func (c *ClientFactory) NewLongTermRetentionPoliciesClient() *LongTermRetentionPoliciesClient
- func (c *ClientFactory) NewMaintenanceWindowOptionsClient() *MaintenanceWindowOptionsClient
- func (c *ClientFactory) NewMaintenanceWindowsClient() *MaintenanceWindowsClient
- func (c *ClientFactory) NewManagedBackupShortTermRetentionPoliciesClient() *ManagedBackupShortTermRetentionPoliciesClient
- func (c *ClientFactory) NewManagedDatabaseColumnsClient() *ManagedDatabaseColumnsClient
- func (c *ClientFactory) NewManagedDatabaseQueriesClient() *ManagedDatabaseQueriesClient
- func (c *ClientFactory) NewManagedDatabaseRecommendedSensitivityLabelsClient() *ManagedDatabaseRecommendedSensitivityLabelsClient
- func (c *ClientFactory) NewManagedDatabaseRestoreDetailsClient() *ManagedDatabaseRestoreDetailsClient
- func (c *ClientFactory) NewManagedDatabaseSchemasClient() *ManagedDatabaseSchemasClient
- func (c *ClientFactory) NewManagedDatabaseSecurityAlertPoliciesClient() *ManagedDatabaseSecurityAlertPoliciesClient
- func (c *ClientFactory) NewManagedDatabaseSecurityEventsClient() *ManagedDatabaseSecurityEventsClient
- func (c *ClientFactory) NewManagedDatabaseSensitivityLabelsClient() *ManagedDatabaseSensitivityLabelsClient
- func (c *ClientFactory) NewManagedDatabaseTablesClient() *ManagedDatabaseTablesClient
- func (c *ClientFactory) NewManagedDatabaseTransparentDataEncryptionClient() *ManagedDatabaseTransparentDataEncryptionClient
- func (c *ClientFactory) NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient() *ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient
- func (c *ClientFactory) NewManagedDatabaseVulnerabilityAssessmentScansClient() *ManagedDatabaseVulnerabilityAssessmentScansClient
- func (c *ClientFactory) NewManagedDatabaseVulnerabilityAssessmentsClient() *ManagedDatabaseVulnerabilityAssessmentsClient
- func (c *ClientFactory) NewManagedDatabasesClient() *ManagedDatabasesClient
- func (c *ClientFactory) NewManagedInstanceAdministratorsClient() *ManagedInstanceAdministratorsClient
- func (c *ClientFactory) NewManagedInstanceAzureADOnlyAuthenticationsClient() *ManagedInstanceAzureADOnlyAuthenticationsClient
- func (c *ClientFactory) NewManagedInstanceEncryptionProtectorsClient() *ManagedInstanceEncryptionProtectorsClient
- func (c *ClientFactory) NewManagedInstanceKeysClient() *ManagedInstanceKeysClient
- func (c *ClientFactory) NewManagedInstanceLongTermRetentionPoliciesClient() *ManagedInstanceLongTermRetentionPoliciesClient
- func (c *ClientFactory) NewManagedInstanceOperationsClient() *ManagedInstanceOperationsClient
- func (c *ClientFactory) NewManagedInstancePrivateEndpointConnectionsClient() *ManagedInstancePrivateEndpointConnectionsClient
- func (c *ClientFactory) NewManagedInstancePrivateLinkResourcesClient() *ManagedInstancePrivateLinkResourcesClient
- func (c *ClientFactory) NewManagedInstanceTdeCertificatesClient() *ManagedInstanceTdeCertificatesClient
- func (c *ClientFactory) NewManagedInstanceVulnerabilityAssessmentsClient() *ManagedInstanceVulnerabilityAssessmentsClient
- func (c *ClientFactory) NewManagedInstancesClient() *ManagedInstancesClient
- func (c *ClientFactory) NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient() *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient
- func (c *ClientFactory) NewManagedServerSecurityAlertPoliciesClient() *ManagedServerSecurityAlertPoliciesClient
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewOutboundFirewallRulesClient() *OutboundFirewallRulesClient
- func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient
- func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient
- func (c *ClientFactory) NewRecommendedSensitivityLabelsClient() *RecommendedSensitivityLabelsClient
- func (c *ClientFactory) NewRecoverableDatabasesClient() *RecoverableDatabasesClient
- func (c *ClientFactory) NewRecoverableManagedDatabasesClient() *RecoverableManagedDatabasesClient
- func (c *ClientFactory) NewReplicationLinksClient() *ReplicationLinksClient
- func (c *ClientFactory) NewRestorableDroppedDatabasesClient() *RestorableDroppedDatabasesClient
- func (c *ClientFactory) NewRestorableDroppedManagedDatabasesClient() *RestorableDroppedManagedDatabasesClient
- func (c *ClientFactory) NewRestorePointsClient() *RestorePointsClient
- func (c *ClientFactory) NewSensitivityLabelsClient() *SensitivityLabelsClient
- func (c *ClientFactory) NewServerAdvancedThreatProtectionSettingsClient() *ServerAdvancedThreatProtectionSettingsClient
- func (c *ClientFactory) NewServerAdvisorsClient() *ServerAdvisorsClient
- func (c *ClientFactory) NewServerAutomaticTuningClient() *ServerAutomaticTuningClient
- func (c *ClientFactory) NewServerAzureADAdministratorsClient() *ServerAzureADAdministratorsClient
- func (c *ClientFactory) NewServerAzureADOnlyAuthenticationsClient() *ServerAzureADOnlyAuthenticationsClient
- func (c *ClientFactory) NewServerBlobAuditingPoliciesClient() *ServerBlobAuditingPoliciesClient
- func (c *ClientFactory) NewServerCommunicationLinksClient() *ServerCommunicationLinksClient
- func (c *ClientFactory) NewServerConnectionPoliciesClient() *ServerConnectionPoliciesClient
- func (c *ClientFactory) NewServerDNSAliasesClient() *ServerDNSAliasesClient
- func (c *ClientFactory) NewServerDevOpsAuditSettingsClient() *ServerDevOpsAuditSettingsClient
- func (c *ClientFactory) NewServerKeysClient() *ServerKeysClient
- func (c *ClientFactory) NewServerOperationsClient() *ServerOperationsClient
- func (c *ClientFactory) NewServerSecurityAlertPoliciesClient() *ServerSecurityAlertPoliciesClient
- func (c *ClientFactory) NewServerTrustCertificatesClient() *ServerTrustCertificatesClient
- func (c *ClientFactory) NewServerTrustGroupsClient() *ServerTrustGroupsClient
- func (c *ClientFactory) NewServerUsagesClient() *ServerUsagesClient
- func (c *ClientFactory) NewServerVulnerabilityAssessmentsClient() *ServerVulnerabilityAssessmentsClient
- func (c *ClientFactory) NewServersClient() *ServersClient
- func (c *ClientFactory) NewServiceObjectivesClient() *ServiceObjectivesClient
- func (c *ClientFactory) NewSubscriptionUsagesClient() *SubscriptionUsagesClient
- func (c *ClientFactory) NewSyncAgentsClient() *SyncAgentsClient
- func (c *ClientFactory) NewSyncGroupsClient() *SyncGroupsClient
- func (c *ClientFactory) NewSyncMembersClient() *SyncMembersClient
- func (c *ClientFactory) NewTdeCertificatesClient() *TdeCertificatesClient
- func (c *ClientFactory) NewTimeZonesClient() *TimeZonesClient
- func (c *ClientFactory) NewTransparentDataEncryptionsClient() *TransparentDataEncryptionsClient
- func (c *ClientFactory) NewUsagesClient() *UsagesClient
- func (c *ClientFactory) NewVirtualClustersClient() *VirtualClustersClient
- func (c *ClientFactory) NewVirtualNetworkRulesClient() *VirtualNetworkRulesClient
- func (c *ClientFactory) NewWorkloadClassifiersClient() *WorkloadClassifiersClient
- func (c *ClientFactory) NewWorkloadGroupsClient() *WorkloadGroupsClient
- type ColumnDataType
- type CompleteDatabaseRestoreDefinition
- type ConnectionPolicyName
- type CopyLongTermRetentionBackupParameters
- type CopyLongTermRetentionBackupParametersProperties
- type CreateDatabaseRestorePointDefinition
- type CreateMode
- type CreatedByType
- type DNSRefreshConfigurationProperties
- type DNSRefreshConfigurationPropertiesStatus
- type DataMaskingFunction
- type DataMaskingPoliciesClient
- func (client *DataMaskingPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (DataMaskingPoliciesClientCreateOrUpdateResponse, error)
- func (client *DataMaskingPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (DataMaskingPoliciesClientGetResponse, error)
- type DataMaskingPoliciesClientCreateOrUpdateOptions
- type DataMaskingPoliciesClientCreateOrUpdateResponse
- type DataMaskingPoliciesClientGetOptions
- type DataMaskingPoliciesClientGetResponse
- type DataMaskingPolicy
- type DataMaskingPolicyProperties
- type DataMaskingRule
- type DataMaskingRuleListResult
- type DataMaskingRuleProperties
- type DataMaskingRuleState
- type DataMaskingRulesClient
- func (client *DataMaskingRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (DataMaskingRulesClientCreateOrUpdateResponse, error)
- func (client *DataMaskingRulesClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[DataMaskingRulesClientListByDatabaseResponse]
- type DataMaskingRulesClientCreateOrUpdateOptions
- type DataMaskingRulesClientCreateOrUpdateResponse
- type DataMaskingRulesClientListByDatabaseOptions
- type DataMaskingRulesClientListByDatabaseResponse
- type DataMaskingState
- type DataWarehouseUserActivities
- type DataWarehouseUserActivitiesClient
- func (client *DataWarehouseUserActivitiesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (DataWarehouseUserActivitiesClientGetResponse, error)
- func (client *DataWarehouseUserActivitiesClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[DataWarehouseUserActivitiesClientListByDatabaseResponse]
- type DataWarehouseUserActivitiesClientGetOptions
- type DataWarehouseUserActivitiesClientGetResponse
- type DataWarehouseUserActivitiesClientListByDatabaseOptions
- type DataWarehouseUserActivitiesClientListByDatabaseResponse
- type DataWarehouseUserActivitiesListResult
- type DataWarehouseUserActivitiesProperties
- type DataWarehouseUserActivityName
- type Database
- type DatabaseAdvancedThreatProtection
- type DatabaseAdvancedThreatProtectionListResult
- type DatabaseAdvancedThreatProtectionSettingsClient
- func (client *DatabaseAdvancedThreatProtectionSettingsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse, error)
- func (client *DatabaseAdvancedThreatProtectionSettingsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseAdvancedThreatProtectionSettingsClientGetResponse, error)
- func (client *DatabaseAdvancedThreatProtectionSettingsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, ...) ...
- type DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateOptions
- type DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse
- type DatabaseAdvancedThreatProtectionSettingsClientGetOptions
- type DatabaseAdvancedThreatProtectionSettingsClientGetResponse
- type DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseOptions
- type DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseResponse
- type DatabaseAdvisorsClient
- func (client *DatabaseAdvisorsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseAdvisorsClientGetResponse, error)
- func (client *DatabaseAdvisorsClient) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseAdvisorsClientListByDatabaseResponse, error)
- func (client *DatabaseAdvisorsClient) Update(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseAdvisorsClientUpdateResponse, error)
- type DatabaseAdvisorsClientGetOptions
- type DatabaseAdvisorsClientGetResponse
- type DatabaseAdvisorsClientListByDatabaseOptions
- type DatabaseAdvisorsClientListByDatabaseResponse
- type DatabaseAdvisorsClientUpdateOptions
- type DatabaseAdvisorsClientUpdateResponse
- type DatabaseAutomaticTuning
- type DatabaseAutomaticTuningClient
- func (client *DatabaseAutomaticTuningClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseAutomaticTuningClientGetResponse, error)
- func (client *DatabaseAutomaticTuningClient) Update(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseAutomaticTuningClientUpdateResponse, error)
- type DatabaseAutomaticTuningClientGetOptions
- type DatabaseAutomaticTuningClientGetResponse
- type DatabaseAutomaticTuningClientUpdateOptions
- type DatabaseAutomaticTuningClientUpdateResponse
- type DatabaseAutomaticTuningProperties
- type DatabaseBlobAuditingPoliciesClient
- func (client *DatabaseBlobAuditingPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse, error)
- func (client *DatabaseBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseBlobAuditingPoliciesClientGetResponse, error)
- func (client *DatabaseBlobAuditingPoliciesClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[DatabaseBlobAuditingPoliciesClientListByDatabaseResponse]
- type DatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions
- type DatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse
- type DatabaseBlobAuditingPoliciesClientGetOptions
- type DatabaseBlobAuditingPoliciesClientGetResponse
- type DatabaseBlobAuditingPoliciesClientListByDatabaseOptions
- type DatabaseBlobAuditingPoliciesClientListByDatabaseResponse
- type DatabaseBlobAuditingPolicy
- type DatabaseBlobAuditingPolicyListResult
- type DatabaseBlobAuditingPolicyProperties
- type DatabaseColumn
- type DatabaseColumnListResult
- type DatabaseColumnProperties
- type DatabaseColumnsClient
- func (client *DatabaseColumnsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseColumnsClientGetResponse, error)
- func (client *DatabaseColumnsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[DatabaseColumnsClientListByDatabaseResponse]
- func (client *DatabaseColumnsClient) NewListByTablePager(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[DatabaseColumnsClientListByTableResponse]
- type DatabaseColumnsClientGetOptions
- type DatabaseColumnsClientGetResponse
- type DatabaseColumnsClientListByDatabaseOptions
- type DatabaseColumnsClientListByDatabaseResponse
- type DatabaseColumnsClientListByTableOptions
- type DatabaseColumnsClientListByTableResponse
- type DatabaseExtensions
- type DatabaseExtensionsClient
- func (client *DatabaseExtensionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[DatabaseExtensionsClientCreateOrUpdateResponse], error)
- func (client *DatabaseExtensionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseExtensionsClientGetResponse, error)
- func (client *DatabaseExtensionsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[DatabaseExtensionsClientListByDatabaseResponse]
- type DatabaseExtensionsClientBeginCreateOrUpdateOptions
- type DatabaseExtensionsClientCreateOrUpdateResponse
- type DatabaseExtensionsClientGetOptions
- type DatabaseExtensionsClientGetResponse
- type DatabaseExtensionsClientListByDatabaseOptions
- type DatabaseExtensionsClientListByDatabaseResponse
- type DatabaseExtensionsProperties
- type DatabaseIdentity
- type DatabaseIdentityType
- type DatabaseLicenseType
- type DatabaseListResult
- type DatabaseOperation
- type DatabaseOperationListResult
- type DatabaseOperationProperties
- type DatabaseOperationsClient
- func (client *DatabaseOperationsClient) Cancel(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseOperationsClientCancelResponse, error)
- func (client *DatabaseOperationsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[DatabaseOperationsClientListByDatabaseResponse]
- type DatabaseOperationsClientCancelOptions
- type DatabaseOperationsClientCancelResponse
- type DatabaseOperationsClientListByDatabaseOptions
- type DatabaseOperationsClientListByDatabaseResponse
- type DatabaseProperties
- type DatabaseReadScale
- type DatabaseRecommendedActionsClient
- func (client *DatabaseRecommendedActionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseRecommendedActionsClientGetResponse, error)
- func (client *DatabaseRecommendedActionsClient) ListByDatabaseAdvisor(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseRecommendedActionsClientListByDatabaseAdvisorResponse, error)
- func (client *DatabaseRecommendedActionsClient) Update(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseRecommendedActionsClientUpdateResponse, error)
- type DatabaseRecommendedActionsClientGetOptions
- type DatabaseRecommendedActionsClientGetResponse
- type DatabaseRecommendedActionsClientListByDatabaseAdvisorOptions
- type DatabaseRecommendedActionsClientListByDatabaseAdvisorResponse
- type DatabaseRecommendedActionsClientUpdateOptions
- type DatabaseRecommendedActionsClientUpdateResponse
- type DatabaseSchema
- type DatabaseSchemaListResult
- type DatabaseSchemasClient
- func (client *DatabaseSchemasClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseSchemasClientGetResponse, error)
- func (client *DatabaseSchemasClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[DatabaseSchemasClientListByDatabaseResponse]
- type DatabaseSchemasClientGetOptions
- type DatabaseSchemasClientGetResponse
- type DatabaseSchemasClientListByDatabaseOptions
- type DatabaseSchemasClientListByDatabaseResponse
- type DatabaseSecurityAlertListResult
- type DatabaseSecurityAlertPoliciesClient
- func (client *DatabaseSecurityAlertPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse, error)
- func (client *DatabaseSecurityAlertPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseSecurityAlertPoliciesClientGetResponse, error)
- func (client *DatabaseSecurityAlertPoliciesClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[DatabaseSecurityAlertPoliciesClientListByDatabaseResponse]
- type DatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions
- type DatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse
- type DatabaseSecurityAlertPoliciesClientGetOptions
- type DatabaseSecurityAlertPoliciesClientGetResponse
- type DatabaseSecurityAlertPoliciesClientListByDatabaseOptions
- type DatabaseSecurityAlertPoliciesClientListByDatabaseResponse
- type DatabaseSecurityAlertPolicy
- type DatabaseState
- type DatabaseStatus
- type DatabaseTable
- type DatabaseTableListResult
- type DatabaseTableProperties
- type DatabaseTablesClient
- func (client *DatabaseTablesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseTablesClientGetResponse, error)
- func (client *DatabaseTablesClient) NewListBySchemaPager(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[DatabaseTablesClientListBySchemaResponse]
- type DatabaseTablesClientGetOptions
- type DatabaseTablesClientGetResponse
- type DatabaseTablesClientListBySchemaOptions
- type DatabaseTablesClientListBySchemaResponse
- type DatabaseUpdate
- type DatabaseUpdateProperties
- type DatabaseUsage
- type DatabaseUsageListResult
- type DatabaseUsageProperties
- type DatabaseUsagesClient
- type DatabaseUsagesClientListByDatabaseOptions
- type DatabaseUsagesClientListByDatabaseResponse
- type DatabaseUserIdentity
- type DatabaseVulnerabilityAssessment
- type DatabaseVulnerabilityAssessmentListResult
- type DatabaseVulnerabilityAssessmentProperties
- type DatabaseVulnerabilityAssessmentRuleBaseline
- type DatabaseVulnerabilityAssessmentRuleBaselineItem
- type DatabaseVulnerabilityAssessmentRuleBaselineProperties
- type DatabaseVulnerabilityAssessmentRuleBaselinesClient
- func (client *DatabaseVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse, ...)
- func (client *DatabaseVulnerabilityAssessmentRuleBaselinesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse, error)
- func (client *DatabaseVulnerabilityAssessmentRuleBaselinesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse, error)
- type DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions
- type DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse
- type DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions
- type DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse
- type DatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions
- type DatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse
- type DatabaseVulnerabilityAssessmentScanExportProperties
- type DatabaseVulnerabilityAssessmentScansClient
- func (client *DatabaseVulnerabilityAssessmentScansClient) BeginInitiateScan(ctx context.Context, resourceGroupName string, serverName string, ...) (...)
- func (client *DatabaseVulnerabilityAssessmentScansClient) Export(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseVulnerabilityAssessmentScansClientExportResponse, error)
- func (client *DatabaseVulnerabilityAssessmentScansClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseVulnerabilityAssessmentScansClientGetResponse, error)
- func (client *DatabaseVulnerabilityAssessmentScansClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, ...) ...
- type DatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions
- type DatabaseVulnerabilityAssessmentScansClientExportOptions
- type DatabaseVulnerabilityAssessmentScansClientExportResponse
- type DatabaseVulnerabilityAssessmentScansClientGetOptions
- type DatabaseVulnerabilityAssessmentScansClientGetResponse
- type DatabaseVulnerabilityAssessmentScansClientInitiateScanResponse
- type DatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions
- type DatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse
- type DatabaseVulnerabilityAssessmentScansExport
- type DatabaseVulnerabilityAssessmentsClient
- func (client *DatabaseVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse, error)
- func (client *DatabaseVulnerabilityAssessmentsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseVulnerabilityAssessmentsClientDeleteResponse, error)
- func (client *DatabaseVulnerabilityAssessmentsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseVulnerabilityAssessmentsClientGetResponse, error)
- func (client *DatabaseVulnerabilityAssessmentsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[DatabaseVulnerabilityAssessmentsClientListByDatabaseResponse]
- type DatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions
- type DatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse
- type DatabaseVulnerabilityAssessmentsClientDeleteOptions
- type DatabaseVulnerabilityAssessmentsClientDeleteResponse
- type DatabaseVulnerabilityAssessmentsClientGetOptions
- type DatabaseVulnerabilityAssessmentsClientGetResponse
- type DatabaseVulnerabilityAssessmentsClientListByDatabaseOptions
- type DatabaseVulnerabilityAssessmentsClientListByDatabaseResponse
- type DatabasesClient
- func (client *DatabasesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[DatabasesClientCreateOrUpdateResponse], error)
- func (client *DatabasesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[DatabasesClientDeleteResponse], error)
- func (client *DatabasesClient) BeginExport(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[DatabasesClientExportResponse], error)
- func (client *DatabasesClient) BeginFailover(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[DatabasesClientFailoverResponse], error)
- func (client *DatabasesClient) BeginImport(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[DatabasesClientImportResponse], error)
- func (client *DatabasesClient) BeginPause(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[DatabasesClientPauseResponse], error)
- func (client *DatabasesClient) BeginResume(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[DatabasesClientResumeResponse], error)
- func (client *DatabasesClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[DatabasesClientUpdateResponse], error)
- func (client *DatabasesClient) BeginUpgradeDataWarehouse(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[DatabasesClientUpgradeDataWarehouseResponse], error)
- func (client *DatabasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabasesClientGetResponse, error)
- func (client *DatabasesClient) NewListByElasticPoolPager(resourceGroupName string, serverName string, elasticPoolName string, ...) *runtime.Pager[DatabasesClientListByElasticPoolResponse]
- func (client *DatabasesClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[DatabasesClientListByServerResponse]
- func (client *DatabasesClient) NewListInaccessibleByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[DatabasesClientListInaccessibleByServerResponse]
- func (client *DatabasesClient) NewListMetricDefinitionsPager(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[DatabasesClientListMetricDefinitionsResponse]
- func (client *DatabasesClient) NewListMetricsPager(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[DatabasesClientListMetricsResponse]
- func (client *DatabasesClient) Rename(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabasesClientRenameResponse, error)
- type DatabasesClientBeginCreateOrUpdateOptions
- type DatabasesClientBeginDeleteOptions
- type DatabasesClientBeginExportOptions
- type DatabasesClientBeginFailoverOptions
- type DatabasesClientBeginImportOptions
- type DatabasesClientBeginPauseOptions
- type DatabasesClientBeginResumeOptions
- type DatabasesClientBeginUpdateOptions
- type DatabasesClientBeginUpgradeDataWarehouseOptions
- type DatabasesClientCreateOrUpdateResponse
- type DatabasesClientDeleteResponse
- type DatabasesClientExportResponse
- type DatabasesClientFailoverResponse
- type DatabasesClientGetOptions
- type DatabasesClientGetResponse
- type DatabasesClientImportResponse
- type DatabasesClientListByElasticPoolOptions
- type DatabasesClientListByElasticPoolResponse
- type DatabasesClientListByServerOptions
- type DatabasesClientListByServerResponse
- type DatabasesClientListInaccessibleByServerOptions
- type DatabasesClientListInaccessibleByServerResponse
- type DatabasesClientListMetricDefinitionsOptions
- type DatabasesClientListMetricDefinitionsResponse
- type DatabasesClientListMetricsOptions
- type DatabasesClientListMetricsResponse
- type DatabasesClientPauseResponse
- type DatabasesClientRenameOptions
- type DatabasesClientRenameResponse
- type DatabasesClientResumeResponse
- type DatabasesClientUpdateResponse
- type DatabasesClientUpgradeDataWarehouseResponse
- type DayOfWeek
- type DeletedServer
- type DeletedServerListResult
- type DeletedServerProperties
- type DeletedServersClient
- func (client *DeletedServersClient) BeginRecover(ctx context.Context, locationName string, deletedServerName string, ...) (*runtime.Poller[DeletedServersClientRecoverResponse], error)
- func (client *DeletedServersClient) Get(ctx context.Context, locationName string, deletedServerName string, ...) (DeletedServersClientGetResponse, error)
- func (client *DeletedServersClient) NewListByLocationPager(locationName string, options *DeletedServersClientListByLocationOptions) *runtime.Pager[DeletedServersClientListByLocationResponse]
- func (client *DeletedServersClient) NewListPager(options *DeletedServersClientListOptions) *runtime.Pager[DeletedServersClientListResponse]
- type DeletedServersClientBeginRecoverOptions
- type DeletedServersClientGetOptions
- type DeletedServersClientGetResponse
- type DeletedServersClientListByLocationOptions
- type DeletedServersClientListByLocationResponse
- type DeletedServersClientListOptions
- type DeletedServersClientListResponse
- type DeletedServersClientRecoverResponse
- type DiffBackupIntervalInHours
- type DistributedAvailabilityGroup
- type DistributedAvailabilityGroupProperties
- type DistributedAvailabilityGroupsClient
- func (client *DistributedAvailabilityGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[DistributedAvailabilityGroupsClientCreateOrUpdateResponse], ...)
- func (client *DistributedAvailabilityGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[DistributedAvailabilityGroupsClientDeleteResponse], error)
- func (client *DistributedAvailabilityGroupsClient) BeginUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[DistributedAvailabilityGroupsClientUpdateResponse], error)
- func (client *DistributedAvailabilityGroupsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (DistributedAvailabilityGroupsClientGetResponse, error)
- func (client *DistributedAvailabilityGroupsClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, ...) *runtime.Pager[DistributedAvailabilityGroupsClientListByInstanceResponse]
- type DistributedAvailabilityGroupsClientBeginCreateOrUpdateOptions
- type DistributedAvailabilityGroupsClientBeginDeleteOptions
- type DistributedAvailabilityGroupsClientBeginUpdateOptions
- type DistributedAvailabilityGroupsClientCreateOrUpdateResponse
- type DistributedAvailabilityGroupsClientDeleteResponse
- type DistributedAvailabilityGroupsClientGetOptions
- type DistributedAvailabilityGroupsClientGetResponse
- type DistributedAvailabilityGroupsClientListByInstanceOptions
- type DistributedAvailabilityGroupsClientListByInstanceResponse
- type DistributedAvailabilityGroupsClientUpdateResponse
- type DistributedAvailabilityGroupsListResult
- type EditionCapability
- type ElasticPool
- type ElasticPoolActivitiesClient
- type ElasticPoolActivitiesClientListByElasticPoolOptions
- type ElasticPoolActivitiesClientListByElasticPoolResponse
- type ElasticPoolActivity
- type ElasticPoolActivityListResult
- type ElasticPoolActivityProperties
- type ElasticPoolDatabaseActivitiesClient
- type ElasticPoolDatabaseActivitiesClientListByElasticPoolOptions
- type ElasticPoolDatabaseActivitiesClientListByElasticPoolResponse
- type ElasticPoolDatabaseActivity
- type ElasticPoolDatabaseActivityListResult
- type ElasticPoolDatabaseActivityProperties
- type ElasticPoolEditionCapability
- type ElasticPoolLicenseType
- type ElasticPoolListResult
- type ElasticPoolOperation
- type ElasticPoolOperationListResult
- type ElasticPoolOperationProperties
- type ElasticPoolOperationsClient
- func (client *ElasticPoolOperationsClient) Cancel(ctx context.Context, resourceGroupName string, serverName string, ...) (ElasticPoolOperationsClientCancelResponse, error)
- func (client *ElasticPoolOperationsClient) NewListByElasticPoolPager(resourceGroupName string, serverName string, elasticPoolName string, ...) *runtime.Pager[ElasticPoolOperationsClientListByElasticPoolResponse]
- type ElasticPoolOperationsClientCancelOptions
- type ElasticPoolOperationsClientCancelResponse
- type ElasticPoolOperationsClientListByElasticPoolOptions
- type ElasticPoolOperationsClientListByElasticPoolResponse
- type ElasticPoolPerDatabaseMaxPerformanceLevelCapability
- type ElasticPoolPerDatabaseMinPerformanceLevelCapability
- type ElasticPoolPerDatabaseSettings
- type ElasticPoolPerformanceLevelCapability
- type ElasticPoolProperties
- type ElasticPoolState
- type ElasticPoolUpdate
- type ElasticPoolUpdateProperties
- type ElasticPoolsClient
- func (client *ElasticPoolsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ElasticPoolsClientCreateOrUpdateResponse], error)
- func (client *ElasticPoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ElasticPoolsClientDeleteResponse], error)
- func (client *ElasticPoolsClient) BeginFailover(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ElasticPoolsClientFailoverResponse], error)
- func (client *ElasticPoolsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ElasticPoolsClientUpdateResponse], error)
- func (client *ElasticPoolsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ElasticPoolsClientGetResponse, error)
- func (client *ElasticPoolsClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[ElasticPoolsClientListByServerResponse]
- func (client *ElasticPoolsClient) NewListMetricDefinitionsPager(resourceGroupName string, serverName string, elasticPoolName string, ...) *runtime.Pager[ElasticPoolsClientListMetricDefinitionsResponse]
- func (client *ElasticPoolsClient) NewListMetricsPager(resourceGroupName string, serverName string, elasticPoolName string, ...) *runtime.Pager[ElasticPoolsClientListMetricsResponse]
- type ElasticPoolsClientBeginCreateOrUpdateOptions
- type ElasticPoolsClientBeginDeleteOptions
- type ElasticPoolsClientBeginFailoverOptions
- type ElasticPoolsClientBeginUpdateOptions
- type ElasticPoolsClientCreateOrUpdateResponse
- type ElasticPoolsClientDeleteResponse
- type ElasticPoolsClientFailoverResponse
- type ElasticPoolsClientGetOptions
- type ElasticPoolsClientGetResponse
- type ElasticPoolsClientListByServerOptions
- type ElasticPoolsClientListByServerResponse
- type ElasticPoolsClientListMetricDefinitionsOptions
- type ElasticPoolsClientListMetricDefinitionsResponse
- type ElasticPoolsClientListMetricsOptions
- type ElasticPoolsClientListMetricsResponse
- type ElasticPoolsClientUpdateResponse
- type EncryptionProtector
- type EncryptionProtectorListResult
- type EncryptionProtectorName
- type EncryptionProtectorProperties
- type EncryptionProtectorsClient
- func (client *EncryptionProtectorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[EncryptionProtectorsClientCreateOrUpdateResponse], error)
- func (client *EncryptionProtectorsClient) BeginRevalidate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[EncryptionProtectorsClientRevalidateResponse], error)
- func (client *EncryptionProtectorsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (EncryptionProtectorsClientGetResponse, error)
- func (client *EncryptionProtectorsClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[EncryptionProtectorsClientListByServerResponse]
- type EncryptionProtectorsClientBeginCreateOrUpdateOptions
- type EncryptionProtectorsClientBeginRevalidateOptions
- type EncryptionProtectorsClientCreateOrUpdateResponse
- type EncryptionProtectorsClientGetOptions
- type EncryptionProtectorsClientGetResponse
- type EncryptionProtectorsClientListByServerOptions
- type EncryptionProtectorsClientListByServerResponse
- type EncryptionProtectorsClientRevalidateResponse
- type EndpointCertificate
- type EndpointCertificateListResult
- type EndpointCertificateProperties
- type EndpointCertificatesClient
- func (client *EndpointCertificatesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (EndpointCertificatesClientGetResponse, error)
- func (client *EndpointCertificatesClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, ...) *runtime.Pager[EndpointCertificatesClientListByInstanceResponse]
- type EndpointCertificatesClientGetOptions
- type EndpointCertificatesClientGetResponse
- type EndpointCertificatesClientListByInstanceOptions
- type EndpointCertificatesClientListByInstanceResponse
- type ExportDatabaseDefinition
- type ExtendedDatabaseBlobAuditingPoliciesClient
- func (client *ExtendedDatabaseBlobAuditingPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse, error)
- func (client *ExtendedDatabaseBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ExtendedDatabaseBlobAuditingPoliciesClientGetResponse, error)
- func (client *ExtendedDatabaseBlobAuditingPoliciesClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, ...) ...
- type ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions
- type ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse
- type ExtendedDatabaseBlobAuditingPoliciesClientGetOptions
- type ExtendedDatabaseBlobAuditingPoliciesClientGetResponse
- type ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseOptions
- type ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseResponse
- type ExtendedDatabaseBlobAuditingPolicy
- type ExtendedDatabaseBlobAuditingPolicyListResult
- type ExtendedDatabaseBlobAuditingPolicyProperties
- type ExtendedServerBlobAuditingPoliciesClient
- func (client *ExtendedServerBlobAuditingPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (...)
- func (client *ExtendedServerBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ExtendedServerBlobAuditingPoliciesClientGetResponse, error)
- func (client *ExtendedServerBlobAuditingPoliciesClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[ExtendedServerBlobAuditingPoliciesClientListByServerResponse]
- type ExtendedServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions
- type ExtendedServerBlobAuditingPoliciesClientCreateOrUpdateResponse
- type ExtendedServerBlobAuditingPoliciesClientGetOptions
- type ExtendedServerBlobAuditingPoliciesClientGetResponse
- type ExtendedServerBlobAuditingPoliciesClientListByServerOptions
- type ExtendedServerBlobAuditingPoliciesClientListByServerResponse
- type ExtendedServerBlobAuditingPolicy
- type ExtendedServerBlobAuditingPolicyListResult
- type ExtendedServerBlobAuditingPolicyProperties
- type FailoverGroup
- type FailoverGroupListResult
- type FailoverGroupProperties
- type FailoverGroupReadOnlyEndpoint
- type FailoverGroupReadWriteEndpoint
- type FailoverGroupReplicationRole
- type FailoverGroupUpdate
- type FailoverGroupUpdateProperties
- type FailoverGroupsClient
- func (client *FailoverGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[FailoverGroupsClientCreateOrUpdateResponse], error)
- func (client *FailoverGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[FailoverGroupsClientDeleteResponse], error)
- func (client *FailoverGroupsClient) BeginFailover(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[FailoverGroupsClientFailoverResponse], error)
- func (client *FailoverGroupsClient) BeginForceFailoverAllowDataLoss(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[FailoverGroupsClientForceFailoverAllowDataLossResponse], error)
- func (client *FailoverGroupsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[FailoverGroupsClientUpdateResponse], error)
- func (client *FailoverGroupsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (FailoverGroupsClientGetResponse, error)
- func (client *FailoverGroupsClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[FailoverGroupsClientListByServerResponse]
- type FailoverGroupsClientBeginCreateOrUpdateOptions
- type FailoverGroupsClientBeginDeleteOptions
- type FailoverGroupsClientBeginFailoverOptions
- type FailoverGroupsClientBeginForceFailoverAllowDataLossOptions
- type FailoverGroupsClientBeginUpdateOptions
- type FailoverGroupsClientCreateOrUpdateResponse
- type FailoverGroupsClientDeleteResponse
- type FailoverGroupsClientFailoverResponse
- type FailoverGroupsClientForceFailoverAllowDataLossResponse
- type FailoverGroupsClientGetOptions
- type FailoverGroupsClientGetResponse
- type FailoverGroupsClientListByServerOptions
- type FailoverGroupsClientListByServerResponse
- type FailoverGroupsClientUpdateResponse
- type FirewallRule
- type FirewallRuleList
- type FirewallRuleListResult
- type FirewallRulesClient
- func (client *FirewallRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (FirewallRulesClientCreateOrUpdateResponse, error)
- func (client *FirewallRulesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, ...) (FirewallRulesClientDeleteResponse, error)
- func (client *FirewallRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (FirewallRulesClientGetResponse, error)
- func (client *FirewallRulesClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[FirewallRulesClientListByServerResponse]
- func (client *FirewallRulesClient) Replace(ctx context.Context, resourceGroupName string, serverName string, ...) (FirewallRulesClientReplaceResponse, error)
- type FirewallRulesClientCreateOrUpdateOptions
- type FirewallRulesClientCreateOrUpdateResponse
- type FirewallRulesClientDeleteOptions
- type FirewallRulesClientDeleteResponse
- type FirewallRulesClientGetOptions
- type FirewallRulesClientGetResponse
- type FirewallRulesClientListByServerOptions
- type FirewallRulesClientListByServerResponse
- type FirewallRulesClientReplaceOptions
- type FirewallRulesClientReplaceResponse
- type GeoBackupPoliciesClient
- func (client *GeoBackupPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (GeoBackupPoliciesClientCreateOrUpdateResponse, error)
- func (client *GeoBackupPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (GeoBackupPoliciesClientGetResponse, error)
- func (client *GeoBackupPoliciesClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[GeoBackupPoliciesClientListByDatabaseResponse]
- type GeoBackupPoliciesClientCreateOrUpdateOptions
- type GeoBackupPoliciesClientCreateOrUpdateResponse
- type GeoBackupPoliciesClientGetOptions
- type GeoBackupPoliciesClientGetResponse
- type GeoBackupPoliciesClientListByDatabaseOptions
- type GeoBackupPoliciesClientListByDatabaseResponse
- type GeoBackupPolicy
- type GeoBackupPolicyListResult
- type GeoBackupPolicyName
- type GeoBackupPolicyProperties
- type GeoBackupPolicyState
- type IPv6FirewallRule
- type IPv6FirewallRuleListResult
- type IPv6FirewallRulesClient
- func (client *IPv6FirewallRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (IPv6FirewallRulesClientCreateOrUpdateResponse, error)
- func (client *IPv6FirewallRulesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, ...) (IPv6FirewallRulesClientDeleteResponse, error)
- func (client *IPv6FirewallRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (IPv6FirewallRulesClientGetResponse, error)
- func (client *IPv6FirewallRulesClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[IPv6FirewallRulesClientListByServerResponse]
- type IPv6FirewallRulesClientCreateOrUpdateOptions
- type IPv6FirewallRulesClientCreateOrUpdateResponse
- type IPv6FirewallRulesClientDeleteOptions
- type IPv6FirewallRulesClientDeleteResponse
- type IPv6FirewallRulesClientGetOptions
- type IPv6FirewallRulesClientGetResponse
- type IPv6FirewallRulesClientListByServerOptions
- type IPv6FirewallRulesClientListByServerResponse
- type IPv6ServerFirewallRuleProperties
- type IdentityType
- type ImplementationMethod
- type ImportExistingDatabaseDefinition
- type ImportExportExtensionsOperationListResult
- type ImportExportExtensionsOperationResult
- type ImportExportExtensionsOperationResultProperties
- type ImportExportOperationResult
- type ImportExportOperationResultProperties
- type ImportNewDatabaseDefinition
- type InstanceFailoverGroup
- type InstanceFailoverGroupListResult
- type InstanceFailoverGroupProperties
- type InstanceFailoverGroupReadOnlyEndpoint
- type InstanceFailoverGroupReadWriteEndpoint
- type InstanceFailoverGroupReplicationRole
- type InstanceFailoverGroupsClient
- func (client *InstanceFailoverGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, locationName string, ...) (*runtime.Poller[InstanceFailoverGroupsClientCreateOrUpdateResponse], error)
- func (client *InstanceFailoverGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, locationName string, ...) (*runtime.Poller[InstanceFailoverGroupsClientDeleteResponse], error)
- func (client *InstanceFailoverGroupsClient) BeginFailover(ctx context.Context, resourceGroupName string, locationName string, ...) (*runtime.Poller[InstanceFailoverGroupsClientFailoverResponse], error)
- func (client *InstanceFailoverGroupsClient) BeginForceFailoverAllowDataLoss(ctx context.Context, resourceGroupName string, locationName string, ...) (...)
- func (client *InstanceFailoverGroupsClient) Get(ctx context.Context, resourceGroupName string, locationName string, ...) (InstanceFailoverGroupsClientGetResponse, error)
- func (client *InstanceFailoverGroupsClient) NewListByLocationPager(resourceGroupName string, locationName string, ...) *runtime.Pager[InstanceFailoverGroupsClientListByLocationResponse]
- type InstanceFailoverGroupsClientBeginCreateOrUpdateOptions
- type InstanceFailoverGroupsClientBeginDeleteOptions
- type InstanceFailoverGroupsClientBeginFailoverOptions
- type InstanceFailoverGroupsClientBeginForceFailoverAllowDataLossOptions
- type InstanceFailoverGroupsClientCreateOrUpdateResponse
- type InstanceFailoverGroupsClientDeleteResponse
- type InstanceFailoverGroupsClientFailoverResponse
- type InstanceFailoverGroupsClientForceFailoverAllowDataLossResponse
- type InstanceFailoverGroupsClientGetOptions
- type InstanceFailoverGroupsClientGetResponse
- type InstanceFailoverGroupsClientListByLocationOptions
- type InstanceFailoverGroupsClientListByLocationResponse
- type InstancePool
- type InstancePoolEditionCapability
- type InstancePoolFamilyCapability
- type InstancePoolLicenseType
- type InstancePoolListResult
- type InstancePoolProperties
- type InstancePoolUpdate
- type InstancePoolVcoresCapability
- type InstancePoolsClient
- func (client *InstancePoolsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, instancePoolName string, ...) (*runtime.Poller[InstancePoolsClientCreateOrUpdateResponse], error)
- func (client *InstancePoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, instancePoolName string, ...) (*runtime.Poller[InstancePoolsClientDeleteResponse], error)
- func (client *InstancePoolsClient) BeginUpdate(ctx context.Context, resourceGroupName string, instancePoolName string, ...) (*runtime.Poller[InstancePoolsClientUpdateResponse], error)
- func (client *InstancePoolsClient) Get(ctx context.Context, resourceGroupName string, instancePoolName string, ...) (InstancePoolsClientGetResponse, error)
- func (client *InstancePoolsClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[InstancePoolsClientListByResourceGroupResponse]
- func (client *InstancePoolsClient) NewListPager(options *InstancePoolsClientListOptions) *runtime.Pager[InstancePoolsClientListResponse]
- type InstancePoolsClientBeginCreateOrUpdateOptions
- type InstancePoolsClientBeginDeleteOptions
- type InstancePoolsClientBeginUpdateOptions
- type InstancePoolsClientCreateOrUpdateResponse
- type InstancePoolsClientDeleteResponse
- type InstancePoolsClientGetOptions
- type InstancePoolsClientGetResponse
- type InstancePoolsClientListByResourceGroupOptions
- type InstancePoolsClientListByResourceGroupResponse
- type InstancePoolsClientListOptions
- type InstancePoolsClientListResponse
- type InstancePoolsClientUpdateResponse
- type IsRetryable
- type Job
- type JobAgent
- type JobAgentListResult
- type JobAgentProperties
- type JobAgentState
- type JobAgentUpdate
- type JobAgentsClient
- func (client *JobAgentsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[JobAgentsClientCreateOrUpdateResponse], error)
- func (client *JobAgentsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[JobAgentsClientDeleteResponse], error)
- func (client *JobAgentsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[JobAgentsClientUpdateResponse], error)
- func (client *JobAgentsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (JobAgentsClientGetResponse, error)
- func (client *JobAgentsClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[JobAgentsClientListByServerResponse]
- type JobAgentsClientBeginCreateOrUpdateOptions
- type JobAgentsClientBeginDeleteOptions
- type JobAgentsClientBeginUpdateOptions
- type JobAgentsClientCreateOrUpdateResponse
- type JobAgentsClientDeleteResponse
- type JobAgentsClientGetOptions
- type JobAgentsClientGetResponse
- type JobAgentsClientListByServerOptions
- type JobAgentsClientListByServerResponse
- type JobAgentsClientUpdateResponse
- type JobCredential
- type JobCredentialListResult
- type JobCredentialProperties
- type JobCredentialsClient
- func (client *JobCredentialsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (JobCredentialsClientCreateOrUpdateResponse, error)
- func (client *JobCredentialsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, ...) (JobCredentialsClientDeleteResponse, error)
- func (client *JobCredentialsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (JobCredentialsClientGetResponse, error)
- func (client *JobCredentialsClient) NewListByAgentPager(resourceGroupName string, serverName string, jobAgentName string, ...) *runtime.Pager[JobCredentialsClientListByAgentResponse]
- type JobCredentialsClientCreateOrUpdateOptions
- type JobCredentialsClientCreateOrUpdateResponse
- type JobCredentialsClientDeleteOptions
- type JobCredentialsClientDeleteResponse
- type JobCredentialsClientGetOptions
- type JobCredentialsClientGetResponse
- type JobCredentialsClientListByAgentOptions
- type JobCredentialsClientListByAgentResponse
- type JobExecution
- type JobExecutionLifecycle
- type JobExecutionListResult
- type JobExecutionProperties
- type JobExecutionTarget
- type JobExecutionsClient
- func (client *JobExecutionsClient) BeginCreate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[JobExecutionsClientCreateResponse], error)
- func (client *JobExecutionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[JobExecutionsClientCreateOrUpdateResponse], error)
- func (client *JobExecutionsClient) Cancel(ctx context.Context, resourceGroupName string, serverName string, ...) (JobExecutionsClientCancelResponse, error)
- func (client *JobExecutionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (JobExecutionsClientGetResponse, error)
- func (client *JobExecutionsClient) NewListByAgentPager(resourceGroupName string, serverName string, jobAgentName string, ...) *runtime.Pager[JobExecutionsClientListByAgentResponse]
- func (client *JobExecutionsClient) NewListByJobPager(resourceGroupName string, serverName string, jobAgentName string, ...) *runtime.Pager[JobExecutionsClientListByJobResponse]
- type JobExecutionsClientBeginCreateOptions
- type JobExecutionsClientBeginCreateOrUpdateOptions
- type JobExecutionsClientCancelOptions
- type JobExecutionsClientCancelResponse
- type JobExecutionsClientCreateOrUpdateResponse
- type JobExecutionsClientCreateResponse
- type JobExecutionsClientGetOptions
- type JobExecutionsClientGetResponse
- type JobExecutionsClientListByAgentOptions
- type JobExecutionsClientListByAgentResponse
- type JobExecutionsClientListByJobOptions
- type JobExecutionsClientListByJobResponse
- type JobListResult
- type JobProperties
- type JobSchedule
- type JobScheduleType
- type JobStep
- type JobStepAction
- type JobStepActionSource
- type JobStepActionType
- type JobStepExecutionOptions
- type JobStepExecutionsClient
- func (client *JobStepExecutionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (JobStepExecutionsClientGetResponse, error)
- func (client *JobStepExecutionsClient) NewListByJobExecutionPager(resourceGroupName string, serverName string, jobAgentName string, ...) *runtime.Pager[JobStepExecutionsClientListByJobExecutionResponse]
- type JobStepExecutionsClientGetOptions
- type JobStepExecutionsClientGetResponse
- type JobStepExecutionsClientListByJobExecutionOptions
- type JobStepExecutionsClientListByJobExecutionResponse
- type JobStepListResult
- type JobStepOutput
- type JobStepOutputType
- type JobStepProperties
- type JobStepsClient
- func (client *JobStepsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (JobStepsClientCreateOrUpdateResponse, error)
- func (client *JobStepsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, ...) (JobStepsClientDeleteResponse, error)
- func (client *JobStepsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (JobStepsClientGetResponse, error)
- func (client *JobStepsClient) GetByVersion(ctx context.Context, resourceGroupName string, serverName string, ...) (JobStepsClientGetByVersionResponse, error)
- func (client *JobStepsClient) NewListByJobPager(resourceGroupName string, serverName string, jobAgentName string, ...) *runtime.Pager[JobStepsClientListByJobResponse]
- func (client *JobStepsClient) NewListByVersionPager(resourceGroupName string, serverName string, jobAgentName string, ...) *runtime.Pager[JobStepsClientListByVersionResponse]
- type JobStepsClientCreateOrUpdateOptions
- type JobStepsClientCreateOrUpdateResponse
- type JobStepsClientDeleteOptions
- type JobStepsClientDeleteResponse
- type JobStepsClientGetByVersionOptions
- type JobStepsClientGetByVersionResponse
- type JobStepsClientGetOptions
- type JobStepsClientGetResponse
- type JobStepsClientListByJobOptions
- type JobStepsClientListByJobResponse
- type JobStepsClientListByVersionOptions
- type JobStepsClientListByVersionResponse
- type JobTarget
- type JobTargetExecutionsClient
- func (client *JobTargetExecutionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (JobTargetExecutionsClientGetResponse, error)
- func (client *JobTargetExecutionsClient) NewListByJobExecutionPager(resourceGroupName string, serverName string, jobAgentName string, ...) *runtime.Pager[JobTargetExecutionsClientListByJobExecutionResponse]
- func (client *JobTargetExecutionsClient) NewListByStepPager(resourceGroupName string, serverName string, jobAgentName string, ...) *runtime.Pager[JobTargetExecutionsClientListByStepResponse]
- type JobTargetExecutionsClientGetOptions
- type JobTargetExecutionsClientGetResponse
- type JobTargetExecutionsClientListByJobExecutionOptions
- type JobTargetExecutionsClientListByJobExecutionResponse
- type JobTargetExecutionsClientListByStepOptions
- type JobTargetExecutionsClientListByStepResponse
- type JobTargetGroup
- type JobTargetGroupListResult
- type JobTargetGroupMembershipType
- type JobTargetGroupProperties
- type JobTargetGroupsClient
- func (client *JobTargetGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (JobTargetGroupsClientCreateOrUpdateResponse, error)
- func (client *JobTargetGroupsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, ...) (JobTargetGroupsClientDeleteResponse, error)
- func (client *JobTargetGroupsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (JobTargetGroupsClientGetResponse, error)
- func (client *JobTargetGroupsClient) NewListByAgentPager(resourceGroupName string, serverName string, jobAgentName string, ...) *runtime.Pager[JobTargetGroupsClientListByAgentResponse]
- type JobTargetGroupsClientCreateOrUpdateOptions
- type JobTargetGroupsClientCreateOrUpdateResponse
- type JobTargetGroupsClientDeleteOptions
- type JobTargetGroupsClientDeleteResponse
- type JobTargetGroupsClientGetOptions
- type JobTargetGroupsClientGetResponse
- type JobTargetGroupsClientListByAgentOptions
- type JobTargetGroupsClientListByAgentResponse
- type JobTargetType
- type JobVersion
- type JobVersionListResult
- type JobVersionsClient
- func (client *JobVersionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (JobVersionsClientGetResponse, error)
- func (client *JobVersionsClient) NewListByJobPager(resourceGroupName string, serverName string, jobAgentName string, ...) *runtime.Pager[JobVersionsClientListByJobResponse]
- type JobVersionsClientGetOptions
- type JobVersionsClientGetResponse
- type JobVersionsClientListByJobOptions
- type JobVersionsClientListByJobResponse
- type JobsClient
- func (client *JobsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (JobsClientCreateOrUpdateResponse, error)
- func (client *JobsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, ...) (JobsClientDeleteResponse, error)
- func (client *JobsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (JobsClientGetResponse, error)
- func (client *JobsClient) NewListByAgentPager(resourceGroupName string, serverName string, jobAgentName string, ...) *runtime.Pager[JobsClientListByAgentResponse]
- type JobsClientCreateOrUpdateOptions
- type JobsClientCreateOrUpdateResponse
- type JobsClientDeleteOptions
- type JobsClientDeleteResponse
- type JobsClientGetOptions
- type JobsClientGetResponse
- type JobsClientListByAgentOptions
- type JobsClientListByAgentResponse
- type LedgerDigestUploads
- type LedgerDigestUploadsClient
- func (client *LedgerDigestUploadsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[LedgerDigestUploadsClientCreateOrUpdateResponse], error)
- func (client *LedgerDigestUploadsClient) BeginDisable(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[LedgerDigestUploadsClientDisableResponse], error)
- func (client *LedgerDigestUploadsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (LedgerDigestUploadsClientGetResponse, error)
- func (client *LedgerDigestUploadsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[LedgerDigestUploadsClientListByDatabaseResponse]
- type LedgerDigestUploadsClientBeginCreateOrUpdateOptions
- type LedgerDigestUploadsClientBeginDisableOptions
- type LedgerDigestUploadsClientCreateOrUpdateResponse
- type LedgerDigestUploadsClientDisableResponse
- type LedgerDigestUploadsClientGetOptions
- type LedgerDigestUploadsClientGetResponse
- type LedgerDigestUploadsClientListByDatabaseOptions
- type LedgerDigestUploadsClientListByDatabaseResponse
- type LedgerDigestUploadsListResult
- type LedgerDigestUploadsName
- type LedgerDigestUploadsProperties
- type LedgerDigestUploadsState
- type LicenseTypeCapability
- type LocationCapabilities
- type LogSizeCapability
- type LogSizeUnit
- type LogicalDatabaseTransparentDataEncryption
- type LogicalDatabaseTransparentDataEncryptionListResult
- type LogicalServerAdvancedThreatProtectionListResult
- type LogicalServerSecurityAlertPolicyListResult
- type LongTermRetentionBackup
- type LongTermRetentionBackupListResult
- type LongTermRetentionBackupOperationResult
- type LongTermRetentionBackupProperties
- type LongTermRetentionBackupsClient
- func (client *LongTermRetentionBackupsClient) BeginCopy(ctx context.Context, locationName string, longTermRetentionServerName string, ...) (*runtime.Poller[LongTermRetentionBackupsClientCopyResponse], error)
- func (client *LongTermRetentionBackupsClient) BeginCopyByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, ...) (*runtime.Poller[LongTermRetentionBackupsClientCopyByResourceGroupResponse], ...)
- func (client *LongTermRetentionBackupsClient) BeginDelete(ctx context.Context, locationName string, longTermRetentionServerName string, ...) (*runtime.Poller[LongTermRetentionBackupsClientDeleteResponse], error)
- func (client *LongTermRetentionBackupsClient) BeginDeleteByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, ...) (*runtime.Poller[LongTermRetentionBackupsClientDeleteByResourceGroupResponse], ...)
- func (client *LongTermRetentionBackupsClient) BeginUpdate(ctx context.Context, locationName string, longTermRetentionServerName string, ...) (*runtime.Poller[LongTermRetentionBackupsClientUpdateResponse], error)
- func (client *LongTermRetentionBackupsClient) BeginUpdateByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, ...) (*runtime.Poller[LongTermRetentionBackupsClientUpdateByResourceGroupResponse], ...)
- func (client *LongTermRetentionBackupsClient) Get(ctx context.Context, locationName string, longTermRetentionServerName string, ...) (LongTermRetentionBackupsClientGetResponse, error)
- func (client *LongTermRetentionBackupsClient) GetByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, ...) (LongTermRetentionBackupsClientGetByResourceGroupResponse, error)
- func (client *LongTermRetentionBackupsClient) NewListByDatabasePager(locationName string, longTermRetentionServerName string, ...) *runtime.Pager[LongTermRetentionBackupsClientListByDatabaseResponse]
- func (client *LongTermRetentionBackupsClient) NewListByLocationPager(locationName string, ...) *runtime.Pager[LongTermRetentionBackupsClientListByLocationResponse]
- func (client *LongTermRetentionBackupsClient) NewListByResourceGroupDatabasePager(resourceGroupName string, locationName string, ...) ...
- func (client *LongTermRetentionBackupsClient) NewListByResourceGroupLocationPager(resourceGroupName string, locationName string, ...) ...
- func (client *LongTermRetentionBackupsClient) NewListByResourceGroupServerPager(resourceGroupName string, locationName string, ...) ...
- func (client *LongTermRetentionBackupsClient) NewListByServerPager(locationName string, longTermRetentionServerName string, ...) *runtime.Pager[LongTermRetentionBackupsClientListByServerResponse]
- type LongTermRetentionBackupsClientBeginCopyByResourceGroupOptions
- type LongTermRetentionBackupsClientBeginCopyOptions
- type LongTermRetentionBackupsClientBeginDeleteByResourceGroupOptions
- type LongTermRetentionBackupsClientBeginDeleteOptions
- type LongTermRetentionBackupsClientBeginUpdateByResourceGroupOptions
- type LongTermRetentionBackupsClientBeginUpdateOptions
- type LongTermRetentionBackupsClientCopyByResourceGroupResponse
- type LongTermRetentionBackupsClientCopyResponse
- type LongTermRetentionBackupsClientDeleteByResourceGroupResponse
- type LongTermRetentionBackupsClientDeleteResponse
- type LongTermRetentionBackupsClientGetByResourceGroupOptions
- type LongTermRetentionBackupsClientGetByResourceGroupResponse
- type LongTermRetentionBackupsClientGetOptions
- type LongTermRetentionBackupsClientGetResponse
- type LongTermRetentionBackupsClientListByDatabaseOptions
- type LongTermRetentionBackupsClientListByDatabaseResponse
- type LongTermRetentionBackupsClientListByLocationOptions
- type LongTermRetentionBackupsClientListByLocationResponse
- type LongTermRetentionBackupsClientListByResourceGroupDatabaseOptions
- type LongTermRetentionBackupsClientListByResourceGroupDatabaseResponse
- type LongTermRetentionBackupsClientListByResourceGroupLocationOptions
- type LongTermRetentionBackupsClientListByResourceGroupLocationResponse
- type LongTermRetentionBackupsClientListByResourceGroupServerOptions
- type LongTermRetentionBackupsClientListByResourceGroupServerResponse
- type LongTermRetentionBackupsClientListByServerOptions
- type LongTermRetentionBackupsClientListByServerResponse
- type LongTermRetentionBackupsClientUpdateByResourceGroupResponse
- type LongTermRetentionBackupsClientUpdateResponse
- type LongTermRetentionManagedInstanceBackupsClient
- func (client *LongTermRetentionManagedInstanceBackupsClient) BeginDelete(ctx context.Context, locationName string, managedInstanceName string, ...) (*runtime.Poller[LongTermRetentionManagedInstanceBackupsClientDeleteResponse], ...)
- func (client *LongTermRetentionManagedInstanceBackupsClient) BeginDeleteByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, ...) (...)
- func (client *LongTermRetentionManagedInstanceBackupsClient) Get(ctx context.Context, locationName string, managedInstanceName string, ...) (LongTermRetentionManagedInstanceBackupsClientGetResponse, error)
- func (client *LongTermRetentionManagedInstanceBackupsClient) GetByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, ...) (LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupResponse, error)
- func (client *LongTermRetentionManagedInstanceBackupsClient) NewListByDatabasePager(locationName string, managedInstanceName string, databaseName string, ...) ...
- func (client *LongTermRetentionManagedInstanceBackupsClient) NewListByInstancePager(locationName string, managedInstanceName string, ...) ...
- func (client *LongTermRetentionManagedInstanceBackupsClient) NewListByLocationPager(locationName string, ...) ...
- func (client *LongTermRetentionManagedInstanceBackupsClient) NewListByResourceGroupDatabasePager(resourceGroupName string, locationName string, managedInstanceName string, ...) ...
- func (client *LongTermRetentionManagedInstanceBackupsClient) NewListByResourceGroupInstancePager(resourceGroupName string, locationName string, managedInstanceName string, ...) ...
- func (client *LongTermRetentionManagedInstanceBackupsClient) NewListByResourceGroupLocationPager(resourceGroupName string, locationName string, ...) ...
- type LongTermRetentionManagedInstanceBackupsClientBeginDeleteByResourceGroupOptions
- type LongTermRetentionManagedInstanceBackupsClientBeginDeleteOptions
- type LongTermRetentionManagedInstanceBackupsClientDeleteByResourceGroupResponse
- type LongTermRetentionManagedInstanceBackupsClientDeleteResponse
- type LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupOptions
- type LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupResponse
- type LongTermRetentionManagedInstanceBackupsClientGetOptions
- type LongTermRetentionManagedInstanceBackupsClientGetResponse
- type LongTermRetentionManagedInstanceBackupsClientListByDatabaseOptions
- type LongTermRetentionManagedInstanceBackupsClientListByDatabaseResponse
- type LongTermRetentionManagedInstanceBackupsClientListByInstanceOptions
- type LongTermRetentionManagedInstanceBackupsClientListByInstanceResponse
- type LongTermRetentionManagedInstanceBackupsClientListByLocationOptions
- type LongTermRetentionManagedInstanceBackupsClientListByLocationResponse
- type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseOptions
- type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseResponse
- type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceOptions
- type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceResponse
- type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationOptions
- type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationResponse
- type LongTermRetentionOperationResultProperties
- type LongTermRetentionPoliciesClient
- func (client *LongTermRetentionPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[LongTermRetentionPoliciesClientCreateOrUpdateResponse], error)
- func (client *LongTermRetentionPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (LongTermRetentionPoliciesClientGetResponse, error)
- func (client *LongTermRetentionPoliciesClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[LongTermRetentionPoliciesClientListByDatabaseResponse]
- type LongTermRetentionPoliciesClientBeginCreateOrUpdateOptions
- type LongTermRetentionPoliciesClientCreateOrUpdateResponse
- type LongTermRetentionPoliciesClientGetOptions
- type LongTermRetentionPoliciesClientGetResponse
- type LongTermRetentionPoliciesClientListByDatabaseOptions
- type LongTermRetentionPoliciesClientListByDatabaseResponse
- type LongTermRetentionPolicy
- type LongTermRetentionPolicyListResult
- type LongTermRetentionPolicyName
- type MaintenanceConfigurationCapability
- type MaintenanceWindowOptions
- type MaintenanceWindowOptionsClient
- type MaintenanceWindowOptionsClientGetOptions
- type MaintenanceWindowOptionsClientGetResponse
- type MaintenanceWindowOptionsProperties
- type MaintenanceWindowTimeRange
- type MaintenanceWindows
- type MaintenanceWindowsClient
- func (client *MaintenanceWindowsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (MaintenanceWindowsClientCreateOrUpdateResponse, error)
- func (client *MaintenanceWindowsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (MaintenanceWindowsClientGetResponse, error)
- type MaintenanceWindowsClientCreateOrUpdateOptions
- type MaintenanceWindowsClientCreateOrUpdateResponse
- type MaintenanceWindowsClientGetOptions
- type MaintenanceWindowsClientGetResponse
- type MaintenanceWindowsProperties
- type ManagedBackupShortTermRetentionPoliciesClient
- func (client *ManagedBackupShortTermRetentionPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (...)
- func (client *ManagedBackupShortTermRetentionPoliciesClient) BeginUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ManagedBackupShortTermRetentionPoliciesClientUpdateResponse], ...)
- func (client *ManagedBackupShortTermRetentionPoliciesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedBackupShortTermRetentionPoliciesClientGetResponse, error)
- func (client *ManagedBackupShortTermRetentionPoliciesClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, ...) ...
- type ManagedBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions
- type ManagedBackupShortTermRetentionPoliciesClientBeginUpdateOptions
- type ManagedBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse
- type ManagedBackupShortTermRetentionPoliciesClientGetOptions
- type ManagedBackupShortTermRetentionPoliciesClientGetResponse
- type ManagedBackupShortTermRetentionPoliciesClientListByDatabaseOptions
- type ManagedBackupShortTermRetentionPoliciesClientListByDatabaseResponse
- type ManagedBackupShortTermRetentionPoliciesClientUpdateResponse
- type ManagedBackupShortTermRetentionPolicy
- type ManagedBackupShortTermRetentionPolicyListResult
- type ManagedBackupShortTermRetentionPolicyProperties
- type ManagedDatabase
- type ManagedDatabaseColumnsClient
- func (client *ManagedDatabaseColumnsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedDatabaseColumnsClientGetResponse, error)
- func (client *ManagedDatabaseColumnsClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, ...) *runtime.Pager[ManagedDatabaseColumnsClientListByDatabaseResponse]
- func (client *ManagedDatabaseColumnsClient) NewListByTablePager(resourceGroupName string, managedInstanceName string, databaseName string, ...) *runtime.Pager[ManagedDatabaseColumnsClientListByTableResponse]
- type ManagedDatabaseColumnsClientGetOptions
- type ManagedDatabaseColumnsClientGetResponse
- type ManagedDatabaseColumnsClientListByDatabaseOptions
- type ManagedDatabaseColumnsClientListByDatabaseResponse
- type ManagedDatabaseColumnsClientListByTableOptions
- type ManagedDatabaseColumnsClientListByTableResponse
- type ManagedDatabaseCreateMode
- type ManagedDatabaseListResult
- type ManagedDatabaseProperties
- type ManagedDatabaseQueriesClient
- func (client *ManagedDatabaseQueriesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedDatabaseQueriesClientGetResponse, error)
- func (client *ManagedDatabaseQueriesClient) NewListByQueryPager(resourceGroupName string, managedInstanceName string, databaseName string, ...) *runtime.Pager[ManagedDatabaseQueriesClientListByQueryResponse]
- type ManagedDatabaseQueriesClientGetOptions
- type ManagedDatabaseQueriesClientGetResponse
- type ManagedDatabaseQueriesClientListByQueryOptions
- type ManagedDatabaseQueriesClientListByQueryResponse
- type ManagedDatabaseRecommendedSensitivityLabelsClient
- type ManagedDatabaseRecommendedSensitivityLabelsClientUpdateOptions
- type ManagedDatabaseRecommendedSensitivityLabelsClientUpdateResponse
- type ManagedDatabaseRestoreDetailsClient
- type ManagedDatabaseRestoreDetailsClientGetOptions
- type ManagedDatabaseRestoreDetailsClientGetResponse
- type ManagedDatabaseRestoreDetailsProperties
- type ManagedDatabaseRestoreDetailsResult
- type ManagedDatabaseSchemasClient
- func (client *ManagedDatabaseSchemasClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedDatabaseSchemasClientGetResponse, error)
- func (client *ManagedDatabaseSchemasClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, ...) *runtime.Pager[ManagedDatabaseSchemasClientListByDatabaseResponse]
- type ManagedDatabaseSchemasClientGetOptions
- type ManagedDatabaseSchemasClientGetResponse
- type ManagedDatabaseSchemasClientListByDatabaseOptions
- type ManagedDatabaseSchemasClientListByDatabaseResponse
- type ManagedDatabaseSecurityAlertPoliciesClient
- func (client *ManagedDatabaseSecurityAlertPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse, error)
- func (client *ManagedDatabaseSecurityAlertPoliciesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedDatabaseSecurityAlertPoliciesClientGetResponse, error)
- func (client *ManagedDatabaseSecurityAlertPoliciesClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, ...) ...
- type ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions
- type ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse
- type ManagedDatabaseSecurityAlertPoliciesClientGetOptions
- type ManagedDatabaseSecurityAlertPoliciesClientGetResponse
- type ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseOptions
- type ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseResponse
- type ManagedDatabaseSecurityAlertPolicy
- type ManagedDatabaseSecurityAlertPolicyListResult
- type ManagedDatabaseSecurityEventsClient
- type ManagedDatabaseSecurityEventsClientListByDatabaseOptions
- type ManagedDatabaseSecurityEventsClientListByDatabaseResponse
- type ManagedDatabaseSensitivityLabelsClient
- func (client *ManagedDatabaseSensitivityLabelsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedDatabaseSensitivityLabelsClientCreateOrUpdateResponse, error)
- func (client *ManagedDatabaseSensitivityLabelsClient) Delete(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedDatabaseSensitivityLabelsClientDeleteResponse, error)
- func (client *ManagedDatabaseSensitivityLabelsClient) DisableRecommendation(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedDatabaseSensitivityLabelsClientDisableRecommendationResponse, error)
- func (client *ManagedDatabaseSensitivityLabelsClient) EnableRecommendation(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedDatabaseSensitivityLabelsClientEnableRecommendationResponse, error)
- func (client *ManagedDatabaseSensitivityLabelsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedDatabaseSensitivityLabelsClientGetResponse, error)
- func (client *ManagedDatabaseSensitivityLabelsClient) NewListCurrentByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, ...) ...
- func (client *ManagedDatabaseSensitivityLabelsClient) NewListRecommendedByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, ...) ...
- func (client *ManagedDatabaseSensitivityLabelsClient) Update(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedDatabaseSensitivityLabelsClientUpdateResponse, error)
- type ManagedDatabaseSensitivityLabelsClientCreateOrUpdateOptions
- type ManagedDatabaseSensitivityLabelsClientCreateOrUpdateResponse
- type ManagedDatabaseSensitivityLabelsClientDeleteOptions
- type ManagedDatabaseSensitivityLabelsClientDeleteResponse
- type ManagedDatabaseSensitivityLabelsClientDisableRecommendationOptions
- type ManagedDatabaseSensitivityLabelsClientDisableRecommendationResponse
- type ManagedDatabaseSensitivityLabelsClientEnableRecommendationOptions
- type ManagedDatabaseSensitivityLabelsClientEnableRecommendationResponse
- type ManagedDatabaseSensitivityLabelsClientGetOptions
- type ManagedDatabaseSensitivityLabelsClientGetResponse
- type ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseOptions
- type ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseResponse
- type ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseOptions
- type ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseResponse
- type ManagedDatabaseSensitivityLabelsClientUpdateOptions
- type ManagedDatabaseSensitivityLabelsClientUpdateResponse
- type ManagedDatabaseStatus
- type ManagedDatabaseTablesClient
- func (client *ManagedDatabaseTablesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedDatabaseTablesClientGetResponse, error)
- func (client *ManagedDatabaseTablesClient) NewListBySchemaPager(resourceGroupName string, managedInstanceName string, databaseName string, ...) *runtime.Pager[ManagedDatabaseTablesClientListBySchemaResponse]
- type ManagedDatabaseTablesClientGetOptions
- type ManagedDatabaseTablesClientGetResponse
- type ManagedDatabaseTablesClientListBySchemaOptions
- type ManagedDatabaseTablesClientListBySchemaResponse
- type ManagedDatabaseTransparentDataEncryptionClient
- func (client *ManagedDatabaseTransparentDataEncryptionClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateResponse, error)
- func (client *ManagedDatabaseTransparentDataEncryptionClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedDatabaseTransparentDataEncryptionClientGetResponse, error)
- func (client *ManagedDatabaseTransparentDataEncryptionClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, ...) ...
- type ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateOptions
- type ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateResponse
- type ManagedDatabaseTransparentDataEncryptionClientGetOptions
- type ManagedDatabaseTransparentDataEncryptionClientGetResponse
- type ManagedDatabaseTransparentDataEncryptionClientListByDatabaseOptions
- type ManagedDatabaseTransparentDataEncryptionClientListByDatabaseResponse
- type ManagedDatabaseUpdate
- type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient
- func (client *ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (...)
- func (client *ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient) Delete(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse, error)
- func (client *ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse, error)
- type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions
- type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse
- type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions
- type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse
- type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions
- type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse
- type ManagedDatabaseVulnerabilityAssessmentScansClient
- func (client *ManagedDatabaseVulnerabilityAssessmentScansClient) BeginInitiateScan(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (...)
- func (client *ManagedDatabaseVulnerabilityAssessmentScansClient) Export(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedDatabaseVulnerabilityAssessmentScansClientExportResponse, error)
- func (client *ManagedDatabaseVulnerabilityAssessmentScansClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedDatabaseVulnerabilityAssessmentScansClientGetResponse, error)
- func (client *ManagedDatabaseVulnerabilityAssessmentScansClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, ...) ...
- type ManagedDatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions
- type ManagedDatabaseVulnerabilityAssessmentScansClientExportOptions
- type ManagedDatabaseVulnerabilityAssessmentScansClientExportResponse
- type ManagedDatabaseVulnerabilityAssessmentScansClientGetOptions
- type ManagedDatabaseVulnerabilityAssessmentScansClientGetResponse
- type ManagedDatabaseVulnerabilityAssessmentScansClientInitiateScanResponse
- type ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions
- type ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse
- type ManagedDatabaseVulnerabilityAssessmentsClient
- func (client *ManagedDatabaseVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse, error)
- func (client *ManagedDatabaseVulnerabilityAssessmentsClient) Delete(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedDatabaseVulnerabilityAssessmentsClientDeleteResponse, error)
- func (client *ManagedDatabaseVulnerabilityAssessmentsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedDatabaseVulnerabilityAssessmentsClientGetResponse, error)
- func (client *ManagedDatabaseVulnerabilityAssessmentsClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, ...) ...
- type ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions
- type ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse
- type ManagedDatabaseVulnerabilityAssessmentsClientDeleteOptions
- type ManagedDatabaseVulnerabilityAssessmentsClientDeleteResponse
- type ManagedDatabaseVulnerabilityAssessmentsClientGetOptions
- type ManagedDatabaseVulnerabilityAssessmentsClientGetResponse
- type ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseOptions
- type ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseResponse
- type ManagedDatabasesClient
- func (client *ManagedDatabasesClient) BeginCompleteRestore(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ManagedDatabasesClientCompleteRestoreResponse], error)
- func (client *ManagedDatabasesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ManagedDatabasesClientCreateOrUpdateResponse], error)
- func (client *ManagedDatabasesClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ManagedDatabasesClientDeleteResponse], error)
- func (client *ManagedDatabasesClient) BeginUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ManagedDatabasesClientUpdateResponse], error)
- func (client *ManagedDatabasesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedDatabasesClientGetResponse, error)
- func (client *ManagedDatabasesClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, ...) *runtime.Pager[ManagedDatabasesClientListByInstanceResponse]
- func (client *ManagedDatabasesClient) NewListInaccessibleByInstancePager(resourceGroupName string, managedInstanceName string, ...) *runtime.Pager[ManagedDatabasesClientListInaccessibleByInstanceResponse]
- type ManagedDatabasesClientBeginCompleteRestoreOptions
- type ManagedDatabasesClientBeginCreateOrUpdateOptions
- type ManagedDatabasesClientBeginDeleteOptions
- type ManagedDatabasesClientBeginUpdateOptions
- type ManagedDatabasesClientCompleteRestoreResponse
- type ManagedDatabasesClientCreateOrUpdateResponse
- type ManagedDatabasesClientDeleteResponse
- type ManagedDatabasesClientGetOptions
- type ManagedDatabasesClientGetResponse
- type ManagedDatabasesClientListByInstanceOptions
- type ManagedDatabasesClientListByInstanceResponse
- type ManagedDatabasesClientListInaccessibleByInstanceOptions
- type ManagedDatabasesClientListInaccessibleByInstanceResponse
- type ManagedDatabasesClientUpdateResponse
- type ManagedInstance
- type ManagedInstanceAdministrator
- type ManagedInstanceAdministratorListResult
- type ManagedInstanceAdministratorProperties
- type ManagedInstanceAdministratorType
- type ManagedInstanceAdministratorsClient
- func (client *ManagedInstanceAdministratorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ManagedInstanceAdministratorsClientCreateOrUpdateResponse], ...)
- func (client *ManagedInstanceAdministratorsClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ManagedInstanceAdministratorsClientDeleteResponse], error)
- func (client *ManagedInstanceAdministratorsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedInstanceAdministratorsClientGetResponse, error)
- func (client *ManagedInstanceAdministratorsClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, ...) *runtime.Pager[ManagedInstanceAdministratorsClientListByInstanceResponse]
- type ManagedInstanceAdministratorsClientBeginCreateOrUpdateOptions
- type ManagedInstanceAdministratorsClientBeginDeleteOptions
- type ManagedInstanceAdministratorsClientCreateOrUpdateResponse
- type ManagedInstanceAdministratorsClientDeleteResponse
- type ManagedInstanceAdministratorsClientGetOptions
- type ManagedInstanceAdministratorsClientGetResponse
- type ManagedInstanceAdministratorsClientListByInstanceOptions
- type ManagedInstanceAdministratorsClientListByInstanceResponse
- type ManagedInstanceAzureADOnlyAuthListResult
- type ManagedInstanceAzureADOnlyAuthProperties
- type ManagedInstanceAzureADOnlyAuthentication
- type ManagedInstanceAzureADOnlyAuthenticationsClient
- func (client *ManagedInstanceAzureADOnlyAuthenticationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (...)
- func (client *ManagedInstanceAzureADOnlyAuthenticationsClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ManagedInstanceAzureADOnlyAuthenticationsClientDeleteResponse], ...)
- func (client *ManagedInstanceAzureADOnlyAuthenticationsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedInstanceAzureADOnlyAuthenticationsClientGetResponse, error)
- func (client *ManagedInstanceAzureADOnlyAuthenticationsClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, ...) ...
- type ManagedInstanceAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions
- type ManagedInstanceAzureADOnlyAuthenticationsClientBeginDeleteOptions
- type ManagedInstanceAzureADOnlyAuthenticationsClientCreateOrUpdateResponse
- type ManagedInstanceAzureADOnlyAuthenticationsClientDeleteResponse
- type ManagedInstanceAzureADOnlyAuthenticationsClientGetOptions
- type ManagedInstanceAzureADOnlyAuthenticationsClientGetResponse
- type ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceOptions
- type ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceResponse
- type ManagedInstanceEditionCapability
- type ManagedInstanceEncryptionProtector
- type ManagedInstanceEncryptionProtectorListResult
- type ManagedInstanceEncryptionProtectorProperties
- type ManagedInstanceEncryptionProtectorsClient
- func (client *ManagedInstanceEncryptionProtectorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (...)
- func (client *ManagedInstanceEncryptionProtectorsClient) BeginRevalidate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ManagedInstanceEncryptionProtectorsClientRevalidateResponse], ...)
- func (client *ManagedInstanceEncryptionProtectorsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedInstanceEncryptionProtectorsClientGetResponse, error)
- func (client *ManagedInstanceEncryptionProtectorsClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, ...) ...
- type ManagedInstanceEncryptionProtectorsClientBeginCreateOrUpdateOptions
- type ManagedInstanceEncryptionProtectorsClientBeginRevalidateOptions
- type ManagedInstanceEncryptionProtectorsClientCreateOrUpdateResponse
- type ManagedInstanceEncryptionProtectorsClientGetOptions
- type ManagedInstanceEncryptionProtectorsClientGetResponse
- type ManagedInstanceEncryptionProtectorsClientListByInstanceOptions
- type ManagedInstanceEncryptionProtectorsClientListByInstanceResponse
- type ManagedInstanceEncryptionProtectorsClientRevalidateResponse
- type ManagedInstanceExternalAdministrator
- type ManagedInstanceFamilyCapability
- type ManagedInstanceKey
- type ManagedInstanceKeyListResult
- type ManagedInstanceKeyProperties
- type ManagedInstanceKeysClient
- func (client *ManagedInstanceKeysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ManagedInstanceKeysClientCreateOrUpdateResponse], error)
- func (client *ManagedInstanceKeysClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ManagedInstanceKeysClientDeleteResponse], error)
- func (client *ManagedInstanceKeysClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedInstanceKeysClientGetResponse, error)
- func (client *ManagedInstanceKeysClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, ...) *runtime.Pager[ManagedInstanceKeysClientListByInstanceResponse]
- type ManagedInstanceKeysClientBeginCreateOrUpdateOptions
- type ManagedInstanceKeysClientBeginDeleteOptions
- type ManagedInstanceKeysClientCreateOrUpdateResponse
- type ManagedInstanceKeysClientDeleteResponse
- type ManagedInstanceKeysClientGetOptions
- type ManagedInstanceKeysClientGetResponse
- type ManagedInstanceKeysClientListByInstanceOptions
- type ManagedInstanceKeysClientListByInstanceResponse
- type ManagedInstanceLicenseType
- type ManagedInstanceListResult
- type ManagedInstanceLongTermRetentionBackup
- type ManagedInstanceLongTermRetentionBackupListResult
- type ManagedInstanceLongTermRetentionBackupProperties
- type ManagedInstanceLongTermRetentionPoliciesClient
- func (client *ManagedInstanceLongTermRetentionPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (...)
- func (client *ManagedInstanceLongTermRetentionPoliciesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedInstanceLongTermRetentionPoliciesClientGetResponse, error)
- func (client *ManagedInstanceLongTermRetentionPoliciesClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, ...) ...
- type ManagedInstanceLongTermRetentionPoliciesClientBeginCreateOrUpdateOptions
- type ManagedInstanceLongTermRetentionPoliciesClientCreateOrUpdateResponse
- type ManagedInstanceLongTermRetentionPoliciesClientGetOptions
- type ManagedInstanceLongTermRetentionPoliciesClientGetResponse
- type ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseOptions
- type ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseResponse
- type ManagedInstanceLongTermRetentionPolicy
- type ManagedInstanceLongTermRetentionPolicyListResult
- type ManagedInstanceLongTermRetentionPolicyName
- type ManagedInstanceMaintenanceConfigurationCapability
- type ManagedInstanceOperation
- type ManagedInstanceOperationListResult
- type ManagedInstanceOperationParametersPair
- type ManagedInstanceOperationProperties
- type ManagedInstanceOperationSteps
- type ManagedInstanceOperationsClient
- func (client *ManagedInstanceOperationsClient) Cancel(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedInstanceOperationsClientCancelResponse, error)
- func (client *ManagedInstanceOperationsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedInstanceOperationsClientGetResponse, error)
- func (client *ManagedInstanceOperationsClient) NewListByManagedInstancePager(resourceGroupName string, managedInstanceName string, ...) *runtime.Pager[ManagedInstanceOperationsClientListByManagedInstanceResponse]
- type ManagedInstanceOperationsClientCancelOptions
- type ManagedInstanceOperationsClientCancelResponse
- type ManagedInstanceOperationsClientGetOptions
- type ManagedInstanceOperationsClientGetResponse
- type ManagedInstanceOperationsClientListByManagedInstanceOptions
- type ManagedInstanceOperationsClientListByManagedInstanceResponse
- type ManagedInstancePairInfo
- type ManagedInstancePecProperty
- type ManagedInstancePrivateEndpointConnection
- type ManagedInstancePrivateEndpointConnectionListResult
- type ManagedInstancePrivateEndpointConnectionProperties
- type ManagedInstancePrivateEndpointConnectionsClient
- func (client *ManagedInstancePrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (...)
- func (client *ManagedInstancePrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ManagedInstancePrivateEndpointConnectionsClientDeleteResponse], ...)
- func (client *ManagedInstancePrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedInstancePrivateEndpointConnectionsClientGetResponse, error)
- func (client *ManagedInstancePrivateEndpointConnectionsClient) NewListByManagedInstancePager(resourceGroupName string, managedInstanceName string, ...) ...
- type ManagedInstancePrivateEndpointConnectionsClientBeginCreateOrUpdateOptions
- type ManagedInstancePrivateEndpointConnectionsClientBeginDeleteOptions
- type ManagedInstancePrivateEndpointConnectionsClientCreateOrUpdateResponse
- type ManagedInstancePrivateEndpointConnectionsClientDeleteResponse
- type ManagedInstancePrivateEndpointConnectionsClientGetOptions
- type ManagedInstancePrivateEndpointConnectionsClientGetResponse
- type ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceOptions
- type ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceResponse
- type ManagedInstancePrivateEndpointProperty
- type ManagedInstancePrivateLink
- type ManagedInstancePrivateLinkListResult
- type ManagedInstancePrivateLinkProperties
- type ManagedInstancePrivateLinkResourcesClient
- func (client *ManagedInstancePrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedInstancePrivateLinkResourcesClientGetResponse, error)
- func (client *ManagedInstancePrivateLinkResourcesClient) NewListByManagedInstancePager(resourceGroupName string, managedInstanceName string, ...) ...
- type ManagedInstancePrivateLinkResourcesClientGetOptions
- type ManagedInstancePrivateLinkResourcesClientGetResponse
- type ManagedInstancePrivateLinkResourcesClientListByManagedInstanceOptions
- type ManagedInstancePrivateLinkResourcesClientListByManagedInstanceResponse
- type ManagedInstancePrivateLinkServiceConnectionStateProperty
- type ManagedInstanceProperties
- type ManagedInstancePropertiesProvisioningState
- type ManagedInstanceProxyOverride
- type ManagedInstanceQuery
- type ManagedInstanceQueryStatistics
- type ManagedInstanceTdeCertificatesClient
- type ManagedInstanceTdeCertificatesClientBeginCreateOptions
- type ManagedInstanceTdeCertificatesClientCreateResponse
- type ManagedInstanceUpdate
- type ManagedInstanceVcoresCapability
- type ManagedInstanceVersionCapability
- type ManagedInstanceVulnerabilityAssessment
- type ManagedInstanceVulnerabilityAssessmentListResult
- type ManagedInstanceVulnerabilityAssessmentProperties
- type ManagedInstanceVulnerabilityAssessmentsClient
- func (client *ManagedInstanceVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateResponse, error)
- func (client *ManagedInstanceVulnerabilityAssessmentsClient) Delete(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedInstanceVulnerabilityAssessmentsClientDeleteResponse, error)
- func (client *ManagedInstanceVulnerabilityAssessmentsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedInstanceVulnerabilityAssessmentsClientGetResponse, error)
- func (client *ManagedInstanceVulnerabilityAssessmentsClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, ...) ...
- type ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateOptions
- type ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateResponse
- type ManagedInstanceVulnerabilityAssessmentsClientDeleteOptions
- type ManagedInstanceVulnerabilityAssessmentsClientDeleteResponse
- type ManagedInstanceVulnerabilityAssessmentsClientGetOptions
- type ManagedInstanceVulnerabilityAssessmentsClientGetResponse
- type ManagedInstanceVulnerabilityAssessmentsClientListByInstanceOptions
- type ManagedInstanceVulnerabilityAssessmentsClientListByInstanceResponse
- type ManagedInstancesClient
- func (client *ManagedInstancesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ManagedInstancesClientCreateOrUpdateResponse], error)
- func (client *ManagedInstancesClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ManagedInstancesClientDeleteResponse], error)
- func (client *ManagedInstancesClient) BeginFailover(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ManagedInstancesClientFailoverResponse], error)
- func (client *ManagedInstancesClient) BeginUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ManagedInstancesClientUpdateResponse], error)
- func (client *ManagedInstancesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedInstancesClientGetResponse, error)
- func (client *ManagedInstancesClient) NewListByInstancePoolPager(resourceGroupName string, instancePoolName string, ...) *runtime.Pager[ManagedInstancesClientListByInstancePoolResponse]
- func (client *ManagedInstancesClient) NewListByManagedInstancePager(resourceGroupName string, managedInstanceName string, ...) *runtime.Pager[ManagedInstancesClientListByManagedInstanceResponse]
- func (client *ManagedInstancesClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[ManagedInstancesClientListByResourceGroupResponse]
- func (client *ManagedInstancesClient) NewListPager(options *ManagedInstancesClientListOptions) *runtime.Pager[ManagedInstancesClientListResponse]
- type ManagedInstancesClientBeginCreateOrUpdateOptions
- type ManagedInstancesClientBeginDeleteOptions
- type ManagedInstancesClientBeginFailoverOptions
- type ManagedInstancesClientBeginUpdateOptions
- type ManagedInstancesClientCreateOrUpdateResponse
- type ManagedInstancesClientDeleteResponse
- type ManagedInstancesClientFailoverResponse
- type ManagedInstancesClientGetOptions
- type ManagedInstancesClientGetResponse
- type ManagedInstancesClientListByInstancePoolOptions
- type ManagedInstancesClientListByInstancePoolResponse
- type ManagedInstancesClientListByManagedInstanceOptions
- type ManagedInstancesClientListByManagedInstanceResponse
- type ManagedInstancesClientListByResourceGroupOptions
- type ManagedInstancesClientListByResourceGroupResponse
- type ManagedInstancesClientListOptions
- type ManagedInstancesClientListResponse
- type ManagedInstancesClientUpdateResponse
- type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient
- func (client *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (...)
- func (client *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) BeginUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (...)
- func (client *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (...)
- func (client *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) NewListByRestorableDroppedDatabasePager(resourceGroupName string, managedInstanceName string, ...) ...
- type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions
- type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginUpdateOptions
- type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse
- type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetOptions
- type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetResponse
- type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseOptions
- type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseResponse
- type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientUpdateResponse
- type ManagedServerCreateMode
- type ManagedServerSecurityAlertPoliciesClient
- func (client *ManagedServerSecurityAlertPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (...)
- func (client *ManagedServerSecurityAlertPoliciesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedServerSecurityAlertPoliciesClientGetResponse, error)
- func (client *ManagedServerSecurityAlertPoliciesClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, ...) *runtime.Pager[ManagedServerSecurityAlertPoliciesClientListByInstanceResponse]
- type ManagedServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions
- type ManagedServerSecurityAlertPoliciesClientCreateOrUpdateResponse
- type ManagedServerSecurityAlertPoliciesClientGetOptions
- type ManagedServerSecurityAlertPoliciesClientGetResponse
- type ManagedServerSecurityAlertPoliciesClientListByInstanceOptions
- type ManagedServerSecurityAlertPoliciesClientListByInstanceResponse
- type ManagedServerSecurityAlertPolicy
- type ManagedServerSecurityAlertPolicyListResult
- type ManagedShortTermRetentionPolicyName
- type ManagedTransparentDataEncryption
- type ManagedTransparentDataEncryptionListResult
- type ManagedTransparentDataEncryptionProperties
- type ManagementOperationState
- type MaxSizeCapability
- type MaxSizeRangeCapability
- type MaxSizeUnit
- type Metric
- type MetricAvailability
- type MetricDefinition
- type MetricDefinitionListResult
- type MetricListResult
- type MetricName
- type MetricType
- type MetricValue
- type MinCapacityCapability
- type Name
- type NetworkIsolationSettings
- type Operation
- type OperationDisplay
- type OperationImpact
- type OperationListResult
- type OperationMode
- type OperationOrigin
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type OutboundFirewallRule
- type OutboundFirewallRuleListResult
- type OutboundFirewallRuleProperties
- type OutboundFirewallRulesClient
- func (client *OutboundFirewallRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[OutboundFirewallRulesClientCreateOrUpdateResponse], error)
- func (client *OutboundFirewallRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[OutboundFirewallRulesClientDeleteResponse], error)
- func (client *OutboundFirewallRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (OutboundFirewallRulesClientGetResponse, error)
- func (client *OutboundFirewallRulesClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[OutboundFirewallRulesClientListByServerResponse]
- type OutboundFirewallRulesClientBeginCreateOrUpdateOptions
- type OutboundFirewallRulesClientBeginDeleteOptions
- type OutboundFirewallRulesClientCreateOrUpdateResponse
- type OutboundFirewallRulesClientDeleteResponse
- type OutboundFirewallRulesClientGetOptions
- type OutboundFirewallRulesClientGetResponse
- type OutboundFirewallRulesClientListByServerOptions
- type OutboundFirewallRulesClientListByServerResponse
- type PartnerInfo
- type PartnerRegionInfo
- type PauseDelayTimeUnit
- type PerformanceLevelCapability
- type PerformanceLevelUnit
- type PrimaryAggregationType
- type PrincipalType
- type PrivateEndpointConnection
- type PrivateEndpointConnectionListResult
- type PrivateEndpointConnectionProperties
- type PrivateEndpointConnectionRequestStatus
- type PrivateEndpointConnectionsClient
- func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[PrivateEndpointConnectionsClientCreateOrUpdateResponse], error)
- func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)
- func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (PrivateEndpointConnectionsClientGetResponse, error)
- func (client *PrivateEndpointConnectionsClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[PrivateEndpointConnectionsClientListByServerResponse]
- type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions
- type PrivateEndpointConnectionsClientBeginDeleteOptions
- type PrivateEndpointConnectionsClientCreateOrUpdateResponse
- type PrivateEndpointConnectionsClientDeleteResponse
- type PrivateEndpointConnectionsClientGetOptions
- type PrivateEndpointConnectionsClientGetResponse
- type PrivateEndpointConnectionsClientListByServerOptions
- type PrivateEndpointConnectionsClientListByServerResponse
- type PrivateEndpointProperty
- type PrivateEndpointProvisioningState
- type PrivateLinkResource
- type PrivateLinkResourceListResult
- type PrivateLinkResourceProperties
- type PrivateLinkResourcesClient
- func (client *PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (PrivateLinkResourcesClientGetResponse, error)
- func (client *PrivateLinkResourcesClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[PrivateLinkResourcesClientListByServerResponse]
- type PrivateLinkResourcesClientGetOptions
- type PrivateLinkResourcesClientGetResponse
- type PrivateLinkResourcesClientListByServerOptions
- type PrivateLinkResourcesClientListByServerResponse
- type PrivateLinkServiceConnectionStateActionsRequire
- type PrivateLinkServiceConnectionStateProperty
- type PrivateLinkServiceConnectionStateStatus
- type ProvisioningState
- type ProxyResource
- type ProxyResourceWithWritableName
- type QueryMetricInterval
- type QueryMetricProperties
- type QueryMetricUnitType
- type QueryProperties
- type QueryStatistics
- type QueryStatisticsProperties
- type QueryTimeGrainType
- type ReadOnlyEndpointFailoverPolicy
- type ReadScaleCapability
- type ReadWriteEndpointFailoverPolicy
- type RecommendedAction
- type RecommendedActionCurrentState
- type RecommendedActionErrorInfo
- type RecommendedActionImpactRecord
- type RecommendedActionImplementationInfo
- type RecommendedActionInitiatedBy
- type RecommendedActionMetricInfo
- type RecommendedActionProperties
- type RecommendedActionStateInfo
- type RecommendedSensitivityLabelUpdate
- type RecommendedSensitivityLabelUpdateKind
- type RecommendedSensitivityLabelUpdateList
- type RecommendedSensitivityLabelUpdateProperties
- type RecommendedSensitivityLabelsClient
- type RecommendedSensitivityLabelsClientUpdateOptions
- type RecommendedSensitivityLabelsClientUpdateResponse
- type RecoverableDatabase
- type RecoverableDatabaseListResult
- type RecoverableDatabaseProperties
- type RecoverableDatabasesClient
- func (client *RecoverableDatabasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (RecoverableDatabasesClientGetResponse, error)
- func (client *RecoverableDatabasesClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[RecoverableDatabasesClientListByServerResponse]
- type RecoverableDatabasesClientGetOptions
- type RecoverableDatabasesClientGetResponse
- type RecoverableDatabasesClientListByServerOptions
- type RecoverableDatabasesClientListByServerResponse
- type RecoverableManagedDatabase
- type RecoverableManagedDatabaseListResult
- type RecoverableManagedDatabaseProperties
- type RecoverableManagedDatabasesClient
- func (client *RecoverableManagedDatabasesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (RecoverableManagedDatabasesClientGetResponse, error)
- func (client *RecoverableManagedDatabasesClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, ...) *runtime.Pager[RecoverableManagedDatabasesClientListByInstanceResponse]
- type RecoverableManagedDatabasesClientGetOptions
- type RecoverableManagedDatabasesClientGetResponse
- type RecoverableManagedDatabasesClientListByInstanceOptions
- type RecoverableManagedDatabasesClientListByInstanceResponse
- type ReplicaType
- type ReplicationLink
- type ReplicationLinkListResult
- type ReplicationLinkProperties
- type ReplicationLinkType
- type ReplicationLinksClient
- func (client *ReplicationLinksClient) BeginFailover(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ReplicationLinksClientFailoverResponse], error)
- func (client *ReplicationLinksClient) BeginFailoverAllowDataLoss(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ReplicationLinksClientFailoverAllowDataLossResponse], error)
- func (client *ReplicationLinksClient) Delete(ctx context.Context, resourceGroupName string, serverName string, ...) (ReplicationLinksClientDeleteResponse, error)
- func (client *ReplicationLinksClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ReplicationLinksClientGetResponse, error)
- func (client *ReplicationLinksClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[ReplicationLinksClientListByDatabaseResponse]
- func (client *ReplicationLinksClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[ReplicationLinksClientListByServerResponse]
- type ReplicationLinksClientBeginFailoverAllowDataLossOptions
- type ReplicationLinksClientBeginFailoverOptions
- type ReplicationLinksClientDeleteOptions
- type ReplicationLinksClientDeleteResponse
- type ReplicationLinksClientFailoverAllowDataLossResponse
- type ReplicationLinksClientFailoverResponse
- type ReplicationLinksClientGetOptions
- type ReplicationLinksClientGetResponse
- type ReplicationLinksClientListByDatabaseOptions
- type ReplicationLinksClientListByDatabaseResponse
- type ReplicationLinksClientListByServerOptions
- type ReplicationLinksClientListByServerResponse
- type ReplicationMode
- type ReplicationRole
- type ReplicationState
- type Resource
- type ResourceIdentity
- type ResourceMoveDefinition
- type ResourceWithWritableName
- type RestorableDroppedDatabase
- type RestorableDroppedDatabaseListResult
- type RestorableDroppedDatabaseProperties
- type RestorableDroppedDatabasesClient
- func (client *RestorableDroppedDatabasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (RestorableDroppedDatabasesClientGetResponse, error)
- func (client *RestorableDroppedDatabasesClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[RestorableDroppedDatabasesClientListByServerResponse]
- type RestorableDroppedDatabasesClientGetOptions
- type RestorableDroppedDatabasesClientGetResponse
- type RestorableDroppedDatabasesClientListByServerOptions
- type RestorableDroppedDatabasesClientListByServerResponse
- type RestorableDroppedManagedDatabase
- type RestorableDroppedManagedDatabaseListResult
- type RestorableDroppedManagedDatabaseProperties
- type RestorableDroppedManagedDatabasesClient
- func (client *RestorableDroppedManagedDatabasesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (RestorableDroppedManagedDatabasesClientGetResponse, error)
- func (client *RestorableDroppedManagedDatabasesClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, ...) *runtime.Pager[RestorableDroppedManagedDatabasesClientListByInstanceResponse]
- type RestorableDroppedManagedDatabasesClientGetOptions
- type RestorableDroppedManagedDatabasesClientGetResponse
- type RestorableDroppedManagedDatabasesClientListByInstanceOptions
- type RestorableDroppedManagedDatabasesClientListByInstanceResponse
- type RestoreDetailsName
- type RestorePoint
- type RestorePointListResult
- type RestorePointProperties
- type RestorePointType
- type RestorePointsClient
- func (client *RestorePointsClient) BeginCreate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[RestorePointsClientCreateResponse], error)
- func (client *RestorePointsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, ...) (RestorePointsClientDeleteResponse, error)
- func (client *RestorePointsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (RestorePointsClientGetResponse, error)
- func (client *RestorePointsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[RestorePointsClientListByDatabaseResponse]
- type RestorePointsClientBeginCreateOptions
- type RestorePointsClientCreateResponse
- type RestorePointsClientDeleteOptions
- type RestorePointsClientDeleteResponse
- type RestorePointsClientGetOptions
- type RestorePointsClientGetResponse
- type RestorePointsClientListByDatabaseOptions
- type RestorePointsClientListByDatabaseResponse
- type SKU
- type SQLAgentConfigurationPropertiesState
- type SampleName
- type SecondaryType
- type SecurityAlertPolicyName
- type SecurityAlertPolicyProperties
- type SecurityAlertPolicyState
- type SecurityAlertsPolicyProperties
- type SecurityAlertsPolicyState
- type SecurityEvent
- type SecurityEventCollection
- type SecurityEventProperties
- type SecurityEventSQLInjectionAdditionalProperties
- type SecurityEventType
- type SecurityEventsFilterParameters
- type SensitivityLabel
- type SensitivityLabelListResult
- type SensitivityLabelProperties
- type SensitivityLabelRank
- type SensitivityLabelSource
- type SensitivityLabelUpdate
- type SensitivityLabelUpdateKind
- type SensitivityLabelUpdateList
- type SensitivityLabelUpdateProperties
- type SensitivityLabelsClient
- func (client *SensitivityLabelsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (SensitivityLabelsClientCreateOrUpdateResponse, error)
- func (client *SensitivityLabelsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, ...) (SensitivityLabelsClientDeleteResponse, error)
- func (client *SensitivityLabelsClient) DisableRecommendation(ctx context.Context, resourceGroupName string, serverName string, ...) (SensitivityLabelsClientDisableRecommendationResponse, error)
- func (client *SensitivityLabelsClient) EnableRecommendation(ctx context.Context, resourceGroupName string, serverName string, ...) (SensitivityLabelsClientEnableRecommendationResponse, error)
- func (client *SensitivityLabelsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (SensitivityLabelsClientGetResponse, error)
- func (client *SensitivityLabelsClient) NewListCurrentByDatabasePager(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[SensitivityLabelsClientListCurrentByDatabaseResponse]
- func (client *SensitivityLabelsClient) NewListRecommendedByDatabasePager(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[SensitivityLabelsClientListRecommendedByDatabaseResponse]
- func (client *SensitivityLabelsClient) Update(ctx context.Context, resourceGroupName string, serverName string, ...) (SensitivityLabelsClientUpdateResponse, error)
- type SensitivityLabelsClientCreateOrUpdateOptions
- type SensitivityLabelsClientCreateOrUpdateResponse
- type SensitivityLabelsClientDeleteOptions
- type SensitivityLabelsClientDeleteResponse
- type SensitivityLabelsClientDisableRecommendationOptions
- type SensitivityLabelsClientDisableRecommendationResponse
- type SensitivityLabelsClientEnableRecommendationOptions
- type SensitivityLabelsClientEnableRecommendationResponse
- type SensitivityLabelsClientGetOptions
- type SensitivityLabelsClientGetResponse
- type SensitivityLabelsClientListCurrentByDatabaseOptions
- type SensitivityLabelsClientListCurrentByDatabaseResponse
- type SensitivityLabelsClientListRecommendedByDatabaseOptions
- type SensitivityLabelsClientListRecommendedByDatabaseResponse
- type SensitivityLabelsClientUpdateOptions
- type SensitivityLabelsClientUpdateResponse
- type Server
- type ServerAdvancedThreatProtection
- type ServerAdvancedThreatProtectionSettingsClient
- func (client *ServerAdvancedThreatProtectionSettingsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (...)
- func (client *ServerAdvancedThreatProtectionSettingsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerAdvancedThreatProtectionSettingsClientGetResponse, error)
- func (client *ServerAdvancedThreatProtectionSettingsClient) NewListByServerPager(resourceGroupName string, serverName string, ...) ...
- type ServerAdvancedThreatProtectionSettingsClientBeginCreateOrUpdateOptions
- type ServerAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse
- type ServerAdvancedThreatProtectionSettingsClientGetOptions
- type ServerAdvancedThreatProtectionSettingsClientGetResponse
- type ServerAdvancedThreatProtectionSettingsClientListByServerOptions
- type ServerAdvancedThreatProtectionSettingsClientListByServerResponse
- type ServerAdvisorsClient
- func (client *ServerAdvisorsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerAdvisorsClientGetResponse, error)
- func (client *ServerAdvisorsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerAdvisorsClientListByServerResponse, error)
- func (client *ServerAdvisorsClient) Update(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerAdvisorsClientUpdateResponse, error)
- type ServerAdvisorsClientGetOptions
- type ServerAdvisorsClientGetResponse
- type ServerAdvisorsClientListByServerOptions
- type ServerAdvisorsClientListByServerResponse
- type ServerAdvisorsClientUpdateOptions
- type ServerAdvisorsClientUpdateResponse
- type ServerAutomaticTuning
- type ServerAutomaticTuningClient
- func (client *ServerAutomaticTuningClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerAutomaticTuningClientGetResponse, error)
- func (client *ServerAutomaticTuningClient) Update(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerAutomaticTuningClientUpdateResponse, error)
- type ServerAutomaticTuningClientGetOptions
- type ServerAutomaticTuningClientGetResponse
- type ServerAutomaticTuningClientUpdateOptions
- type ServerAutomaticTuningClientUpdateResponse
- type ServerAzureADAdministrator
- type ServerAzureADAdministratorsClient
- func (client *ServerAzureADAdministratorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServerAzureADAdministratorsClientCreateOrUpdateResponse], ...)
- func (client *ServerAzureADAdministratorsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServerAzureADAdministratorsClientDeleteResponse], error)
- func (client *ServerAzureADAdministratorsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerAzureADAdministratorsClientGetResponse, error)
- func (client *ServerAzureADAdministratorsClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[ServerAzureADAdministratorsClientListByServerResponse]
- type ServerAzureADAdministratorsClientBeginCreateOrUpdateOptions
- type ServerAzureADAdministratorsClientBeginDeleteOptions
- type ServerAzureADAdministratorsClientCreateOrUpdateResponse
- type ServerAzureADAdministratorsClientDeleteResponse
- type ServerAzureADAdministratorsClientGetOptions
- type ServerAzureADAdministratorsClientGetResponse
- type ServerAzureADAdministratorsClientListByServerOptions
- type ServerAzureADAdministratorsClientListByServerResponse
- type ServerAzureADOnlyAuthentication
- type ServerAzureADOnlyAuthenticationsClient
- func (client *ServerAzureADOnlyAuthenticationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServerAzureADOnlyAuthenticationsClientCreateOrUpdateResponse], ...)
- func (client *ServerAzureADOnlyAuthenticationsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServerAzureADOnlyAuthenticationsClientDeleteResponse], error)
- func (client *ServerAzureADOnlyAuthenticationsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerAzureADOnlyAuthenticationsClientGetResponse, error)
- func (client *ServerAzureADOnlyAuthenticationsClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[ServerAzureADOnlyAuthenticationsClientListByServerResponse]
- type ServerAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions
- type ServerAzureADOnlyAuthenticationsClientBeginDeleteOptions
- type ServerAzureADOnlyAuthenticationsClientCreateOrUpdateResponse
- type ServerAzureADOnlyAuthenticationsClientDeleteResponse
- type ServerAzureADOnlyAuthenticationsClientGetOptions
- type ServerAzureADOnlyAuthenticationsClientGetResponse
- type ServerAzureADOnlyAuthenticationsClientListByServerOptions
- type ServerAzureADOnlyAuthenticationsClientListByServerResponse
- type ServerBlobAuditingPoliciesClient
- func (client *ServerBlobAuditingPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServerBlobAuditingPoliciesClientCreateOrUpdateResponse], error)
- func (client *ServerBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerBlobAuditingPoliciesClientGetResponse, error)
- func (client *ServerBlobAuditingPoliciesClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[ServerBlobAuditingPoliciesClientListByServerResponse]
- type ServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions
- type ServerBlobAuditingPoliciesClientCreateOrUpdateResponse
- type ServerBlobAuditingPoliciesClientGetOptions
- type ServerBlobAuditingPoliciesClientGetResponse
- type ServerBlobAuditingPoliciesClientListByServerOptions
- type ServerBlobAuditingPoliciesClientListByServerResponse
- type ServerBlobAuditingPolicy
- type ServerBlobAuditingPolicyListResult
- type ServerBlobAuditingPolicyProperties
- type ServerCommunicationLink
- type ServerCommunicationLinkListResult
- type ServerCommunicationLinkProperties
- type ServerCommunicationLinksClient
- func (client *ServerCommunicationLinksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServerCommunicationLinksClientCreateOrUpdateResponse], error)
- func (client *ServerCommunicationLinksClient) Delete(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerCommunicationLinksClientDeleteResponse, error)
- func (client *ServerCommunicationLinksClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerCommunicationLinksClientGetResponse, error)
- func (client *ServerCommunicationLinksClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[ServerCommunicationLinksClientListByServerResponse]
- type ServerCommunicationLinksClientBeginCreateOrUpdateOptions
- type ServerCommunicationLinksClientCreateOrUpdateResponse
- type ServerCommunicationLinksClientDeleteOptions
- type ServerCommunicationLinksClientDeleteResponse
- type ServerCommunicationLinksClientGetOptions
- type ServerCommunicationLinksClientGetResponse
- type ServerCommunicationLinksClientListByServerOptions
- type ServerCommunicationLinksClientListByServerResponse
- type ServerConnectionPoliciesClient
- func (client *ServerConnectionPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServerConnectionPoliciesClientCreateOrUpdateResponse], error)
- func (client *ServerConnectionPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerConnectionPoliciesClientGetResponse, error)
- func (client *ServerConnectionPoliciesClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[ServerConnectionPoliciesClientListByServerResponse]
- type ServerConnectionPoliciesClientBeginCreateOrUpdateOptions
- type ServerConnectionPoliciesClientCreateOrUpdateResponse
- type ServerConnectionPoliciesClientGetOptions
- type ServerConnectionPoliciesClientGetResponse
- type ServerConnectionPoliciesClientListByServerOptions
- type ServerConnectionPoliciesClientListByServerResponse
- type ServerConnectionPolicy
- type ServerConnectionPolicyListResult
- type ServerConnectionPolicyProperties
- type ServerConnectionType
- type ServerDNSAlias
- type ServerDNSAliasAcquisition
- type ServerDNSAliasListResult
- type ServerDNSAliasProperties
- type ServerDNSAliasesClient
- func (client *ServerDNSAliasesClient) BeginAcquire(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServerDNSAliasesClientAcquireResponse], error)
- func (client *ServerDNSAliasesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServerDNSAliasesClientCreateOrUpdateResponse], error)
- func (client *ServerDNSAliasesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServerDNSAliasesClientDeleteResponse], error)
- func (client *ServerDNSAliasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerDNSAliasesClientGetResponse, error)
- func (client *ServerDNSAliasesClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[ServerDNSAliasesClientListByServerResponse]
- type ServerDNSAliasesClientAcquireResponse
- type ServerDNSAliasesClientBeginAcquireOptions
- type ServerDNSAliasesClientBeginCreateOrUpdateOptions
- type ServerDNSAliasesClientBeginDeleteOptions
- type ServerDNSAliasesClientCreateOrUpdateResponse
- type ServerDNSAliasesClientDeleteResponse
- type ServerDNSAliasesClientGetOptions
- type ServerDNSAliasesClientGetResponse
- type ServerDNSAliasesClientListByServerOptions
- type ServerDNSAliasesClientListByServerResponse
- type ServerDevOpsAuditSettingsClient
- func (client *ServerDevOpsAuditSettingsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServerDevOpsAuditSettingsClientCreateOrUpdateResponse], error)
- func (client *ServerDevOpsAuditSettingsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerDevOpsAuditSettingsClientGetResponse, error)
- func (client *ServerDevOpsAuditSettingsClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[ServerDevOpsAuditSettingsClientListByServerResponse]
- type ServerDevOpsAuditSettingsClientBeginCreateOrUpdateOptions
- type ServerDevOpsAuditSettingsClientCreateOrUpdateResponse
- type ServerDevOpsAuditSettingsClientGetOptions
- type ServerDevOpsAuditSettingsClientGetResponse
- type ServerDevOpsAuditSettingsClientListByServerOptions
- type ServerDevOpsAuditSettingsClientListByServerResponse
- type ServerDevOpsAuditSettingsListResult
- type ServerDevOpsAuditSettingsProperties
- type ServerDevOpsAuditingSettings
- type ServerExternalAdministrator
- type ServerFirewallRuleProperties
- type ServerInfo
- type ServerKey
- type ServerKeyListResult
- type ServerKeyProperties
- type ServerKeyType
- type ServerKeysClient
- func (client *ServerKeysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServerKeysClientCreateOrUpdateResponse], error)
- func (client *ServerKeysClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServerKeysClientDeleteResponse], error)
- func (client *ServerKeysClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerKeysClientGetResponse, error)
- func (client *ServerKeysClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[ServerKeysClientListByServerResponse]
- type ServerKeysClientBeginCreateOrUpdateOptions
- type ServerKeysClientBeginDeleteOptions
- type ServerKeysClientCreateOrUpdateResponse
- type ServerKeysClientDeleteResponse
- type ServerKeysClientGetOptions
- type ServerKeysClientGetResponse
- type ServerKeysClientListByServerOptions
- type ServerKeysClientListByServerResponse
- type ServerListResult
- type ServerNetworkAccessFlag
- type ServerOperation
- type ServerOperationListResult
- type ServerOperationProperties
- type ServerOperationsClient
- type ServerOperationsClientListByServerOptions
- type ServerOperationsClientListByServerResponse
- type ServerPrivateEndpointConnection
- type ServerProperties
- type ServerSecurityAlertPoliciesClient
- func (client *ServerSecurityAlertPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServerSecurityAlertPoliciesClientCreateOrUpdateResponse], ...)
- func (client *ServerSecurityAlertPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerSecurityAlertPoliciesClientGetResponse, error)
- func (client *ServerSecurityAlertPoliciesClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[ServerSecurityAlertPoliciesClientListByServerResponse]
- type ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions
- type ServerSecurityAlertPoliciesClientCreateOrUpdateResponse
- type ServerSecurityAlertPoliciesClientGetOptions
- type ServerSecurityAlertPoliciesClientGetResponse
- type ServerSecurityAlertPoliciesClientListByServerOptions
- type ServerSecurityAlertPoliciesClientListByServerResponse
- type ServerSecurityAlertPolicy
- type ServerTrustCertificate
- type ServerTrustCertificateProperties
- type ServerTrustCertificatesClient
- func (client *ServerTrustCertificatesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ServerTrustCertificatesClientCreateOrUpdateResponse], error)
- func (client *ServerTrustCertificatesClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ServerTrustCertificatesClientDeleteResponse], error)
- func (client *ServerTrustCertificatesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ServerTrustCertificatesClientGetResponse, error)
- func (client *ServerTrustCertificatesClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, ...) *runtime.Pager[ServerTrustCertificatesClientListByInstanceResponse]
- type ServerTrustCertificatesClientBeginCreateOrUpdateOptions
- type ServerTrustCertificatesClientBeginDeleteOptions
- type ServerTrustCertificatesClientCreateOrUpdateResponse
- type ServerTrustCertificatesClientDeleteResponse
- type ServerTrustCertificatesClientGetOptions
- type ServerTrustCertificatesClientGetResponse
- type ServerTrustCertificatesClientListByInstanceOptions
- type ServerTrustCertificatesClientListByInstanceResponse
- type ServerTrustCertificatesListResult
- type ServerTrustGroup
- type ServerTrustGroupListResult
- type ServerTrustGroupProperties
- type ServerTrustGroupPropertiesTrustScopesItem
- type ServerTrustGroupsClient
- func (client *ServerTrustGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, locationName string, ...) (*runtime.Poller[ServerTrustGroupsClientCreateOrUpdateResponse], error)
- func (client *ServerTrustGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, locationName string, ...) (*runtime.Poller[ServerTrustGroupsClientDeleteResponse], error)
- func (client *ServerTrustGroupsClient) Get(ctx context.Context, resourceGroupName string, locationName string, ...) (ServerTrustGroupsClientGetResponse, error)
- func (client *ServerTrustGroupsClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, ...) *runtime.Pager[ServerTrustGroupsClientListByInstanceResponse]
- func (client *ServerTrustGroupsClient) NewListByLocationPager(resourceGroupName string, locationName string, ...) *runtime.Pager[ServerTrustGroupsClientListByLocationResponse]
- type ServerTrustGroupsClientBeginCreateOrUpdateOptions
- type ServerTrustGroupsClientBeginDeleteOptions
- type ServerTrustGroupsClientCreateOrUpdateResponse
- type ServerTrustGroupsClientDeleteResponse
- type ServerTrustGroupsClientGetOptions
- type ServerTrustGroupsClientGetResponse
- type ServerTrustGroupsClientListByInstanceOptions
- type ServerTrustGroupsClientListByInstanceResponse
- type ServerTrustGroupsClientListByLocationOptions
- type ServerTrustGroupsClientListByLocationResponse
- type ServerUpdate
- type ServerUsage
- type ServerUsageListResult
- type ServerUsagesClient
- type ServerUsagesClientListByServerOptions
- type ServerUsagesClientListByServerResponse
- type ServerVersionCapability
- type ServerVulnerabilityAssessment
- type ServerVulnerabilityAssessmentListResult
- type ServerVulnerabilityAssessmentProperties
- type ServerVulnerabilityAssessmentsClient
- func (client *ServerVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerVulnerabilityAssessmentsClientCreateOrUpdateResponse, error)
- func (client *ServerVulnerabilityAssessmentsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerVulnerabilityAssessmentsClientDeleteResponse, error)
- func (client *ServerVulnerabilityAssessmentsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerVulnerabilityAssessmentsClientGetResponse, error)
- func (client *ServerVulnerabilityAssessmentsClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[ServerVulnerabilityAssessmentsClientListByServerResponse]
- type ServerVulnerabilityAssessmentsClientCreateOrUpdateOptions
- type ServerVulnerabilityAssessmentsClientCreateOrUpdateResponse
- type ServerVulnerabilityAssessmentsClientDeleteOptions
- type ServerVulnerabilityAssessmentsClientDeleteResponse
- type ServerVulnerabilityAssessmentsClientGetOptions
- type ServerVulnerabilityAssessmentsClientGetResponse
- type ServerVulnerabilityAssessmentsClientListByServerOptions
- type ServerVulnerabilityAssessmentsClientListByServerResponse
- type ServerWorkspaceFeature
- type ServersClient
- func (client *ServersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServersClientCreateOrUpdateResponse], error)
- func (client *ServersClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServersClientDeleteResponse], error)
- func (client *ServersClient) BeginImportDatabase(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServersClientImportDatabaseResponse], error)
- func (client *ServersClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServersClientUpdateResponse], error)
- func (client *ServersClient) CheckNameAvailability(ctx context.Context, parameters CheckNameAvailabilityRequest, ...) (ServersClientCheckNameAvailabilityResponse, error)
- func (client *ServersClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ServersClientGetResponse, error)
- func (client *ServersClient) NewListByResourceGroupPager(resourceGroupName string, options *ServersClientListByResourceGroupOptions) *runtime.Pager[ServersClientListByResourceGroupResponse]
- func (client *ServersClient) NewListPager(options *ServersClientListOptions) *runtime.Pager[ServersClientListResponse]
- type ServersClientBeginCreateOrUpdateOptions
- type ServersClientBeginDeleteOptions
- type ServersClientBeginImportDatabaseOptions
- type ServersClientBeginUpdateOptions
- type ServersClientCheckNameAvailabilityOptions
- type ServersClientCheckNameAvailabilityResponse
- type ServersClientCreateOrUpdateResponse
- type ServersClientDeleteResponse
- type ServersClientGetOptions
- type ServersClientGetResponse
- type ServersClientImportDatabaseResponse
- type ServersClientListByResourceGroupOptions
- type ServersClientListByResourceGroupResponse
- type ServersClientListOptions
- type ServersClientListResponse
- type ServersClientUpdateResponse
- type ServiceObjective
- type ServiceObjectiveCapability
- type ServiceObjectiveListResult
- type ServiceObjectiveName
- type ServiceObjectiveProperties
- type ServiceObjectivesClient
- func (client *ServiceObjectivesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ServiceObjectivesClientGetResponse, error)
- func (client *ServiceObjectivesClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[ServiceObjectivesClientListByServerResponse]
- type ServiceObjectivesClientGetOptions
- type ServiceObjectivesClientGetResponse
- type ServiceObjectivesClientListByServerOptions
- type ServiceObjectivesClientListByServerResponse
- type ServicePrincipal
- type ServicePrincipalType
- type ShortTermRetentionPolicyName
- type SloUsageMetric
- type StorageCapability
- type StorageCapabilityStorageAccountType
- type StorageKeyType
- type SubscriptionUsage
- type SubscriptionUsageListResult
- type SubscriptionUsageProperties
- type SubscriptionUsagesClient
- func (client *SubscriptionUsagesClient) Get(ctx context.Context, locationName string, usageName string, ...) (SubscriptionUsagesClientGetResponse, error)
- func (client *SubscriptionUsagesClient) NewListByLocationPager(locationName string, options *SubscriptionUsagesClientListByLocationOptions) *runtime.Pager[SubscriptionUsagesClientListByLocationResponse]
- type SubscriptionUsagesClientGetOptions
- type SubscriptionUsagesClientGetResponse
- type SubscriptionUsagesClientListByLocationOptions
- type SubscriptionUsagesClientListByLocationResponse
- type SyncAgent
- type SyncAgentKeyProperties
- type SyncAgentLinkedDatabase
- type SyncAgentLinkedDatabaseListResult
- type SyncAgentLinkedDatabaseProperties
- type SyncAgentListResult
- type SyncAgentProperties
- type SyncAgentState
- type SyncAgentsClient
- func (client *SyncAgentsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[SyncAgentsClientCreateOrUpdateResponse], error)
- func (client *SyncAgentsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[SyncAgentsClientDeleteResponse], error)
- func (client *SyncAgentsClient) GenerateKey(ctx context.Context, resourceGroupName string, serverName string, ...) (SyncAgentsClientGenerateKeyResponse, error)
- func (client *SyncAgentsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (SyncAgentsClientGetResponse, error)
- func (client *SyncAgentsClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[SyncAgentsClientListByServerResponse]
- func (client *SyncAgentsClient) NewListLinkedDatabasesPager(resourceGroupName string, serverName string, syncAgentName string, ...) *runtime.Pager[SyncAgentsClientListLinkedDatabasesResponse]
- type SyncAgentsClientBeginCreateOrUpdateOptions
- type SyncAgentsClientBeginDeleteOptions
- type SyncAgentsClientCreateOrUpdateResponse
- type SyncAgentsClientDeleteResponse
- type SyncAgentsClientGenerateKeyOptions
- type SyncAgentsClientGenerateKeyResponse
- type SyncAgentsClientGetOptions
- type SyncAgentsClientGetResponse
- type SyncAgentsClientListByServerOptions
- type SyncAgentsClientListByServerResponse
- type SyncAgentsClientListLinkedDatabasesOptions
- type SyncAgentsClientListLinkedDatabasesResponse
- type SyncConflictResolutionPolicy
- type SyncDatabaseIDListResult
- type SyncDatabaseIDProperties
- type SyncDirection
- type SyncFullSchemaProperties
- type SyncFullSchemaPropertiesListResult
- type SyncFullSchemaTable
- type SyncFullSchemaTableColumn
- type SyncGroup
- type SyncGroupListResult
- type SyncGroupLogListResult
- type SyncGroupLogProperties
- type SyncGroupLogType
- type SyncGroupProperties
- type SyncGroupSchema
- type SyncGroupSchemaTable
- type SyncGroupSchemaTableColumn
- type SyncGroupState
- type SyncGroupsClient
- func (client *SyncGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[SyncGroupsClientCreateOrUpdateResponse], error)
- func (client *SyncGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[SyncGroupsClientDeleteResponse], error)
- func (client *SyncGroupsClient) BeginRefreshHubSchema(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[SyncGroupsClientRefreshHubSchemaResponse], error)
- func (client *SyncGroupsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[SyncGroupsClientUpdateResponse], error)
- func (client *SyncGroupsClient) CancelSync(ctx context.Context, resourceGroupName string, serverName string, ...) (SyncGroupsClientCancelSyncResponse, error)
- func (client *SyncGroupsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (SyncGroupsClientGetResponse, error)
- func (client *SyncGroupsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[SyncGroupsClientListByDatabaseResponse]
- func (client *SyncGroupsClient) NewListHubSchemasPager(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[SyncGroupsClientListHubSchemasResponse]
- func (client *SyncGroupsClient) NewListLogsPager(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[SyncGroupsClientListLogsResponse]
- func (client *SyncGroupsClient) NewListSyncDatabaseIDsPager(locationName string, options *SyncGroupsClientListSyncDatabaseIDsOptions) *runtime.Pager[SyncGroupsClientListSyncDatabaseIDsResponse]
- func (client *SyncGroupsClient) TriggerSync(ctx context.Context, resourceGroupName string, serverName string, ...) (SyncGroupsClientTriggerSyncResponse, error)
- type SyncGroupsClientBeginCreateOrUpdateOptions
- type SyncGroupsClientBeginDeleteOptions
- type SyncGroupsClientBeginRefreshHubSchemaOptions
- type SyncGroupsClientBeginUpdateOptions
- type SyncGroupsClientCancelSyncOptions
- type SyncGroupsClientCancelSyncResponse
- type SyncGroupsClientCreateOrUpdateResponse
- type SyncGroupsClientDeleteResponse
- type SyncGroupsClientGetOptions
- type SyncGroupsClientGetResponse
- type SyncGroupsClientListByDatabaseOptions
- type SyncGroupsClientListByDatabaseResponse
- type SyncGroupsClientListHubSchemasOptions
- type SyncGroupsClientListHubSchemasResponse
- type SyncGroupsClientListLogsOptions
- type SyncGroupsClientListLogsResponse
- type SyncGroupsClientListSyncDatabaseIDsOptions
- type SyncGroupsClientListSyncDatabaseIDsResponse
- type SyncGroupsClientRefreshHubSchemaResponse
- type SyncGroupsClientTriggerSyncOptions
- type SyncGroupsClientTriggerSyncResponse
- type SyncGroupsClientUpdateResponse
- type SyncGroupsType
- type SyncMember
- type SyncMemberDbType
- type SyncMemberListResult
- type SyncMemberProperties
- type SyncMemberState
- type SyncMembersClient
- func (client *SyncMembersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[SyncMembersClientCreateOrUpdateResponse], error)
- func (client *SyncMembersClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[SyncMembersClientDeleteResponse], error)
- func (client *SyncMembersClient) BeginRefreshMemberSchema(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[SyncMembersClientRefreshMemberSchemaResponse], error)
- func (client *SyncMembersClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[SyncMembersClientUpdateResponse], error)
- func (client *SyncMembersClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (SyncMembersClientGetResponse, error)
- func (client *SyncMembersClient) NewListBySyncGroupPager(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[SyncMembersClientListBySyncGroupResponse]
- func (client *SyncMembersClient) NewListMemberSchemasPager(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[SyncMembersClientListMemberSchemasResponse]
- type SyncMembersClientBeginCreateOrUpdateOptions
- type SyncMembersClientBeginDeleteOptions
- type SyncMembersClientBeginRefreshMemberSchemaOptions
- type SyncMembersClientBeginUpdateOptions
- type SyncMembersClientCreateOrUpdateResponse
- type SyncMembersClientDeleteResponse
- type SyncMembersClientGetOptions
- type SyncMembersClientGetResponse
- type SyncMembersClientListBySyncGroupOptions
- type SyncMembersClientListBySyncGroupResponse
- type SyncMembersClientListMemberSchemasOptions
- type SyncMembersClientListMemberSchemasResponse
- type SyncMembersClientRefreshMemberSchemaResponse
- type SyncMembersClientUpdateResponse
- type SystemData
- type TableTemporalType
- type TdeCertificate
- type TdeCertificateProperties
- type TdeCertificatesClient
- type TdeCertificatesClientBeginCreateOptions
- type TdeCertificatesClientCreateResponse
- type TimeZone
- type TimeZoneListResult
- type TimeZoneProperties
- type TimeZonesClient
- func (client *TimeZonesClient) Get(ctx context.Context, locationName string, timeZoneID string, ...) (TimeZonesClientGetResponse, error)
- func (client *TimeZonesClient) NewListByLocationPager(locationName string, options *TimeZonesClientListByLocationOptions) *runtime.Pager[TimeZonesClientListByLocationResponse]
- type TimeZonesClientGetOptions
- type TimeZonesClientGetResponse
- type TimeZonesClientListByLocationOptions
- type TimeZonesClientListByLocationResponse
- type TopQueries
- type TopQueriesListResult
- type TrackedResource
- type TransparentDataEncryptionName
- type TransparentDataEncryptionProperties
- type TransparentDataEncryptionState
- type TransparentDataEncryptionsClient
- func (client *TransparentDataEncryptionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (TransparentDataEncryptionsClientCreateOrUpdateResponse, error)
- func (client *TransparentDataEncryptionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (TransparentDataEncryptionsClientGetResponse, error)
- func (client *TransparentDataEncryptionsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[TransparentDataEncryptionsClientListByDatabaseResponse]
- type TransparentDataEncryptionsClientCreateOrUpdateOptions
- type TransparentDataEncryptionsClientCreateOrUpdateResponse
- type TransparentDataEncryptionsClientGetOptions
- type TransparentDataEncryptionsClientGetResponse
- type TransparentDataEncryptionsClientListByDatabaseOptions
- type TransparentDataEncryptionsClientListByDatabaseResponse
- type UnitDefinitionType
- type UnitType
- type UpdateLongTermRetentionBackupParameters
- type UpdateLongTermRetentionBackupParametersProperties
- type UpdateManagedInstanceDNSServersOperation
- type UpsertManagedServerOperationParameters
- type UpsertManagedServerOperationStep
- type UpsertManagedServerOperationStepStatus
- type Usage
- type UsageListResult
- type UsagesClient
- type UsagesClientListByInstancePoolOptions
- type UsagesClientListByInstancePoolResponse
- type UserIdentity
- type VirtualCluster
- type VirtualClusterListResult
- type VirtualClusterProperties
- type VirtualClusterUpdate
- type VirtualClustersClient
- func (client *VirtualClustersClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualClusterName string, ...) (*runtime.Poller[VirtualClustersClientDeleteResponse], error)
- func (client *VirtualClustersClient) BeginUpdate(ctx context.Context, resourceGroupName string, virtualClusterName string, ...) (*runtime.Poller[VirtualClustersClientUpdateResponse], error)
- func (client *VirtualClustersClient) Get(ctx context.Context, resourceGroupName string, virtualClusterName string, ...) (VirtualClustersClientGetResponse, error)
- func (client *VirtualClustersClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[VirtualClustersClientListByResourceGroupResponse]
- func (client *VirtualClustersClient) NewListPager(options *VirtualClustersClientListOptions) *runtime.Pager[VirtualClustersClientListResponse]
- func (client *VirtualClustersClient) UpdateDNSServers(ctx context.Context, resourceGroupName string, virtualClusterName string, ...) (VirtualClustersClientUpdateDNSServersResponse, error)
- type VirtualClustersClientBeginDeleteOptions
- type VirtualClustersClientBeginUpdateOptions
- type VirtualClustersClientDeleteResponse
- type VirtualClustersClientGetOptions
- type VirtualClustersClientGetResponse
- type VirtualClustersClientListByResourceGroupOptions
- type VirtualClustersClientListByResourceGroupResponse
- type VirtualClustersClientListOptions
- type VirtualClustersClientListResponse
- type VirtualClustersClientUpdateDNSServersOptions
- type VirtualClustersClientUpdateDNSServersResponse
- type VirtualClustersClientUpdateResponse
- type VirtualNetworkRule
- type VirtualNetworkRuleListResult
- type VirtualNetworkRuleProperties
- type VirtualNetworkRuleState
- type VirtualNetworkRulesClient
- func (client *VirtualNetworkRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[VirtualNetworkRulesClientCreateOrUpdateResponse], error)
- func (client *VirtualNetworkRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[VirtualNetworkRulesClientDeleteResponse], error)
- func (client *VirtualNetworkRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (VirtualNetworkRulesClientGetResponse, error)
- func (client *VirtualNetworkRulesClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[VirtualNetworkRulesClientListByServerResponse]
- type VirtualNetworkRulesClientBeginCreateOrUpdateOptions
- type VirtualNetworkRulesClientBeginDeleteOptions
- type VirtualNetworkRulesClientCreateOrUpdateResponse
- type VirtualNetworkRulesClientDeleteResponse
- type VirtualNetworkRulesClientGetOptions
- type VirtualNetworkRulesClientGetResponse
- type VirtualNetworkRulesClientListByServerOptions
- type VirtualNetworkRulesClientListByServerResponse
- type VulnerabilityAssessmentName
- type VulnerabilityAssessmentPolicyBaselineName
- type VulnerabilityAssessmentRecurringScansProperties
- type VulnerabilityAssessmentScanError
- type VulnerabilityAssessmentScanRecord
- type VulnerabilityAssessmentScanRecordListResult
- type VulnerabilityAssessmentScanRecordProperties
- type VulnerabilityAssessmentScanState
- type VulnerabilityAssessmentScanTriggerType
- type WorkloadClassifier
- type WorkloadClassifierListResult
- type WorkloadClassifierProperties
- type WorkloadClassifiersClient
- func (client *WorkloadClassifiersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[WorkloadClassifiersClientCreateOrUpdateResponse], error)
- func (client *WorkloadClassifiersClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[WorkloadClassifiersClientDeleteResponse], error)
- func (client *WorkloadClassifiersClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (WorkloadClassifiersClientGetResponse, error)
- func (client *WorkloadClassifiersClient) NewListByWorkloadGroupPager(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[WorkloadClassifiersClientListByWorkloadGroupResponse]
- type WorkloadClassifiersClientBeginCreateOrUpdateOptions
- type WorkloadClassifiersClientBeginDeleteOptions
- type WorkloadClassifiersClientCreateOrUpdateResponse
- type WorkloadClassifiersClientDeleteResponse
- type WorkloadClassifiersClientGetOptions
- type WorkloadClassifiersClientGetResponse
- type WorkloadClassifiersClientListByWorkloadGroupOptions
- type WorkloadClassifiersClientListByWorkloadGroupResponse
- type WorkloadGroup
- type WorkloadGroupListResult
- type WorkloadGroupProperties
- type WorkloadGroupsClient
- func (client *WorkloadGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[WorkloadGroupsClientCreateOrUpdateResponse], error)
- func (client *WorkloadGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[WorkloadGroupsClientDeleteResponse], error)
- func (client *WorkloadGroupsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (WorkloadGroupsClientGetResponse, error)
- func (client *WorkloadGroupsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[WorkloadGroupsClientListByDatabaseResponse]
- type WorkloadGroupsClientBeginCreateOrUpdateOptions
- type WorkloadGroupsClientBeginDeleteOptions
- type WorkloadGroupsClientCreateOrUpdateResponse
- type WorkloadGroupsClientDeleteResponse
- type WorkloadGroupsClientGetOptions
- type WorkloadGroupsClientGetResponse
- type WorkloadGroupsClientListByDatabaseOptions
- type WorkloadGroupsClientListByDatabaseResponse
Examples ¶
- AgentClient.CreateOrUpdate
- AgentClient.Get
- BackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate
- BackupShortTermRetentionPoliciesClient.Get
- BackupShortTermRetentionPoliciesClient.NewListByDatabasePager
- CapabilitiesClient.ListByLocation
- DataMaskingPoliciesClient.CreateOrUpdate (CreateOrUpdateDataMaskingPolicyMax)
- DataMaskingPoliciesClient.CreateOrUpdate (CreateOrUpdateDataMaskingPolicyMin)
- DataMaskingPoliciesClient.Get
- DataMaskingRulesClient.CreateOrUpdate (CreateUpdateDataMaskingRuleForDefaultMax)
- DataMaskingRulesClient.CreateOrUpdate (CreateUpdateDataMaskingRuleForDefaultMin)
- DataMaskingRulesClient.CreateOrUpdate (CreateUpdateDataMaskingRuleForNumbers)
- DataMaskingRulesClient.CreateOrUpdate (CreateUpdateDataMaskingRuleForText)
- DataMaskingRulesClient.NewListByDatabasePager
- DataWarehouseUserActivitiesClient.Get
- DataWarehouseUserActivitiesClient.NewListByDatabasePager
- DatabaseAdvancedThreatProtectionSettingsClient.CreateOrUpdate (UpdateADatabasesAdvancedThreatProtectionSettingsWithAllParameters)
- DatabaseAdvancedThreatProtectionSettingsClient.CreateOrUpdate (UpdateADatabasesAdvancedThreatProtectionSettingsWithMinimalParameters)
- DatabaseAdvancedThreatProtectionSettingsClient.Get
- DatabaseAdvancedThreatProtectionSettingsClient.NewListByDatabasePager
- DatabaseAdvisorsClient.Get
- DatabaseAdvisorsClient.ListByDatabase (ListOfDatabaseAdvisors)
- DatabaseAdvisorsClient.ListByDatabase (ListOfDatabaseRecommendedActionsForAllAdvisors)
- DatabaseAdvisorsClient.Update
- DatabaseAutomaticTuningClient.Get
- DatabaseAutomaticTuningClient.Update (UpdatesDatabaseAutomaticTuningSettingsWithAllProperties)
- DatabaseAutomaticTuningClient.Update (UpdatesDatabaseAutomaticTuningSettingsWithMinimalProperties)
- DatabaseBlobAuditingPoliciesClient.CreateOrUpdate (CreateOrUpdateADatabasesAzureMonitorAuditingPolicyWithMinimalParameters)
- DatabaseBlobAuditingPoliciesClient.CreateOrUpdate (CreateOrUpdateADatabasesBlobAuditingPolicyWithAllParameters)
- DatabaseBlobAuditingPoliciesClient.CreateOrUpdate (CreateOrUpdateADatabasesBlobAuditingPolicyWithMinimalParameters)
- DatabaseBlobAuditingPoliciesClient.Get
- DatabaseBlobAuditingPoliciesClient.NewListByDatabasePager
- DatabaseColumnsClient.Get
- DatabaseColumnsClient.NewListByDatabasePager (FilterDatabaseColumns)
- DatabaseColumnsClient.NewListByDatabasePager (ListDatabaseColumns)
- DatabaseColumnsClient.NewListByTablePager
- DatabaseExtensionsClient.BeginCreateOrUpdate
- DatabaseExtensionsClient.Get
- DatabaseExtensionsClient.NewListByDatabasePager
- DatabaseOperationsClient.Cancel
- DatabaseOperationsClient.NewListByDatabasePager
- DatabaseRecommendedActionsClient.Get
- DatabaseRecommendedActionsClient.ListByDatabaseAdvisor
- DatabaseRecommendedActionsClient.Update
- DatabaseSchemasClient.Get
- DatabaseSchemasClient.NewListByDatabasePager
- DatabaseSecurityAlertPoliciesClient.CreateOrUpdate (UpdateADatabasesThreatDetectionPolicyWithAllParameters)
- DatabaseSecurityAlertPoliciesClient.CreateOrUpdate (UpdateADatabasesThreatDetectionPolicyWithMinimalParameters)
- DatabaseSecurityAlertPoliciesClient.Get
- DatabaseSecurityAlertPoliciesClient.NewListByDatabasePager
- DatabaseTablesClient.Get
- DatabaseTablesClient.NewListBySchemaPager
- DatabaseUsagesClient.NewListByDatabasePager
- DatabaseVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate
- DatabaseVulnerabilityAssessmentRuleBaselinesClient.Delete
- DatabaseVulnerabilityAssessmentRuleBaselinesClient.Get
- DatabaseVulnerabilityAssessmentScansClient.BeginInitiateScan
- DatabaseVulnerabilityAssessmentScansClient.Export
- DatabaseVulnerabilityAssessmentScansClient.Get
- DatabaseVulnerabilityAssessmentScansClient.NewListByDatabasePager
- DatabaseVulnerabilityAssessmentsClient.CreateOrUpdate (CreateADatabasesVulnerabilityAssessmentWithAllParameters)
- DatabaseVulnerabilityAssessmentsClient.CreateOrUpdate (CreateADatabasesVulnerabilityAssessmentWithMinimalParametersWhenStorageAccountAccessKeyIsSpecified)
- DatabaseVulnerabilityAssessmentsClient.CreateOrUpdate (CreateADatabasesVulnerabilityAssessmentWithMinimalParametersWhenStorageContainerSasKeyIsSpecified)
- DatabaseVulnerabilityAssessmentsClient.Delete
- DatabaseVulnerabilityAssessmentsClient.Get
- DatabaseVulnerabilityAssessmentsClient.NewListByDatabasePager
- DatabasesClient.BeginCreateOrUpdate (CreatesADataWarehouseDatabaseAsACrossSubscriptionRestoreFromABackupOfADroppedDatabase)
- DatabasesClient.BeginCreateOrUpdate (CreatesADataWarehouseDatabaseAsACrossSubscriptionRestoreFromAGeoBackup)
- DatabasesClient.BeginCreateOrUpdate (CreatesADataWarehouseDatabaseAsACrossSubscriptionRestoreFromARestorePointOfAnExistingDatabase)
- DatabasesClient.BeginCreateOrUpdate (CreatesADatabaseAsACopy)
- DatabasesClient.BeginCreateOrUpdate (CreatesADatabaseAsAnOnLineSecondary)
- DatabasesClient.BeginCreateOrUpdate (CreatesADatabaseAsNamedReplicaSecondary)
- DatabasesClient.BeginCreateOrUpdate (CreatesADatabaseFromPointInTimeRestore)
- DatabasesClient.BeginCreateOrUpdate (CreatesADatabaseWithDefaultMode)
- DatabasesClient.BeginCreateOrUpdate (CreatesADatabaseWithLedgerOn)
- DatabasesClient.BeginCreateOrUpdate (CreatesADatabaseWithMinimumNumberOfParameters)
- DatabasesClient.BeginCreateOrUpdate (CreatesADatabaseWithPreferredMaintenanceWindow)
- DatabasesClient.BeginCreateOrUpdate (CreatesADatabaseWithSpecifiedBackupStorageRedundancy)
- DatabasesClient.BeginCreateOrUpdate (CreatesAVCoreDatabaseBySpecifyingServiceObjectiveName)
- DatabasesClient.BeginCreateOrUpdate (CreatesAVCoreDatabaseBySpecifyingSkuNameAndCapacity)
- DatabasesClient.BeginDelete
- DatabasesClient.BeginExport (ExportsADatabase)
- DatabasesClient.BeginExport (ExportsADatabaseUsingPrivateLinkToCommunicateWithSqlServerAndStorageAccount)
- DatabasesClient.BeginFailover
- DatabasesClient.BeginImport (ImportsToAnExistingEmptyDatabase)
- DatabasesClient.BeginImport (ImportsToAnExistingEmptyDatabaseUsingPrivateLinkToCommunicateWithSqlServerAndStorageAccount)
- DatabasesClient.BeginPause
- DatabasesClient.BeginResume
- DatabasesClient.BeginUpdate (AssignsMaintenanceWindowToADatabase)
- DatabasesClient.BeginUpdate (ResetsMaintenanceWindowOfADatabaseToDefault)
- DatabasesClient.BeginUpdate (UpdatesADatabase)
- DatabasesClient.BeginUpgradeDataWarehouse
- DatabasesClient.Get
- DatabasesClient.NewListByElasticPoolPager
- DatabasesClient.NewListByServerPager
- DatabasesClient.NewListInaccessibleByServerPager
- DatabasesClient.NewListMetricDefinitionsPager
- DatabasesClient.NewListMetricsPager
- DatabasesClient.Rename
- DeletedServersClient.BeginRecover
- DeletedServersClient.Get
- DeletedServersClient.NewListByLocationPager
- DeletedServersClient.NewListPager
- DistributedAvailabilityGroupsClient.BeginCreateOrUpdate
- DistributedAvailabilityGroupsClient.BeginDelete
- DistributedAvailabilityGroupsClient.BeginUpdate
- DistributedAvailabilityGroupsClient.Get
- DistributedAvailabilityGroupsClient.NewListByInstancePager
- ElasticPoolActivitiesClient.NewListByElasticPoolPager
- ElasticPoolDatabaseActivitiesClient.NewListByElasticPoolPager
- ElasticPoolOperationsClient.Cancel
- ElasticPoolOperationsClient.NewListByElasticPoolPager
- ElasticPoolsClient.BeginCreateOrUpdate (CreateOrUpdateElasticPoolWithAllParameter)
- ElasticPoolsClient.BeginCreateOrUpdate (CreateOrUpdateElasticPoolWithMaintenanceConfigurationParameter)
- ElasticPoolsClient.BeginCreateOrUpdate (CreateOrUpdateElasticPoolWithMinimumParameters)
- ElasticPoolsClient.BeginCreateOrUpdate (CreateOrUpdateHyperscaleElasticPoolWithHighAvailabilityReplicaCountParameter)
- ElasticPoolsClient.BeginDelete
- ElasticPoolsClient.BeginFailover
- ElasticPoolsClient.BeginUpdate (AssignsMaintenanceConfigurationToAnElasticPool)
- ElasticPoolsClient.BeginUpdate (ResetsMaintenanceConfigurationOfAnElasticPoolToDefault)
- ElasticPoolsClient.BeginUpdate (UpdateAnElasticPoolWithAllParameter)
- ElasticPoolsClient.BeginUpdate (UpdateAnElasticPoolWithMinimumParameters)
- ElasticPoolsClient.BeginUpdate (UpdateHighAvailabilityReplicaCountOfAHyperscaleElasticPool)
- ElasticPoolsClient.Get (GetAHyperscaleElasticPool)
- ElasticPoolsClient.Get (GetAnElasticPool)
- ElasticPoolsClient.NewListByServerPager
- ElasticPoolsClient.NewListMetricDefinitionsPager
- ElasticPoolsClient.NewListMetricsPager
- EncryptionProtectorsClient.BeginCreateOrUpdate (UpdateTheEncryptionProtectorToKeyVault)
- EncryptionProtectorsClient.BeginCreateOrUpdate (UpdateTheEncryptionProtectorToServiceManaged)
- EncryptionProtectorsClient.BeginRevalidate
- EncryptionProtectorsClient.Get
- EncryptionProtectorsClient.NewListByServerPager
- EndpointCertificatesClient.Get
- EndpointCertificatesClient.NewListByInstancePager
- ExtendedDatabaseBlobAuditingPoliciesClient.CreateOrUpdate (CreateOrUpdateAnExtendedDatabasesAzureMonitorAuditingPolicyWithMinimalParameters)
- ExtendedDatabaseBlobAuditingPoliciesClient.CreateOrUpdate (CreateOrUpdateAnExtendedDatabasesBlobAuditingPolicyWithAllParameters)
- ExtendedDatabaseBlobAuditingPoliciesClient.CreateOrUpdate (CreateOrUpdateAnExtendedDatabasesBlobAuditingPolicyWithMinimalParameters)
- ExtendedDatabaseBlobAuditingPoliciesClient.Get
- ExtendedDatabaseBlobAuditingPoliciesClient.NewListByDatabasePager
- ExtendedServerBlobAuditingPoliciesClient.BeginCreateOrUpdate (UpdateAServersExtendedBlobAuditingPolicyWithAllParameters)
- ExtendedServerBlobAuditingPoliciesClient.BeginCreateOrUpdate (UpdateAServersExtendedBlobAuditingPolicyWithMinimalParameters)
- ExtendedServerBlobAuditingPoliciesClient.Get
- ExtendedServerBlobAuditingPoliciesClient.NewListByServerPager
- FailoverGroupsClient.BeginCreateOrUpdate
- FailoverGroupsClient.BeginDelete
- FailoverGroupsClient.BeginFailover
- FailoverGroupsClient.BeginForceFailoverAllowDataLoss
- FailoverGroupsClient.BeginUpdate
- FailoverGroupsClient.Get
- FailoverGroupsClient.NewListByServerPager
- FirewallRulesClient.CreateOrUpdate (CreateAFirewallRuleMaxMin)
- FirewallRulesClient.CreateOrUpdate (UpdateAFirewallRuleMaxMin)
- FirewallRulesClient.Delete
- FirewallRulesClient.Get
- FirewallRulesClient.NewListByServerPager
- FirewallRulesClient.Replace
- GeoBackupPoliciesClient.CreateOrUpdate
- GeoBackupPoliciesClient.Get
- GeoBackupPoliciesClient.NewListByDatabasePager
- IPv6FirewallRulesClient.CreateOrUpdate (CreateAnIPv6FirewallRuleMaxMin)
- IPv6FirewallRulesClient.CreateOrUpdate (UpdateAnIPv6FirewallRuleMaxMin)
- IPv6FirewallRulesClient.Delete
- IPv6FirewallRulesClient.Get
- IPv6FirewallRulesClient.NewListByServerPager
- InstanceFailoverGroupsClient.BeginCreateOrUpdate
- InstanceFailoverGroupsClient.BeginDelete
- InstanceFailoverGroupsClient.BeginFailover
- InstanceFailoverGroupsClient.BeginForceFailoverAllowDataLoss
- InstanceFailoverGroupsClient.Get
- InstanceFailoverGroupsClient.NewListByLocationPager
- InstancePoolsClient.BeginCreateOrUpdate (CreateAnInstancePoolWithAllProperties)
- InstancePoolsClient.BeginCreateOrUpdate (CreateAnInstancePoolWithMinProperties)
- InstancePoolsClient.BeginDelete
- InstancePoolsClient.BeginUpdate
- InstancePoolsClient.Get
- InstancePoolsClient.NewListByResourceGroupPager
- InstancePoolsClient.NewListPager
- JobAgentsClient.BeginCreateOrUpdate
- JobAgentsClient.BeginDelete
- JobAgentsClient.BeginUpdate
- JobAgentsClient.Get
- JobAgentsClient.NewListByServerPager
- JobCredentialsClient.CreateOrUpdate
- JobCredentialsClient.Delete
- JobCredentialsClient.Get
- JobCredentialsClient.NewListByAgentPager
- JobExecutionsClient.BeginCreate
- JobExecutionsClient.BeginCreateOrUpdate
- JobExecutionsClient.Cancel
- JobExecutionsClient.Get
- JobExecutionsClient.NewListByAgentPager (ListAllJobExecutionsInAJobAgent)
- JobExecutionsClient.NewListByAgentPager (ListAllJobExecutionsInAJobAgentWithFiltering)
- JobExecutionsClient.NewListByJobPager
- JobStepExecutionsClient.Get
- JobStepExecutionsClient.NewListByJobExecutionPager
- JobStepsClient.CreateOrUpdate (CreateOrUpdateAJobStepWithAllPropertiesSpecified)
- JobStepsClient.CreateOrUpdate (CreateOrUpdateAJobStepWithMinimalPropertiesSpecified)
- JobStepsClient.Delete
- JobStepsClient.Get
- JobStepsClient.GetByVersion
- JobStepsClient.NewListByJobPager
- JobStepsClient.NewListByVersionPager
- JobTargetExecutionsClient.Get
- JobTargetExecutionsClient.NewListByJobExecutionPager
- JobTargetExecutionsClient.NewListByStepPager
- JobTargetGroupsClient.CreateOrUpdate (CreateOrUpdateATargetGroupWithAllProperties)
- JobTargetGroupsClient.CreateOrUpdate (CreateOrUpdateATargetGroupWithMinimalProperties)
- JobTargetGroupsClient.Delete
- JobTargetGroupsClient.Get
- JobTargetGroupsClient.NewListByAgentPager
- JobVersionsClient.Get
- JobVersionsClient.NewListByJobPager
- JobsClient.CreateOrUpdate (CreateAJobWithAllPropertiesSpecified)
- JobsClient.CreateOrUpdate (CreateAJobWithDefaultProperties)
- JobsClient.Delete
- JobsClient.Get
- JobsClient.NewListByAgentPager
- LedgerDigestUploadsClient.BeginCreateOrUpdate
- LedgerDigestUploadsClient.BeginDisable
- LedgerDigestUploadsClient.Get
- LedgerDigestUploadsClient.NewListByDatabasePager
- LongTermRetentionBackupsClient.BeginCopy
- LongTermRetentionBackupsClient.BeginCopyByResourceGroup
- LongTermRetentionBackupsClient.BeginDelete
- LongTermRetentionBackupsClient.BeginDeleteByResourceGroup
- LongTermRetentionBackupsClient.BeginUpdate
- LongTermRetentionBackupsClient.BeginUpdateByResourceGroup
- LongTermRetentionBackupsClient.Get
- LongTermRetentionBackupsClient.GetByResourceGroup
- LongTermRetentionBackupsClient.NewListByDatabasePager
- LongTermRetentionBackupsClient.NewListByLocationPager
- LongTermRetentionBackupsClient.NewListByResourceGroupDatabasePager
- LongTermRetentionBackupsClient.NewListByResourceGroupLocationPager
- LongTermRetentionBackupsClient.NewListByResourceGroupServerPager
- LongTermRetentionBackupsClient.NewListByServerPager
- LongTermRetentionManagedInstanceBackupsClient.BeginDelete
- LongTermRetentionManagedInstanceBackupsClient.BeginDeleteByResourceGroup
- LongTermRetentionManagedInstanceBackupsClient.Get
- LongTermRetentionManagedInstanceBackupsClient.GetByResourceGroup
- LongTermRetentionManagedInstanceBackupsClient.NewListByDatabasePager
- LongTermRetentionManagedInstanceBackupsClient.NewListByInstancePager
- LongTermRetentionManagedInstanceBackupsClient.NewListByLocationPager
- LongTermRetentionManagedInstanceBackupsClient.NewListByResourceGroupDatabasePager
- LongTermRetentionManagedInstanceBackupsClient.NewListByResourceGroupInstancePager
- LongTermRetentionManagedInstanceBackupsClient.NewListByResourceGroupLocationPager
- LongTermRetentionPoliciesClient.BeginCreateOrUpdate
- LongTermRetentionPoliciesClient.Get
- LongTermRetentionPoliciesClient.NewListByDatabasePager
- MaintenanceWindowOptionsClient.Get
- MaintenanceWindowsClient.CreateOrUpdate
- MaintenanceWindowsClient.Get
- ManagedBackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate
- ManagedBackupShortTermRetentionPoliciesClient.Get
- ManagedBackupShortTermRetentionPoliciesClient.NewListByDatabasePager
- ManagedDatabaseColumnsClient.Get
- ManagedDatabaseColumnsClient.NewListByDatabasePager (FilterManagedDatabaseColumns)
- ManagedDatabaseColumnsClient.NewListByDatabasePager (ListManagedDatabaseColumns)
- ManagedDatabaseColumnsClient.NewListByTablePager
- ManagedDatabaseQueriesClient.Get
- ManagedDatabaseQueriesClient.NewListByQueryPager (ObtainQueryExecutionStatistics)
- ManagedDatabaseQueriesClient.NewListByQueryPager (ObtainQueryExecutionStatisticsExampleWithAllRequestParameters)
- ManagedDatabaseQueriesClient.NewListByQueryPager (ObtainQueryExecutionStatisticsMinimalExampleWithOnlyMandatoryRequestParameters)
- ManagedDatabaseRecommendedSensitivityLabelsClient.Update
- ManagedDatabaseRestoreDetailsClient.Get
- ManagedDatabaseSchemasClient.Get
- ManagedDatabaseSchemasClient.NewListByDatabasePager
- ManagedDatabaseSecurityAlertPoliciesClient.CreateOrUpdate (UpdateADatabasesThreatDetectionPolicyWithAllParameters)
- ManagedDatabaseSecurityAlertPoliciesClient.CreateOrUpdate (UpdateADatabasesThreatDetectionPolicyWithMinimalParameters)
- ManagedDatabaseSecurityAlertPoliciesClient.Get
- ManagedDatabaseSecurityAlertPoliciesClient.NewListByDatabasePager
- ManagedDatabaseSecurityEventsClient.NewListByDatabasePager (GetTheManagedDatabasesSecurityEventsWithMaximalParameters)
- ManagedDatabaseSecurityEventsClient.NewListByDatabasePager (GetTheManagedDatabasesSecurityEventsWithMinimalParameters)
- ManagedDatabaseSensitivityLabelsClient.CreateOrUpdate
- ManagedDatabaseSensitivityLabelsClient.Delete
- ManagedDatabaseSensitivityLabelsClient.DisableRecommendation
- ManagedDatabaseSensitivityLabelsClient.EnableRecommendation
- ManagedDatabaseSensitivityLabelsClient.Get
- ManagedDatabaseSensitivityLabelsClient.NewListCurrentByDatabasePager
- ManagedDatabaseSensitivityLabelsClient.NewListRecommendedByDatabasePager
- ManagedDatabaseSensitivityLabelsClient.Update
- ManagedDatabaseTablesClient.Get
- ManagedDatabaseTablesClient.NewListBySchemaPager
- ManagedDatabaseTransparentDataEncryptionClient.CreateOrUpdate
- ManagedDatabaseTransparentDataEncryptionClient.Get
- ManagedDatabaseTransparentDataEncryptionClient.NewListByDatabasePager
- ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate
- ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.Delete
- ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.Get
- ManagedDatabaseVulnerabilityAssessmentScansClient.BeginInitiateScan
- ManagedDatabaseVulnerabilityAssessmentScansClient.Export
- ManagedDatabaseVulnerabilityAssessmentScansClient.Get
- ManagedDatabaseVulnerabilityAssessmentScansClient.NewListByDatabasePager
- ManagedDatabaseVulnerabilityAssessmentsClient.CreateOrUpdate (CreateADatabasesVulnerabilityAssessmentWithAllParameters)
- ManagedDatabaseVulnerabilityAssessmentsClient.CreateOrUpdate (CreateADatabasesVulnerabilityAssessmentWithMinimalParameters)
- ManagedDatabaseVulnerabilityAssessmentsClient.Delete
- ManagedDatabaseVulnerabilityAssessmentsClient.Get
- ManagedDatabaseVulnerabilityAssessmentsClient.NewListByDatabasePager
- ManagedDatabasesClient.BeginCompleteRestore
- ManagedDatabasesClient.BeginCreateOrUpdate (CreatesANewManagedDatabaseByRestoringFromAnExternalBackup)
- ManagedDatabasesClient.BeginCreateOrUpdate (CreatesANewManagedDatabaseFromRestoringAGeoReplicatedBackup)
- ManagedDatabasesClient.BeginCreateOrUpdate (CreatesANewManagedDatabaseFromRestoringALongTermRetentionBackup)
- ManagedDatabasesClient.BeginCreateOrUpdate (CreatesANewManagedDatabaseUsingPointInTimeRestore)
- ManagedDatabasesClient.BeginCreateOrUpdate (CreatesANewManagedDatabaseWithMaximalProperties)
- ManagedDatabasesClient.BeginCreateOrUpdate (CreatesANewManagedDatabaseWithMinimalProperties)
- ManagedDatabasesClient.BeginDelete
- ManagedDatabasesClient.BeginUpdate (UpdatesAManagedDatabaseWithMaximalProperties)
- ManagedDatabasesClient.BeginUpdate (UpdatesAManagedDatabaseWithMinimalProperties)
- ManagedDatabasesClient.Get
- ManagedDatabasesClient.NewListByInstancePager
- ManagedDatabasesClient.NewListInaccessibleByInstancePager
- ManagedInstanceAdministratorsClient.BeginCreateOrUpdate (CreateAdministratorOfManagedInstance)
- ManagedInstanceAdministratorsClient.BeginCreateOrUpdate (UpdateAdministratorOfManagedInstance)
- ManagedInstanceAdministratorsClient.BeginDelete
- ManagedInstanceAdministratorsClient.Get
- ManagedInstanceAdministratorsClient.NewListByInstancePager
- ManagedInstanceAzureADOnlyAuthenticationsClient.BeginCreateOrUpdate
- ManagedInstanceAzureADOnlyAuthenticationsClient.BeginDelete
- ManagedInstanceAzureADOnlyAuthenticationsClient.Get
- ManagedInstanceAzureADOnlyAuthenticationsClient.NewListByInstancePager
- ManagedInstanceEncryptionProtectorsClient.BeginCreateOrUpdate (UpdateTheEncryptionProtectorToKeyVault)
- ManagedInstanceEncryptionProtectorsClient.BeginCreateOrUpdate (UpdateTheEncryptionProtectorToServiceManaged)
- ManagedInstanceEncryptionProtectorsClient.BeginRevalidate
- ManagedInstanceEncryptionProtectorsClient.Get
- ManagedInstanceEncryptionProtectorsClient.NewListByInstancePager
- ManagedInstanceKeysClient.BeginCreateOrUpdate
- ManagedInstanceKeysClient.BeginDelete
- ManagedInstanceKeysClient.Get
- ManagedInstanceKeysClient.NewListByInstancePager
- ManagedInstanceLongTermRetentionPoliciesClient.BeginCreateOrUpdate
- ManagedInstanceLongTermRetentionPoliciesClient.Get
- ManagedInstanceLongTermRetentionPoliciesClient.NewListByDatabasePager
- ManagedInstanceOperationsClient.Cancel
- ManagedInstanceOperationsClient.Get
- ManagedInstanceOperationsClient.NewListByManagedInstancePager
- ManagedInstancePrivateEndpointConnectionsClient.BeginCreateOrUpdate
- ManagedInstancePrivateEndpointConnectionsClient.BeginDelete
- ManagedInstancePrivateEndpointConnectionsClient.Get
- ManagedInstancePrivateEndpointConnectionsClient.NewListByManagedInstancePager
- ManagedInstancePrivateLinkResourcesClient.Get
- ManagedInstancePrivateLinkResourcesClient.NewListByManagedInstancePager
- ManagedInstanceTdeCertificatesClient.BeginCreate
- ManagedInstanceVulnerabilityAssessmentsClient.CreateOrUpdate (CreateAManagedInstancesVulnerabilityAssessmentWithAllParameters)
- ManagedInstanceVulnerabilityAssessmentsClient.CreateOrUpdate (CreateAManagedInstancesVulnerabilityAssessmentWithMinimalParametersWhenStorageAccountAccessKeyIsSpecified)
- ManagedInstanceVulnerabilityAssessmentsClient.CreateOrUpdate (CreateAManagedInstancesVulnerabilityAssessmentWithMinimalParametersWhenStorageContainerSasKeyIsSpecified)
- ManagedInstanceVulnerabilityAssessmentsClient.Delete
- ManagedInstanceVulnerabilityAssessmentsClient.Get
- ManagedInstanceVulnerabilityAssessmentsClient.NewListByInstancePager
- ManagedInstancesClient.BeginCreateOrUpdate (CreateManagedInstanceWithAllProperties)
- ManagedInstancesClient.BeginCreateOrUpdate (CreateManagedInstanceWithMinimalProperties)
- ManagedInstancesClient.BeginDelete
- ManagedInstancesClient.BeginFailover
- ManagedInstancesClient.BeginUpdate (RemoveMaintenancePolicyFromManagedInstanceSelectDefaultMaintenancePolicy)
- ManagedInstancesClient.BeginUpdate (UpdateManagedInstanceWithAllProperties)
- ManagedInstancesClient.BeginUpdate (UpdateManagedInstanceWithMinimalProperties)
- ManagedInstancesClient.Get (GetManagedInstance)
- ManagedInstancesClient.Get (GetManagedInstanceWithExpandAdministratorsActivedirectory)
- ManagedInstancesClient.NewListByInstancePoolPager (ListManagedInstancesByInstancePool)
- ManagedInstancesClient.NewListByInstancePoolPager (ListManagedInstancesByInstancePoolWithExpandAdministratorsActivedirectory)
- ManagedInstancesClient.NewListByManagedInstancePager (ObtainListOfInstancesTopResourceConsumingQueries)
- ManagedInstancesClient.NewListByManagedInstancePager (ObtainListOfInstancesTopResourceConsumingQueriesFullBlownRequestAndResponse)
- ManagedInstancesClient.NewListByManagedInstancePager (ObtainListOfInstancesTopResourceConsumingQueriesMinimalRequestAndResponse)
- ManagedInstancesClient.NewListByResourceGroupPager (ListManagedInstancesByResourceGroup)
- ManagedInstancesClient.NewListByResourceGroupPager (ListManagedInstancesByResourceGroupWithExpandAdministratorsActivedirectory)
- ManagedInstancesClient.NewListPager (ListManagedInstances)
- ManagedInstancesClient.NewListPager (ListManagedInstancesWithExpandAdministratorsActivedirectory)
- ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate
- ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.Get
- ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.NewListByRestorableDroppedDatabasePager
- ManagedServerSecurityAlertPoliciesClient.BeginCreateOrUpdate (UpdateAManagedServersThreatDetectionPolicyWithAllParameters)
- ManagedServerSecurityAlertPoliciesClient.BeginCreateOrUpdate (UpdateAManagedServersThreatDetectionPolicyWithMinimalParameters)
- ManagedServerSecurityAlertPoliciesClient.Get
- ManagedServerSecurityAlertPoliciesClient.NewListByInstancePager
- OutboundFirewallRulesClient.BeginCreateOrUpdate
- OutboundFirewallRulesClient.BeginDelete
- OutboundFirewallRulesClient.Get
- OutboundFirewallRulesClient.NewListByServerPager
- PrivateEndpointConnectionsClient.BeginCreateOrUpdate
- PrivateEndpointConnectionsClient.BeginDelete
- PrivateEndpointConnectionsClient.Get
- PrivateEndpointConnectionsClient.NewListByServerPager
- PrivateLinkResourcesClient.Get
- PrivateLinkResourcesClient.NewListByServerPager
- RecommendedSensitivityLabelsClient.Update
- RecoverableDatabasesClient.Get
- RecoverableDatabasesClient.NewListByServerPager
- RecoverableManagedDatabasesClient.Get
- RecoverableManagedDatabasesClient.NewListByInstancePager
- ReplicationLinksClient.BeginFailover
- ReplicationLinksClient.BeginFailoverAllowDataLoss
- ReplicationLinksClient.Delete
- ReplicationLinksClient.Get
- ReplicationLinksClient.NewListByDatabasePager
- ReplicationLinksClient.NewListByServerPager
- RestorableDroppedDatabasesClient.Get
- RestorableDroppedDatabasesClient.NewListByServerPager
- RestorableDroppedManagedDatabasesClient.Get
- RestorableDroppedManagedDatabasesClient.NewListByInstancePager
- RestorePointsClient.BeginCreate
- RestorePointsClient.Delete
- RestorePointsClient.Get (GetsADatabaseRestorePoint)
- RestorePointsClient.Get (GetsADatawarehouseDatabaseRestorePoint)
- RestorePointsClient.NewListByDatabasePager (ListDatabaseRestorePoints)
- RestorePointsClient.NewListByDatabasePager (ListDatawarehouseDatabaseRestorePoints)
- SensitivityLabelsClient.CreateOrUpdate
- SensitivityLabelsClient.Delete
- SensitivityLabelsClient.DisableRecommendation
- SensitivityLabelsClient.EnableRecommendation
- SensitivityLabelsClient.Get
- SensitivityLabelsClient.NewListCurrentByDatabasePager
- SensitivityLabelsClient.NewListRecommendedByDatabasePager
- SensitivityLabelsClient.Update
- ServerAdvancedThreatProtectionSettingsClient.BeginCreateOrUpdate (UpdateAServersAdvancedThreatProtectionSettingsWithAllParameters)
- ServerAdvancedThreatProtectionSettingsClient.BeginCreateOrUpdate (UpdateAServersAdvancedThreatProtectionSettingsWithMinimalParameters)
- ServerAdvancedThreatProtectionSettingsClient.Get
- ServerAdvancedThreatProtectionSettingsClient.NewListByServerPager
- ServerAdvisorsClient.Get
- ServerAdvisorsClient.ListByServer (ListOfServerAdvisors)
- ServerAdvisorsClient.ListByServer (ListOfServerRecommendedActionsForAllAdvisors)
- ServerAdvisorsClient.Update
- ServerAutomaticTuningClient.Get
- ServerAutomaticTuningClient.Update (UpdatesServerAutomaticTuningSettingsWithAllProperties)
- ServerAutomaticTuningClient.Update (UpdatesServerAutomaticTuningSettingsWithMinimalProperties)
- ServerAzureADAdministratorsClient.BeginCreateOrUpdate
- ServerAzureADAdministratorsClient.BeginDelete
- ServerAzureADAdministratorsClient.Get
- ServerAzureADAdministratorsClient.NewListByServerPager
- ServerAzureADOnlyAuthenticationsClient.BeginCreateOrUpdate
- ServerAzureADOnlyAuthenticationsClient.BeginDelete
- ServerAzureADOnlyAuthenticationsClient.Get
- ServerAzureADOnlyAuthenticationsClient.NewListByServerPager
- ServerBlobAuditingPoliciesClient.BeginCreateOrUpdate (UpdateAServersBlobAuditingPolicyWithAllParameters)
- ServerBlobAuditingPoliciesClient.BeginCreateOrUpdate (UpdateAServersBlobAuditingPolicyWithMinimalParameters)
- ServerBlobAuditingPoliciesClient.Get
- ServerBlobAuditingPoliciesClient.NewListByServerPager
- ServerCommunicationLinksClient.BeginCreateOrUpdate
- ServerCommunicationLinksClient.Delete
- ServerCommunicationLinksClient.Get
- ServerCommunicationLinksClient.NewListByServerPager
- ServerConnectionPoliciesClient.BeginCreateOrUpdate
- ServerConnectionPoliciesClient.Get
- ServerConnectionPoliciesClient.NewListByServerPager
- ServerDNSAliasesClient.BeginAcquire
- ServerDNSAliasesClient.BeginCreateOrUpdate
- ServerDNSAliasesClient.BeginDelete
- ServerDNSAliasesClient.Get
- ServerDNSAliasesClient.NewListByServerPager
- ServerDevOpsAuditSettingsClient.BeginCreateOrUpdate (UpdateAServersDevOpsAuditSettingsWithAllParams)
- ServerDevOpsAuditSettingsClient.BeginCreateOrUpdate (UpdateAServersDevOpsAuditSettingsWithMinimalInput)
- ServerDevOpsAuditSettingsClient.Get
- ServerDevOpsAuditSettingsClient.NewListByServerPager
- ServerKeysClient.BeginCreateOrUpdate
- ServerKeysClient.BeginDelete
- ServerKeysClient.Get
- ServerKeysClient.NewListByServerPager
- ServerOperationsClient.NewListByServerPager
- ServerSecurityAlertPoliciesClient.BeginCreateOrUpdate (UpdateAServersThreatDetectionPolicyWithAllParameters)
- ServerSecurityAlertPoliciesClient.BeginCreateOrUpdate (UpdateAServersThreatDetectionPolicyWithMinimalParameters)
- ServerSecurityAlertPoliciesClient.Get
- ServerSecurityAlertPoliciesClient.NewListByServerPager
- ServerTrustCertificatesClient.BeginCreateOrUpdate
- ServerTrustCertificatesClient.BeginDelete
- ServerTrustCertificatesClient.Get
- ServerTrustCertificatesClient.NewListByInstancePager
- ServerTrustGroupsClient.BeginCreateOrUpdate
- ServerTrustGroupsClient.BeginDelete
- ServerTrustGroupsClient.Get
- ServerTrustGroupsClient.NewListByInstancePager
- ServerTrustGroupsClient.NewListByLocationPager
- ServerUsagesClient.NewListByServerPager
- ServerVulnerabilityAssessmentsClient.CreateOrUpdate (CreateAServersVulnerabilityAssessmentWithAllParameters)
- ServerVulnerabilityAssessmentsClient.CreateOrUpdate (CreateAServersVulnerabilityAssessmentWithMinimalParametersWhenStorageAccountAccessKeyIsSpecified)
- ServerVulnerabilityAssessmentsClient.CreateOrUpdate (CreateAServersVulnerabilityAssessmentWithMinimalParametersWhenStorageContainerSasKeyIsSpecified)
- ServerVulnerabilityAssessmentsClient.Delete
- ServerVulnerabilityAssessmentsClient.Get
- ServerVulnerabilityAssessmentsClient.NewListByServerPager
- ServersClient.BeginCreateOrUpdate
- ServersClient.BeginDelete
- ServersClient.BeginImportDatabase (ImportsToANewDatabase)
- ServersClient.BeginImportDatabase (ImportsToANewDatabaseUsingPrivateLinkForTheSqlServerAndStorageAccount)
- ServersClient.BeginUpdate
- ServersClient.CheckNameAvailability (CheckForAServerNameThatAlreadyExists)
- ServersClient.CheckNameAvailability (CheckForAServerNameThatIsAvailable)
- ServersClient.CheckNameAvailability (CheckForAServerNameThatIsInvalid)
- ServersClient.Get (GetServer)
- ServersClient.Get (GetServerWithExpandAdministrators)
- ServersClient.NewListByResourceGroupPager (ListServersByResourceGroup)
- ServersClient.NewListByResourceGroupPager (ListServersByResourceGroupWithExpandAdministrators)
- ServersClient.NewListPager (ListServers)
- ServersClient.NewListPager (ListServersWithExpandEqualsAdministrators)
- ServiceObjectivesClient.Get
- ServiceObjectivesClient.NewListByServerPager
- SubscriptionUsagesClient.Get
- SubscriptionUsagesClient.NewListByLocationPager
- SyncAgentsClient.BeginCreateOrUpdate (CreateANewSyncAgent)
- SyncAgentsClient.BeginCreateOrUpdate (UpdateASyncAgent)
- SyncAgentsClient.BeginDelete
- SyncAgentsClient.GenerateKey
- SyncAgentsClient.Get
- SyncAgentsClient.NewListByServerPager
- SyncAgentsClient.NewListLinkedDatabasesPager
- SyncGroupsClient.BeginCreateOrUpdate (CreateASyncGroup)
- SyncGroupsClient.BeginCreateOrUpdate (UpdateASyncGroup)
- SyncGroupsClient.BeginDelete
- SyncGroupsClient.BeginRefreshHubSchema
- SyncGroupsClient.BeginUpdate
- SyncGroupsClient.CancelSync
- SyncGroupsClient.Get
- SyncGroupsClient.NewListByDatabasePager
- SyncGroupsClient.NewListHubSchemasPager
- SyncGroupsClient.NewListLogsPager
- SyncGroupsClient.NewListSyncDatabaseIDsPager
- SyncGroupsClient.TriggerSync
- SyncMembersClient.BeginCreateOrUpdate (CreateANewSyncMember)
- SyncMembersClient.BeginCreateOrUpdate (UpdateASyncMember)
- SyncMembersClient.BeginDelete
- SyncMembersClient.BeginRefreshMemberSchema
- SyncMembersClient.BeginUpdate
- SyncMembersClient.Get
- SyncMembersClient.NewListBySyncGroupPager
- SyncMembersClient.NewListMemberSchemasPager
- TdeCertificatesClient.BeginCreate
- TimeZonesClient.Get
- TimeZonesClient.NewListByLocationPager
- TransparentDataEncryptionsClient.CreateOrUpdate
- TransparentDataEncryptionsClient.Get
- TransparentDataEncryptionsClient.NewListByDatabasePager
- UsagesClient.NewListByInstancePoolPager (ListInstancePoolUsages)
- UsagesClient.NewListByInstancePoolPager (ListInstancePoolUsagesExpandedWithChildren)
- VirtualClustersClient.BeginDelete
- VirtualClustersClient.BeginUpdate
- VirtualClustersClient.Get
- VirtualClustersClient.NewListByResourceGroupPager
- VirtualClustersClient.NewListPager
- VirtualClustersClient.UpdateDNSServers
- VirtualNetworkRulesClient.BeginCreateOrUpdate
- VirtualNetworkRulesClient.BeginDelete
- VirtualNetworkRulesClient.Get
- VirtualNetworkRulesClient.NewListByServerPager
- WorkloadClassifiersClient.BeginCreateOrUpdate (CreateAWorkloadGroupWithAllPropertiesSpecified)
- WorkloadClassifiersClient.BeginCreateOrUpdate (CreateAWorkloadGroupWithTheRequiredPropertiesSpecified)
- WorkloadClassifiersClient.BeginDelete
- WorkloadClassifiersClient.Get
- WorkloadClassifiersClient.NewListByWorkloadGroupPager
- WorkloadGroupsClient.BeginCreateOrUpdate (CreateAWorkloadGroupWithAllPropertiesSpecified)
- WorkloadGroupsClient.BeginCreateOrUpdate (CreateAWorkloadGroupWithTheRequiredPropertiesSpecified)
- WorkloadGroupsClient.BeginDelete
- WorkloadGroupsClient.Get
- WorkloadGroupsClient.NewListByDatabasePager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdministratorListResult ¶
type AdministratorListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ServerAzureADAdministrator }
AdministratorListResult - A list of active directory administrators.
func (AdministratorListResult) MarshalJSON ¶
func (a AdministratorListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AdministratorListResult.
func (*AdministratorListResult) UnmarshalJSON ¶ added in v1.1.0
func (a *AdministratorListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AdministratorListResult.
type AdministratorName ¶
type AdministratorName string
const (
AdministratorNameActiveDirectory AdministratorName = "ActiveDirectory"
)
func PossibleAdministratorNameValues ¶
func PossibleAdministratorNameValues() []AdministratorName
PossibleAdministratorNameValues returns the possible values for the AdministratorName const type.
type AdministratorProperties ¶
type AdministratorProperties struct { // REQUIRED; Type of the sever administrator. AdministratorType *AdministratorType // REQUIRED; Login name of the server administrator. Login *string // REQUIRED; SID (object ID) of the server administrator. Sid *string // Tenant ID of the administrator. TenantID *string // READ-ONLY; Azure Active Directory only Authentication enabled. AzureADOnlyAuthentication *bool }
AdministratorProperties - Properties of a active directory administrator.
func (AdministratorProperties) MarshalJSON ¶ added in v1.1.0
func (a AdministratorProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AdministratorProperties.
func (*AdministratorProperties) UnmarshalJSON ¶ added in v1.1.0
func (a *AdministratorProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AdministratorProperties.
type AdministratorType ¶
type AdministratorType string
AdministratorType - Type of the sever administrator.
const (
AdministratorTypeActiveDirectory AdministratorType = "ActiveDirectory"
)
func PossibleAdministratorTypeValues ¶
func PossibleAdministratorTypeValues() []AdministratorType
PossibleAdministratorTypeValues returns the possible values for the AdministratorType const type.
type AdvancedThreatProtectionName ¶ added in v1.0.0
type AdvancedThreatProtectionName string
const (
AdvancedThreatProtectionNameDefault AdvancedThreatProtectionName = "Default"
)
func PossibleAdvancedThreatProtectionNameValues ¶ added in v1.0.0
func PossibleAdvancedThreatProtectionNameValues() []AdvancedThreatProtectionName
PossibleAdvancedThreatProtectionNameValues returns the possible values for the AdvancedThreatProtectionName const type.
type AdvancedThreatProtectionProperties ¶ added in v1.0.0
type AdvancedThreatProtectionProperties struct { // REQUIRED; Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been // applied yet on the specific database or server. State *AdvancedThreatProtectionState // READ-ONLY; Specifies the UTC creation time of the policy. CreationTime *time.Time }
AdvancedThreatProtectionProperties - Properties of an Advanced Threat Protection state.
func (AdvancedThreatProtectionProperties) MarshalJSON ¶ added in v1.0.0
func (a AdvancedThreatProtectionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AdvancedThreatProtectionProperties.
func (*AdvancedThreatProtectionProperties) UnmarshalJSON ¶ added in v1.0.0
func (a *AdvancedThreatProtectionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AdvancedThreatProtectionProperties.
type AdvancedThreatProtectionState ¶ added in v1.0.0
type AdvancedThreatProtectionState string
AdvancedThreatProtectionState - Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been applied yet on the specific database or server.
const ( AdvancedThreatProtectionStateDisabled AdvancedThreatProtectionState = "Disabled" AdvancedThreatProtectionStateEnabled AdvancedThreatProtectionState = "Enabled" AdvancedThreatProtectionStateNew AdvancedThreatProtectionState = "New" )
func PossibleAdvancedThreatProtectionStateValues ¶ added in v1.0.0
func PossibleAdvancedThreatProtectionStateValues() []AdvancedThreatProtectionState
PossibleAdvancedThreatProtectionStateValues returns the possible values for the AdvancedThreatProtectionState const type.
type Advisor ¶
type Advisor struct { // Resource properties. Properties *AdvisorProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource kind. Kind *string // READ-ONLY; Resource location. Location *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
Advisor - Database, Server or Elastic Pool Advisor.
func (Advisor) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Advisor.
func (*Advisor) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Advisor.
type AdvisorProperties ¶
type AdvisorProperties struct { // REQUIRED; Gets the auto-execute status (whether to let the system execute the recommendations) of this advisor. Possible // values are 'Enabled' and 'Disabled' AutoExecuteStatus *AutoExecuteStatus // READ-ONLY; Gets the status of availability of this advisor to customers. Possible values are 'GA', 'PublicPreview', 'LimitedPublicPreview' // and 'PrivatePreview'. AdvisorStatus *AdvisorStatus // READ-ONLY; Gets the resource from which current value of auto-execute status is inherited. Auto-execute status can be set // on (and inherited from) different levels in the resource hierarchy. Possible values are // 'Subscription', 'Server', 'ElasticPool', 'Database' and 'Default' (when status is not explicitly set on any level). AutoExecuteStatusInheritedFrom *AutoExecuteStatusInheritedFrom // READ-ONLY; Gets the time when the current resource was analyzed for recommendations by this advisor. LastChecked *time.Time // READ-ONLY; Gets that status of recommendations for this advisor and reason for not having any recommendations. Possible // values include, but are not limited to, 'Ok' (Recommendations available),LowActivity (not // enough workload to analyze), 'DbSeemsTuned' (Database is doing well), etc. RecommendationsStatus *string // READ-ONLY; Gets the recommended actions for this advisor. RecommendedActions []*RecommendedAction }
AdvisorProperties - Properties for a Database, Server or Elastic Pool Advisor.
func (AdvisorProperties) MarshalJSON ¶
func (a AdvisorProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AdvisorProperties.
func (*AdvisorProperties) UnmarshalJSON ¶
func (a *AdvisorProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AdvisorProperties.
type AdvisorStatus ¶
type AdvisorStatus string
AdvisorStatus - Gets the status of availability of this advisor to customers. Possible values are 'GA', 'PublicPreview', 'LimitedPublicPreview' and 'PrivatePreview'.
const ( AdvisorStatusGA AdvisorStatus = "GA" AdvisorStatusLimitedPublicPreview AdvisorStatus = "LimitedPublicPreview" AdvisorStatusPrivatePreview AdvisorStatus = "PrivatePreview" AdvisorStatusPublicPreview AdvisorStatus = "PublicPreview" )
func PossibleAdvisorStatusValues ¶
func PossibleAdvisorStatusValues() []AdvisorStatus
PossibleAdvisorStatusValues returns the possible values for the AdvisorStatus const type.
type AgentClient ¶ added in v0.3.0
type AgentClient struct {
// contains filtered or unexported fields
}
AgentClient contains the methods for the SQLAgent group. Don't use this type directly, use NewAgentClient() instead.
func NewAgentClient ¶ added in v0.3.0
func NewAgentClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AgentClient, error)
NewAgentClient creates a new instance of AgentClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*AgentClient) CreateOrUpdate ¶ added in v0.3.0
func (client *AgentClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters AgentConfiguration, options *AgentClientCreateOrUpdateOptions) (AgentClientCreateOrUpdateResponse, error)
CreateOrUpdate - Puts new sql agent configuration to instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - AgentClientCreateOrUpdateOptions contains the optional parameters for the AgentClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SqlAgentConfigurationPut.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAgentClient().CreateOrUpdate(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", armsql.AgentConfiguration{ Properties: &armsql.AgentConfigurationProperties{ State: to.Ptr(armsql.SQLAgentConfigurationPropertiesStateEnabled), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.AgentConfiguration = armsql.AgentConfiguration{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/managedInstances/sqlAgent"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/sqlAgent/current"), // Properties: &armsql.AgentConfigurationProperties{ // State: to.Ptr(armsql.SQLAgentConfigurationPropertiesStateEnabled), // }, // } }
Output:
func (*AgentClient) Get ¶ added in v0.3.0
func (client *AgentClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, options *AgentClientGetOptions) (AgentClientGetResponse, error)
Get - Gets current instance sql agent configuration. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - AgentClientGetOptions contains the optional parameters for the AgentClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SqlAgentConfigurationGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewAgentClient().Get(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.AgentConfiguration = armsql.AgentConfiguration{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/managedInstances/sqlAgent"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/sqlAgent/current"), // Properties: &armsql.AgentConfigurationProperties{ // State: to.Ptr(armsql.SQLAgentConfigurationPropertiesStateEnabled), // }, // } }
Output:
type AgentClientCreateOrUpdateOptions ¶ added in v0.3.0
type AgentClientCreateOrUpdateOptions struct { }
AgentClientCreateOrUpdateOptions contains the optional parameters for the AgentClient.CreateOrUpdate method.
type AgentClientCreateOrUpdateResponse ¶ added in v0.3.0
type AgentClientCreateOrUpdateResponse struct { // A recoverable managed database resource. AgentConfiguration }
AgentClientCreateOrUpdateResponse contains the response from method AgentClient.CreateOrUpdate.
type AgentClientGetOptions ¶ added in v0.3.0
type AgentClientGetOptions struct { }
AgentClientGetOptions contains the optional parameters for the AgentClient.Get method.
type AgentClientGetResponse ¶ added in v0.3.0
type AgentClientGetResponse struct { // A recoverable managed database resource. AgentConfiguration }
AgentClientGetResponse contains the response from method AgentClient.Get.
type AgentConfiguration ¶ added in v0.3.0
type AgentConfiguration struct { // Resource properties. Properties *AgentConfigurationProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
AgentConfiguration - A recoverable managed database resource.
func (AgentConfiguration) MarshalJSON ¶ added in v1.1.0
func (a AgentConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AgentConfiguration.
func (*AgentConfiguration) UnmarshalJSON ¶ added in v1.1.0
func (a *AgentConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AgentConfiguration.
type AgentConfigurationProperties ¶ added in v0.3.0
type AgentConfigurationProperties struct { // The state of Sql Agent. State *SQLAgentConfigurationPropertiesState }
AgentConfigurationProperties - Sql agent configuration properties.
func (AgentConfigurationProperties) MarshalJSON ¶ added in v1.1.0
func (a AgentConfigurationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AgentConfigurationProperties.
func (*AgentConfigurationProperties) UnmarshalJSON ¶ added in v1.1.0
func (a *AgentConfigurationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AgentConfigurationProperties.
type AggregationFunctionType ¶
type AggregationFunctionType string
const ( AggregationFunctionTypeAvg AggregationFunctionType = "avg" AggregationFunctionTypeMax AggregationFunctionType = "max" AggregationFunctionTypeMin AggregationFunctionType = "min" AggregationFunctionTypeStdev AggregationFunctionType = "stdev" AggregationFunctionTypeSum AggregationFunctionType = "sum" )
func PossibleAggregationFunctionTypeValues ¶
func PossibleAggregationFunctionTypeValues() []AggregationFunctionType
PossibleAggregationFunctionTypeValues returns the possible values for the AggregationFunctionType const type.
type AuthenticationName ¶
type AuthenticationName string
const (
AuthenticationNameDefault AuthenticationName = "Default"
)
func PossibleAuthenticationNameValues ¶
func PossibleAuthenticationNameValues() []AuthenticationName
PossibleAuthenticationNameValues returns the possible values for the AuthenticationName const type.
type AutoExecuteStatus ¶
type AutoExecuteStatus string
AutoExecuteStatus - Gets the auto-execute status (whether to let the system execute the recommendations) of this advisor. Possible values are 'Enabled' and 'Disabled'
const ( AutoExecuteStatusDefault AutoExecuteStatus = "Default" AutoExecuteStatusDisabled AutoExecuteStatus = "Disabled" AutoExecuteStatusEnabled AutoExecuteStatus = "Enabled" )
func PossibleAutoExecuteStatusValues ¶
func PossibleAutoExecuteStatusValues() []AutoExecuteStatus
PossibleAutoExecuteStatusValues returns the possible values for the AutoExecuteStatus const type.
type AutoExecuteStatusInheritedFrom ¶
type AutoExecuteStatusInheritedFrom string
AutoExecuteStatusInheritedFrom - Gets the resource from which current value of auto-execute status is inherited. Auto-execute status can be set on (and inherited from) different levels in the resource hierarchy. Possible values are 'Subscription', 'Server', 'ElasticPool', 'Database' and 'Default' (when status is not explicitly set on any level).
const ( AutoExecuteStatusInheritedFromDatabase AutoExecuteStatusInheritedFrom = "Database" AutoExecuteStatusInheritedFromDefault AutoExecuteStatusInheritedFrom = "Default" AutoExecuteStatusInheritedFromElasticPool AutoExecuteStatusInheritedFrom = "ElasticPool" AutoExecuteStatusInheritedFromServer AutoExecuteStatusInheritedFrom = "Server" AutoExecuteStatusInheritedFromSubscription AutoExecuteStatusInheritedFrom = "Subscription" )
func PossibleAutoExecuteStatusInheritedFromValues ¶
func PossibleAutoExecuteStatusInheritedFromValues() []AutoExecuteStatusInheritedFrom
PossibleAutoExecuteStatusInheritedFromValues returns the possible values for the AutoExecuteStatusInheritedFrom const type.
type AutoPauseDelayTimeRange ¶
type AutoPauseDelayTimeRange struct { // READ-ONLY; Default value is no value is provided Default *int32 // READ-ONLY; Value that is used to not pause (infinite delay before pause) DoNotPauseValue *int32 // READ-ONLY; Maximum value MaxValue *int32 // READ-ONLY; Minimum value MinValue *int32 // READ-ONLY; Step value for discrete values between the minimum value and the maximum value. StepSize *int32 // READ-ONLY; Unit of time that delay is expressed in Unit *PauseDelayTimeUnit }
AutoPauseDelayTimeRange - Supported auto pause delay time range
func (AutoPauseDelayTimeRange) MarshalJSON ¶ added in v1.1.0
func (a AutoPauseDelayTimeRange) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AutoPauseDelayTimeRange.
func (*AutoPauseDelayTimeRange) UnmarshalJSON ¶ added in v1.1.0
func (a *AutoPauseDelayTimeRange) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AutoPauseDelayTimeRange.
type AutomaticTuningDisabledReason ¶
type AutomaticTuningDisabledReason string
AutomaticTuningDisabledReason - Reason description if desired and actual state are different.
const ( AutomaticTuningDisabledReasonAutoConfigured AutomaticTuningDisabledReason = "AutoConfigured" AutomaticTuningDisabledReasonDefault AutomaticTuningDisabledReason = "Default" AutomaticTuningDisabledReasonDisabled AutomaticTuningDisabledReason = "Disabled" AutomaticTuningDisabledReasonInheritedFromServer AutomaticTuningDisabledReason = "InheritedFromServer" AutomaticTuningDisabledReasonNotSupported AutomaticTuningDisabledReason = "NotSupported" AutomaticTuningDisabledReasonQueryStoreOff AutomaticTuningDisabledReason = "QueryStoreOff" AutomaticTuningDisabledReasonQueryStoreReadOnly AutomaticTuningDisabledReason = "QueryStoreReadOnly" )
func PossibleAutomaticTuningDisabledReasonValues ¶
func PossibleAutomaticTuningDisabledReasonValues() []AutomaticTuningDisabledReason
PossibleAutomaticTuningDisabledReasonValues returns the possible values for the AutomaticTuningDisabledReason const type.
type AutomaticTuningMode ¶
type AutomaticTuningMode string
AutomaticTuningMode - Automatic tuning desired state.
const ( AutomaticTuningModeAuto AutomaticTuningMode = "Auto" AutomaticTuningModeCustom AutomaticTuningMode = "Custom" AutomaticTuningModeInherit AutomaticTuningMode = "Inherit" AutomaticTuningModeUnspecified AutomaticTuningMode = "Unspecified" )
func PossibleAutomaticTuningModeValues ¶
func PossibleAutomaticTuningModeValues() []AutomaticTuningMode
PossibleAutomaticTuningModeValues returns the possible values for the AutomaticTuningMode const type.
type AutomaticTuningOptionModeActual ¶
type AutomaticTuningOptionModeActual string
AutomaticTuningOptionModeActual - Automatic tuning option actual state.
const ( AutomaticTuningOptionModeActualOff AutomaticTuningOptionModeActual = "Off" AutomaticTuningOptionModeActualOn AutomaticTuningOptionModeActual = "On" )
func PossibleAutomaticTuningOptionModeActualValues ¶
func PossibleAutomaticTuningOptionModeActualValues() []AutomaticTuningOptionModeActual
PossibleAutomaticTuningOptionModeActualValues returns the possible values for the AutomaticTuningOptionModeActual const type.
type AutomaticTuningOptionModeDesired ¶
type AutomaticTuningOptionModeDesired string
AutomaticTuningOptionModeDesired - Automatic tuning option desired state.
const ( AutomaticTuningOptionModeDesiredDefault AutomaticTuningOptionModeDesired = "Default" AutomaticTuningOptionModeDesiredOff AutomaticTuningOptionModeDesired = "Off" AutomaticTuningOptionModeDesiredOn AutomaticTuningOptionModeDesired = "On" )
func PossibleAutomaticTuningOptionModeDesiredValues ¶
func PossibleAutomaticTuningOptionModeDesiredValues() []AutomaticTuningOptionModeDesired
PossibleAutomaticTuningOptionModeDesiredValues returns the possible values for the AutomaticTuningOptionModeDesired const type.
type AutomaticTuningOptions ¶
type AutomaticTuningOptions struct { // Automatic tuning option desired state. DesiredState *AutomaticTuningOptionModeDesired // READ-ONLY; Automatic tuning option actual state. ActualState *AutomaticTuningOptionModeActual // READ-ONLY; Reason code if desired and actual state are different. ReasonCode *int32 // READ-ONLY; Reason description if desired and actual state are different. ReasonDesc *AutomaticTuningDisabledReason }
AutomaticTuningOptions - Automatic tuning properties for individual advisors.
func (AutomaticTuningOptions) MarshalJSON ¶ added in v1.1.0
func (a AutomaticTuningOptions) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AutomaticTuningOptions.
func (*AutomaticTuningOptions) UnmarshalJSON ¶ added in v1.1.0
func (a *AutomaticTuningOptions) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AutomaticTuningOptions.
type AutomaticTuningServerMode ¶
type AutomaticTuningServerMode string
AutomaticTuningServerMode - Automatic tuning desired state.
const ( AutomaticTuningServerModeAuto AutomaticTuningServerMode = "Auto" AutomaticTuningServerModeCustom AutomaticTuningServerMode = "Custom" AutomaticTuningServerModeUnspecified AutomaticTuningServerMode = "Unspecified" )
func PossibleAutomaticTuningServerModeValues ¶
func PossibleAutomaticTuningServerModeValues() []AutomaticTuningServerMode
PossibleAutomaticTuningServerModeValues returns the possible values for the AutomaticTuningServerMode const type.
type AutomaticTuningServerOptions ¶
type AutomaticTuningServerOptions struct { // Automatic tuning option desired state. DesiredState *AutomaticTuningOptionModeDesired // READ-ONLY; Automatic tuning option actual state. ActualState *AutomaticTuningOptionModeActual // READ-ONLY; Reason code if desired and actual state are different. ReasonCode *int32 // READ-ONLY; Reason description if desired and actual state are different. ReasonDesc *AutomaticTuningServerReason }
AutomaticTuningServerOptions - Automatic tuning properties for individual advisors.
func (AutomaticTuningServerOptions) MarshalJSON ¶ added in v1.1.0
func (a AutomaticTuningServerOptions) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AutomaticTuningServerOptions.
func (*AutomaticTuningServerOptions) UnmarshalJSON ¶ added in v1.1.0
func (a *AutomaticTuningServerOptions) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AutomaticTuningServerOptions.
type AutomaticTuningServerProperties ¶
type AutomaticTuningServerProperties struct { // Automatic tuning desired state. DesiredState *AutomaticTuningServerMode // Automatic tuning options definition. Options map[string]*AutomaticTuningServerOptions // READ-ONLY; Automatic tuning actual state. ActualState *AutomaticTuningServerMode }
AutomaticTuningServerProperties - Server-level Automatic Tuning properties.
func (AutomaticTuningServerProperties) MarshalJSON ¶
func (a AutomaticTuningServerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AutomaticTuningServerProperties.
func (*AutomaticTuningServerProperties) UnmarshalJSON ¶ added in v1.1.0
func (a *AutomaticTuningServerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AutomaticTuningServerProperties.
type AutomaticTuningServerReason ¶
type AutomaticTuningServerReason string
AutomaticTuningServerReason - Reason description if desired and actual state are different.
const ( AutomaticTuningServerReasonAutoConfigured AutomaticTuningServerReason = "AutoConfigured" AutomaticTuningServerReasonDefault AutomaticTuningServerReason = "Default" AutomaticTuningServerReasonDisabled AutomaticTuningServerReason = "Disabled" )
func PossibleAutomaticTuningServerReasonValues ¶
func PossibleAutomaticTuningServerReasonValues() []AutomaticTuningServerReason
PossibleAutomaticTuningServerReasonValues returns the possible values for the AutomaticTuningServerReason const type.
type AzureADOnlyAuthListResult ¶
type AzureADOnlyAuthListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ServerAzureADOnlyAuthentication }
AzureADOnlyAuthListResult - A list of active directory only authentications.
func (AzureADOnlyAuthListResult) MarshalJSON ¶
func (a AzureADOnlyAuthListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureADOnlyAuthListResult.
func (*AzureADOnlyAuthListResult) UnmarshalJSON ¶ added in v1.1.0
func (a *AzureADOnlyAuthListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureADOnlyAuthListResult.
type AzureADOnlyAuthProperties ¶
type AzureADOnlyAuthProperties struct { // REQUIRED; Azure Active Directory only Authentication enabled. AzureADOnlyAuthentication *bool }
AzureADOnlyAuthProperties - Properties of a active directory only authentication.
func (AzureADOnlyAuthProperties) MarshalJSON ¶ added in v1.1.0
func (a AzureADOnlyAuthProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureADOnlyAuthProperties.
func (*AzureADOnlyAuthProperties) UnmarshalJSON ¶ added in v1.1.0
func (a *AzureADOnlyAuthProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AzureADOnlyAuthProperties.
type BackupShortTermRetentionPoliciesClient ¶
type BackupShortTermRetentionPoliciesClient struct {
// contains filtered or unexported fields
}
BackupShortTermRetentionPoliciesClient contains the methods for the BackupShortTermRetentionPolicies group. Don't use this type directly, use NewBackupShortTermRetentionPoliciesClient() instead.
func NewBackupShortTermRetentionPoliciesClient ¶
func NewBackupShortTermRetentionPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BackupShortTermRetentionPoliciesClient, error)
NewBackupShortTermRetentionPoliciesClient creates a new instance of BackupShortTermRetentionPoliciesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*BackupShortTermRetentionPoliciesClient) BeginCreateOrUpdate ¶
func (client *BackupShortTermRetentionPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, policyName ShortTermRetentionPolicyName, parameters BackupShortTermRetentionPolicy, options *BackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[BackupShortTermRetentionPoliciesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Updates a database's short term retention policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-02-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- policyName - The policy name. Should always be "default".
- parameters - The short term retention policy info.
- options - BackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the BackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpdateShortTermRetentionPolicy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewBackupShortTermRetentionPoliciesClient().BeginCreateOrUpdate(ctx, "resourceGroup", "testsvr", "testdb", armsql.ShortTermRetentionPolicyNameDefault, armsql.BackupShortTermRetentionPolicy{ Properties: &armsql.BackupShortTermRetentionPolicyProperties{ DiffBackupIntervalInHours: to.Ptr(armsql.DiffBackupIntervalInHours(24)), RetentionDays: to.Ptr[int32](7), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BackupShortTermRetentionPolicy = armsql.BackupShortTermRetentionPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/backupShortTermRetentionPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testsvr/databases/testdb/backupShortTermRetentionPolicies/default"), // Properties: &armsql.BackupShortTermRetentionPolicyProperties{ // DiffBackupIntervalInHours: to.Ptr(armsql.DiffBackupIntervalInHours(24)), // RetentionDays: to.Ptr[int32](7), // }, // } }
Output:
func (*BackupShortTermRetentionPoliciesClient) BeginUpdate ¶
func (client *BackupShortTermRetentionPoliciesClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, policyName ShortTermRetentionPolicyName, parameters BackupShortTermRetentionPolicy, options *BackupShortTermRetentionPoliciesClientBeginUpdateOptions) (*runtime.Poller[BackupShortTermRetentionPoliciesClientUpdateResponse], error)
BeginUpdate - Updates a database's short term retention policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-02-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- policyName - The policy name. Should always be "default".
- parameters - The short term retention policy info.
- options - BackupShortTermRetentionPoliciesClientBeginUpdateOptions contains the optional parameters for the BackupShortTermRetentionPoliciesClient.BeginUpdate method.
func (*BackupShortTermRetentionPoliciesClient) Get ¶
func (client *BackupShortTermRetentionPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, policyName ShortTermRetentionPolicyName, options *BackupShortTermRetentionPoliciesClientGetOptions) (BackupShortTermRetentionPoliciesClientGetResponse, error)
Get - Gets a database's short term retention policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-02-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- policyName - The policy name. Should always be "default".
- options - BackupShortTermRetentionPoliciesClientGetOptions contains the optional parameters for the BackupShortTermRetentionPoliciesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetShortTermRetentionPolicy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewBackupShortTermRetentionPoliciesClient().Get(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", armsql.ShortTermRetentionPolicyNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.BackupShortTermRetentionPolicy = armsql.BackupShortTermRetentionPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/backupShortTermRetentionPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/backupShortTermRetentionPolicies/default"), // Properties: &armsql.BackupShortTermRetentionPolicyProperties{ // DiffBackupIntervalInHours: to.Ptr(armsql.DiffBackupIntervalInHours(24)), // RetentionDays: to.Ptr[int32](7), // }, // } }
Output:
func (*BackupShortTermRetentionPoliciesClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *BackupShortTermRetentionPoliciesClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *BackupShortTermRetentionPoliciesClientListByDatabaseOptions) *runtime.Pager[BackupShortTermRetentionPoliciesClientListByDatabaseResponse]
NewListByDatabasePager - Gets a database's short term retention policy.
Generated from API version 2021-02-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - BackupShortTermRetentionPoliciesClientListByDatabaseOptions contains the optional parameters for the BackupShortTermRetentionPoliciesClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListShortTermRetentionPoliciesByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewBackupShortTermRetentionPoliciesClient().NewListByDatabasePager("Default-SQL-SouthEastAsia", "testsvr", "testdb", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.BackupShortTermRetentionPolicyListResult = armsql.BackupShortTermRetentionPolicyListResult{ // Value: []*armsql.BackupShortTermRetentionPolicy{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/backupShortTermRetentionPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/backupShortTermRetentionPolicies/default"), // Properties: &armsql.BackupShortTermRetentionPolicyProperties{ // DiffBackupIntervalInHours: to.Ptr(armsql.DiffBackupIntervalInHours(24)), // RetentionDays: to.Ptr[int32](7), // }, // }}, // } } }
Output:
type BackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type BackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
BackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the BackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate method.
type BackupShortTermRetentionPoliciesClientBeginUpdateOptions ¶ added in v0.3.0
type BackupShortTermRetentionPoliciesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
BackupShortTermRetentionPoliciesClientBeginUpdateOptions contains the optional parameters for the BackupShortTermRetentionPoliciesClient.BeginUpdate method.
type BackupShortTermRetentionPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type BackupShortTermRetentionPoliciesClientCreateOrUpdateResponse struct { // A short term retention policy. BackupShortTermRetentionPolicy }
BackupShortTermRetentionPoliciesClientCreateOrUpdateResponse contains the response from method BackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate.
type BackupShortTermRetentionPoliciesClientGetOptions ¶ added in v0.3.0
type BackupShortTermRetentionPoliciesClientGetOptions struct { }
BackupShortTermRetentionPoliciesClientGetOptions contains the optional parameters for the BackupShortTermRetentionPoliciesClient.Get method.
type BackupShortTermRetentionPoliciesClientGetResponse ¶ added in v0.3.0
type BackupShortTermRetentionPoliciesClientGetResponse struct { // A short term retention policy. BackupShortTermRetentionPolicy }
BackupShortTermRetentionPoliciesClientGetResponse contains the response from method BackupShortTermRetentionPoliciesClient.Get.
type BackupShortTermRetentionPoliciesClientListByDatabaseOptions ¶ added in v0.3.0
type BackupShortTermRetentionPoliciesClientListByDatabaseOptions struct { }
BackupShortTermRetentionPoliciesClientListByDatabaseOptions contains the optional parameters for the BackupShortTermRetentionPoliciesClient.NewListByDatabasePager method.
type BackupShortTermRetentionPoliciesClientListByDatabaseResponse ¶ added in v0.3.0
type BackupShortTermRetentionPoliciesClientListByDatabaseResponse struct { // A list of short term retention policies. BackupShortTermRetentionPolicyListResult }
BackupShortTermRetentionPoliciesClientListByDatabaseResponse contains the response from method BackupShortTermRetentionPoliciesClient.NewListByDatabasePager.
type BackupShortTermRetentionPoliciesClientUpdateResponse ¶ added in v0.3.0
type BackupShortTermRetentionPoliciesClientUpdateResponse struct { // A short term retention policy. BackupShortTermRetentionPolicy }
BackupShortTermRetentionPoliciesClientUpdateResponse contains the response from method BackupShortTermRetentionPoliciesClient.BeginUpdate.
type BackupShortTermRetentionPolicy ¶
type BackupShortTermRetentionPolicy struct { // Resource properties. Properties *BackupShortTermRetentionPolicyProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
BackupShortTermRetentionPolicy - A short term retention policy.
func (BackupShortTermRetentionPolicy) MarshalJSON ¶
func (b BackupShortTermRetentionPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BackupShortTermRetentionPolicy.
func (*BackupShortTermRetentionPolicy) UnmarshalJSON ¶ added in v1.1.0
func (b *BackupShortTermRetentionPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BackupShortTermRetentionPolicy.
type BackupShortTermRetentionPolicyListResult ¶
type BackupShortTermRetentionPolicyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*BackupShortTermRetentionPolicy }
BackupShortTermRetentionPolicyListResult - A list of short term retention policies.
func (BackupShortTermRetentionPolicyListResult) MarshalJSON ¶
func (b BackupShortTermRetentionPolicyListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BackupShortTermRetentionPolicyListResult.
func (*BackupShortTermRetentionPolicyListResult) UnmarshalJSON ¶ added in v1.1.0
func (b *BackupShortTermRetentionPolicyListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BackupShortTermRetentionPolicyListResult.
type BackupShortTermRetentionPolicyProperties ¶
type BackupShortTermRetentionPolicyProperties struct { // The differential backup interval in hours. This is how many interval hours between each differential backup will be supported. // This is only applicable to live databases but not dropped databases. DiffBackupIntervalInHours *DiffBackupIntervalInHours // The backup retention period in days. This is how many days Point-in-Time Restore will be supported. RetentionDays *int32 }
BackupShortTermRetentionPolicyProperties - Properties of a short term retention policy
func (BackupShortTermRetentionPolicyProperties) MarshalJSON ¶ added in v1.1.0
func (b BackupShortTermRetentionPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BackupShortTermRetentionPolicyProperties.
func (*BackupShortTermRetentionPolicyProperties) UnmarshalJSON ¶ added in v1.1.0
func (b *BackupShortTermRetentionPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BackupShortTermRetentionPolicyProperties.
type BackupStorageRedundancy ¶
type BackupStorageRedundancy string
BackupStorageRedundancy - The storage account type used to store backups for this database.
const ( BackupStorageRedundancyGeo BackupStorageRedundancy = "Geo" BackupStorageRedundancyGeoZone BackupStorageRedundancy = "GeoZone" BackupStorageRedundancyLocal BackupStorageRedundancy = "Local" BackupStorageRedundancyZone BackupStorageRedundancy = "Zone" )
func PossibleBackupStorageRedundancyValues ¶
func PossibleBackupStorageRedundancyValues() []BackupStorageRedundancy
PossibleBackupStorageRedundancyValues returns the possible values for the BackupStorageRedundancy const type.
type BaseLongTermRetentionPolicyProperties ¶
type BaseLongTermRetentionPolicyProperties struct { // The monthly retention policy for an LTR backup in an ISO 8601 format. MonthlyRetention *string // The week of year to take the yearly backup in an ISO 8601 format. WeekOfYear *int32 // The weekly retention policy for an LTR backup in an ISO 8601 format. WeeklyRetention *string // The yearly retention policy for an LTR backup in an ISO 8601 format. YearlyRetention *string }
BaseLongTermRetentionPolicyProperties - Properties of a long term retention policy
func (BaseLongTermRetentionPolicyProperties) MarshalJSON ¶ added in v1.1.0
func (b BaseLongTermRetentionPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BaseLongTermRetentionPolicyProperties.
func (*BaseLongTermRetentionPolicyProperties) UnmarshalJSON ¶ added in v1.1.0
func (b *BaseLongTermRetentionPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BaseLongTermRetentionPolicyProperties.
type BlobAuditingPolicyState ¶
type BlobAuditingPolicyState string
BlobAuditingPolicyState - Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.
const ( BlobAuditingPolicyStateDisabled BlobAuditingPolicyState = "Disabled" BlobAuditingPolicyStateEnabled BlobAuditingPolicyState = "Enabled" )
func PossibleBlobAuditingPolicyStateValues ¶
func PossibleBlobAuditingPolicyStateValues() []BlobAuditingPolicyState
PossibleBlobAuditingPolicyStateValues returns the possible values for the BlobAuditingPolicyState const type.
type CapabilitiesClient ¶
type CapabilitiesClient struct {
// contains filtered or unexported fields
}
CapabilitiesClient contains the methods for the Capabilities group. Don't use this type directly, use NewCapabilitiesClient() instead.
func NewCapabilitiesClient ¶
func NewCapabilitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CapabilitiesClient, error)
NewCapabilitiesClient creates a new instance of CapabilitiesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*CapabilitiesClient) ListByLocation ¶
func (client *CapabilitiesClient) ListByLocation(ctx context.Context, locationName string, options *CapabilitiesClientListByLocationOptions) (CapabilitiesClientListByLocationResponse, error)
ListByLocation - Gets the subscription capabilities available for the specified location. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- locationName - The location name whose capabilities are retrieved.
- options - CapabilitiesClientListByLocationOptions contains the optional parameters for the CapabilitiesClient.ListByLocation method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/LocationCapabilityListByLocation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewCapabilitiesClient().ListByLocation(ctx, "eastus", &armsql.CapabilitiesClientListByLocationOptions{Include: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.LocationCapabilities = armsql.LocationCapabilities{ // Name: to.Ptr("East US"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedManagedInstanceVersions: []*armsql.ManagedInstanceVersionCapability{ // { // Name: to.Ptr("12.0"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // SupportedEditions: []*armsql.ManagedInstanceEditionCapability{ // { // Name: to.Ptr("GeneralPurpose"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // SupportedFamilies: []*armsql.ManagedInstanceFamilyCapability{ // { // Name: to.Ptr("Gen4"), // SKU: to.Ptr("GP_Gen4"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedVcoresValues: []*armsql.ManagedInstanceVcoresCapability{ // { // Name: to.Ptr("8"), // IncludedMaxSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](262144), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // InstancePoolSupported: to.Ptr(true), // StandaloneSupported: to.Ptr(true), // Status: to.Ptr(armsql.CapabilityStatusDefault), // SupportedMaintenanceConfigurations: []*armsql.ManagedInstanceMaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("SQL_EastUS_MI_1"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }, // { // Name: to.Ptr("SQL_EastUS_MI_2"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedStorageSizes: []*armsql.MaxSizeRangeCapability{ // { // MaxValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](8), // Unit: to.Ptr(armsql.MaxSizeUnitTerabytes), // }, // MinValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](32), // Unit: to.Ptr(armsql.MaxSizeUnitGigabytes), // }, // ScaleSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](32), // Unit: to.Ptr(armsql.MaxSizeUnitGigabytes), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // Value: to.Ptr[int32](8), // }, // { // Name: to.Ptr("16"), // IncludedMaxSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](262144), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // InstancePoolSupported: to.Ptr(true), // StandaloneSupported: to.Ptr(true), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedMaintenanceConfigurations: []*armsql.ManagedInstanceMaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("SQL_EastUS_MI_1"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }, // { // Name: to.Ptr("SQL_EastUS_MI_2"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedStorageSizes: []*armsql.MaxSizeRangeCapability{ // { // MaxValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](8), // Unit: to.Ptr(armsql.MaxSizeUnitTerabytes), // }, // MinValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](32), // Unit: to.Ptr(armsql.MaxSizeUnitGigabytes), // }, // ScaleSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](32), // Unit: to.Ptr(armsql.MaxSizeUnitGigabytes), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // Value: to.Ptr[int32](16), // }, // { // Name: to.Ptr("24"), // IncludedMaxSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](262144), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // InstancePoolSupported: to.Ptr(true), // StandaloneSupported: to.Ptr(true), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedMaintenanceConfigurations: []*armsql.ManagedInstanceMaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("SQL_EastUS_MI_1"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }, // { // Name: to.Ptr("SQL_EastUS_MI_2"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedStorageSizes: []*armsql.MaxSizeRangeCapability{ // { // MaxValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](8), // Unit: to.Ptr(armsql.MaxSizeUnitTerabytes), // }, // MinValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](32), // Unit: to.Ptr(armsql.MaxSizeUnitGigabytes), // }, // ScaleSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](32), // Unit: to.Ptr(armsql.MaxSizeUnitGigabytes), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // Value: to.Ptr[int32](24), // }}, // }, // { // Name: to.Ptr("Gen5"), // SKU: to.Ptr("GP_Gen5"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedVcoresValues: []*armsql.ManagedInstanceVcoresCapability{ // { // Name: to.Ptr("8"), // IncludedMaxSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](262144), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // InstancePoolSupported: to.Ptr(true), // StandaloneSupported: to.Ptr(true), // Status: to.Ptr(armsql.CapabilityStatusDefault), // SupportedMaintenanceConfigurations: []*armsql.ManagedInstanceMaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("SQL_EastUS_MI_1"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }, // { // Name: to.Ptr("SQL_EastUS_MI_2"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedStorageSizes: []*armsql.MaxSizeRangeCapability{ // { // MaxValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](8), // Unit: to.Ptr(armsql.MaxSizeUnitTerabytes), // }, // MinValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](32), // Unit: to.Ptr(armsql.MaxSizeUnitGigabytes), // }, // ScaleSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](32), // Unit: to.Ptr(armsql.MaxSizeUnitGigabytes), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // Value: to.Ptr[int32](8), // }, // { // Name: to.Ptr("16"), // IncludedMaxSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](262144), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // InstancePoolSupported: to.Ptr(true), // StandaloneSupported: to.Ptr(true), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedMaintenanceConfigurations: []*armsql.ManagedInstanceMaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("SQL_EastUS_MI_1"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }, // { // Name: to.Ptr("SQL_EastUS_MI_2"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedStorageSizes: []*armsql.MaxSizeRangeCapability{ // { // MaxValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](8), // Unit: to.Ptr(armsql.MaxSizeUnitTerabytes), // }, // MinValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](32), // Unit: to.Ptr(armsql.MaxSizeUnitGigabytes), // }, // ScaleSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](32), // Unit: to.Ptr(armsql.MaxSizeUnitGigabytes), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // Value: to.Ptr[int32](16), // }, // { // Name: to.Ptr("24"), // IncludedMaxSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](262144), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // InstancePoolSupported: to.Ptr(true), // StandaloneSupported: to.Ptr(true), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedMaintenanceConfigurations: []*armsql.ManagedInstanceMaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("SQL_EastUS_MI_1"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }, // { // Name: to.Ptr("SQL_EastUS_MI_2"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedStorageSizes: []*armsql.MaxSizeRangeCapability{ // { // MaxValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](8), // Unit: to.Ptr(armsql.MaxSizeUnitTerabytes), // }, // MinValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](32), // Unit: to.Ptr(armsql.MaxSizeUnitGigabytes), // }, // ScaleSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](32), // Unit: to.Ptr(armsql.MaxSizeUnitGigabytes), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // Value: to.Ptr[int32](24), // }}, // }}, // SupportedStorageCapabilities: []*armsql.StorageCapability{ // { // Status: to.Ptr(armsql.CapabilityStatusDefault), // StorageAccountType: to.Ptr(armsql.StorageCapabilityStorageAccountTypeGRS), // }, // { // Status: to.Ptr(armsql.CapabilityStatusAvailable), // StorageAccountType: to.Ptr(armsql.StorageCapabilityStorageAccountTypeLRS), // }, // { // Reason: to.Ptr("ZRS is available in multi-az regions"), // Status: to.Ptr(armsql.CapabilityStatusVisible), // StorageAccountType: to.Ptr(armsql.StorageCapabilityStorageAccountTypeZRS), // }}, // }, // { // Name: to.Ptr("Hyperscale"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedFamilies: []*armsql.ManagedInstanceFamilyCapability{ // { // Name: to.Ptr("Gen4"), // SKU: to.Ptr("HS_Gen4"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedVcoresValues: []*armsql.ManagedInstanceVcoresCapability{ // { // Name: to.Ptr("4"), // InstancePoolSupported: to.Ptr(true), // StandaloneSupported: to.Ptr(true), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedMaintenanceConfigurations: []*armsql.ManagedInstanceMaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }}, // Value: to.Ptr[int32](4), // }, // { // Name: to.Ptr("8"), // InstancePoolSupported: to.Ptr(true), // StandaloneSupported: to.Ptr(true), // Status: to.Ptr(armsql.CapabilityStatusDefault), // SupportedMaintenanceConfigurations: []*armsql.ManagedInstanceMaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }}, // Value: to.Ptr[int32](8), // }, // { // Name: to.Ptr("16"), // InstancePoolSupported: to.Ptr(true), // StandaloneSupported: to.Ptr(true), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedMaintenanceConfigurations: []*armsql.ManagedInstanceMaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }}, // Value: to.Ptr[int32](16), // }, // { // Name: to.Ptr("24"), // InstancePoolSupported: to.Ptr(true), // StandaloneSupported: to.Ptr(true), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedMaintenanceConfigurations: []*armsql.ManagedInstanceMaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }}, // Value: to.Ptr[int32](24), // }}, // }, // { // Name: to.Ptr("Gen5"), // SKU: to.Ptr("HS_Gen5"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedVcoresValues: []*armsql.ManagedInstanceVcoresCapability{ // { // Name: to.Ptr("4"), // InstancePoolSupported: to.Ptr(true), // StandaloneSupported: to.Ptr(true), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedMaintenanceConfigurations: []*armsql.ManagedInstanceMaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }}, // Value: to.Ptr[int32](4), // }, // { // Name: to.Ptr("8"), // InstancePoolSupported: to.Ptr(true), // StandaloneSupported: to.Ptr(true), // Status: to.Ptr(armsql.CapabilityStatusDefault), // SupportedMaintenanceConfigurations: []*armsql.ManagedInstanceMaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }}, // Value: to.Ptr[int32](8), // }, // { // Name: to.Ptr("16"), // InstancePoolSupported: to.Ptr(true), // StandaloneSupported: to.Ptr(true), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedMaintenanceConfigurations: []*armsql.ManagedInstanceMaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }}, // Value: to.Ptr[int32](16), // }, // { // Name: to.Ptr("24"), // InstancePoolSupported: to.Ptr(true), // StandaloneSupported: to.Ptr(true), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedMaintenanceConfigurations: []*armsql.ManagedInstanceMaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }}, // Value: to.Ptr[int32](24), // }, // { // Name: to.Ptr("32"), // InstancePoolSupported: to.Ptr(true), // StandaloneSupported: to.Ptr(true), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedMaintenanceConfigurations: []*armsql.ManagedInstanceMaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }}, // Value: to.Ptr[int32](32), // }, // { // Name: to.Ptr("40"), // InstancePoolSupported: to.Ptr(true), // StandaloneSupported: to.Ptr(true), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedMaintenanceConfigurations: []*armsql.ManagedInstanceMaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }}, // Value: to.Ptr[int32](40), // }, // { // Name: to.Ptr("48"), // InstancePoolSupported: to.Ptr(true), // StandaloneSupported: to.Ptr(true), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedMaintenanceConfigurations: []*armsql.ManagedInstanceMaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }}, // Value: to.Ptr[int32](48), // }, // { // Name: to.Ptr("64"), // InstancePoolSupported: to.Ptr(true), // StandaloneSupported: to.Ptr(true), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedMaintenanceConfigurations: []*armsql.ManagedInstanceMaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }}, // Value: to.Ptr[int32](64), // }, // { // Name: to.Ptr("80"), // InstancePoolSupported: to.Ptr(true), // StandaloneSupported: to.Ptr(true), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedMaintenanceConfigurations: []*armsql.ManagedInstanceMaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }}, // Value: to.Ptr[int32](80), // }}, // }}, // SupportedStorageCapabilities: []*armsql.StorageCapability{ // { // Status: to.Ptr(armsql.CapabilityStatusDefault), // StorageAccountType: to.Ptr(armsql.StorageCapabilityStorageAccountTypeGRS), // }, // { // Status: to.Ptr(armsql.CapabilityStatusAvailable), // StorageAccountType: to.Ptr(armsql.StorageCapabilityStorageAccountTypeLRS), // }, // { // Reason: to.Ptr("ZRS is available in multi-az regions"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // StorageAccountType: to.Ptr(armsql.StorageCapabilityStorageAccountTypeZRS), // }}, // }}, // SupportedInstancePoolEditions: []*armsql.InstancePoolEditionCapability{ // { // Name: to.Ptr("GeneralPurpose"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // SupportedFamilies: []*armsql.InstancePoolFamilyCapability{ // { // Name: to.Ptr("Gen5"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedVcoresValues: []*armsql.InstancePoolVcoresCapability{ // { // Name: to.Ptr("GP_Gen5_8"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // StorageLimit: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](8388608), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // Value: to.Ptr[int32](8), // }, // { // Name: to.Ptr("GP_Gen5_16"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // StorageLimit: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](8388608), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // Value: to.Ptr[int32](16), // }, // { // Name: to.Ptr("GP_Gen5_24"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // StorageLimit: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](8388608), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // Value: to.Ptr[int32](24), // }, // { // Name: to.Ptr("GP_Gen5_32"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // StorageLimit: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](8388608), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // Value: to.Ptr[int32](32), // }, // { // Name: to.Ptr("GP_Gen5_40"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // StorageLimit: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](8388608), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // Value: to.Ptr[int32](40), // }, // { // Name: to.Ptr("GP_Gen5_64"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // StorageLimit: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](8388608), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // Value: to.Ptr[int32](64), // }, // { // Name: to.Ptr("GP_Gen5_80"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // StorageLimit: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](8388608), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // Value: to.Ptr[int32](80), // }}, // }}, // }}, // }}, // SupportedServerVersions: []*armsql.ServerVersionCapability{ // { // Name: to.Ptr("12.0"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // SupportedEditions: []*armsql.EditionCapability{ // { // Name: to.Ptr("Hyperscale"), // ReadScale: &armsql.ReadScaleCapability{ // MaxNumberOfReplicas: to.Ptr[int32](4), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedServiceLevelObjectives: []*armsql.ServiceObjectiveCapability{ // { // Name: to.Ptr("HS_Gen4_1"), // ComputeModel: to.Ptr("Provisioned"), // ID: to.Ptr("9380cd0e-b025-4e9d-829c-c1918c1614bb"), // PerformanceLevel: &armsql.PerformanceLevelCapability{ // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // Value: to.Ptr[float64](1), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen4"), // Capacity: to.Ptr[int32](1), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("Hyperscale"), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedMaintenanceConfigurations: []*armsql.MaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // ZoneRedundant: to.Ptr(false), // }}, // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("HS_Gen4_2"), // ComputeModel: to.Ptr("Provisioned"), // ID: to.Ptr("34497c3f-24b9-4cee-968d-6e5e854670fe"), // PerformanceLevel: &armsql.PerformanceLevelCapability{ // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // Value: to.Ptr[float64](2), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen4"), // Capacity: to.Ptr[int32](2), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("Hyperscale"), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedMaintenanceConfigurations: []*armsql.MaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // ZoneRedundant: to.Ptr(false), // }}, // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("HS_Gen5_2"), // ComputeModel: to.Ptr("Provisioned"), // ID: to.Ptr("a420d2b2-ca32-4152-b1c6-dd8d4d9fd734"), // PerformanceLevel: &armsql.PerformanceLevelCapability{ // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // Value: to.Ptr[float64](2), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen5"), // Capacity: to.Ptr[int32](2), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("Hyperscale"), // }, // Status: to.Ptr(armsql.CapabilityStatusDefault), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedMaintenanceConfigurations: []*armsql.MaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // ZoneRedundant: to.Ptr(false), // }}, // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("HS_Gen4_3"), // ComputeModel: to.Ptr("Provisioned"), // ID: to.Ptr("5de845d2-2055-428c-b507-94131358cdd7"), // PerformanceLevel: &armsql.PerformanceLevelCapability{ // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // Value: to.Ptr[float64](3), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen4"), // Capacity: to.Ptr[int32](3), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("Hyperscale"), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedMaintenanceConfigurations: []*armsql.MaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // ZoneRedundant: to.Ptr(false), // }}, // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("HS_Gen4_4"), // ComputeModel: to.Ptr("Provisioned"), // ID: to.Ptr("d060b874-21f3-47b0-a9bd-a1a737cfcc6e"), // PerformanceLevel: &armsql.PerformanceLevelCapability{ // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // Value: to.Ptr[float64](4), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen4"), // Capacity: to.Ptr[int32](4), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("Hyperscale"), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedMaintenanceConfigurations: []*armsql.MaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // ZoneRedundant: to.Ptr(false), // }}, // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("HS_Gen5_4"), // ComputeModel: to.Ptr("Provisioned"), // ID: to.Ptr("60dba88b-2dfa-4123-be57-bd0dbfd92a72"), // PerformanceLevel: &armsql.PerformanceLevelCapability{ // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // Value: to.Ptr[float64](4), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen5"), // Capacity: to.Ptr[int32](4), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("Hyperscale"), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedMaintenanceConfigurations: []*armsql.MaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // ZoneRedundant: to.Ptr(false), // }}, // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("HS_Gen4_5"), // ComputeModel: to.Ptr("Provisioned"), // ID: to.Ptr("925a0916-15fb-4764-aa76-533d97f2d782"), // PerformanceLevel: &armsql.PerformanceLevelCapability{ // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // Value: to.Ptr[float64](5), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen4"), // Capacity: to.Ptr[int32](5), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("Hyperscale"), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedMaintenanceConfigurations: []*armsql.MaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // ZoneRedundant: to.Ptr(false), // }}, // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("HS_Gen4_6"), // ComputeModel: to.Ptr("Provisioned"), // ID: to.Ptr("d7aa11c2-e4c7-442a-962e-308b371f5ec1"), // PerformanceLevel: &armsql.PerformanceLevelCapability{ // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // Value: to.Ptr[float64](6), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen4"), // Capacity: to.Ptr[int32](6), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("Hyperscale"), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedMaintenanceConfigurations: []*armsql.MaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // ZoneRedundant: to.Ptr(false), // }}, // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("HS_Gen5_6"), // ComputeModel: to.Ptr("Provisioned"), // ID: to.Ptr("b9c594ec-a3fe-4bfe-808d-a595410d0a07"), // PerformanceLevel: &armsql.PerformanceLevelCapability{ // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // Value: to.Ptr[float64](6), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen5"), // Capacity: to.Ptr[int32](6), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("Hyperscale"), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedMaintenanceConfigurations: []*armsql.MaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // ZoneRedundant: to.Ptr(false), // }}, // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("HS_Gen4_7"), // ComputeModel: to.Ptr("Provisioned"), // ID: to.Ptr("d77eef57-6c00-4003-b140-822509b8736a"), // PerformanceLevel: &armsql.PerformanceLevelCapability{ // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // Value: to.Ptr[float64](7), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen4"), // Capacity: to.Ptr[int32](7), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("Hyperscale"), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedMaintenanceConfigurations: []*armsql.MaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // ZoneRedundant: to.Ptr(false), // }}, // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("HS_Gen4_8"), // ComputeModel: to.Ptr("Provisioned"), // ID: to.Ptr("694bf389-7cb2-4461-8fa2-0b06d8438315"), // PerformanceLevel: &armsql.PerformanceLevelCapability{ // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // Value: to.Ptr[float64](8), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen4"), // Capacity: to.Ptr[int32](8), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("Hyperscale"), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedMaintenanceConfigurations: []*armsql.MaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // ZoneRedundant: to.Ptr(false), // }}, // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("HS_Gen5_8"), // ComputeModel: to.Ptr("Provisioned"), // ID: to.Ptr("efdfac5f-3f8e-4500-95b1-684c07349860"), // PerformanceLevel: &armsql.PerformanceLevelCapability{ // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // Value: to.Ptr[float64](8), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen5"), // Capacity: to.Ptr[int32](8), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("Hyperscale"), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedMaintenanceConfigurations: []*armsql.MaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // ZoneRedundant: to.Ptr(false), // }}, // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("HS_Gen4_9"), // ComputeModel: to.Ptr("Provisioned"), // ID: to.Ptr("554ea52a-9ecc-4d87-bbc7-1e257705da3f"), // PerformanceLevel: &armsql.PerformanceLevelCapability{ // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // Value: to.Ptr[float64](9), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen4"), // Capacity: to.Ptr[int32](9), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("Hyperscale"), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedMaintenanceConfigurations: []*armsql.MaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // ZoneRedundant: to.Ptr(false), // }}, // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("HS_Gen4_10"), // ComputeModel: to.Ptr("Provisioned"), // ID: to.Ptr("576f3f38-b950-4eaa-b74e-33d831193441"), // PerformanceLevel: &armsql.PerformanceLevelCapability{ // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // Value: to.Ptr[float64](10), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen4"), // Capacity: to.Ptr[int32](10), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("Hyperscale"), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedMaintenanceConfigurations: []*armsql.MaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // ZoneRedundant: to.Ptr(false), // }}, // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("HS_Gen5_10"), // ComputeModel: to.Ptr("Provisioned"), // ID: to.Ptr("69697c3a-1946-4eb8-a5a4-a269168dde27"), // PerformanceLevel: &armsql.PerformanceLevelCapability{ // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // Value: to.Ptr[float64](10), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen5"), // Capacity: to.Ptr[int32](10), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("Hyperscale"), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedMaintenanceConfigurations: []*armsql.MaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // ZoneRedundant: to.Ptr(false), // }}, // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("HS_Gen5_12"), // ComputeModel: to.Ptr("Provisioned"), // ID: to.Ptr("1bee9dc8-68b4-44df-b870-8ab0e4d71e94"), // PerformanceLevel: &armsql.PerformanceLevelCapability{ // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // Value: to.Ptr[float64](12), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen5"), // Capacity: to.Ptr[int32](12), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("Hyperscale"), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedMaintenanceConfigurations: []*armsql.MaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // ZoneRedundant: to.Ptr(false), // }}, // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("HS_Gen5_14"), // ComputeModel: to.Ptr("Provisioned"), // ID: to.Ptr("07a8341d-c0b2-4000-bc7a-5b4dae2ad210"), // PerformanceLevel: &armsql.PerformanceLevelCapability{ // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // Value: to.Ptr[float64](14), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen5"), // Capacity: to.Ptr[int32](14), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("Hyperscale"), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedMaintenanceConfigurations: []*armsql.MaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // ZoneRedundant: to.Ptr(false), // }}, // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("HS_Gen4_16"), // ComputeModel: to.Ptr("Provisioned"), // ID: to.Ptr("7fc1f700-a45d-499e-901f-2a00645c54db"), // PerformanceLevel: &armsql.PerformanceLevelCapability{ // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // Value: to.Ptr[float64](16), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen4"), // Capacity: to.Ptr[int32](16), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("Hyperscale"), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedMaintenanceConfigurations: []*armsql.MaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // ZoneRedundant: to.Ptr(false), // }}, // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("HS_Gen5_16"), // ComputeModel: to.Ptr("Provisioned"), // ID: to.Ptr("6b56f70b-52e5-44ba-8cd5-4f63d224b206"), // PerformanceLevel: &armsql.PerformanceLevelCapability{ // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // Value: to.Ptr[float64](16), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen5"), // Capacity: to.Ptr[int32](16), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("Hyperscale"), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedMaintenanceConfigurations: []*armsql.MaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // ZoneRedundant: to.Ptr(false), // }}, // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("HS_Gen5_18"), // ComputeModel: to.Ptr("Provisioned"), // ID: to.Ptr("ba0029f2-3ff4-4ef6-9e65-e8f77b5dd1e2"), // PerformanceLevel: &armsql.PerformanceLevelCapability{ // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // Value: to.Ptr[float64](18), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen5"), // Capacity: to.Ptr[int32](18), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("Hyperscale"), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedMaintenanceConfigurations: []*armsql.MaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // ZoneRedundant: to.Ptr(false), // }}, // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("HS_Gen5_20"), // ComputeModel: to.Ptr("Provisioned"), // ID: to.Ptr("f1b2a082-f622-4fb8-bbef-e74deac3ec89"), // PerformanceLevel: &armsql.PerformanceLevelCapability{ // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // Value: to.Ptr[float64](20), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen5"), // Capacity: to.Ptr[int32](20), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("Hyperscale"), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedMaintenanceConfigurations: []*armsql.MaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // ZoneRedundant: to.Ptr(false), // }}, // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("HS_Gen4_24"), // ComputeModel: to.Ptr("Provisioned"), // ID: to.Ptr("f016d419-a031-4b93-ab62-7f3d2a789376"), // PerformanceLevel: &armsql.PerformanceLevelCapability{ // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // Value: to.Ptr[float64](24), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen4"), // Capacity: to.Ptr[int32](24), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("Hyperscale"), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedMaintenanceConfigurations: []*armsql.MaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // ZoneRedundant: to.Ptr(false), // }}, // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("HS_Gen5_24"), // ComputeModel: to.Ptr("Provisioned"), // ID: to.Ptr("222bc0ee-e195-4bbc-be05-3b849c3a8195"), // PerformanceLevel: &armsql.PerformanceLevelCapability{ // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // Value: to.Ptr[float64](24), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen5"), // Capacity: to.Ptr[int32](24), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("Hyperscale"), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedMaintenanceConfigurations: []*armsql.MaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // ZoneRedundant: to.Ptr(false), // }}, // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("HS_Gen5_32"), // ComputeModel: to.Ptr("Provisioned"), // ID: to.Ptr("05366cca-cc70-486e-a697-bb3fab877f75"), // PerformanceLevel: &armsql.PerformanceLevelCapability{ // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // Value: to.Ptr[float64](32), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen5"), // Capacity: to.Ptr[int32](32), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("Hyperscale"), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedMaintenanceConfigurations: []*armsql.MaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // ZoneRedundant: to.Ptr(false), // }}, // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("HS_Gen5_40"), // ComputeModel: to.Ptr("Provisioned"), // ID: to.Ptr("32542ef7-124d-4e66-8b41-9c6c0ab963c2"), // PerformanceLevel: &armsql.PerformanceLevelCapability{ // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // Value: to.Ptr[float64](40), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen5"), // Capacity: to.Ptr[int32](40), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("Hyperscale"), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedMaintenanceConfigurations: []*armsql.MaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // ZoneRedundant: to.Ptr(false), // }}, // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("HS_Gen5_80"), // ComputeModel: to.Ptr("Provisioned"), // ID: to.Ptr("6509db45-febe-44dd-a079-35f11d477984"), // PerformanceLevel: &armsql.PerformanceLevelCapability{ // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // Value: to.Ptr[float64](80), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen5"), // Capacity: to.Ptr[int32](80), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("Hyperscale"), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedMaintenanceConfigurations: []*armsql.MaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // ZoneRedundant: to.Ptr(false), // }}, // ZoneRedundant: to.Ptr(false), // }}, // SupportedStorageCapabilities: []*armsql.StorageCapability{ // { // Status: to.Ptr(armsql.CapabilityStatusDefault), // StorageAccountType: to.Ptr(armsql.StorageCapabilityStorageAccountTypeGRS), // }, // { // Status: to.Ptr(armsql.CapabilityStatusAvailable), // StorageAccountType: to.Ptr(armsql.StorageCapabilityStorageAccountTypeLRS), // }, // { // Reason: to.Ptr("ZRS is available in multi-az regions"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // StorageAccountType: to.Ptr(armsql.StorageCapabilityStorageAccountTypeZRS), // }}, // ZoneRedundant: to.Ptr(false), // }}, // SupportedElasticPoolEditions: []*armsql.ElasticPoolEditionCapability{ // { // Name: to.Ptr("BusinessCritical"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedElasticPoolPerformanceLevels: []*armsql.ElasticPoolPerformanceLevelCapability{ // { // MaxDatabaseCount: to.Ptr[int32](100), // PerformanceLevel: &armsql.PerformanceLevelCapability{ // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // Value: to.Ptr[float64](3), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("BC_Gen4"), // Capacity: to.Ptr[int32](3), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("BusinessCritical"), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedMaintenanceConfigurations: []*armsql.MaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("SQL_EastUS_DB_1"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("SQL_EastUS_DB_2"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // ZoneRedundant: to.Ptr(false), // }}, // SupportedMaxSizes: []*armsql.MaxSizeRangeCapability{ // { // LogSize: &armsql.LogSizeCapability{ // Limit: to.Ptr[int32](30), // Unit: to.Ptr(armsql.LogSizeUnitPercent), // }, // MaxValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](31744), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // MinValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](1024), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // ScaleSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](1024), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }, // { // LogSize: &armsql.LogSizeCapability{ // Limit: to.Ptr[int32](30), // Unit: to.Ptr(armsql.LogSizeUnitPercent), // }, // MaxValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](32768), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // MinValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](32768), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // ScaleSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](0), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // LogSize: &armsql.LogSizeCapability{ // Limit: to.Ptr[int32](30), // Unit: to.Ptr(armsql.LogSizeUnitPercent), // }, // MaxValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](1048576), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // MinValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](33792), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // ScaleSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](1024), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedPerDatabaseMaxPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMaxPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](0.25), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedPerDatabaseMinPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMinPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](0), // Status: to.Ptr(armsql.CapabilityStatusDefault), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](0.25), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](0.5), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedPerDatabaseMinPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMinPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](0), // Status: to.Ptr(armsql.CapabilityStatusDefault), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](0.25), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](0.5), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](1), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedPerDatabaseMinPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMinPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](0), // Status: to.Ptr(armsql.CapabilityStatusDefault), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](0.25), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](0.5), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](1), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](2), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedPerDatabaseMinPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMinPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](0), // Status: to.Ptr(armsql.CapabilityStatusDefault), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](0.25), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](0.5), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](1), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](2), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](3), // Status: to.Ptr(armsql.CapabilityStatusDefault), // SupportedPerDatabaseMinPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMinPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](0), // Status: to.Ptr(armsql.CapabilityStatusDefault), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](0.25), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](0.5), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](1), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](2), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](3), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // SupportedPerDatabaseMaxSizes: []*armsql.MaxSizeRangeCapability{ // { // MaxValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](31744), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // MinValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](1024), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // ScaleSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](1024), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }, // { // MaxValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](32768), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // MinValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](32768), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // ScaleSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](0), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // MaxValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](1048576), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // MinValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](33792), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // ScaleSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](1024), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // ZoneRedundant: to.Ptr(false), // }, // { // MaxDatabaseCount: to.Ptr[int32](100), // PerformanceLevel: &armsql.PerformanceLevelCapability{ // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // Value: to.Ptr[float64](12), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("BC_Gen5"), // Capacity: to.Ptr[int32](12), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("BusinessCritical"), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedMaintenanceConfigurations: []*armsql.MaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("SQL_EastUS_DB_1"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("SQL_EastUS_DB_2"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // ZoneRedundant: to.Ptr(false), // }}, // SupportedMaxSizes: []*armsql.MaxSizeRangeCapability{ // { // LogSize: &armsql.LogSizeCapability{ // Limit: to.Ptr[int32](30), // Unit: to.Ptr(armsql.LogSizeUnitPercent), // }, // MaxValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](31744), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // MinValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](1024), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // ScaleSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](1024), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }, // { // LogSize: &armsql.LogSizeCapability{ // Limit: to.Ptr[int32](30), // Unit: to.Ptr(armsql.LogSizeUnitPercent), // }, // MaxValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](32768), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // MinValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](32768), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // ScaleSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](0), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // LogSize: &armsql.LogSizeCapability{ // Limit: to.Ptr[int32](30), // Unit: to.Ptr(armsql.LogSizeUnitPercent), // }, // MaxValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](3144704), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // MinValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](33792), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // ScaleSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](1024), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }, // { // LogSize: &armsql.LogSizeCapability{ // Limit: to.Ptr[int32](1048576), // Unit: to.Ptr(armsql.LogSizeUnitMegabytes), // }, // MaxValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](3145728), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // MinValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](3145728), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // ScaleSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](0), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedPerDatabaseMaxPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMaxPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](0.25), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedPerDatabaseMinPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMinPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](0), // Status: to.Ptr(armsql.CapabilityStatusDefault), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](0.25), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](0.5), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedPerDatabaseMinPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMinPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](0), // Status: to.Ptr(armsql.CapabilityStatusDefault), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](0.25), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](0.5), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](1), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedPerDatabaseMinPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMinPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](0), // Status: to.Ptr(armsql.CapabilityStatusDefault), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](0.25), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](0.5), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](1), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](2), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedPerDatabaseMinPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMinPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](0), // Status: to.Ptr(armsql.CapabilityStatusDefault), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](0.25), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](0.5), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](1), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](2), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](4), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedPerDatabaseMinPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMinPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](0), // Status: to.Ptr(armsql.CapabilityStatusDefault), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](0.25), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](0.5), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](1), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](2), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](4), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](6), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedPerDatabaseMinPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMinPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](0), // Status: to.Ptr(armsql.CapabilityStatusDefault), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](0.25), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](0.5), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](1), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](2), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](4), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](6), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](8), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedPerDatabaseMinPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMinPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](0), // Status: to.Ptr(armsql.CapabilityStatusDefault), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](0.25), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](0.5), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](1), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](2), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](4), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](6), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](8), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](10), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedPerDatabaseMinPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMinPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](0), // Status: to.Ptr(armsql.CapabilityStatusDefault), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](0.25), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](0.5), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](1), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](2), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](4), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](6), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](8), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](10), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](12), // Status: to.Ptr(armsql.CapabilityStatusDefault), // SupportedPerDatabaseMinPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMinPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](0), // Status: to.Ptr(armsql.CapabilityStatusDefault), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](0.25), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](0.5), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](1), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](2), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](4), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](6), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](8), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](10), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](12), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // SupportedPerDatabaseMaxSizes: []*armsql.MaxSizeRangeCapability{ // { // MaxValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](31744), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // MinValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](1024), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // ScaleSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](1024), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }, // { // MaxValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](32768), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // MinValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](32768), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // ScaleSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](0), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // MaxValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](3144704), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // MinValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](33792), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // ScaleSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](1024), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }, // { // MaxValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](3145728), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // MinValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](3145728), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // ScaleSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](0), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // ZoneRedundant: to.Ptr(true), // }, // { // MaxDatabaseCount: to.Ptr[int32](100), // PerformanceLevel: &armsql.PerformanceLevelCapability{ // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // Value: to.Ptr[float64](128), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("BC_M"), // Capacity: to.Ptr[int32](128), // Family: to.Ptr("M"), // Tier: to.Ptr("BusinessCritical"), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedLicenseTypes: []*armsql.LicenseTypeCapability{ // { // Name: to.Ptr("LicenseIncluded"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // Name: to.Ptr("BasePrice"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedMaintenanceConfigurations: []*armsql.MaintenanceConfigurationCapability{ // { // Name: to.Ptr("SQL_Default"), // Status: to.Ptr(armsql.CapabilityStatusDefault), // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("SQL_EastUS_DB_1"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // ZoneRedundant: to.Ptr(false), // }, // { // Name: to.Ptr("SQL_EastUS_DB_2"), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // ZoneRedundant: to.Ptr(false), // }}, // SupportedMaxSizes: []*armsql.MaxSizeRangeCapability{ // { // LogSize: &armsql.LogSizeCapability{ // Limit: to.Ptr[int32](30), // Unit: to.Ptr(armsql.LogSizeUnitPercent), // }, // MaxValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](31744), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // MinValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](1024), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // ScaleSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](1024), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }, // { // LogSize: &armsql.LogSizeCapability{ // Limit: to.Ptr[int32](30), // Unit: to.Ptr(armsql.LogSizeUnitPercent), // }, // MaxValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](32768), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // MinValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](32768), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // ScaleSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](0), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // LogSize: &armsql.LogSizeCapability{ // Limit: to.Ptr[int32](30), // Unit: to.Ptr(armsql.LogSizeUnitPercent), // }, // MaxValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](3144704), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // MinValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](33792), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // ScaleSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](1024), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }, // { // LogSize: &armsql.LogSizeCapability{ // Limit: to.Ptr[int32](1048576), // Unit: to.Ptr(armsql.LogSizeUnitMegabytes), // }, // MaxValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](4194304), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // MinValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](3145728), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // ScaleSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](1024), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // SupportedPerDatabaseMaxPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMaxPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](8), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedPerDatabaseMinPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMinPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](0), // Status: to.Ptr(armsql.CapabilityStatusDefault), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](8), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](10), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedPerDatabaseMinPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMinPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](0), // Status: to.Ptr(armsql.CapabilityStatusDefault), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](8), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](10), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](12), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedPerDatabaseMinPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMinPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](0), // Status: to.Ptr(armsql.CapabilityStatusDefault), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](8), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](10), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](12), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](14), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedPerDatabaseMinPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMinPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](0), // Status: to.Ptr(armsql.CapabilityStatusDefault), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](8), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](10), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](12), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](14), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](16), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedPerDatabaseMinPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMinPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](0), // Status: to.Ptr(armsql.CapabilityStatusDefault), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](8), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](10), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](12), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](14), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](16), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](18), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedPerDatabaseMinPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMinPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](0), // Status: to.Ptr(armsql.CapabilityStatusDefault), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](8), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](10), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](12), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](14), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](16), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](18), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](20), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedPerDatabaseMinPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMinPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](0), // Status: to.Ptr(armsql.CapabilityStatusDefault), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](8), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](10), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](12), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](14), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](16), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](18), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](20), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](24), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedPerDatabaseMinPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMinPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](0), // Status: to.Ptr(armsql.CapabilityStatusDefault), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](8), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](10), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](12), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](14), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](16), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](18), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](20), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](24), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](32), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedPerDatabaseMinPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMinPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](0), // Status: to.Ptr(armsql.CapabilityStatusDefault), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](8), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](10), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](12), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](14), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](16), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](18), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](20), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](24), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](32), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](40), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedPerDatabaseMinPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMinPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](0), // Status: to.Ptr(armsql.CapabilityStatusDefault), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](8), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](10), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](12), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](14), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](16), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](18), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](20), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](24), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](32), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](40), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](64), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedPerDatabaseMinPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMinPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](0), // Status: to.Ptr(armsql.CapabilityStatusDefault), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](8), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](10), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](12), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](14), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](16), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](18), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](20), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](24), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](32), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](40), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](64), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](80), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // SupportedPerDatabaseMinPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMinPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](0), // Status: to.Ptr(armsql.CapabilityStatusDefault), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](8), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](10), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](12), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](14), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](16), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](18), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](20), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](24), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](32), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](40), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](64), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](80), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](128), // Status: to.Ptr(armsql.CapabilityStatusDefault), // SupportedPerDatabaseMinPerformanceLevels: []*armsql.ElasticPoolPerDatabaseMinPerformanceLevelCapability{ // { // Limit: to.Ptr[float64](0), // Status: to.Ptr(armsql.CapabilityStatusDefault), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](8), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](10), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](12), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](14), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](16), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](18), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](20), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](24), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](32), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](40), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](64), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](80), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }, // { // Limit: to.Ptr[float64](128), // Status: to.Ptr(armsql.CapabilityStatusAvailable), // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // Unit: to.Ptr(armsql.PerformanceLevelUnitVCores), // }}, // SupportedPerDatabaseMaxSizes: []*armsql.MaxSizeRangeCapability{ // { // MaxValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](31744), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // MinValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](1024), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // ScaleSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](1024), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }, // { // MaxValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](32768), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // MinValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](32768), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // ScaleSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](0), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // Status: to.Ptr(armsql.CapabilityStatusDefault), // }, // { // MaxValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](3144704), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // MinValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](33792), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // ScaleSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](1024), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }, // { // MaxValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](4194304), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // MinValue: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](3145728), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // ScaleSize: &armsql.MaxSizeCapability{ // Limit: to.Ptr[int32](1024), // Unit: to.Ptr(armsql.MaxSizeUnitMegabytes), // }, // Status: to.Ptr(armsql.CapabilityStatusAvailable), // }}, // ZoneRedundant: to.Ptr(false), // }}, // ZoneRedundant: to.Ptr(false), // }}, // }}, // } }
Output:
type CapabilitiesClientListByLocationOptions ¶ added in v0.3.0
type CapabilitiesClientListByLocationOptions struct { // If specified, restricts the response to only include the selected item. Include *CapabilityGroup }
CapabilitiesClientListByLocationOptions contains the optional parameters for the CapabilitiesClient.ListByLocation method.
type CapabilitiesClientListByLocationResponse ¶ added in v0.3.0
type CapabilitiesClientListByLocationResponse struct { // The location capability. LocationCapabilities }
CapabilitiesClientListByLocationResponse contains the response from method CapabilitiesClient.ListByLocation.
type CapabilityGroup ¶
type CapabilityGroup string
const ( CapabilityGroupSupportedEditions CapabilityGroup = "supportedEditions" CapabilityGroupSupportedElasticPoolEditions CapabilityGroup = "supportedElasticPoolEditions" CapabilityGroupSupportedInstancePoolEditions CapabilityGroup = "supportedInstancePoolEditions" CapabilityGroupSupportedManagedInstanceEditions CapabilityGroup = "supportedManagedInstanceEditions" CapabilityGroupSupportedManagedInstanceVersions CapabilityGroup = "supportedManagedInstanceVersions" )
func PossibleCapabilityGroupValues ¶
func PossibleCapabilityGroupValues() []CapabilityGroup
PossibleCapabilityGroupValues returns the possible values for the CapabilityGroup const type.
type CapabilityStatus ¶
type CapabilityStatus string
CapabilityStatus - The status of the capability.
const ( CapabilityStatusAvailable CapabilityStatus = "Available" CapabilityStatusDefault CapabilityStatus = "Default" CapabilityStatusDisabled CapabilityStatus = "Disabled" CapabilityStatusVisible CapabilityStatus = "Visible" )
func PossibleCapabilityStatusValues ¶
func PossibleCapabilityStatusValues() []CapabilityStatus
PossibleCapabilityStatusValues returns the possible values for the CapabilityStatus const type.
type CatalogCollationType ¶
type CatalogCollationType string
CatalogCollationType - Collation of the metadata catalog.
const ( CatalogCollationTypeDATABASEDEFAULT CatalogCollationType = "DATABASE_DEFAULT" CatalogCollationTypeSQLLatin1GeneralCP1CIAS CatalogCollationType = "SQL_Latin1_General_CP1_CI_AS" )
func PossibleCatalogCollationTypeValues ¶
func PossibleCatalogCollationTypeValues() []CatalogCollationType
PossibleCatalogCollationTypeValues returns the possible values for the CatalogCollationType const type.
type CheckNameAvailabilityReason ¶
type CheckNameAvailabilityReason string
CheckNameAvailabilityReason - The reason code explaining why the name is unavailable. Will be undefined if the name is available.
const ( CheckNameAvailabilityReasonAlreadyExists CheckNameAvailabilityReason = "AlreadyExists" CheckNameAvailabilityReasonInvalid CheckNameAvailabilityReason = "Invalid" )
func PossibleCheckNameAvailabilityReasonValues ¶
func PossibleCheckNameAvailabilityReasonValues() []CheckNameAvailabilityReason
PossibleCheckNameAvailabilityReasonValues returns the possible values for the CheckNameAvailabilityReason const type.
type CheckNameAvailabilityRequest ¶
type CheckNameAvailabilityRequest struct { // REQUIRED Name *string // CONSTANT; Field has constant value "Microsoft.Sql/servers", any specified value is ignored. Type *string }
CheckNameAvailabilityRequest - A request to check whether the specified name for a resource is available.
func (CheckNameAvailabilityRequest) MarshalJSON ¶ added in v1.1.0
func (c CheckNameAvailabilityRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityRequest.
func (*CheckNameAvailabilityRequest) UnmarshalJSON ¶ added in v1.1.0
func (c *CheckNameAvailabilityRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityRequest.
type CheckNameAvailabilityResponse ¶
type CheckNameAvailabilityResponse struct { // READ-ONLY; True if the name is available, otherwise false. Available *bool // READ-ONLY; A message explaining why the name is unavailable. Will be undefined if the name is available. Message *string // READ-ONLY; The name whose availability was checked. Name *string // READ-ONLY; The reason code explaining why the name is unavailable. Will be undefined if the name is available. Reason *CheckNameAvailabilityReason }
CheckNameAvailabilityResponse - The result of a name availability check.
func (CheckNameAvailabilityResponse) MarshalJSON ¶ added in v1.1.0
func (c CheckNameAvailabilityResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityResponse.
func (*CheckNameAvailabilityResponse) UnmarshalJSON ¶ added in v1.1.0
func (c *CheckNameAvailabilityResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityResponse.
type ClientFactory ¶ added in v1.1.0
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶ added in v1.1.0
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewAgentClient ¶ added in v1.1.0
func (c *ClientFactory) NewAgentClient() *AgentClient
NewAgentClient creates a new instance of AgentClient.
func (*ClientFactory) NewBackupShortTermRetentionPoliciesClient ¶ added in v1.1.0
func (c *ClientFactory) NewBackupShortTermRetentionPoliciesClient() *BackupShortTermRetentionPoliciesClient
NewBackupShortTermRetentionPoliciesClient creates a new instance of BackupShortTermRetentionPoliciesClient.
func (*ClientFactory) NewCapabilitiesClient ¶ added in v1.1.0
func (c *ClientFactory) NewCapabilitiesClient() *CapabilitiesClient
NewCapabilitiesClient creates a new instance of CapabilitiesClient.
func (*ClientFactory) NewDataMaskingPoliciesClient ¶ added in v1.1.0
func (c *ClientFactory) NewDataMaskingPoliciesClient() *DataMaskingPoliciesClient
NewDataMaskingPoliciesClient creates a new instance of DataMaskingPoliciesClient.
func (*ClientFactory) NewDataMaskingRulesClient ¶ added in v1.1.0
func (c *ClientFactory) NewDataMaskingRulesClient() *DataMaskingRulesClient
NewDataMaskingRulesClient creates a new instance of DataMaskingRulesClient.
func (*ClientFactory) NewDataWarehouseUserActivitiesClient ¶ added in v1.1.0
func (c *ClientFactory) NewDataWarehouseUserActivitiesClient() *DataWarehouseUserActivitiesClient
NewDataWarehouseUserActivitiesClient creates a new instance of DataWarehouseUserActivitiesClient.
func (*ClientFactory) NewDatabaseAdvancedThreatProtectionSettingsClient ¶ added in v1.1.0
func (c *ClientFactory) NewDatabaseAdvancedThreatProtectionSettingsClient() *DatabaseAdvancedThreatProtectionSettingsClient
NewDatabaseAdvancedThreatProtectionSettingsClient creates a new instance of DatabaseAdvancedThreatProtectionSettingsClient.
func (*ClientFactory) NewDatabaseAdvisorsClient ¶ added in v1.1.0
func (c *ClientFactory) NewDatabaseAdvisorsClient() *DatabaseAdvisorsClient
NewDatabaseAdvisorsClient creates a new instance of DatabaseAdvisorsClient.
func (*ClientFactory) NewDatabaseAutomaticTuningClient ¶ added in v1.1.0
func (c *ClientFactory) NewDatabaseAutomaticTuningClient() *DatabaseAutomaticTuningClient
NewDatabaseAutomaticTuningClient creates a new instance of DatabaseAutomaticTuningClient.
func (*ClientFactory) NewDatabaseBlobAuditingPoliciesClient ¶ added in v1.1.0
func (c *ClientFactory) NewDatabaseBlobAuditingPoliciesClient() *DatabaseBlobAuditingPoliciesClient
NewDatabaseBlobAuditingPoliciesClient creates a new instance of DatabaseBlobAuditingPoliciesClient.
func (*ClientFactory) NewDatabaseColumnsClient ¶ added in v1.1.0
func (c *ClientFactory) NewDatabaseColumnsClient() *DatabaseColumnsClient
NewDatabaseColumnsClient creates a new instance of DatabaseColumnsClient.
func (*ClientFactory) NewDatabaseExtensionsClient ¶ added in v1.1.0
func (c *ClientFactory) NewDatabaseExtensionsClient() *DatabaseExtensionsClient
NewDatabaseExtensionsClient creates a new instance of DatabaseExtensionsClient.
func (*ClientFactory) NewDatabaseOperationsClient ¶ added in v1.1.0
func (c *ClientFactory) NewDatabaseOperationsClient() *DatabaseOperationsClient
NewDatabaseOperationsClient creates a new instance of DatabaseOperationsClient.
func (*ClientFactory) NewDatabaseRecommendedActionsClient ¶ added in v1.1.0
func (c *ClientFactory) NewDatabaseRecommendedActionsClient() *DatabaseRecommendedActionsClient
NewDatabaseRecommendedActionsClient creates a new instance of DatabaseRecommendedActionsClient.
func (*ClientFactory) NewDatabaseSchemasClient ¶ added in v1.1.0
func (c *ClientFactory) NewDatabaseSchemasClient() *DatabaseSchemasClient
NewDatabaseSchemasClient creates a new instance of DatabaseSchemasClient.
func (*ClientFactory) NewDatabaseSecurityAlertPoliciesClient ¶ added in v1.1.0
func (c *ClientFactory) NewDatabaseSecurityAlertPoliciesClient() *DatabaseSecurityAlertPoliciesClient
NewDatabaseSecurityAlertPoliciesClient creates a new instance of DatabaseSecurityAlertPoliciesClient.
func (*ClientFactory) NewDatabaseTablesClient ¶ added in v1.1.0
func (c *ClientFactory) NewDatabaseTablesClient() *DatabaseTablesClient
NewDatabaseTablesClient creates a new instance of DatabaseTablesClient.
func (*ClientFactory) NewDatabaseUsagesClient ¶ added in v1.1.0
func (c *ClientFactory) NewDatabaseUsagesClient() *DatabaseUsagesClient
NewDatabaseUsagesClient creates a new instance of DatabaseUsagesClient.
func (*ClientFactory) NewDatabaseVulnerabilityAssessmentRuleBaselinesClient ¶ added in v1.1.0
func (c *ClientFactory) NewDatabaseVulnerabilityAssessmentRuleBaselinesClient() *DatabaseVulnerabilityAssessmentRuleBaselinesClient
NewDatabaseVulnerabilityAssessmentRuleBaselinesClient creates a new instance of DatabaseVulnerabilityAssessmentRuleBaselinesClient.
func (*ClientFactory) NewDatabaseVulnerabilityAssessmentScansClient ¶ added in v1.1.0
func (c *ClientFactory) NewDatabaseVulnerabilityAssessmentScansClient() *DatabaseVulnerabilityAssessmentScansClient
NewDatabaseVulnerabilityAssessmentScansClient creates a new instance of DatabaseVulnerabilityAssessmentScansClient.
func (*ClientFactory) NewDatabaseVulnerabilityAssessmentsClient ¶ added in v1.1.0
func (c *ClientFactory) NewDatabaseVulnerabilityAssessmentsClient() *DatabaseVulnerabilityAssessmentsClient
NewDatabaseVulnerabilityAssessmentsClient creates a new instance of DatabaseVulnerabilityAssessmentsClient.
func (*ClientFactory) NewDatabasesClient ¶ added in v1.1.0
func (c *ClientFactory) NewDatabasesClient() *DatabasesClient
NewDatabasesClient creates a new instance of DatabasesClient.
func (*ClientFactory) NewDeletedServersClient ¶ added in v1.1.0
func (c *ClientFactory) NewDeletedServersClient() *DeletedServersClient
NewDeletedServersClient creates a new instance of DeletedServersClient.
func (*ClientFactory) NewDistributedAvailabilityGroupsClient ¶ added in v1.1.0
func (c *ClientFactory) NewDistributedAvailabilityGroupsClient() *DistributedAvailabilityGroupsClient
NewDistributedAvailabilityGroupsClient creates a new instance of DistributedAvailabilityGroupsClient.
func (*ClientFactory) NewElasticPoolActivitiesClient ¶ added in v1.1.0
func (c *ClientFactory) NewElasticPoolActivitiesClient() *ElasticPoolActivitiesClient
NewElasticPoolActivitiesClient creates a new instance of ElasticPoolActivitiesClient.
func (*ClientFactory) NewElasticPoolDatabaseActivitiesClient ¶ added in v1.1.0
func (c *ClientFactory) NewElasticPoolDatabaseActivitiesClient() *ElasticPoolDatabaseActivitiesClient
NewElasticPoolDatabaseActivitiesClient creates a new instance of ElasticPoolDatabaseActivitiesClient.
func (*ClientFactory) NewElasticPoolOperationsClient ¶ added in v1.1.0
func (c *ClientFactory) NewElasticPoolOperationsClient() *ElasticPoolOperationsClient
NewElasticPoolOperationsClient creates a new instance of ElasticPoolOperationsClient.
func (*ClientFactory) NewElasticPoolsClient ¶ added in v1.1.0
func (c *ClientFactory) NewElasticPoolsClient() *ElasticPoolsClient
NewElasticPoolsClient creates a new instance of ElasticPoolsClient.
func (*ClientFactory) NewEncryptionProtectorsClient ¶ added in v1.1.0
func (c *ClientFactory) NewEncryptionProtectorsClient() *EncryptionProtectorsClient
NewEncryptionProtectorsClient creates a new instance of EncryptionProtectorsClient.
func (*ClientFactory) NewEndpointCertificatesClient ¶ added in v1.1.0
func (c *ClientFactory) NewEndpointCertificatesClient() *EndpointCertificatesClient
NewEndpointCertificatesClient creates a new instance of EndpointCertificatesClient.
func (*ClientFactory) NewExtendedDatabaseBlobAuditingPoliciesClient ¶ added in v1.1.0
func (c *ClientFactory) NewExtendedDatabaseBlobAuditingPoliciesClient() *ExtendedDatabaseBlobAuditingPoliciesClient
NewExtendedDatabaseBlobAuditingPoliciesClient creates a new instance of ExtendedDatabaseBlobAuditingPoliciesClient.
func (*ClientFactory) NewExtendedServerBlobAuditingPoliciesClient ¶ added in v1.1.0
func (c *ClientFactory) NewExtendedServerBlobAuditingPoliciesClient() *ExtendedServerBlobAuditingPoliciesClient
NewExtendedServerBlobAuditingPoliciesClient creates a new instance of ExtendedServerBlobAuditingPoliciesClient.
func (*ClientFactory) NewFailoverGroupsClient ¶ added in v1.1.0
func (c *ClientFactory) NewFailoverGroupsClient() *FailoverGroupsClient
NewFailoverGroupsClient creates a new instance of FailoverGroupsClient.
func (*ClientFactory) NewFirewallRulesClient ¶ added in v1.1.0
func (c *ClientFactory) NewFirewallRulesClient() *FirewallRulesClient
NewFirewallRulesClient creates a new instance of FirewallRulesClient.
func (*ClientFactory) NewGeoBackupPoliciesClient ¶ added in v1.1.0
func (c *ClientFactory) NewGeoBackupPoliciesClient() *GeoBackupPoliciesClient
NewGeoBackupPoliciesClient creates a new instance of GeoBackupPoliciesClient.
func (*ClientFactory) NewIPv6FirewallRulesClient ¶ added in v1.1.0
func (c *ClientFactory) NewIPv6FirewallRulesClient() *IPv6FirewallRulesClient
NewIPv6FirewallRulesClient creates a new instance of IPv6FirewallRulesClient.
func (*ClientFactory) NewInstanceFailoverGroupsClient ¶ added in v1.1.0
func (c *ClientFactory) NewInstanceFailoverGroupsClient() *InstanceFailoverGroupsClient
NewInstanceFailoverGroupsClient creates a new instance of InstanceFailoverGroupsClient.
func (*ClientFactory) NewInstancePoolsClient ¶ added in v1.1.0
func (c *ClientFactory) NewInstancePoolsClient() *InstancePoolsClient
NewInstancePoolsClient creates a new instance of InstancePoolsClient.
func (*ClientFactory) NewJobAgentsClient ¶ added in v1.1.0
func (c *ClientFactory) NewJobAgentsClient() *JobAgentsClient
NewJobAgentsClient creates a new instance of JobAgentsClient.
func (*ClientFactory) NewJobCredentialsClient ¶ added in v1.1.0
func (c *ClientFactory) NewJobCredentialsClient() *JobCredentialsClient
NewJobCredentialsClient creates a new instance of JobCredentialsClient.
func (*ClientFactory) NewJobExecutionsClient ¶ added in v1.1.0
func (c *ClientFactory) NewJobExecutionsClient() *JobExecutionsClient
NewJobExecutionsClient creates a new instance of JobExecutionsClient.
func (*ClientFactory) NewJobStepExecutionsClient ¶ added in v1.1.0
func (c *ClientFactory) NewJobStepExecutionsClient() *JobStepExecutionsClient
NewJobStepExecutionsClient creates a new instance of JobStepExecutionsClient.
func (*ClientFactory) NewJobStepsClient ¶ added in v1.1.0
func (c *ClientFactory) NewJobStepsClient() *JobStepsClient
NewJobStepsClient creates a new instance of JobStepsClient.
func (*ClientFactory) NewJobTargetExecutionsClient ¶ added in v1.1.0
func (c *ClientFactory) NewJobTargetExecutionsClient() *JobTargetExecutionsClient
NewJobTargetExecutionsClient creates a new instance of JobTargetExecutionsClient.
func (*ClientFactory) NewJobTargetGroupsClient ¶ added in v1.1.0
func (c *ClientFactory) NewJobTargetGroupsClient() *JobTargetGroupsClient
NewJobTargetGroupsClient creates a new instance of JobTargetGroupsClient.
func (*ClientFactory) NewJobVersionsClient ¶ added in v1.1.0
func (c *ClientFactory) NewJobVersionsClient() *JobVersionsClient
NewJobVersionsClient creates a new instance of JobVersionsClient.
func (*ClientFactory) NewJobsClient ¶ added in v1.1.0
func (c *ClientFactory) NewJobsClient() *JobsClient
NewJobsClient creates a new instance of JobsClient.
func (*ClientFactory) NewLedgerDigestUploadsClient ¶ added in v1.1.0
func (c *ClientFactory) NewLedgerDigestUploadsClient() *LedgerDigestUploadsClient
NewLedgerDigestUploadsClient creates a new instance of LedgerDigestUploadsClient.
func (*ClientFactory) NewLongTermRetentionBackupsClient ¶ added in v1.1.0
func (c *ClientFactory) NewLongTermRetentionBackupsClient() *LongTermRetentionBackupsClient
NewLongTermRetentionBackupsClient creates a new instance of LongTermRetentionBackupsClient.
func (*ClientFactory) NewLongTermRetentionManagedInstanceBackupsClient ¶ added in v1.1.0
func (c *ClientFactory) NewLongTermRetentionManagedInstanceBackupsClient() *LongTermRetentionManagedInstanceBackupsClient
NewLongTermRetentionManagedInstanceBackupsClient creates a new instance of LongTermRetentionManagedInstanceBackupsClient.
func (*ClientFactory) NewLongTermRetentionPoliciesClient ¶ added in v1.1.0
func (c *ClientFactory) NewLongTermRetentionPoliciesClient() *LongTermRetentionPoliciesClient
NewLongTermRetentionPoliciesClient creates a new instance of LongTermRetentionPoliciesClient.
func (*ClientFactory) NewMaintenanceWindowOptionsClient ¶ added in v1.1.0
func (c *ClientFactory) NewMaintenanceWindowOptionsClient() *MaintenanceWindowOptionsClient
NewMaintenanceWindowOptionsClient creates a new instance of MaintenanceWindowOptionsClient.
func (*ClientFactory) NewMaintenanceWindowsClient ¶ added in v1.1.0
func (c *ClientFactory) NewMaintenanceWindowsClient() *MaintenanceWindowsClient
NewMaintenanceWindowsClient creates a new instance of MaintenanceWindowsClient.
func (*ClientFactory) NewManagedBackupShortTermRetentionPoliciesClient ¶ added in v1.1.0
func (c *ClientFactory) NewManagedBackupShortTermRetentionPoliciesClient() *ManagedBackupShortTermRetentionPoliciesClient
NewManagedBackupShortTermRetentionPoliciesClient creates a new instance of ManagedBackupShortTermRetentionPoliciesClient.
func (*ClientFactory) NewManagedDatabaseColumnsClient ¶ added in v1.1.0
func (c *ClientFactory) NewManagedDatabaseColumnsClient() *ManagedDatabaseColumnsClient
NewManagedDatabaseColumnsClient creates a new instance of ManagedDatabaseColumnsClient.
func (*ClientFactory) NewManagedDatabaseQueriesClient ¶ added in v1.1.0
func (c *ClientFactory) NewManagedDatabaseQueriesClient() *ManagedDatabaseQueriesClient
NewManagedDatabaseQueriesClient creates a new instance of ManagedDatabaseQueriesClient.
func (*ClientFactory) NewManagedDatabaseRecommendedSensitivityLabelsClient ¶ added in v1.1.0
func (c *ClientFactory) NewManagedDatabaseRecommendedSensitivityLabelsClient() *ManagedDatabaseRecommendedSensitivityLabelsClient
NewManagedDatabaseRecommendedSensitivityLabelsClient creates a new instance of ManagedDatabaseRecommendedSensitivityLabelsClient.
func (*ClientFactory) NewManagedDatabaseRestoreDetailsClient ¶ added in v1.1.0
func (c *ClientFactory) NewManagedDatabaseRestoreDetailsClient() *ManagedDatabaseRestoreDetailsClient
NewManagedDatabaseRestoreDetailsClient creates a new instance of ManagedDatabaseRestoreDetailsClient.
func (*ClientFactory) NewManagedDatabaseSchemasClient ¶ added in v1.1.0
func (c *ClientFactory) NewManagedDatabaseSchemasClient() *ManagedDatabaseSchemasClient
NewManagedDatabaseSchemasClient creates a new instance of ManagedDatabaseSchemasClient.
func (*ClientFactory) NewManagedDatabaseSecurityAlertPoliciesClient ¶ added in v1.1.0
func (c *ClientFactory) NewManagedDatabaseSecurityAlertPoliciesClient() *ManagedDatabaseSecurityAlertPoliciesClient
NewManagedDatabaseSecurityAlertPoliciesClient creates a new instance of ManagedDatabaseSecurityAlertPoliciesClient.
func (*ClientFactory) NewManagedDatabaseSecurityEventsClient ¶ added in v1.1.0
func (c *ClientFactory) NewManagedDatabaseSecurityEventsClient() *ManagedDatabaseSecurityEventsClient
NewManagedDatabaseSecurityEventsClient creates a new instance of ManagedDatabaseSecurityEventsClient.
func (*ClientFactory) NewManagedDatabaseSensitivityLabelsClient ¶ added in v1.1.0
func (c *ClientFactory) NewManagedDatabaseSensitivityLabelsClient() *ManagedDatabaseSensitivityLabelsClient
NewManagedDatabaseSensitivityLabelsClient creates a new instance of ManagedDatabaseSensitivityLabelsClient.
func (*ClientFactory) NewManagedDatabaseTablesClient ¶ added in v1.1.0
func (c *ClientFactory) NewManagedDatabaseTablesClient() *ManagedDatabaseTablesClient
NewManagedDatabaseTablesClient creates a new instance of ManagedDatabaseTablesClient.
func (*ClientFactory) NewManagedDatabaseTransparentDataEncryptionClient ¶ added in v1.1.0
func (c *ClientFactory) NewManagedDatabaseTransparentDataEncryptionClient() *ManagedDatabaseTransparentDataEncryptionClient
NewManagedDatabaseTransparentDataEncryptionClient creates a new instance of ManagedDatabaseTransparentDataEncryptionClient.
func (*ClientFactory) NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient ¶ added in v1.1.0
func (c *ClientFactory) NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient() *ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient
NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient creates a new instance of ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.
func (*ClientFactory) NewManagedDatabaseVulnerabilityAssessmentScansClient ¶ added in v1.1.0
func (c *ClientFactory) NewManagedDatabaseVulnerabilityAssessmentScansClient() *ManagedDatabaseVulnerabilityAssessmentScansClient
NewManagedDatabaseVulnerabilityAssessmentScansClient creates a new instance of ManagedDatabaseVulnerabilityAssessmentScansClient.
func (*ClientFactory) NewManagedDatabaseVulnerabilityAssessmentsClient ¶ added in v1.1.0
func (c *ClientFactory) NewManagedDatabaseVulnerabilityAssessmentsClient() *ManagedDatabaseVulnerabilityAssessmentsClient
NewManagedDatabaseVulnerabilityAssessmentsClient creates a new instance of ManagedDatabaseVulnerabilityAssessmentsClient.
func (*ClientFactory) NewManagedDatabasesClient ¶ added in v1.1.0
func (c *ClientFactory) NewManagedDatabasesClient() *ManagedDatabasesClient
NewManagedDatabasesClient creates a new instance of ManagedDatabasesClient.
func (*ClientFactory) NewManagedInstanceAdministratorsClient ¶ added in v1.1.0
func (c *ClientFactory) NewManagedInstanceAdministratorsClient() *ManagedInstanceAdministratorsClient
NewManagedInstanceAdministratorsClient creates a new instance of ManagedInstanceAdministratorsClient.
func (*ClientFactory) NewManagedInstanceAzureADOnlyAuthenticationsClient ¶ added in v1.1.0
func (c *ClientFactory) NewManagedInstanceAzureADOnlyAuthenticationsClient() *ManagedInstanceAzureADOnlyAuthenticationsClient
NewManagedInstanceAzureADOnlyAuthenticationsClient creates a new instance of ManagedInstanceAzureADOnlyAuthenticationsClient.
func (*ClientFactory) NewManagedInstanceEncryptionProtectorsClient ¶ added in v1.1.0
func (c *ClientFactory) NewManagedInstanceEncryptionProtectorsClient() *ManagedInstanceEncryptionProtectorsClient
NewManagedInstanceEncryptionProtectorsClient creates a new instance of ManagedInstanceEncryptionProtectorsClient.
func (*ClientFactory) NewManagedInstanceKeysClient ¶ added in v1.1.0
func (c *ClientFactory) NewManagedInstanceKeysClient() *ManagedInstanceKeysClient
NewManagedInstanceKeysClient creates a new instance of ManagedInstanceKeysClient.
func (*ClientFactory) NewManagedInstanceLongTermRetentionPoliciesClient ¶ added in v1.1.0
func (c *ClientFactory) NewManagedInstanceLongTermRetentionPoliciesClient() *ManagedInstanceLongTermRetentionPoliciesClient
NewManagedInstanceLongTermRetentionPoliciesClient creates a new instance of ManagedInstanceLongTermRetentionPoliciesClient.
func (*ClientFactory) NewManagedInstanceOperationsClient ¶ added in v1.1.0
func (c *ClientFactory) NewManagedInstanceOperationsClient() *ManagedInstanceOperationsClient
NewManagedInstanceOperationsClient creates a new instance of ManagedInstanceOperationsClient.
func (*ClientFactory) NewManagedInstancePrivateEndpointConnectionsClient ¶ added in v1.1.0
func (c *ClientFactory) NewManagedInstancePrivateEndpointConnectionsClient() *ManagedInstancePrivateEndpointConnectionsClient
NewManagedInstancePrivateEndpointConnectionsClient creates a new instance of ManagedInstancePrivateEndpointConnectionsClient.
func (*ClientFactory) NewManagedInstancePrivateLinkResourcesClient ¶ added in v1.1.0
func (c *ClientFactory) NewManagedInstancePrivateLinkResourcesClient() *ManagedInstancePrivateLinkResourcesClient
NewManagedInstancePrivateLinkResourcesClient creates a new instance of ManagedInstancePrivateLinkResourcesClient.
func (*ClientFactory) NewManagedInstanceTdeCertificatesClient ¶ added in v1.1.0
func (c *ClientFactory) NewManagedInstanceTdeCertificatesClient() *ManagedInstanceTdeCertificatesClient
NewManagedInstanceTdeCertificatesClient creates a new instance of ManagedInstanceTdeCertificatesClient.
func (*ClientFactory) NewManagedInstanceVulnerabilityAssessmentsClient ¶ added in v1.1.0
func (c *ClientFactory) NewManagedInstanceVulnerabilityAssessmentsClient() *ManagedInstanceVulnerabilityAssessmentsClient
NewManagedInstanceVulnerabilityAssessmentsClient creates a new instance of ManagedInstanceVulnerabilityAssessmentsClient.
func (*ClientFactory) NewManagedInstancesClient ¶ added in v1.1.0
func (c *ClientFactory) NewManagedInstancesClient() *ManagedInstancesClient
NewManagedInstancesClient creates a new instance of ManagedInstancesClient.
func (*ClientFactory) NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient ¶ added in v1.1.0
func (c *ClientFactory) NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient() *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient
NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient creates a new instance of ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.
func (*ClientFactory) NewManagedServerSecurityAlertPoliciesClient ¶ added in v1.1.0
func (c *ClientFactory) NewManagedServerSecurityAlertPoliciesClient() *ManagedServerSecurityAlertPoliciesClient
NewManagedServerSecurityAlertPoliciesClient creates a new instance of ManagedServerSecurityAlertPoliciesClient.
func (*ClientFactory) NewOperationsClient ¶ added in v1.1.0
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewOutboundFirewallRulesClient ¶ added in v1.1.0
func (c *ClientFactory) NewOutboundFirewallRulesClient() *OutboundFirewallRulesClient
NewOutboundFirewallRulesClient creates a new instance of OutboundFirewallRulesClient.
func (*ClientFactory) NewPrivateEndpointConnectionsClient ¶ added in v1.1.0
func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient
NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient.
func (*ClientFactory) NewPrivateLinkResourcesClient ¶ added in v1.1.0
func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient
NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient.
func (*ClientFactory) NewRecommendedSensitivityLabelsClient ¶ added in v1.1.0
func (c *ClientFactory) NewRecommendedSensitivityLabelsClient() *RecommendedSensitivityLabelsClient
NewRecommendedSensitivityLabelsClient creates a new instance of RecommendedSensitivityLabelsClient.
func (*ClientFactory) NewRecoverableDatabasesClient ¶ added in v1.1.0
func (c *ClientFactory) NewRecoverableDatabasesClient() *RecoverableDatabasesClient
NewRecoverableDatabasesClient creates a new instance of RecoverableDatabasesClient.
func (*ClientFactory) NewRecoverableManagedDatabasesClient ¶ added in v1.1.0
func (c *ClientFactory) NewRecoverableManagedDatabasesClient() *RecoverableManagedDatabasesClient
NewRecoverableManagedDatabasesClient creates a new instance of RecoverableManagedDatabasesClient.
func (*ClientFactory) NewReplicationLinksClient ¶ added in v1.1.0
func (c *ClientFactory) NewReplicationLinksClient() *ReplicationLinksClient
NewReplicationLinksClient creates a new instance of ReplicationLinksClient.
func (*ClientFactory) NewRestorableDroppedDatabasesClient ¶ added in v1.1.0
func (c *ClientFactory) NewRestorableDroppedDatabasesClient() *RestorableDroppedDatabasesClient
NewRestorableDroppedDatabasesClient creates a new instance of RestorableDroppedDatabasesClient.
func (*ClientFactory) NewRestorableDroppedManagedDatabasesClient ¶ added in v1.1.0
func (c *ClientFactory) NewRestorableDroppedManagedDatabasesClient() *RestorableDroppedManagedDatabasesClient
NewRestorableDroppedManagedDatabasesClient creates a new instance of RestorableDroppedManagedDatabasesClient.
func (*ClientFactory) NewRestorePointsClient ¶ added in v1.1.0
func (c *ClientFactory) NewRestorePointsClient() *RestorePointsClient
NewRestorePointsClient creates a new instance of RestorePointsClient.
func (*ClientFactory) NewSensitivityLabelsClient ¶ added in v1.1.0
func (c *ClientFactory) NewSensitivityLabelsClient() *SensitivityLabelsClient
NewSensitivityLabelsClient creates a new instance of SensitivityLabelsClient.
func (*ClientFactory) NewServerAdvancedThreatProtectionSettingsClient ¶ added in v1.1.0
func (c *ClientFactory) NewServerAdvancedThreatProtectionSettingsClient() *ServerAdvancedThreatProtectionSettingsClient
NewServerAdvancedThreatProtectionSettingsClient creates a new instance of ServerAdvancedThreatProtectionSettingsClient.
func (*ClientFactory) NewServerAdvisorsClient ¶ added in v1.1.0
func (c *ClientFactory) NewServerAdvisorsClient() *ServerAdvisorsClient
NewServerAdvisorsClient creates a new instance of ServerAdvisorsClient.
func (*ClientFactory) NewServerAutomaticTuningClient ¶ added in v1.1.0
func (c *ClientFactory) NewServerAutomaticTuningClient() *ServerAutomaticTuningClient
NewServerAutomaticTuningClient creates a new instance of ServerAutomaticTuningClient.
func (*ClientFactory) NewServerAzureADAdministratorsClient ¶ added in v1.1.0
func (c *ClientFactory) NewServerAzureADAdministratorsClient() *ServerAzureADAdministratorsClient
NewServerAzureADAdministratorsClient creates a new instance of ServerAzureADAdministratorsClient.
func (*ClientFactory) NewServerAzureADOnlyAuthenticationsClient ¶ added in v1.1.0
func (c *ClientFactory) NewServerAzureADOnlyAuthenticationsClient() *ServerAzureADOnlyAuthenticationsClient
NewServerAzureADOnlyAuthenticationsClient creates a new instance of ServerAzureADOnlyAuthenticationsClient.
func (*ClientFactory) NewServerBlobAuditingPoliciesClient ¶ added in v1.1.0
func (c *ClientFactory) NewServerBlobAuditingPoliciesClient() *ServerBlobAuditingPoliciesClient
NewServerBlobAuditingPoliciesClient creates a new instance of ServerBlobAuditingPoliciesClient.
func (*ClientFactory) NewServerCommunicationLinksClient ¶ added in v1.1.0
func (c *ClientFactory) NewServerCommunicationLinksClient() *ServerCommunicationLinksClient
NewServerCommunicationLinksClient creates a new instance of ServerCommunicationLinksClient.
func (*ClientFactory) NewServerConnectionPoliciesClient ¶ added in v1.1.0
func (c *ClientFactory) NewServerConnectionPoliciesClient() *ServerConnectionPoliciesClient
NewServerConnectionPoliciesClient creates a new instance of ServerConnectionPoliciesClient.
func (*ClientFactory) NewServerDNSAliasesClient ¶ added in v1.1.0
func (c *ClientFactory) NewServerDNSAliasesClient() *ServerDNSAliasesClient
NewServerDNSAliasesClient creates a new instance of ServerDNSAliasesClient.
func (*ClientFactory) NewServerDevOpsAuditSettingsClient ¶ added in v1.1.0
func (c *ClientFactory) NewServerDevOpsAuditSettingsClient() *ServerDevOpsAuditSettingsClient
NewServerDevOpsAuditSettingsClient creates a new instance of ServerDevOpsAuditSettingsClient.
func (*ClientFactory) NewServerKeysClient ¶ added in v1.1.0
func (c *ClientFactory) NewServerKeysClient() *ServerKeysClient
NewServerKeysClient creates a new instance of ServerKeysClient.
func (*ClientFactory) NewServerOperationsClient ¶ added in v1.1.0
func (c *ClientFactory) NewServerOperationsClient() *ServerOperationsClient
NewServerOperationsClient creates a new instance of ServerOperationsClient.
func (*ClientFactory) NewServerSecurityAlertPoliciesClient ¶ added in v1.1.0
func (c *ClientFactory) NewServerSecurityAlertPoliciesClient() *ServerSecurityAlertPoliciesClient
NewServerSecurityAlertPoliciesClient creates a new instance of ServerSecurityAlertPoliciesClient.
func (*ClientFactory) NewServerTrustCertificatesClient ¶ added in v1.1.0
func (c *ClientFactory) NewServerTrustCertificatesClient() *ServerTrustCertificatesClient
NewServerTrustCertificatesClient creates a new instance of ServerTrustCertificatesClient.
func (*ClientFactory) NewServerTrustGroupsClient ¶ added in v1.1.0
func (c *ClientFactory) NewServerTrustGroupsClient() *ServerTrustGroupsClient
NewServerTrustGroupsClient creates a new instance of ServerTrustGroupsClient.
func (*ClientFactory) NewServerUsagesClient ¶ added in v1.1.0
func (c *ClientFactory) NewServerUsagesClient() *ServerUsagesClient
NewServerUsagesClient creates a new instance of ServerUsagesClient.
func (*ClientFactory) NewServerVulnerabilityAssessmentsClient ¶ added in v1.1.0
func (c *ClientFactory) NewServerVulnerabilityAssessmentsClient() *ServerVulnerabilityAssessmentsClient
NewServerVulnerabilityAssessmentsClient creates a new instance of ServerVulnerabilityAssessmentsClient.
func (*ClientFactory) NewServersClient ¶ added in v1.1.0
func (c *ClientFactory) NewServersClient() *ServersClient
NewServersClient creates a new instance of ServersClient.
func (*ClientFactory) NewServiceObjectivesClient ¶ added in v1.1.0
func (c *ClientFactory) NewServiceObjectivesClient() *ServiceObjectivesClient
NewServiceObjectivesClient creates a new instance of ServiceObjectivesClient.
func (*ClientFactory) NewSubscriptionUsagesClient ¶ added in v1.1.0
func (c *ClientFactory) NewSubscriptionUsagesClient() *SubscriptionUsagesClient
NewSubscriptionUsagesClient creates a new instance of SubscriptionUsagesClient.
func (*ClientFactory) NewSyncAgentsClient ¶ added in v1.1.0
func (c *ClientFactory) NewSyncAgentsClient() *SyncAgentsClient
NewSyncAgentsClient creates a new instance of SyncAgentsClient.
func (*ClientFactory) NewSyncGroupsClient ¶ added in v1.1.0
func (c *ClientFactory) NewSyncGroupsClient() *SyncGroupsClient
NewSyncGroupsClient creates a new instance of SyncGroupsClient.
func (*ClientFactory) NewSyncMembersClient ¶ added in v1.1.0
func (c *ClientFactory) NewSyncMembersClient() *SyncMembersClient
NewSyncMembersClient creates a new instance of SyncMembersClient.
func (*ClientFactory) NewTdeCertificatesClient ¶ added in v1.1.0
func (c *ClientFactory) NewTdeCertificatesClient() *TdeCertificatesClient
NewTdeCertificatesClient creates a new instance of TdeCertificatesClient.
func (*ClientFactory) NewTimeZonesClient ¶ added in v1.1.0
func (c *ClientFactory) NewTimeZonesClient() *TimeZonesClient
NewTimeZonesClient creates a new instance of TimeZonesClient.
func (*ClientFactory) NewTransparentDataEncryptionsClient ¶ added in v1.1.0
func (c *ClientFactory) NewTransparentDataEncryptionsClient() *TransparentDataEncryptionsClient
NewTransparentDataEncryptionsClient creates a new instance of TransparentDataEncryptionsClient.
func (*ClientFactory) NewUsagesClient ¶ added in v1.1.0
func (c *ClientFactory) NewUsagesClient() *UsagesClient
NewUsagesClient creates a new instance of UsagesClient.
func (*ClientFactory) NewVirtualClustersClient ¶ added in v1.1.0
func (c *ClientFactory) NewVirtualClustersClient() *VirtualClustersClient
NewVirtualClustersClient creates a new instance of VirtualClustersClient.
func (*ClientFactory) NewVirtualNetworkRulesClient ¶ added in v1.1.0
func (c *ClientFactory) NewVirtualNetworkRulesClient() *VirtualNetworkRulesClient
NewVirtualNetworkRulesClient creates a new instance of VirtualNetworkRulesClient.
func (*ClientFactory) NewWorkloadClassifiersClient ¶ added in v1.1.0
func (c *ClientFactory) NewWorkloadClassifiersClient() *WorkloadClassifiersClient
NewWorkloadClassifiersClient creates a new instance of WorkloadClassifiersClient.
func (*ClientFactory) NewWorkloadGroupsClient ¶ added in v1.1.0
func (c *ClientFactory) NewWorkloadGroupsClient() *WorkloadGroupsClient
NewWorkloadGroupsClient creates a new instance of WorkloadGroupsClient.
type ColumnDataType ¶
type ColumnDataType string
ColumnDataType - The column data type.
const ( ColumnDataTypeBigint ColumnDataType = "bigint" ColumnDataTypeBinary ColumnDataType = "binary" ColumnDataTypeBit ColumnDataType = "bit" ColumnDataTypeChar ColumnDataType = "char" ColumnDataTypeDate ColumnDataType = "date" ColumnDataTypeDatetime ColumnDataType = "datetime" ColumnDataTypeDatetime2 ColumnDataType = "datetime2" ColumnDataTypeDatetimeoffset ColumnDataType = "datetimeoffset" ColumnDataTypeDecimal ColumnDataType = "decimal" ColumnDataTypeFloat ColumnDataType = "float" ColumnDataTypeGeography ColumnDataType = "geography" ColumnDataTypeGeometry ColumnDataType = "geometry" ColumnDataTypeHierarchyid ColumnDataType = "hierarchyid" ColumnDataTypeImage ColumnDataType = "image" ColumnDataTypeInt ColumnDataType = "int" ColumnDataTypeMoney ColumnDataType = "money" ColumnDataTypeNchar ColumnDataType = "nchar" ColumnDataTypeNtext ColumnDataType = "ntext" ColumnDataTypeNumeric ColumnDataType = "numeric" ColumnDataTypeNvarchar ColumnDataType = "nvarchar" ColumnDataTypeReal ColumnDataType = "real" ColumnDataTypeSQLVariant ColumnDataType = "sql_variant" ColumnDataTypeSmalldatetime ColumnDataType = "smalldatetime" ColumnDataTypeSmallint ColumnDataType = "smallint" ColumnDataTypeSmallmoney ColumnDataType = "smallmoney" ColumnDataTypeSysname ColumnDataType = "sysname" ColumnDataTypeText ColumnDataType = "text" ColumnDataTypeTime ColumnDataType = "time" ColumnDataTypeTimestamp ColumnDataType = "timestamp" ColumnDataTypeTinyint ColumnDataType = "tinyint" ColumnDataTypeUniqueidentifier ColumnDataType = "uniqueidentifier" ColumnDataTypeVarbinary ColumnDataType = "varbinary" ColumnDataTypeVarchar ColumnDataType = "varchar" ColumnDataTypeXML ColumnDataType = "xml" )
func PossibleColumnDataTypeValues ¶
func PossibleColumnDataTypeValues() []ColumnDataType
PossibleColumnDataTypeValues returns the possible values for the ColumnDataType const type.
type CompleteDatabaseRestoreDefinition ¶
type CompleteDatabaseRestoreDefinition struct { // REQUIRED; The last backup name to apply LastBackupName *string }
CompleteDatabaseRestoreDefinition - Contains the information necessary to perform a complete database restore operation.
func (CompleteDatabaseRestoreDefinition) MarshalJSON ¶ added in v1.1.0
func (c CompleteDatabaseRestoreDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CompleteDatabaseRestoreDefinition.
func (*CompleteDatabaseRestoreDefinition) UnmarshalJSON ¶ added in v1.1.0
func (c *CompleteDatabaseRestoreDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CompleteDatabaseRestoreDefinition.
type ConnectionPolicyName ¶
type ConnectionPolicyName string
const (
ConnectionPolicyNameDefault ConnectionPolicyName = "default"
)
func PossibleConnectionPolicyNameValues ¶
func PossibleConnectionPolicyNameValues() []ConnectionPolicyName
PossibleConnectionPolicyNameValues returns the possible values for the ConnectionPolicyName const type.
type CopyLongTermRetentionBackupParameters ¶
type CopyLongTermRetentionBackupParameters struct { // Resource properties. Properties *CopyLongTermRetentionBackupParametersProperties }
CopyLongTermRetentionBackupParameters - Contains the information necessary to perform long term retention backup copy operation.
func (CopyLongTermRetentionBackupParameters) MarshalJSON ¶ added in v1.1.0
func (c CopyLongTermRetentionBackupParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CopyLongTermRetentionBackupParameters.
func (*CopyLongTermRetentionBackupParameters) UnmarshalJSON ¶ added in v1.1.0
func (c *CopyLongTermRetentionBackupParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CopyLongTermRetentionBackupParameters.
type CopyLongTermRetentionBackupParametersProperties ¶
type CopyLongTermRetentionBackupParametersProperties struct { // The storage redundancy type of the copied backup TargetBackupStorageRedundancy *BackupStorageRedundancy // The name of the database owns the copied backup. TargetDatabaseName *string // The resource group that owns the target server TargetResourceGroup *string // The fully qualified domain name of the target server TargetServerFullyQualifiedDomainName *string // The resource Id of the target server that owns the database TargetServerResourceID *string // The subscription that owns the target server TargetSubscriptionID *string }
CopyLongTermRetentionBackupParametersProperties - Contains the properties to perform long term retention backup copy operation.
func (CopyLongTermRetentionBackupParametersProperties) MarshalJSON ¶ added in v1.1.0
func (c CopyLongTermRetentionBackupParametersProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CopyLongTermRetentionBackupParametersProperties.
func (*CopyLongTermRetentionBackupParametersProperties) UnmarshalJSON ¶ added in v1.1.0
func (c *CopyLongTermRetentionBackupParametersProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CopyLongTermRetentionBackupParametersProperties.
type CreateDatabaseRestorePointDefinition ¶
type CreateDatabaseRestorePointDefinition struct { // REQUIRED; The restore point label to apply RestorePointLabel *string }
CreateDatabaseRestorePointDefinition - Contains the information necessary to perform a create database restore point operation.
func (CreateDatabaseRestorePointDefinition) MarshalJSON ¶ added in v1.1.0
func (c CreateDatabaseRestorePointDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CreateDatabaseRestorePointDefinition.
func (*CreateDatabaseRestorePointDefinition) UnmarshalJSON ¶ added in v1.1.0
func (c *CreateDatabaseRestorePointDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CreateDatabaseRestorePointDefinition.
type CreateMode ¶
type CreateMode string
CreateMode - Specifies the mode of database creation. Default: regular database creation. Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of the source database. Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified as the resource ID of the existing primary database. PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be specified. Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the recoverable database resource ID to restore. Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime may also be specified to restore from an earlier point in time. RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID. Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition.
const ( CreateModeCopy CreateMode = "Copy" CreateModeDefault CreateMode = "Default" CreateModeOnlineSecondary CreateMode = "OnlineSecondary" CreateModePointInTimeRestore CreateMode = "PointInTimeRestore" CreateModeRecovery CreateMode = "Recovery" CreateModeRestore CreateMode = "Restore" CreateModeRestoreExternalBackup CreateMode = "RestoreExternalBackup" CreateModeRestoreExternalBackupSecondary CreateMode = "RestoreExternalBackupSecondary" CreateModeRestoreLongTermRetentionBackup CreateMode = "RestoreLongTermRetentionBackup" CreateModeSecondary CreateMode = "Secondary" )
func PossibleCreateModeValues ¶
func PossibleCreateModeValues() []CreateMode
PossibleCreateModeValues returns the possible values for the CreateMode const type.
type CreatedByType ¶
type CreatedByType string
CreatedByType - The type of identity that created the resource.
const ( CreatedByTypeApplication CreatedByType = "Application" CreatedByTypeKey CreatedByType = "Key" CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" CreatedByTypeUser CreatedByType = "User" )
func PossibleCreatedByTypeValues ¶
func PossibleCreatedByTypeValues() []CreatedByType
PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
type DNSRefreshConfigurationProperties ¶
type DNSRefreshConfigurationProperties struct { // READ-ONLY; The status of the DNS refresh operation. Status *DNSRefreshConfigurationPropertiesStatus }
DNSRefreshConfigurationProperties - DNS refresh configuration properties.
func (DNSRefreshConfigurationProperties) MarshalJSON ¶ added in v1.1.0
func (d DNSRefreshConfigurationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DNSRefreshConfigurationProperties.
func (*DNSRefreshConfigurationProperties) UnmarshalJSON ¶ added in v1.1.0
func (d *DNSRefreshConfigurationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DNSRefreshConfigurationProperties.
type DNSRefreshConfigurationPropertiesStatus ¶
type DNSRefreshConfigurationPropertiesStatus string
DNSRefreshConfigurationPropertiesStatus - The status of the DNS refresh operation.
const ( DNSRefreshConfigurationPropertiesStatusFailed DNSRefreshConfigurationPropertiesStatus = "Failed" DNSRefreshConfigurationPropertiesStatusSucceeded DNSRefreshConfigurationPropertiesStatus = "Succeeded" )
func PossibleDNSRefreshConfigurationPropertiesStatusValues ¶
func PossibleDNSRefreshConfigurationPropertiesStatusValues() []DNSRefreshConfigurationPropertiesStatus
PossibleDNSRefreshConfigurationPropertiesStatusValues returns the possible values for the DNSRefreshConfigurationPropertiesStatus const type.
type DataMaskingFunction ¶
type DataMaskingFunction string
DataMaskingFunction - The masking function that is used for the data masking rule.
const ( DataMaskingFunctionCCN DataMaskingFunction = "CCN" DataMaskingFunctionDefault DataMaskingFunction = "Default" DataMaskingFunctionEmail DataMaskingFunction = "Email" DataMaskingFunctionNumber DataMaskingFunction = "Number" DataMaskingFunctionSSN DataMaskingFunction = "SSN" DataMaskingFunctionText DataMaskingFunction = "Text" )
func PossibleDataMaskingFunctionValues ¶
func PossibleDataMaskingFunctionValues() []DataMaskingFunction
PossibleDataMaskingFunctionValues returns the possible values for the DataMaskingFunction const type.
type DataMaskingPoliciesClient ¶
type DataMaskingPoliciesClient struct {
// contains filtered or unexported fields
}
DataMaskingPoliciesClient contains the methods for the DataMaskingPolicies group. Don't use this type directly, use NewDataMaskingPoliciesClient() instead.
func NewDataMaskingPoliciesClient ¶
func NewDataMaskingPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataMaskingPoliciesClient, error)
NewDataMaskingPoliciesClient creates a new instance of DataMaskingPoliciesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DataMaskingPoliciesClient) CreateOrUpdate ¶
func (client *DataMaskingPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DataMaskingPolicy, options *DataMaskingPoliciesClientCreateOrUpdateOptions) (DataMaskingPoliciesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates a database data masking policy If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2014-04-01
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- parameters - Parameters for creating or updating a data masking policy.
- options - DataMaskingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the DataMaskingPoliciesClient.CreateOrUpdate method.
Example (CreateOrUpdateDataMaskingPolicyMax) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingPolicyCreateOrUpdateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDataMaskingPoliciesClient().CreateOrUpdate(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", armsql.DataMaskingPolicy{ Properties: &armsql.DataMaskingPolicyProperties{ DataMaskingState: to.Ptr(armsql.DataMaskingStateEnabled), ExemptPrincipals: to.Ptr("testuser;"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DataMaskingPolicy = armsql.DataMaskingPolicy{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/dataMaskingPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-2080/databases/sqlcrudtest-331/dataMaskingPolicies/Default"), // Location: to.Ptr("Central US"), // Properties: &armsql.DataMaskingPolicyProperties{ // ApplicationPrincipals: to.Ptr(""), // DataMaskingState: to.Ptr(armsql.DataMaskingStateEnabled), // ExemptPrincipals: to.Ptr("testuser;"), // MaskingLevel: to.Ptr(""), // }, // } }
Output:
Example (CreateOrUpdateDataMaskingPolicyMin) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingPolicyCreateOrUpdateMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDataMaskingPoliciesClient().CreateOrUpdate(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", armsql.DataMaskingPolicy{ Properties: &armsql.DataMaskingPolicyProperties{ DataMaskingState: to.Ptr(armsql.DataMaskingStateEnabled), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DataMaskingPolicy = armsql.DataMaskingPolicy{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/dataMaskingPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-2080/databases/sqlcrudtest-331/dataMaskingPolicies/Default"), // Location: to.Ptr("Central US"), // Properties: &armsql.DataMaskingPolicyProperties{ // ApplicationPrincipals: to.Ptr(""), // DataMaskingState: to.Ptr(armsql.DataMaskingStateEnabled), // ExemptPrincipals: to.Ptr(""), // MaskingLevel: to.Ptr(""), // }, // } }
Output:
func (*DataMaskingPoliciesClient) Get ¶
func (client *DataMaskingPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DataMaskingPoliciesClientGetOptions) (DataMaskingPoliciesClientGetResponse, error)
Get - Gets a database data masking policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2014-04-01
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - DataMaskingPoliciesClientGetOptions contains the optional parameters for the DataMaskingPoliciesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingPolicyGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDataMaskingPoliciesClient().Get(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DataMaskingPolicy = armsql.DataMaskingPolicy{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/dataMaskingPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-2080/databases/sqlcrudtest-331/dataMaskingPolicies/Default"), // Location: to.Ptr("Central US"), // Properties: &armsql.DataMaskingPolicyProperties{ // ApplicationPrincipals: to.Ptr(""), // DataMaskingState: to.Ptr(armsql.DataMaskingStateEnabled), // ExemptPrincipals: to.Ptr(""), // MaskingLevel: to.Ptr(""), // }, // } }
Output:
type DataMaskingPoliciesClientCreateOrUpdateOptions ¶ added in v0.3.0
type DataMaskingPoliciesClientCreateOrUpdateOptions struct { }
DataMaskingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the DataMaskingPoliciesClient.CreateOrUpdate method.
type DataMaskingPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type DataMaskingPoliciesClientCreateOrUpdateResponse struct { // Represents a database data masking policy. DataMaskingPolicy }
DataMaskingPoliciesClientCreateOrUpdateResponse contains the response from method DataMaskingPoliciesClient.CreateOrUpdate.
type DataMaskingPoliciesClientGetOptions ¶ added in v0.3.0
type DataMaskingPoliciesClientGetOptions struct { }
DataMaskingPoliciesClientGetOptions contains the optional parameters for the DataMaskingPoliciesClient.Get method.
type DataMaskingPoliciesClientGetResponse ¶ added in v0.3.0
type DataMaskingPoliciesClientGetResponse struct { // Represents a database data masking policy. DataMaskingPolicy }
DataMaskingPoliciesClientGetResponse contains the response from method DataMaskingPoliciesClient.Get.
type DataMaskingPolicy ¶
type DataMaskingPolicy struct { // The properties of the data masking policy. Properties *DataMaskingPolicyProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; The kind of data masking policy. Metadata, used for Azure portal. Kind *string // READ-ONLY; The location of the data masking policy. Location *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
DataMaskingPolicy - Represents a database data masking policy.
func (DataMaskingPolicy) MarshalJSON ¶
func (d DataMaskingPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DataMaskingPolicy.
func (*DataMaskingPolicy) UnmarshalJSON ¶ added in v1.1.0
func (d *DataMaskingPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DataMaskingPolicy.
type DataMaskingPolicyProperties ¶
type DataMaskingPolicyProperties struct { // REQUIRED; The state of the data masking policy. DataMaskingState *DataMaskingState // The list of the exempt principals. Specifies the semicolon-separated list of database users for which the data masking // policy does not apply. The specified users receive data results without masking // for all of the database queries. ExemptPrincipals *string // READ-ONLY; The list of the application principals. This is a legacy parameter and is no longer used. ApplicationPrincipals *string // READ-ONLY; The masking level. This is a legacy parameter and is no longer used. MaskingLevel *string }
DataMaskingPolicyProperties - The properties of a database data masking policy.
func (DataMaskingPolicyProperties) MarshalJSON ¶ added in v1.1.0
func (d DataMaskingPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DataMaskingPolicyProperties.
func (*DataMaskingPolicyProperties) UnmarshalJSON ¶ added in v1.1.0
func (d *DataMaskingPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DataMaskingPolicyProperties.
type DataMaskingRule ¶
type DataMaskingRule struct { // The properties of the resource. Properties *DataMaskingRuleProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; The kind of Data Masking Rule. Metadata, used for Azure portal. Kind *string // READ-ONLY; The location of the data masking rule. Location *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
DataMaskingRule - Represents a database data masking rule.
func (DataMaskingRule) MarshalJSON ¶
func (d DataMaskingRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DataMaskingRule.
func (*DataMaskingRule) UnmarshalJSON ¶ added in v1.1.0
func (d *DataMaskingRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DataMaskingRule.
type DataMaskingRuleListResult ¶
type DataMaskingRuleListResult struct { // The list of database data masking rules. Value []*DataMaskingRule }
DataMaskingRuleListResult - The response to a list data masking rules request.
func (DataMaskingRuleListResult) MarshalJSON ¶
func (d DataMaskingRuleListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DataMaskingRuleListResult.
func (*DataMaskingRuleListResult) UnmarshalJSON ¶ added in v1.1.0
func (d *DataMaskingRuleListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DataMaskingRuleListResult.
type DataMaskingRuleProperties ¶
type DataMaskingRuleProperties struct { // REQUIRED; The column name on which the data masking rule is applied. ColumnName *string // REQUIRED; The masking function that is used for the data masking rule. MaskingFunction *DataMaskingFunction // REQUIRED; The schema name on which the data masking rule is applied. SchemaName *string // REQUIRED; The table name on which the data masking rule is applied. TableName *string // The alias name. This is a legacy parameter and is no longer used. AliasName *string // The numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will // be ignored. NumberFrom *string // The numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter // will be ignored. NumberTo *string // If maskingFunction is set to Text, the number of characters to show unmasked in the beginning of the string. Otherwise, // this parameter will be ignored. PrefixSize *string // If maskingFunction is set to Text, the character to use for masking the unexposed part of the string. Otherwise, this parameter // will be ignored. ReplacementString *string // The rule state. Used to delete a rule. To delete an existing rule, specify the schemaName, tableName, columnName, maskingFunction, // and specify ruleState as disabled. However, if the rule doesn't // already exist, the rule will be created with ruleState set to enabled, regardless of the provided value of ruleState. RuleState *DataMaskingRuleState // If maskingFunction is set to Text, the number of characters to show unmasked at the end of the string. Otherwise, this // parameter will be ignored. SuffixSize *string // READ-ONLY; The rule Id. ID *string }
DataMaskingRuleProperties - The properties of a database data masking rule.
func (DataMaskingRuleProperties) MarshalJSON ¶ added in v1.1.0
func (d DataMaskingRuleProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DataMaskingRuleProperties.
func (*DataMaskingRuleProperties) UnmarshalJSON ¶ added in v1.1.0
func (d *DataMaskingRuleProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DataMaskingRuleProperties.
type DataMaskingRuleState ¶
type DataMaskingRuleState string
DataMaskingRuleState - The rule state. Used to delete a rule. To delete an existing rule, specify the schemaName, tableName, columnName, maskingFunction, and specify ruleState as disabled. However, if the rule doesn't already exist, the rule will be created with ruleState set to enabled, regardless of the provided value of ruleState.
const ( DataMaskingRuleStateDisabled DataMaskingRuleState = "Disabled" DataMaskingRuleStateEnabled DataMaskingRuleState = "Enabled" )
func PossibleDataMaskingRuleStateValues ¶
func PossibleDataMaskingRuleStateValues() []DataMaskingRuleState
PossibleDataMaskingRuleStateValues returns the possible values for the DataMaskingRuleState const type.
type DataMaskingRulesClient ¶
type DataMaskingRulesClient struct {
// contains filtered or unexported fields
}
DataMaskingRulesClient contains the methods for the DataMaskingRules group. Don't use this type directly, use NewDataMaskingRulesClient() instead.
func NewDataMaskingRulesClient ¶
func NewDataMaskingRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataMaskingRulesClient, error)
NewDataMaskingRulesClient creates a new instance of DataMaskingRulesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DataMaskingRulesClient) CreateOrUpdate ¶
func (client *DataMaskingRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, dataMaskingRuleName string, parameters DataMaskingRule, options *DataMaskingRulesClientCreateOrUpdateOptions) (DataMaskingRulesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates a database data masking rule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2014-04-01
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- dataMaskingRuleName - The name of the data masking rule.
- parameters - The required parameters for creating or updating a data masking rule.
- options - DataMaskingRulesClientCreateOrUpdateOptions contains the optional parameters for the DataMaskingRulesClient.CreateOrUpdate method.
Example (CreateUpdateDataMaskingRuleForDefaultMax) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateDefaultMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDataMaskingRulesClient().CreateOrUpdate(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", "rule1", armsql.DataMaskingRule{ Properties: &armsql.DataMaskingRuleProperties{ AliasName: to.Ptr("nickname"), ColumnName: to.Ptr("test1"), MaskingFunction: to.Ptr(armsql.DataMaskingFunctionDefault), RuleState: to.Ptr(armsql.DataMaskingRuleStateEnabled), SchemaName: to.Ptr("dbo"), TableName: to.Ptr("Table_1"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DataMaskingRule = armsql.DataMaskingRule{ // Type: to.Ptr("Microsoft.Sql/servers/databases/dataMaskingPolicies/rules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-6852/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/"), // Location: to.Ptr("Central US"), // Properties: &armsql.DataMaskingRuleProperties{ // AliasName: to.Ptr("nickname"), // ColumnName: to.Ptr("test1"), // ID: to.Ptr("dbo_Table_1_test1"), // MaskingFunction: to.Ptr(armsql.DataMaskingFunctionDefault), // RuleState: to.Ptr(armsql.DataMaskingRuleStateEnabled), // SchemaName: to.Ptr("dbo"), // TableName: to.Ptr("Table_1"), // }, // } }
Output:
Example (CreateUpdateDataMaskingRuleForDefaultMin) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateDefaultMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDataMaskingRulesClient().CreateOrUpdate(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", "rule1", armsql.DataMaskingRule{ Properties: &armsql.DataMaskingRuleProperties{ ColumnName: to.Ptr("test1"), MaskingFunction: to.Ptr(armsql.DataMaskingFunctionDefault), SchemaName: to.Ptr("dbo"), TableName: to.Ptr("Table_1"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DataMaskingRule = armsql.DataMaskingRule{ // Type: to.Ptr("Microsoft.Sql/servers/databases/dataMaskingPolicies/rules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-6852/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/"), // Location: to.Ptr("Central US"), // Properties: &armsql.DataMaskingRuleProperties{ // ColumnName: to.Ptr("test1"), // ID: to.Ptr("dbo_Table_1_test1"), // MaskingFunction: to.Ptr(armsql.DataMaskingFunctionDefault), // RuleState: to.Ptr(armsql.DataMaskingRuleStateEnabled), // SchemaName: to.Ptr("dbo"), // TableName: to.Ptr("Table_1"), // }, // } }
Output:
Example (CreateUpdateDataMaskingRuleForNumbers) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateNumber.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDataMaskingRulesClient().CreateOrUpdate(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", "rule1", armsql.DataMaskingRule{ Properties: &armsql.DataMaskingRuleProperties{ ColumnName: to.Ptr("test1"), MaskingFunction: to.Ptr(armsql.DataMaskingFunctionNumber), NumberFrom: to.Ptr("0"), NumberTo: to.Ptr("2"), SchemaName: to.Ptr("dbo"), TableName: to.Ptr("Table_1"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DataMaskingRule = armsql.DataMaskingRule{ // Type: to.Ptr("Microsoft.Sql/servers/databases/dataMaskingPolicies/rules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-6852/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/"), // Location: to.Ptr("Central US"), // Properties: &armsql.DataMaskingRuleProperties{ // ColumnName: to.Ptr("test1"), // ID: to.Ptr("dbo_Table_1_test1"), // MaskingFunction: to.Ptr(armsql.DataMaskingFunctionNumber), // NumberFrom: to.Ptr("0"), // NumberTo: to.Ptr("2"), // RuleState: to.Ptr(armsql.DataMaskingRuleStateEnabled), // SchemaName: to.Ptr("dbo"), // TableName: to.Ptr("Table_1"), // }, // } }
Output:
Example (CreateUpdateDataMaskingRuleForText) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateText.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDataMaskingRulesClient().CreateOrUpdate(ctx, "sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", "rule1", armsql.DataMaskingRule{ Properties: &armsql.DataMaskingRuleProperties{ ColumnName: to.Ptr("test1"), MaskingFunction: to.Ptr(armsql.DataMaskingFunctionText), PrefixSize: to.Ptr("1"), ReplacementString: to.Ptr("asdf"), SchemaName: to.Ptr("dbo"), SuffixSize: to.Ptr("0"), TableName: to.Ptr("Table_1"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DataMaskingRule = armsql.DataMaskingRule{ // Type: to.Ptr("Microsoft.Sql/servers/databases/dataMaskingPolicies/rules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-6852/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/"), // Location: to.Ptr("Central US"), // Properties: &armsql.DataMaskingRuleProperties{ // ColumnName: to.Ptr("test1"), // ID: to.Ptr("dbo_Table_1_test1"), // MaskingFunction: to.Ptr(armsql.DataMaskingFunctionText), // PrefixSize: to.Ptr("1"), // ReplacementString: to.Ptr("asdf"), // RuleState: to.Ptr(armsql.DataMaskingRuleStateEnabled), // SchemaName: to.Ptr("dbo"), // SuffixSize: to.Ptr("0"), // TableName: to.Ptr("Table_1"), // }, // } }
Output:
func (*DataMaskingRulesClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *DataMaskingRulesClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *DataMaskingRulesClientListByDatabaseOptions) *runtime.Pager[DataMaskingRulesClientListByDatabaseResponse]
NewListByDatabasePager - Gets a list of database data masking rules.
Generated from API version 2014-04-01
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - DataMaskingRulesClientListByDatabaseOptions contains the optional parameters for the DataMaskingRulesClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDataMaskingRulesClient().NewListByDatabasePager("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DataMaskingRuleListResult = armsql.DataMaskingRuleListResult{ // Value: []*armsql.DataMaskingRule{ // { // Type: to.Ptr("Microsoft.Sql/servers/databases/dataMaskingPolicies/rules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-6852/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/"), // Location: to.Ptr("Central US"), // Properties: &armsql.DataMaskingRuleProperties{ // ColumnName: to.Ptr("test1"), // ID: to.Ptr("dbo_Table_1_test1"), // MaskingFunction: to.Ptr(armsql.DataMaskingFunctionText), // PrefixSize: to.Ptr("1"), // ReplacementString: to.Ptr("asdf"), // RuleState: to.Ptr(armsql.DataMaskingRuleStateEnabled), // SchemaName: to.Ptr("dbo"), // SuffixSize: to.Ptr("0"), // TableName: to.Ptr("Table_1"), // }, // }, // { // Type: to.Ptr("Microsoft.Sql/servers/databases/dataMaskingPolicies/rules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6852/providers/Microsoft.Sql/servers/sqlcrudtest-6852/databases/sqlcrudtest-331/dataMaskingPolicies/Default/rules/"), // Location: to.Ptr("Central US"), // Properties: &armsql.DataMaskingRuleProperties{ // ColumnName: to.Ptr("test1"), // ID: to.Ptr("dbo_Table_1_test1"), // MaskingFunction: to.Ptr(armsql.DataMaskingFunctionNumber), // NumberFrom: to.Ptr("0"), // NumberTo: to.Ptr("2"), // RuleState: to.Ptr(armsql.DataMaskingRuleStateEnabled), // SchemaName: to.Ptr("dbo"), // TableName: to.Ptr("Table_1"), // }, // }}, // } } }
Output:
type DataMaskingRulesClientCreateOrUpdateOptions ¶ added in v0.3.0
type DataMaskingRulesClientCreateOrUpdateOptions struct { }
DataMaskingRulesClientCreateOrUpdateOptions contains the optional parameters for the DataMaskingRulesClient.CreateOrUpdate method.
type DataMaskingRulesClientCreateOrUpdateResponse ¶ added in v0.3.0
type DataMaskingRulesClientCreateOrUpdateResponse struct { // Represents a database data masking rule. DataMaskingRule }
DataMaskingRulesClientCreateOrUpdateResponse contains the response from method DataMaskingRulesClient.CreateOrUpdate.
type DataMaskingRulesClientListByDatabaseOptions ¶ added in v0.3.0
type DataMaskingRulesClientListByDatabaseOptions struct { }
DataMaskingRulesClientListByDatabaseOptions contains the optional parameters for the DataMaskingRulesClient.NewListByDatabasePager method.
type DataMaskingRulesClientListByDatabaseResponse ¶ added in v0.3.0
type DataMaskingRulesClientListByDatabaseResponse struct { // The response to a list data masking rules request. DataMaskingRuleListResult }
DataMaskingRulesClientListByDatabaseResponse contains the response from method DataMaskingRulesClient.NewListByDatabasePager.
type DataMaskingState ¶
type DataMaskingState string
DataMaskingState - The state of the data masking policy.
const ( DataMaskingStateDisabled DataMaskingState = "Disabled" DataMaskingStateEnabled DataMaskingState = "Enabled" )
func PossibleDataMaskingStateValues ¶
func PossibleDataMaskingStateValues() []DataMaskingState
PossibleDataMaskingStateValues returns the possible values for the DataMaskingState const type.
type DataWarehouseUserActivities ¶
type DataWarehouseUserActivities struct { // Resource properties. Properties *DataWarehouseUserActivitiesProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
DataWarehouseUserActivities - User activities of a data warehouse
func (DataWarehouseUserActivities) MarshalJSON ¶
func (d DataWarehouseUserActivities) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DataWarehouseUserActivities.
func (*DataWarehouseUserActivities) UnmarshalJSON ¶ added in v1.1.0
func (d *DataWarehouseUserActivities) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DataWarehouseUserActivities.
type DataWarehouseUserActivitiesClient ¶
type DataWarehouseUserActivitiesClient struct {
// contains filtered or unexported fields
}
DataWarehouseUserActivitiesClient contains the methods for the DataWarehouseUserActivities group. Don't use this type directly, use NewDataWarehouseUserActivitiesClient() instead.
func NewDataWarehouseUserActivitiesClient ¶
func NewDataWarehouseUserActivitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataWarehouseUserActivitiesClient, error)
NewDataWarehouseUserActivitiesClient creates a new instance of DataWarehouseUserActivitiesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DataWarehouseUserActivitiesClient) Get ¶
func (client *DataWarehouseUserActivitiesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, dataWarehouseUserActivityName DataWarehouseUserActivityName, options *DataWarehouseUserActivitiesClientGetOptions) (DataWarehouseUserActivitiesClientGetResponse, error)
Get - Gets the user activities of a data warehouse which includes running and suspended queries If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- dataWarehouseUserActivityName - The activity name of the data warehouse.
- options - DataWarehouseUserActivitiesClientGetOptions contains the optional parameters for the DataWarehouseUserActivitiesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetDataWarehouseUserActivities.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDataWarehouseUserActivitiesClient().Get(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", armsql.DataWarehouseUserActivityNameCurrent, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DataWarehouseUserActivities = armsql.DataWarehouseUserActivities{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/servers/databases/dataWarehouseUserActivities"), // ID: to.Ptr("subscriptions/326affc3-21f4-4471-a545-e37430b70113/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/testsvr/databases/dwdb01/dataWarehouseUserActivities/current"), // Properties: &armsql.DataWarehouseUserActivitiesProperties{ // ActiveQueriesCount: to.Ptr[int32](0), // }, // } }
Output:
func (*DataWarehouseUserActivitiesClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *DataWarehouseUserActivitiesClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *DataWarehouseUserActivitiesClientListByDatabaseOptions) *runtime.Pager[DataWarehouseUserActivitiesClientListByDatabaseResponse]
NewListByDatabasePager - List the user activities of a data warehouse which includes running and suspended queries
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - DataWarehouseUserActivitiesClientListByDatabaseOptions contains the optional parameters for the DataWarehouseUserActivitiesClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListDataWarehouseUserActivities.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDataWarehouseUserActivitiesClient().NewListByDatabasePager("Default-SQL-SouthEastAsia", "testsvr", "testdb", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DataWarehouseUserActivitiesListResult = armsql.DataWarehouseUserActivitiesListResult{ // Value: []*armsql.DataWarehouseUserActivities{ // { // Type: to.Ptr("Microsoft.Sql/servers/databases/dataWarehouseUserActivities"), // ID: to.Ptr("subscriptions/326affc3-21f4-4471-a545-e37430b70113/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/testsvr/databases/dwdb01/dataWarehouseUserActivities/current"), // Properties: &armsql.DataWarehouseUserActivitiesProperties{ // ActiveQueriesCount: to.Ptr[int32](0), // }, // }}, // } } }
Output:
type DataWarehouseUserActivitiesClientGetOptions ¶ added in v0.3.0
type DataWarehouseUserActivitiesClientGetOptions struct { }
DataWarehouseUserActivitiesClientGetOptions contains the optional parameters for the DataWarehouseUserActivitiesClient.Get method.
type DataWarehouseUserActivitiesClientGetResponse ¶ added in v0.3.0
type DataWarehouseUserActivitiesClientGetResponse struct { // User activities of a data warehouse DataWarehouseUserActivities }
DataWarehouseUserActivitiesClientGetResponse contains the response from method DataWarehouseUserActivitiesClient.Get.
type DataWarehouseUserActivitiesClientListByDatabaseOptions ¶ added in v0.3.0
type DataWarehouseUserActivitiesClientListByDatabaseOptions struct { }
DataWarehouseUserActivitiesClientListByDatabaseOptions contains the optional parameters for the DataWarehouseUserActivitiesClient.NewListByDatabasePager method.
type DataWarehouseUserActivitiesClientListByDatabaseResponse ¶ added in v0.3.0
type DataWarehouseUserActivitiesClientListByDatabaseResponse struct { // User activities of a data warehouse DataWarehouseUserActivitiesListResult }
DataWarehouseUserActivitiesClientListByDatabaseResponse contains the response from method DataWarehouseUserActivitiesClient.NewListByDatabasePager.
type DataWarehouseUserActivitiesListResult ¶
type DataWarehouseUserActivitiesListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*DataWarehouseUserActivities }
DataWarehouseUserActivitiesListResult - User activities of a data warehouse
func (DataWarehouseUserActivitiesListResult) MarshalJSON ¶
func (d DataWarehouseUserActivitiesListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DataWarehouseUserActivitiesListResult.
func (*DataWarehouseUserActivitiesListResult) UnmarshalJSON ¶ added in v1.1.0
func (d *DataWarehouseUserActivitiesListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DataWarehouseUserActivitiesListResult.
type DataWarehouseUserActivitiesProperties ¶
type DataWarehouseUserActivitiesProperties struct { // READ-ONLY; Count of running and suspended queries. ActiveQueriesCount *int32 }
DataWarehouseUserActivitiesProperties - User activities of a data warehouse. This currently includes the count of running or suspended queries. For more information, please view the sys.dmpdwexec_requests dynamic management view (DMV).
func (DataWarehouseUserActivitiesProperties) MarshalJSON ¶ added in v1.1.0
func (d DataWarehouseUserActivitiesProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DataWarehouseUserActivitiesProperties.
func (*DataWarehouseUserActivitiesProperties) UnmarshalJSON ¶ added in v1.1.0
func (d *DataWarehouseUserActivitiesProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DataWarehouseUserActivitiesProperties.
type DataWarehouseUserActivityName ¶
type DataWarehouseUserActivityName string
const (
DataWarehouseUserActivityNameCurrent DataWarehouseUserActivityName = "current"
)
func PossibleDataWarehouseUserActivityNameValues ¶
func PossibleDataWarehouseUserActivityNameValues() []DataWarehouseUserActivityName
PossibleDataWarehouseUserActivityNameValues returns the possible values for the DataWarehouseUserActivityName const type.
type Database ¶
type Database struct { // REQUIRED; Resource location. Location *string // The Azure Active Directory identity of the database. Identity *DatabaseIdentity // Resource properties. Properties *DatabaseProperties // The database SKU. // The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, // and capacity) that are available to your subscription in an Azure region, // use the Capabilities_ListByLocation REST API or one of the following commands: // az sql db list-editions -l <location> -o table // ` // Get-AzSqlServerServiceObjective -Location <location> // ` SKU *SKU // Resource tags. Tags map[string]*string // READ-ONLY; Resource ID. ID *string // READ-ONLY; Kind of database. This is metadata used for the Azure portal experience. Kind *string // READ-ONLY; Resource that manages the database. ManagedBy *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
Database - A database resource.
func (Database) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Database.
func (*Database) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Database.
type DatabaseAdvancedThreatProtection ¶ added in v1.0.0
type DatabaseAdvancedThreatProtection struct { // Resource properties. Properties *AdvancedThreatProtectionProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; SystemData of AdvancedThreatProtectionResource. SystemData *SystemData // READ-ONLY; Resource type. Type *string }
DatabaseAdvancedThreatProtection - A database Advanced Threat Protection.
func (DatabaseAdvancedThreatProtection) MarshalJSON ¶ added in v1.1.0
func (d DatabaseAdvancedThreatProtection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseAdvancedThreatProtection.
func (*DatabaseAdvancedThreatProtection) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseAdvancedThreatProtection) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAdvancedThreatProtection.
type DatabaseAdvancedThreatProtectionListResult ¶ added in v1.0.0
type DatabaseAdvancedThreatProtectionListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*DatabaseAdvancedThreatProtection }
DatabaseAdvancedThreatProtectionListResult - A list of the database's Advanced Threat Protection configurations.
func (DatabaseAdvancedThreatProtectionListResult) MarshalJSON ¶ added in v1.1.0
func (d DatabaseAdvancedThreatProtectionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseAdvancedThreatProtectionListResult.
func (*DatabaseAdvancedThreatProtectionListResult) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseAdvancedThreatProtectionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAdvancedThreatProtectionListResult.
type DatabaseAdvancedThreatProtectionSettingsClient ¶ added in v1.0.0
type DatabaseAdvancedThreatProtectionSettingsClient struct {
// contains filtered or unexported fields
}
DatabaseAdvancedThreatProtectionSettingsClient contains the methods for the DatabaseAdvancedThreatProtectionSettings group. Don't use this type directly, use NewDatabaseAdvancedThreatProtectionSettingsClient() instead.
func NewDatabaseAdvancedThreatProtectionSettingsClient ¶ added in v1.0.0
func NewDatabaseAdvancedThreatProtectionSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseAdvancedThreatProtectionSettingsClient, error)
NewDatabaseAdvancedThreatProtectionSettingsClient creates a new instance of DatabaseAdvancedThreatProtectionSettingsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DatabaseAdvancedThreatProtectionSettingsClient) CreateOrUpdate ¶ added in v1.0.0
func (client *DatabaseAdvancedThreatProtectionSettingsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, advancedThreatProtectionName AdvancedThreatProtectionName, parameters DatabaseAdvancedThreatProtection, options *DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateOptions) (DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates a database's Advanced Threat Protection state. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- advancedThreatProtectionName - The name of the Advanced Threat Protection state.
- parameters - The database Advanced Threat Protection state.
- options - DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateOptions contains the optional parameters for the DatabaseAdvancedThreatProtectionSettingsClient.CreateOrUpdate method.
Example (UpdateADatabasesAdvancedThreatProtectionSettingsWithAllParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DatabaseAdvancedThreatProtectionSettingsCreateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseAdvancedThreatProtectionSettingsClient().CreateOrUpdate(ctx, "threatprotection-4799", "threatprotection-6440", "testdb", armsql.AdvancedThreatProtectionNameDefault, armsql.DatabaseAdvancedThreatProtection{ Properties: &armsql.AdvancedThreatProtectionProperties{ State: to.Ptr(armsql.AdvancedThreatProtectionStateEnabled), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseAdvancedThreatProtection = armsql.DatabaseAdvancedThreatProtection{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advancedThreatProtectionSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/servers/threatprotection-6440/advancedThreatProtectionSettings/Default"), // Properties: &armsql.AdvancedThreatProtectionProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // State: to.Ptr(armsql.AdvancedThreatProtectionStateEnabled), // }, // SystemData: &armsql.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armsql.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armsql.CreatedByTypeUser), // }, // } }
Output:
Example (UpdateADatabasesAdvancedThreatProtectionSettingsWithMinimalParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DatabaseAdvancedThreatProtectionSettingsCreateMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseAdvancedThreatProtectionSettingsClient().CreateOrUpdate(ctx, "threatprotection-4799", "threatprotection-6440", "testdb", armsql.AdvancedThreatProtectionNameDefault, armsql.DatabaseAdvancedThreatProtection{ Properties: &armsql.AdvancedThreatProtectionProperties{ State: to.Ptr(armsql.AdvancedThreatProtectionStateDisabled), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseAdvancedThreatProtection = armsql.DatabaseAdvancedThreatProtection{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advancedThreatProtectionSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/servers/threatprotection-6440/advancedThreatProtectionSettings/Default"), // Properties: &armsql.AdvancedThreatProtectionProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // State: to.Ptr(armsql.AdvancedThreatProtectionStateDisabled), // }, // SystemData: &armsql.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armsql.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armsql.CreatedByTypeUser), // }, // } }
Output:
func (*DatabaseAdvancedThreatProtectionSettingsClient) Get ¶ added in v1.0.0
func (client *DatabaseAdvancedThreatProtectionSettingsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, advancedThreatProtectionName AdvancedThreatProtectionName, options *DatabaseAdvancedThreatProtectionSettingsClientGetOptions) (DatabaseAdvancedThreatProtectionSettingsClientGetResponse, error)
Get - Gets a database's Advanced Threat Protection state. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- advancedThreatProtectionName - The name of the Advanced Threat Protection state.
- options - DatabaseAdvancedThreatProtectionSettingsClientGetOptions contains the optional parameters for the DatabaseAdvancedThreatProtectionSettingsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DatabaseAdvancedThreatProtectionSettingsGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseAdvancedThreatProtectionSettingsClient().Get(ctx, "threatprotection-6852", "threatprotection-2080", "testdb", armsql.AdvancedThreatProtectionNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseAdvancedThreatProtection = armsql.DatabaseAdvancedThreatProtection{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advancedThreatProtectionSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/servers/threatprotection-6440/advancedThreatProtectionSettings/Default"), // Properties: &armsql.AdvancedThreatProtectionProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // State: to.Ptr(armsql.AdvancedThreatProtectionStateEnabled), // }, // SystemData: &armsql.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armsql.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armsql.CreatedByTypeUser), // }, // } }
Output:
func (*DatabaseAdvancedThreatProtectionSettingsClient) NewListByDatabasePager ¶ added in v1.0.0
func (client *DatabaseAdvancedThreatProtectionSettingsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseOptions) *runtime.Pager[DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseResponse]
NewListByDatabasePager - Gets a list of database's Advanced Threat Protection states.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseOptions contains the optional parameters for the DatabaseAdvancedThreatProtectionSettingsClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DatabaseAdvancedThreatProtectionSettingsListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDatabaseAdvancedThreatProtectionSettingsClient().NewListByDatabasePager("threatprotection-6852", "threatprotection-2080", "testdb", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DatabaseAdvancedThreatProtectionListResult = armsql.DatabaseAdvancedThreatProtectionListResult{ // Value: []*armsql.DatabaseAdvancedThreatProtection{ // { // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advancedThreatProtectionSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-6852/providers/Microsoft.Sql/servers/threatprotection-2080/databases/testdb/advancedThreatProtectionSettings/Default"), // Properties: &armsql.AdvancedThreatProtectionProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // State: to.Ptr(armsql.AdvancedThreatProtectionStateEnabled), // }, // SystemData: &armsql.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armsql.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armsql.CreatedByTypeUser), // }, // }}, // } } }
Output:
type DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateOptions ¶ added in v1.0.0
type DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateOptions struct { }
DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateOptions contains the optional parameters for the DatabaseAdvancedThreatProtectionSettingsClient.CreateOrUpdate method.
type DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse ¶ added in v1.0.0
type DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse struct { // A database Advanced Threat Protection. DatabaseAdvancedThreatProtection }
DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse contains the response from method DatabaseAdvancedThreatProtectionSettingsClient.CreateOrUpdate.
type DatabaseAdvancedThreatProtectionSettingsClientGetOptions ¶ added in v1.0.0
type DatabaseAdvancedThreatProtectionSettingsClientGetOptions struct { }
DatabaseAdvancedThreatProtectionSettingsClientGetOptions contains the optional parameters for the DatabaseAdvancedThreatProtectionSettingsClient.Get method.
type DatabaseAdvancedThreatProtectionSettingsClientGetResponse ¶ added in v1.0.0
type DatabaseAdvancedThreatProtectionSettingsClientGetResponse struct { // A database Advanced Threat Protection. DatabaseAdvancedThreatProtection }
DatabaseAdvancedThreatProtectionSettingsClientGetResponse contains the response from method DatabaseAdvancedThreatProtectionSettingsClient.Get.
type DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseOptions ¶ added in v1.0.0
type DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseOptions struct { }
DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseOptions contains the optional parameters for the DatabaseAdvancedThreatProtectionSettingsClient.NewListByDatabasePager method.
type DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseResponse ¶ added in v1.0.0
type DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseResponse struct { // A list of the database's Advanced Threat Protection configurations. DatabaseAdvancedThreatProtectionListResult }
DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseResponse contains the response from method DatabaseAdvancedThreatProtectionSettingsClient.NewListByDatabasePager.
type DatabaseAdvisorsClient ¶
type DatabaseAdvisorsClient struct {
// contains filtered or unexported fields
}
DatabaseAdvisorsClient contains the methods for the DatabaseAdvisors group. Don't use this type directly, use NewDatabaseAdvisorsClient() instead.
func NewDatabaseAdvisorsClient ¶
func NewDatabaseAdvisorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseAdvisorsClient, error)
NewDatabaseAdvisorsClient creates a new instance of DatabaseAdvisorsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DatabaseAdvisorsClient) Get ¶
func (client *DatabaseAdvisorsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, advisorName string, options *DatabaseAdvisorsClientGetOptions) (DatabaseAdvisorsClientGetResponse, error)
Get - Gets a database advisor. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- advisorName - The name of the Database Advisor.
- options - DatabaseAdvisorsClientGetOptions contains the optional parameters for the DatabaseAdvisorsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseAdvisorGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseAdvisorsClient().Get(ctx, "workloadinsight-demos", "misosisvr", "IndexAdvisor_test_3", "CreateIndex", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Advisor = armsql.Advisor{ // Name: to.Ptr("CreateIndex"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advisors"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex"), // Properties: &armsql.AdvisorProperties{ // AdvisorStatus: to.Ptr(armsql.AdvisorStatusGA), // AutoExecuteStatus: to.Ptr(armsql.AutoExecuteStatusDisabled), // LastChecked: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-20T00:24:39.000Z"); return t}()), // RecommendationsStatus: to.Ptr("Ok"), // }, // } }
Output:
func (*DatabaseAdvisorsClient) ListByDatabase ¶
func (client *DatabaseAdvisorsClient) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabaseAdvisorsClientListByDatabaseOptions) (DatabaseAdvisorsClientListByDatabaseResponse, error)
ListByDatabase - Gets a list of database advisors. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - DatabaseAdvisorsClientListByDatabaseOptions contains the optional parameters for the DatabaseAdvisorsClient.ListByDatabase method.
Example (ListOfDatabaseAdvisors) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseAdvisorList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseAdvisorsClient().ListByDatabase(ctx, "workloadinsight-demos", "misosisvr", "IndexAdvisor_test_3", &armsql.DatabaseAdvisorsClientListByDatabaseOptions{Expand: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.AdvisorArray = []*armsql.Advisor{ // { // Name: to.Ptr("CreateIndex"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advisors"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.AdvisorProperties{ // AdvisorStatus: to.Ptr(armsql.AdvisorStatusGA), // AutoExecuteStatus: to.Ptr(armsql.AutoExecuteStatusDisabled), // AutoExecuteStatusInheritedFrom: to.Ptr(armsql.AutoExecuteStatusInheritedFromDatabase), // LastChecked: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-20T00:24:39.000Z"); return t}()), // RecommendationsStatus: to.Ptr("Ok"), // }, // }, // { // Name: to.Ptr("DropIndex"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advisors"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DropIndex"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.AdvisorProperties{ // AdvisorStatus: to.Ptr(armsql.AdvisorStatusGA), // AutoExecuteStatus: to.Ptr(armsql.AutoExecuteStatusDisabled), // AutoExecuteStatusInheritedFrom: to.Ptr(armsql.AutoExecuteStatusInheritedFromDatabase), // LastChecked: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-19T20:42:43.000Z"); return t}()), // RecommendationsStatus: to.Ptr("DbSeemsTuned"), // }, // }, // { // Name: to.Ptr("DbParameterization"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advisors"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DbParameterization"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.AdvisorProperties{ // AdvisorStatus: to.Ptr(armsql.AdvisorStatusGA), // AutoExecuteStatus: to.Ptr(armsql.AutoExecuteStatusEnabled), // AutoExecuteStatusInheritedFrom: to.Ptr(armsql.AutoExecuteStatusInheritedFromDatabase), // LastChecked: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-19T19:13:03.000Z"); return t}()), // RecommendationsStatus: to.Ptr("DbParameterizationIssue"), // }, // }, // { // Name: to.Ptr("SchemaIssue"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advisors"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/SchemaIssue"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.AdvisorProperties{ // AdvisorStatus: to.Ptr(armsql.AdvisorStatusPublicPreview), // AutoExecuteStatus: to.Ptr(armsql.AutoExecuteStatusDisabled), // AutoExecuteStatusInheritedFrom: to.Ptr(armsql.AutoExecuteStatusInheritedFromDefault), // LastChecked: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-20T14:00:32.000Z"); return t}()), // RecommendationsStatus: to.Ptr("SchemaIsNotConsistent"), // }, // }, // { // Name: to.Ptr("ForceLastGoodPlan"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advisors"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/ForceLastGoodPlan"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.AdvisorProperties{ // AdvisorStatus: to.Ptr(armsql.AdvisorStatusPrivatePreview), // AutoExecuteStatus: to.Ptr(armsql.AutoExecuteStatusDisabled), // AutoExecuteStatusInheritedFrom: to.Ptr(armsql.AutoExecuteStatusInheritedFromDefault), // }, // }} }
Output:
Example (ListOfDatabaseRecommendedActionsForAllAdvisors) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRecommendedActionListExpand.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseAdvisorsClient().ListByDatabase(ctx, "workloadinsight-demos", "misosisvr", "IndexAdvisor_test_3", &armsql.DatabaseAdvisorsClientListByDatabaseOptions{Expand: to.Ptr("recommendedActions")}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.AdvisorArray = []*armsql.Advisor{ // { // Name: to.Ptr("CreateIndex"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advisors"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.AdvisorProperties{ // AdvisorStatus: to.Ptr(armsql.AdvisorStatusGA), // AutoExecuteStatus: to.Ptr(armsql.AutoExecuteStatusDisabled), // AutoExecuteStatusInheritedFrom: to.Ptr(armsql.AutoExecuteStatusInheritedFromDatabase), // LastChecked: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-20T16:39:16.000Z"); return t}()), // RecommendationsStatus: to.Ptr("Ok"), // RecommendedActions: []*armsql.RecommendedAction{ // { // Name: to.Ptr("IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advisors/recommendedActions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex/recommendedActions/IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.RecommendedActionProperties{ // ErrorDetails: &armsql.RecommendedActionErrorInfo{ // }, // EstimatedImpact: []*armsql.RecommendedActionImpactRecord{ // { // AbsoluteValue: to.Ptr[float64](1440), // DimensionName: to.Ptr("ActionDuration"), // Unit: to.Ptr("Seconds"), // }, // { // AbsoluteValue: to.Ptr[float64](209.3125), // DimensionName: to.Ptr("SpaceChange"), // Unit: to.Ptr("Megabytes"), // }}, // ImplementationDetails: &armsql.RecommendedActionImplementationInfo{ // Method: to.Ptr(armsql.ImplementationMethodTSQL), // Script: to.Ptr("CREATE NONCLUSTERED INDEX [nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B] ON [CRM].[DataPoints] ([Name],[Money],[Power]) INCLUDE ([Hour], [System], [LastChanged]) WITH (ONLINE = ON)"), // }, // IsArchivedAction: to.Ptr(false), // IsExecutableAction: to.Ptr(true), // IsRevertableAction: to.Ptr(true), // LastRefresh: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:04.000Z"); return t}()), // ObservedImpact: []*armsql.RecommendedActionImpactRecord{ // }, // RecommendationReason: to.Ptr(""), // Score: to.Ptr[int32](1), // State: &armsql.RecommendedActionStateInfo{ // CurrentValue: to.Ptr(armsql.RecommendedActionCurrentStateActive), // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-20T15:15:40.000Z"); return t}()), // }, // TimeSeries: []*armsql.RecommendedActionMetricInfo{ // }, // ValidSince: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:04.000Z"); return t}()), // Details: map[string]any{ // "schema": "[CRM]", // "includedColumns": "[Hour], [System], [LastChanged]", // "indexColumns": "[Name],[Money],[Power]", // "indexName": "nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B", // "indexType": "NONCLUSTERED", // "table": "[DataPoints]", // }, // }, // }, // { // Name: to.Ptr("IR_[dbo]_[DataPoints]_F5D2F347AA22DB46E4CC"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advisors/recommendedActions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex/recommendedActions/IR_[dbo]_[DataPoints]_F5D2F347AA22DB46E4CC"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.RecommendedActionProperties{ // ErrorDetails: &armsql.RecommendedActionErrorInfo{ // }, // EstimatedImpact: []*armsql.RecommendedActionImpactRecord{ // { // AbsoluteValue: to.Ptr[float64](5040), // DimensionName: to.Ptr("ActionDuration"), // Unit: to.Ptr("Seconds"), // }, // { // AbsoluteValue: to.Ptr[float64](120), // DimensionName: to.Ptr("SpaceChange"), // Unit: to.Ptr("Megabytes"), // }}, // ExecuteActionDuration: to.Ptr("PT1M"), // ExecuteActionInitiatedBy: to.Ptr(armsql.RecommendedActionInitiatedByUser), // ExecuteActionInitiatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ExecuteActionStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ImplementationDetails: &armsql.RecommendedActionImplementationInfo{ // Method: to.Ptr(armsql.ImplementationMethodTSQL), // Script: to.Ptr("DROP INDEX [nci_wi_DataPoints_609E4B7D6A3813990ED44B28B340C8FC] ON [dbo].[DataPoints]"), // }, // IsArchivedAction: to.Ptr(false), // IsExecutableAction: to.Ptr(true), // IsRevertableAction: to.Ptr(true), // LastRefresh: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ObservedImpact: []*armsql.RecommendedActionImpactRecord{ // { // ChangeValueAbsolute: to.Ptr[float64](-12.7), // ChangeValueRelative: to.Ptr[float64](-0.9), // DimensionName: to.Ptr("AffectedQueriesCpuUtilization"), // Unit: to.Ptr("CpuCores"), // }, // { // ChangeValueAbsolute: to.Ptr[float64](-12.7), // ChangeValueRelative: to.Ptr[float64](-0.3175), // DimensionName: to.Ptr("CpuUtilization"), // Unit: to.Ptr("CpuCores"), // }, // { // AbsoluteValue: to.Ptr[float64](12), // DimensionName: to.Ptr("QueriesWithImprovedPerformance"), // Unit: to.Ptr("Count"), // }, // { // AbsoluteValue: to.Ptr[float64](1), // DimensionName: to.Ptr("QueriesWithRegressedPerformance"), // Unit: to.Ptr("Count"), // }, // { // AbsoluteValue: to.Ptr[float64](130.742187), // DimensionName: to.Ptr("SpaceChange"), // Unit: to.Ptr("Megabytes"), // }, // { // AbsoluteValue: to.Ptr[float64](0), // DimensionName: to.Ptr("VerificationProgress"), // Unit: to.Ptr("Percent"), // }}, // RecommendationReason: to.Ptr(""), // Score: to.Ptr[int32](3), // State: &armsql.RecommendedActionStateInfo{ // ActionInitiatedBy: to.Ptr(armsql.RecommendedActionInitiatedByUser), // CurrentValue: to.Ptr(armsql.RecommendedActionCurrentStateSuccess), // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // }, // TimeSeries: []*armsql.RecommendedActionMetricInfo{ // }, // ValidSince: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // Details: map[string]any{ // "schema": "[dbo]", // "includedColumns": "[Power],[Pineapple]", // "indexActionDuration": "00:01:00", // "indexActionStartTime": "2017-03-01T14:38:05.337", // "indexColumns": "[Name],[Money]", // "indexName": "nci_wi_DataPoints_609E4B7D6A3813990ED44B28B340C8FC", // "indexType": "NONCLUSTERED", // "table": "[DataPoints]", // }, // }, // }, // { // Name: to.Ptr("IR_[dbo]_[Employees]_560E15A98D14CA09BDFB"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advisors/recommendedActions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex/recommendedActions/IR_[dbo]_[Employees]_560E15A98D14CA09BDFB"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.RecommendedActionProperties{ // ErrorDetails: &armsql.RecommendedActionErrorInfo{ // }, // EstimatedImpact: []*armsql.RecommendedActionImpactRecord{ // { // AbsoluteValue: to.Ptr[float64](17), // DimensionName: to.Ptr("ActionDuration"), // Unit: to.Ptr("Seconds"), // }, // { // AbsoluteValue: to.Ptr[float64](128), // DimensionName: to.Ptr("SpaceChange"), // Unit: to.Ptr("Megabytes"), // }}, // ImplementationDetails: &armsql.RecommendedActionImplementationInfo{ // Method: to.Ptr(armsql.ImplementationMethodTSQL), // Script: to.Ptr("CREATE NONCLUSTERED INDEX [nci_wi_Employees_8C18C2AF4267DC77793040782641CCDE] ON [dbo].[Employees] ([City], [State]) INCLUDE ([Postal]) WITH (ONLINE = ON)"), // }, // IsArchivedAction: to.Ptr(false), // IsExecutableAction: to.Ptr(true), // IsRevertableAction: to.Ptr(true), // LastRefresh: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ObservedImpact: []*armsql.RecommendedActionImpactRecord{ // }, // RecommendationReason: to.Ptr(""), // Score: to.Ptr[int32](3), // State: &armsql.RecommendedActionStateInfo{ // CurrentValue: to.Ptr(armsql.RecommendedActionCurrentStateActive), // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // }, // TimeSeries: []*armsql.RecommendedActionMetricInfo{ // }, // ValidSince: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // Details: map[string]any{ // "schema": "[dbo]", // "includedColumns": "[Postal]", // "indexColumns": "[City], [State]", // "indexName": "nci_wi_Employees_8C18C2AF4267DC77793040782641CCDE", // "indexType": "NONCLUSTERED", // "table": "[Employees]", // }, // }, // }}, // }, // }, // { // Name: to.Ptr("DropIndex"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advisors"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DropIndex"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.AdvisorProperties{ // AdvisorStatus: to.Ptr(armsql.AdvisorStatusGA), // AutoExecuteStatus: to.Ptr(armsql.AutoExecuteStatusDisabled), // AutoExecuteStatusInheritedFrom: to.Ptr(armsql.AutoExecuteStatusInheritedFromDatabase), // LastChecked: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-19T20:42:43.000Z"); return t}()), // RecommendationsStatus: to.Ptr("DbSeemsTuned"), // RecommendedActions: []*armsql.RecommendedAction{ // { // Name: to.Ptr("IR_[CRM]_[DataPoints1]_13ADA5F354E9E14A983B"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advisors/recommendedActions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DropIndex/recommendedActions/IR_[CRM]_[DataPoints1]_13ADA5F354E9E14A983B"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.RecommendedActionProperties{ // ErrorDetails: &armsql.RecommendedActionErrorInfo{ // }, // EstimatedImpact: []*armsql.RecommendedActionImpactRecord{ // { // AbsoluteValue: to.Ptr[float64](645), // DimensionName: to.Ptr("ActionDuration"), // Unit: to.Ptr("Seconds"), // }, // { // AbsoluteValue: to.Ptr[float64](342), // DimensionName: to.Ptr("SpaceChange"), // Unit: to.Ptr("Megabytes"), // }}, // ExecuteActionInitiatedBy: to.Ptr(armsql.RecommendedActionInitiatedBySystem), // ExecuteActionInitiatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-23T14:14:35.000Z"); return t}()), // ImplementationDetails: &armsql.RecommendedActionImplementationInfo{ // Method: to.Ptr(armsql.ImplementationMethodTSQL), // Script: to.Ptr("DROP INDEX [IX_FF] ON [CRM].[DataPoints1]"), // }, // IsArchivedAction: to.Ptr(false), // IsExecutableAction: to.Ptr(true), // IsRevertableAction: to.Ptr(true), // LastRefresh: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ObservedImpact: []*armsql.RecommendedActionImpactRecord{ // }, // RecommendationReason: to.Ptr("Unused"), // Score: to.Ptr[int32](1), // State: &armsql.RecommendedActionStateInfo{ // ActionInitiatedBy: to.Ptr(armsql.RecommendedActionInitiatedBySystem), // CurrentValue: to.Ptr(armsql.RecommendedActionCurrentStatePending), // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-23T14:14:35.000Z"); return t}()), // }, // TimeSeries: []*armsql.RecommendedActionMetricInfo{ // }, // ValidSince: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // Details: map[string]any{ // "schema": "[CRM]", // "includedColumns": "[Apple]", // "indexColumns": "[Protocol],[SessionId]", // "indexName": "IX_FF", // "indexType": "NONCLUSTERED", // "originalIndexName": "IX_COM_SKU_SKUDepartmentID", // "table": "[DataPoints1]", // }, // }, // }, // { // Name: to.Ptr("IR_[CRM]_[DataPoints1]_29AEA82685D24704DE1A"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advisors/recommendedActions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DropIndex/recommendedActions/IR_[CRM]_[DataPoints1]_29AEA82685D24704DE1A"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.RecommendedActionProperties{ // ErrorDetails: &armsql.RecommendedActionErrorInfo{ // }, // EstimatedImpact: []*armsql.RecommendedActionImpactRecord{ // { // AbsoluteValue: to.Ptr[float64](803), // DimensionName: to.Ptr("ActionDuration"), // Unit: to.Ptr("Seconds"), // }, // { // AbsoluteValue: to.Ptr[float64](144.6875), // DimensionName: to.Ptr("SpaceChange"), // Unit: to.Ptr("Megabytes"), // }}, // ExecuteActionInitiatedBy: to.Ptr(armsql.RecommendedActionInitiatedBySystem), // ExecuteActionInitiatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ImplementationDetails: &armsql.RecommendedActionImplementationInfo{ // Method: to.Ptr(armsql.ImplementationMethodTSQL), // Script: to.Ptr("DROP INDEX [MyIndex123] ON [CRM].[DataPoints1]"), // }, // IsArchivedAction: to.Ptr(false), // IsExecutableAction: to.Ptr(true), // IsRevertableAction: to.Ptr(true), // LastRefresh: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ObservedImpact: []*armsql.RecommendedActionImpactRecord{ // }, // RecommendationReason: to.Ptr("Duplicate"), // Score: to.Ptr[int32](1), // State: &armsql.RecommendedActionStateInfo{ // ActionInitiatedBy: to.Ptr(armsql.RecommendedActionInitiatedBySystem), // CurrentValue: to.Ptr(armsql.RecommendedActionCurrentStatePending), // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // }, // TimeSeries: []*armsql.RecommendedActionMetricInfo{ // }, // ValidSince: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // Details: map[string]any{ // "schema": "[CRM]", // "includedColumns": "[Apple]", // "indexColumns": "[Cookies],[SessionId]", // "indexName": "MyIndex123", // "indexType": "NONCLUSTERED", // "originalIndexName": "IX_COM_SKU_SKUDepartmentID", // "table": "[DataPoints1]", // }, // }, // }, // { // Name: to.Ptr("IR_[CRM]_[DataPoints2]_E4B21F229379807E531A"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advisors/recommendedActions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DropIndex/recommendedActions/IR_[CRM]_[DataPoints2]_E4B21F229379807E531A"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.RecommendedActionProperties{ // ErrorDetails: &armsql.RecommendedActionErrorInfo{ // }, // EstimatedImpact: []*armsql.RecommendedActionImpactRecord{ // { // AbsoluteValue: to.Ptr[float64](705), // DimensionName: to.Ptr("ActionDuration"), // Unit: to.Ptr("Seconds"), // }, // { // AbsoluteValue: to.Ptr[float64](342), // DimensionName: to.Ptr("SpaceChange"), // Unit: to.Ptr("Megabytes"), // }}, // ExecuteActionDuration: to.Ptr("PT1M"), // ExecuteActionInitiatedBy: to.Ptr(armsql.RecommendedActionInitiatedByUser), // ExecuteActionInitiatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ExecuteActionStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ImplementationDetails: &armsql.RecommendedActionImplementationInfo{ // Method: to.Ptr(armsql.ImplementationMethodTSQL), // Script: to.Ptr("CREATE NONCLUSTERED INDEX [MyIndex321] ON [CRM].[DataPoints2] ([Cookies],[SessionId],[Protocol]) INCLUDE ([Apple]) WITH (ONLINE = ON)"), // }, // IsArchivedAction: to.Ptr(false), // IsExecutableAction: to.Ptr(true), // IsRevertableAction: to.Ptr(true), // LastRefresh: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ObservedImpact: []*armsql.RecommendedActionImpactRecord{ // { // ChangeValueAbsolute: to.Ptr[float64](0), // ChangeValueRelative: to.Ptr[float64](0), // DimensionName: to.Ptr("AffectedQueriesCpuUtilization"), // Unit: to.Ptr("CpuCores"), // }, // { // ChangeValueAbsolute: to.Ptr[float64](0), // ChangeValueRelative: to.Ptr[float64](0), // DimensionName: to.Ptr("CpuUtilization"), // Unit: to.Ptr("CpuCores"), // }, // { // AbsoluteValue: to.Ptr[float64](0), // DimensionName: to.Ptr("QueriesWithImprovedPerformance"), // Unit: to.Ptr("Count"), // }, // { // AbsoluteValue: to.Ptr[float64](0), // DimensionName: to.Ptr("QueriesWithRegressedPerformance"), // Unit: to.Ptr("Count"), // }, // { // AbsoluteValue: to.Ptr[float64](-342), // DimensionName: to.Ptr("SpaceChange"), // Unit: to.Ptr("Megabytes"), // }, // { // AbsoluteValue: to.Ptr[float64](0), // DimensionName: to.Ptr("VerificationProgress"), // Unit: to.Ptr("Percent"), // }}, // RecommendationReason: to.Ptr("Duplicate"), // Score: to.Ptr[int32](1), // State: &armsql.RecommendedActionStateInfo{ // ActionInitiatedBy: to.Ptr(armsql.RecommendedActionInitiatedByUser), // CurrentValue: to.Ptr(armsql.RecommendedActionCurrentStateSuccess), // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // }, // TimeSeries: []*armsql.RecommendedActionMetricInfo{ // }, // ValidSince: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // Details: map[string]any{ // "schema": "[CRM]", // "includedColumns": "[Apple]", // "indexActionDuration": "00:01:00", // "indexActionStartTime": "2017-03-01T14:38:05.697", // "indexColumns": "[Cookies],[SessionId],[Protocol]", // "indexName": "MyIndex321", // "indexType": "NONCLUSTERED", // "originalIndexName": "IX_COM_SKU_SKUDepartmentID", // "table": "[DataPoints2]", // }, // }, // }, // { // Name: to.Ptr("IR_[dbo]_[FactFinance]_13ADA5F354E9E14A983B"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advisors/recommendedActions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DropIndex/recommendedActions/IR_[dbo]_[FactFinance]_13ADA5F354E9E14A983B"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.RecommendedActionProperties{ // ErrorDetails: &armsql.RecommendedActionErrorInfo{ // }, // EstimatedImpact: []*armsql.RecommendedActionImpactRecord{ // { // AbsoluteValue: to.Ptr[float64](705), // DimensionName: to.Ptr("ActionDuration"), // Unit: to.Ptr("Seconds"), // }, // { // AbsoluteValue: to.Ptr[float64](342), // DimensionName: to.Ptr("SpaceChange"), // Unit: to.Ptr("Megabytes"), // }}, // ExecuteActionDuration: to.Ptr("PT1M"), // ExecuteActionInitiatedBy: to.Ptr(armsql.RecommendedActionInitiatedBySystem), // ExecuteActionInitiatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ExecuteActionStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ImplementationDetails: &armsql.RecommendedActionImplementationInfo{ // Method: to.Ptr(armsql.ImplementationMethodTSQL), // Script: to.Ptr("CREATE NONCLUSTERED INDEX [IX_FF] ON [dbo].[FactFinance] ([FinanceKey],[DateKey]) INCLUDE ([OrganizationKey]) WITH (ONLINE = ON)"), // }, // IsArchivedAction: to.Ptr(false), // IsExecutableAction: to.Ptr(true), // IsRevertableAction: to.Ptr(true), // LastRefresh: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ObservedImpact: []*armsql.RecommendedActionImpactRecord{ // { // ChangeValueAbsolute: to.Ptr[float64](0), // ChangeValueRelative: to.Ptr[float64](0), // DimensionName: to.Ptr("AffectedQueriesCpuUtilization"), // Unit: to.Ptr("CpuCores"), // }, // { // ChangeValueAbsolute: to.Ptr[float64](0), // ChangeValueRelative: to.Ptr[float64](0), // DimensionName: to.Ptr("CpuUtilization"), // Unit: to.Ptr("CpuCores"), // }, // { // AbsoluteValue: to.Ptr[float64](0), // DimensionName: to.Ptr("QueriesWithImprovedPerformance"), // Unit: to.Ptr("Count"), // }, // { // AbsoluteValue: to.Ptr[float64](0), // DimensionName: to.Ptr("QueriesWithRegressedPerformance"), // Unit: to.Ptr("Count"), // }, // { // AbsoluteValue: to.Ptr[float64](-342), // DimensionName: to.Ptr("SpaceChange"), // Unit: to.Ptr("Megabytes"), // }, // { // AbsoluteValue: to.Ptr[float64](0), // DimensionName: to.Ptr("VerificationProgress"), // Unit: to.Ptr("Percent"), // }}, // RecommendationReason: to.Ptr("Duplicate"), // Score: to.Ptr[int32](1), // State: &armsql.RecommendedActionStateInfo{ // ActionInitiatedBy: to.Ptr(armsql.RecommendedActionInitiatedBySystem), // CurrentValue: to.Ptr(armsql.RecommendedActionCurrentStateSuccess), // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-28T14:38:05.000Z"); return t}()), // }, // TimeSeries: []*armsql.RecommendedActionMetricInfo{ // }, // ValidSince: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // Details: map[string]any{ // "schema": "[dbo]", // "includedColumns": "[OrganizationKey]", // "indexActionDuration": "00:01:00", // "indexActionStartTime": "2017-03-01T14:38:05.837", // "indexColumns": "[FinanceKey],[DateKey]", // "indexName": "IX_FF", // "indexType": "NONCLUSTERED", // "originalIndexName": "IX_COM_SKU_SKUDepartmentID", // "table": "[FactFinance]", // }, // }, // }}, // }, // }, // { // Name: to.Ptr("DbParameterization"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advisors"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DbParameterization"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.AdvisorProperties{ // AdvisorStatus: to.Ptr(armsql.AdvisorStatusGA), // AutoExecuteStatus: to.Ptr(armsql.AutoExecuteStatusEnabled), // AutoExecuteStatusInheritedFrom: to.Ptr(armsql.AutoExecuteStatusInheritedFromDatabase), // LastChecked: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-19T19:13:03.000Z"); return t}()), // RecommendationsStatus: to.Ptr("DbParameterizationIssue"), // RecommendedActions: []*armsql.RecommendedAction{ // { // Name: to.Ptr("ForceDbParameterization"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advisors/recommendedActions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/DbParameterization/recommendedActions/ForceDbParameterization"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.RecommendedActionProperties{ // ErrorDetails: &armsql.RecommendedActionErrorInfo{ // }, // EstimatedImpact: []*armsql.RecommendedActionImpactRecord{ // { // ChangeValueAbsolute: to.Ptr[float64](22.5613696939135), // DimensionName: to.Ptr("CpuSavings"), // Unit: to.Ptr("Percent"), // }, // { // ChangeValueAbsolute: to.Ptr[float64](0.701823681806341), // DimensionName: to.Ptr("QueryDurationDecrease"), // Unit: to.Ptr("secs"), // }}, // ExecuteActionInitiatedBy: to.Ptr(armsql.RecommendedActionInitiatedBySystem), // ExecuteActionInitiatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-11T15:08:31.000Z"); return t}()), // ImplementationDetails: &armsql.RecommendedActionImplementationInfo{ // Method: to.Ptr(armsql.ImplementationMethodTSQL), // Script: to.Ptr("ALTER DATABASE [IndexAdvisor_test_3] SET PARAMETERIZATION FORCED"), // }, // IsArchivedAction: to.Ptr(false), // IsExecutableAction: to.Ptr(true), // IsRevertableAction: to.Ptr(true), // LastRefresh: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:37:44.000Z"); return t}()), // ObservedImpact: []*armsql.RecommendedActionImpactRecord{ // }, // RecommendationReason: to.Ptr(""), // Score: to.Ptr[int32](3), // State: &armsql.RecommendedActionStateInfo{ // ActionInitiatedBy: to.Ptr(armsql.RecommendedActionInitiatedBySystem), // CurrentValue: to.Ptr(armsql.RecommendedActionCurrentStatePending), // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-11T15:08:31.000Z"); return t}()), // }, // TimeSeries: []*armsql.RecommendedActionMetricInfo{ // }, // ValidSince: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:37:44.000Z"); return t}()), // }, // }}, // }, // }, // { // Name: to.Ptr("SchemaIssue"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advisors"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/SchemaIssue"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.AdvisorProperties{ // AdvisorStatus: to.Ptr(armsql.AdvisorStatusPublicPreview), // AutoExecuteStatus: to.Ptr(armsql.AutoExecuteStatusDisabled), // AutoExecuteStatusInheritedFrom: to.Ptr(armsql.AutoExecuteStatusInheritedFromDefault), // LastChecked: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-20T18:50:21.000Z"); return t}()), // RecommendationsStatus: to.Ptr("SchemaIsNotConsistent"), // RecommendedActions: []*armsql.RecommendedAction{ // { // Name: to.Ptr("SchemaProblem_1A258C5714A7410C9D23"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advisors/recommendedActions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/SchemaIssue/recommendedActions/SchemaProblem_1A258C5714A7410C9D23"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.RecommendedActionProperties{ // ErrorDetails: &armsql.RecommendedActionErrorInfo{ // }, // EstimatedImpact: []*armsql.RecommendedActionImpactRecord{ // }, // ImplementationDetails: &armsql.RecommendedActionImplementationInfo{ // }, // IsArchivedAction: to.Ptr(false), // IsExecutableAction: to.Ptr(false), // IsRevertableAction: to.Ptr(false), // LastRefresh: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T22:19:53.000Z"); return t}()), // ObservedImpact: []*armsql.RecommendedActionImpactRecord{ // }, // RecommendationReason: to.Ptr("SchemaProblem"), // Score: to.Ptr[int32](3), // State: &armsql.RecommendedActionStateInfo{ // CurrentValue: to.Ptr(armsql.RecommendedActionCurrentStateActive), // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:37:48.000Z"); return t}()), // }, // TimeSeries: []*armsql.RecommendedActionMetricInfo{ // }, // ValidSince: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:37:48.000Z"); return t}()), // Details: map[string]any{ // "sqlErrorCount": float64(342482), // "sqlErrorMessage": "Invalid object name 'dbo.Companies'.", // "sqlErrorNumber": float64(208), // }, // }, // }}, // }, // }, // { // Name: to.Ptr("ForceLastGoodPlan"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advisors"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/ForceLastGoodPlan"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.AdvisorProperties{ // AdvisorStatus: to.Ptr(armsql.AdvisorStatusPrivatePreview), // AutoExecuteStatus: to.Ptr(armsql.AutoExecuteStatusDisabled), // AutoExecuteStatusInheritedFrom: to.Ptr(armsql.AutoExecuteStatusInheritedFromDefault), // RecommendedActions: []*armsql.RecommendedAction{ // }, // }, // }} }
Output:
func (*DatabaseAdvisorsClient) Update ¶
func (client *DatabaseAdvisorsClient) Update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, advisorName string, parameters Advisor, options *DatabaseAdvisorsClientUpdateOptions) (DatabaseAdvisorsClientUpdateResponse, error)
Update - Updates a database advisor. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- advisorName - The name of the Database Advisor.
- parameters - The requested advisor resource state.
- options - DatabaseAdvisorsClientUpdateOptions contains the optional parameters for the DatabaseAdvisorsClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseAdvisorUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseAdvisorsClient().Update(ctx, "workloadinsight-demos", "misosisvr", "IndexAdvisor_test_3", "CreateIndex", armsql.Advisor{ Properties: &armsql.AdvisorProperties{ AutoExecuteStatus: to.Ptr(armsql.AutoExecuteStatusDisabled), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Advisor = armsql.Advisor{ // Name: to.Ptr("CreateIndex"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advisors"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex"), // Properties: &armsql.AdvisorProperties{ // AdvisorStatus: to.Ptr(armsql.AdvisorStatusGA), // AutoExecuteStatus: to.Ptr(armsql.AutoExecuteStatusDisabled), // LastChecked: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-20T00:24:39.000Z"); return t}()), // RecommendationsStatus: to.Ptr("Ok"), // }, // } }
Output:
type DatabaseAdvisorsClientGetOptions ¶ added in v0.3.0
type DatabaseAdvisorsClientGetOptions struct { }
DatabaseAdvisorsClientGetOptions contains the optional parameters for the DatabaseAdvisorsClient.Get method.
type DatabaseAdvisorsClientGetResponse ¶ added in v0.3.0
type DatabaseAdvisorsClientGetResponse struct { // Database, Server or Elastic Pool Advisor. Advisor }
DatabaseAdvisorsClientGetResponse contains the response from method DatabaseAdvisorsClient.Get.
type DatabaseAdvisorsClientListByDatabaseOptions ¶ added in v0.3.0
type DatabaseAdvisorsClientListByDatabaseOptions struct { // The child resources to include in the response. Expand *string }
DatabaseAdvisorsClientListByDatabaseOptions contains the optional parameters for the DatabaseAdvisorsClient.ListByDatabase method.
type DatabaseAdvisorsClientListByDatabaseResponse ¶ added in v0.3.0
type DatabaseAdvisorsClientListByDatabaseResponse struct { // Array of Advisor AdvisorArray []*Advisor }
DatabaseAdvisorsClientListByDatabaseResponse contains the response from method DatabaseAdvisorsClient.ListByDatabase.
type DatabaseAdvisorsClientUpdateOptions ¶ added in v0.3.0
type DatabaseAdvisorsClientUpdateOptions struct { }
DatabaseAdvisorsClientUpdateOptions contains the optional parameters for the DatabaseAdvisorsClient.Update method.
type DatabaseAdvisorsClientUpdateResponse ¶ added in v0.3.0
type DatabaseAdvisorsClientUpdateResponse struct { // Database, Server or Elastic Pool Advisor. Advisor }
DatabaseAdvisorsClientUpdateResponse contains the response from method DatabaseAdvisorsClient.Update.
type DatabaseAutomaticTuning ¶
type DatabaseAutomaticTuning struct { // Resource properties. Properties *DatabaseAutomaticTuningProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
DatabaseAutomaticTuning - Database-level Automatic Tuning.
func (DatabaseAutomaticTuning) MarshalJSON ¶
func (d DatabaseAutomaticTuning) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseAutomaticTuning.
func (*DatabaseAutomaticTuning) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseAutomaticTuning) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAutomaticTuning.
type DatabaseAutomaticTuningClient ¶
type DatabaseAutomaticTuningClient struct {
// contains filtered or unexported fields
}
DatabaseAutomaticTuningClient contains the methods for the DatabaseAutomaticTuning group. Don't use this type directly, use NewDatabaseAutomaticTuningClient() instead.
func NewDatabaseAutomaticTuningClient ¶
func NewDatabaseAutomaticTuningClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseAutomaticTuningClient, error)
NewDatabaseAutomaticTuningClient creates a new instance of DatabaseAutomaticTuningClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DatabaseAutomaticTuningClient) Get ¶
func (client *DatabaseAutomaticTuningClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabaseAutomaticTuningClientGetOptions) (DatabaseAutomaticTuningClientGetResponse, error)
Get - Gets a database's automatic tuning. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - DatabaseAutomaticTuningClientGetOptions contains the optional parameters for the DatabaseAutomaticTuningClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseAutomaticTuningGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseAutomaticTuningClient().Get(ctx, "default-sql-onebox", "testsvr11", "db1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseAutomaticTuning = armsql.DatabaseAutomaticTuning{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/servers/databases/automaticTuning"), // ID: to.Ptr("/subscriptions/c3aa9078-0000-0000-0000-e36f151182d7/resourceGroups/default-sql-onebox/providers/Microsoft.Sql/servers/testsvr11/databases/db1/automaticTuning/current"), // Properties: &armsql.DatabaseAutomaticTuningProperties{ // ActualState: to.Ptr(armsql.AutomaticTuningModeAuto), // DesiredState: to.Ptr(armsql.AutomaticTuningModeAuto), // Options: map[string]*armsql.AutomaticTuningOptions{ // "createIndex": &armsql.AutomaticTuningOptions{ // ActualState: to.Ptr(armsql.AutomaticTuningOptionModeActualOn), // DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredDefault), // ReasonCode: to.Ptr[int32](2), // ReasonDesc: to.Ptr(armsql.AutomaticTuningDisabledReasonAutoConfigured), // }, // "dropIndex": &armsql.AutomaticTuningOptions{ // ActualState: to.Ptr(armsql.AutomaticTuningOptionModeActualOff), // DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredDefault), // ReasonCode: to.Ptr[int32](2), // ReasonDesc: to.Ptr(armsql.AutomaticTuningDisabledReasonAutoConfigured), // }, // "forceLastGoodPlan": &armsql.AutomaticTuningOptions{ // ActualState: to.Ptr(armsql.AutomaticTuningOptionModeActualOn), // DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredDefault), // ReasonCode: to.Ptr[int32](2), // ReasonDesc: to.Ptr(armsql.AutomaticTuningDisabledReasonAutoConfigured), // }, // "maintainIndex": &armsql.AutomaticTuningOptions{ // ActualState: to.Ptr(armsql.AutomaticTuningOptionModeActualOff), // DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredDefault), // ReasonCode: to.Ptr[int32](2), // ReasonDesc: to.Ptr(armsql.AutomaticTuningDisabledReasonAutoConfigured), // }, // }, // }, // } }
Output:
func (*DatabaseAutomaticTuningClient) Update ¶
func (client *DatabaseAutomaticTuningClient) Update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DatabaseAutomaticTuning, options *DatabaseAutomaticTuningClientUpdateOptions) (DatabaseAutomaticTuningClientUpdateResponse, error)
Update - Update automatic tuning properties for target database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- parameters - The requested automatic tuning resource state.
- options - DatabaseAutomaticTuningClientUpdateOptions contains the optional parameters for the DatabaseAutomaticTuningClient.Update method.
Example (UpdatesDatabaseAutomaticTuningSettingsWithAllProperties) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseAutomaticTuningUpdateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseAutomaticTuningClient().Update(ctx, "default-sql-onebox", "testsvr11", "db1", armsql.DatabaseAutomaticTuning{ Properties: &armsql.DatabaseAutomaticTuningProperties{ DesiredState: to.Ptr(armsql.AutomaticTuningModeAuto), Options: map[string]*armsql.AutomaticTuningOptions{ "createIndex": { DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredOff), }, "dropIndex": { DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredOn), }, "forceLastGoodPlan": { DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredDefault), }, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseAutomaticTuning = armsql.DatabaseAutomaticTuning{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/servers/databases/automaticTuning"), // ID: to.Ptr("/subscriptions/c3aa9078-0000-0000-0000-e36f151182d7/resourceGroups/default-sql-onebox/providers/Microsoft.Sql/servers/testsvr11/databases/db1/automaticTuning/current"), // Properties: &armsql.DatabaseAutomaticTuningProperties{ // ActualState: to.Ptr(armsql.AutomaticTuningModeAuto), // DesiredState: to.Ptr(armsql.AutomaticTuningModeAuto), // Options: map[string]*armsql.AutomaticTuningOptions{ // "createIndex": &armsql.AutomaticTuningOptions{ // ActualState: to.Ptr(armsql.AutomaticTuningOptionModeActualOff), // DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredOff), // }, // "dropIndex": &armsql.AutomaticTuningOptions{ // ActualState: to.Ptr(armsql.AutomaticTuningOptionModeActualOn), // DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredOn), // }, // "forceLastGoodPlan": &armsql.AutomaticTuningOptions{ // ActualState: to.Ptr(armsql.AutomaticTuningOptionModeActualOn), // DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredDefault), // ReasonCode: to.Ptr[int32](2), // ReasonDesc: to.Ptr(armsql.AutomaticTuningDisabledReasonAutoConfigured), // }, // "maintainIndex": &armsql.AutomaticTuningOptions{ // ActualState: to.Ptr(armsql.AutomaticTuningOptionModeActualOff), // DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredDefault), // ReasonCode: to.Ptr[int32](2), // ReasonDesc: to.Ptr(armsql.AutomaticTuningDisabledReasonAutoConfigured), // }, // }, // }, // } }
Output:
Example (UpdatesDatabaseAutomaticTuningSettingsWithMinimalProperties) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseAutomaticTuningUpdateMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseAutomaticTuningClient().Update(ctx, "default-sql-onebox", "testsvr11", "db1", armsql.DatabaseAutomaticTuning{ Properties: &armsql.DatabaseAutomaticTuningProperties{ DesiredState: to.Ptr(armsql.AutomaticTuningModeAuto), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseAutomaticTuning = armsql.DatabaseAutomaticTuning{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/servers/databases/automaticTuning"), // ID: to.Ptr("/subscriptions/c3aa9078-0000-0000-0000-e36f151182d7/resourceGroups/default-sql-onebox/providers/Microsoft.Sql/servers/testsvr11/databases/db1/automaticTuning/current"), // Properties: &armsql.DatabaseAutomaticTuningProperties{ // ActualState: to.Ptr(armsql.AutomaticTuningModeAuto), // DesiredState: to.Ptr(armsql.AutomaticTuningModeAuto), // Options: map[string]*armsql.AutomaticTuningOptions{ // "createIndex": &armsql.AutomaticTuningOptions{ // ActualState: to.Ptr(armsql.AutomaticTuningOptionModeActualOn), // DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredDefault), // ReasonCode: to.Ptr[int32](2), // ReasonDesc: to.Ptr(armsql.AutomaticTuningDisabledReasonAutoConfigured), // }, // "dropIndex": &armsql.AutomaticTuningOptions{ // ActualState: to.Ptr(armsql.AutomaticTuningOptionModeActualOff), // DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredDefault), // ReasonCode: to.Ptr[int32](2), // ReasonDesc: to.Ptr(armsql.AutomaticTuningDisabledReasonAutoConfigured), // }, // "forceLastGoodPlan": &armsql.AutomaticTuningOptions{ // ActualState: to.Ptr(armsql.AutomaticTuningOptionModeActualOn), // DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredDefault), // ReasonCode: to.Ptr[int32](2), // ReasonDesc: to.Ptr(armsql.AutomaticTuningDisabledReasonAutoConfigured), // }, // "maintainIndex": &armsql.AutomaticTuningOptions{ // ActualState: to.Ptr(armsql.AutomaticTuningOptionModeActualOff), // DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredDefault), // ReasonCode: to.Ptr[int32](2), // ReasonDesc: to.Ptr(armsql.AutomaticTuningDisabledReasonAutoConfigured), // }, // }, // }, // } }
Output:
type DatabaseAutomaticTuningClientGetOptions ¶ added in v0.3.0
type DatabaseAutomaticTuningClientGetOptions struct { }
DatabaseAutomaticTuningClientGetOptions contains the optional parameters for the DatabaseAutomaticTuningClient.Get method.
type DatabaseAutomaticTuningClientGetResponse ¶ added in v0.3.0
type DatabaseAutomaticTuningClientGetResponse struct { // Database-level Automatic Tuning. DatabaseAutomaticTuning }
DatabaseAutomaticTuningClientGetResponse contains the response from method DatabaseAutomaticTuningClient.Get.
type DatabaseAutomaticTuningClientUpdateOptions ¶ added in v0.3.0
type DatabaseAutomaticTuningClientUpdateOptions struct { }
DatabaseAutomaticTuningClientUpdateOptions contains the optional parameters for the DatabaseAutomaticTuningClient.Update method.
type DatabaseAutomaticTuningClientUpdateResponse ¶ added in v0.3.0
type DatabaseAutomaticTuningClientUpdateResponse struct { // Database-level Automatic Tuning. DatabaseAutomaticTuning }
DatabaseAutomaticTuningClientUpdateResponse contains the response from method DatabaseAutomaticTuningClient.Update.
type DatabaseAutomaticTuningProperties ¶
type DatabaseAutomaticTuningProperties struct { // Automatic tuning desired state. DesiredState *AutomaticTuningMode // Automatic tuning options definition. Options map[string]*AutomaticTuningOptions // READ-ONLY; Automatic tuning actual state. ActualState *AutomaticTuningMode }
DatabaseAutomaticTuningProperties - Database-level Automatic Tuning properties.
func (DatabaseAutomaticTuningProperties) MarshalJSON ¶
func (d DatabaseAutomaticTuningProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseAutomaticTuningProperties.
func (*DatabaseAutomaticTuningProperties) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseAutomaticTuningProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAutomaticTuningProperties.
type DatabaseBlobAuditingPoliciesClient ¶
type DatabaseBlobAuditingPoliciesClient struct {
// contains filtered or unexported fields
}
DatabaseBlobAuditingPoliciesClient contains the methods for the DatabaseBlobAuditingPolicies group. Don't use this type directly, use NewDatabaseBlobAuditingPoliciesClient() instead.
func NewDatabaseBlobAuditingPoliciesClient ¶
func NewDatabaseBlobAuditingPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseBlobAuditingPoliciesClient, error)
NewDatabaseBlobAuditingPoliciesClient creates a new instance of DatabaseBlobAuditingPoliciesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DatabaseBlobAuditingPoliciesClient) CreateOrUpdate ¶
func (client *DatabaseBlobAuditingPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DatabaseBlobAuditingPolicy, options *DatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions) (DatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates a database's blob auditing policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- parameters - The database blob auditing policy.
- options - DatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the DatabaseBlobAuditingPoliciesClient.CreateOrUpdate method.
Example (CreateOrUpdateADatabasesAzureMonitorAuditingPolicyWithMinimalParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DatabaseAzureMonitorAuditingCreateMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseBlobAuditingPoliciesClient().CreateOrUpdate(ctx, "blobauditingtest-4799", "blobauditingtest-6440", "testdb", armsql.DatabaseBlobAuditingPolicy{ Properties: &armsql.DatabaseBlobAuditingPolicyProperties{ IsAzureMonitorTargetEnabled: to.Ptr(true), State: to.Ptr(armsql.BlobAuditingPolicyStateEnabled), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseBlobAuditingPolicy = armsql.DatabaseBlobAuditingPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/auditingSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb"), // Kind: to.Ptr("V12"), // Properties: &armsql.DatabaseBlobAuditingPolicyProperties{ // AuditActionsAndGroups: []*string{ // to.Ptr("SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP"), // to.Ptr("FAILED_DATABASE_AUTHENTICATION_GROUP"), // to.Ptr("BATCH_COMPLETED_GROUP")}, // IsAzureMonitorTargetEnabled: to.Ptr(true), // RetentionDays: to.Ptr[int32](0), // State: to.Ptr(armsql.BlobAuditingPolicyStateEnabled), // StorageAccountSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"), // }, // } }
Output:
Example (CreateOrUpdateADatabasesBlobAuditingPolicyWithAllParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DatabaseBlobAuditingCreateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseBlobAuditingPoliciesClient().CreateOrUpdate(ctx, "blobauditingtest-4799", "blobauditingtest-6440", "testdb", armsql.DatabaseBlobAuditingPolicy{ Properties: &armsql.DatabaseBlobAuditingPolicyProperties{ AuditActionsAndGroups: []*string{ to.Ptr("DATABASE_LOGOUT_GROUP"), to.Ptr("DATABASE_ROLE_MEMBER_CHANGE_GROUP"), to.Ptr("UPDATE on database::TestDatabaseName by public")}, IsAzureMonitorTargetEnabled: to.Ptr(true), IsStorageSecondaryKeyInUse: to.Ptr(false), QueueDelayMs: to.Ptr[int32](4000), RetentionDays: to.Ptr[int32](6), State: to.Ptr(armsql.BlobAuditingPolicyStateEnabled), StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), StorageAccountSubscriptionID: to.Ptr("00000000-1234-0000-5678-000000000000"), StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseBlobAuditingPolicy = armsql.DatabaseBlobAuditingPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/auditingSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb"), // Kind: to.Ptr("V12"), // Properties: &armsql.DatabaseBlobAuditingPolicyProperties{ // AuditActionsAndGroups: []*string{ // to.Ptr("DATABASE_LOGOUT_GROUP"), // to.Ptr("DATABASE_ROLE_MEMBER_CHANGE_GROUP"), // to.Ptr("UPDATE on database::TestDatabaseName by public")}, // IsAzureMonitorTargetEnabled: to.Ptr(true), // IsStorageSecondaryKeyInUse: to.Ptr(false), // QueueDelayMs: to.Ptr[int32](4000), // RetentionDays: to.Ptr[int32](0), // State: to.Ptr(armsql.BlobAuditingPolicyStateEnabled), // StorageAccountSubscriptionID: to.Ptr("00000000-1234-0000-5678-000000000000"), // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), // }, // } }
Output:
Example (CreateOrUpdateADatabasesBlobAuditingPolicyWithMinimalParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DatabaseBlobAuditingCreateMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseBlobAuditingPoliciesClient().CreateOrUpdate(ctx, "blobauditingtest-4799", "blobauditingtest-6440", "testdb", armsql.DatabaseBlobAuditingPolicy{ Properties: &armsql.DatabaseBlobAuditingPolicyProperties{ State: to.Ptr(armsql.BlobAuditingPolicyStateEnabled), StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseBlobAuditingPolicy = armsql.DatabaseBlobAuditingPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/auditingSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb"), // Kind: to.Ptr("V12"), // Properties: &armsql.DatabaseBlobAuditingPolicyProperties{ // AuditActionsAndGroups: []*string{ // to.Ptr("SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP"), // to.Ptr("FAILED_DATABASE_AUTHENTICATION_GROUP"), // to.Ptr("BATCH_COMPLETED_GROUP")}, // IsAzureMonitorTargetEnabled: to.Ptr(false), // IsStorageSecondaryKeyInUse: to.Ptr(false), // RetentionDays: to.Ptr[int32](0), // State: to.Ptr(armsql.BlobAuditingPolicyStateEnabled), // StorageAccountSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"), // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), // }, // } }
Output:
func (*DatabaseBlobAuditingPoliciesClient) Get ¶
func (client *DatabaseBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabaseBlobAuditingPoliciesClientGetOptions) (DatabaseBlobAuditingPoliciesClientGetResponse, error)
Get - Gets a database's blob auditing policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - DatabaseBlobAuditingPoliciesClientGetOptions contains the optional parameters for the DatabaseBlobAuditingPoliciesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DatabaseBlobAuditingGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseBlobAuditingPoliciesClient().Get(ctx, "blobauditingtest-6852", "blobauditingtest-2080", "testdb", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseBlobAuditingPolicy = armsql.DatabaseBlobAuditingPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/auditingSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/databases/testdb"), // Kind: to.Ptr("V12"), // Properties: &armsql.DatabaseBlobAuditingPolicyProperties{ // AuditActionsAndGroups: []*string{ // }, // IsAzureMonitorTargetEnabled: to.Ptr(false), // IsStorageSecondaryKeyInUse: to.Ptr(false), // RetentionDays: to.Ptr[int32](0), // State: to.Ptr(armsql.BlobAuditingPolicyStateDisabled), // StorageAccountSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"), // StorageEndpoint: to.Ptr(""), // }, // } }
Output:
func (*DatabaseBlobAuditingPoliciesClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *DatabaseBlobAuditingPoliciesClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *DatabaseBlobAuditingPoliciesClientListByDatabaseOptions) *runtime.Pager[DatabaseBlobAuditingPoliciesClientListByDatabaseResponse]
NewListByDatabasePager - Lists auditing settings of a database.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - DatabaseBlobAuditingPoliciesClientListByDatabaseOptions contains the optional parameters for the DatabaseBlobAuditingPoliciesClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DatabaseAuditingSettingsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDatabaseBlobAuditingPoliciesClient().NewListByDatabasePager("blobauditingtest-6852", "blobauditingtest-2080", "testdb", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DatabaseBlobAuditingPolicyListResult = armsql.DatabaseBlobAuditingPolicyListResult{ // Value: []*armsql.DatabaseBlobAuditingPolicy{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/auditingSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/databases/testdb/auditingSettings/default"), // Kind: to.Ptr("V12"), // Properties: &armsql.DatabaseBlobAuditingPolicyProperties{ // AuditActionsAndGroups: []*string{ // }, // IsAzureMonitorTargetEnabled: to.Ptr(false), // IsStorageSecondaryKeyInUse: to.Ptr(false), // RetentionDays: to.Ptr[int32](0), // State: to.Ptr(armsql.BlobAuditingPolicyStateDisabled), // StorageAccountSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"), // StorageEndpoint: to.Ptr(""), // }, // }}, // } } }
Output:
type DatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions ¶ added in v0.3.0
type DatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions struct { }
DatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the DatabaseBlobAuditingPoliciesClient.CreateOrUpdate method.
type DatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type DatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse struct { // A database blob auditing policy. DatabaseBlobAuditingPolicy }
DatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse contains the response from method DatabaseBlobAuditingPoliciesClient.CreateOrUpdate.
type DatabaseBlobAuditingPoliciesClientGetOptions ¶ added in v0.3.0
type DatabaseBlobAuditingPoliciesClientGetOptions struct { }
DatabaseBlobAuditingPoliciesClientGetOptions contains the optional parameters for the DatabaseBlobAuditingPoliciesClient.Get method.
type DatabaseBlobAuditingPoliciesClientGetResponse ¶ added in v0.3.0
type DatabaseBlobAuditingPoliciesClientGetResponse struct { // A database blob auditing policy. DatabaseBlobAuditingPolicy }
DatabaseBlobAuditingPoliciesClientGetResponse contains the response from method DatabaseBlobAuditingPoliciesClient.Get.
type DatabaseBlobAuditingPoliciesClientListByDatabaseOptions ¶ added in v0.3.0
type DatabaseBlobAuditingPoliciesClientListByDatabaseOptions struct { }
DatabaseBlobAuditingPoliciesClientListByDatabaseOptions contains the optional parameters for the DatabaseBlobAuditingPoliciesClient.NewListByDatabasePager method.
type DatabaseBlobAuditingPoliciesClientListByDatabaseResponse ¶ added in v0.3.0
type DatabaseBlobAuditingPoliciesClientListByDatabaseResponse struct { // A list of database auditing settings. DatabaseBlobAuditingPolicyListResult }
DatabaseBlobAuditingPoliciesClientListByDatabaseResponse contains the response from method DatabaseBlobAuditingPoliciesClient.NewListByDatabasePager.
type DatabaseBlobAuditingPolicy ¶
type DatabaseBlobAuditingPolicy struct { // Resource properties. Properties *DatabaseBlobAuditingPolicyProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource kind. Kind *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
DatabaseBlobAuditingPolicy - A database blob auditing policy.
func (DatabaseBlobAuditingPolicy) MarshalJSON ¶
func (d DatabaseBlobAuditingPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseBlobAuditingPolicy.
func (*DatabaseBlobAuditingPolicy) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseBlobAuditingPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseBlobAuditingPolicy.
type DatabaseBlobAuditingPolicyListResult ¶
type DatabaseBlobAuditingPolicyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*DatabaseBlobAuditingPolicy }
DatabaseBlobAuditingPolicyListResult - A list of database auditing settings.
func (DatabaseBlobAuditingPolicyListResult) MarshalJSON ¶
func (d DatabaseBlobAuditingPolicyListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseBlobAuditingPolicyListResult.
func (*DatabaseBlobAuditingPolicyListResult) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseBlobAuditingPolicyListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseBlobAuditingPolicyListResult.
type DatabaseBlobAuditingPolicyProperties ¶
type DatabaseBlobAuditingPolicyProperties struct { // REQUIRED; Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. State *BlobAuditingPolicyState // Specifies the Actions-Groups and Actions to audit. // The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures // executed against the database, as well as successful and failed logins: // BATCHCOMPLETEDGROUP, SUCCESSFULDATABASEAUTHENTICATIONGROUP, FAILEDDATABASEAUTHENTICATIONGROUP. // This above combination is also the set that is configured by default when enabling auditing from the Azure portal. // The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary // groups could lead to very large quantities of audit records): // APPLICATIONROLECHANGEPASSWORDGROUP BACKUPRESTOREGROUP DATABASELOGOUTGROUP DATABASEOBJECTCHANGEGROUP DATABASEOBJECTOWNERSHIPCHANGEGROUP // DATABASEOBJECTPERMISSIONCHANGEGROUP DATABASEOPERATIONGROUP // DATABASEPERMISSIONCHANGEGROUP DATABASEPRINCIPALCHANGEGROUP DATABASEPRINCIPALIMPERSONATIONGROUP DATABASEROLEMEMBERCHANGEGROUP // FAILEDDATABASEAUTHENTICATIONGROUP SCHEMAOBJECTACCESSGROUP SCHEMAOBJECT // CHANGEGROUP SCHEMAOBJECTOWNERSHIPCHANGEGROUP SCHEMAOBJECTPERMISSIONCHANGEGROUP SUCCESSFULDATABASEAUTHENTICATIONGROUP USERCHANGEPASSWORDGROUP // BATCHSTARTEDGROUP BATCHCOMPLETEDGROUP DBCCGROUP DATABASE // OWNERSHIPCHANGEGROUP DATABASECHANGEGROUP LEDGEROPERATION_GROUP // These are groups that cover all sql statements and stored procedures executed against the database, and should not be used // in combination with other groups as this will result in duplicate audit logs. // For more information, see Database-Level Audit Action Groups // [https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups]. // For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server // auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE // EXECUTE RECEIVE REFERENCES // The general form for defining an action to be audited is: {action} ON {object} BY {principal} // Note that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or // schema. For the latter cases, the forms DATABASE::{dbname} and SCHEMA::{schema // name} are used, respectively. // For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on SCHEMA::mySchema by public // For more information, see Database-Level Audit Actions // [https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions] AuditActionsAndGroups []*string // Specifies whether audit events are sent to Azure Monitor. In order to send the events to Azure Monitor, specify 'State' // as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true. // When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on // the database should be also created. Note that for server level audit you // should use the 'master' database as {databaseName}. // Diagnostic Settings URI format: PUT // https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview // For more information, see Diagnostic Settings REST API [https://go.microsoft.com/fwlink/?linkid=2033207]or Diagnostic Settings // PowerShell [https://go.microsoft.com/fwlink/?linkid=2033043] IsAzureMonitorTargetEnabled *bool // Specifies whether Managed Identity is used to access blob storage IsManagedIdentityInUse *bool // Specifies whether storageAccountAccessKey value is the storage's secondary key. IsStorageSecondaryKeyInUse *bool // Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. The default // minimum value is 1000 (1 second). The maximum is 2,147,483,647. QueueDelayMs *int32 // Specifies the number of days to keep in the audit logs in the storage account. RetentionDays *int32 // Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, not // specifying the storageAccountAccessKey will use SQL server system-assigned // managed identity to access the storage. Prerequisites for using managed identity authentication: // 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). // 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server // identity. For more information, see Auditing to storage using Managed // Identity authentication [https://go.microsoft.com/fwlink/?linkid=2114355] StorageAccountAccessKey *string // Specifies the blob storage subscription Id. StorageAccountSubscriptionID *string // Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint // or isAzureMonitorTargetEnabled is required. StorageEndpoint *string }
DatabaseBlobAuditingPolicyProperties - Properties of a database blob auditing policy.
func (DatabaseBlobAuditingPolicyProperties) MarshalJSON ¶
func (d DatabaseBlobAuditingPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseBlobAuditingPolicyProperties.
func (*DatabaseBlobAuditingPolicyProperties) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseBlobAuditingPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseBlobAuditingPolicyProperties.
type DatabaseColumn ¶
type DatabaseColumn struct { // Resource properties. Properties *DatabaseColumnProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
DatabaseColumn - A database column resource.
func (DatabaseColumn) MarshalJSON ¶
func (d DatabaseColumn) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseColumn.
func (*DatabaseColumn) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseColumn) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseColumn.
type DatabaseColumnListResult ¶
type DatabaseColumnListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*DatabaseColumn }
DatabaseColumnListResult - A list of database columns.
func (DatabaseColumnListResult) MarshalJSON ¶
func (d DatabaseColumnListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseColumnListResult.
func (*DatabaseColumnListResult) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseColumnListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseColumnListResult.
type DatabaseColumnProperties ¶
type DatabaseColumnProperties struct { // The column data type. ColumnType *ColumnDataType // Whether or not the column is computed. IsComputed *bool // Whether or not the column belongs to a memory optimized table. MemoryOptimized *bool // The table temporal type. TemporalType *TableTemporalType }
DatabaseColumnProperties - Database column properties.
func (DatabaseColumnProperties) MarshalJSON ¶ added in v1.1.0
func (d DatabaseColumnProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseColumnProperties.
func (*DatabaseColumnProperties) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseColumnProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseColumnProperties.
type DatabaseColumnsClient ¶
type DatabaseColumnsClient struct {
// contains filtered or unexported fields
}
DatabaseColumnsClient contains the methods for the DatabaseColumns group. Don't use this type directly, use NewDatabaseColumnsClient() instead.
func NewDatabaseColumnsClient ¶
func NewDatabaseColumnsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseColumnsClient, error)
NewDatabaseColumnsClient creates a new instance of DatabaseColumnsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DatabaseColumnsClient) Get ¶
func (client *DatabaseColumnsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string, options *DatabaseColumnsClientGetOptions) (DatabaseColumnsClientGetResponse, error)
Get - Get database column If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- schemaName - The name of the schema.
- tableName - The name of the table.
- columnName - The name of the column.
- options - DatabaseColumnsClientGetOptions contains the optional parameters for the DatabaseColumnsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseColumnGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseColumnsClient().Get(ctx, "myRG", "serverName", "myDatabase", "dbo", "table1", "column1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseColumn = armsql.DatabaseColumn{ // Name: to.Ptr("column1"), // Type: to.Ptr("Microsoft.Sql/servers/databases/schemas/tables/columns"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1/columns/column1"), // Properties: &armsql.DatabaseColumnProperties{ // ColumnType: to.Ptr(armsql.ColumnDataTypeBit), // IsComputed: to.Ptr(false), // MemoryOptimized: to.Ptr(false), // TemporalType: to.Ptr(armsql.TableTemporalTypeSystemVersionedTemporalTable), // }, // } }
Output:
func (*DatabaseColumnsClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *DatabaseColumnsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *DatabaseColumnsClientListByDatabaseOptions) *runtime.Pager[DatabaseColumnsClientListByDatabaseResponse]
NewListByDatabasePager - List database columns
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - DatabaseColumnsClientListByDatabaseOptions contains the optional parameters for the DatabaseColumnsClient.NewListByDatabasePager method.
Example (FilterDatabaseColumns) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ColumnsListByDatabaseMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDatabaseColumnsClient().NewListByDatabasePager("myRG", "serverName", "myDatabase", &armsql.DatabaseColumnsClientListByDatabaseOptions{Schema: []string{ "dbo"}, Table: []string{ "customer", "address"}, Column: []string{ "username"}, OrderBy: []string{ "schema asc", "table", "column desc"}, Skiptoken: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DatabaseColumnListResult = armsql.DatabaseColumnListResult{ // Value: []*armsql.DatabaseColumn{ // { // Name: to.Ptr("username"), // Type: to.Ptr("Microsoft.Sql/servers/databases/schemas/tables/columns"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/customer/columns/username"), // Properties: &armsql.DatabaseColumnProperties{ // ColumnType: to.Ptr(armsql.ColumnDataTypeNvarchar), // IsComputed: to.Ptr(false), // MemoryOptimized: to.Ptr(false), // TemporalType: to.Ptr(armsql.TableTemporalTypeNonTemporalTable), // }, // }}, // } } }
Output:
Example (ListDatabaseColumns) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ColumnsListByDatabaseMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDatabaseColumnsClient().NewListByDatabasePager("myRG", "serverName", "myDatabase", &armsql.DatabaseColumnsClientListByDatabaseOptions{Schema: []string{}, Table: []string{}, Column: []string{}, OrderBy: []string{}, Skiptoken: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DatabaseColumnListResult = armsql.DatabaseColumnListResult{ // Value: []*armsql.DatabaseColumn{ // { // Name: to.Ptr("col1"), // Type: to.Ptr("Microsoft.Sql/servers/databases/schemas/tables/columns"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1/columns/col1"), // Properties: &armsql.DatabaseColumnProperties{ // ColumnType: to.Ptr(armsql.ColumnDataTypeInt), // IsComputed: to.Ptr(false), // MemoryOptimized: to.Ptr(false), // TemporalType: to.Ptr(armsql.TableTemporalTypeNonTemporalTable), // }, // }, // { // Name: to.Ptr("col2"), // Type: to.Ptr("Microsoft.Sql/servers/databases/schemas/tables/columns"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1/columns/col2"), // Properties: &armsql.DatabaseColumnProperties{ // ColumnType: to.Ptr(armsql.ColumnDataTypeBit), // IsComputed: to.Ptr(false), // MemoryOptimized: to.Ptr(false), // TemporalType: to.Ptr(armsql.TableTemporalTypeSystemVersionedTemporalTable), // }, // }}, // } } }
Output:
func (*DatabaseColumnsClient) NewListByTablePager ¶ added in v0.5.0
func (client *DatabaseColumnsClient) NewListByTablePager(resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, options *DatabaseColumnsClientListByTableOptions) *runtime.Pager[DatabaseColumnsClientListByTableResponse]
NewListByTablePager - List database columns
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- schemaName - The name of the schema.
- tableName - The name of the table.
- options - DatabaseColumnsClientListByTableOptions contains the optional parameters for the DatabaseColumnsClient.NewListByTablePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseColumnListByTable.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDatabaseColumnsClient().NewListByTablePager("myRG", "serverName", "myDatabase", "dbo", "table1", &armsql.DatabaseColumnsClientListByTableOptions{Filter: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DatabaseColumnListResult = armsql.DatabaseColumnListResult{ // Value: []*armsql.DatabaseColumn{ // { // Name: to.Ptr("col1"), // Type: to.Ptr("Microsoft.Sql/servers/databases/schemas/tables/columns"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1/columns/col1"), // Properties: &armsql.DatabaseColumnProperties{ // ColumnType: to.Ptr(armsql.ColumnDataTypeNvarchar), // IsComputed: to.Ptr(false), // MemoryOptimized: to.Ptr(false), // TemporalType: to.Ptr(armsql.TableTemporalTypeNonTemporalTable), // }, // }, // { // Name: to.Ptr("col2"), // Type: to.Ptr("Microsoft.Sql/servers/databases/schemas/tables/columns"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1/columns/col2"), // Properties: &armsql.DatabaseColumnProperties{ // ColumnType: to.Ptr(armsql.ColumnDataTypeBit), // IsComputed: to.Ptr(false), // MemoryOptimized: to.Ptr(false), // TemporalType: to.Ptr(armsql.TableTemporalTypeNonTemporalTable), // }, // }}, // } } }
Output:
type DatabaseColumnsClientGetOptions ¶ added in v0.3.0
type DatabaseColumnsClientGetOptions struct { }
DatabaseColumnsClientGetOptions contains the optional parameters for the DatabaseColumnsClient.Get method.
type DatabaseColumnsClientGetResponse ¶ added in v0.3.0
type DatabaseColumnsClientGetResponse struct { // A database column resource. DatabaseColumn }
DatabaseColumnsClientGetResponse contains the response from method DatabaseColumnsClient.Get.
type DatabaseColumnsClientListByDatabaseOptions ¶ added in v0.3.0
type DatabaseColumnsClientListByDatabaseOptions struct { Column []string OrderBy []string Schema []string // An opaque token that identifies a starting point in the collection. Skiptoken *string Table []string }
DatabaseColumnsClientListByDatabaseOptions contains the optional parameters for the DatabaseColumnsClient.NewListByDatabasePager method.
type DatabaseColumnsClientListByDatabaseResponse ¶ added in v0.3.0
type DatabaseColumnsClientListByDatabaseResponse struct { // A list of database columns. DatabaseColumnListResult }
DatabaseColumnsClientListByDatabaseResponse contains the response from method DatabaseColumnsClient.NewListByDatabasePager.
type DatabaseColumnsClientListByTableOptions ¶ added in v0.3.0
type DatabaseColumnsClientListByTableOptions struct { // An OData filter expression that filters elements in the collection. Filter *string }
DatabaseColumnsClientListByTableOptions contains the optional parameters for the DatabaseColumnsClient.NewListByTablePager method.
type DatabaseColumnsClientListByTableResponse ¶ added in v0.3.0
type DatabaseColumnsClientListByTableResponse struct { // A list of database columns. DatabaseColumnListResult }
DatabaseColumnsClientListByTableResponse contains the response from method DatabaseColumnsClient.NewListByTablePager.
type DatabaseExtensions ¶
type DatabaseExtensions struct { // Resource properties. Properties *DatabaseExtensionsProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
DatabaseExtensions - An export managed database operation result resource.
func (DatabaseExtensions) MarshalJSON ¶
func (d DatabaseExtensions) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseExtensions.
func (*DatabaseExtensions) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseExtensions) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseExtensions.
type DatabaseExtensionsClient ¶
type DatabaseExtensionsClient struct {
// contains filtered or unexported fields
}
DatabaseExtensionsClient contains the methods for the DatabaseExtensions group. Don't use this type directly, use NewDatabaseExtensionsClient() instead.
func NewDatabaseExtensionsClient ¶
func NewDatabaseExtensionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseExtensionsClient, error)
NewDatabaseExtensionsClient creates a new instance of DatabaseExtensionsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DatabaseExtensionsClient) BeginCreateOrUpdate ¶
func (client *DatabaseExtensionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, extensionName string, parameters DatabaseExtensions, options *DatabaseExtensionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DatabaseExtensionsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Perform a database extension operation, like polybase import If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-02-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- parameters - The database import request parameters.
- options - DatabaseExtensionsClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabaseExtensionsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateDatabaseExtensions.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabaseExtensionsClient().BeginCreateOrUpdate(ctx, "rg_20cbe0f0-c2d9-4522-9177-5469aad53029", "srv_1ffd1cf8-9951-47fb-807d-a9c384763849", "878e303f-1ea0-4f17-aa3d-a22ac5e9da08", "polybaseimport", armsql.DatabaseExtensions{ Properties: &armsql.DatabaseExtensionsProperties{ OperationMode: to.Ptr(armsql.OperationModePolybaseImport), StorageKey: to.Ptr("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"), StorageKeyType: to.Ptr(armsql.StorageKeyTypeStorageAccessKey), StorageURI: to.Ptr("https://teststorage.blob.core.windows.net/testcontainer/Manifest.xml"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ImportExportExtensionsOperationResult = armsql.ImportExportExtensionsOperationResult{ // Name: to.Ptr("10000000-0000-0000-0000-000000000002"), // Type: to.Ptr("Microsoft.Sql/servers/databases/extensions"), // ID: to.Ptr("10000000-0000-0000-0000-000000000002"), // Properties: &armsql.ImportExportExtensionsOperationResultProperties{ // DatabaseName: to.Ptr("878e303f-1ea0-4f17-aa3d-a22ac5e9da08"), // LastModifiedTime: to.Ptr("lastModifiedTime"), // RequestID: to.Ptr("10000000-0000-0000-0000-000000000002"), // RequestType: to.Ptr("PolybaseImport"), // ServerName: to.Ptr("srv_1ffd1cf8-9951-47fb-807d-a9c384763849"), // Status: to.Ptr("succeeded"), // }, // } }
Output:
func (*DatabaseExtensionsClient) Get ¶
func (client *DatabaseExtensionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, extensionName string, options *DatabaseExtensionsClientGetOptions) (DatabaseExtensionsClientGetResponse, error)
Get - Gets a database extension. This will return resource not found as it is not supported. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-02-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - DatabaseExtensionsClientGetOptions contains the optional parameters for the DatabaseExtensionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetDatabaseExtensions.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewDatabaseExtensionsClient().Get(ctx, "rg_a1f9d6f8-30d5-4228-9504-8a364361bca3", "srv_65858e0f-b1d1-4bdc-8351-a7da86ca4939", "11aa6c5e-58ed-4693-b303-3b8e3131deaa", "polybaseimport", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*DatabaseExtensionsClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *DatabaseExtensionsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *DatabaseExtensionsClientListByDatabaseOptions) *runtime.Pager[DatabaseExtensionsClientListByDatabaseResponse]
NewListByDatabasePager - List database extension. This will return an empty list as it is not supported.
Generated from API version 2021-02-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - DatabaseExtensionsClientListByDatabaseOptions contains the optional parameters for the DatabaseExtensionsClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListDatabaseExtensions.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDatabaseExtensionsClient().NewListByDatabasePager("rg_4007c5a9-b3b0-41e1-bd46-9eef38768a4a", "srv_3b67ec2a-519b-43a7-8533-fb62dce3431e", "719d8fa4-bf0f-48fc-8cd3-ef40fe6ba1fe", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ImportExportExtensionsOperationListResult = armsql.ImportExportExtensionsOperationListResult{ // Value: []*armsql.ImportExportExtensionsOperationResult{ // }, // } } }
Output:
type DatabaseExtensionsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type DatabaseExtensionsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabaseExtensionsClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabaseExtensionsClient.BeginCreateOrUpdate method.
type DatabaseExtensionsClientCreateOrUpdateResponse ¶ added in v0.3.0
type DatabaseExtensionsClientCreateOrUpdateResponse struct { // An Extension operation result resource. ImportExportExtensionsOperationResult }
DatabaseExtensionsClientCreateOrUpdateResponse contains the response from method DatabaseExtensionsClient.BeginCreateOrUpdate.
type DatabaseExtensionsClientGetOptions ¶ added in v0.3.0
type DatabaseExtensionsClientGetOptions struct { }
DatabaseExtensionsClientGetOptions contains the optional parameters for the DatabaseExtensionsClient.Get method.
type DatabaseExtensionsClientGetResponse ¶ added in v0.3.0
type DatabaseExtensionsClientGetResponse struct { }
DatabaseExtensionsClientGetResponse contains the response from method DatabaseExtensionsClient.Get.
type DatabaseExtensionsClientListByDatabaseOptions ¶ added in v0.3.0
type DatabaseExtensionsClientListByDatabaseOptions struct { }
DatabaseExtensionsClientListByDatabaseOptions contains the optional parameters for the DatabaseExtensionsClient.NewListByDatabasePager method.
type DatabaseExtensionsClientListByDatabaseResponse ¶ added in v0.3.0
type DatabaseExtensionsClientListByDatabaseResponse struct { // Import export operation extensions list. ImportExportExtensionsOperationListResult }
DatabaseExtensionsClientListByDatabaseResponse contains the response from method DatabaseExtensionsClient.NewListByDatabasePager.
type DatabaseExtensionsProperties ¶
type DatabaseExtensionsProperties struct { // REQUIRED; Operation Mode. OperationMode *OperationMode // REQUIRED; Storage key. StorageKey *string // REQUIRED; Storage key type. StorageKeyType *StorageKeyType // REQUIRED; Storage Uri. StorageURI *string }
DatabaseExtensionsProperties - Contains the database information after successful export.
func (DatabaseExtensionsProperties) MarshalJSON ¶ added in v1.1.0
func (d DatabaseExtensionsProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseExtensionsProperties.
func (*DatabaseExtensionsProperties) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseExtensionsProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseExtensionsProperties.
type DatabaseIdentity ¶ added in v0.3.0
type DatabaseIdentity struct { // The identity type Type *DatabaseIdentityType // The resource ids of the user assigned identities to use UserAssignedIdentities map[string]*DatabaseUserIdentity // READ-ONLY; The Azure Active Directory tenant id. TenantID *string }
DatabaseIdentity - Azure Active Directory identity configuration for a resource.
func (DatabaseIdentity) MarshalJSON ¶ added in v0.3.0
func (d DatabaseIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseIdentity.
func (*DatabaseIdentity) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseIdentity.
type DatabaseIdentityType ¶ added in v0.3.0
type DatabaseIdentityType string
DatabaseIdentityType - The identity type
const ( DatabaseIdentityTypeNone DatabaseIdentityType = "None" DatabaseIdentityTypeUserAssigned DatabaseIdentityType = "UserAssigned" )
func PossibleDatabaseIdentityTypeValues ¶ added in v0.3.0
func PossibleDatabaseIdentityTypeValues() []DatabaseIdentityType
PossibleDatabaseIdentityTypeValues returns the possible values for the DatabaseIdentityType const type.
type DatabaseLicenseType ¶
type DatabaseLicenseType string
DatabaseLicenseType - The license type to apply for this database. LicenseIncluded if you need a license, or BasePrice if you have a license and are eligible for the Azure Hybrid Benefit.
const ( DatabaseLicenseTypeBasePrice DatabaseLicenseType = "BasePrice" DatabaseLicenseTypeLicenseIncluded DatabaseLicenseType = "LicenseIncluded" )
func PossibleDatabaseLicenseTypeValues ¶
func PossibleDatabaseLicenseTypeValues() []DatabaseLicenseType
PossibleDatabaseLicenseTypeValues returns the possible values for the DatabaseLicenseType const type.
type DatabaseListResult ¶
type DatabaseListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*Database }
DatabaseListResult - A list of databases.
func (DatabaseListResult) MarshalJSON ¶
func (d DatabaseListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseListResult.
func (*DatabaseListResult) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseListResult.
type DatabaseOperation ¶
type DatabaseOperation struct { // Resource properties. Properties *DatabaseOperationProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
DatabaseOperation - A database operation.
func (DatabaseOperation) MarshalJSON ¶
func (d DatabaseOperation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseOperation.
func (*DatabaseOperation) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseOperation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseOperation.
type DatabaseOperationListResult ¶
type DatabaseOperationListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*DatabaseOperation }
DatabaseOperationListResult - The response to a list database operations request
func (DatabaseOperationListResult) MarshalJSON ¶
func (d DatabaseOperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseOperationListResult.
func (*DatabaseOperationListResult) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseOperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseOperationListResult.
type DatabaseOperationProperties ¶
type DatabaseOperationProperties struct { // READ-ONLY; The name of the database the operation is being performed on. DatabaseName *string // READ-ONLY; The operation description. Description *string // READ-ONLY; The operation error code. ErrorCode *int32 // READ-ONLY; The operation error description. ErrorDescription *string // READ-ONLY; The operation error severity. ErrorSeverity *int32 // READ-ONLY; The estimated completion time of the operation. EstimatedCompletionTime *time.Time // READ-ONLY; Whether the operation can be cancelled. IsCancellable *bool // READ-ONLY; Whether or not the error is a user error. IsUserError *bool // READ-ONLY; The name of operation. Operation *string // READ-ONLY; The friendly name of operation. OperationFriendlyName *string // READ-ONLY; The percentage of the operation completed. PercentComplete *int32 // READ-ONLY; The name of the server. ServerName *string // READ-ONLY; The operation start time. StartTime *time.Time // READ-ONLY; The operation state. State *ManagementOperationState }
DatabaseOperationProperties - The properties of a database operation.
func (DatabaseOperationProperties) MarshalJSON ¶
func (d DatabaseOperationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseOperationProperties.
func (*DatabaseOperationProperties) UnmarshalJSON ¶
func (d *DatabaseOperationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseOperationProperties.
type DatabaseOperationsClient ¶
type DatabaseOperationsClient struct {
// contains filtered or unexported fields
}
DatabaseOperationsClient contains the methods for the DatabaseOperations group. Don't use this type directly, use NewDatabaseOperationsClient() instead.
func NewDatabaseOperationsClient ¶
func NewDatabaseOperationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseOperationsClient, error)
NewDatabaseOperationsClient creates a new instance of DatabaseOperationsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DatabaseOperationsClient) Cancel ¶
func (client *DatabaseOperationsClient) Cancel(ctx context.Context, resourceGroupName string, serverName string, databaseName string, operationID string, options *DatabaseOperationsClientCancelOptions) (DatabaseOperationsClientCancelResponse, error)
Cancel - Cancels the asynchronous operation on the database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-02-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- operationID - The operation identifier.
- options - DatabaseOperationsClientCancelOptions contains the optional parameters for the DatabaseOperationsClient.Cancel method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CancelDatabaseOperation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewDatabaseOperationsClient().Cancel(ctx, "sqlcrudtest-7398", "sqlcrudtest-6661", "testdb", "f779414b-e748-4925-8cfe-c8598f7660ae", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*DatabaseOperationsClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *DatabaseOperationsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *DatabaseOperationsClientListByDatabaseOptions) *runtime.Pager[DatabaseOperationsClientListByDatabaseResponse]
NewListByDatabasePager - Gets a list of operations performed on the database.
Generated from API version 2021-02-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - DatabaseOperationsClientListByDatabaseOptions contains the optional parameters for the DatabaseOperationsClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListDatabaseOperations.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDatabaseOperationsClient().NewListByDatabasePager("sqlcrudtest-7398", "sqlcrudtest-4645", "testdb", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DatabaseOperationListResult = armsql.DatabaseOperationListResult{ // Value: []*armsql.DatabaseOperation{ // { // Name: to.Ptr("11111111-1111-1111-1111-111111111111"), // Type: to.Ptr("Microsoft.Sql/servers/databases/operations"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/databases/testdb/operations/11111111-1111-1111-1111-111111111111"), // Properties: &armsql.DatabaseOperationProperties{ // DatabaseName: to.Ptr("testdb"), // Operation: to.Ptr("UpdateLogicalDatabase"), // OperationFriendlyName: to.Ptr("ALTER DATABASE"), // PercentComplete: to.Ptr[int32](100), // ServerName: to.Ptr("sqlcrudtest-4645"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T09:10:08.100Z"); return t}()), // State: to.Ptr(armsql.ManagementOperationStateSucceeded), // }, // }, // { // Name: to.Ptr("55555555-5555-5555-5555-555555555555"), // Type: to.Ptr("Microsoft.Sql/servers/databases/operations"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/databases/testdb/operations/55555555-5555-5555-5555-555555555555"), // Properties: &armsql.DatabaseOperationProperties{ // DatabaseName: to.Ptr("testdb"), // Operation: to.Ptr("UpdateLogicalDatabase"), // OperationFriendlyName: to.Ptr("ALTER DATABASE"), // PercentComplete: to.Ptr[int32](19), // ServerName: to.Ptr("sqlcrudtest-4645"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T10:10:08.100Z"); return t}()), // State: to.Ptr(armsql.ManagementOperationStateInProgress), // }, // }}, // } } }
Output:
type DatabaseOperationsClientCancelOptions ¶ added in v0.3.0
type DatabaseOperationsClientCancelOptions struct { }
DatabaseOperationsClientCancelOptions contains the optional parameters for the DatabaseOperationsClient.Cancel method.
type DatabaseOperationsClientCancelResponse ¶ added in v0.3.0
type DatabaseOperationsClientCancelResponse struct { }
DatabaseOperationsClientCancelResponse contains the response from method DatabaseOperationsClient.Cancel.
type DatabaseOperationsClientListByDatabaseOptions ¶ added in v0.3.0
type DatabaseOperationsClientListByDatabaseOptions struct { }
DatabaseOperationsClientListByDatabaseOptions contains the optional parameters for the DatabaseOperationsClient.NewListByDatabasePager method.
type DatabaseOperationsClientListByDatabaseResponse ¶ added in v0.3.0
type DatabaseOperationsClientListByDatabaseResponse struct { // The response to a list database operations request DatabaseOperationListResult }
DatabaseOperationsClientListByDatabaseResponse contains the response from method DatabaseOperationsClient.NewListByDatabasePager.
type DatabaseProperties ¶
type DatabaseProperties struct { // Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled AutoPauseDelay *int32 // Collation of the metadata catalog. CatalogCollation *CatalogCollationType // The collation of the database. Collation *string // Specifies the mode of database creation. // Default: regular database creation. // Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of the // source database. // Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified as the // resource ID of the existing primary database. // PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. sourceDatabaseId must // be specified as the resource ID of the existing database, and // restorePointInTime must be specified. // Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the recoverable // database resource ID to restore. // Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If sourceDatabaseId // is the database's original resource ID, then sourceDatabaseDeletionDate // must be specified. Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate // is ignored. restorePointInTime may also be specified to restore from an // earlier point in time. // RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. recoveryServicesRecoveryPointResourceId // must be specified as the recovery point resource ID. // Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. CreateMode *CreateMode // The resource identifier of the elastic pool containing this database. ElasticPoolID *string // The Client id used for cross tenant per database CMK scenario FederatedClientID *string // The number of secondary replicas associated with the database that are used to provide high availability. Not applicable // to a Hyperscale database within an elastic pool. HighAvailabilityReplicaCount *int32 // Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the // value of this property cannot be changed after the database has been created. IsLedgerOn *bool // The license type to apply for this database. LicenseIncluded if you need a license, or BasePrice if you have a license // and are eligible for the Azure Hybrid Benefit. LicenseType *DatabaseLicenseType // The resource identifier of the long term retention backup associated with create operation of this database. LongTermRetentionBackupResourceID *string // Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates // will occur. MaintenanceConfigurationID *string // The max size of the database expressed in bytes. MaxSizeBytes *int64 // Minimal capacity that database will always have allocated, if not paused MinCapacity *float64 // The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection // string may be routed to a readonly secondary replica in the same region. Not // applicable to a Hyperscale database within an elastic pool. ReadScale *DatabaseReadScale // The resource identifier of the recoverable database associated with create operation of this database. RecoverableDatabaseID *string // The resource identifier of the recovery point associated with create operation of this database. RecoveryServicesRecoveryPointID *string // The storage account type to be used to store backups for this database. RequestedBackupStorageRedundancy *BackupStorageRedundancy // The resource identifier of the restorable dropped database associated with create operation of this database. RestorableDroppedDatabaseID *string // Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. RestorePointInTime *time.Time // The name of the sample schema to apply when creating this database. SampleName *SampleName // The secondary type of the database if it is a secondary. Valid values are Geo and Named. SecondaryType *SecondaryType // Specifies the time that the database was deleted. SourceDatabaseDeletionDate *time.Time // The resource identifier of the source database associated with create operation of this database. SourceDatabaseID *string // The resource identifier of the source associated with the create operation of this database. // When sourceResourceId is specified, sourceDatabaseId, recoverableDatabaseId, restorableDroppedDatabaseId and sourceDatabaseDeletionDate // must not be specified and CreateMode must be PointInTimeRestore, // Restore or Recover. // When createMode is PointInTimeRestore, sourceResourceId must be the resource ID of an existing database or existing sql // pool, and restorePointInTime must be specified. // When createMode is Restore, sourceResourceId must be the resource ID of restorable dropped database or restorable dropped // sql pool. // When createMode is Recover, sourceResourceId must be the resource ID of recoverable database or recoverable sql pool. // This property allows to restore across subscriptions which is only supported for DataWarehouse edition. // When source subscription belongs to a different tenant than target subscription, “x-ms-authorization-auxiliary” header // must contain authentication token for the source tenant. For more details about // “x-ms-authorization-auxiliary” header see https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant SourceResourceID *string // Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple // availability zones. ZoneRedundant *bool // READ-ONLY; The creation date of the database (ISO8601 format). CreationDate *time.Time // READ-ONLY; The storage account type used to store backups for this database. CurrentBackupStorageRedundancy *BackupStorageRedundancy // READ-ONLY; The name and tier of the SKU. CurrentSKU *SKU // READ-ONLY; The current service level objective name of the database. CurrentServiceObjectiveName *string // READ-ONLY; The ID of the database. DatabaseID *string // READ-ONLY; The default secondary region for this database. DefaultSecondaryLocation *string // READ-ONLY; This records the earliest start date and time that restore is available for this database (ISO8601 format). EarliestRestoreDate *time.Time // READ-ONLY; Failover Group resource identifier that this database belongs to. FailoverGroupID *string // READ-ONLY; Infra encryption is enabled for this database. IsInfraEncryptionEnabled *bool // READ-ONLY; The max log size for this database. MaxLogSizeBytes *int64 // READ-ONLY; The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready. PausedDate *time.Time // READ-ONLY; The requested service level objective name of the database. RequestedServiceObjectiveName *string // READ-ONLY; The date when database was resumed by user action or database login (ISO8601 format). Null if the database is // paused. ResumedDate *time.Time // READ-ONLY; The status of the database. Status *DatabaseStatus }
DatabaseProperties - The database's properties.
func (DatabaseProperties) MarshalJSON ¶
func (d DatabaseProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseProperties.
func (*DatabaseProperties) UnmarshalJSON ¶
func (d *DatabaseProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseProperties.
type DatabaseReadScale ¶
type DatabaseReadScale string
DatabaseReadScale - The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region. Not applicable to a Hyperscale database within an elastic pool.
const ( DatabaseReadScaleDisabled DatabaseReadScale = "Disabled" DatabaseReadScaleEnabled DatabaseReadScale = "Enabled" )
func PossibleDatabaseReadScaleValues ¶
func PossibleDatabaseReadScaleValues() []DatabaseReadScale
PossibleDatabaseReadScaleValues returns the possible values for the DatabaseReadScale const type.
type DatabaseRecommendedActionsClient ¶
type DatabaseRecommendedActionsClient struct {
// contains filtered or unexported fields
}
DatabaseRecommendedActionsClient contains the methods for the DatabaseRecommendedActions group. Don't use this type directly, use NewDatabaseRecommendedActionsClient() instead.
func NewDatabaseRecommendedActionsClient ¶
func NewDatabaseRecommendedActionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseRecommendedActionsClient, error)
NewDatabaseRecommendedActionsClient creates a new instance of DatabaseRecommendedActionsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DatabaseRecommendedActionsClient) Get ¶
func (client *DatabaseRecommendedActionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, advisorName string, recommendedActionName string, options *DatabaseRecommendedActionsClientGetOptions) (DatabaseRecommendedActionsClientGetResponse, error)
Get - Gets a database recommended action. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- advisorName - The name of the Database Advisor.
- recommendedActionName - The name of Database Recommended Action.
- options - DatabaseRecommendedActionsClientGetOptions contains the optional parameters for the DatabaseRecommendedActionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRecommendedActionGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseRecommendedActionsClient().Get(ctx, "workloadinsight-demos", "misosisvr", "IndexAdvisor_test_3", "CreateIndex", "IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RecommendedAction = armsql.RecommendedAction{ // Name: to.Ptr("IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advisors/recommendedActions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex/recommendedActions/IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.RecommendedActionProperties{ // ErrorDetails: &armsql.RecommendedActionErrorInfo{ // }, // EstimatedImpact: []*armsql.RecommendedActionImpactRecord{ // { // AbsoluteValue: to.Ptr[float64](1440), // DimensionName: to.Ptr("ActionDuration"), // Unit: to.Ptr("Seconds"), // }, // { // AbsoluteValue: to.Ptr[float64](209.3125), // DimensionName: to.Ptr("SpaceChange"), // Unit: to.Ptr("Megabytes"), // }}, // ImplementationDetails: &armsql.RecommendedActionImplementationInfo{ // Method: to.Ptr(armsql.ImplementationMethodTSQL), // Script: to.Ptr("CREATE NONCLUSTERED INDEX [nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B] ON [CRM].[DataPoints] ([Name],[Money],[Power]) INCLUDE ([Hour], [System], [LastChanged]) WITH (ONLINE = ON)"), // }, // IsArchivedAction: to.Ptr(false), // IsExecutableAction: to.Ptr(true), // IsRevertableAction: to.Ptr(true), // LastRefresh: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:04.000Z"); return t}()), // ObservedImpact: []*armsql.RecommendedActionImpactRecord{ // }, // RecommendationReason: to.Ptr(""), // Score: to.Ptr[int32](1), // State: &armsql.RecommendedActionStateInfo{ // CurrentValue: to.Ptr(armsql.RecommendedActionCurrentStateActive), // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // }, // TimeSeries: []*armsql.RecommendedActionMetricInfo{ // }, // ValidSince: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:04.000Z"); return t}()), // Details: map[string]any{ // "schema": "[CRM]", // "includedColumns": "[Hour], [System], [LastChanged]", // "indexColumns": "[Name],[Money],[Power]", // "indexName": "nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B", // "indexType": "NONCLUSTERED", // "table": "[DataPoints]", // }, // }, // } }
Output:
func (*DatabaseRecommendedActionsClient) ListByDatabaseAdvisor ¶
func (client *DatabaseRecommendedActionsClient) ListByDatabaseAdvisor(ctx context.Context, resourceGroupName string, serverName string, databaseName string, advisorName string, options *DatabaseRecommendedActionsClientListByDatabaseAdvisorOptions) (DatabaseRecommendedActionsClientListByDatabaseAdvisorResponse, error)
ListByDatabaseAdvisor - Gets list of Database Recommended Actions. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- advisorName - The name of the Database Advisor.
- options - DatabaseRecommendedActionsClientListByDatabaseAdvisorOptions contains the optional parameters for the DatabaseRecommendedActionsClient.ListByDatabaseAdvisor method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRecommendedActionList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseRecommendedActionsClient().ListByDatabaseAdvisor(ctx, "workloadinsight-demos", "misosisvr", "IndexAdvisor_test_3", "CreateIndex", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RecommendedActionArray = []*armsql.RecommendedAction{ // { // Name: to.Ptr("IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advisors/recommendedActions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex/recommendedActions/IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.RecommendedActionProperties{ // ErrorDetails: &armsql.RecommendedActionErrorInfo{ // }, // EstimatedImpact: []*armsql.RecommendedActionImpactRecord{ // { // AbsoluteValue: to.Ptr[float64](1440), // DimensionName: to.Ptr("ActionDuration"), // Unit: to.Ptr("Seconds"), // }, // { // AbsoluteValue: to.Ptr[float64](209.3125), // DimensionName: to.Ptr("SpaceChange"), // Unit: to.Ptr("Megabytes"), // }}, // ImplementationDetails: &armsql.RecommendedActionImplementationInfo{ // Method: to.Ptr(armsql.ImplementationMethodTSQL), // Script: to.Ptr("CREATE NONCLUSTERED INDEX [nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B] ON [CRM].[DataPoints] ([Name],[Money],[Power]) INCLUDE ([Hour], [System], [LastChanged]) WITH (ONLINE = ON)"), // }, // IsArchivedAction: to.Ptr(false), // IsExecutableAction: to.Ptr(true), // IsRevertableAction: to.Ptr(true), // LastRefresh: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:04.000Z"); return t}()), // ObservedImpact: []*armsql.RecommendedActionImpactRecord{ // }, // RecommendationReason: to.Ptr(""), // Score: to.Ptr[int32](1), // State: &armsql.RecommendedActionStateInfo{ // CurrentValue: to.Ptr(armsql.RecommendedActionCurrentStateActive), // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // }, // TimeSeries: []*armsql.RecommendedActionMetricInfo{ // }, // ValidSince: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:04.000Z"); return t}()), // Details: map[string]any{ // "schema": "[CRM]", // "includedColumns": "[Hour], [System], [LastChanged]", // "indexColumns": "[Name],[Money],[Power]", // "indexName": "nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B", // "indexType": "NONCLUSTERED", // "table": "[DataPoints]", // }, // }, // }, // { // Name: to.Ptr("IR_[dbo]_[DataPoints]_F5D2F347AA22DB46E4CC"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advisors/recommendedActions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex/recommendedActions/IR_[dbo]_[DataPoints]_F5D2F347AA22DB46E4CC"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.RecommendedActionProperties{ // ErrorDetails: &armsql.RecommendedActionErrorInfo{ // }, // EstimatedImpact: []*armsql.RecommendedActionImpactRecord{ // { // AbsoluteValue: to.Ptr[float64](5040), // DimensionName: to.Ptr("ActionDuration"), // Unit: to.Ptr("Seconds"), // }, // { // AbsoluteValue: to.Ptr[float64](120), // DimensionName: to.Ptr("SpaceChange"), // Unit: to.Ptr("Megabytes"), // }}, // ExecuteActionDuration: to.Ptr("PT1M"), // ExecuteActionInitiatedBy: to.Ptr(armsql.RecommendedActionInitiatedByUser), // ExecuteActionInitiatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ExecuteActionStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ImplementationDetails: &armsql.RecommendedActionImplementationInfo{ // Method: to.Ptr(armsql.ImplementationMethodTSQL), // Script: to.Ptr("DROP INDEX [nci_wi_DataPoints_609E4B7D6A3813990ED44B28B340C8FC] ON [dbo].[DataPoints]"), // }, // IsArchivedAction: to.Ptr(false), // IsExecutableAction: to.Ptr(true), // IsRevertableAction: to.Ptr(true), // LastRefresh: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ObservedImpact: []*armsql.RecommendedActionImpactRecord{ // { // ChangeValueAbsolute: to.Ptr[float64](-12.7), // ChangeValueRelative: to.Ptr[float64](-0.9), // DimensionName: to.Ptr("AffectedQueriesCpuUtilization"), // Unit: to.Ptr("CpuCores"), // }, // { // ChangeValueAbsolute: to.Ptr[float64](-12.7), // ChangeValueRelative: to.Ptr[float64](-0.3175), // DimensionName: to.Ptr("CpuUtilization"), // Unit: to.Ptr("CpuCores"), // }, // { // AbsoluteValue: to.Ptr[float64](12), // DimensionName: to.Ptr("QueriesWithImprovedPerformance"), // Unit: to.Ptr("Count"), // }, // { // AbsoluteValue: to.Ptr[float64](1), // DimensionName: to.Ptr("QueriesWithRegressedPerformance"), // Unit: to.Ptr("Count"), // }, // { // AbsoluteValue: to.Ptr[float64](130.742187), // DimensionName: to.Ptr("SpaceChange"), // Unit: to.Ptr("Megabytes"), // }, // { // AbsoluteValue: to.Ptr[float64](0), // DimensionName: to.Ptr("VerificationProgress"), // Unit: to.Ptr("Percent"), // }}, // RecommendationReason: to.Ptr(""), // Score: to.Ptr[int32](3), // State: &armsql.RecommendedActionStateInfo{ // ActionInitiatedBy: to.Ptr(armsql.RecommendedActionInitiatedByUser), // CurrentValue: to.Ptr(armsql.RecommendedActionCurrentStateSuccess), // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // }, // TimeSeries: []*armsql.RecommendedActionMetricInfo{ // }, // ValidSince: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // Details: map[string]any{ // "schema": "[dbo]", // "includedColumns": "[Power],[Pineapple]", // "indexActionDuration": "00:01:00", // "indexActionStartTime": "2017-03-01T14:38:05.337", // "indexColumns": "[Name],[Money]", // "indexName": "nci_wi_DataPoints_609E4B7D6A3813990ED44B28B340C8FC", // "indexType": "NONCLUSTERED", // "table": "[DataPoints]", // }, // }, // }, // { // Name: to.Ptr("IR_[dbo]_[Employees]_560E15A98D14CA09BDFB"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advisors/recommendedActions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex/recommendedActions/IR_[dbo]_[Employees]_560E15A98D14CA09BDFB"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.RecommendedActionProperties{ // ErrorDetails: &armsql.RecommendedActionErrorInfo{ // }, // EstimatedImpact: []*armsql.RecommendedActionImpactRecord{ // { // AbsoluteValue: to.Ptr[float64](17), // DimensionName: to.Ptr("ActionDuration"), // Unit: to.Ptr("Seconds"), // }, // { // AbsoluteValue: to.Ptr[float64](128), // DimensionName: to.Ptr("SpaceChange"), // Unit: to.Ptr("Megabytes"), // }}, // ImplementationDetails: &armsql.RecommendedActionImplementationInfo{ // Method: to.Ptr(armsql.ImplementationMethodTSQL), // Script: to.Ptr("CREATE NONCLUSTERED INDEX [nci_wi_Employees_8C18C2AF4267DC77793040782641CCDE] ON [dbo].[Employees] ([City], [State]) INCLUDE ([Postal]) WITH (ONLINE = ON)"), // }, // IsArchivedAction: to.Ptr(false), // IsExecutableAction: to.Ptr(true), // IsRevertableAction: to.Ptr(true), // LastRefresh: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ObservedImpact: []*armsql.RecommendedActionImpactRecord{ // }, // RecommendationReason: to.Ptr(""), // Score: to.Ptr[int32](3), // State: &armsql.RecommendedActionStateInfo{ // CurrentValue: to.Ptr(armsql.RecommendedActionCurrentStateActive), // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // }, // TimeSeries: []*armsql.RecommendedActionMetricInfo{ // }, // ValidSince: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // Details: map[string]any{ // "schema": "[dbo]", // "includedColumns": "[Postal]", // "indexColumns": "[City], [State]", // "indexName": "nci_wi_Employees_8C18C2AF4267DC77793040782641CCDE", // "indexType": "NONCLUSTERED", // "table": "[Employees]", // }, // }, // }} }
Output:
func (*DatabaseRecommendedActionsClient) Update ¶
func (client *DatabaseRecommendedActionsClient) Update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, advisorName string, recommendedActionName string, parameters RecommendedAction, options *DatabaseRecommendedActionsClientUpdateOptions) (DatabaseRecommendedActionsClientUpdateResponse, error)
Update - Updates a database recommended action. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- advisorName - The name of the Database Advisor.
- recommendedActionName - The name of Database Recommended Action.
- parameters - The requested recommended action resource state.
- options - DatabaseRecommendedActionsClientUpdateOptions contains the optional parameters for the DatabaseRecommendedActionsClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRecommendedActionUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseRecommendedActionsClient().Update(ctx, "workloadinsight-demos", "misosisvr", "IndexAdvisor_test_3", "CreateIndex", "IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB", armsql.RecommendedAction{ Properties: &armsql.RecommendedActionProperties{ State: &armsql.RecommendedActionStateInfo{ CurrentValue: to.Ptr(armsql.RecommendedActionCurrentStatePending), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RecommendedAction = armsql.RecommendedAction{ // Name: to.Ptr("IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB"), // Type: to.Ptr("Microsoft.Sql/servers/databases/advisors/recommendedActions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/databases/IndexAdvisor_test_3/advisors/CreateIndex/recommendedActions/IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.RecommendedActionProperties{ // ErrorDetails: &armsql.RecommendedActionErrorInfo{ // }, // EstimatedImpact: []*armsql.RecommendedActionImpactRecord{ // { // AbsoluteValue: to.Ptr[float64](1440), // DimensionName: to.Ptr("ActionDuration"), // Unit: to.Ptr("Seconds"), // }, // { // AbsoluteValue: to.Ptr[float64](209.3125), // DimensionName: to.Ptr("SpaceChange"), // Unit: to.Ptr("Megabytes"), // }}, // ExecuteActionInitiatedBy: to.Ptr(armsql.RecommendedActionInitiatedByUser), // ExecuteActionInitiatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-20T15:11:15.000Z"); return t}()), // ImplementationDetails: &armsql.RecommendedActionImplementationInfo{ // Method: to.Ptr(armsql.ImplementationMethodTSQL), // Script: to.Ptr("CREATE NONCLUSTERED INDEX [nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B] ON [CRM].[DataPoints] ([Name],[Money],[Power]) INCLUDE ([Hour], [System], [LastChanged]) WITH (ONLINE = ON)"), // }, // IsArchivedAction: to.Ptr(false), // IsExecutableAction: to.Ptr(true), // IsRevertableAction: to.Ptr(true), // LastRefresh: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:04.000Z"); return t}()), // ObservedImpact: []*armsql.RecommendedActionImpactRecord{ // }, // RecommendationReason: to.Ptr(""), // Score: to.Ptr[int32](1), // State: &armsql.RecommendedActionStateInfo{ // ActionInitiatedBy: to.Ptr(armsql.RecommendedActionInitiatedByUser), // CurrentValue: to.Ptr(armsql.RecommendedActionCurrentStatePending), // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-20T15:11:15.000Z"); return t}()), // }, // TimeSeries: []*armsql.RecommendedActionMetricInfo{ // }, // ValidSince: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:04.000Z"); return t}()), // Details: map[string]any{ // "schema": "[CRM]", // "includedColumns": "[Hour], [System], [LastChanged]", // "indexColumns": "[Name],[Money],[Power]", // "indexName": "nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B", // "indexType": "NONCLUSTERED", // "table": "[DataPoints]", // }, // }, // } }
Output:
type DatabaseRecommendedActionsClientGetOptions ¶ added in v0.3.0
type DatabaseRecommendedActionsClientGetOptions struct { }
DatabaseRecommendedActionsClientGetOptions contains the optional parameters for the DatabaseRecommendedActionsClient.Get method.
type DatabaseRecommendedActionsClientGetResponse ¶ added in v0.3.0
type DatabaseRecommendedActionsClientGetResponse struct { // Database, Server or Elastic Pool Recommended Action. RecommendedAction }
DatabaseRecommendedActionsClientGetResponse contains the response from method DatabaseRecommendedActionsClient.Get.
type DatabaseRecommendedActionsClientListByDatabaseAdvisorOptions ¶ added in v0.3.0
type DatabaseRecommendedActionsClientListByDatabaseAdvisorOptions struct { }
DatabaseRecommendedActionsClientListByDatabaseAdvisorOptions contains the optional parameters for the DatabaseRecommendedActionsClient.ListByDatabaseAdvisor method.
type DatabaseRecommendedActionsClientListByDatabaseAdvisorResponse ¶ added in v0.3.0
type DatabaseRecommendedActionsClientListByDatabaseAdvisorResponse struct { // Array of RecommendedAction RecommendedActionArray []*RecommendedAction }
DatabaseRecommendedActionsClientListByDatabaseAdvisorResponse contains the response from method DatabaseRecommendedActionsClient.ListByDatabaseAdvisor.
type DatabaseRecommendedActionsClientUpdateOptions ¶ added in v0.3.0
type DatabaseRecommendedActionsClientUpdateOptions struct { }
DatabaseRecommendedActionsClientUpdateOptions contains the optional parameters for the DatabaseRecommendedActionsClient.Update method.
type DatabaseRecommendedActionsClientUpdateResponse ¶ added in v0.3.0
type DatabaseRecommendedActionsClientUpdateResponse struct { // Database, Server or Elastic Pool Recommended Action. RecommendedAction }
DatabaseRecommendedActionsClientUpdateResponse contains the response from method DatabaseRecommendedActionsClient.Update.
type DatabaseSchema ¶
type DatabaseSchema struct { // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
DatabaseSchema - A database schema resource.
func (DatabaseSchema) MarshalJSON ¶ added in v1.1.0
func (d DatabaseSchema) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseSchema.
func (*DatabaseSchema) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseSchema) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseSchema.
type DatabaseSchemaListResult ¶
type DatabaseSchemaListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*DatabaseSchema }
DatabaseSchemaListResult - A list of database schemas.
func (DatabaseSchemaListResult) MarshalJSON ¶
func (d DatabaseSchemaListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseSchemaListResult.
func (*DatabaseSchemaListResult) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseSchemaListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseSchemaListResult.
type DatabaseSchemasClient ¶
type DatabaseSchemasClient struct {
// contains filtered or unexported fields
}
DatabaseSchemasClient contains the methods for the DatabaseSchemas group. Don't use this type directly, use NewDatabaseSchemasClient() instead.
func NewDatabaseSchemasClient ¶
func NewDatabaseSchemasClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseSchemasClient, error)
NewDatabaseSchemasClient creates a new instance of DatabaseSchemasClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DatabaseSchemasClient) Get ¶
func (client *DatabaseSchemasClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, options *DatabaseSchemasClientGetOptions) (DatabaseSchemasClientGetResponse, error)
Get - Get database schema If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- schemaName - The name of the schema.
- options - DatabaseSchemasClientGetOptions contains the optional parameters for the DatabaseSchemasClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseSchemaGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseSchemasClient().Get(ctx, "myRG", "serverName", "myDatabase", "dbo", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseSchema = armsql.DatabaseSchema{ // Name: to.Ptr("dbo"), // Type: to.Ptr("Microsoft.Sql/servers/databases/schemas"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo"), // } }
Output:
func (*DatabaseSchemasClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *DatabaseSchemasClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *DatabaseSchemasClientListByDatabaseOptions) *runtime.Pager[DatabaseSchemasClientListByDatabaseResponse]
NewListByDatabasePager - List database schemas
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - DatabaseSchemasClientListByDatabaseOptions contains the optional parameters for the DatabaseSchemasClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseSchemaListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDatabaseSchemasClient().NewListByDatabasePager("myRG", "serverName", "myDatabase", &armsql.DatabaseSchemasClientListByDatabaseOptions{Filter: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DatabaseSchemaListResult = armsql.DatabaseSchemaListResult{ // Value: []*armsql.DatabaseSchema{ // { // Name: to.Ptr("dbo"), // Type: to.Ptr("Microsoft.Sql/servers/databases/schemas"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo"), // }, // { // Name: to.Ptr("schema2"), // Type: to.Ptr("Microsoft.Sql/servers/databases/schemas"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/schema2"), // }}, // } } }
Output:
type DatabaseSchemasClientGetOptions ¶ added in v0.3.0
type DatabaseSchemasClientGetOptions struct { }
DatabaseSchemasClientGetOptions contains the optional parameters for the DatabaseSchemasClient.Get method.
type DatabaseSchemasClientGetResponse ¶ added in v0.3.0
type DatabaseSchemasClientGetResponse struct { // A database schema resource. DatabaseSchema }
DatabaseSchemasClientGetResponse contains the response from method DatabaseSchemasClient.Get.
type DatabaseSchemasClientListByDatabaseOptions ¶ added in v0.3.0
type DatabaseSchemasClientListByDatabaseOptions struct { // An OData filter expression that filters elements in the collection. Filter *string }
DatabaseSchemasClientListByDatabaseOptions contains the optional parameters for the DatabaseSchemasClient.NewListByDatabasePager method.
type DatabaseSchemasClientListByDatabaseResponse ¶ added in v0.3.0
type DatabaseSchemasClientListByDatabaseResponse struct { // A list of database schemas. DatabaseSchemaListResult }
DatabaseSchemasClientListByDatabaseResponse contains the response from method DatabaseSchemasClient.NewListByDatabasePager.
type DatabaseSecurityAlertListResult ¶
type DatabaseSecurityAlertListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*DatabaseSecurityAlertPolicy }
DatabaseSecurityAlertListResult - A list of the database's security alert policies.
func (DatabaseSecurityAlertListResult) MarshalJSON ¶
func (d DatabaseSecurityAlertListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseSecurityAlertListResult.
func (*DatabaseSecurityAlertListResult) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseSecurityAlertListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseSecurityAlertListResult.
type DatabaseSecurityAlertPoliciesClient ¶
type DatabaseSecurityAlertPoliciesClient struct {
// contains filtered or unexported fields
}
DatabaseSecurityAlertPoliciesClient contains the methods for the DatabaseSecurityAlertPolicies group. Don't use this type directly, use NewDatabaseSecurityAlertPoliciesClient() instead.
func NewDatabaseSecurityAlertPoliciesClient ¶
func NewDatabaseSecurityAlertPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseSecurityAlertPoliciesClient, error)
NewDatabaseSecurityAlertPoliciesClient creates a new instance of DatabaseSecurityAlertPoliciesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DatabaseSecurityAlertPoliciesClient) CreateOrUpdate ¶
func (client *DatabaseSecurityAlertPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, securityAlertPolicyName SecurityAlertPolicyName, parameters DatabaseSecurityAlertPolicy, options *DatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions) (DatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates a database's security alert policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database for which the security alert policy is defined.
- securityAlertPolicyName - The name of the security alert policy.
- parameters - The database security alert policy.
- options - DatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions contains the optional parameters for the DatabaseSecurityAlertPoliciesClient.CreateOrUpdate method.
Example (UpdateADatabasesThreatDetectionPolicyWithAllParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseSecurityAlertCreateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseSecurityAlertPoliciesClient().CreateOrUpdate(ctx, "securityalert-4799", "securityalert-6440", "testdb", armsql.SecurityAlertPolicyNameDefault, armsql.DatabaseSecurityAlertPolicy{ Properties: &armsql.SecurityAlertsPolicyProperties{ DisabledAlerts: []*string{ to.Ptr("Sql_Injection"), to.Ptr("Usage_Anomaly")}, EmailAccountAdmins: to.Ptr(true), EmailAddresses: []*string{ to.Ptr("test@microsoft.com"), to.Ptr("user@microsoft.com")}, RetentionDays: to.Ptr[int32](6), State: to.Ptr(armsql.SecurityAlertsPolicyStateEnabled), StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseSecurityAlertPolicy = armsql.DatabaseSecurityAlertPolicy{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/securityAlertPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/servers/securityalert-6440/databases/testdb"), // Properties: &armsql.SecurityAlertsPolicyProperties{ // DisabledAlerts: []*string{ // to.Ptr("Sql_Injection"), // to.Ptr("Usage_Anomaly")}, // EmailAccountAdmins: to.Ptr(true), // EmailAddresses: []*string{ // to.Ptr("test@microsoft.com"), // to.Ptr("user@microsoft.com")}, // RetentionDays: to.Ptr[int32](6), // State: to.Ptr(armsql.SecurityAlertsPolicyStateEnabled), // StorageAccountAccessKey: to.Ptr(""), // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), // }, // SystemData: &armsql.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armsql.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armsql.CreatedByTypeUser), // }, // } }
Output:
Example (UpdateADatabasesThreatDetectionPolicyWithMinimalParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseSecurityAlertCreateMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseSecurityAlertPoliciesClient().CreateOrUpdate(ctx, "securityalert-4799", "securityalert-6440", "testdb", armsql.SecurityAlertPolicyNameDefault, armsql.DatabaseSecurityAlertPolicy{ Properties: &armsql.SecurityAlertsPolicyProperties{ State: to.Ptr(armsql.SecurityAlertsPolicyStateEnabled), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseSecurityAlertPolicy = armsql.DatabaseSecurityAlertPolicy{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/securityAlertPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/servers/securityalert-6440/databases/testdb"), // Properties: &armsql.SecurityAlertsPolicyProperties{ // DisabledAlerts: []*string{ // }, // EmailAccountAdmins: to.Ptr(true), // EmailAddresses: []*string{ // }, // RetentionDays: to.Ptr[int32](0), // State: to.Ptr(armsql.SecurityAlertsPolicyStateEnabled), // StorageAccountAccessKey: to.Ptr(""), // StorageEndpoint: to.Ptr(""), // }, // SystemData: &armsql.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armsql.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armsql.CreatedByTypeUser), // }, // } }
Output:
func (*DatabaseSecurityAlertPoliciesClient) Get ¶
func (client *DatabaseSecurityAlertPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, securityAlertPolicyName SecurityAlertPolicyName, options *DatabaseSecurityAlertPoliciesClientGetOptions) (DatabaseSecurityAlertPoliciesClientGetResponse, error)
Get - Gets a database's security alert policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database for which the security alert policy is defined.
- securityAlertPolicyName - The name of the security alert policy.
- options - DatabaseSecurityAlertPoliciesClientGetOptions contains the optional parameters for the DatabaseSecurityAlertPoliciesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseSecurityAlertGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseSecurityAlertPoliciesClient().Get(ctx, "securityalert-6852", "securityalert-2080", "testdb", armsql.SecurityAlertPolicyNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseSecurityAlertPolicy = armsql.DatabaseSecurityAlertPolicy{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/securityAlertPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-6852/providers/Microsoft.Sql/servers/securityalert-2080/databases/testdb"), // Properties: &armsql.SecurityAlertsPolicyProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // DisabledAlerts: []*string{ // to.Ptr("Usage_Anomaly")}, // EmailAccountAdmins: to.Ptr(true), // EmailAddresses: []*string{ // to.Ptr("test@consoto.com"), // to.Ptr("user@consoto.com")}, // RetentionDays: to.Ptr[int32](0), // State: to.Ptr(armsql.SecurityAlertsPolicyStateEnabled), // StorageAccountAccessKey: to.Ptr(""), // }, // SystemData: &armsql.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armsql.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armsql.CreatedByTypeUser), // }, // } }
Output:
func (*DatabaseSecurityAlertPoliciesClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *DatabaseSecurityAlertPoliciesClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *DatabaseSecurityAlertPoliciesClientListByDatabaseOptions) *runtime.Pager[DatabaseSecurityAlertPoliciesClientListByDatabaseResponse]
NewListByDatabasePager - Gets a list of database's security alert policies.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database for which the security alert policy is defined.
- options - DatabaseSecurityAlertPoliciesClientListByDatabaseOptions contains the optional parameters for the DatabaseSecurityAlertPoliciesClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseSecurityAlertListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDatabaseSecurityAlertPoliciesClient().NewListByDatabasePager("securityalert-6852", "securityalert-2080", "testdb", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DatabaseSecurityAlertListResult = armsql.DatabaseSecurityAlertListResult{ // Value: []*armsql.DatabaseSecurityAlertPolicy{ // { // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/securityAlertPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-6852/providers/Microsoft.Sql/servers/securityalert-2080/databases/testdb"), // Properties: &armsql.SecurityAlertsPolicyProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // DisabledAlerts: []*string{ // to.Ptr("Usage_Anomaly")}, // EmailAccountAdmins: to.Ptr(true), // EmailAddresses: []*string{ // to.Ptr("test@consoto.com"), // to.Ptr("user@consoto.com")}, // RetentionDays: to.Ptr[int32](0), // State: to.Ptr(armsql.SecurityAlertsPolicyStateEnabled), // StorageAccountAccessKey: to.Ptr(""), // StorageEndpoint: to.Ptr(""), // }, // SystemData: &armsql.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armsql.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armsql.CreatedByTypeUser), // }, // }}, // } } }
Output:
type DatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions ¶ added in v0.3.0
type DatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions struct { }
DatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions contains the optional parameters for the DatabaseSecurityAlertPoliciesClient.CreateOrUpdate method.
type DatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type DatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse struct { // A database security alert policy. DatabaseSecurityAlertPolicy }
DatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse contains the response from method DatabaseSecurityAlertPoliciesClient.CreateOrUpdate.
type DatabaseSecurityAlertPoliciesClientGetOptions ¶ added in v0.3.0
type DatabaseSecurityAlertPoliciesClientGetOptions struct { }
DatabaseSecurityAlertPoliciesClientGetOptions contains the optional parameters for the DatabaseSecurityAlertPoliciesClient.Get method.
type DatabaseSecurityAlertPoliciesClientGetResponse ¶ added in v0.3.0
type DatabaseSecurityAlertPoliciesClientGetResponse struct { // A database security alert policy. DatabaseSecurityAlertPolicy }
DatabaseSecurityAlertPoliciesClientGetResponse contains the response from method DatabaseSecurityAlertPoliciesClient.Get.
type DatabaseSecurityAlertPoliciesClientListByDatabaseOptions ¶ added in v0.3.0
type DatabaseSecurityAlertPoliciesClientListByDatabaseOptions struct { }
DatabaseSecurityAlertPoliciesClientListByDatabaseOptions contains the optional parameters for the DatabaseSecurityAlertPoliciesClient.NewListByDatabasePager method.
type DatabaseSecurityAlertPoliciesClientListByDatabaseResponse ¶ added in v0.3.0
type DatabaseSecurityAlertPoliciesClientListByDatabaseResponse struct { // A list of the database's security alert policies. DatabaseSecurityAlertListResult }
DatabaseSecurityAlertPoliciesClientListByDatabaseResponse contains the response from method DatabaseSecurityAlertPoliciesClient.NewListByDatabasePager.
type DatabaseSecurityAlertPolicy ¶
type DatabaseSecurityAlertPolicy struct { // Resource properties. Properties *SecurityAlertsPolicyProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; SystemData of SecurityAlertPolicyResource. SystemData *SystemData // READ-ONLY; Resource type. Type *string }
DatabaseSecurityAlertPolicy - A database security alert policy.
func (DatabaseSecurityAlertPolicy) MarshalJSON ¶
func (d DatabaseSecurityAlertPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseSecurityAlertPolicy.
func (*DatabaseSecurityAlertPolicy) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseSecurityAlertPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseSecurityAlertPolicy.
type DatabaseState ¶
type DatabaseState string
const ( DatabaseStateAll DatabaseState = "All" DatabaseStateDeleted DatabaseState = "Deleted" DatabaseStateLive DatabaseState = "Live" )
func PossibleDatabaseStateValues ¶
func PossibleDatabaseStateValues() []DatabaseState
PossibleDatabaseStateValues returns the possible values for the DatabaseState const type.
type DatabaseStatus ¶
type DatabaseStatus string
DatabaseStatus - The status of the database.
const ( DatabaseStatusAutoClosed DatabaseStatus = "AutoClosed" DatabaseStatusCopying DatabaseStatus = "Copying" DatabaseStatusCreating DatabaseStatus = "Creating" DatabaseStatusDisabled DatabaseStatus = "Disabled" DatabaseStatusEmergencyMode DatabaseStatus = "EmergencyMode" DatabaseStatusInaccessible DatabaseStatus = "Inaccessible" DatabaseStatusOffline DatabaseStatus = "Offline" DatabaseStatusOfflineChangingDwPerformanceTiers DatabaseStatus = "OfflineChangingDwPerformanceTiers" DatabaseStatusOfflineSecondary DatabaseStatus = "OfflineSecondary" DatabaseStatusOnline DatabaseStatus = "Online" DatabaseStatusOnlineChangingDwPerformanceTiers DatabaseStatus = "OnlineChangingDwPerformanceTiers" DatabaseStatusPaused DatabaseStatus = "Paused" DatabaseStatusPausing DatabaseStatus = "Pausing" DatabaseStatusRecovering DatabaseStatus = "Recovering" DatabaseStatusRecoveryPending DatabaseStatus = "RecoveryPending" DatabaseStatusRestoring DatabaseStatus = "Restoring" DatabaseStatusResuming DatabaseStatus = "Resuming" DatabaseStatusScaling DatabaseStatus = "Scaling" DatabaseStatusShutdown DatabaseStatus = "Shutdown" DatabaseStatusStandby DatabaseStatus = "Standby" DatabaseStatusStarting DatabaseStatus = "Starting" DatabaseStatusStopped DatabaseStatus = "Stopped" DatabaseStatusStopping DatabaseStatus = "Stopping" DatabaseStatusSuspect DatabaseStatus = "Suspect" )
func PossibleDatabaseStatusValues ¶
func PossibleDatabaseStatusValues() []DatabaseStatus
PossibleDatabaseStatusValues returns the possible values for the DatabaseStatus const type.
type DatabaseTable ¶
type DatabaseTable struct { // Resource properties. Properties *DatabaseTableProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
DatabaseTable - A database table resource.
func (DatabaseTable) MarshalJSON ¶
func (d DatabaseTable) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseTable.
func (*DatabaseTable) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseTable) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseTable.
type DatabaseTableListResult ¶
type DatabaseTableListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*DatabaseTable }
DatabaseTableListResult - A list of database tables.
func (DatabaseTableListResult) MarshalJSON ¶
func (d DatabaseTableListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseTableListResult.
func (*DatabaseTableListResult) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseTableListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseTableListResult.
type DatabaseTableProperties ¶
type DatabaseTableProperties struct { // Whether or not the table is memory optimized. MemoryOptimized *bool // The table temporal type. TemporalType *TableTemporalType }
DatabaseTableProperties - Database table properties.
func (DatabaseTableProperties) MarshalJSON ¶ added in v1.1.0
func (d DatabaseTableProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseTableProperties.
func (*DatabaseTableProperties) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseTableProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseTableProperties.
type DatabaseTablesClient ¶
type DatabaseTablesClient struct {
// contains filtered or unexported fields
}
DatabaseTablesClient contains the methods for the DatabaseTables group. Don't use this type directly, use NewDatabaseTablesClient() instead.
func NewDatabaseTablesClient ¶
func NewDatabaseTablesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseTablesClient, error)
NewDatabaseTablesClient creates a new instance of DatabaseTablesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DatabaseTablesClient) Get ¶
func (client *DatabaseTablesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, options *DatabaseTablesClientGetOptions) (DatabaseTablesClientGetResponse, error)
Get - Get database table If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- schemaName - The name of the schema.
- tableName - The name of the table.
- options - DatabaseTablesClientGetOptions contains the optional parameters for the DatabaseTablesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseTableGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseTablesClient().Get(ctx, "myRG", "serverName", "myDatabase", "dbo", "table1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseTable = armsql.DatabaseTable{ // Name: to.Ptr("table1"), // Type: to.Ptr("Microsoft.Sql/servers/databases/schemas/tables"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1"), // } }
Output:
func (*DatabaseTablesClient) NewListBySchemaPager ¶ added in v0.5.0
func (client *DatabaseTablesClient) NewListBySchemaPager(resourceGroupName string, serverName string, databaseName string, schemaName string, options *DatabaseTablesClientListBySchemaOptions) *runtime.Pager[DatabaseTablesClientListBySchemaResponse]
NewListBySchemaPager - List database tables
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- schemaName - The name of the schema.
- options - DatabaseTablesClientListBySchemaOptions contains the optional parameters for the DatabaseTablesClient.NewListBySchemaPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseTableListBySchema.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDatabaseTablesClient().NewListBySchemaPager("myRG", "serverName", "myDatabase", "dbo", &armsql.DatabaseTablesClientListBySchemaOptions{Filter: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DatabaseTableListResult = armsql.DatabaseTableListResult{ // Value: []*armsql.DatabaseTable{ // { // Name: to.Ptr("table1"), // Type: to.Ptr("Microsoft.Sql/servers/databases/schemas/tables"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table1"), // }, // { // Name: to.Ptr("table2"), // Type: to.Ptr("Microsoft.Sql/servers/databases/schemas/tables"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/serverName/databases/myDatabase/schemas/dbo/tables/table2"), // }}, // } } }
Output:
type DatabaseTablesClientGetOptions ¶ added in v0.3.0
type DatabaseTablesClientGetOptions struct { }
DatabaseTablesClientGetOptions contains the optional parameters for the DatabaseTablesClient.Get method.
type DatabaseTablesClientGetResponse ¶ added in v0.3.0
type DatabaseTablesClientGetResponse struct { // A database table resource. DatabaseTable }
DatabaseTablesClientGetResponse contains the response from method DatabaseTablesClient.Get.
type DatabaseTablesClientListBySchemaOptions ¶ added in v0.3.0
type DatabaseTablesClientListBySchemaOptions struct { // An OData filter expression that filters elements in the collection. Filter *string }
DatabaseTablesClientListBySchemaOptions contains the optional parameters for the DatabaseTablesClient.NewListBySchemaPager method.
type DatabaseTablesClientListBySchemaResponse ¶ added in v0.3.0
type DatabaseTablesClientListBySchemaResponse struct { // A list of database tables. DatabaseTableListResult }
DatabaseTablesClientListBySchemaResponse contains the response from method DatabaseTablesClient.NewListBySchemaPager.
type DatabaseUpdate ¶
type DatabaseUpdate struct { // Database identity Identity *DatabaseIdentity // Resource properties. Properties *DatabaseUpdateProperties // The name and tier of the SKU. SKU *SKU // Resource tags. Tags map[string]*string }
DatabaseUpdate - A database update resource.
func (DatabaseUpdate) MarshalJSON ¶
func (d DatabaseUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseUpdate.
func (*DatabaseUpdate) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseUpdate.
type DatabaseUpdateProperties ¶ added in v0.4.0
type DatabaseUpdateProperties struct { // Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled AutoPauseDelay *int32 // Collation of the metadata catalog. CatalogCollation *CatalogCollationType // The collation of the database. Collation *string // Specifies the mode of database creation. // Default: regular database creation. // Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of the // source database. // Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified as the // resource ID of the existing primary database. // PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. sourceDatabaseId must // be specified as the resource ID of the existing database, and // restorePointInTime must be specified. // Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the recoverable // database resource ID to restore. // Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If sourceDatabaseId // is the database's original resource ID, then sourceDatabaseDeletionDate // must be specified. Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate // is ignored. restorePointInTime may also be specified to restore from an // earlier point in time. // RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. recoveryServicesRecoveryPointResourceId // must be specified as the recovery point resource ID. // Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. CreateMode *CreateMode // The resource identifier of the elastic pool containing this database. ElasticPoolID *string // The Client id used for cross tenant per database CMK scenario FederatedClientID *string // The number of secondary replicas associated with the database that are used to provide high availability. Not applicable // to a Hyperscale database within an elastic pool. HighAvailabilityReplicaCount *int32 // Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the // value of this property cannot be changed after the database has been created. IsLedgerOn *bool // The license type to apply for this database. LicenseIncluded if you need a license, or BasePrice if you have a license // and are eligible for the Azure Hybrid Benefit. LicenseType *DatabaseLicenseType // The resource identifier of the long term retention backup associated with create operation of this database. LongTermRetentionBackupResourceID *string // Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates // will occur. MaintenanceConfigurationID *string // The max size of the database expressed in bytes. MaxSizeBytes *int64 // Minimal capacity that database will always have allocated, if not paused MinCapacity *float64 // The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection // string may be routed to a readonly secondary replica in the same region. Not // applicable to a Hyperscale database within an elastic pool. ReadScale *DatabaseReadScale // The resource identifier of the recoverable database associated with create operation of this database. RecoverableDatabaseID *string // The resource identifier of the recovery point associated with create operation of this database. RecoveryServicesRecoveryPointID *string // The storage account type to be used to store backups for this database. RequestedBackupStorageRedundancy *BackupStorageRedundancy // The resource identifier of the restorable dropped database associated with create operation of this database. RestorableDroppedDatabaseID *string // Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. RestorePointInTime *time.Time // The name of the sample schema to apply when creating this database. SampleName *SampleName // The secondary type of the database if it is a secondary. Valid values are Geo and Named. SecondaryType *SecondaryType // Specifies the time that the database was deleted. SourceDatabaseDeletionDate *time.Time // The resource identifier of the source database associated with create operation of this database. SourceDatabaseID *string // Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple // availability zones. ZoneRedundant *bool // READ-ONLY; The creation date of the database (ISO8601 format). CreationDate *time.Time // READ-ONLY; The storage account type used to store backups for this database. CurrentBackupStorageRedundancy *BackupStorageRedundancy // READ-ONLY; The name and tier of the SKU. CurrentSKU *SKU // READ-ONLY; The current service level objective name of the database. CurrentServiceObjectiveName *string // READ-ONLY; The ID of the database. DatabaseID *string // READ-ONLY; The default secondary region for this database. DefaultSecondaryLocation *string // READ-ONLY; This records the earliest start date and time that restore is available for this database (ISO8601 format). EarliestRestoreDate *time.Time // READ-ONLY; Failover Group resource identifier that this database belongs to. FailoverGroupID *string // READ-ONLY; Infra encryption is enabled for this database. IsInfraEncryptionEnabled *bool // READ-ONLY; The max log size for this database. MaxLogSizeBytes *int64 // READ-ONLY; The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready. PausedDate *time.Time // READ-ONLY; The requested service level objective name of the database. RequestedServiceObjectiveName *string // READ-ONLY; The date when database was resumed by user action or database login (ISO8601 format). Null if the database is // paused. ResumedDate *time.Time // READ-ONLY; The status of the database. Status *DatabaseStatus }
DatabaseUpdateProperties - A database update properties.
func (DatabaseUpdateProperties) MarshalJSON ¶ added in v0.4.0
func (d DatabaseUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseUpdateProperties.
func (*DatabaseUpdateProperties) UnmarshalJSON ¶ added in v0.4.0
func (d *DatabaseUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseUpdateProperties.
type DatabaseUsage ¶
type DatabaseUsage struct { // Resource properties. Properties *DatabaseUsageProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
DatabaseUsage - Usage metric of a database.
func (DatabaseUsage) MarshalJSON ¶
func (d DatabaseUsage) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseUsage.
func (*DatabaseUsage) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseUsage) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseUsage.
type DatabaseUsageListResult ¶
type DatabaseUsageListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*DatabaseUsage }
DatabaseUsageListResult - A list of database usage metrics.
func (DatabaseUsageListResult) MarshalJSON ¶
func (d DatabaseUsageListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseUsageListResult.
func (*DatabaseUsageListResult) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseUsageListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseUsageListResult.
type DatabaseUsageProperties ¶
type DatabaseUsageProperties struct { // READ-ONLY; Current value of the metric. CurrentValue *float64 // READ-ONLY; User-readable name of the metric. DisplayName *string // READ-ONLY; Boundary value of the metric. Limit *float64 // READ-ONLY; Unit of the metric. Unit *string }
DatabaseUsageProperties - Properties of a database usage.
func (DatabaseUsageProperties) MarshalJSON ¶ added in v1.1.0
func (d DatabaseUsageProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseUsageProperties.
func (*DatabaseUsageProperties) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseUsageProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseUsageProperties.
type DatabaseUsagesClient ¶
type DatabaseUsagesClient struct {
// contains filtered or unexported fields
}
DatabaseUsagesClient contains the methods for the DatabaseUsages group. Don't use this type directly, use NewDatabaseUsagesClient() instead.
func NewDatabaseUsagesClient ¶
func NewDatabaseUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseUsagesClient, error)
NewDatabaseUsagesClient creates a new instance of DatabaseUsagesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DatabaseUsagesClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *DatabaseUsagesClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *DatabaseUsagesClientListByDatabaseOptions) *runtime.Pager[DatabaseUsagesClientListByDatabaseResponse]
NewListByDatabasePager - Gets database usages.
Generated from API version 2021-02-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - DatabaseUsagesClientListByDatabaseOptions contains the optional parameters for the DatabaseUsagesClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetDatabaseUsages.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDatabaseUsagesClient().NewListByDatabasePager("Default-SQL-SouthEastAsia", "testsvr", "testdb", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DatabaseUsageListResult = armsql.DatabaseUsageListResult{ // Value: []*armsql.DatabaseUsage{ // { // Name: to.Ptr("database_size"), // Type: to.Ptr("Microsoft.Sql/servers/databases/usages"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/usages/database_size"), // Properties: &armsql.DatabaseUsageProperties{ // CurrentValue: to.Ptr[float64](4194304), // DisplayName: to.Ptr("Database Size"), // Limit: to.Ptr[float64](268435456000), // Unit: to.Ptr("Bytes"), // }, // }}, // } } }
Output:
type DatabaseUsagesClientListByDatabaseOptions ¶ added in v0.3.0
type DatabaseUsagesClientListByDatabaseOptions struct { }
DatabaseUsagesClientListByDatabaseOptions contains the optional parameters for the DatabaseUsagesClient.NewListByDatabasePager method.
type DatabaseUsagesClientListByDatabaseResponse ¶ added in v0.3.0
type DatabaseUsagesClientListByDatabaseResponse struct { // A list of database usage metrics. DatabaseUsageListResult }
DatabaseUsagesClientListByDatabaseResponse contains the response from method DatabaseUsagesClient.NewListByDatabasePager.
type DatabaseUserIdentity ¶ added in v0.3.0
type DatabaseUserIdentity struct { // READ-ONLY; The Azure Active Directory client id. ClientID *string // READ-ONLY; The Azure Active Directory principal id. PrincipalID *string }
DatabaseUserIdentity - Azure Active Directory identity configuration for a resource.
func (DatabaseUserIdentity) MarshalJSON ¶ added in v1.1.0
func (d DatabaseUserIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseUserIdentity.
func (*DatabaseUserIdentity) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseUserIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseUserIdentity.
type DatabaseVulnerabilityAssessment ¶
type DatabaseVulnerabilityAssessment struct { // Resource properties. Properties *DatabaseVulnerabilityAssessmentProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
DatabaseVulnerabilityAssessment - A database vulnerability assessment.
func (DatabaseVulnerabilityAssessment) MarshalJSON ¶
func (d DatabaseVulnerabilityAssessment) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseVulnerabilityAssessment.
func (*DatabaseVulnerabilityAssessment) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseVulnerabilityAssessment) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseVulnerabilityAssessment.
type DatabaseVulnerabilityAssessmentListResult ¶
type DatabaseVulnerabilityAssessmentListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*DatabaseVulnerabilityAssessment }
DatabaseVulnerabilityAssessmentListResult - A list of the database's vulnerability assessments.
func (DatabaseVulnerabilityAssessmentListResult) MarshalJSON ¶
func (d DatabaseVulnerabilityAssessmentListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseVulnerabilityAssessmentListResult.
func (*DatabaseVulnerabilityAssessmentListResult) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseVulnerabilityAssessmentListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseVulnerabilityAssessmentListResult.
type DatabaseVulnerabilityAssessmentProperties ¶
type DatabaseVulnerabilityAssessmentProperties struct { // The recurring scans settings RecurringScans *VulnerabilityAssessmentRecurringScansProperties // Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' // isn't specified, storageAccountAccessKey is required. StorageAccountAccessKey *string // A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It is required // if server level vulnerability assessment policy doesn't set StorageContainerPath *string // A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. // If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is // required. StorageContainerSasKey *string }
DatabaseVulnerabilityAssessmentProperties - Properties of a database Vulnerability Assessment.
func (DatabaseVulnerabilityAssessmentProperties) MarshalJSON ¶ added in v1.1.0
func (d DatabaseVulnerabilityAssessmentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseVulnerabilityAssessmentProperties.
func (*DatabaseVulnerabilityAssessmentProperties) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseVulnerabilityAssessmentProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseVulnerabilityAssessmentProperties.
type DatabaseVulnerabilityAssessmentRuleBaseline ¶
type DatabaseVulnerabilityAssessmentRuleBaseline struct { // Resource properties. Properties *DatabaseVulnerabilityAssessmentRuleBaselineProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
DatabaseVulnerabilityAssessmentRuleBaseline - A database vulnerability assessment rule baseline.
func (DatabaseVulnerabilityAssessmentRuleBaseline) MarshalJSON ¶
func (d DatabaseVulnerabilityAssessmentRuleBaseline) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseVulnerabilityAssessmentRuleBaseline.
func (*DatabaseVulnerabilityAssessmentRuleBaseline) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseVulnerabilityAssessmentRuleBaseline) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseVulnerabilityAssessmentRuleBaseline.
type DatabaseVulnerabilityAssessmentRuleBaselineItem ¶
type DatabaseVulnerabilityAssessmentRuleBaselineItem struct { // REQUIRED; The rule baseline result Result []*string }
DatabaseVulnerabilityAssessmentRuleBaselineItem - Properties for an Azure SQL Database Vulnerability Assessment rule baseline's result.
func (DatabaseVulnerabilityAssessmentRuleBaselineItem) MarshalJSON ¶
func (d DatabaseVulnerabilityAssessmentRuleBaselineItem) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseVulnerabilityAssessmentRuleBaselineItem.
func (*DatabaseVulnerabilityAssessmentRuleBaselineItem) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseVulnerabilityAssessmentRuleBaselineItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseVulnerabilityAssessmentRuleBaselineItem.
type DatabaseVulnerabilityAssessmentRuleBaselineProperties ¶
type DatabaseVulnerabilityAssessmentRuleBaselineProperties struct { // REQUIRED; The rule baseline result BaselineResults []*DatabaseVulnerabilityAssessmentRuleBaselineItem }
DatabaseVulnerabilityAssessmentRuleBaselineProperties - Properties of a database Vulnerability Assessment rule baseline.
func (DatabaseVulnerabilityAssessmentRuleBaselineProperties) MarshalJSON ¶
func (d DatabaseVulnerabilityAssessmentRuleBaselineProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseVulnerabilityAssessmentRuleBaselineProperties.
func (*DatabaseVulnerabilityAssessmentRuleBaselineProperties) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseVulnerabilityAssessmentRuleBaselineProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseVulnerabilityAssessmentRuleBaselineProperties.
type DatabaseVulnerabilityAssessmentRuleBaselinesClient ¶
type DatabaseVulnerabilityAssessmentRuleBaselinesClient struct {
// contains filtered or unexported fields
}
DatabaseVulnerabilityAssessmentRuleBaselinesClient contains the methods for the DatabaseVulnerabilityAssessmentRuleBaselines group. Don't use this type directly, use NewDatabaseVulnerabilityAssessmentRuleBaselinesClient() instead.
func NewDatabaseVulnerabilityAssessmentRuleBaselinesClient ¶
func NewDatabaseVulnerabilityAssessmentRuleBaselinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseVulnerabilityAssessmentRuleBaselinesClient, error)
NewDatabaseVulnerabilityAssessmentRuleBaselinesClient creates a new instance of DatabaseVulnerabilityAssessmentRuleBaselinesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DatabaseVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdate ¶
func (client *DatabaseVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, parameters DatabaseVulnerabilityAssessmentRuleBaseline, options *DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions) (DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates a database's vulnerability assessment rule baseline. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database for which the vulnerability assessment rule baseline is defined.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- ruleID - The vulnerability assessment rule ID.
- baselineName - The name of the vulnerability assessment rule baseline (default implies a baseline on a database level rule and master for server level rule).
- parameters - The requested rule baseline resource.
- options - DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseVulnerabilityAssessmentRuleBaselinesClient().CreateOrUpdate(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", armsql.VulnerabilityAssessmentNameDefault, "VA1001", armsql.VulnerabilityAssessmentPolicyBaselineNameDefault, armsql.DatabaseVulnerabilityAssessmentRuleBaseline{ Properties: &armsql.DatabaseVulnerabilityAssessmentRuleBaselineProperties{ BaselineResults: []*armsql.DatabaseVulnerabilityAssessmentRuleBaselineItem{ { Result: []*string{ to.Ptr("userA"), to.Ptr("SELECT")}, }, { Result: []*string{ to.Ptr("userB"), to.Ptr("SELECT")}, }, { Result: []*string{ to.Ptr("userC"), to.Ptr("SELECT"), to.Ptr("tableId_4")}, }}, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseVulnerabilityAssessmentRuleBaseline = armsql.DatabaseVulnerabilityAssessmentRuleBaseline{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/vulnerabilityAssessments/rules/baselines"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/rules/VA1001/baselines/default"), // Properties: &armsql.DatabaseVulnerabilityAssessmentRuleBaselineProperties{ // BaselineResults: []*armsql.DatabaseVulnerabilityAssessmentRuleBaselineItem{ // { // Result: []*string{ // to.Ptr("userA"), // to.Ptr("SELECT")}, // }, // { // Result: []*string{ // to.Ptr("userB"), // to.Ptr("SELECT")}, // }, // { // Result: []*string{ // to.Ptr("userC"), // to.Ptr("SELECT"), // to.Ptr("tableId_4")}, // }}, // }, // } }
Output:
func (*DatabaseVulnerabilityAssessmentRuleBaselinesClient) Delete ¶
func (client *DatabaseVulnerabilityAssessmentRuleBaselinesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, options *DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions) (DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse, error)
Delete - Removes the database's vulnerability assessment rule baseline. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database for which the vulnerability assessment rule baseline is defined.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- ruleID - The vulnerability assessment rule ID.
- baselineName - The name of the vulnerability assessment rule baseline (default implies a baseline on a database level rule and master for server level rule).
- options - DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentRuleBaselinesClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewDatabaseVulnerabilityAssessmentRuleBaselinesClient().Delete(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", armsql.VulnerabilityAssessmentNameDefault, "VA1001", armsql.VulnerabilityAssessmentPolicyBaselineNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*DatabaseVulnerabilityAssessmentRuleBaselinesClient) Get ¶
func (client *DatabaseVulnerabilityAssessmentRuleBaselinesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, options *DatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions) (DatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse, error)
Get - Gets a database's vulnerability assessment rule baseline. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database for which the vulnerability assessment rule baseline is defined.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- ruleID - The vulnerability assessment rule ID.
- baselineName - The name of the vulnerability assessment rule baseline (default implies a baseline on a database level rule and master for server level rule).
- options - DatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentRuleBaselinesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseVulnerabilityAssessmentRuleBaselinesClient().Get(ctx, "vulnerabilityaseessmenttest-4711", "vulnerabilityaseessmenttest-6411", "testdb", armsql.VulnerabilityAssessmentNameDefault, "VA1001", armsql.VulnerabilityAssessmentPolicyBaselineNameMaster, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseVulnerabilityAssessmentRuleBaseline = armsql.DatabaseVulnerabilityAssessmentRuleBaseline{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/vulnerabilityAssessments/rules/baselines"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/rules/VA1001/baselines/default"), // Properties: &armsql.DatabaseVulnerabilityAssessmentRuleBaselineProperties{ // BaselineResults: []*armsql.DatabaseVulnerabilityAssessmentRuleBaselineItem{ // { // Result: []*string{ // to.Ptr("userA"), // to.Ptr("SELECT")}, // }, // { // Result: []*string{ // to.Ptr("userB"), // to.Ptr("SELECT")}, // }, // { // Result: []*string{ // to.Ptr("userC"), // to.Ptr("SELECT"), // to.Ptr("tableId_4")}, // }}, // }, // } }
Output:
type DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions struct { }
DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate method.
type DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse struct { // A database vulnerability assessment rule baseline. DatabaseVulnerabilityAssessmentRuleBaseline }
DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse contains the response from method DatabaseVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate.
type DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions struct { }
DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentRuleBaselinesClient.Delete method.
type DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse struct { }
DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse contains the response from method DatabaseVulnerabilityAssessmentRuleBaselinesClient.Delete.
type DatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions struct { }
DatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentRuleBaselinesClient.Get method.
type DatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse struct { // A database vulnerability assessment rule baseline. DatabaseVulnerabilityAssessmentRuleBaseline }
DatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse contains the response from method DatabaseVulnerabilityAssessmentRuleBaselinesClient.Get.
type DatabaseVulnerabilityAssessmentScanExportProperties ¶
type DatabaseVulnerabilityAssessmentScanExportProperties struct { // READ-ONLY; Location of the exported report (e.g. https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). ExportedReportLocation *string }
DatabaseVulnerabilityAssessmentScanExportProperties - Properties of the export operation's result.
func (DatabaseVulnerabilityAssessmentScanExportProperties) MarshalJSON ¶ added in v1.1.0
func (d DatabaseVulnerabilityAssessmentScanExportProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseVulnerabilityAssessmentScanExportProperties.
func (*DatabaseVulnerabilityAssessmentScanExportProperties) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseVulnerabilityAssessmentScanExportProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseVulnerabilityAssessmentScanExportProperties.
type DatabaseVulnerabilityAssessmentScansClient ¶
type DatabaseVulnerabilityAssessmentScansClient struct {
// contains filtered or unexported fields
}
DatabaseVulnerabilityAssessmentScansClient contains the methods for the DatabaseVulnerabilityAssessmentScans group. Don't use this type directly, use NewDatabaseVulnerabilityAssessmentScansClient() instead.
func NewDatabaseVulnerabilityAssessmentScansClient ¶
func NewDatabaseVulnerabilityAssessmentScansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseVulnerabilityAssessmentScansClient, error)
NewDatabaseVulnerabilityAssessmentScansClient creates a new instance of DatabaseVulnerabilityAssessmentScansClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DatabaseVulnerabilityAssessmentScansClient) BeginInitiateScan ¶
func (client *DatabaseVulnerabilityAssessmentScansClient) BeginInitiateScan(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, scanID string, options *DatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions) (*runtime.Poller[DatabaseVulnerabilityAssessmentScansClientInitiateScanResponse], error)
BeginInitiateScan - Executes a Vulnerability Assessment database scan. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- scanID - The vulnerability assessment scan Id of the scan to retrieve.
- options - DatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentScansClient.BeginInitiateScan method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentScansExecute.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabaseVulnerabilityAssessmentScansClient().BeginInitiateScan(ctx, "vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", "testdb", armsql.VulnerabilityAssessmentNameDefault, "scan01", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*DatabaseVulnerabilityAssessmentScansClient) Export ¶
func (client *DatabaseVulnerabilityAssessmentScansClient) Export(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, scanID string, options *DatabaseVulnerabilityAssessmentScansClientExportOptions) (DatabaseVulnerabilityAssessmentScansClientExportResponse, error)
Export - Convert an existing scan result to a human readable format. If already exists nothing happens If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the scanned database.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- scanID - The vulnerability assessment scan Id.
- options - DatabaseVulnerabilityAssessmentScansClientExportOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentScansClient.Export method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentScanExport.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseVulnerabilityAssessmentScansClient().Export(ctx, "vulnerabilityassessmenttest-4799", "vulnerabilityassessmenttest-6440", "testdb", armsql.VulnerabilityAssessmentNameDefault, "scan001", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseVulnerabilityAssessmentScansExport = armsql.DatabaseVulnerabilityAssessmentScansExport{ // Name: to.Ptr("scan001"), // Type: to.Ptr("Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans/export"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001/export"), // Properties: &armsql.DatabaseVulnerabilityAssessmentScanExportProperties{ // ExportedReportLocation: to.Ptr("https://myaccount.blob.core.windows.net/vulnerabilityAssessment/vulnerabilityassessmenttest-6440/testdb/scan001.xlsx"), // }, // } }
Output:
func (*DatabaseVulnerabilityAssessmentScansClient) Get ¶
func (client *DatabaseVulnerabilityAssessmentScansClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, scanID string, options *DatabaseVulnerabilityAssessmentScansClientGetOptions) (DatabaseVulnerabilityAssessmentScansClientGetResponse, error)
Get - Gets a vulnerability assessment scan record of a database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- scanID - The vulnerability assessment scan Id of the scan to retrieve.
- options - DatabaseVulnerabilityAssessmentScansClientGetOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentScansClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseVulnerabilityAssessmentScansClient().Get(ctx, "vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", "testdb", armsql.VulnerabilityAssessmentNameDefault, "scan001", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.VulnerabilityAssessmentScanRecord = armsql.VulnerabilityAssessmentScanRecord{ // Name: to.Ptr("scan001"), // Type: to.Ptr("Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001"), // Properties: &armsql.VulnerabilityAssessmentScanRecordProperties{ // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-12T17:47:06.000Z"); return t}()), // Errors: []*armsql.VulnerabilityAssessmentScanError{ // }, // NumberOfFailedSecurityChecks: to.Ptr[int32](9), // ScanID: to.Ptr("scan001"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-12T17:45:06.000Z"); return t}()), // State: to.Ptr(armsql.VulnerabilityAssessmentScanStatePassed), // StorageContainerPath: to.Ptr("https://myaccount.blob.core.windows.net/vulnerability-assessment"), // TriggerType: to.Ptr(armsql.VulnerabilityAssessmentScanTriggerTypeOnDemand), // }, // } }
Output:
func (*DatabaseVulnerabilityAssessmentScansClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *DatabaseVulnerabilityAssessmentScansClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *DatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions) *runtime.Pager[DatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse]
NewListByDatabasePager - Lists the vulnerability assessment scans of a database.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- options - DatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentScansClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDatabaseVulnerabilityAssessmentScansClient().NewListByDatabasePager("vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", "testdb", armsql.VulnerabilityAssessmentNameDefault, nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.VulnerabilityAssessmentScanRecordListResult = armsql.VulnerabilityAssessmentScanRecordListResult{ // Value: []*armsql.VulnerabilityAssessmentScanRecord{ // { // Name: to.Ptr("scan001"), // Type: to.Ptr("Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001"), // Properties: &armsql.VulnerabilityAssessmentScanRecordProperties{ // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-12T17:47:06.000Z"); return t}()), // Errors: []*armsql.VulnerabilityAssessmentScanError{ // }, // NumberOfFailedSecurityChecks: to.Ptr[int32](9), // ScanID: to.Ptr("scan001"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-12T17:45:06.000Z"); return t}()), // State: to.Ptr(armsql.VulnerabilityAssessmentScanStatePassed), // StorageContainerPath: to.Ptr("https://myaccount.blob.core.windows.net/vulnerability-assessment"), // TriggerType: to.Ptr(armsql.VulnerabilityAssessmentScanTriggerTypeOnDemand), // }, // }, // { // Name: to.Ptr("scan002"), // Type: to.Ptr("Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan002"), // Properties: &armsql.VulnerabilityAssessmentScanRecordProperties{ // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-12T17:47:06.000Z"); return t}()), // Errors: []*armsql.VulnerabilityAssessmentScanError{ // }, // NumberOfFailedSecurityChecks: to.Ptr[int32](9), // ScanID: to.Ptr("scan002"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-12T17:45:06.000Z"); return t}()), // State: to.Ptr(armsql.VulnerabilityAssessmentScanStateFailed), // StorageContainerPath: to.Ptr("https://myaccount.blob.core.windows.net/vulnerability-assessment"), // TriggerType: to.Ptr(armsql.VulnerabilityAssessmentScanTriggerTypeRecurring), // }, // }, // { // Name: to.Ptr("scan003"), // Type: to.Ptr("Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan003"), // Properties: &armsql.VulnerabilityAssessmentScanRecordProperties{ // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-12T17:47:06.000Z"); return t}()), // Errors: []*armsql.VulnerabilityAssessmentScanError{ // { // Code: to.Ptr("StorageNotFound"), // Message: to.Ptr("Storage not found"), // }}, // NumberOfFailedSecurityChecks: to.Ptr[int32](0), // ScanID: to.Ptr("scan003"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-12T17:45:06.000Z"); return t}()), // State: to.Ptr(armsql.VulnerabilityAssessmentScanStateFailedToRun), // StorageContainerPath: to.Ptr("https://myaccount.blob.core.windows.net/vulnerability-assessment"), // TriggerType: to.Ptr(armsql.VulnerabilityAssessmentScanTriggerTypeRecurring), // }, // }}, // } } }
Output:
type DatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentScansClient.BeginInitiateScan method.
type DatabaseVulnerabilityAssessmentScansClientExportOptions ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentScansClientExportOptions struct { }
DatabaseVulnerabilityAssessmentScansClientExportOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentScansClient.Export method.
type DatabaseVulnerabilityAssessmentScansClientExportResponse ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentScansClientExportResponse struct { // A database Vulnerability Assessment scan export resource. DatabaseVulnerabilityAssessmentScansExport }
DatabaseVulnerabilityAssessmentScansClientExportResponse contains the response from method DatabaseVulnerabilityAssessmentScansClient.Export.
type DatabaseVulnerabilityAssessmentScansClientGetOptions ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentScansClientGetOptions struct { }
DatabaseVulnerabilityAssessmentScansClientGetOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentScansClient.Get method.
type DatabaseVulnerabilityAssessmentScansClientGetResponse ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentScansClientGetResponse struct { // A vulnerability assessment scan record. VulnerabilityAssessmentScanRecord }
DatabaseVulnerabilityAssessmentScansClientGetResponse contains the response from method DatabaseVulnerabilityAssessmentScansClient.Get.
type DatabaseVulnerabilityAssessmentScansClientInitiateScanResponse ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentScansClientInitiateScanResponse struct { }
DatabaseVulnerabilityAssessmentScansClientInitiateScanResponse contains the response from method DatabaseVulnerabilityAssessmentScansClient.BeginInitiateScan.
type DatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions struct { }
DatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentScansClient.NewListByDatabasePager method.
type DatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse struct { // A list of vulnerability assessment scan records. VulnerabilityAssessmentScanRecordListResult }
DatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse contains the response from method DatabaseVulnerabilityAssessmentScansClient.NewListByDatabasePager.
type DatabaseVulnerabilityAssessmentScansExport ¶
type DatabaseVulnerabilityAssessmentScansExport struct { // Resource properties. Properties *DatabaseVulnerabilityAssessmentScanExportProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
DatabaseVulnerabilityAssessmentScansExport - A database Vulnerability Assessment scan export resource.
func (DatabaseVulnerabilityAssessmentScansExport) MarshalJSON ¶
func (d DatabaseVulnerabilityAssessmentScansExport) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseVulnerabilityAssessmentScansExport.
func (*DatabaseVulnerabilityAssessmentScansExport) UnmarshalJSON ¶ added in v1.1.0
func (d *DatabaseVulnerabilityAssessmentScansExport) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseVulnerabilityAssessmentScansExport.
type DatabaseVulnerabilityAssessmentsClient ¶
type DatabaseVulnerabilityAssessmentsClient struct {
// contains filtered or unexported fields
}
DatabaseVulnerabilityAssessmentsClient contains the methods for the DatabaseVulnerabilityAssessments group. Don't use this type directly, use NewDatabaseVulnerabilityAssessmentsClient() instead.
func NewDatabaseVulnerabilityAssessmentsClient ¶
func NewDatabaseVulnerabilityAssessmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseVulnerabilityAssessmentsClient, error)
NewDatabaseVulnerabilityAssessmentsClient creates a new instance of DatabaseVulnerabilityAssessmentsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DatabaseVulnerabilityAssessmentsClient) CreateOrUpdate ¶
func (client *DatabaseVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, parameters DatabaseVulnerabilityAssessment, options *DatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions) (DatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates the database's vulnerability assessment. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database for which the vulnerability assessment is defined.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- parameters - The requested resource.
- options - DatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentsClient.CreateOrUpdate method.
Example (CreateADatabasesVulnerabilityAssessmentWithAllParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentCreateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseVulnerabilityAssessmentsClient().CreateOrUpdate(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", armsql.VulnerabilityAssessmentNameDefault, armsql.DatabaseVulnerabilityAssessment{ Properties: &armsql.DatabaseVulnerabilityAssessmentProperties{ RecurringScans: &armsql.VulnerabilityAssessmentRecurringScansProperties{ EmailSubscriptionAdmins: to.Ptr(true), Emails: []*string{ to.Ptr("email1@mail.com"), to.Ptr("email2@mail.com")}, IsEnabled: to.Ptr(true), }, StorageAccountAccessKey: to.Ptr("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), StorageContainerPath: to.Ptr("https://myStorage.blob.core.windows.net/vulnerability-assessment/"), StorageContainerSasKey: to.Ptr("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseVulnerabilityAssessment = armsql.DatabaseVulnerabilityAssessment{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/vulnerabilityAssessments"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default"), // Properties: &armsql.DatabaseVulnerabilityAssessmentProperties{ // RecurringScans: &armsql.VulnerabilityAssessmentRecurringScansProperties{ // EmailSubscriptionAdmins: to.Ptr(true), // Emails: []*string{ // to.Ptr("email1@mail.com"), // to.Ptr("email2@mail.com")}, // IsEnabled: to.Ptr(true), // }, // }, // } }
Output:
Example (CreateADatabasesVulnerabilityAssessmentWithMinimalParametersWhenStorageAccountAccessKeyIsSpecified) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentCreateStorageAccessKeyMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseVulnerabilityAssessmentsClient().CreateOrUpdate(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", armsql.VulnerabilityAssessmentNameDefault, armsql.DatabaseVulnerabilityAssessment{ Properties: &armsql.DatabaseVulnerabilityAssessmentProperties{ StorageAccountAccessKey: to.Ptr("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), StorageContainerPath: to.Ptr("https://myStorage.blob.core.windows.net/vulnerability-assessment/"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseVulnerabilityAssessment = armsql.DatabaseVulnerabilityAssessment{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/vulnerabilityAssessments"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default"), // Properties: &armsql.DatabaseVulnerabilityAssessmentProperties{ // RecurringScans: &armsql.VulnerabilityAssessmentRecurringScansProperties{ // EmailSubscriptionAdmins: to.Ptr(false), // Emails: []*string{ // }, // IsEnabled: to.Ptr(true), // }, // }, // } }
Output:
Example (CreateADatabasesVulnerabilityAssessmentWithMinimalParametersWhenStorageContainerSasKeyIsSpecified) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentCreateContainerSasKeyMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseVulnerabilityAssessmentsClient().CreateOrUpdate(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", armsql.VulnerabilityAssessmentNameDefault, armsql.DatabaseVulnerabilityAssessment{ Properties: &armsql.DatabaseVulnerabilityAssessmentProperties{ StorageContainerPath: to.Ptr("https://myStorage.blob.core.windows.net/vulnerability-assessment/"), StorageContainerSasKey: to.Ptr("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseVulnerabilityAssessment = armsql.DatabaseVulnerabilityAssessment{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/vulnerabilityAssessments"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default"), // Properties: &armsql.DatabaseVulnerabilityAssessmentProperties{ // RecurringScans: &armsql.VulnerabilityAssessmentRecurringScansProperties{ // EmailSubscriptionAdmins: to.Ptr(false), // Emails: []*string{ // }, // IsEnabled: to.Ptr(true), // }, // }, // } }
Output:
func (*DatabaseVulnerabilityAssessmentsClient) Delete ¶
func (client *DatabaseVulnerabilityAssessmentsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *DatabaseVulnerabilityAssessmentsClientDeleteOptions) (DatabaseVulnerabilityAssessmentsClientDeleteResponse, error)
Delete - Removes the database's vulnerability assessment. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database for which the vulnerability assessment is defined.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- options - DatabaseVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewDatabaseVulnerabilityAssessmentsClient().Delete(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", armsql.VulnerabilityAssessmentNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*DatabaseVulnerabilityAssessmentsClient) Get ¶
func (client *DatabaseVulnerabilityAssessmentsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *DatabaseVulnerabilityAssessmentsClientGetOptions) (DatabaseVulnerabilityAssessmentsClientGetResponse, error)
Get - Gets the database's vulnerability assessment. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database for which the vulnerability assessment is defined.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- options - DatabaseVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabaseVulnerabilityAssessmentsClient().Get(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", armsql.VulnerabilityAssessmentNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseVulnerabilityAssessment = armsql.DatabaseVulnerabilityAssessment{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/vulnerabilityAssessments"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default"), // Properties: &armsql.DatabaseVulnerabilityAssessmentProperties{ // RecurringScans: &armsql.VulnerabilityAssessmentRecurringScansProperties{ // EmailSubscriptionAdmins: to.Ptr(true), // Emails: []*string{ // to.Ptr("email1@mail.com"), // to.Ptr("email2@mail.com")}, // IsEnabled: to.Ptr(true), // }, // }, // } }
Output:
func (*DatabaseVulnerabilityAssessmentsClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *DatabaseVulnerabilityAssessmentsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *DatabaseVulnerabilityAssessmentsClientListByDatabaseOptions) *runtime.Pager[DatabaseVulnerabilityAssessmentsClientListByDatabaseResponse]
NewListByDatabasePager - Lists the vulnerability assessment policies associated with a database.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database for which the vulnerability assessment policies are defined.
- options - DatabaseVulnerabilityAssessmentsClientListByDatabaseOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentsClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDatabaseVulnerabilityAssessmentsClient().NewListByDatabasePager("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DatabaseVulnerabilityAssessmentListResult = armsql.DatabaseVulnerabilityAssessmentListResult{ // Value: []*armsql.DatabaseVulnerabilityAssessment{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/vulnerabilityAssessments"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default"), // Properties: &armsql.DatabaseVulnerabilityAssessmentProperties{ // RecurringScans: &armsql.VulnerabilityAssessmentRecurringScansProperties{ // EmailSubscriptionAdmins: to.Ptr(true), // Emails: []*string{ // to.Ptr("email1@mail.com"), // to.Ptr("email2@mail.com")}, // IsEnabled: to.Ptr(true), // }, // }, // }}, // } } }
Output:
type DatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions struct { }
DatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentsClient.CreateOrUpdate method.
type DatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse struct { // A database vulnerability assessment. DatabaseVulnerabilityAssessment }
DatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse contains the response from method DatabaseVulnerabilityAssessmentsClient.CreateOrUpdate.
type DatabaseVulnerabilityAssessmentsClientDeleteOptions ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentsClientDeleteOptions struct { }
DatabaseVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentsClient.Delete method.
type DatabaseVulnerabilityAssessmentsClientDeleteResponse ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentsClientDeleteResponse struct { }
DatabaseVulnerabilityAssessmentsClientDeleteResponse contains the response from method DatabaseVulnerabilityAssessmentsClient.Delete.
type DatabaseVulnerabilityAssessmentsClientGetOptions ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentsClientGetOptions struct { }
DatabaseVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentsClient.Get method.
type DatabaseVulnerabilityAssessmentsClientGetResponse ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentsClientGetResponse struct { // A database vulnerability assessment. DatabaseVulnerabilityAssessment }
DatabaseVulnerabilityAssessmentsClientGetResponse contains the response from method DatabaseVulnerabilityAssessmentsClient.Get.
type DatabaseVulnerabilityAssessmentsClientListByDatabaseOptions ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentsClientListByDatabaseOptions struct { }
DatabaseVulnerabilityAssessmentsClientListByDatabaseOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentsClient.NewListByDatabasePager method.
type DatabaseVulnerabilityAssessmentsClientListByDatabaseResponse ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentsClientListByDatabaseResponse struct { // A list of the database's vulnerability assessments. DatabaseVulnerabilityAssessmentListResult }
DatabaseVulnerabilityAssessmentsClientListByDatabaseResponse contains the response from method DatabaseVulnerabilityAssessmentsClient.NewListByDatabasePager.
type DatabasesClient ¶
type DatabasesClient struct {
// contains filtered or unexported fields
}
DatabasesClient contains the methods for the Databases group. Don't use this type directly, use NewDatabasesClient() instead.
func NewDatabasesClient ¶
func NewDatabasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabasesClient, error)
NewDatabasesClient creates a new instance of DatabasesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DatabasesClient) BeginCreateOrUpdate ¶
func (client *DatabasesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters Database, options *DatabasesClientBeginCreateOrUpdateOptions) (*runtime.Poller[DatabasesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates a new database or updates an existing database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- parameters - The requested database resource state.
- options - DatabasesClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabasesClient.BeginCreateOrUpdate method.
Example (CreatesADataWarehouseDatabaseAsACrossSubscriptionRestoreFromABackupOfADroppedDatabase) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/CreateDwDatabaseCrossSubscriptionRestore.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabasesClient().BeginCreateOrUpdate(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdw", armsql.Database{ Location: to.Ptr("southeastasia"), Properties: &armsql.DatabaseProperties{ CreateMode: to.Ptr(armsql.CreateModeRestore), SourceResourceID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/srcsvr/restorableDroppedDatabases/srcdw,131403269876900000"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Database = armsql.Database{ // Name: to.Ptr("testdw"), // Type: to.Ptr("Microsoft.Sql/servers/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdw"), // Location: to.Ptr("southeastasia"), // Kind: to.Ptr("v12.0,user,datawarehouse,gen2"), // Properties: &armsql.DatabaseProperties{ // CatalogCollation: to.Ptr(armsql.CatalogCollationTypeSQLLatin1GeneralCP1CIAS), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-24T06:46:14.990Z"); return t}()), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // CurrentServiceObjectiveName: to.Ptr("DW1000c"), // CurrentSKU: &armsql.SKU{ // Name: to.Ptr("DataWarehouse"), // Capacity: to.Ptr[int32](9000), // Tier: to.Ptr("DataWarehouse"), // }, // DatabaseID: to.Ptr("188784c9-d602-4684-86cf-e67b6f03551a"), // DefaultSecondaryLocation: to.Ptr("eastus"), // MaxSizeBytes: to.Ptr[int64](263882790666240), // ReadScale: to.Ptr(armsql.DatabaseReadScaleDisabled), // RequestedServiceObjectiveName: to.Ptr("DW1000c"), // Status: to.Ptr(armsql.DatabaseStatusOnline), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("DataWarehouse"), // Capacity: to.Ptr[int32](9000), // Tier: to.Ptr("DataWarehouse"), // }, // } }
Output:
Example (CreatesADataWarehouseDatabaseAsACrossSubscriptionRestoreFromAGeoBackup) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/CreateDwDatabaseCrossSubscriptionRecovery.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabasesClient().BeginCreateOrUpdate(ctx, "Default-SQL-WestUS", "testsvr", "testdw", armsql.Database{ Location: to.Ptr("westus"), Properties: &armsql.DatabaseProperties{ CreateMode: to.Ptr(armsql.CreateModeRecovery), SourceResourceID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-SQL-EastUS/providers/Microsoft.Sql/servers/srcsvr/recoverabledatabases/srcdw"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Database = armsql.Database{ // Name: to.Ptr("testdw"), // Type: to.Ptr("Microsoft.Sql/servers/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-WestUS/providers/Microsoft.Sql/servers/testsvr/databases/testdw"), // Location: to.Ptr("westus"), // Kind: to.Ptr("v12.0,user,datawarehouse,gen2"), // Properties: &armsql.DatabaseProperties{ // CatalogCollation: to.Ptr(armsql.CatalogCollationTypeSQLLatin1GeneralCP1CIAS), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-24T06:46:14.990Z"); return t}()), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // CurrentServiceObjectiveName: to.Ptr("DW1000c"), // CurrentSKU: &armsql.SKU{ // Name: to.Ptr("DataWarehouse"), // Capacity: to.Ptr[int32](9000), // Tier: to.Ptr("DataWarehouse"), // }, // DatabaseID: to.Ptr("188784c9-d602-4684-86cf-e67b6f03551a"), // DefaultSecondaryLocation: to.Ptr("eastus"), // MaxSizeBytes: to.Ptr[int64](263882790666240), // ReadScale: to.Ptr(armsql.DatabaseReadScaleDisabled), // RequestedServiceObjectiveName: to.Ptr("DW1000c"), // Status: to.Ptr(armsql.DatabaseStatusOnline), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("DataWarehouse"), // Capacity: to.Ptr[int32](9000), // Tier: to.Ptr("DataWarehouse"), // }, // } }
Output:
Example (CreatesADataWarehouseDatabaseAsACrossSubscriptionRestoreFromARestorePointOfAnExistingDatabase) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/CreateDwDatabaseCrossSubscriptionPITR.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabasesClient().BeginCreateOrUpdate(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdw", armsql.Database{ Location: to.Ptr("southeastasia"), Properties: &armsql.DatabaseProperties{ CreateMode: to.Ptr(armsql.CreateModePointInTimeRestore), RestorePointInTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-22T05:35:31.503Z"); return t }()), SourceResourceID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/srcsvr/databases/srcdw"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Database = armsql.Database{ // Name: to.Ptr("testdw"), // Type: to.Ptr("Microsoft.Sql/servers/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdw"), // Location: to.Ptr("southeastasia"), // Kind: to.Ptr("v12.0,user,datawarehouse,gen2"), // Properties: &armsql.DatabaseProperties{ // CatalogCollation: to.Ptr(armsql.CatalogCollationTypeSQLLatin1GeneralCP1CIAS), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-01-24T06:46:14.990Z"); return t}()), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // CurrentServiceObjectiveName: to.Ptr("DW1000c"), // CurrentSKU: &armsql.SKU{ // Name: to.Ptr("DataWarehouse"), // Capacity: to.Ptr[int32](9000), // Tier: to.Ptr("DataWarehouse"), // }, // DatabaseID: to.Ptr("188784c9-d602-4684-86cf-e67b6f03551a"), // DefaultSecondaryLocation: to.Ptr("eastus"), // MaxSizeBytes: to.Ptr[int64](263882790666240), // ReadScale: to.Ptr(armsql.DatabaseReadScaleDisabled), // RequestedServiceObjectiveName: to.Ptr("DW1000c"), // Status: to.Ptr(armsql.DatabaseStatusOnline), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("DataWarehouse"), // Capacity: to.Ptr[int32](9000), // Tier: to.Ptr("DataWarehouse"), // }, // } }
Output:
Example (CreatesADatabaseAsACopy) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/CreateDatabaseCopyMode.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabasesClient().BeginCreateOrUpdate(ctx, "Default-SQL-SouthEastAsia", "testsvr", "dbcopy", armsql.Database{ Location: to.Ptr("southeastasia"), Properties: &armsql.DatabaseProperties{ CreateMode: to.Ptr(armsql.CreateModeCopy), SourceDatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb"), }, SKU: &armsql.SKU{ Name: to.Ptr("S0"), Tier: to.Ptr("Standard"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Database = armsql.Database{ // Name: to.Ptr("dbcopy"), // Type: to.Ptr("Microsoft.Sql/servers/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbcopy"), // Location: to.Ptr("southeastasia"), // Kind: to.Ptr("v12.0,user"), // Properties: &armsql.DatabaseProperties{ // CatalogCollation: to.Ptr(armsql.CatalogCollationTypeSQLLatin1GeneralCP1CIAS), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:41:33.937Z"); return t}()), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // CurrentServiceObjectiveName: to.Ptr("S0"), // CurrentSKU: &armsql.SKU{ // Name: to.Ptr("Standard"), // Capacity: to.Ptr[int32](10), // Tier: to.Ptr("Standard"), // }, // DatabaseID: to.Ptr("6c764297-577b-470f-9af4-96d3d41e2ba3"), // DefaultSecondaryLocation: to.Ptr("North Europe"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:51:33.937Z"); return t}()), // IsInfraEncryptionEnabled: to.Ptr(false), // IsLedgerOn: to.Ptr(false), // MaxSizeBytes: to.Ptr[int64](268435456000), // ReadScale: to.Ptr(armsql.DatabaseReadScaleDisabled), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // RequestedServiceObjectiveName: to.Ptr("S0"), // Status: to.Ptr(armsql.DatabaseStatusOnline), // ZoneRedundant: to.Ptr(false), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("Standard"), // Capacity: to.Ptr[int32](10), // Tier: to.Ptr("Standard"), // }, // } }
Output:
Example (CreatesADatabaseAsAnOnLineSecondary) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/CreateDatabaseSecondaryMode.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabasesClient().BeginCreateOrUpdate(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", armsql.Database{ Location: to.Ptr("southeastasia"), Properties: &armsql.DatabaseProperties{ CreateMode: to.Ptr(armsql.CreateModeSecondary), SecondaryType: to.Ptr(armsql.SecondaryTypeGeo), SourceDatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-NorthEurope/providers/Microsoft.Sql/servers/testsvr1/databases/testdb"), }, SKU: &armsql.SKU{ Name: to.Ptr("S0"), Tier: to.Ptr("Standard"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Database = armsql.Database{ // Name: to.Ptr("testdb"), // Type: to.Ptr("Microsoft.Sql/servers/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb"), // Location: to.Ptr("southeastasia"), // Kind: to.Ptr("v12.0,user"), // Properties: &armsql.DatabaseProperties{ // CatalogCollation: to.Ptr(armsql.CatalogCollationTypeSQLLatin1GeneralCP1CIAS), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:41:33.937Z"); return t}()), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // CurrentServiceObjectiveName: to.Ptr("S0"), // CurrentSKU: &armsql.SKU{ // Name: to.Ptr("Standard"), // Capacity: to.Ptr[int32](10), // Tier: to.Ptr("Standard"), // }, // DatabaseID: to.Ptr("6c764297-577b-470f-9af4-96d3d41e2ba3"), // DefaultSecondaryLocation: to.Ptr("North Europe"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:51:33.937Z"); return t}()), // IsInfraEncryptionEnabled: to.Ptr(false), // IsLedgerOn: to.Ptr(false), // MaxSizeBytes: to.Ptr[int64](268435456000), // ReadScale: to.Ptr(armsql.DatabaseReadScaleDisabled), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // RequestedServiceObjectiveName: to.Ptr("S0"), // SecondaryType: to.Ptr(armsql.SecondaryTypeGeo), // Status: to.Ptr(armsql.DatabaseStatusOnline), // ZoneRedundant: to.Ptr(false), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("Standard"), // Capacity: to.Ptr[int32](10), // Tier: to.Ptr("Standard"), // }, // } }
Output:
Example (CreatesADatabaseAsNamedReplicaSecondary) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/CreateDatabaseNamedReplica.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabasesClient().BeginCreateOrUpdate(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", armsql.Database{ Location: to.Ptr("southeastasia"), Properties: &armsql.DatabaseProperties{ CreateMode: to.Ptr(armsql.CreateModeSecondary), SecondaryType: to.Ptr(armsql.SecondaryTypeNamed), SourceDatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-NorthEurope/providers/Microsoft.Sql/servers/testsvr1/databases/primarydb"), }, SKU: &armsql.SKU{ Name: to.Ptr("HS_Gen4"), Capacity: to.Ptr[int32](2), Tier: to.Ptr("Hyperscale"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Database = armsql.Database{ // Name: to.Ptr("testdb"), // Type: to.Ptr("Microsoft.Sql/servers/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb"), // Location: to.Ptr("southeastasia"), // Kind: to.Ptr("v12.0,user,vcore,hyperscale"), // Properties: &armsql.DatabaseProperties{ // CatalogCollation: to.Ptr(armsql.CatalogCollationTypeSQLLatin1GeneralCP1CIAS), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:41:33.937Z"); return t}()), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // CurrentServiceObjectiveName: to.Ptr("HS_Gen4_2"), // CurrentSKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen4"), // Capacity: to.Ptr[int32](2), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("Hyperscale"), // }, // DatabaseID: to.Ptr("6c764297-577b-470f-9af4-96d3d41e2ba3"), // DefaultSecondaryLocation: to.Ptr("North Europe"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:51:33.937Z"); return t}()), // HighAvailabilityReplicaCount: to.Ptr[int32](0), // IsInfraEncryptionEnabled: to.Ptr(false), // IsLedgerOn: to.Ptr(false), // LicenseType: to.Ptr(armsql.DatabaseLicenseTypeLicenseIncluded), // MaxSizeBytes: to.Ptr[int64](-1), // ReadScale: to.Ptr(armsql.DatabaseReadScaleDisabled), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // RequestedServiceObjectiveName: to.Ptr("HS_Gen4_2"), // SecondaryType: to.Ptr(armsql.SecondaryTypeNamed), // Status: to.Ptr(armsql.DatabaseStatusOnline), // ZoneRedundant: to.Ptr(false), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen4"), // Capacity: to.Ptr[int32](2), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("Hyperscale"), // }, // } }
Output:
Example (CreatesADatabaseFromPointInTimeRestore) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/CreateDatabasePITRMode.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabasesClient().BeginCreateOrUpdate(ctx, "Default-SQL-SouthEastAsia", "testsvr", "dbpitr", armsql.Database{ Location: to.Ptr("southeastasia"), Properties: &armsql.DatabaseProperties{ CreateMode: to.Ptr(armsql.CreateModePointInTimeRestore), RestorePointInTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-22T05:35:31.503Z"); return t }()), SourceDatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SoutheastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Database = armsql.Database{ // Name: to.Ptr("dbpitr"), // Type: to.Ptr("Microsoft.Sql/servers/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SoutheastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbpitr"), // Location: to.Ptr("SoutheastAsia"), // Kind: to.Ptr("v12.0,user"), // Properties: &armsql.DatabaseProperties{ // CatalogCollation: to.Ptr(armsql.CatalogCollationTypeSQLLatin1GeneralCP1CIAS), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-23T20:31:35.807Z"); return t}()), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // CurrentServiceObjectiveName: to.Ptr("S0"), // CurrentSKU: &armsql.SKU{ // Name: to.Ptr("Standard"), // Capacity: to.Ptr[int32](10), // Tier: to.Ptr("Standard"), // }, // DatabaseID: to.Ptr("2463ef48-53e2-4c26-9781-2d7138080bfd"), // DefaultSecondaryLocation: to.Ptr("SoutheastAsia"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-23T20:47:37.000Z"); return t}()), // IsInfraEncryptionEnabled: to.Ptr(false), // IsLedgerOn: to.Ptr(false), // MaxSizeBytes: to.Ptr[int64](268435456000), // ReadScale: to.Ptr(armsql.DatabaseReadScaleDisabled), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // RequestedServiceObjectiveName: to.Ptr("S0"), // Status: to.Ptr(armsql.DatabaseStatusOnline), // ZoneRedundant: to.Ptr(false), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("Standard"), // Capacity: to.Ptr[int32](10), // Tier: to.Ptr("Standard"), // }, // } }
Output:
Example (CreatesADatabaseWithDefaultMode) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/CreateDatabaseDefaultMode.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabasesClient().BeginCreateOrUpdate(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", armsql.Database{ Location: to.Ptr("southeastasia"), Properties: &armsql.DatabaseProperties{ Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), CreateMode: to.Ptr(armsql.CreateModeDefault), MaxSizeBytes: to.Ptr[int64](1073741824), }, SKU: &armsql.SKU{ Name: to.Ptr("S0"), Tier: to.Ptr("Standard"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Database = armsql.Database{ // Name: to.Ptr("testdb"), // Type: to.Ptr("Microsoft.Sql/servers/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb"), // Location: to.Ptr("southeastasia"), // Kind: to.Ptr("v12.0,user"), // Properties: &armsql.DatabaseProperties{ // CatalogCollation: to.Ptr(armsql.CatalogCollationTypeSQLLatin1GeneralCP1CIAS), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:41:33.937Z"); return t}()), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // CurrentServiceObjectiveName: to.Ptr("S0"), // CurrentSKU: &armsql.SKU{ // Name: to.Ptr("Standard"), // Capacity: to.Ptr[int32](10), // Tier: to.Ptr("Standard"), // }, // DatabaseID: to.Ptr("6c764297-577b-470f-9af4-96d3d41e2ba3"), // DefaultSecondaryLocation: to.Ptr("North Europe"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:51:33.937Z"); return t}()), // IsInfraEncryptionEnabled: to.Ptr(false), // IsLedgerOn: to.Ptr(false), // MaxSizeBytes: to.Ptr[int64](1073741824), // ReadScale: to.Ptr(armsql.DatabaseReadScaleDisabled), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // RequestedServiceObjectiveName: to.Ptr("S0"), // Status: to.Ptr(armsql.DatabaseStatusOnline), // ZoneRedundant: to.Ptr(false), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("S0"), // Capacity: to.Ptr[int32](10), // Tier: to.Ptr("Standard"), // }, // } }
Output:
Example (CreatesADatabaseWithLedgerOn) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/CreateDatabaseLedger.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabasesClient().BeginCreateOrUpdate(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", armsql.Database{ Location: to.Ptr("southeastasia"), Properties: &armsql.DatabaseProperties{ IsLedgerOn: to.Ptr(true), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Database = armsql.Database{ // Name: to.Ptr("testdb"), // Type: to.Ptr("Microsoft.Sql/servers/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb"), // Location: to.Ptr("southeastasia"), // Kind: to.Ptr("v12.0,user"), // Properties: &armsql.DatabaseProperties{ // CatalogCollation: to.Ptr(armsql.CatalogCollationTypeSQLLatin1GeneralCP1CIAS), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:41:33.937Z"); return t}()), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // CurrentServiceObjectiveName: to.Ptr("S0"), // CurrentSKU: &armsql.SKU{ // Name: to.Ptr("Standard"), // Capacity: to.Ptr[int32](10), // Tier: to.Ptr("Standard"), // }, // DatabaseID: to.Ptr("6c764297-577b-470f-9af4-96d3d41e2ba3"), // DefaultSecondaryLocation: to.Ptr("North Europe"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:51:33.937Z"); return t}()), // IsLedgerOn: to.Ptr(true), // MaxSizeBytes: to.Ptr[int64](268435456000), // ReadScale: to.Ptr(armsql.DatabaseReadScaleDisabled), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // RequestedServiceObjectiveName: to.Ptr("S0"), // Status: to.Ptr(armsql.DatabaseStatusOnline), // ZoneRedundant: to.Ptr(false), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("Standard"), // Capacity: to.Ptr[int32](10), // Tier: to.Ptr("Standard"), // }, // } }
Output:
Example (CreatesADatabaseWithMinimumNumberOfParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/CreateDatabaseMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabasesClient().BeginCreateOrUpdate(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", armsql.Database{ Location: to.Ptr("southeastasia"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Database = armsql.Database{ // Name: to.Ptr("testdb"), // Type: to.Ptr("Microsoft.Sql/servers/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb"), // Location: to.Ptr("southeastasia"), // Kind: to.Ptr("v12.0,user"), // Properties: &armsql.DatabaseProperties{ // CatalogCollation: to.Ptr(armsql.CatalogCollationTypeSQLLatin1GeneralCP1CIAS), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:41:33.937Z"); return t}()), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // CurrentServiceObjectiveName: to.Ptr("S0"), // CurrentSKU: &armsql.SKU{ // Name: to.Ptr("Standard"), // Capacity: to.Ptr[int32](10), // Tier: to.Ptr("Standard"), // }, // DatabaseID: to.Ptr("6c764297-577b-470f-9af4-96d3d41e2ba3"), // DefaultSecondaryLocation: to.Ptr("North Europe"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:51:33.937Z"); return t}()), // IsInfraEncryptionEnabled: to.Ptr(false), // IsLedgerOn: to.Ptr(false), // MaxSizeBytes: to.Ptr[int64](268435456000), // ReadScale: to.Ptr(armsql.DatabaseReadScaleDisabled), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // RequestedServiceObjectiveName: to.Ptr("S0"), // Status: to.Ptr(armsql.DatabaseStatusOnline), // ZoneRedundant: to.Ptr(false), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("Standard"), // Capacity: to.Ptr[int32](10), // Tier: to.Ptr("Standard"), // }, // } }
Output:
Example (CreatesADatabaseWithPreferredMaintenanceWindow) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/CreateDatabaseMaintenanceConfiguration.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabasesClient().BeginCreateOrUpdate(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", armsql.Database{ Location: to.Ptr("southeastasia"), Properties: &armsql.DatabaseProperties{ Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), CreateMode: to.Ptr(armsql.CreateModeDefault), MaintenanceConfigurationID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1"), MaxSizeBytes: to.Ptr[int64](1073741824), }, SKU: &armsql.SKU{ Name: to.Ptr("S2"), Tier: to.Ptr("Standard"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Database = armsql.Database{ // Name: to.Ptr("testdb"), // Type: to.Ptr("Microsoft.Sql/servers/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb"), // Location: to.Ptr("southeastasia"), // Kind: to.Ptr("v12.0,user"), // Properties: &armsql.DatabaseProperties{ // CatalogCollation: to.Ptr(armsql.CatalogCollationTypeSQLLatin1GeneralCP1CIAS), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:41:33.937Z"); return t}()), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // CurrentServiceObjectiveName: to.Ptr("S2"), // CurrentSKU: &armsql.SKU{ // Name: to.Ptr("Standard"), // Capacity: to.Ptr[int32](50), // Tier: to.Ptr("Standard"), // }, // DatabaseID: to.Ptr("6c764297-577b-470f-9af4-96d3d41e2ba3"), // DefaultSecondaryLocation: to.Ptr("North Europe"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-29T06:41:18.283Z"); return t}()), // IsInfraEncryptionEnabled: to.Ptr(false), // IsLedgerOn: to.Ptr(false), // MaintenanceConfigurationID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1"), // MaxSizeBytes: to.Ptr[int64](1073741824), // ReadScale: to.Ptr(armsql.DatabaseReadScaleDisabled), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // Status: to.Ptr(armsql.DatabaseStatusOnline), // ZoneRedundant: to.Ptr(false), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("S2"), // Tier: to.Ptr("Standard"), // }, // } }
Output:
Example (CreatesADatabaseWithSpecifiedBackupStorageRedundancy) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/CreateDatabaseConfiguredBackupStorageRedundancy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabasesClient().BeginCreateOrUpdate(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", armsql.Database{ Location: to.Ptr("southeastasia"), Properties: &armsql.DatabaseProperties{ RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyZone), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Database = armsql.Database{ // Name: to.Ptr("testdb"), // Type: to.Ptr("Microsoft.Sql/servers/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb"), // Location: to.Ptr("southeastasia"), // Kind: to.Ptr("v12.0,user"), // Properties: &armsql.DatabaseProperties{ // CatalogCollation: to.Ptr(armsql.CatalogCollationTypeSQLLatin1GeneralCP1CIAS), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:41:33.937Z"); return t}()), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyZone), // CurrentServiceObjectiveName: to.Ptr("S0"), // CurrentSKU: &armsql.SKU{ // Name: to.Ptr("Standard"), // Capacity: to.Ptr[int32](10), // Tier: to.Ptr("Standard"), // }, // DatabaseID: to.Ptr("6c764297-577b-470f-9af4-96d3d41e2ba3"), // DefaultSecondaryLocation: to.Ptr("North Europe"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:51:33.937Z"); return t}()), // IsInfraEncryptionEnabled: to.Ptr(false), // IsLedgerOn: to.Ptr(false), // MaxSizeBytes: to.Ptr[int64](268435456000), // ReadScale: to.Ptr(armsql.DatabaseReadScaleDisabled), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyZone), // RequestedServiceObjectiveName: to.Ptr("S0"), // Status: to.Ptr(armsql.DatabaseStatusOnline), // ZoneRedundant: to.Ptr(false), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("Standard"), // Capacity: to.Ptr[int32](10), // Tier: to.Ptr("Standard"), // }, // } }
Output:
Example (CreatesAVCoreDatabaseBySpecifyingServiceObjectiveName) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/CreateVCoreDatabaseByServiceObjective.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabasesClient().BeginCreateOrUpdate(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", armsql.Database{ Location: to.Ptr("southeastasia"), SKU: &armsql.SKU{ Name: to.Ptr("BC"), Capacity: to.Ptr[int32](2), Family: to.Ptr("Gen4"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Database = armsql.Database{ // Name: to.Ptr("testdb"), // Type: to.Ptr("Microsoft.Sql/servers/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb"), // Location: to.Ptr("southeastasia"), // Kind: to.Ptr("v12.0,user"), // Properties: &armsql.DatabaseProperties{ // CatalogCollation: to.Ptr(armsql.CatalogCollationTypeSQLLatin1GeneralCP1CIAS), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:41:33.937Z"); return t}()), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // CurrentServiceObjectiveName: to.Ptr("BC_Gen4_2"), // CurrentSKU: &armsql.SKU{ // Name: to.Ptr("BC_Gen4"), // Capacity: to.Ptr[int32](2), // Tier: to.Ptr("BusinessCritical"), // }, // DatabaseID: to.Ptr("6c764297-577b-470f-9af4-96d3d41e2ba3"), // DefaultSecondaryLocation: to.Ptr("North Europe"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:51:33.937Z"); return t}()), // IsInfraEncryptionEnabled: to.Ptr(false), // IsLedgerOn: to.Ptr(false), // LicenseType: to.Ptr(armsql.DatabaseLicenseTypeLicenseIncluded), // MaxLogSizeBytes: to.Ptr[int64](104857600), // MaxSizeBytes: to.Ptr[int64](1073741824), // ReadScale: to.Ptr(armsql.DatabaseReadScaleEnabled), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // Status: to.Ptr(armsql.DatabaseStatusOnline), // ZoneRedundant: to.Ptr(false), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("BC_Gen4"), // Capacity: to.Ptr[int32](2), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("BusinessCritical"), // }, // } }
Output:
Example (CreatesAVCoreDatabaseBySpecifyingSkuNameAndCapacity) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/CreateVCoreDatabaseBySkuNameCapacity.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabasesClient().BeginCreateOrUpdate(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", armsql.Database{ Location: to.Ptr("southeastasia"), SKU: &armsql.SKU{ Name: to.Ptr("BC_Gen4"), Capacity: to.Ptr[int32](2), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Database = armsql.Database{ // Name: to.Ptr("testdb"), // Type: to.Ptr("Microsoft.Sql/servers/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb"), // Location: to.Ptr("southeastasia"), // Kind: to.Ptr("v12.0,user"), // Properties: &armsql.DatabaseProperties{ // CatalogCollation: to.Ptr(armsql.CatalogCollationTypeSQLLatin1GeneralCP1CIAS), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:41:33.937Z"); return t}()), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // CurrentServiceObjectiveName: to.Ptr("BC_Gen4_2"), // CurrentSKU: &armsql.SKU{ // Name: to.Ptr("BC_Gen4"), // Capacity: to.Ptr[int32](2), // Tier: to.Ptr("BusinessCritical"), // }, // DatabaseID: to.Ptr("6c764297-577b-470f-9af4-96d3d41e2ba3"), // DefaultSecondaryLocation: to.Ptr("North Europe"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:51:33.937Z"); return t}()), // IsInfraEncryptionEnabled: to.Ptr(false), // IsLedgerOn: to.Ptr(false), // LicenseType: to.Ptr(armsql.DatabaseLicenseTypeLicenseIncluded), // MaxLogSizeBytes: to.Ptr[int64](104857600), // MaxSizeBytes: to.Ptr[int64](1073741824), // ReadScale: to.Ptr(armsql.DatabaseReadScaleEnabled), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // Status: to.Ptr(armsql.DatabaseStatusOnline), // ZoneRedundant: to.Ptr(false), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("BC_Gen4"), // Capacity: to.Ptr[int32](2), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("BusinessCritical"), // }, // } }
Output:
func (*DatabasesClient) BeginDelete ¶
func (client *DatabasesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginDeleteOptions) (*runtime.Poller[DatabasesClientDeleteResponse], error)
BeginDelete - Deletes the database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - DatabasesClientBeginDeleteOptions contains the optional parameters for the DatabasesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/DeleteDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabasesClient().BeginDelete(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*DatabasesClient) BeginExport ¶
func (client *DatabasesClient) BeginExport(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ExportDatabaseDefinition, options *DatabasesClientBeginExportOptions) (*runtime.Poller[DatabasesClientExportResponse], error)
BeginExport - Exports a database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- parameters - The database export request parameters.
- options - DatabasesClientBeginExportOptions contains the optional parameters for the DatabasesClient.BeginExport method.
Example (ExportsADatabase) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ExportDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabasesClient().BeginExport(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", armsql.ExportDatabaseDefinition{ AdministratorLogin: to.Ptr("login"), AdministratorLoginPassword: to.Ptr("password"), AuthenticationType: to.Ptr("Sql"), StorageKey: to.Ptr("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=="), StorageKeyType: to.Ptr(armsql.StorageKeyTypeStorageAccessKey), StorageURI: to.Ptr("https://test.blob.core.windows.net/test.bacpac"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ImportExportOperationResult = armsql.ImportExportOperationResult{ // Name: to.Ptr("9d9a794a-5cec-4f23-af70-d29511b522a4"), // Type: to.Ptr("Microsoft.Sql/servers/databases/importExportOperationResults"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/importExportOperationResults/9d9a794a-5cec-4f23-af70-d29511b522a4"), // Properties: &armsql.ImportExportOperationResultProperties{ // BlobURI: to.Ptr("https://test.blob.core.windows.net/test.bacpac"), // DatabaseName: to.Ptr("testdb"), // LastModifiedTime: to.Ptr("2/2/2020 8:34:47 PM"), // QueuedTime: to.Ptr("2/2/2020 8:33:27 PM"), // RequestID: to.Ptr("9d9a794a-5cec-4f23-af70-d29511b522a4"), // RequestType: to.Ptr("Export"), // ServerName: to.Ptr("testsvr.database.windows.net"), // Status: to.Ptr("Completed"), // }, // } }
Output:
Example (ExportsADatabaseUsingPrivateLinkToCommunicateWithSqlServerAndStorageAccount) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ExportDatabaseWithNetworkIsolation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabasesClient().BeginExport(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", armsql.ExportDatabaseDefinition{ AdministratorLogin: to.Ptr("login"), AdministratorLoginPassword: to.Ptr("password"), AuthenticationType: to.Ptr("Sql"), NetworkIsolation: &armsql.NetworkIsolationSettings{ SQLServerResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr"), StorageAccountResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Storage/storageAccounts/test-privatelink"), }, StorageKey: to.Ptr("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=="), StorageKeyType: to.Ptr(armsql.StorageKeyTypeStorageAccessKey), StorageURI: to.Ptr("https://test.blob.core.windows.net/test.bacpac"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ImportExportOperationResult = armsql.ImportExportOperationResult{ // Name: to.Ptr("9d9a794a-5cec-4f23-af70-d29511b522a4"), // Type: to.Ptr("Microsoft.Sql/servers/databases/importExportOperationResults"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/importExportOperationResults/9d9a794a-5cec-4f23-af70-d29511b522a4"), // Properties: &armsql.ImportExportOperationResultProperties{ // BlobURI: to.Ptr("https://test.blob.core.windows.net/test.bacpac"), // DatabaseName: to.Ptr("testdb"), // LastModifiedTime: to.Ptr("2/2/2020 8:34:47 PM"), // QueuedTime: to.Ptr("2/2/2020 8:33:27 PM"), // RequestID: to.Ptr("9d9a794a-5cec-4f23-af70-d29511b522a4"), // RequestType: to.Ptr("Export"), // ServerName: to.Ptr("testsvr.database.windows.net"), // Status: to.Ptr("Completed"), // }, // } }
Output:
func (*DatabasesClient) BeginFailover ¶
func (client *DatabasesClient) BeginFailover(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginFailoverOptions) (*runtime.Poller[DatabasesClientFailoverResponse], error)
BeginFailover - Failovers a database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database to failover.
- options - DatabasesClientBeginFailoverOptions contains the optional parameters for the DatabasesClient.BeginFailover method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/FailoverDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabasesClient().BeginFailover(ctx, "group1", "testServer", "testDatabase", &armsql.DatabasesClientBeginFailoverOptions{ReplicaType: to.Ptr(armsql.ReplicaTypePrimary)}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*DatabasesClient) BeginImport ¶
func (client *DatabasesClient) BeginImport(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ImportExistingDatabaseDefinition, options *DatabasesClientBeginImportOptions) (*runtime.Poller[DatabasesClientImportResponse], error)
BeginImport - Imports a bacpac into a new database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- parameters - The database import request parameters.
- options - DatabasesClientBeginImportOptions contains the optional parameters for the DatabasesClient.BeginImport method.
Example (ImportsToAnExistingEmptyDatabase) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ImportDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabasesClient().BeginImport(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", armsql.ImportExistingDatabaseDefinition{ AdministratorLogin: to.Ptr("login"), AdministratorLoginPassword: to.Ptr("password"), AuthenticationType: to.Ptr("Sql"), StorageKey: to.Ptr("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=="), StorageKeyType: to.Ptr(armsql.StorageKeyTypeStorageAccessKey), StorageURI: to.Ptr("https://test.blob.core.windows.net/test.bacpac"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ImportExportOperationResult = armsql.ImportExportOperationResult{ // Name: to.Ptr("9d9a794a-5cec-4f23-af70-d29511b522a4"), // Type: to.Ptr("Microsoft.Sql/servers/databases/importExportOperationResults"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/importExportOperationResults/9d9a794a-5cec-4f23-af70-d29511b522a4"), // Properties: &armsql.ImportExportOperationResultProperties{ // BlobURI: to.Ptr("https://test.blob.core.windows.net/test.bacpac"), // DatabaseName: to.Ptr("testdb"), // LastModifiedTime: to.Ptr("2/2/2020 8:34:47 PM"), // QueuedTime: to.Ptr("2/2/2020 8:33:27 PM"), // RequestID: to.Ptr("9d9a794a-5cec-4f23-af70-d29511b522a4"), // RequestType: to.Ptr("Import"), // ServerName: to.Ptr("testsvr.database.windows.net"), // Status: to.Ptr("Completed"), // }, // } }
Output:
Example (ImportsToAnExistingEmptyDatabaseUsingPrivateLinkToCommunicateWithSqlServerAndStorageAccount) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ImportDatabaseWithNetworkIsolation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabasesClient().BeginImport(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", armsql.ImportExistingDatabaseDefinition{ AdministratorLogin: to.Ptr("login"), AdministratorLoginPassword: to.Ptr("password"), AuthenticationType: to.Ptr("Sql"), NetworkIsolation: &armsql.NetworkIsolationSettings{ SQLServerResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr"), StorageAccountResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Storage/storageAccounts/test-privatelink"), }, StorageKey: to.Ptr("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=="), StorageKeyType: to.Ptr(armsql.StorageKeyTypeStorageAccessKey), StorageURI: to.Ptr("https://test.blob.core.windows.net/test.bacpac"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ImportExportOperationResult = armsql.ImportExportOperationResult{ // Name: to.Ptr("9d9a794a-5cec-4f23-af70-d29511b522a4"), // Type: to.Ptr("Microsoft.Sql/servers/databases/importExportOperationResults"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/importExportOperationResults/9d9a794a-5cec-4f23-af70-d29511b522a4"), // Properties: &armsql.ImportExportOperationResultProperties{ // BlobURI: to.Ptr("https://test.blob.core.windows.net/test.bacpac"), // DatabaseName: to.Ptr("testdb"), // LastModifiedTime: to.Ptr("2/2/2020 8:34:47 PM"), // QueuedTime: to.Ptr("2/2/2020 8:33:27 PM"), // RequestID: to.Ptr("9d9a794a-5cec-4f23-af70-d29511b522a4"), // RequestType: to.Ptr("Import"), // ServerName: to.Ptr("testsvr.database.windows.net"), // Status: to.Ptr("Completed"), // }, // } }
Output:
func (*DatabasesClient) BeginPause ¶
func (client *DatabasesClient) BeginPause(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginPauseOptions) (*runtime.Poller[DatabasesClientPauseResponse], error)
BeginPause - Pauses a database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database to be paused.
- options - DatabasesClientBeginPauseOptions contains the optional parameters for the DatabasesClient.BeginPause method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/PauseDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabasesClient().BeginPause(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdwdb", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Database = armsql.Database{ // Name: to.Ptr("testdwdb"), // Type: to.Ptr("Microsoft.Sql/servers/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdwdb"), // Location: to.Ptr("southeastasia"), // Kind: to.Ptr("v12.0,user,datawarehouse"), // Properties: &armsql.DatabaseProperties{ // CatalogCollation: to.Ptr(armsql.CatalogCollationTypeSQLLatin1GeneralCP1CIAS), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-13T02:04:26.187Z"); return t}()), // CurrentServiceObjectiveName: to.Ptr("D1"), // DatabaseID: to.Ptr("6c764297-577b-470f-9af4-96d3d41e2ba3"), // DefaultSecondaryLocation: to.Ptr("North Europe"), // MaxSizeBytes: to.Ptr[int64](10995116277760), // Status: to.Ptr(armsql.DatabaseStatusPaused), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("DataWarehouse"), // }, // } }
Output:
func (*DatabasesClient) BeginResume ¶
func (client *DatabasesClient) BeginResume(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginResumeOptions) (*runtime.Poller[DatabasesClientResumeResponse], error)
BeginResume - Resumes a database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database to be resumed.
- options - DatabasesClientBeginResumeOptions contains the optional parameters for the DatabasesClient.BeginResume method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResumeDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabasesClient().BeginResume(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdwdb", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Database = armsql.Database{ // Name: to.Ptr("testdwdb"), // Type: to.Ptr("Microsoft.Sql/servers/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdwdb"), // Location: to.Ptr("southeastasia"), // Kind: to.Ptr("v12.0,user,datawarehouse"), // Properties: &armsql.DatabaseProperties{ // CatalogCollation: to.Ptr(armsql.CatalogCollationTypeSQLLatin1GeneralCP1CIAS), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-13T02:04:26.187Z"); return t}()), // CurrentServiceObjectiveName: to.Ptr("D1"), // DatabaseID: to.Ptr("6c764297-577b-470f-9af4-96d3d41e2ba3"), // DefaultSecondaryLocation: to.Ptr("North Europe"), // MaxSizeBytes: to.Ptr[int64](10995116277760), // Status: to.Ptr(armsql.DatabaseStatusOnline), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("DataWarehouse"), // }, // } }
Output:
func (*DatabasesClient) BeginUpdate ¶
func (client *DatabasesClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DatabaseUpdate, options *DatabasesClientBeginUpdateOptions) (*runtime.Poller[DatabasesClientUpdateResponse], error)
BeginUpdate - Updates an existing database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- parameters - The requested database resource state.
- options - DatabasesClientBeginUpdateOptions contains the optional parameters for the DatabasesClient.BeginUpdate method.
Example (AssignsMaintenanceWindowToADatabase) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/PatchVCoreDatabaseAssignMaintenanceConfiguration.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabasesClient().BeginUpdate(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", armsql.DatabaseUpdate{ Properties: &armsql.DatabaseUpdateProperties{ MaintenanceConfigurationID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1"), }, SKU: &armsql.SKU{ Name: to.Ptr("BC_Gen5_4"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Database = armsql.Database{ // Name: to.Ptr("testdb"), // Type: to.Ptr("Microsoft.Sql/servers/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb"), // Location: to.Ptr("southeastasia"), // Kind: to.Ptr("v12.0,user,vcore"), // Properties: &armsql.DatabaseProperties{ // CatalogCollation: to.Ptr(armsql.CatalogCollationTypeSQLLatin1GeneralCP1CIAS), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:41:33.937Z"); return t}()), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // CurrentServiceObjectiveName: to.Ptr("BC_Gen5_2"), // CurrentSKU: &armsql.SKU{ // Name: to.Ptr("BC_Gen5"), // Capacity: to.Ptr[int32](4), // Tier: to.Ptr("BusinessCritical"), // }, // DatabaseID: to.Ptr("6c764297-577b-470f-9af4-96d3d41e2ba3"), // DefaultSecondaryLocation: to.Ptr("North Europe"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:51:33.937Z"); return t}()), // IsInfraEncryptionEnabled: to.Ptr(false), // IsLedgerOn: to.Ptr(false), // LicenseType: to.Ptr(armsql.DatabaseLicenseTypeLicenseIncluded), // MaintenanceConfigurationID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1"), // MaxLogSizeBytes: to.Ptr[int64](104857600), // MaxSizeBytes: to.Ptr[int64](1073741824), // ReadScale: to.Ptr(armsql.DatabaseReadScaleEnabled), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // RequestedServiceObjectiveName: to.Ptr("BC_Gen5_2"), // Status: to.Ptr(armsql.DatabaseStatusOnline), // ZoneRedundant: to.Ptr(false), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("BC_Gen5"), // Capacity: to.Ptr[int32](4), // Tier: to.Ptr("BusinessCritical"), // }, // } }
Output:
Example (ResetsMaintenanceWindowOfADatabaseToDefault) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/PatchVCoreDatabaseResetMaintenanceConfiguration.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabasesClient().BeginUpdate(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", armsql.DatabaseUpdate{ Properties: &armsql.DatabaseUpdateProperties{ MaintenanceConfigurationID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default"), }, SKU: &armsql.SKU{ Name: to.Ptr("BC_Gen5_4"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Database = armsql.Database{ // Name: to.Ptr("testdb"), // Type: to.Ptr("Microsoft.Sql/servers/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb"), // Location: to.Ptr("southeastasia"), // Kind: to.Ptr("v12.0,user,vcore"), // Properties: &armsql.DatabaseProperties{ // CatalogCollation: to.Ptr(armsql.CatalogCollationTypeSQLLatin1GeneralCP1CIAS), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:41:33.937Z"); return t}()), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // CurrentServiceObjectiveName: to.Ptr("BC_Gen5_4"), // CurrentSKU: &armsql.SKU{ // Name: to.Ptr("BC_Gen5"), // Capacity: to.Ptr[int32](4), // Tier: to.Ptr("BusinessCritical"), // }, // DatabaseID: to.Ptr("6c764297-577b-470f-9af4-96d3d41e2ba3"), // DefaultSecondaryLocation: to.Ptr("North Europe"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:51:33.937Z"); return t}()), // IsInfraEncryptionEnabled: to.Ptr(false), // IsLedgerOn: to.Ptr(false), // LicenseType: to.Ptr(armsql.DatabaseLicenseTypeLicenseIncluded), // MaxLogSizeBytes: to.Ptr[int64](104857600), // MaxSizeBytes: to.Ptr[int64](1073741824), // ReadScale: to.Ptr(armsql.DatabaseReadScaleEnabled), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // RequestedServiceObjectiveName: to.Ptr("BC_Gen5_4"), // Status: to.Ptr(armsql.DatabaseStatusOnline), // ZoneRedundant: to.Ptr(false), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("BC_Gen5"), // Capacity: to.Ptr[int32](4), // Tier: to.Ptr("BusinessCritical"), // }, // } }
Output:
Example (UpdatesADatabase) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/PatchVCoreDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabasesClient().BeginUpdate(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", armsql.DatabaseUpdate{ Properties: &armsql.DatabaseUpdateProperties{ LicenseType: to.Ptr(armsql.DatabaseLicenseTypeLicenseIncluded), MaxSizeBytes: to.Ptr[int64](1073741824), }, SKU: &armsql.SKU{ Name: to.Ptr("BC_Gen4_4"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Database = armsql.Database{ // Name: to.Ptr("testdb"), // Type: to.Ptr("Microsoft.Sql/servers/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb"), // Location: to.Ptr("southeastasia"), // Kind: to.Ptr("v12.0,user,vcore"), // Properties: &armsql.DatabaseProperties{ // CatalogCollation: to.Ptr(armsql.CatalogCollationTypeSQLLatin1GeneralCP1CIAS), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:41:33.937Z"); return t}()), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // CurrentServiceObjectiveName: to.Ptr("BC_Gen4_2"), // CurrentSKU: &armsql.SKU{ // Name: to.Ptr("BC_Gen4"), // Capacity: to.Ptr[int32](4), // Tier: to.Ptr("BusinessCritical"), // }, // DatabaseID: to.Ptr("6c764297-577b-470f-9af4-96d3d41e2ba3"), // DefaultSecondaryLocation: to.Ptr("North Europe"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:51:33.937Z"); return t}()), // IsInfraEncryptionEnabled: to.Ptr(false), // IsLedgerOn: to.Ptr(false), // LicenseType: to.Ptr(armsql.DatabaseLicenseTypeLicenseIncluded), // MaxLogSizeBytes: to.Ptr[int64](104857600), // MaxSizeBytes: to.Ptr[int64](1073741824), // ReadScale: to.Ptr(armsql.DatabaseReadScaleEnabled), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyLocal), // RequestedServiceObjectiveName: to.Ptr("BC_Gen4_2"), // Status: to.Ptr(armsql.DatabaseStatusOnline), // ZoneRedundant: to.Ptr(false), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("BC_Gen4"), // Capacity: to.Ptr[int32](4), // Tier: to.Ptr("BusinessCritical"), // }, // } }
Output:
func (*DatabasesClient) BeginUpgradeDataWarehouse ¶
func (client *DatabasesClient) BeginUpgradeDataWarehouse(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginUpgradeDataWarehouseOptions) (*runtime.Poller[DatabasesClientUpgradeDataWarehouseResponse], error)
BeginUpgradeDataWarehouse - Upgrades a data warehouse. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database to be upgraded.
- options - DatabasesClientBeginUpgradeDataWarehouseOptions contains the optional parameters for the DatabasesClient.BeginUpgradeDataWarehouse method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/UpgradeDataWarehouse.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDatabasesClient().BeginUpgradeDataWarehouse(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdwdb", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*DatabasesClient) Get ¶
func (client *DatabasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientGetOptions) (DatabasesClientGetResponse, error)
Get - Gets a database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - DatabasesClientGetOptions contains the optional parameters for the DatabasesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/GetVCoreDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDatabasesClient().Get(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Database = armsql.Database{ // Name: to.Ptr("testdb"), // Type: to.Ptr("Microsoft.Sql/servers/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb"), // Location: to.Ptr("southeastasia"), // Kind: to.Ptr("v12.0,user,vcore"), // Properties: &armsql.DatabaseProperties{ // CatalogCollation: to.Ptr(armsql.CatalogCollationTypeSQLLatin1GeneralCP1CIAS), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:41:33.937Z"); return t}()), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // CurrentServiceObjectiveName: to.Ptr("BC_Gen5_2"), // CurrentSKU: &armsql.SKU{ // Name: to.Ptr("BC_Gen5"), // Capacity: to.Ptr[int32](2), // Tier: to.Ptr("BusinessCritical"), // }, // DatabaseID: to.Ptr("6c764297-577b-470f-9af4-96d3d41e2ba3"), // DefaultSecondaryLocation: to.Ptr("North Europe"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:51:33.937Z"); return t}()), // IsInfraEncryptionEnabled: to.Ptr(false), // IsLedgerOn: to.Ptr(false), // LicenseType: to.Ptr(armsql.DatabaseLicenseTypeLicenseIncluded), // MaintenanceConfigurationID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_SouthEastAsia_1"), // MaxLogSizeBytes: to.Ptr[int64](104857600), // MaxSizeBytes: to.Ptr[int64](268435456000), // ReadScale: to.Ptr(armsql.DatabaseReadScaleEnabled), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // RequestedServiceObjectiveName: to.Ptr("BC_Gen5_2"), // Status: to.Ptr(armsql.DatabaseStatusOnline), // ZoneRedundant: to.Ptr(false), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("BC_Gen5"), // Capacity: to.Ptr[int32](2), // Tier: to.Ptr("BusinessCritical"), // }, // } }
Output:
func (*DatabasesClient) NewListByElasticPoolPager ¶ added in v0.5.0
func (client *DatabasesClient) NewListByElasticPoolPager(resourceGroupName string, serverName string, elasticPoolName string, options *DatabasesClientListByElasticPoolOptions) *runtime.Pager[DatabasesClientListByElasticPoolResponse]
NewListByElasticPoolPager - Gets a list of databases in an elastic pool.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- elasticPoolName - The name of the elastic pool.
- options - DatabasesClientListByElasticPoolOptions contains the optional parameters for the DatabasesClient.NewListByElasticPoolPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ListDatabasesByElasticPool.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDatabasesClient().NewListByElasticPoolPager("Default-SQL-SouthEastAsia", "testsvr", "pool1", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DatabaseListResult = armsql.DatabaseListResult{ // Value: []*armsql.Database{ // { // Name: to.Ptr("DB001"), // Type: to.Ptr("Microsoft.Sql/servers/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/DB001"), // Location: to.Ptr("southeastasia"), // Kind: to.Ptr("v12.0,user"), // Properties: &armsql.DatabaseProperties{ // CatalogCollation: to.Ptr(armsql.CatalogCollationTypeSQLLatin1GeneralCP1CIAS), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-12T22:08:39.163Z"); return t}()), // CurrentServiceObjectiveName: to.Ptr("ElasticPool"), // DatabaseID: to.Ptr("bfe0735f-bc87-447f-b2c2-481f4b100614"), // DefaultSecondaryLocation: to.Ptr("North Europe"), // ElasticPoolID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/elasticPools/Pool1"), // MaxSizeBytes: to.Ptr[int64](268435456000), // Status: to.Ptr(armsql.DatabaseStatusOnline), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("ElasticPool"), // Tier: to.Ptr("Standard"), // }, // }, // { // Name: to.Ptr("DB002"), // Type: to.Ptr("Microsoft.Sql/servers/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/DB002"), // Location: to.Ptr("southeastasia"), // Kind: to.Ptr("v12.0,user"), // Properties: &armsql.DatabaseProperties{ // CatalogCollation: to.Ptr(armsql.CatalogCollationTypeSQLLatin1GeneralCP1CIAS), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-12T22:10:10.773Z"); return t}()), // CurrentServiceObjectiveName: to.Ptr("ElasticPool"), // DatabaseID: to.Ptr("82246152-3177-4357-b81c-a16d87ce3593"), // DefaultSecondaryLocation: to.Ptr("North Europe"), // ElasticPoolID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/elasticPools/Pool1"), // MaxSizeBytes: to.Ptr[int64](268435456000), // Status: to.Ptr(armsql.DatabaseStatusOnline), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("ElasticPool"), // Tier: to.Ptr("Standard"), // }, // }}, // } } }
Output:
func (*DatabasesClient) NewListByServerPager ¶ added in v0.5.0
func (client *DatabasesClient) NewListByServerPager(resourceGroupName string, serverName string, options *DatabasesClientListByServerOptions) *runtime.Pager[DatabasesClientListByServerResponse]
NewListByServerPager - Gets a list of databases.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - DatabasesClientListByServerOptions contains the optional parameters for the DatabasesClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ListVCoreDatabasesByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDatabasesClient().NewListByServerPager("Default-SQL-SouthEastAsia", "testsvr", &armsql.DatabasesClientListByServerOptions{SkipToken: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DatabaseListResult = armsql.DatabaseListResult{ // Value: []*armsql.Database{ // { // Name: to.Ptr("testdb"), // Type: to.Ptr("Microsoft.Sql/servers/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb"), // Location: to.Ptr("southeastasia"), // Kind: to.Ptr("v12.0,user,vcore"), // Properties: &armsql.DatabaseProperties{ // CatalogCollation: to.Ptr(armsql.CatalogCollationTypeSQLLatin1GeneralCP1CIAS), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:41:33.937Z"); return t}()), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyZone), // CurrentServiceObjectiveName: to.Ptr("BC_Gen4_2"), // CurrentSKU: &armsql.SKU{ // Name: to.Ptr("BC_Gen4"), // Capacity: to.Ptr[int32](2), // Tier: to.Ptr("BusinessCritical"), // }, // DatabaseID: to.Ptr("6c764297-577b-470f-9af4-96d3d41e2ba3"), // DefaultSecondaryLocation: to.Ptr("North Europe"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:51:33.937Z"); return t}()), // IsInfraEncryptionEnabled: to.Ptr(false), // IsLedgerOn: to.Ptr(false), // LicenseType: to.Ptr(armsql.DatabaseLicenseTypeLicenseIncluded), // MaxLogSizeBytes: to.Ptr[int64](104857600), // MaxSizeBytes: to.Ptr[int64](268435456000), // ReadScale: to.Ptr(armsql.DatabaseReadScaleEnabled), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyZone), // RequestedServiceObjectiveName: to.Ptr("BC_Gen4_2"), // Status: to.Ptr(armsql.DatabaseStatusOnline), // ZoneRedundant: to.Ptr(false), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("BC_Gen4"), // Capacity: to.Ptr[int32](2), // Tier: to.Ptr("BusinessCritical"), // }, // }, // { // Name: to.Ptr("master"), // Type: to.Ptr("Microsoft.Sql/servers/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/master"), // Location: to.Ptr("southeastasia"), // Kind: to.Ptr("v12.0,system"), // Properties: &armsql.DatabaseProperties{ // CatalogCollation: to.Ptr(armsql.CatalogCollationTypeSQLLatin1GeneralCP1CIAS), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:23:42.537Z"); return t}()), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyLocal), // CurrentServiceObjectiveName: to.Ptr("System0"), // CurrentSKU: &armsql.SKU{ // Name: to.Ptr("System0"), // Capacity: to.Ptr[int32](0), // Tier: to.Ptr("System"), // }, // DatabaseID: to.Ptr("e6be351f-2cc9-4604-9e52-b0b28b2710b0"), // DefaultSecondaryLocation: to.Ptr("North Europe"), // IsInfraEncryptionEnabled: to.Ptr(false), // IsLedgerOn: to.Ptr(false), // MaxSizeBytes: to.Ptr[int64](32212254720), // ReadScale: to.Ptr(armsql.DatabaseReadScaleDisabled), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyLocal), // RequestedServiceObjectiveName: to.Ptr("System0"), // Status: to.Ptr(armsql.DatabaseStatusOnline), // ZoneRedundant: to.Ptr(false), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("System0"), // Capacity: to.Ptr[int32](0), // Tier: to.Ptr("System"), // }, // }}, // } } }
Output:
func (*DatabasesClient) NewListInaccessibleByServerPager ¶ added in v0.5.0
func (client *DatabasesClient) NewListInaccessibleByServerPager(resourceGroupName string, serverName string, options *DatabasesClientListInaccessibleByServerOptions) *runtime.Pager[DatabasesClientListInaccessibleByServerResponse]
NewListInaccessibleByServerPager - Gets a list of inaccessible databases in a logical server
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - DatabasesClientListInaccessibleByServerOptions contains the optional parameters for the DatabasesClient.NewListInaccessibleByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ListVCoreInaccessibleDatabasesByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDatabasesClient().NewListInaccessibleByServerPager("Default-SQL-SouthEastAsia", "testsvr", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DatabaseListResult = armsql.DatabaseListResult{ // Value: []*armsql.Database{ // { // Name: to.Ptr("testdb"), // Type: to.Ptr("Microsoft.Sql/servers/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb"), // Location: to.Ptr("southeastasia"), // Kind: to.Ptr("v12.0,user,vcore"), // Properties: &armsql.DatabaseProperties{ // CatalogCollation: to.Ptr(armsql.CatalogCollationTypeSQLLatin1GeneralCP1CIAS), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:41:33.937Z"); return t}()), // CurrentServiceObjectiveName: to.Ptr("BC_Gen4_2"), // DatabaseID: to.Ptr("6c764297-577b-470f-9af4-96d3d41e2ba3"), // DefaultSecondaryLocation: to.Ptr("North Europe"), // LicenseType: to.Ptr(armsql.DatabaseLicenseTypeLicenseIncluded), // MaxLogSizeBytes: to.Ptr[int64](104857600), // MaxSizeBytes: to.Ptr[int64](268435456000), // ReadScale: to.Ptr(armsql.DatabaseReadScaleEnabled), // Status: to.Ptr(armsql.DatabaseStatusInaccessible), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("BC_Gen4"), // Capacity: to.Ptr[int32](2), // Tier: to.Ptr("BusinessCritical"), // }, // }}, // } } }
Output:
func (*DatabasesClient) NewListMetricDefinitionsPager ¶ added in v0.5.0
func (client *DatabasesClient) NewListMetricDefinitionsPager(resourceGroupName string, serverName string, databaseName string, options *DatabasesClientListMetricDefinitionsOptions) *runtime.Pager[DatabasesClientListMetricDefinitionsResponse]
NewListMetricDefinitionsPager - Returns database metric definitions.
Generated from API version 2014-04-01
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - DatabasesClientListMetricDefinitionsOptions contains the optional parameters for the DatabasesClient.NewListMetricDefinitionsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DatabaseMetricsDefinitionsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDatabasesClient().NewListMetricDefinitionsPager("sqlcrudtest-6730", "sqlcrudtest-9007", "3481", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.MetricDefinitionListResult = armsql.MetricDefinitionListResult{ // Value: []*armsql.MetricDefinition{ // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("CPU percentage"), // Value: to.Ptr("cpu_percent"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("PT1H"), // TimeGrain: to.Ptr("PT15S"), // }, // { // Retention: to.Ptr("PT1H"), // TimeGrain: to.Ptr("PT60S"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeAverage), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypePercent), // }, // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("Data IO percentage"), // Value: to.Ptr("physical_data_read_percent"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("PT1H"), // TimeGrain: to.Ptr("PT15S"), // }, // { // Retention: to.Ptr("PT1H"), // TimeGrain: to.Ptr("PT60S"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeAverage), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypePercent), // }, // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("Log IO percentage"), // Value: to.Ptr("log_write_percent"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("PT1H"), // TimeGrain: to.Ptr("PT15S"), // }, // { // Retention: to.Ptr("PT1H"), // TimeGrain: to.Ptr("PT60S"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeAverage), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypePercent), // }, // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("DTU percentage"), // Value: to.Ptr("dtu_consumption_percent"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("PT1H"), // TimeGrain: to.Ptr("PT15S"), // }, // { // Retention: to.Ptr("PT1H"), // TimeGrain: to.Ptr("PT60S"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeAverage), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypePercent), // }, // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("Total database size"), // Value: to.Ptr("storage"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeMaximum), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypeBytes), // }, // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("In-Memory OLTP storage percent"), // Value: to.Ptr("xtp_storage_percent"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("PT1H"), // TimeGrain: to.Ptr("PT15S"), // }, // { // Retention: to.Ptr("PT1H"), // TimeGrain: to.Ptr("PT60S"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeAverage), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypePercent), // }, // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("Workers percentage"), // Value: to.Ptr("workers_percent"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeAverage), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypePercent), // }, // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("Sessions percentage"), // Value: to.Ptr("sessions_percent"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeAverage), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypePercent), // }, // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("DTU limit"), // Value: to.Ptr("dtu_limit"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeAverage), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypeCount), // }, // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("DTU used"), // Value: to.Ptr("dtu_used"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeAverage), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypeCount), // }, // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("Successful Connections"), // Value: to.Ptr("connection_successful"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeTotal), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypeCount), // }, // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("Failed Connections"), // Value: to.Ptr("connection_failed"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeTotal), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypeCount), // }, // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("Blocked by Firewall"), // Value: to.Ptr("blocked_by_firewall"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeTotal), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypeCount), // }, // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("Deadlocks"), // Value: to.Ptr("deadlock"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeTotal), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypeCount), // }, // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("Database size percentage"), // Value: to.Ptr("storage_percent"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeMaximum), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypePercent), // }}, // } } }
Output:
func (*DatabasesClient) NewListMetricsPager ¶ added in v0.5.0
func (client *DatabasesClient) NewListMetricsPager(resourceGroupName string, serverName string, databaseName string, filter string, options *DatabasesClientListMetricsOptions) *runtime.Pager[DatabasesClientListMetricsResponse]
NewListMetricsPager - Returns database metrics.
Generated from API version 2014-04-01
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- filter - An OData filter expression that describes a subset of metrics to return.
- options - DatabasesClientListMetricsOptions contains the optional parameters for the DatabasesClient.NewListMetricsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DatabaseMetricsListWithFilter.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDatabasesClient().NewListMetricsPager("sqlcrudtest-6730", "sqlcrudtest-9007", "3481", "name/value eq 'cpu_percent' and timeGrain eq '00:10:00' and startTime eq '2017-06-02T18:35:00Z' and endTime eq '2017-06-02T18:55:00Z'", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.MetricListResult = armsql.MetricListResult{ // Value: []*armsql.Metric{ // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("CPU percentage"), // Value: to.Ptr("cpu_percent"), // }, // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-02T18:55:00.000Z"); return t}()), // MetricValues: []*armsql.MetricValue{ // { // Average: to.Ptr[float64](0), // Count: to.Ptr[int32](1), // Maximum: to.Ptr[float64](0), // Minimum: to.Ptr[float64](0), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-02T18:30:01.000Z"); return t}()), // Total: to.Ptr[float64](0), // }, // { // Average: to.Ptr[float64](0), // Count: to.Ptr[int32](1), // Maximum: to.Ptr[float64](0), // Minimum: to.Ptr[float64](0), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-02T18:40:01.000Z"); return t}()), // Total: to.Ptr[float64](0), // }, // { // Average: to.Ptr[float64](0), // Count: to.Ptr[int32](1), // Maximum: to.Ptr[float64](0), // Minimum: to.Ptr[float64](0), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-02T18:50:01.000Z"); return t}()), // Total: to.Ptr[float64](0), // }}, // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-02T18:35:00.000Z"); return t}()), // TimeGrain: to.Ptr("00:10:00"), // Unit: to.Ptr(armsql.UnitTypePercent), // }}, // } } }
Output:
func (*DatabasesClient) Rename ¶
func (client *DatabasesClient) Rename(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ResourceMoveDefinition, options *DatabasesClientRenameOptions) (DatabasesClientRenameResponse, error)
Rename - Renames a database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database to rename.
- parameters - The resource move definition for renaming this database.
- options - DatabasesClientRenameOptions contains the optional parameters for the DatabasesClient.Rename method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/RenameDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewDatabasesClient().Rename(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", armsql.ResourceMoveDefinition{ ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/newtestdb"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
type DatabasesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type DatabasesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabasesClient.BeginCreateOrUpdate method.
type DatabasesClientBeginDeleteOptions ¶ added in v0.3.0
type DatabasesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginDeleteOptions contains the optional parameters for the DatabasesClient.BeginDelete method.
type DatabasesClientBeginExportOptions ¶ added in v0.3.0
type DatabasesClientBeginExportOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginExportOptions contains the optional parameters for the DatabasesClient.BeginExport method.
type DatabasesClientBeginFailoverOptions ¶ added in v0.3.0
type DatabasesClientBeginFailoverOptions struct { // The type of replica to be failed over. ReplicaType *ReplicaType // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginFailoverOptions contains the optional parameters for the DatabasesClient.BeginFailover method.
type DatabasesClientBeginImportOptions ¶ added in v0.3.0
type DatabasesClientBeginImportOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginImportOptions contains the optional parameters for the DatabasesClient.BeginImport method.
type DatabasesClientBeginPauseOptions ¶ added in v0.3.0
type DatabasesClientBeginPauseOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginPauseOptions contains the optional parameters for the DatabasesClient.BeginPause method.
type DatabasesClientBeginResumeOptions ¶ added in v0.3.0
type DatabasesClientBeginResumeOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginResumeOptions contains the optional parameters for the DatabasesClient.BeginResume method.
type DatabasesClientBeginUpdateOptions ¶ added in v0.3.0
type DatabasesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginUpdateOptions contains the optional parameters for the DatabasesClient.BeginUpdate method.
type DatabasesClientBeginUpgradeDataWarehouseOptions ¶ added in v0.3.0
type DatabasesClientBeginUpgradeDataWarehouseOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginUpgradeDataWarehouseOptions contains the optional parameters for the DatabasesClient.BeginUpgradeDataWarehouse method.
type DatabasesClientCreateOrUpdateResponse ¶ added in v0.3.0
type DatabasesClientCreateOrUpdateResponse struct { // A database resource. Database }
DatabasesClientCreateOrUpdateResponse contains the response from method DatabasesClient.BeginCreateOrUpdate.
type DatabasesClientDeleteResponse ¶ added in v0.3.0
type DatabasesClientDeleteResponse struct { }
DatabasesClientDeleteResponse contains the response from method DatabasesClient.BeginDelete.
type DatabasesClientExportResponse ¶ added in v0.3.0
type DatabasesClientExportResponse struct { // An ImportExport operation result resource. ImportExportOperationResult }
DatabasesClientExportResponse contains the response from method DatabasesClient.BeginExport.
type DatabasesClientFailoverResponse ¶ added in v0.3.0
type DatabasesClientFailoverResponse struct { }
DatabasesClientFailoverResponse contains the response from method DatabasesClient.BeginFailover.
type DatabasesClientGetOptions ¶ added in v0.3.0
type DatabasesClientGetOptions struct { }
DatabasesClientGetOptions contains the optional parameters for the DatabasesClient.Get method.
type DatabasesClientGetResponse ¶ added in v0.3.0
type DatabasesClientGetResponse struct { // A database resource. Database }
DatabasesClientGetResponse contains the response from method DatabasesClient.Get.
type DatabasesClientImportResponse ¶ added in v0.3.0
type DatabasesClientImportResponse struct { // An ImportExport operation result resource. ImportExportOperationResult }
DatabasesClientImportResponse contains the response from method DatabasesClient.BeginImport.
type DatabasesClientListByElasticPoolOptions ¶ added in v0.3.0
type DatabasesClientListByElasticPoolOptions struct { }
DatabasesClientListByElasticPoolOptions contains the optional parameters for the DatabasesClient.NewListByElasticPoolPager method.
type DatabasesClientListByElasticPoolResponse ¶ added in v0.3.0
type DatabasesClientListByElasticPoolResponse struct { // A list of databases. DatabaseListResult }
DatabasesClientListByElasticPoolResponse contains the response from method DatabasesClient.NewListByElasticPoolPager.
type DatabasesClientListByServerOptions ¶ added in v0.3.0
type DatabasesClientListByServerOptions struct {
SkipToken *string
}
DatabasesClientListByServerOptions contains the optional parameters for the DatabasesClient.NewListByServerPager method.
type DatabasesClientListByServerResponse ¶ added in v0.3.0
type DatabasesClientListByServerResponse struct { // A list of databases. DatabaseListResult }
DatabasesClientListByServerResponse contains the response from method DatabasesClient.NewListByServerPager.
type DatabasesClientListInaccessibleByServerOptions ¶ added in v0.3.0
type DatabasesClientListInaccessibleByServerOptions struct { }
DatabasesClientListInaccessibleByServerOptions contains the optional parameters for the DatabasesClient.NewListInaccessibleByServerPager method.
type DatabasesClientListInaccessibleByServerResponse ¶ added in v0.3.0
type DatabasesClientListInaccessibleByServerResponse struct { // A list of databases. DatabaseListResult }
DatabasesClientListInaccessibleByServerResponse contains the response from method DatabasesClient.NewListInaccessibleByServerPager.
type DatabasesClientListMetricDefinitionsOptions ¶ added in v0.3.0
type DatabasesClientListMetricDefinitionsOptions struct { }
DatabasesClientListMetricDefinitionsOptions contains the optional parameters for the DatabasesClient.NewListMetricDefinitionsPager method.
type DatabasesClientListMetricDefinitionsResponse ¶ added in v0.3.0
type DatabasesClientListMetricDefinitionsResponse struct { // The response to a list database metric definitions request. MetricDefinitionListResult }
DatabasesClientListMetricDefinitionsResponse contains the response from method DatabasesClient.NewListMetricDefinitionsPager.
type DatabasesClientListMetricsOptions ¶ added in v0.3.0
type DatabasesClientListMetricsOptions struct { }
DatabasesClientListMetricsOptions contains the optional parameters for the DatabasesClient.NewListMetricsPager method.
type DatabasesClientListMetricsResponse ¶ added in v0.3.0
type DatabasesClientListMetricsResponse struct { // The response to a list database metrics request. MetricListResult }
DatabasesClientListMetricsResponse contains the response from method DatabasesClient.NewListMetricsPager.
type DatabasesClientPauseResponse ¶ added in v0.3.0
type DatabasesClientPauseResponse struct { // A database resource. Database }
DatabasesClientPauseResponse contains the response from method DatabasesClient.BeginPause.
type DatabasesClientRenameOptions ¶ added in v0.3.0
type DatabasesClientRenameOptions struct { }
DatabasesClientRenameOptions contains the optional parameters for the DatabasesClient.Rename method.
type DatabasesClientRenameResponse ¶ added in v0.3.0
type DatabasesClientRenameResponse struct { }
DatabasesClientRenameResponse contains the response from method DatabasesClient.Rename.
type DatabasesClientResumeResponse ¶ added in v0.3.0
type DatabasesClientResumeResponse struct { // A database resource. Database }
DatabasesClientResumeResponse contains the response from method DatabasesClient.BeginResume.
type DatabasesClientUpdateResponse ¶ added in v0.3.0
type DatabasesClientUpdateResponse struct { // A database resource. Database }
DatabasesClientUpdateResponse contains the response from method DatabasesClient.BeginUpdate.
type DatabasesClientUpgradeDataWarehouseResponse ¶ added in v0.3.0
type DatabasesClientUpgradeDataWarehouseResponse struct { }
DatabasesClientUpgradeDataWarehouseResponse contains the response from method DatabasesClient.BeginUpgradeDataWarehouse.
type DayOfWeek ¶
type DayOfWeek string
DayOfWeek - Day of maintenance window.
func PossibleDayOfWeekValues ¶
func PossibleDayOfWeekValues() []DayOfWeek
PossibleDayOfWeekValues returns the possible values for the DayOfWeek const type.
type DeletedServer ¶
type DeletedServer struct { // Resource properties. Properties *DeletedServerProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
DeletedServer - A deleted server.
func (DeletedServer) MarshalJSON ¶
func (d DeletedServer) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeletedServer.
func (*DeletedServer) UnmarshalJSON ¶ added in v1.1.0
func (d *DeletedServer) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeletedServer.
type DeletedServerListResult ¶
type DeletedServerListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*DeletedServer }
DeletedServerListResult - A list of deleted servers.
func (DeletedServerListResult) MarshalJSON ¶
func (d DeletedServerListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeletedServerListResult.
func (*DeletedServerListResult) UnmarshalJSON ¶ added in v1.1.0
func (d *DeletedServerListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeletedServerListResult.
type DeletedServerProperties ¶
type DeletedServerProperties struct { // READ-ONLY; The deletion time of the deleted server. DeletionTime *time.Time // READ-ONLY; The fully qualified domain name of the server. FullyQualifiedDomainName *string // READ-ONLY; The original ID of the server before deletion. OriginalID *string // READ-ONLY; The version of the deleted server. Version *string }
DeletedServerProperties - The properties of a deleted server.
func (DeletedServerProperties) MarshalJSON ¶
func (d DeletedServerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeletedServerProperties.
func (*DeletedServerProperties) UnmarshalJSON ¶
func (d *DeletedServerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DeletedServerProperties.
type DeletedServersClient ¶
type DeletedServersClient struct {
// contains filtered or unexported fields
}
DeletedServersClient contains the methods for the DeletedServers group. Don't use this type directly, use NewDeletedServersClient() instead.
func NewDeletedServersClient ¶
func NewDeletedServersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DeletedServersClient, error)
NewDeletedServersClient creates a new instance of DeletedServersClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DeletedServersClient) BeginRecover ¶
func (client *DeletedServersClient) BeginRecover(ctx context.Context, locationName string, deletedServerName string, options *DeletedServersClientBeginRecoverOptions) (*runtime.Poller[DeletedServersClientRecoverResponse], error)
BeginRecover - Recovers a deleted server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- locationName - The name of the region where the resource is located.
- deletedServerName - The name of the deleted server.
- options - DeletedServersClientBeginRecoverOptions contains the optional parameters for the DeletedServersClient.BeginRecover method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeletedServerRecover.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDeletedServersClient().BeginRecover(ctx, "japaneast", "sqlcrudtest-d-1414", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DeletedServer = armsql.DeletedServer{ // Name: to.Ptr("sqlcrudtest-d-1414"), // Type: to.Ptr("Microsoft.Sql/deletedServers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/deletedServers/sqlcrudtest-d-1414"), // Properties: &armsql.DeletedServerProperties{ // DeletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-15T11:20:00.345Z"); return t}()), // FullyQualifiedDomainName: to.Ptr("sqlcrudtest-d-1414.database.windows.net"), // OriginalID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sqlcrudtest-d-1414"), // Version: to.Ptr("12.0"), // }, // } }
Output:
func (*DeletedServersClient) Get ¶
func (client *DeletedServersClient) Get(ctx context.Context, locationName string, deletedServerName string, options *DeletedServersClientGetOptions) (DeletedServersClientGetResponse, error)
Get - Gets a deleted server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- locationName - The name of the region where the resource is located.
- deletedServerName - The name of the deleted server.
- options - DeletedServersClientGetOptions contains the optional parameters for the DeletedServersClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeletedServerGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDeletedServersClient().Get(ctx, "japaneast", "sqlcrudtest-d-1414", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DeletedServer = armsql.DeletedServer{ // Name: to.Ptr("sqlcrudtest-d-1414"), // Type: to.Ptr("Microsoft.Sql/deletedServers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/deletedServers/sqlcrudtest-d-1414"), // Properties: &armsql.DeletedServerProperties{ // DeletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-15T11:20:00.345Z"); return t}()), // FullyQualifiedDomainName: to.Ptr("sqlcrudtest-d-1414.database.windows.net"), // OriginalID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sqlcrudtest-d-1414"), // Version: to.Ptr("12.0"), // }, // } }
Output:
func (*DeletedServersClient) NewListByLocationPager ¶ added in v0.5.0
func (client *DeletedServersClient) NewListByLocationPager(locationName string, options *DeletedServersClientListByLocationOptions) *runtime.Pager[DeletedServersClientListByLocationResponse]
NewListByLocationPager - Gets a list of deleted servers for a location.
Generated from API version 2020-11-01-preview
- locationName - The name of the region where the resource is located.
- options - DeletedServersClientListByLocationOptions contains the optional parameters for the DeletedServersClient.NewListByLocationPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeletedServerList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDeletedServersClient().NewListByLocationPager("japaneast", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DeletedServerListResult = armsql.DeletedServerListResult{ // Value: []*armsql.DeletedServer{ // { // Name: to.Ptr("sqlcrudtest-d-1414"), // Type: to.Ptr("Microsoft.Sql/deletedServers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/deletedServers/sqlcrudtest-d-1414"), // Properties: &armsql.DeletedServerProperties{ // DeletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-15T20:20:00.345Z"); return t}()), // FullyQualifiedDomainName: to.Ptr("sqlcrudtest-d-1414.database.windows.net"), // OriginalID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sqlcrudtest-d-1414"), // Version: to.Ptr("12.0"), // }, // }, // { // Name: to.Ptr("sqlcrudtest-d-2424"), // Type: to.Ptr("Microsoft.Sql/deletedServers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/deletedServers/sqlcrudtest-d-2424"), // Properties: &armsql.DeletedServerProperties{ // DeletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-13T10:10:00.678Z"); return t}()), // FullyQualifiedDomainName: to.Ptr("sqlcrudtest-d-2424.database.windows.net"), // OriginalID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sqlcrudtest-d-2424"), // Version: to.Ptr("12.0"), // }, // }}, // } } }
Output:
func (*DeletedServersClient) NewListPager ¶ added in v0.5.0
func (client *DeletedServersClient) NewListPager(options *DeletedServersClientListOptions) *runtime.Pager[DeletedServersClientListResponse]
NewListPager - Gets a list of all deleted servers in a subscription.
Generated from API version 2020-11-01-preview
- options - DeletedServersClientListOptions contains the optional parameters for the DeletedServersClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeletedServerListBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDeletedServersClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DeletedServerListResult = armsql.DeletedServerListResult{ // Value: []*armsql.DeletedServer{ // { // Name: to.Ptr("sqlcrudtest-d-1414"), // Type: to.Ptr("Microsoft.Sql/deletedServers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/deletedServers/sqlcrudtest-d-1414"), // Properties: &armsql.DeletedServerProperties{ // DeletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-15T20:20:00.345Z"); return t}()), // FullyQualifiedDomainName: to.Ptr("sqlcrudtest-d-1414.database.windows.net"), // OriginalID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sqlcrudtest-d-1414"), // Version: to.Ptr("12.0"), // }, // }, // { // Name: to.Ptr("sqlcrudtest-d-2424"), // Type: to.Ptr("Microsoft.Sql/deletedServers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/deletedServers/sqlcrudtest-d-2424"), // Properties: &armsql.DeletedServerProperties{ // DeletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-13T10:10:00.678Z"); return t}()), // FullyQualifiedDomainName: to.Ptr("sqlcrudtest-d-2424.database.windows.net"), // OriginalID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sqlcrudtest-d-2424"), // Version: to.Ptr("12.0"), // }, // }}, // } } }
Output:
type DeletedServersClientBeginRecoverOptions ¶ added in v0.3.0
type DeletedServersClientBeginRecoverOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DeletedServersClientBeginRecoverOptions contains the optional parameters for the DeletedServersClient.BeginRecover method.
type DeletedServersClientGetOptions ¶ added in v0.3.0
type DeletedServersClientGetOptions struct { }
DeletedServersClientGetOptions contains the optional parameters for the DeletedServersClient.Get method.
type DeletedServersClientGetResponse ¶ added in v0.3.0
type DeletedServersClientGetResponse struct { // A deleted server. DeletedServer }
DeletedServersClientGetResponse contains the response from method DeletedServersClient.Get.
type DeletedServersClientListByLocationOptions ¶ added in v0.3.0
type DeletedServersClientListByLocationOptions struct { }
DeletedServersClientListByLocationOptions contains the optional parameters for the DeletedServersClient.NewListByLocationPager method.
type DeletedServersClientListByLocationResponse ¶ added in v0.3.0
type DeletedServersClientListByLocationResponse struct { // A list of deleted servers. DeletedServerListResult }
DeletedServersClientListByLocationResponse contains the response from method DeletedServersClient.NewListByLocationPager.
type DeletedServersClientListOptions ¶ added in v0.3.0
type DeletedServersClientListOptions struct { }
DeletedServersClientListOptions contains the optional parameters for the DeletedServersClient.NewListPager method.
type DeletedServersClientListResponse ¶ added in v0.3.0
type DeletedServersClientListResponse struct { // A list of deleted servers. DeletedServerListResult }
DeletedServersClientListResponse contains the response from method DeletedServersClient.NewListPager.
type DeletedServersClientRecoverResponse ¶ added in v0.3.0
type DeletedServersClientRecoverResponse struct { // A deleted server. DeletedServer }
DeletedServersClientRecoverResponse contains the response from method DeletedServersClient.BeginRecover.
type DiffBackupIntervalInHours ¶
type DiffBackupIntervalInHours int32
DiffBackupIntervalInHours - The differential backup interval in hours. This is how many interval hours between each differential backup will be supported. This is only applicable to live databases but not dropped databases.
const ( DiffBackupIntervalInHoursTwelve DiffBackupIntervalInHours = 12 DiffBackupIntervalInHoursTwentyFour DiffBackupIntervalInHours = 24 )
func PossibleDiffBackupIntervalInHoursValues ¶
func PossibleDiffBackupIntervalInHoursValues() []DiffBackupIntervalInHours
PossibleDiffBackupIntervalInHoursValues returns the possible values for the DiffBackupIntervalInHours const type.
type DistributedAvailabilityGroup ¶ added in v0.4.0
type DistributedAvailabilityGroup struct { // Resource properties. Properties *DistributedAvailabilityGroupProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
DistributedAvailabilityGroup - Distributed availability group between box and Sql Managed Instance.
func (DistributedAvailabilityGroup) MarshalJSON ¶ added in v0.4.0
func (d DistributedAvailabilityGroup) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DistributedAvailabilityGroup.
func (*DistributedAvailabilityGroup) UnmarshalJSON ¶ added in v1.1.0
func (d *DistributedAvailabilityGroup) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DistributedAvailabilityGroup.
type DistributedAvailabilityGroupProperties ¶ added in v0.4.0
type DistributedAvailabilityGroupProperties struct { // The primary availability group name PrimaryAvailabilityGroupName *string // The replication mode of a distributed availability group. Parameter will be ignored during link creation. ReplicationMode *ReplicationMode // The secondary availability group name SecondaryAvailabilityGroupName *string // The source endpoint SourceEndpoint *string // The name of the target database TargetDatabase *string // READ-ONLY; The distributed availability group id DistributedAvailabilityGroupID *string // READ-ONLY; The last hardened lsn LastHardenedLsn *string // READ-ONLY; The link state LinkState *string // READ-ONLY; The source replica id SourceReplicaID *string // READ-ONLY; The target replica id TargetReplicaID *string }
DistributedAvailabilityGroupProperties - The properties of a distributed availability group.
func (DistributedAvailabilityGroupProperties) MarshalJSON ¶ added in v1.1.0
func (d DistributedAvailabilityGroupProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DistributedAvailabilityGroupProperties.
func (*DistributedAvailabilityGroupProperties) UnmarshalJSON ¶ added in v1.1.0
func (d *DistributedAvailabilityGroupProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DistributedAvailabilityGroupProperties.
type DistributedAvailabilityGroupsClient ¶ added in v0.4.0
type DistributedAvailabilityGroupsClient struct {
// contains filtered or unexported fields
}
DistributedAvailabilityGroupsClient contains the methods for the DistributedAvailabilityGroups group. Don't use this type directly, use NewDistributedAvailabilityGroupsClient() instead.
func NewDistributedAvailabilityGroupsClient ¶ added in v0.4.0
func NewDistributedAvailabilityGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DistributedAvailabilityGroupsClient, error)
NewDistributedAvailabilityGroupsClient creates a new instance of DistributedAvailabilityGroupsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DistributedAvailabilityGroupsClient) BeginCreateOrUpdate ¶ added in v0.4.0
func (client *DistributedAvailabilityGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, distributedAvailabilityGroupName string, parameters DistributedAvailabilityGroup, options *DistributedAvailabilityGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DistributedAvailabilityGroupsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates a distributed availability group between Sql On-Prem and Sql Managed Instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- distributedAvailabilityGroupName - The distributed availability group name.
- parameters - The distributed availability group info.
- options - DistributedAvailabilityGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DistributedAvailabilityGroupsCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDistributedAvailabilityGroupsClient().BeginCreateOrUpdate(ctx, "testrg", "testcl", "dag", armsql.DistributedAvailabilityGroup{ Properties: &armsql.DistributedAvailabilityGroupProperties{ PrimaryAvailabilityGroupName: to.Ptr("BoxLocalAg1"), SecondaryAvailabilityGroupName: to.Ptr("testcl"), SourceEndpoint: to.Ptr("TCP://SERVER:7022"), TargetDatabase: to.Ptr("testdb"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DistributedAvailabilityGroup = armsql.DistributedAvailabilityGroup{ // Name: to.Ptr("dag"), // Type: to.Ptr("Microsoft.Sql/managedInstances/distributedAvailabilityGroups"), // ID: to.Ptr("/subscriptions/f2669dff-5f08-45dd-b857-b2a60b72cdc9/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/distributedAvailabilityGroups/dag"), // Properties: &armsql.DistributedAvailabilityGroupProperties{ // PrimaryAvailabilityGroupName: to.Ptr("BoxLocalAg1"), // SecondaryAvailabilityGroupName: to.Ptr("testcl"), // SourceEndpoint: to.Ptr("TCP://SERVER:7022"), // TargetDatabase: to.Ptr("testdb"), // }, // } }
Output:
func (*DistributedAvailabilityGroupsClient) BeginDelete ¶ added in v0.4.0
func (client *DistributedAvailabilityGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, distributedAvailabilityGroupName string, options *DistributedAvailabilityGroupsClientBeginDeleteOptions) (*runtime.Poller[DistributedAvailabilityGroupsClientDeleteResponse], error)
BeginDelete - Drops a distributed availability group between Sql On-Prem and Sql Managed Instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- distributedAvailabilityGroupName - The distributed availability group name.
- options - DistributedAvailabilityGroupsClientBeginDeleteOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DistributedAvailabilityGroupsDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDistributedAvailabilityGroupsClient().BeginDelete(ctx, "testrg", "testcl", "dag", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*DistributedAvailabilityGroupsClient) BeginUpdate ¶ added in v0.4.0
func (client *DistributedAvailabilityGroupsClient) BeginUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, distributedAvailabilityGroupName string, parameters DistributedAvailabilityGroup, options *DistributedAvailabilityGroupsClientBeginUpdateOptions) (*runtime.Poller[DistributedAvailabilityGroupsClientUpdateResponse], error)
BeginUpdate - Updates a distributed availability group replication mode. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- distributedAvailabilityGroupName - The distributed availability group name.
- parameters - The distributed availability group info.
- options - DistributedAvailabilityGroupsClientBeginUpdateOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DistributedAvailabilityGroupsUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDistributedAvailabilityGroupsClient().BeginUpdate(ctx, "testrg", "testcl", "dag", armsql.DistributedAvailabilityGroup{ Properties: &armsql.DistributedAvailabilityGroupProperties{ ReplicationMode: to.Ptr(armsql.ReplicationModeSync), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DistributedAvailabilityGroup = armsql.DistributedAvailabilityGroup{ // Name: to.Ptr("dag"), // Type: to.Ptr("Microsoft.Sql/managedInstances/distributedAvailabilityGroups"), // ID: to.Ptr("/subscriptions/f2669dff-5f08-45dd-b857-b2a60b72cdc9/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/distributedAvailabilityGroups/dag"), // Properties: &armsql.DistributedAvailabilityGroupProperties{ // ReplicationMode: to.Ptr(armsql.ReplicationModeSync), // }, // } }
Output:
func (*DistributedAvailabilityGroupsClient) Get ¶ added in v0.4.0
func (client *DistributedAvailabilityGroupsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, distributedAvailabilityGroupName string, options *DistributedAvailabilityGroupsClientGetOptions) (DistributedAvailabilityGroupsClientGetResponse, error)
Get - Gets a distributed availability group info. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- distributedAvailabilityGroupName - The distributed availability group name.
- options - DistributedAvailabilityGroupsClientGetOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DistributedAvailabilityGroupsGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDistributedAvailabilityGroupsClient().Get(ctx, "testrg", "testcl", "dag", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DistributedAvailabilityGroup = armsql.DistributedAvailabilityGroup{ // Name: to.Ptr("dag"), // Type: to.Ptr("Microsoft.Sql/managedInstances/distributedAvailabilityGroups"), // ID: to.Ptr("/subscriptions/f2669dff-5f08-45dd-b857-b2a60b72cdc9/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/distributedAvailabilityGroups/dag"), // Properties: &armsql.DistributedAvailabilityGroupProperties{ // DistributedAvailabilityGroupID: to.Ptr("6bc05a51-aa36-a196-09bd-481d7a0973c0"), // LastHardenedLsn: to.Ptr("39000000030400001"), // LinkState: to.Ptr("Catchup"), // ReplicationMode: to.Ptr(armsql.ReplicationModeAsync), // SourceEndpoint: to.Ptr("TCP://SERVER:7022"), // SourceReplicaID: to.Ptr("543dd519-7585-faff-6ad2-11fb826d4f4d"), // TargetDatabase: to.Ptr("testdb"), // TargetReplicaID: to.Ptr("7e218aba-0a53-6231-be09-895d99f96bf2"), // }, // } }
Output:
func (*DistributedAvailabilityGroupsClient) NewListByInstancePager ¶ added in v0.5.0
func (client *DistributedAvailabilityGroupsClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, options *DistributedAvailabilityGroupsClientListByInstanceOptions) *runtime.Pager[DistributedAvailabilityGroupsClientListByInstanceResponse]
NewListByInstancePager - Gets a list of a distributed availability groups in instance.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - DistributedAvailabilityGroupsClientListByInstanceOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.NewListByInstancePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DistributedAvailabilityGroupsListByInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDistributedAvailabilityGroupsClient().NewListByInstancePager("testrg", "testcl", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DistributedAvailabilityGroupsListResult = armsql.DistributedAvailabilityGroupsListResult{ // Value: []*armsql.DistributedAvailabilityGroup{ // { // Name: to.Ptr("dag"), // Type: to.Ptr("Microsoft.Sql/managedInstances/distributedAvailabilityGroups"), // ID: to.Ptr("/subscriptions/f2669dff-5f08-45dd-b857-b2a60b72cdc9/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/distributedAvailabilityGroups/dag"), // Properties: &armsql.DistributedAvailabilityGroupProperties{ // DistributedAvailabilityGroupID: to.Ptr("6bc05a51-aa36-a196-09bd-481d7a0973c0"), // LastHardenedLsn: to.Ptr("39000000030400001"), // LinkState: to.Ptr("Catchup"), // ReplicationMode: to.Ptr(armsql.ReplicationModeAsync), // SourceEndpoint: to.Ptr("TCP://SERVER:7022"), // SourceReplicaID: to.Ptr("543dd519-7585-faff-6ad2-11fb826d4f4d"), // TargetDatabase: to.Ptr("testdb"), // TargetReplicaID: to.Ptr("7e218aba-0a53-6231-be09-895d99f96bf2"), // }, // }, // { // Name: to.Ptr("dag2"), // Type: to.Ptr("Microsoft.Sql/managedInstances/distributedAvailabilityGroups"), // ID: to.Ptr("/subscriptions/f2669dff-5f08-45dd-b857-b2a60b72cdc9/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/distributedAvailabilityGroups/dag2"), // Properties: &armsql.DistributedAvailabilityGroupProperties{ // DistributedAvailabilityGroupID: to.Ptr("7ec05a51-aa36-a196-09bd-481d7a0973c0"), // LastHardenedLsn: to.Ptr("39000000030400001"), // LinkState: to.Ptr("Catchup"), // ReplicationMode: to.Ptr(armsql.ReplicationModeAsync), // SourceEndpoint: to.Ptr("TCP://SERVER:7022"), // SourceReplicaID: to.Ptr("d423d519-7585-faff-6ad2-11fb826d4f4d"), // TargetDatabase: to.Ptr("testdb2"), // TargetReplicaID: to.Ptr("32578aba-0a53-6231-be09-895d99f96bf2"), // }, // }}, // } } }
Output:
type DistributedAvailabilityGroupsClientBeginCreateOrUpdateOptions ¶ added in v0.4.0
type DistributedAvailabilityGroupsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DistributedAvailabilityGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.BeginCreateOrUpdate method.
type DistributedAvailabilityGroupsClientBeginDeleteOptions ¶ added in v0.4.0
type DistributedAvailabilityGroupsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DistributedAvailabilityGroupsClientBeginDeleteOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.BeginDelete method.
type DistributedAvailabilityGroupsClientBeginUpdateOptions ¶ added in v0.4.0
type DistributedAvailabilityGroupsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DistributedAvailabilityGroupsClientBeginUpdateOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.BeginUpdate method.
type DistributedAvailabilityGroupsClientCreateOrUpdateResponse ¶ added in v0.4.0
type DistributedAvailabilityGroupsClientCreateOrUpdateResponse struct { // Distributed availability group between box and Sql Managed Instance. DistributedAvailabilityGroup }
DistributedAvailabilityGroupsClientCreateOrUpdateResponse contains the response from method DistributedAvailabilityGroupsClient.BeginCreateOrUpdate.
type DistributedAvailabilityGroupsClientDeleteResponse ¶ added in v0.4.0
type DistributedAvailabilityGroupsClientDeleteResponse struct { }
DistributedAvailabilityGroupsClientDeleteResponse contains the response from method DistributedAvailabilityGroupsClient.BeginDelete.
type DistributedAvailabilityGroupsClientGetOptions ¶ added in v0.4.0
type DistributedAvailabilityGroupsClientGetOptions struct { }
DistributedAvailabilityGroupsClientGetOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.Get method.
type DistributedAvailabilityGroupsClientGetResponse ¶ added in v0.4.0
type DistributedAvailabilityGroupsClientGetResponse struct { // Distributed availability group between box and Sql Managed Instance. DistributedAvailabilityGroup }
DistributedAvailabilityGroupsClientGetResponse contains the response from method DistributedAvailabilityGroupsClient.Get.
type DistributedAvailabilityGroupsClientListByInstanceOptions ¶ added in v0.4.0
type DistributedAvailabilityGroupsClientListByInstanceOptions struct { }
DistributedAvailabilityGroupsClientListByInstanceOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.NewListByInstancePager method.
type DistributedAvailabilityGroupsClientListByInstanceResponse ¶ added in v0.4.0
type DistributedAvailabilityGroupsClientListByInstanceResponse struct { // A list of distributed availability groups in instance. DistributedAvailabilityGroupsListResult }
DistributedAvailabilityGroupsClientListByInstanceResponse contains the response from method DistributedAvailabilityGroupsClient.NewListByInstancePager.
type DistributedAvailabilityGroupsClientUpdateResponse ¶ added in v0.4.0
type DistributedAvailabilityGroupsClientUpdateResponse struct { // Distributed availability group between box and Sql Managed Instance. DistributedAvailabilityGroup }
DistributedAvailabilityGroupsClientUpdateResponse contains the response from method DistributedAvailabilityGroupsClient.BeginUpdate.
type DistributedAvailabilityGroupsListResult ¶ added in v0.4.0
type DistributedAvailabilityGroupsListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*DistributedAvailabilityGroup }
DistributedAvailabilityGroupsListResult - A list of distributed availability groups in instance.
func (DistributedAvailabilityGroupsListResult) MarshalJSON ¶ added in v0.4.0
func (d DistributedAvailabilityGroupsListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DistributedAvailabilityGroupsListResult.
func (*DistributedAvailabilityGroupsListResult) UnmarshalJSON ¶ added in v1.1.0
func (d *DistributedAvailabilityGroupsListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DistributedAvailabilityGroupsListResult.
type EditionCapability ¶
type EditionCapability struct { // The reason for the capability not being available. Reason *string // READ-ONLY; The database edition name. Name *string // READ-ONLY; The read scale capability for the edition. ReadScale *ReadScaleCapability // READ-ONLY; The status of the capability. Status *CapabilityStatus // READ-ONLY; The list of supported service objectives for the edition. SupportedServiceLevelObjectives []*ServiceObjectiveCapability // READ-ONLY; The list of supported storage capabilities for this edition SupportedStorageCapabilities []*StorageCapability // READ-ONLY; Whether or not zone redundancy is supported for the edition. ZoneRedundant *bool }
EditionCapability - The edition capability.
func (EditionCapability) MarshalJSON ¶
func (e EditionCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EditionCapability.
func (*EditionCapability) UnmarshalJSON ¶ added in v1.1.0
func (e *EditionCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EditionCapability.
type ElasticPool ¶
type ElasticPool struct { // REQUIRED; Resource location. Location *string // Resource properties. Properties *ElasticPoolProperties // The elastic pool SKU. // The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, // and capacity) that are available to your subscription in an Azure region, // use the Capabilities_ListByLocation REST API or the following command: // az sql elastic-pool list-editions -l <location> -o table // ` SKU *SKU // Resource tags. Tags map[string]*string // READ-ONLY; Resource ID. ID *string // READ-ONLY; Kind of elastic pool. This is metadata used for the Azure portal experience. Kind *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ElasticPool - An elastic pool.
func (ElasticPool) MarshalJSON ¶
func (e ElasticPool) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ElasticPool.
func (*ElasticPool) UnmarshalJSON ¶ added in v1.1.0
func (e *ElasticPool) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPool.
type ElasticPoolActivitiesClient ¶
type ElasticPoolActivitiesClient struct {
// contains filtered or unexported fields
}
ElasticPoolActivitiesClient contains the methods for the ElasticPoolActivities group. Don't use this type directly, use NewElasticPoolActivitiesClient() instead.
func NewElasticPoolActivitiesClient ¶
func NewElasticPoolActivitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ElasticPoolActivitiesClient, error)
NewElasticPoolActivitiesClient creates a new instance of ElasticPoolActivitiesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ElasticPoolActivitiesClient) NewListByElasticPoolPager ¶ added in v0.5.0
func (client *ElasticPoolActivitiesClient) NewListByElasticPoolPager(resourceGroupName string, serverName string, elasticPoolName string, options *ElasticPoolActivitiesClientListByElasticPoolOptions) *runtime.Pager[ElasticPoolActivitiesClientListByElasticPoolResponse]
NewListByElasticPoolPager - Returns elastic pool activities.
Generated from API version 2014-04-01
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- elasticPoolName - The name of the elastic pool for which to get the current activity.
- options - ElasticPoolActivitiesClientListByElasticPoolOptions contains the optional parameters for the ElasticPoolActivitiesClient.NewListByElasticPoolPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ElasticPoolActivityList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewElasticPoolActivitiesClient().NewListByElasticPoolPager("sqlcrudtest-4291", "sqlcrudtest-6574", "8749", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ElasticPoolActivityListResult = armsql.ElasticPoolActivityListResult{ // Value: []*armsql.ElasticPoolActivity{ // { // Name: to.Ptr("851f1672-f7f0-46f6-a262-ee9b51e18e97"), // Type: to.Ptr("Microsoft.Sql/servers/elasticPools/elasticPoolActivity"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4291/providers/Microsoft.Sql/servers/sqlcrudtest-6574/elasticPools/8749/elasticPoolActivity/851f1672-f7f0-46f6-a262-ee9b51e18e97"), // Location: to.Ptr("Japan East"), // Properties: &armsql.ElasticPoolActivityProperties{ // OperationID: to.Ptr("851f1672-f7f0-46f6-a262-ee9b51e18e97"), // ElasticPoolName: to.Ptr("8749"), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-10T02:03:23.263Z"); return t}()), // Operation: to.Ptr("CREATE"), // PercentComplete: to.Ptr[int32](100), // RequestedDatabaseDtuCap: to.Ptr[int32](5), // RequestedDatabaseDtuGuarantee: to.Ptr[int32](0), // RequestedDtuGuarantee: to.Ptr[int32](100), // RequestedStorageLimitInGB: to.Ptr[int64](9), // RequestedStorageLimitInMB: to.Ptr[int32](10000), // ServerName: to.Ptr("sqlcrudtest-6574"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-10T02:03:06.160Z"); return t}()), // State: to.Ptr("COMPLETED"), // }, // }}, // } } }
Output:
type ElasticPoolActivitiesClientListByElasticPoolOptions ¶ added in v0.3.0
type ElasticPoolActivitiesClientListByElasticPoolOptions struct { }
ElasticPoolActivitiesClientListByElasticPoolOptions contains the optional parameters for the ElasticPoolActivitiesClient.NewListByElasticPoolPager method.
type ElasticPoolActivitiesClientListByElasticPoolResponse ¶ added in v0.3.0
type ElasticPoolActivitiesClientListByElasticPoolResponse struct { // Represents the response to a list elastic pool activity request. ElasticPoolActivityListResult }
ElasticPoolActivitiesClientListByElasticPoolResponse contains the response from method ElasticPoolActivitiesClient.NewListByElasticPoolPager.
type ElasticPoolActivity ¶
type ElasticPoolActivity struct { // The geo-location where the resource lives Location *string // The properties representing the resource. Properties *ElasticPoolActivityProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ElasticPoolActivity - Represents the activity on an elastic pool.
func (ElasticPoolActivity) MarshalJSON ¶
func (e ElasticPoolActivity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ElasticPoolActivity.
func (*ElasticPoolActivity) UnmarshalJSON ¶ added in v1.1.0
func (e *ElasticPoolActivity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolActivity.
type ElasticPoolActivityListResult ¶
type ElasticPoolActivityListResult struct { // REQUIRED; The list of elastic pool activities. Value []*ElasticPoolActivity }
ElasticPoolActivityListResult - Represents the response to a list elastic pool activity request.
func (ElasticPoolActivityListResult) MarshalJSON ¶
func (e ElasticPoolActivityListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ElasticPoolActivityListResult.
func (*ElasticPoolActivityListResult) UnmarshalJSON ¶ added in v1.1.0
func (e *ElasticPoolActivityListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolActivityListResult.
type ElasticPoolActivityProperties ¶
type ElasticPoolActivityProperties struct { // READ-ONLY; The name of the elastic pool. ElasticPoolName *string // READ-ONLY; The time the operation finished (ISO8601 format). EndTime *time.Time // READ-ONLY; The error code if available. ErrorCode *int32 // READ-ONLY; The error message if available. ErrorMessage *string // READ-ONLY; The error severity if available. ErrorSeverity *int32 // READ-ONLY; The operation name. Operation *string // READ-ONLY; The unique operation ID. OperationID *string // READ-ONLY; The percentage complete if available. PercentComplete *int32 // READ-ONLY; The requested per database DTU cap. RequestedDatabaseDtuCap *int32 // READ-ONLY; The requested per database DTU guarantee. RequestedDatabaseDtuGuarantee *int32 // READ-ONLY; The requested max DTU per database if available. RequestedDatabaseDtuMax *int32 // READ-ONLY; The requested min DTU per database if available. RequestedDatabaseDtuMin *int32 // READ-ONLY; The requested DTU for the pool if available. RequestedDtu *int32 // READ-ONLY; The requested DTU guarantee. RequestedDtuGuarantee *int32 // READ-ONLY; The requested name for the elastic pool if available. RequestedElasticPoolName *string // READ-ONLY; The requested storage limit for the pool in GB if available. RequestedStorageLimitInGB *int64 // READ-ONLY; The requested storage limit in MB. RequestedStorageLimitInMB *int32 // READ-ONLY; The name of the server the elastic pool is in. ServerName *string // READ-ONLY; The time the operation started (ISO8601 format). StartTime *time.Time // READ-ONLY; The current state of the operation. State *string }
ElasticPoolActivityProperties - Represents the properties of an elastic pool.
func (ElasticPoolActivityProperties) MarshalJSON ¶
func (e ElasticPoolActivityProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ElasticPoolActivityProperties.
func (*ElasticPoolActivityProperties) UnmarshalJSON ¶
func (e *ElasticPoolActivityProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolActivityProperties.
type ElasticPoolDatabaseActivitiesClient ¶
type ElasticPoolDatabaseActivitiesClient struct {
// contains filtered or unexported fields
}
ElasticPoolDatabaseActivitiesClient contains the methods for the ElasticPoolDatabaseActivities group. Don't use this type directly, use NewElasticPoolDatabaseActivitiesClient() instead.
func NewElasticPoolDatabaseActivitiesClient ¶
func NewElasticPoolDatabaseActivitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ElasticPoolDatabaseActivitiesClient, error)
NewElasticPoolDatabaseActivitiesClient creates a new instance of ElasticPoolDatabaseActivitiesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ElasticPoolDatabaseActivitiesClient) NewListByElasticPoolPager ¶ added in v0.5.0
func (client *ElasticPoolDatabaseActivitiesClient) NewListByElasticPoolPager(resourceGroupName string, serverName string, elasticPoolName string, options *ElasticPoolDatabaseActivitiesClientListByElasticPoolOptions) *runtime.Pager[ElasticPoolDatabaseActivitiesClientListByElasticPoolResponse]
NewListByElasticPoolPager - Returns activity on databases inside of an elastic pool.
Generated from API version 2014-04-01
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- elasticPoolName - The name of the elastic pool.
- options - ElasticPoolDatabaseActivitiesClientListByElasticPoolOptions contains the optional parameters for the ElasticPoolDatabaseActivitiesClient.NewListByElasticPoolPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ElasticPoolDatabaseActivityList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewElasticPoolDatabaseActivitiesClient().NewListByElasticPoolPager("sqlcrudtest-4673", "sqlcrudtest-603", "7537", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ElasticPoolDatabaseActivityListResult = armsql.ElasticPoolDatabaseActivityListResult{ // Value: []*armsql.ElasticPoolDatabaseActivity{ // { // Name: to.Ptr("3a3272b3-f1fe-423c-9feb-7b843157eda5"), // Type: to.Ptr("Microsoft.Sql/servers/elasticPools/elasticPoolDatabaseActivity"), // ID: to.Ptr("/subscriptions/9d4e2ad0-e20b-4464-9219-353bded52513/resourceGroups/sqlcrudtest-4673/providers/Microsoft.Sql/servers/sqlcrudtest-603/elasticPools/7537/elasticPoolDatabaseActivity/3a3272b3-f1fe-423c-9feb-7b843157eda5"), // Location: to.Ptr("Japan East"), // Properties: &armsql.ElasticPoolDatabaseActivityProperties{ // OperationID: to.Ptr("3a3272b3-f1fe-423c-9feb-7b843157eda5"), // CurrentElasticPoolName: to.Ptr("7537"), // CurrentServiceObjective: to.Ptr("ElasticPool"), // DatabaseName: to.Ptr("2396"), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-10-23T03:08:02.950Z"); return t}()), // Operation: to.Ptr("UPDATE"), // PercentComplete: to.Ptr[int32](100), // ServerName: to.Ptr("sqlcrudtest-603"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-10-23T03:07:12.570Z"); return t}()), // State: to.Ptr("COMPLETED"), // }, // }, // { // Name: to.Ptr("95108a78-384e-48d3-b4de-7bf23b93a26d"), // Type: to.Ptr("Microsoft.Sql/servers/elasticPools/elasticPoolDatabaseActivity"), // ID: to.Ptr("/subscriptions/9d4e2ad0-e20b-4464-9219-353bded52513/resourceGroups/sqlcrudtest-4673/providers/Microsoft.Sql/servers/sqlcrudtest-603/elasticPools/7537/elasticPoolDatabaseActivity/95108a78-384e-48d3-b4de-7bf23b93a26d"), // Location: to.Ptr("Japan East"), // Properties: &armsql.ElasticPoolDatabaseActivityProperties{ // OperationID: to.Ptr("95108a78-384e-48d3-b4de-7bf23b93a26d"), // CurrentElasticPoolName: to.Ptr("7537"), // CurrentServiceObjective: to.Ptr("ElasticPool"), // DatabaseName: to.Ptr("2396"), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-10-23T03:06:49.190Z"); return t}()), // Operation: to.Ptr("CREATE"), // PercentComplete: to.Ptr[int32](100), // ServerName: to.Ptr("sqlcrudtest-603"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-10-23T03:06:11.190Z"); return t}()), // State: to.Ptr("COMPLETED"), // }, // }}, // } } }
Output:
type ElasticPoolDatabaseActivitiesClientListByElasticPoolOptions ¶ added in v0.3.0
type ElasticPoolDatabaseActivitiesClientListByElasticPoolOptions struct { }
ElasticPoolDatabaseActivitiesClientListByElasticPoolOptions contains the optional parameters for the ElasticPoolDatabaseActivitiesClient.NewListByElasticPoolPager method.
type ElasticPoolDatabaseActivitiesClientListByElasticPoolResponse ¶ added in v0.3.0
type ElasticPoolDatabaseActivitiesClientListByElasticPoolResponse struct { // Represents the response to a list elastic pool database activity request. ElasticPoolDatabaseActivityListResult }
ElasticPoolDatabaseActivitiesClientListByElasticPoolResponse contains the response from method ElasticPoolDatabaseActivitiesClient.NewListByElasticPoolPager.
type ElasticPoolDatabaseActivity ¶
type ElasticPoolDatabaseActivity struct { // The geo-location where the resource lives Location *string // The properties representing the resource. Properties *ElasticPoolDatabaseActivityProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ElasticPoolDatabaseActivity - Represents the activity on an elastic pool.
func (ElasticPoolDatabaseActivity) MarshalJSON ¶
func (e ElasticPoolDatabaseActivity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ElasticPoolDatabaseActivity.
func (*ElasticPoolDatabaseActivity) UnmarshalJSON ¶ added in v1.1.0
func (e *ElasticPoolDatabaseActivity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolDatabaseActivity.
type ElasticPoolDatabaseActivityListResult ¶
type ElasticPoolDatabaseActivityListResult struct { // REQUIRED; The list of elastic pool database activities. Value []*ElasticPoolDatabaseActivity }
ElasticPoolDatabaseActivityListResult - Represents the response to a list elastic pool database activity request.
func (ElasticPoolDatabaseActivityListResult) MarshalJSON ¶
func (e ElasticPoolDatabaseActivityListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ElasticPoolDatabaseActivityListResult.
func (*ElasticPoolDatabaseActivityListResult) UnmarshalJSON ¶ added in v1.1.0
func (e *ElasticPoolDatabaseActivityListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolDatabaseActivityListResult.
type ElasticPoolDatabaseActivityProperties ¶
type ElasticPoolDatabaseActivityProperties struct { // READ-ONLY; The name of the current elastic pool the database is in if available. CurrentElasticPoolName *string // READ-ONLY; The name of the current service objective if available. CurrentServiceObjective *string // READ-ONLY; The database name. DatabaseName *string // READ-ONLY; The time the operation finished (ISO8601 format). EndTime *time.Time // READ-ONLY; The error code if available. ErrorCode *int32 // READ-ONLY; The error message if available. ErrorMessage *string // READ-ONLY; The error severity if available. ErrorSeverity *int32 // READ-ONLY; The operation name. Operation *string // READ-ONLY; The unique operation ID. OperationID *string // READ-ONLY; The percentage complete if available. PercentComplete *int32 // READ-ONLY; The name for the elastic pool the database is moving into if available. RequestedElasticPoolName *string // READ-ONLY; The name of the requested service objective if available. RequestedServiceObjective *string // READ-ONLY; The name of the server the elastic pool is in. ServerName *string // READ-ONLY; The time the operation started (ISO8601 format). StartTime *time.Time // READ-ONLY; The current state of the operation. State *string }
ElasticPoolDatabaseActivityProperties - Represents the properties of an elastic pool database activity.
func (ElasticPoolDatabaseActivityProperties) MarshalJSON ¶
func (e ElasticPoolDatabaseActivityProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ElasticPoolDatabaseActivityProperties.
func (*ElasticPoolDatabaseActivityProperties) UnmarshalJSON ¶
func (e *ElasticPoolDatabaseActivityProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolDatabaseActivityProperties.
type ElasticPoolEditionCapability ¶
type ElasticPoolEditionCapability struct { // The reason for the capability not being available. Reason *string // READ-ONLY; The elastic pool edition name. Name *string // READ-ONLY; The status of the capability. Status *CapabilityStatus // READ-ONLY; The list of supported elastic pool DTU levels for the edition. SupportedElasticPoolPerformanceLevels []*ElasticPoolPerformanceLevelCapability // READ-ONLY; Whether or not zone redundancy is supported for the edition. ZoneRedundant *bool }
ElasticPoolEditionCapability - The elastic pool edition capability.
func (ElasticPoolEditionCapability) MarshalJSON ¶
func (e ElasticPoolEditionCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ElasticPoolEditionCapability.
func (*ElasticPoolEditionCapability) UnmarshalJSON ¶ added in v1.1.0
func (e *ElasticPoolEditionCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolEditionCapability.
type ElasticPoolLicenseType ¶
type ElasticPoolLicenseType string
ElasticPoolLicenseType - The license type to apply for this elastic pool.
const ( ElasticPoolLicenseTypeBasePrice ElasticPoolLicenseType = "BasePrice" ElasticPoolLicenseTypeLicenseIncluded ElasticPoolLicenseType = "LicenseIncluded" )
func PossibleElasticPoolLicenseTypeValues ¶
func PossibleElasticPoolLicenseTypeValues() []ElasticPoolLicenseType
PossibleElasticPoolLicenseTypeValues returns the possible values for the ElasticPoolLicenseType const type.
type ElasticPoolListResult ¶
type ElasticPoolListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ElasticPool }
ElasticPoolListResult - The result of an elastic pool list request.
func (ElasticPoolListResult) MarshalJSON ¶
func (e ElasticPoolListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ElasticPoolListResult.
func (*ElasticPoolListResult) UnmarshalJSON ¶ added in v1.1.0
func (e *ElasticPoolListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolListResult.
type ElasticPoolOperation ¶
type ElasticPoolOperation struct { // Resource properties. Properties *ElasticPoolOperationProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ElasticPoolOperation - A elastic pool operation.
func (ElasticPoolOperation) MarshalJSON ¶
func (e ElasticPoolOperation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ElasticPoolOperation.
func (*ElasticPoolOperation) UnmarshalJSON ¶ added in v1.1.0
func (e *ElasticPoolOperation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolOperation.
type ElasticPoolOperationListResult ¶
type ElasticPoolOperationListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ElasticPoolOperation }
ElasticPoolOperationListResult - The response to a list elastic pool operations request
func (ElasticPoolOperationListResult) MarshalJSON ¶
func (e ElasticPoolOperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ElasticPoolOperationListResult.
func (*ElasticPoolOperationListResult) UnmarshalJSON ¶ added in v1.1.0
func (e *ElasticPoolOperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolOperationListResult.
type ElasticPoolOperationProperties ¶
type ElasticPoolOperationProperties struct { // READ-ONLY; The operation description. Description *string // READ-ONLY; The name of the elastic pool the operation is being performed on. ElasticPoolName *string // READ-ONLY; The operation error code. ErrorCode *int32 // READ-ONLY; The operation error description. ErrorDescription *string // READ-ONLY; The operation error severity. ErrorSeverity *int32 // READ-ONLY; The estimated completion time of the operation. EstimatedCompletionTime *time.Time // READ-ONLY; Whether the operation can be cancelled. IsCancellable *bool // READ-ONLY; Whether or not the error is a user error. IsUserError *bool // READ-ONLY; The name of operation. Operation *string // READ-ONLY; The friendly name of operation. OperationFriendlyName *string // READ-ONLY; The percentage of the operation completed. PercentComplete *int32 // READ-ONLY; The name of the server. ServerName *string // READ-ONLY; The operation start time. StartTime *time.Time // READ-ONLY; The operation state. State *string }
ElasticPoolOperationProperties - The properties of a elastic pool operation.
func (ElasticPoolOperationProperties) MarshalJSON ¶
func (e ElasticPoolOperationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ElasticPoolOperationProperties.
func (*ElasticPoolOperationProperties) UnmarshalJSON ¶
func (e *ElasticPoolOperationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolOperationProperties.
type ElasticPoolOperationsClient ¶
type ElasticPoolOperationsClient struct {
// contains filtered or unexported fields
}
ElasticPoolOperationsClient contains the methods for the ElasticPoolOperations group. Don't use this type directly, use NewElasticPoolOperationsClient() instead.
func NewElasticPoolOperationsClient ¶
func NewElasticPoolOperationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ElasticPoolOperationsClient, error)
NewElasticPoolOperationsClient creates a new instance of ElasticPoolOperationsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ElasticPoolOperationsClient) Cancel ¶
func (client *ElasticPoolOperationsClient) Cancel(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, operationID string, options *ElasticPoolOperationsClientCancelOptions) (ElasticPoolOperationsClientCancelResponse, error)
Cancel - Cancels the asynchronous operation on the elastic pool. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- operationID - The operation identifier.
- options - ElasticPoolOperationsClientCancelOptions contains the optional parameters for the ElasticPoolOperationsClient.Cancel method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CancelElasticPoolOperation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewElasticPoolOperationsClient().Cancel(ctx, "sqlcrudtest-7398", "sqlcrudtest-6661", "testpool", "f779414b-e748-4925-8cfe-c8598f7660ae", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*ElasticPoolOperationsClient) NewListByElasticPoolPager ¶ added in v0.5.0
func (client *ElasticPoolOperationsClient) NewListByElasticPoolPager(resourceGroupName string, serverName string, elasticPoolName string, options *ElasticPoolOperationsClientListByElasticPoolOptions) *runtime.Pager[ElasticPoolOperationsClientListByElasticPoolResponse]
NewListByElasticPoolPager - Gets a list of operations performed on the elastic pool.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - ElasticPoolOperationsClientListByElasticPoolOptions contains the optional parameters for the ElasticPoolOperationsClient.NewListByElasticPoolPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListElasticPoolOperations.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewElasticPoolOperationsClient().NewListByElasticPoolPager("sqlcrudtestgroup", "sqlcrudtestserver", "testpool", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ElasticPoolOperationListResult = armsql.ElasticPoolOperationListResult{ // Value: []*armsql.ElasticPoolOperation{ // { // Name: to.Ptr("11111111-1111-1111-1111-111111111111"), // Type: to.Ptr("Microsoft.Sql/servers/elasticPools/operations"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtestgroup/providers/Microsoft.Sql/servers/sqlcrudtestserver/elasticPools/testpool/operations/11111111-1111-1111-1111-111111111111"), // Properties: &armsql.ElasticPoolOperationProperties{ // ElasticPoolName: to.Ptr("testpool"), // Operation: to.Ptr("UPDATE"), // OperationFriendlyName: to.Ptr("UPDATE"), // PercentComplete: to.Ptr[int32](100), // ServerName: to.Ptr("sqlcrudtestserver"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-30T09:10:08.100Z"); return t}()), // State: to.Ptr("COMPLETED"), // }, // }, // { // Name: to.Ptr("55555555-5555-5555-5555-555555555555"), // Type: to.Ptr("Microsoft.Sql/servers/elasticPools/operations"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtestgroup/providers/Microsoft.Sql/servers/sqlcrudtestserver/elasticPools/testpool/operations/55555555-5555-5555-5555-555555555555"), // Properties: &armsql.ElasticPoolOperationProperties{ // ElasticPoolName: to.Ptr("testpool"), // Operation: to.Ptr("UPDATE"), // OperationFriendlyName: to.Ptr("UPDATE"), // PercentComplete: to.Ptr[int32](0), // ServerName: to.Ptr("sqlcrudtestserver"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-30T10:10:08.100Z"); return t}()), // State: to.Ptr("IN_PROGRESS"), // }, // }}, // } } }
Output:
type ElasticPoolOperationsClientCancelOptions ¶ added in v0.3.0
type ElasticPoolOperationsClientCancelOptions struct { }
ElasticPoolOperationsClientCancelOptions contains the optional parameters for the ElasticPoolOperationsClient.Cancel method.
type ElasticPoolOperationsClientCancelResponse ¶ added in v0.3.0
type ElasticPoolOperationsClientCancelResponse struct { }
ElasticPoolOperationsClientCancelResponse contains the response from method ElasticPoolOperationsClient.Cancel.
type ElasticPoolOperationsClientListByElasticPoolOptions ¶ added in v0.3.0
type ElasticPoolOperationsClientListByElasticPoolOptions struct { }
ElasticPoolOperationsClientListByElasticPoolOptions contains the optional parameters for the ElasticPoolOperationsClient.NewListByElasticPoolPager method.
type ElasticPoolOperationsClientListByElasticPoolResponse ¶ added in v0.3.0
type ElasticPoolOperationsClientListByElasticPoolResponse struct { // The response to a list elastic pool operations request ElasticPoolOperationListResult }
ElasticPoolOperationsClientListByElasticPoolResponse contains the response from method ElasticPoolOperationsClient.NewListByElasticPoolPager.
type ElasticPoolPerDatabaseMaxPerformanceLevelCapability ¶
type ElasticPoolPerDatabaseMaxPerformanceLevelCapability struct { // The reason for the capability not being available. Reason *string // READ-ONLY; The maximum performance level per database. Limit *float64 // READ-ONLY; The status of the capability. Status *CapabilityStatus // READ-ONLY; The list of supported min database performance levels. SupportedPerDatabaseMinPerformanceLevels []*ElasticPoolPerDatabaseMinPerformanceLevelCapability // READ-ONLY; Unit type used to measure performance level. Unit *PerformanceLevelUnit }
ElasticPoolPerDatabaseMaxPerformanceLevelCapability - The max per-database performance level capability.
func (ElasticPoolPerDatabaseMaxPerformanceLevelCapability) MarshalJSON ¶
func (e ElasticPoolPerDatabaseMaxPerformanceLevelCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ElasticPoolPerDatabaseMaxPerformanceLevelCapability.
func (*ElasticPoolPerDatabaseMaxPerformanceLevelCapability) UnmarshalJSON ¶ added in v1.1.0
func (e *ElasticPoolPerDatabaseMaxPerformanceLevelCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolPerDatabaseMaxPerformanceLevelCapability.
type ElasticPoolPerDatabaseMinPerformanceLevelCapability ¶
type ElasticPoolPerDatabaseMinPerformanceLevelCapability struct { // The reason for the capability not being available. Reason *string // READ-ONLY; The minimum performance level per database. Limit *float64 // READ-ONLY; The status of the capability. Status *CapabilityStatus // READ-ONLY; Unit type used to measure performance level. Unit *PerformanceLevelUnit }
ElasticPoolPerDatabaseMinPerformanceLevelCapability - The minimum per-database performance level capability.
func (ElasticPoolPerDatabaseMinPerformanceLevelCapability) MarshalJSON ¶ added in v1.1.0
func (e ElasticPoolPerDatabaseMinPerformanceLevelCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ElasticPoolPerDatabaseMinPerformanceLevelCapability.
func (*ElasticPoolPerDatabaseMinPerformanceLevelCapability) UnmarshalJSON ¶ added in v1.1.0
func (e *ElasticPoolPerDatabaseMinPerformanceLevelCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolPerDatabaseMinPerformanceLevelCapability.
type ElasticPoolPerDatabaseSettings ¶
type ElasticPoolPerDatabaseSettings struct { // The maximum capacity any one database can consume. MaxCapacity *float64 // The minimum capacity all databases are guaranteed. MinCapacity *float64 }
ElasticPoolPerDatabaseSettings - Per database settings of an elastic pool.
func (ElasticPoolPerDatabaseSettings) MarshalJSON ¶ added in v1.1.0
func (e ElasticPoolPerDatabaseSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ElasticPoolPerDatabaseSettings.
func (*ElasticPoolPerDatabaseSettings) UnmarshalJSON ¶ added in v1.1.0
func (e *ElasticPoolPerDatabaseSettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolPerDatabaseSettings.
type ElasticPoolPerformanceLevelCapability ¶
type ElasticPoolPerformanceLevelCapability struct { // The reason for the capability not being available. Reason *string // READ-ONLY; The included (free) max size for this performance level. IncludedMaxSize *MaxSizeCapability // READ-ONLY; The maximum number of databases supported. MaxDatabaseCount *int32 // READ-ONLY; The performance level for the pool. PerformanceLevel *PerformanceLevelCapability // READ-ONLY; The sku. SKU *SKU // READ-ONLY; The status of the capability. Status *CapabilityStatus // READ-ONLY; List of supported license types. SupportedLicenseTypes []*LicenseTypeCapability // READ-ONLY; List of supported maintenance configurations SupportedMaintenanceConfigurations []*MaintenanceConfigurationCapability // READ-ONLY; The list of supported max sizes. SupportedMaxSizes []*MaxSizeRangeCapability // READ-ONLY; The list of supported per database max performance levels. SupportedPerDatabaseMaxPerformanceLevels []*ElasticPoolPerDatabaseMaxPerformanceLevelCapability // READ-ONLY; The list of supported per database max sizes. SupportedPerDatabaseMaxSizes []*MaxSizeRangeCapability // READ-ONLY; Whether or not zone redundancy is supported for the performance level. ZoneRedundant *bool }
ElasticPoolPerformanceLevelCapability - The Elastic Pool performance level capability.
func (ElasticPoolPerformanceLevelCapability) MarshalJSON ¶
func (e ElasticPoolPerformanceLevelCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ElasticPoolPerformanceLevelCapability.
func (*ElasticPoolPerformanceLevelCapability) UnmarshalJSON ¶ added in v1.1.0
func (e *ElasticPoolPerformanceLevelCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolPerformanceLevelCapability.
type ElasticPoolProperties ¶
type ElasticPoolProperties struct { // The number of secondary replicas associated with the elastic pool that are used to provide high availability. HighAvailabilityReplicaCount *int32 // The license type to apply for this elastic pool. LicenseType *ElasticPoolLicenseType // Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates // will will occur. MaintenanceConfigurationID *string // The storage limit for the database elastic pool in bytes. MaxSizeBytes *int64 // The per database settings for the elastic pool. PerDatabaseSettings *ElasticPoolPerDatabaseSettings // Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across // multiple availability zones. ZoneRedundant *bool // READ-ONLY; The creation date of the elastic pool (ISO8601 format). CreationDate *time.Time // READ-ONLY; The state of the elastic pool. State *ElasticPoolState }
ElasticPoolProperties - Properties of an elastic pool
func (ElasticPoolProperties) MarshalJSON ¶
func (e ElasticPoolProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ElasticPoolProperties.
func (*ElasticPoolProperties) UnmarshalJSON ¶
func (e *ElasticPoolProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolProperties.
type ElasticPoolState ¶
type ElasticPoolState string
ElasticPoolState - The state of the elastic pool.
const ( ElasticPoolStateCreating ElasticPoolState = "Creating" ElasticPoolStateDisabled ElasticPoolState = "Disabled" ElasticPoolStateReady ElasticPoolState = "Ready" )
func PossibleElasticPoolStateValues ¶
func PossibleElasticPoolStateValues() []ElasticPoolState
PossibleElasticPoolStateValues returns the possible values for the ElasticPoolState const type.
type ElasticPoolUpdate ¶
type ElasticPoolUpdate struct { // Resource properties. Properties *ElasticPoolUpdateProperties // An ARM Resource SKU. SKU *SKU // Resource tags. Tags map[string]*string }
ElasticPoolUpdate - An elastic pool update.
func (ElasticPoolUpdate) MarshalJSON ¶
func (e ElasticPoolUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ElasticPoolUpdate.
func (*ElasticPoolUpdate) UnmarshalJSON ¶ added in v1.1.0
func (e *ElasticPoolUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolUpdate.
type ElasticPoolUpdateProperties ¶
type ElasticPoolUpdateProperties struct { // The number of secondary replicas associated with the elastic pool that are used to provide high availability. Applicable // only to Hyperscale elastic pools. HighAvailabilityReplicaCount *int32 // The license type to apply for this elastic pool. LicenseType *ElasticPoolLicenseType // Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates // will will occur. MaintenanceConfigurationID *string // The storage limit for the database elastic pool in bytes. MaxSizeBytes *int64 // The per database settings for the elastic pool. PerDatabaseSettings *ElasticPoolPerDatabaseSettings // Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across // multiple availability zones. ZoneRedundant *bool }
ElasticPoolUpdateProperties - Properties of an elastic pool
func (ElasticPoolUpdateProperties) MarshalJSON ¶ added in v1.1.0
func (e ElasticPoolUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ElasticPoolUpdateProperties.
func (*ElasticPoolUpdateProperties) UnmarshalJSON ¶ added in v1.1.0
func (e *ElasticPoolUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolUpdateProperties.
type ElasticPoolsClient ¶
type ElasticPoolsClient struct {
// contains filtered or unexported fields
}
ElasticPoolsClient contains the methods for the ElasticPools group. Don't use this type directly, use NewElasticPoolsClient() instead.
func NewElasticPoolsClient ¶
func NewElasticPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ElasticPoolsClient, error)
NewElasticPoolsClient creates a new instance of ElasticPoolsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ElasticPoolsClient) BeginCreateOrUpdate ¶
func (client *ElasticPoolsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, parameters ElasticPool, options *ElasticPoolsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ElasticPoolsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates an elastic pool. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-08-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- elasticPoolName - The name of the elastic pool.
- parameters - The elastic pool parameters.
- options - ElasticPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the ElasticPoolsClient.BeginCreateOrUpdate method.
Example (CreateOrUpdateElasticPoolWithAllParameter) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/ElasticPoolCreateOrUpdateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewElasticPoolsClient().BeginCreateOrUpdate(ctx, "sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", armsql.ElasticPool{ Location: to.Ptr("Japan East"), Properties: &armsql.ElasticPoolProperties{ PerDatabaseSettings: &armsql.ElasticPoolPerDatabaseSettings{ MaxCapacity: to.Ptr[float64](2), MinCapacity: to.Ptr[float64](0.25), }, }, SKU: &armsql.SKU{ Name: to.Ptr("GP_Gen4_2"), Capacity: to.Ptr[int32](2), Tier: to.Ptr("GeneralPurpose"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ElasticPool = armsql.ElasticPool{ // Name: to.Ptr("sqlcrudtest-8102"), // Type: to.Ptr("Microsoft.Sql/servers/elasticPools"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102"), // Location: to.Ptr("Japan East"), // Properties: &armsql.ElasticPoolProperties{ // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-10T01:25:25.033Z"); return t}()), // MaxSizeBytes: to.Ptr[int64](5242880000), // PerDatabaseSettings: &armsql.ElasticPoolPerDatabaseSettings{ // MaxCapacity: to.Ptr[float64](2), // MinCapacity: to.Ptr[float64](0.25), // }, // State: to.Ptr(armsql.ElasticPoolStateReady), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen4_2"), // Capacity: to.Ptr[int32](2), // Tier: to.Ptr("GeneralPurpose"), // }, // } }
Output:
Example (CreateOrUpdateElasticPoolWithMaintenanceConfigurationParameter) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/ElasticPoolCreateOrUpdateSetMaintenanceConfiguration.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewElasticPoolsClient().BeginCreateOrUpdate(ctx, "sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", armsql.ElasticPool{ Location: to.Ptr("Japan East"), Properties: &armsql.ElasticPoolProperties{ MaintenanceConfigurationID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ElasticPool = armsql.ElasticPool{ // Name: to.Ptr("sqlcrudtest-8102"), // Type: to.Ptr("Microsoft.Sql/servers/elasticPools"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102"), // Location: to.Ptr("Japan East"), // Properties: &armsql.ElasticPoolProperties{ // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-10T01:25:25.033Z"); return t}()), // MaintenanceConfigurationID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1"), // MaxSizeBytes: to.Ptr[int64](102400), // PerDatabaseSettings: &armsql.ElasticPoolPerDatabaseSettings{ // MaxCapacity: to.Ptr[float64](100), // MinCapacity: to.Ptr[float64](0), // }, // State: to.Ptr(armsql.ElasticPoolStateReady), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("StandardPool"), // Capacity: to.Ptr[int32](100), // Tier: to.Ptr("Standard"), // }, // } }
Output:
Example (CreateOrUpdateElasticPoolWithMinimumParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/ElasticPoolCreateOrUpdateMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewElasticPoolsClient().BeginCreateOrUpdate(ctx, "sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", armsql.ElasticPool{ Location: to.Ptr("Japan East"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ElasticPool = armsql.ElasticPool{ // Name: to.Ptr("sqlcrudtest-8102"), // Type: to.Ptr("Microsoft.Sql/servers/elasticPools"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102"), // Location: to.Ptr("Japan East"), // Properties: &armsql.ElasticPoolProperties{ // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-10T01:25:25.033Z"); return t}()), // MaxSizeBytes: to.Ptr[int64](102400), // PerDatabaseSettings: &armsql.ElasticPoolPerDatabaseSettings{ // MaxCapacity: to.Ptr[float64](100), // MinCapacity: to.Ptr[float64](0), // }, // State: to.Ptr(armsql.ElasticPoolStateReady), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("StandardPool"), // Capacity: to.Ptr[int32](100), // Tier: to.Ptr("Standard"), // }, // } }
Output:
Example (CreateOrUpdateHyperscaleElasticPoolWithHighAvailabilityReplicaCountParameter) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/HyperscaleElasticPoolCreateOrUpdateSetHighAvailabilityReplicaCount.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewElasticPoolsClient().BeginCreateOrUpdate(ctx, "sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", armsql.ElasticPool{ Location: to.Ptr("Japan East"), Properties: &armsql.ElasticPoolProperties{ HighAvailabilityReplicaCount: to.Ptr[int32](2), }, SKU: &armsql.SKU{ Name: to.Ptr("HS_Gen5_4"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ElasticPool = armsql.ElasticPool{ // Name: to.Ptr("sqlcrudtest-8102"), // Type: to.Ptr("Microsoft.Sql/servers/elasticPools"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102"), // Location: to.Ptr("Japan East"), // Kind: to.Ptr("vcore,pool"), // Properties: &armsql.ElasticPoolProperties{ // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-26T03:46:20.570Z"); return t}()), // HighAvailabilityReplicaCount: to.Ptr[int32](2), // LicenseType: to.Ptr(armsql.ElasticPoolLicenseTypeLicenseIncluded), // MaintenanceConfigurationID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default"), // MaxSizeBytes: to.Ptr[int64](0), // PerDatabaseSettings: &armsql.ElasticPoolPerDatabaseSettings{ // MaxCapacity: to.Ptr[float64](4), // MinCapacity: to.Ptr[float64](0), // }, // State: to.Ptr(armsql.ElasticPoolStateReady), // ZoneRedundant: to.Ptr(false), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen5"), // Capacity: to.Ptr[int32](4), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("Hyperscale"), // }, // } }
Output:
func (*ElasticPoolsClient) BeginDelete ¶
func (client *ElasticPoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, options *ElasticPoolsClientBeginDeleteOptions) (*runtime.Poller[ElasticPoolsClientDeleteResponse], error)
BeginDelete - Deletes an elastic pool. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-08-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- elasticPoolName - The name of the elastic pool.
- options - ElasticPoolsClientBeginDeleteOptions contains the optional parameters for the ElasticPoolsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/ElasticPoolDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewElasticPoolsClient().BeginDelete(ctx, "sqlcrudtest-3129", "sqlcrudtest-228", "sqlcrudtest-3851", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ElasticPoolsClient) BeginFailover ¶
func (client *ElasticPoolsClient) BeginFailover(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, options *ElasticPoolsClientBeginFailoverOptions) (*runtime.Poller[ElasticPoolsClientFailoverResponse], error)
BeginFailover - Failovers an elastic pool. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-08-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- elasticPoolName - The name of the elastic pool to failover.
- options - ElasticPoolsClientBeginFailoverOptions contains the optional parameters for the ElasticPoolsClient.BeginFailover method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/FailoverElasticPool.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewElasticPoolsClient().BeginFailover(ctx, "group1", "testServer", "testElasticPool", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ElasticPoolsClient) BeginUpdate ¶
func (client *ElasticPoolsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, parameters ElasticPoolUpdate, options *ElasticPoolsClientBeginUpdateOptions) (*runtime.Poller[ElasticPoolsClientUpdateResponse], error)
BeginUpdate - Updates an elastic pool. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-08-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- elasticPoolName - The name of the elastic pool.
- parameters - The elastic pool update parameters.
- options - ElasticPoolsClientBeginUpdateOptions contains the optional parameters for the ElasticPoolsClient.BeginUpdate method.
Example (AssignsMaintenanceConfigurationToAnElasticPool) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/ElasticPoolUpdateAssignMaintenanceConfiguration.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewElasticPoolsClient().BeginUpdate(ctx, "sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", armsql.ElasticPoolUpdate{ Properties: &armsql.ElasticPoolUpdateProperties{ MaintenanceConfigurationID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ElasticPool = armsql.ElasticPool{ // Name: to.Ptr("sqlcrudtest-8102"), // Type: to.Ptr("Microsoft.Sql/servers/elasticPools"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102"), // Location: to.Ptr("Japan East"), // Properties: &armsql.ElasticPoolProperties{ // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-10T01:25:25.033Z"); return t}()), // MaintenanceConfigurationID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1"), // MaxSizeBytes: to.Ptr[int64](5242880000), // PerDatabaseSettings: &armsql.ElasticPoolPerDatabaseSettings{ // MaxCapacity: to.Ptr[float64](5), // MinCapacity: to.Ptr[float64](0), // }, // State: to.Ptr(armsql.ElasticPoolStateReady), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("BasicPool"), // Capacity: to.Ptr[int32](50), // Tier: to.Ptr("Basic"), // }, // } }
Output:
Example (ResetsMaintenanceConfigurationOfAnElasticPoolToDefault) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/ElasticPoolUpdateResetMaintenanceConfiguration.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewElasticPoolsClient().BeginUpdate(ctx, "sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", armsql.ElasticPoolUpdate{ Properties: &armsql.ElasticPoolUpdateProperties{ MaintenanceConfigurationID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ElasticPool = armsql.ElasticPool{ // Name: to.Ptr("sqlcrudtest-8102"), // Type: to.Ptr("Microsoft.Sql/servers/elasticPools"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102"), // Location: to.Ptr("Japan East"), // Properties: &armsql.ElasticPoolProperties{ // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-10T01:25:25.033Z"); return t}()), // MaxSizeBytes: to.Ptr[int64](5242880000), // PerDatabaseSettings: &armsql.ElasticPoolPerDatabaseSettings{ // MaxCapacity: to.Ptr[float64](5), // MinCapacity: to.Ptr[float64](0), // }, // State: to.Ptr(armsql.ElasticPoolStateReady), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("BasicPool"), // Capacity: to.Ptr[int32](50), // Tier: to.Ptr("Basic"), // }, // } }
Output:
Example (UpdateAnElasticPoolWithAllParameter) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/ElasticPoolUpdateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewElasticPoolsClient().BeginUpdate(ctx, "sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", armsql.ElasticPoolUpdate{ Properties: &armsql.ElasticPoolUpdateProperties{ LicenseType: to.Ptr(armsql.ElasticPoolLicenseTypeLicenseIncluded), PerDatabaseSettings: &armsql.ElasticPoolPerDatabaseSettings{ MaxCapacity: to.Ptr[float64](1), MinCapacity: to.Ptr[float64](0.25), }, ZoneRedundant: to.Ptr(true), }, SKU: &armsql.SKU{ Name: to.Ptr("BC_Gen4"), Capacity: to.Ptr[int32](2), Tier: to.Ptr("BusinessCritical"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ElasticPool = armsql.ElasticPool{ // Name: to.Ptr("sqlcrudtest-8102"), // Type: to.Ptr("Microsoft.Sql/servers/elasticPools"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102"), // Location: to.Ptr("Japan East"), // Properties: &armsql.ElasticPoolProperties{ // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-10T01:27:21.320Z"); return t}()), // LicenseType: to.Ptr(armsql.ElasticPoolLicenseTypeLicenseIncluded), // MaxSizeBytes: to.Ptr[int64](5242880000), // PerDatabaseSettings: &armsql.ElasticPoolPerDatabaseSettings{ // MaxCapacity: to.Ptr[float64](1), // MinCapacity: to.Ptr[float64](0.25), // }, // State: to.Ptr(armsql.ElasticPoolStateReady), // ZoneRedundant: to.Ptr(true), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("BC_Gen4"), // Capacity: to.Ptr[int32](2), // Tier: to.Ptr("BusinessCritical"), // }, // } }
Output:
Example (UpdateAnElasticPoolWithMinimumParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/ElasticPoolUpdateMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewElasticPoolsClient().BeginUpdate(ctx, "sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", armsql.ElasticPoolUpdate{}, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ElasticPool = armsql.ElasticPool{ // Name: to.Ptr("sqlcrudtest-8102"), // Type: to.Ptr("Microsoft.Sql/servers/elasticPools"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102"), // Location: to.Ptr("Japan East"), // Properties: &armsql.ElasticPoolProperties{ // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-10T01:25:25.033Z"); return t}()), // MaxSizeBytes: to.Ptr[int64](5242880000), // PerDatabaseSettings: &armsql.ElasticPoolPerDatabaseSettings{ // MaxCapacity: to.Ptr[float64](5), // MinCapacity: to.Ptr[float64](0), // }, // State: to.Ptr(armsql.ElasticPoolStateReady), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("BasicPool"), // Capacity: to.Ptr[int32](50), // Tier: to.Ptr("Basic"), // }, // } }
Output:
Example (UpdateHighAvailabilityReplicaCountOfAHyperscaleElasticPool) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/HyperscaleElasticPoolUpdateSetHighAvailabilityReplicaCount.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewElasticPoolsClient().BeginUpdate(ctx, "sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", armsql.ElasticPoolUpdate{ Properties: &armsql.ElasticPoolUpdateProperties{ HighAvailabilityReplicaCount: to.Ptr[int32](2), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ElasticPool = armsql.ElasticPool{ // Name: to.Ptr("sqlcrudtest-8102"), // Type: to.Ptr("Microsoft.Sql/servers/elasticPools"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102"), // Location: to.Ptr("Japan East"), // Kind: to.Ptr("vcore,pool"), // Properties: &armsql.ElasticPoolProperties{ // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-26T03:46:20.570Z"); return t}()), // HighAvailabilityReplicaCount: to.Ptr[int32](2), // LicenseType: to.Ptr(armsql.ElasticPoolLicenseTypeLicenseIncluded), // MaintenanceConfigurationID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default"), // MaxSizeBytes: to.Ptr[int64](0), // PerDatabaseSettings: &armsql.ElasticPoolPerDatabaseSettings{ // MaxCapacity: to.Ptr[float64](4), // MinCapacity: to.Ptr[float64](0), // }, // State: to.Ptr(armsql.ElasticPoolStateReady), // ZoneRedundant: to.Ptr(false), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen5"), // Capacity: to.Ptr[int32](4), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("Hyperscale"), // }, // } }
Output:
func (*ElasticPoolsClient) Get ¶
func (client *ElasticPoolsClient) Get(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, options *ElasticPoolsClientGetOptions) (ElasticPoolsClientGetResponse, error)
Get - Gets an elastic pool. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-08-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- elasticPoolName - The name of the elastic pool.
- options - ElasticPoolsClientGetOptions contains the optional parameters for the ElasticPoolsClient.Get method.
Example (GetAHyperscaleElasticPool) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/HyperscaleElasticPoolGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewElasticPoolsClient().Get(ctx, "sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ElasticPool = armsql.ElasticPool{ // Name: to.Ptr("sqlcrudtest-8102"), // Type: to.Ptr("Microsoft.Sql/servers/elasticPools"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102"), // Location: to.Ptr("Japan East"), // Kind: to.Ptr("vcore,pool"), // Properties: &armsql.ElasticPoolProperties{ // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-26T03:46:20.570Z"); return t}()), // HighAvailabilityReplicaCount: to.Ptr[int32](2), // LicenseType: to.Ptr(armsql.ElasticPoolLicenseTypeLicenseIncluded), // MaintenanceConfigurationID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default"), // MaxSizeBytes: to.Ptr[int64](0), // PerDatabaseSettings: &armsql.ElasticPoolPerDatabaseSettings{ // MaxCapacity: to.Ptr[float64](4), // MinCapacity: to.Ptr[float64](0), // }, // State: to.Ptr(armsql.ElasticPoolStateReady), // ZoneRedundant: to.Ptr(false), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen5"), // Capacity: to.Ptr[int32](4), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("Hyperscale"), // }, // } }
Output:
Example (GetAnElasticPool) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/ElasticPoolGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewElasticPoolsClient().Get(ctx, "sqlcrudtest-2369", "sqlcrudtest-8069", "sqlcrudtest-8102", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ElasticPool = armsql.ElasticPool{ // Name: to.Ptr("sqlcrudtest-8102"), // Type: to.Ptr("Microsoft.Sql/servers/elasticPools"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102"), // Location: to.Ptr("Japan East"), // Properties: &armsql.ElasticPoolProperties{ // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-10-10T01:25:25.033Z"); return t}()), // LicenseType: to.Ptr(armsql.ElasticPoolLicenseTypeLicenseIncluded), // MaintenanceConfigurationID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1"), // MaxSizeBytes: to.Ptr[int64](5242880000), // PerDatabaseSettings: &armsql.ElasticPoolPerDatabaseSettings{ // MaxCapacity: to.Ptr[float64](1), // MinCapacity: to.Ptr[float64](0.25), // }, // State: to.Ptr(armsql.ElasticPoolStateReady), // ZoneRedundant: to.Ptr(true), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen5_2"), // Capacity: to.Ptr[int32](2), // Tier: to.Ptr("GeneralPurpose"), // }, // } }
Output:
func (*ElasticPoolsClient) NewListByServerPager ¶ added in v0.5.0
func (client *ElasticPoolsClient) NewListByServerPager(resourceGroupName string, serverName string, options *ElasticPoolsClientListByServerOptions) *runtime.Pager[ElasticPoolsClientListByServerResponse]
NewListByServerPager - Gets all elastic pools in a server.
Generated from API version 2021-08-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - ElasticPoolsClientListByServerOptions contains the optional parameters for the ElasticPoolsClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/ElasticPoolListByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewElasticPoolsClient().NewListByServerPager("sqlcrudtest-2369", "sqlcrudtest-8069", &armsql.ElasticPoolsClientListByServerOptions{Skip: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ElasticPoolListResult = armsql.ElasticPoolListResult{ // Value: []*armsql.ElasticPool{ // { // Name: to.Ptr("sqlcrudtest-2729"), // Type: to.Ptr("Microsoft.Sql/servers/elasticPools"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-2729"), // Location: to.Ptr("Japan East"), // Properties: &armsql.ElasticPoolProperties{ // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-10T01:27:21.320Z"); return t}()), // LicenseType: to.Ptr(armsql.ElasticPoolLicenseTypeLicenseIncluded), // MaxSizeBytes: to.Ptr[int64](5242880000), // PerDatabaseSettings: &armsql.ElasticPoolPerDatabaseSettings{ // MaxCapacity: to.Ptr[float64](1), // MinCapacity: to.Ptr[float64](0.25), // }, // State: to.Ptr(armsql.ElasticPoolStateReady), // ZoneRedundant: to.Ptr(true), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen4_2"), // Capacity: to.Ptr[int32](2), // Tier: to.Ptr("GeneralPurpose"), // }, // }, // { // Name: to.Ptr("sqlcrudtest-3191"), // Type: to.Ptr("Microsoft.Sql/servers/elasticPools"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-3191"), // Location: to.Ptr("Japan East"), // Properties: &armsql.ElasticPoolProperties{ // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-10T01:26:26.450Z"); return t}()), // MaxSizeBytes: to.Ptr[int64](5242880000), // PerDatabaseSettings: &armsql.ElasticPoolPerDatabaseSettings{ // MaxCapacity: to.Ptr[float64](5), // MinCapacity: to.Ptr[float64](0), // }, // State: to.Ptr(armsql.ElasticPoolStateReady), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("BasicPool"), // Capacity: to.Ptr[int32](50), // Tier: to.Ptr("Basic"), // }, // }, // { // Name: to.Ptr("sqlcrudtest-8102"), // Type: to.Ptr("Microsoft.Sql/servers/elasticPools"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102"), // Location: to.Ptr("Japan East"), // Properties: &armsql.ElasticPoolProperties{ // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-10T01:25:25.033Z"); return t}()), // MaxSizeBytes: to.Ptr[int64](5242880000), // PerDatabaseSettings: &armsql.ElasticPoolPerDatabaseSettings{ // MaxCapacity: to.Ptr[float64](5), // MinCapacity: to.Ptr[float64](0), // }, // State: to.Ptr(armsql.ElasticPoolStateReady), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("BasicPool"), // Capacity: to.Ptr[int32](50), // Tier: to.Ptr("Basic"), // }, // }}, // } } }
Output:
func (*ElasticPoolsClient) NewListMetricDefinitionsPager ¶ added in v0.5.0
func (client *ElasticPoolsClient) NewListMetricDefinitionsPager(resourceGroupName string, serverName string, elasticPoolName string, options *ElasticPoolsClientListMetricDefinitionsOptions) *runtime.Pager[ElasticPoolsClientListMetricDefinitionsResponse]
NewListMetricDefinitionsPager - Returns elastic pool metric definitions.
Generated from API version 2014-04-01
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- elasticPoolName - The name of the elastic pool.
- options - ElasticPoolsClientListMetricDefinitionsOptions contains the optional parameters for the ElasticPoolsClient.NewListMetricDefinitionsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ElasticPoolMetricsDefinitionsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewElasticPoolsClient().NewListMetricDefinitionsPager("sqlcrudtest-6730", "sqlcrudtest-9007", "3481", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.MetricDefinitionListResult = armsql.MetricDefinitionListResult{ // Value: []*armsql.MetricDefinition{ // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("CPU percentage"), // Value: to.Ptr("cpu_percent"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("PT1H"), // TimeGrain: to.Ptr("PT15S"), // }, // { // Retention: to.Ptr("PT1H"), // TimeGrain: to.Ptr("PT60S"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeAverage), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypePercent), // }, // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("Data IO percentage"), // Value: to.Ptr("physical_data_read_percent"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("PT1H"), // TimeGrain: to.Ptr("PT15S"), // }, // { // Retention: to.Ptr("PT1H"), // TimeGrain: to.Ptr("PT60S"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeAverage), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypePercent), // }, // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("Log IO percentage"), // Value: to.Ptr("log_write_percent"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("PT1H"), // TimeGrain: to.Ptr("PT15S"), // }, // { // Retention: to.Ptr("PT1H"), // TimeGrain: to.Ptr("PT60S"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeAverage), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypePercent), // }, // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("DTU percentage"), // Value: to.Ptr("dtu_consumption_percent"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("PT1H"), // TimeGrain: to.Ptr("PT15S"), // }, // { // Retention: to.Ptr("PT1H"), // TimeGrain: to.Ptr("PT60S"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeAverage), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypePercent), // }, // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("Total database size"), // Value: to.Ptr("storage"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeMaximum), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypeBytes), // }, // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("In-Memory OLTP storage percent"), // Value: to.Ptr("xtp_storage_percent"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("PT1H"), // TimeGrain: to.Ptr("PT15S"), // }, // { // Retention: to.Ptr("PT1H"), // TimeGrain: to.Ptr("PT60S"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeAverage), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypePercent), // }, // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("Workers percentage"), // Value: to.Ptr("workers_percent"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeAverage), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypePercent), // }, // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("Sessions percentage"), // Value: to.Ptr("sessions_percent"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeAverage), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypePercent), // }, // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("DTU limit"), // Value: to.Ptr("dtu_limit"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeAverage), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypeCount), // }, // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("DTU used"), // Value: to.Ptr("dtu_used"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeAverage), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypeCount), // }, // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("Successful Connections"), // Value: to.Ptr("connection_successful"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeTotal), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypeCount), // }, // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("Failed Connections"), // Value: to.Ptr("connection_failed"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeTotal), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypeCount), // }, // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("Blocked by Firewall"), // Value: to.Ptr("blocked_by_firewall"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeTotal), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypeCount), // }, // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("Deadlocks"), // Value: to.Ptr("deadlock"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeTotal), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypeCount), // }, // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("Database size percentage"), // Value: to.Ptr("storage_percent"), // }, // MetricAvailabilities: []*armsql.MetricAvailability{ // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT5M"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("PT1H"), // }, // { // Retention: to.Ptr("P14D"), // TimeGrain: to.Ptr("P1D"), // }}, // PrimaryAggregationType: to.Ptr(armsql.PrimaryAggregationTypeMaximum), // ResourceURI: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1"), // Unit: to.Ptr(armsql.UnitDefinitionTypePercent), // }}, // } } }
Output:
func (*ElasticPoolsClient) NewListMetricsPager ¶ added in v0.5.0
func (client *ElasticPoolsClient) NewListMetricsPager(resourceGroupName string, serverName string, elasticPoolName string, filter string, options *ElasticPoolsClientListMetricsOptions) *runtime.Pager[ElasticPoolsClientListMetricsResponse]
NewListMetricsPager - Returns elastic pool metrics.
Generated from API version 2014-04-01
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- elasticPoolName - The name of the elastic pool.
- filter - An OData filter expression that describes a subset of metrics to return.
- options - ElasticPoolsClientListMetricsOptions contains the optional parameters for the ElasticPoolsClient.NewListMetricsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ElasticPoolMetricsListWithFilter.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewElasticPoolsClient().NewListMetricsPager("sqlcrudtest-6730", "sqlcrudtest-9007", "3481", "name/value eq 'cpu_percent' and timeGrain eq '00:10:00' and startTime eq '2017-06-02T18:35:00Z' and endTime eq '2017-06-02T18:55:00Z'", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.MetricListResult = armsql.MetricListResult{ // Value: []*armsql.Metric{ // { // Name: &armsql.MetricName{ // LocalizedValue: to.Ptr("CPU percentage"), // Value: to.Ptr("cpu_percent"), // }, // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-02T18:55:00.000Z"); return t}()), // MetricValues: []*armsql.MetricValue{ // { // Average: to.Ptr[float64](0), // Count: to.Ptr[int32](1), // Maximum: to.Ptr[float64](0), // Minimum: to.Ptr[float64](0), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-02T18:30:01.000Z"); return t}()), // Total: to.Ptr[float64](0), // }, // { // Average: to.Ptr[float64](0), // Count: to.Ptr[int32](1), // Maximum: to.Ptr[float64](0), // Minimum: to.Ptr[float64](0), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-02T18:40:01.000Z"); return t}()), // Total: to.Ptr[float64](0), // }, // { // Average: to.Ptr[float64](0), // Count: to.Ptr[int32](1), // Maximum: to.Ptr[float64](0), // Minimum: to.Ptr[float64](0), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-02T18:50:01.000Z"); return t}()), // Total: to.Ptr[float64](0), // }}, // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-02T18:35:00.000Z"); return t}()), // TimeGrain: to.Ptr("00:10:00"), // Unit: to.Ptr(armsql.UnitTypePercent), // }}, // } } }
Output:
type ElasticPoolsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ElasticPoolsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ElasticPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the ElasticPoolsClient.BeginCreateOrUpdate method.
type ElasticPoolsClientBeginDeleteOptions ¶ added in v0.3.0
type ElasticPoolsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ElasticPoolsClientBeginDeleteOptions contains the optional parameters for the ElasticPoolsClient.BeginDelete method.
type ElasticPoolsClientBeginFailoverOptions ¶ added in v0.3.0
type ElasticPoolsClientBeginFailoverOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ElasticPoolsClientBeginFailoverOptions contains the optional parameters for the ElasticPoolsClient.BeginFailover method.
type ElasticPoolsClientBeginUpdateOptions ¶ added in v0.3.0
type ElasticPoolsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ElasticPoolsClientBeginUpdateOptions contains the optional parameters for the ElasticPoolsClient.BeginUpdate method.
type ElasticPoolsClientCreateOrUpdateResponse ¶ added in v0.3.0
type ElasticPoolsClientCreateOrUpdateResponse struct { // An elastic pool. ElasticPool }
ElasticPoolsClientCreateOrUpdateResponse contains the response from method ElasticPoolsClient.BeginCreateOrUpdate.
type ElasticPoolsClientDeleteResponse ¶ added in v0.3.0
type ElasticPoolsClientDeleteResponse struct { }
ElasticPoolsClientDeleteResponse contains the response from method ElasticPoolsClient.BeginDelete.
type ElasticPoolsClientFailoverResponse ¶ added in v0.3.0
type ElasticPoolsClientFailoverResponse struct { }
ElasticPoolsClientFailoverResponse contains the response from method ElasticPoolsClient.BeginFailover.
type ElasticPoolsClientGetOptions ¶ added in v0.3.0
type ElasticPoolsClientGetOptions struct { }
ElasticPoolsClientGetOptions contains the optional parameters for the ElasticPoolsClient.Get method.
type ElasticPoolsClientGetResponse ¶ added in v0.3.0
type ElasticPoolsClientGetResponse struct { // An elastic pool. ElasticPool }
ElasticPoolsClientGetResponse contains the response from method ElasticPoolsClient.Get.
type ElasticPoolsClientListByServerOptions ¶ added in v0.3.0
type ElasticPoolsClientListByServerOptions struct { // The number of elements in the collection to skip. Skip *int64 }
ElasticPoolsClientListByServerOptions contains the optional parameters for the ElasticPoolsClient.NewListByServerPager method.
type ElasticPoolsClientListByServerResponse ¶ added in v0.3.0
type ElasticPoolsClientListByServerResponse struct { // The result of an elastic pool list request. ElasticPoolListResult }
ElasticPoolsClientListByServerResponse contains the response from method ElasticPoolsClient.NewListByServerPager.
type ElasticPoolsClientListMetricDefinitionsOptions ¶ added in v0.3.0
type ElasticPoolsClientListMetricDefinitionsOptions struct { }
ElasticPoolsClientListMetricDefinitionsOptions contains the optional parameters for the ElasticPoolsClient.NewListMetricDefinitionsPager method.
type ElasticPoolsClientListMetricDefinitionsResponse ¶ added in v0.3.0
type ElasticPoolsClientListMetricDefinitionsResponse struct { // The response to a list database metric definitions request. MetricDefinitionListResult }
ElasticPoolsClientListMetricDefinitionsResponse contains the response from method ElasticPoolsClient.NewListMetricDefinitionsPager.
type ElasticPoolsClientListMetricsOptions ¶ added in v0.3.0
type ElasticPoolsClientListMetricsOptions struct { }
ElasticPoolsClientListMetricsOptions contains the optional parameters for the ElasticPoolsClient.NewListMetricsPager method.
type ElasticPoolsClientListMetricsResponse ¶ added in v0.3.0
type ElasticPoolsClientListMetricsResponse struct { // The response to a list database metrics request. MetricListResult }
ElasticPoolsClientListMetricsResponse contains the response from method ElasticPoolsClient.NewListMetricsPager.
type ElasticPoolsClientUpdateResponse ¶ added in v0.3.0
type ElasticPoolsClientUpdateResponse struct { // An elastic pool. ElasticPool }
ElasticPoolsClientUpdateResponse contains the response from method ElasticPoolsClient.BeginUpdate.
type EncryptionProtector ¶
type EncryptionProtector struct { // Resource properties. Properties *EncryptionProtectorProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Kind of encryption protector. This is metadata used for the Azure portal experience. Kind *string // READ-ONLY; Resource location. Location *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
EncryptionProtector - The server encryption protector.
func (EncryptionProtector) MarshalJSON ¶
func (e EncryptionProtector) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EncryptionProtector.
func (*EncryptionProtector) UnmarshalJSON ¶ added in v1.1.0
func (e *EncryptionProtector) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionProtector.
type EncryptionProtectorListResult ¶
type EncryptionProtectorListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*EncryptionProtector }
EncryptionProtectorListResult - A list of server encryption protectors.
func (EncryptionProtectorListResult) MarshalJSON ¶
func (e EncryptionProtectorListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EncryptionProtectorListResult.
func (*EncryptionProtectorListResult) UnmarshalJSON ¶ added in v1.1.0
func (e *EncryptionProtectorListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionProtectorListResult.
type EncryptionProtectorName ¶
type EncryptionProtectorName string
const (
EncryptionProtectorNameCurrent EncryptionProtectorName = "current"
)
func PossibleEncryptionProtectorNameValues ¶
func PossibleEncryptionProtectorNameValues() []EncryptionProtectorName
PossibleEncryptionProtectorNameValues returns the possible values for the EncryptionProtectorName const type.
type EncryptionProtectorProperties ¶
type EncryptionProtectorProperties struct { // REQUIRED; The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. ServerKeyType *ServerKeyType // Key auto rotation opt-in flag. Either true or false. AutoRotationEnabled *bool // The name of the server key. ServerKeyName *string // READ-ONLY; Subregion of the encryption protector. Subregion *string // READ-ONLY; Thumbprint of the server key. Thumbprint *string // READ-ONLY; The URI of the server key. URI *string }
EncryptionProtectorProperties - Properties for an encryption protector execution.
func (EncryptionProtectorProperties) MarshalJSON ¶ added in v1.1.0
func (e EncryptionProtectorProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EncryptionProtectorProperties.
func (*EncryptionProtectorProperties) UnmarshalJSON ¶ added in v1.1.0
func (e *EncryptionProtectorProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionProtectorProperties.
type EncryptionProtectorsClient ¶
type EncryptionProtectorsClient struct {
// contains filtered or unexported fields
}
EncryptionProtectorsClient contains the methods for the EncryptionProtectors group. Don't use this type directly, use NewEncryptionProtectorsClient() instead.
func NewEncryptionProtectorsClient ¶
func NewEncryptionProtectorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EncryptionProtectorsClient, error)
NewEncryptionProtectorsClient creates a new instance of EncryptionProtectorsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*EncryptionProtectorsClient) BeginCreateOrUpdate ¶
func (client *EncryptionProtectorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, encryptionProtectorName EncryptionProtectorName, parameters EncryptionProtector, options *EncryptionProtectorsClientBeginCreateOrUpdateOptions) (*runtime.Poller[EncryptionProtectorsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Updates an existing encryption protector. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- encryptionProtectorName - The name of the encryption protector to be updated.
- parameters - The requested encryption protector resource state.
- options - EncryptionProtectorsClientBeginCreateOrUpdateOptions contains the optional parameters for the EncryptionProtectorsClient.BeginCreateOrUpdate method.
Example (UpdateTheEncryptionProtectorToKeyVault) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/EncryptionProtectorCreateOrUpdateKeyVault.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewEncryptionProtectorsClient().BeginCreateOrUpdate(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", armsql.EncryptionProtectorNameCurrent, armsql.EncryptionProtector{ Properties: &armsql.EncryptionProtectorProperties{ AutoRotationEnabled: to.Ptr(false), ServerKeyName: to.Ptr("someVault_someKey_01234567890123456789012345678901"), ServerKeyType: to.Ptr(armsql.ServerKeyTypeAzureKeyVault), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.EncryptionProtector = armsql.EncryptionProtector{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/servers/encryptionProtector"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/encryptionProtector/current"), // Kind: to.Ptr("azurekeyvault"), // Location: to.Ptr("West US"), // Properties: &armsql.EncryptionProtectorProperties{ // AutoRotationEnabled: to.Ptr(false), // ServerKeyName: to.Ptr("someVault_someKey_01234567890123456789012345678901"), // ServerKeyType: to.Ptr(armsql.ServerKeyTypeAzureKeyVault), // }, // } }
Output:
Example (UpdateTheEncryptionProtectorToServiceManaged) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/EncryptionProtectorCreateOrUpdateServiceManaged.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewEncryptionProtectorsClient().BeginCreateOrUpdate(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", armsql.EncryptionProtectorNameCurrent, armsql.EncryptionProtector{ Properties: &armsql.EncryptionProtectorProperties{ ServerKeyName: to.Ptr("ServiceManaged"), ServerKeyType: to.Ptr(armsql.ServerKeyTypeServiceManaged), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.EncryptionProtector = armsql.EncryptionProtector{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/servers/encryptionProtector"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/encryptionProtector/current"), // Kind: to.Ptr("servicemanaged"), // Location: to.Ptr("West US"), // Properties: &armsql.EncryptionProtectorProperties{ // ServerKeyName: to.Ptr("ServiceManaged"), // ServerKeyType: to.Ptr(armsql.ServerKeyTypeServiceManaged), // }, // } }
Output:
func (*EncryptionProtectorsClient) BeginRevalidate ¶
func (client *EncryptionProtectorsClient) BeginRevalidate(ctx context.Context, resourceGroupName string, serverName string, encryptionProtectorName EncryptionProtectorName, options *EncryptionProtectorsClientBeginRevalidateOptions) (*runtime.Poller[EncryptionProtectorsClientRevalidateResponse], error)
BeginRevalidate - Revalidates an existing encryption protector. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- encryptionProtectorName - The name of the encryption protector to be updated.
- options - EncryptionProtectorsClientBeginRevalidateOptions contains the optional parameters for the EncryptionProtectorsClient.BeginRevalidate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/EncryptionProtectorRevalidate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewEncryptionProtectorsClient().BeginRevalidate(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", armsql.EncryptionProtectorNameCurrent, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*EncryptionProtectorsClient) Get ¶
func (client *EncryptionProtectorsClient) Get(ctx context.Context, resourceGroupName string, serverName string, encryptionProtectorName EncryptionProtectorName, options *EncryptionProtectorsClientGetOptions) (EncryptionProtectorsClientGetResponse, error)
Get - Gets a server encryption protector. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- encryptionProtectorName - The name of the encryption protector to be retrieved.
- options - EncryptionProtectorsClientGetOptions contains the optional parameters for the EncryptionProtectorsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/EncryptionProtectorGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewEncryptionProtectorsClient().Get(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", armsql.EncryptionProtectorNameCurrent, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.EncryptionProtector = armsql.EncryptionProtector{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/servers/encryptionProtector"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/encryptionProtector/current"), // Kind: to.Ptr("azurekeyvault"), // Location: to.Ptr("Japan East"), // Properties: &armsql.EncryptionProtectorProperties{ // AutoRotationEnabled: to.Ptr(false), // ServerKeyName: to.Ptr("someVault_someKey_01234567890123456789012345678901"), // ServerKeyType: to.Ptr(armsql.ServerKeyTypeAzureKeyVault), // URI: to.Ptr("https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901"), // }, // } }
Output:
func (*EncryptionProtectorsClient) NewListByServerPager ¶ added in v0.5.0
func (client *EncryptionProtectorsClient) NewListByServerPager(resourceGroupName string, serverName string, options *EncryptionProtectorsClientListByServerOptions) *runtime.Pager[EncryptionProtectorsClientListByServerResponse]
NewListByServerPager - Gets a list of server encryption protectors
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - EncryptionProtectorsClientListByServerOptions contains the optional parameters for the EncryptionProtectorsClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/EncryptionProtectorList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewEncryptionProtectorsClient().NewListByServerPager("sqlcrudtest-7398", "sqlcrudtest-4645", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.EncryptionProtectorListResult = armsql.EncryptionProtectorListResult{ // Value: []*armsql.EncryptionProtector{ // { // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/servers/encryptionProtector"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/encryptionProtector/current"), // Kind: to.Ptr("azurekeyvault"), // Location: to.Ptr("Japan East"), // Properties: &armsql.EncryptionProtectorProperties{ // ServerKeyName: to.Ptr("someVault_someKey_01234567890123456789012345678901"), // ServerKeyType: to.Ptr(armsql.ServerKeyTypeAzureKeyVault), // URI: to.Ptr("https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901"), // }, // }}, // } } }
Output:
type EncryptionProtectorsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type EncryptionProtectorsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
EncryptionProtectorsClientBeginCreateOrUpdateOptions contains the optional parameters for the EncryptionProtectorsClient.BeginCreateOrUpdate method.
type EncryptionProtectorsClientBeginRevalidateOptions ¶ added in v0.3.0
type EncryptionProtectorsClientBeginRevalidateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
EncryptionProtectorsClientBeginRevalidateOptions contains the optional parameters for the EncryptionProtectorsClient.BeginRevalidate method.
type EncryptionProtectorsClientCreateOrUpdateResponse ¶ added in v0.3.0
type EncryptionProtectorsClientCreateOrUpdateResponse struct { // The server encryption protector. EncryptionProtector }
EncryptionProtectorsClientCreateOrUpdateResponse contains the response from method EncryptionProtectorsClient.BeginCreateOrUpdate.
type EncryptionProtectorsClientGetOptions ¶ added in v0.3.0
type EncryptionProtectorsClientGetOptions struct { }
EncryptionProtectorsClientGetOptions contains the optional parameters for the EncryptionProtectorsClient.Get method.
type EncryptionProtectorsClientGetResponse ¶ added in v0.3.0
type EncryptionProtectorsClientGetResponse struct { // The server encryption protector. EncryptionProtector }
EncryptionProtectorsClientGetResponse contains the response from method EncryptionProtectorsClient.Get.
type EncryptionProtectorsClientListByServerOptions ¶ added in v0.3.0
type EncryptionProtectorsClientListByServerOptions struct { }
EncryptionProtectorsClientListByServerOptions contains the optional parameters for the EncryptionProtectorsClient.NewListByServerPager method.
type EncryptionProtectorsClientListByServerResponse ¶ added in v0.3.0
type EncryptionProtectorsClientListByServerResponse struct { // A list of server encryption protectors. EncryptionProtectorListResult }
EncryptionProtectorsClientListByServerResponse contains the response from method EncryptionProtectorsClient.NewListByServerPager.
type EncryptionProtectorsClientRevalidateResponse ¶ added in v0.3.0
type EncryptionProtectorsClientRevalidateResponse struct { }
EncryptionProtectorsClientRevalidateResponse contains the response from method EncryptionProtectorsClient.BeginRevalidate.
type EndpointCertificate ¶ added in v0.4.0
type EndpointCertificate struct { // Resource properties. Properties *EndpointCertificateProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
EndpointCertificate - Certificate used on an endpoint on the Managed Instance.
func (EndpointCertificate) MarshalJSON ¶ added in v1.1.0
func (e EndpointCertificate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EndpointCertificate.
func (*EndpointCertificate) UnmarshalJSON ¶ added in v1.1.0
func (e *EndpointCertificate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EndpointCertificate.
type EndpointCertificateListResult ¶ added in v0.4.0
type EndpointCertificateListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*EndpointCertificate }
EndpointCertificateListResult - A list of endpoint certificates on the target instance.
func (EndpointCertificateListResult) MarshalJSON ¶ added in v0.4.0
func (e EndpointCertificateListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EndpointCertificateListResult.
func (*EndpointCertificateListResult) UnmarshalJSON ¶ added in v1.1.0
func (e *EndpointCertificateListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EndpointCertificateListResult.
type EndpointCertificateProperties ¶ added in v0.4.0
type EndpointCertificateProperties struct { // The certificate public blob PublicBlob *string }
EndpointCertificateProperties - The properties of an endpoint certificate.
func (EndpointCertificateProperties) MarshalJSON ¶ added in v1.1.0
func (e EndpointCertificateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EndpointCertificateProperties.
func (*EndpointCertificateProperties) UnmarshalJSON ¶ added in v1.1.0
func (e *EndpointCertificateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EndpointCertificateProperties.
type EndpointCertificatesClient ¶ added in v0.4.0
type EndpointCertificatesClient struct {
// contains filtered or unexported fields
}
EndpointCertificatesClient contains the methods for the EndpointCertificates group. Don't use this type directly, use NewEndpointCertificatesClient() instead.
func NewEndpointCertificatesClient ¶ added in v0.4.0
func NewEndpointCertificatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EndpointCertificatesClient, error)
NewEndpointCertificatesClient creates a new instance of EndpointCertificatesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*EndpointCertificatesClient) Get ¶ added in v0.4.0
func (client *EndpointCertificatesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, endpointType string, options *EndpointCertificatesClientGetOptions) (EndpointCertificatesClientGetResponse, error)
Get - Gets a certificate used on the endpoint with the given id. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- endpointType - Type of the endpoint whose certificate the customer is looking for.
- options - EndpointCertificatesClientGetOptions contains the optional parameters for the EndpointCertificatesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/EndpointCertificatesGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewEndpointCertificatesClient().Get(ctx, "testrg", "testcl", "DATABASE_MIRRORING", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.EndpointCertificate = armsql.EndpointCertificate{ // Name: to.Ptr("DATABASE_MIRRORING"), // Type: to.Ptr("Microsoft.Sql/managedInstances/endpointCertificates"), // ID: to.Ptr("/subscriptions/38e0dc56-907f-45ba-a97c-74233baad471/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/endpointCertificates/DATABASE_MIRRORING"), // Properties: &armsql.EndpointCertificateProperties{ // PublicBlob: to.Ptr("0x308203B23082021AA003020102021034C597BA"), // }, // } }
Output:
func (*EndpointCertificatesClient) NewListByInstancePager ¶ added in v0.5.0
func (client *EndpointCertificatesClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, options *EndpointCertificatesClientListByInstanceOptions) *runtime.Pager[EndpointCertificatesClientListByInstanceResponse]
NewListByInstancePager - List certificates used on endpoints on the target instance.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - EndpointCertificatesClientListByInstanceOptions contains the optional parameters for the EndpointCertificatesClient.NewListByInstancePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/EndpointCertificatesListByInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewEndpointCertificatesClient().NewListByInstancePager("testrg", "testcl", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.EndpointCertificateListResult = armsql.EndpointCertificateListResult{ // Value: []*armsql.EndpointCertificate{ // { // Name: to.Ptr("SERVICE_BROKER"), // Type: to.Ptr("Microsoft.Sql/managedInstances/endpointCertificates"), // ID: to.Ptr("/subscriptions/38e0dc56-907f-45ba-a97c-74233baad471/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/endpointCertificates/SERVICE_BROKER"), // Properties: &armsql.EndpointCertificateProperties{ // PublicBlob: to.Ptr("0x308203B23082021AA003020102021034C597BA"), // }, // }, // { // Name: to.Ptr("DATABASE_MIRRORING"), // Type: to.Ptr("Microsoft.Sql/managedInstances/endpointCertificates"), // ID: to.Ptr("/subscriptions/38e0dc56-907f-45ba-a97c-74233baad471/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/endpointCertificates/DATABASE_MIRRORING"), // Properties: &armsql.EndpointCertificateProperties{ // PublicBlob: to.Ptr("0x308203B23082021AA003020102021034C597BA"), // }, // }}, // } } }
Output:
type EndpointCertificatesClientGetOptions ¶ added in v0.4.0
type EndpointCertificatesClientGetOptions struct { }
EndpointCertificatesClientGetOptions contains the optional parameters for the EndpointCertificatesClient.Get method.
type EndpointCertificatesClientGetResponse ¶ added in v0.4.0
type EndpointCertificatesClientGetResponse struct { // Certificate used on an endpoint on the Managed Instance. EndpointCertificate }
EndpointCertificatesClientGetResponse contains the response from method EndpointCertificatesClient.Get.
type EndpointCertificatesClientListByInstanceOptions ¶ added in v0.4.0
type EndpointCertificatesClientListByInstanceOptions struct { }
EndpointCertificatesClientListByInstanceOptions contains the optional parameters for the EndpointCertificatesClient.NewListByInstancePager method.
type EndpointCertificatesClientListByInstanceResponse ¶ added in v0.4.0
type EndpointCertificatesClientListByInstanceResponse struct { // A list of endpoint certificates on the target instance. EndpointCertificateListResult }
EndpointCertificatesClientListByInstanceResponse contains the response from method EndpointCertificatesClient.NewListByInstancePager.
type ExportDatabaseDefinition ¶
type ExportDatabaseDefinition struct { // REQUIRED; Administrator login name. AdministratorLogin *string // REQUIRED; Administrator login password. AdministratorLoginPassword *string // REQUIRED; Storage key. StorageKey *string // REQUIRED; Storage key type. StorageKeyType *StorageKeyType // REQUIRED; Storage Uri. StorageURI *string // Authentication type. AuthenticationType *string // Optional resource information to enable network isolation for request. NetworkIsolation *NetworkIsolationSettings }
ExportDatabaseDefinition - Contains the information necessary to perform export database operation.
func (ExportDatabaseDefinition) MarshalJSON ¶ added in v1.1.0
func (e ExportDatabaseDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExportDatabaseDefinition.
func (*ExportDatabaseDefinition) UnmarshalJSON ¶ added in v1.1.0
func (e *ExportDatabaseDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExportDatabaseDefinition.
type ExtendedDatabaseBlobAuditingPoliciesClient ¶
type ExtendedDatabaseBlobAuditingPoliciesClient struct {
// contains filtered or unexported fields
}
ExtendedDatabaseBlobAuditingPoliciesClient contains the methods for the ExtendedDatabaseBlobAuditingPolicies group. Don't use this type directly, use NewExtendedDatabaseBlobAuditingPoliciesClient() instead.
func NewExtendedDatabaseBlobAuditingPoliciesClient ¶
func NewExtendedDatabaseBlobAuditingPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExtendedDatabaseBlobAuditingPoliciesClient, error)
NewExtendedDatabaseBlobAuditingPoliciesClient creates a new instance of ExtendedDatabaseBlobAuditingPoliciesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ExtendedDatabaseBlobAuditingPoliciesClient) CreateOrUpdate ¶
func (client *ExtendedDatabaseBlobAuditingPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ExtendedDatabaseBlobAuditingPolicy, options *ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions) (ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates an extended database's blob auditing policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- parameters - The extended database blob auditing policy.
- options - ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ExtendedDatabaseBlobAuditingPoliciesClient.CreateOrUpdate method.
Example (CreateOrUpdateAnExtendedDatabasesAzureMonitorAuditingPolicyWithMinimalParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ExtendedDatabaseAzureMonitorAuditingCreateMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewExtendedDatabaseBlobAuditingPoliciesClient().CreateOrUpdate(ctx, "blobauditingtest-4799", "blobauditingtest-6440", "testdb", armsql.ExtendedDatabaseBlobAuditingPolicy{ Properties: &armsql.ExtendedDatabaseBlobAuditingPolicyProperties{ IsAzureMonitorTargetEnabled: to.Ptr(true), State: to.Ptr(armsql.BlobAuditingPolicyStateEnabled), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ExtendedDatabaseBlobAuditingPolicy = armsql.ExtendedDatabaseBlobAuditingPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/extendedAuditingSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb"), // Properties: &armsql.ExtendedDatabaseBlobAuditingPolicyProperties{ // AuditActionsAndGroups: []*string{ // to.Ptr("SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP"), // to.Ptr("FAILED_DATABASE_AUTHENTICATION_GROUP"), // to.Ptr("BATCH_COMPLETED_GROUP")}, // IsAzureMonitorTargetEnabled: to.Ptr(true), // RetentionDays: to.Ptr[int32](0), // State: to.Ptr(armsql.BlobAuditingPolicyStateEnabled), // StorageAccountSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"), // }, // } }
Output:
Example (CreateOrUpdateAnExtendedDatabasesBlobAuditingPolicyWithAllParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewExtendedDatabaseBlobAuditingPoliciesClient().CreateOrUpdate(ctx, "blobauditingtest-4799", "blobauditingtest-6440", "testdb", armsql.ExtendedDatabaseBlobAuditingPolicy{ Properties: &armsql.ExtendedDatabaseBlobAuditingPolicyProperties{ AuditActionsAndGroups: []*string{ to.Ptr("DATABASE_LOGOUT_GROUP"), to.Ptr("DATABASE_ROLE_MEMBER_CHANGE_GROUP"), to.Ptr("UPDATE on database::TestDatabaseName by public")}, IsAzureMonitorTargetEnabled: to.Ptr(true), IsStorageSecondaryKeyInUse: to.Ptr(false), PredicateExpression: to.Ptr("statement = 'select 1'"), QueueDelayMs: to.Ptr[int32](4000), RetentionDays: to.Ptr[int32](6), State: to.Ptr(armsql.BlobAuditingPolicyStateEnabled), StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), StorageAccountSubscriptionID: to.Ptr("00000000-1234-0000-5678-000000000000"), StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ExtendedDatabaseBlobAuditingPolicy = armsql.ExtendedDatabaseBlobAuditingPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/extendedAuditingSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb"), // Properties: &armsql.ExtendedDatabaseBlobAuditingPolicyProperties{ // AuditActionsAndGroups: []*string{ // to.Ptr("DATABASE_LOGOUT_GROUP"), // to.Ptr("DATABASE_ROLE_MEMBER_CHANGE_GROUP"), // to.Ptr("UPDATE on database::TestDatabaseName by public")}, // IsAzureMonitorTargetEnabled: to.Ptr(true), // IsStorageSecondaryKeyInUse: to.Ptr(false), // PredicateExpression: to.Ptr("statement = 'select 1'"), // QueueDelayMs: to.Ptr[int32](4000), // RetentionDays: to.Ptr[int32](0), // State: to.Ptr(armsql.BlobAuditingPolicyStateEnabled), // StorageAccountSubscriptionID: to.Ptr("00000000-1234-0000-5678-000000000000"), // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), // }, // } }
Output:
Example (CreateOrUpdateAnExtendedDatabasesBlobAuditingPolicyWithMinimalParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewExtendedDatabaseBlobAuditingPoliciesClient().CreateOrUpdate(ctx, "blobauditingtest-4799", "blobauditingtest-6440", "testdb", armsql.ExtendedDatabaseBlobAuditingPolicy{ Properties: &armsql.ExtendedDatabaseBlobAuditingPolicyProperties{ State: to.Ptr(armsql.BlobAuditingPolicyStateEnabled), StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ExtendedDatabaseBlobAuditingPolicy = armsql.ExtendedDatabaseBlobAuditingPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/extendedAuditingSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/databases/testdb"), // Properties: &armsql.ExtendedDatabaseBlobAuditingPolicyProperties{ // AuditActionsAndGroups: []*string{ // to.Ptr("SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP"), // to.Ptr("FAILED_DATABASE_AUTHENTICATION_GROUP"), // to.Ptr("BATCH_COMPLETED_GROUP")}, // IsAzureMonitorTargetEnabled: to.Ptr(false), // IsStorageSecondaryKeyInUse: to.Ptr(false), // RetentionDays: to.Ptr[int32](0), // State: to.Ptr(armsql.BlobAuditingPolicyStateEnabled), // StorageAccountSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"), // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), // }, // } }
Output:
func (*ExtendedDatabaseBlobAuditingPoliciesClient) Get ¶
func (client *ExtendedDatabaseBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *ExtendedDatabaseBlobAuditingPoliciesClientGetOptions) (ExtendedDatabaseBlobAuditingPoliciesClientGetResponse, error)
Get - Gets an extended database's blob auditing policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - ExtendedDatabaseBlobAuditingPoliciesClientGetOptions contains the optional parameters for the ExtendedDatabaseBlobAuditingPoliciesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ExtendedDatabaseBlobAuditingGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewExtendedDatabaseBlobAuditingPoliciesClient().Get(ctx, "blobauditingtest-6852", "blobauditingtest-2080", "testdb", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ExtendedDatabaseBlobAuditingPolicy = armsql.ExtendedDatabaseBlobAuditingPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/extendedAuditingSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/databases/testdb"), // Properties: &armsql.ExtendedDatabaseBlobAuditingPolicyProperties{ // AuditActionsAndGroups: []*string{ // }, // IsAzureMonitorTargetEnabled: to.Ptr(false), // IsManagedIdentityInUse: to.Ptr(false), // IsStorageSecondaryKeyInUse: to.Ptr(false), // PredicateExpression: to.Ptr("statement = 'select 1'"), // RetentionDays: to.Ptr[int32](0), // State: to.Ptr(armsql.BlobAuditingPolicyStateDisabled), // StorageAccountSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"), // StorageEndpoint: to.Ptr(""), // }, // } }
Output:
func (*ExtendedDatabaseBlobAuditingPoliciesClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *ExtendedDatabaseBlobAuditingPoliciesClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseOptions) *runtime.Pager[ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseResponse]
NewListByDatabasePager - Lists extended auditing settings of a database.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseOptions contains the optional parameters for the ExtendedDatabaseBlobAuditingPoliciesClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DatabaseExtendedAuditingSettingsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewExtendedDatabaseBlobAuditingPoliciesClient().NewListByDatabasePager("blobauditingtest-6852", "blobauditingtest-2080", "testdb", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ExtendedDatabaseBlobAuditingPolicyListResult = armsql.ExtendedDatabaseBlobAuditingPolicyListResult{ // Value: []*armsql.ExtendedDatabaseBlobAuditingPolicy{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/extendedAuditingSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/databases/testdb/extendedAuditingSettings/default"), // Properties: &armsql.ExtendedDatabaseBlobAuditingPolicyProperties{ // AuditActionsAndGroups: []*string{ // }, // IsAzureMonitorTargetEnabled: to.Ptr(false), // IsManagedIdentityInUse: to.Ptr(false), // IsStorageSecondaryKeyInUse: to.Ptr(false), // PredicateExpression: to.Ptr("statement = 'select 1'"), // RetentionDays: to.Ptr[int32](0), // State: to.Ptr(armsql.BlobAuditingPolicyStateDisabled), // StorageAccountSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"), // StorageEndpoint: to.Ptr(""), // }, // }}, // } } }
Output:
type ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions ¶ added in v0.3.0
type ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions struct { }
ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ExtendedDatabaseBlobAuditingPoliciesClient.CreateOrUpdate method.
type ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse struct { // An extended database blob auditing policy. ExtendedDatabaseBlobAuditingPolicy }
ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse contains the response from method ExtendedDatabaseBlobAuditingPoliciesClient.CreateOrUpdate.
type ExtendedDatabaseBlobAuditingPoliciesClientGetOptions ¶ added in v0.3.0
type ExtendedDatabaseBlobAuditingPoliciesClientGetOptions struct { }
ExtendedDatabaseBlobAuditingPoliciesClientGetOptions contains the optional parameters for the ExtendedDatabaseBlobAuditingPoliciesClient.Get method.
type ExtendedDatabaseBlobAuditingPoliciesClientGetResponse ¶ added in v0.3.0
type ExtendedDatabaseBlobAuditingPoliciesClientGetResponse struct { // An extended database blob auditing policy. ExtendedDatabaseBlobAuditingPolicy }
ExtendedDatabaseBlobAuditingPoliciesClientGetResponse contains the response from method ExtendedDatabaseBlobAuditingPoliciesClient.Get.
type ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseOptions ¶ added in v0.3.0
type ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseOptions struct { }
ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseOptions contains the optional parameters for the ExtendedDatabaseBlobAuditingPoliciesClient.NewListByDatabasePager method.
type ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseResponse ¶ added in v0.3.0
type ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseResponse struct { // A list of database extended auditing settings. ExtendedDatabaseBlobAuditingPolicyListResult }
ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseResponse contains the response from method ExtendedDatabaseBlobAuditingPoliciesClient.NewListByDatabasePager.
type ExtendedDatabaseBlobAuditingPolicy ¶
type ExtendedDatabaseBlobAuditingPolicy struct { // Resource properties. Properties *ExtendedDatabaseBlobAuditingPolicyProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ExtendedDatabaseBlobAuditingPolicy - An extended database blob auditing policy.
func (ExtendedDatabaseBlobAuditingPolicy) MarshalJSON ¶
func (e ExtendedDatabaseBlobAuditingPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExtendedDatabaseBlobAuditingPolicy.
func (*ExtendedDatabaseBlobAuditingPolicy) UnmarshalJSON ¶ added in v1.1.0
func (e *ExtendedDatabaseBlobAuditingPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedDatabaseBlobAuditingPolicy.
type ExtendedDatabaseBlobAuditingPolicyListResult ¶
type ExtendedDatabaseBlobAuditingPolicyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ExtendedDatabaseBlobAuditingPolicy }
ExtendedDatabaseBlobAuditingPolicyListResult - A list of database extended auditing settings.
func (ExtendedDatabaseBlobAuditingPolicyListResult) MarshalJSON ¶
func (e ExtendedDatabaseBlobAuditingPolicyListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExtendedDatabaseBlobAuditingPolicyListResult.
func (*ExtendedDatabaseBlobAuditingPolicyListResult) UnmarshalJSON ¶ added in v1.1.0
func (e *ExtendedDatabaseBlobAuditingPolicyListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedDatabaseBlobAuditingPolicyListResult.
type ExtendedDatabaseBlobAuditingPolicyProperties ¶
type ExtendedDatabaseBlobAuditingPolicyProperties struct { // REQUIRED; Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. State *BlobAuditingPolicyState // Specifies the Actions-Groups and Actions to audit. // The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures // executed against the database, as well as successful and failed logins: // BATCHCOMPLETEDGROUP, SUCCESSFULDATABASEAUTHENTICATIONGROUP, FAILEDDATABASEAUTHENTICATIONGROUP. // This above combination is also the set that is configured by default when enabling auditing from the Azure portal. // The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary // groups could lead to very large quantities of audit records): // APPLICATIONROLECHANGEPASSWORDGROUP BACKUPRESTOREGROUP DATABASELOGOUTGROUP DATABASEOBJECTCHANGEGROUP DATABASEOBJECTOWNERSHIPCHANGEGROUP // DATABASEOBJECTPERMISSIONCHANGEGROUP DATABASEOPERATIONGROUP // DATABASEPERMISSIONCHANGEGROUP DATABASEPRINCIPALCHANGEGROUP DATABASEPRINCIPALIMPERSONATIONGROUP DATABASEROLEMEMBERCHANGEGROUP // FAILEDDATABASEAUTHENTICATIONGROUP SCHEMAOBJECTACCESSGROUP SCHEMAOBJECT // CHANGEGROUP SCHEMAOBJECTOWNERSHIPCHANGEGROUP SCHEMAOBJECTPERMISSIONCHANGEGROUP SUCCESSFULDATABASEAUTHENTICATIONGROUP USERCHANGEPASSWORDGROUP // BATCHSTARTEDGROUP BATCHCOMPLETEDGROUP DBCCGROUP DATABASE // OWNERSHIPCHANGEGROUP DATABASECHANGEGROUP LEDGEROPERATION_GROUP // These are groups that cover all sql statements and stored procedures executed against the database, and should not be used // in combination with other groups as this will result in duplicate audit logs. // For more information, see Database-Level Audit Action Groups // [https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups]. // For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server // auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE // EXECUTE RECEIVE REFERENCES // The general form for defining an action to be audited is: {action} ON {object} BY {principal} // Note that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or // schema. For the latter cases, the forms DATABASE::{dbname} and SCHEMA::{schema // name} are used, respectively. // For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on SCHEMA::mySchema by public // For more information, see Database-Level Audit Actions // [https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions] AuditActionsAndGroups []*string // Specifies whether audit events are sent to Azure Monitor. In order to send the events to Azure Monitor, specify 'State' // as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true. // When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on // the database should be also created. Note that for server level audit you // should use the 'master' database as {databaseName}. // Diagnostic Settings URI format: PUT // https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview // For more information, see Diagnostic Settings REST API [https://go.microsoft.com/fwlink/?linkid=2033207]or Diagnostic Settings // PowerShell [https://go.microsoft.com/fwlink/?linkid=2033043] IsAzureMonitorTargetEnabled *bool // Specifies whether Managed Identity is used to access blob storage IsManagedIdentityInUse *bool // Specifies whether storageAccountAccessKey value is the storage's secondary key. IsStorageSecondaryKeyInUse *bool // Specifies condition of where clause when creating an audit. PredicateExpression *string // Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. The default // minimum value is 1000 (1 second). The maximum is 2,147,483,647. QueueDelayMs *int32 // Specifies the number of days to keep in the audit logs in the storage account. RetentionDays *int32 // Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, not // specifying the storageAccountAccessKey will use SQL server system-assigned // managed identity to access the storage. Prerequisites for using managed identity authentication: // 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). // 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server // identity. For more information, see Auditing to storage using Managed // Identity authentication [https://go.microsoft.com/fwlink/?linkid=2114355] StorageAccountAccessKey *string // Specifies the blob storage subscription Id. StorageAccountSubscriptionID *string // Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint // or isAzureMonitorTargetEnabled is required. StorageEndpoint *string }
ExtendedDatabaseBlobAuditingPolicyProperties - Properties of an extended database blob auditing policy.
func (ExtendedDatabaseBlobAuditingPolicyProperties) MarshalJSON ¶
func (e ExtendedDatabaseBlobAuditingPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExtendedDatabaseBlobAuditingPolicyProperties.
func (*ExtendedDatabaseBlobAuditingPolicyProperties) UnmarshalJSON ¶ added in v1.1.0
func (e *ExtendedDatabaseBlobAuditingPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedDatabaseBlobAuditingPolicyProperties.
type ExtendedServerBlobAuditingPoliciesClient ¶
type ExtendedServerBlobAuditingPoliciesClient struct {
// contains filtered or unexported fields
}
ExtendedServerBlobAuditingPoliciesClient contains the methods for the ExtendedServerBlobAuditingPolicies group. Don't use this type directly, use NewExtendedServerBlobAuditingPoliciesClient() instead.
func NewExtendedServerBlobAuditingPoliciesClient ¶
func NewExtendedServerBlobAuditingPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExtendedServerBlobAuditingPoliciesClient, error)
NewExtendedServerBlobAuditingPoliciesClient creates a new instance of ExtendedServerBlobAuditingPoliciesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ExtendedServerBlobAuditingPoliciesClient) BeginCreateOrUpdate ¶
func (client *ExtendedServerBlobAuditingPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters ExtendedServerBlobAuditingPolicy, options *ExtendedServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ExtendedServerBlobAuditingPoliciesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates an extended server's blob auditing policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- parameters - Properties of extended blob auditing policy
- options - ExtendedServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ExtendedServerBlobAuditingPoliciesClient.BeginCreateOrUpdate method.
Example (UpdateAServersExtendedBlobAuditingPolicyWithAllParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ExtendedServerBlobAuditingCreateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewExtendedServerBlobAuditingPoliciesClient().BeginCreateOrUpdate(ctx, "blobauditingtest-4799", "blobauditingtest-6440", armsql.ExtendedServerBlobAuditingPolicy{ Properties: &armsql.ExtendedServerBlobAuditingPolicyProperties{ AuditActionsAndGroups: []*string{ to.Ptr("SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP"), to.Ptr("FAILED_DATABASE_AUTHENTICATION_GROUP"), to.Ptr("BATCH_COMPLETED_GROUP")}, IsAzureMonitorTargetEnabled: to.Ptr(true), IsStorageSecondaryKeyInUse: to.Ptr(false), PredicateExpression: to.Ptr("object_name = 'SensitiveData'"), QueueDelayMs: to.Ptr[int32](4000), RetentionDays: to.Ptr[int32](6), State: to.Ptr(armsql.BlobAuditingPolicyStateEnabled), StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), StorageAccountSubscriptionID: to.Ptr("00000000-1234-0000-5678-000000000000"), StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ExtendedServerBlobAuditingPolicy = armsql.ExtendedServerBlobAuditingPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/extendedAuditingSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/extendedAuditingSettings/default"), // Properties: &armsql.ExtendedServerBlobAuditingPolicyProperties{ // AuditActionsAndGroups: []*string{ // to.Ptr("SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP"), // to.Ptr("FAILED_DATABASE_AUTHENTICATION_GROUP"), // to.Ptr("BATCH_COMPLETED_GROUP")}, // IsAzureMonitorTargetEnabled: to.Ptr(true), // IsStorageSecondaryKeyInUse: to.Ptr(false), // PredicateExpression: to.Ptr("object_name = 'SensitiveData'"), // QueueDelayMs: to.Ptr[int32](4000), // RetentionDays: to.Ptr[int32](6), // State: to.Ptr(armsql.BlobAuditingPolicyStateEnabled), // StorageAccountSubscriptionID: to.Ptr("00000000-1234-0000-5678-000000000000"), // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), // }, // } }
Output:
Example (UpdateAServersExtendedBlobAuditingPolicyWithMinimalParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ExtendedServerBlobAuditingCreateMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewExtendedServerBlobAuditingPoliciesClient().BeginCreateOrUpdate(ctx, "blobauditingtest-4799", "blobauditingtest-6440", armsql.ExtendedServerBlobAuditingPolicy{ Properties: &armsql.ExtendedServerBlobAuditingPolicyProperties{ State: to.Ptr(armsql.BlobAuditingPolicyStateEnabled), StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ExtendedServerBlobAuditingPolicy = armsql.ExtendedServerBlobAuditingPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/extendedAuditingSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/extendedAuditingSettings/default"), // Properties: &armsql.ExtendedServerBlobAuditingPolicyProperties{ // AuditActionsAndGroups: []*string{ // to.Ptr("SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP"), // to.Ptr("FAILED_DATABASE_AUTHENTICATION_GROUP"), // to.Ptr("BATCH_COMPLETED_GROUP")}, // IsAzureMonitorTargetEnabled: to.Ptr(false), // IsStorageSecondaryKeyInUse: to.Ptr(false), // RetentionDays: to.Ptr[int32](6), // State: to.Ptr(armsql.BlobAuditingPolicyStateEnabled), // StorageAccountSubscriptionID: to.Ptr("00000000-1234-0000-5678-000000000000"), // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), // }, // } }
Output:
func (*ExtendedServerBlobAuditingPoliciesClient) Get ¶
func (client *ExtendedServerBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, options *ExtendedServerBlobAuditingPoliciesClientGetOptions) (ExtendedServerBlobAuditingPoliciesClientGetResponse, error)
Get - Gets an extended server's blob auditing policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - ExtendedServerBlobAuditingPoliciesClientGetOptions contains the optional parameters for the ExtendedServerBlobAuditingPoliciesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ExtendedServerBlobAuditingGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewExtendedServerBlobAuditingPoliciesClient().Get(ctx, "blobauditingtest-4799", "blobauditingtest-6440", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ExtendedServerBlobAuditingPolicy = armsql.ExtendedServerBlobAuditingPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/extendedAuditingSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/extendedAuditingSettings/default"), // Properties: &armsql.ExtendedServerBlobAuditingPolicyProperties{ // AuditActionsAndGroups: []*string{ // }, // IsAzureMonitorTargetEnabled: to.Ptr(false), // IsManagedIdentityInUse: to.Ptr(false), // IsStorageSecondaryKeyInUse: to.Ptr(false), // PredicateExpression: to.Ptr("object_name = 'SensitiveData'"), // RetentionDays: to.Ptr[int32](0), // State: to.Ptr(armsql.BlobAuditingPolicyStateDisabled), // StorageAccountSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"), // StorageEndpoint: to.Ptr(""), // }, // } }
Output:
func (*ExtendedServerBlobAuditingPoliciesClient) NewListByServerPager ¶ added in v0.5.0
func (client *ExtendedServerBlobAuditingPoliciesClient) NewListByServerPager(resourceGroupName string, serverName string, options *ExtendedServerBlobAuditingPoliciesClientListByServerOptions) *runtime.Pager[ExtendedServerBlobAuditingPoliciesClientListByServerResponse]
NewListByServerPager - Lists extended auditing settings of a server.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - ExtendedServerBlobAuditingPoliciesClientListByServerOptions contains the optional parameters for the ExtendedServerBlobAuditingPoliciesClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerExtendedAuditingSettingsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewExtendedServerBlobAuditingPoliciesClient().NewListByServerPager("blobauditingtest-4799", "blobauditingtest-6440", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ExtendedServerBlobAuditingPolicyListResult = armsql.ExtendedServerBlobAuditingPolicyListResult{ // Value: []*armsql.ExtendedServerBlobAuditingPolicy{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/extendedAuditingSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/extendedAuditingSettings/default"), // Properties: &armsql.ExtendedServerBlobAuditingPolicyProperties{ // AuditActionsAndGroups: []*string{ // }, // IsAzureMonitorTargetEnabled: to.Ptr(false), // IsManagedIdentityInUse: to.Ptr(false), // IsStorageSecondaryKeyInUse: to.Ptr(false), // PredicateExpression: to.Ptr("object_name = 'SensitiveData'"), // RetentionDays: to.Ptr[int32](0), // State: to.Ptr(armsql.BlobAuditingPolicyStateDisabled), // StorageAccountSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"), // StorageEndpoint: to.Ptr(""), // }, // }}, // } } }
Output:
type ExtendedServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ExtendedServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ExtendedServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ExtendedServerBlobAuditingPoliciesClient.BeginCreateOrUpdate method.
type ExtendedServerBlobAuditingPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ExtendedServerBlobAuditingPoliciesClientCreateOrUpdateResponse struct { // An extended server blob auditing policy. ExtendedServerBlobAuditingPolicy }
ExtendedServerBlobAuditingPoliciesClientCreateOrUpdateResponse contains the response from method ExtendedServerBlobAuditingPoliciesClient.BeginCreateOrUpdate.
type ExtendedServerBlobAuditingPoliciesClientGetOptions ¶ added in v0.3.0
type ExtendedServerBlobAuditingPoliciesClientGetOptions struct { }
ExtendedServerBlobAuditingPoliciesClientGetOptions contains the optional parameters for the ExtendedServerBlobAuditingPoliciesClient.Get method.
type ExtendedServerBlobAuditingPoliciesClientGetResponse ¶ added in v0.3.0
type ExtendedServerBlobAuditingPoliciesClientGetResponse struct { // An extended server blob auditing policy. ExtendedServerBlobAuditingPolicy }
ExtendedServerBlobAuditingPoliciesClientGetResponse contains the response from method ExtendedServerBlobAuditingPoliciesClient.Get.
type ExtendedServerBlobAuditingPoliciesClientListByServerOptions ¶ added in v0.3.0
type ExtendedServerBlobAuditingPoliciesClientListByServerOptions struct { }
ExtendedServerBlobAuditingPoliciesClientListByServerOptions contains the optional parameters for the ExtendedServerBlobAuditingPoliciesClient.NewListByServerPager method.
type ExtendedServerBlobAuditingPoliciesClientListByServerResponse ¶ added in v0.3.0
type ExtendedServerBlobAuditingPoliciesClientListByServerResponse struct { // A list of server extended auditing settings. ExtendedServerBlobAuditingPolicyListResult }
ExtendedServerBlobAuditingPoliciesClientListByServerResponse contains the response from method ExtendedServerBlobAuditingPoliciesClient.NewListByServerPager.
type ExtendedServerBlobAuditingPolicy ¶
type ExtendedServerBlobAuditingPolicy struct { // Resource properties. Properties *ExtendedServerBlobAuditingPolicyProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ExtendedServerBlobAuditingPolicy - An extended server blob auditing policy.
func (ExtendedServerBlobAuditingPolicy) MarshalJSON ¶
func (e ExtendedServerBlobAuditingPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExtendedServerBlobAuditingPolicy.
func (*ExtendedServerBlobAuditingPolicy) UnmarshalJSON ¶ added in v1.1.0
func (e *ExtendedServerBlobAuditingPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedServerBlobAuditingPolicy.
type ExtendedServerBlobAuditingPolicyListResult ¶
type ExtendedServerBlobAuditingPolicyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ExtendedServerBlobAuditingPolicy }
ExtendedServerBlobAuditingPolicyListResult - A list of server extended auditing settings.
func (ExtendedServerBlobAuditingPolicyListResult) MarshalJSON ¶
func (e ExtendedServerBlobAuditingPolicyListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExtendedServerBlobAuditingPolicyListResult.
func (*ExtendedServerBlobAuditingPolicyListResult) UnmarshalJSON ¶ added in v1.1.0
func (e *ExtendedServerBlobAuditingPolicyListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedServerBlobAuditingPolicyListResult.
type ExtendedServerBlobAuditingPolicyProperties ¶
type ExtendedServerBlobAuditingPolicyProperties struct { // REQUIRED; Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. State *BlobAuditingPolicyState // Specifies the Actions-Groups and Actions to audit. // The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures // executed against the database, as well as successful and failed logins: // BATCHCOMPLETEDGROUP, SUCCESSFULDATABASEAUTHENTICATIONGROUP, FAILEDDATABASEAUTHENTICATIONGROUP. // This above combination is also the set that is configured by default when enabling auditing from the Azure portal. // The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary // groups could lead to very large quantities of audit records): // APPLICATIONROLECHANGEPASSWORDGROUP BACKUPRESTOREGROUP DATABASELOGOUTGROUP DATABASEOBJECTCHANGEGROUP DATABASEOBJECTOWNERSHIPCHANGEGROUP // DATABASEOBJECTPERMISSIONCHANGEGROUP DATABASEOPERATIONGROUP // DATABASEPERMISSIONCHANGEGROUP DATABASEPRINCIPALCHANGEGROUP DATABASEPRINCIPALIMPERSONATIONGROUP DATABASEROLEMEMBERCHANGEGROUP // FAILEDDATABASEAUTHENTICATIONGROUP SCHEMAOBJECTACCESSGROUP SCHEMAOBJECT // CHANGEGROUP SCHEMAOBJECTOWNERSHIPCHANGEGROUP SCHEMAOBJECTPERMISSIONCHANGEGROUP SUCCESSFULDATABASEAUTHENTICATIONGROUP USERCHANGEPASSWORDGROUP // BATCHSTARTEDGROUP BATCHCOMPLETEDGROUP DBCCGROUP DATABASE // OWNERSHIPCHANGEGROUP DATABASECHANGEGROUP LEDGEROPERATION_GROUP // These are groups that cover all sql statements and stored procedures executed against the database, and should not be used // in combination with other groups as this will result in duplicate audit logs. // For more information, see Database-Level Audit Action Groups // [https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups]. // For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server // auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE // EXECUTE RECEIVE REFERENCES // The general form for defining an action to be audited is: {action} ON {object} BY {principal} // Note that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or // schema. For the latter cases, the forms DATABASE::{dbname} and SCHEMA::{schema // name} are used, respectively. // For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on SCHEMA::mySchema by public // For more information, see Database-Level Audit Actions // [https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions] AuditActionsAndGroups []*string // Specifies whether audit events are sent to Azure Monitor. In order to send the events to Azure Monitor, specify 'State' // as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true. // When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on // the database should be also created. Note that for server level audit you // should use the 'master' database as {databaseName}. // Diagnostic Settings URI format: PUT // https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview // For more information, see Diagnostic Settings REST API [https://go.microsoft.com/fwlink/?linkid=2033207]or Diagnostic Settings // PowerShell [https://go.microsoft.com/fwlink/?linkid=2033043] IsAzureMonitorTargetEnabled *bool // Specifies the state of devops audit. If state is Enabled, devops logs will be sent to Azure Monitor. In order to send the // events to Azure Monitor, specify 'State' as 'Enabled', // 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true // When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs category on // the master database should also be created. // Diagnostic Settings URI format: PUT // https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview // For more information, see Diagnostic Settings REST API [https://go.microsoft.com/fwlink/?linkid=2033207]or Diagnostic Settings // PowerShell [https://go.microsoft.com/fwlink/?linkid=2033043] IsDevopsAuditEnabled *bool // Specifies whether Managed Identity is used to access blob storage IsManagedIdentityInUse *bool // Specifies whether storageAccountAccessKey value is the storage's secondary key. IsStorageSecondaryKeyInUse *bool // Specifies condition of where clause when creating an audit. PredicateExpression *string // Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. The default // minimum value is 1000 (1 second). The maximum is 2,147,483,647. QueueDelayMs *int32 // Specifies the number of days to keep in the audit logs in the storage account. RetentionDays *int32 // Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, not // specifying the storageAccountAccessKey will use SQL server system-assigned // managed identity to access the storage. Prerequisites for using managed identity authentication: // 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). // 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server // identity. For more information, see Auditing to storage using Managed // Identity authentication [https://go.microsoft.com/fwlink/?linkid=2114355] StorageAccountAccessKey *string // Specifies the blob storage subscription Id. StorageAccountSubscriptionID *string // Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint // or isAzureMonitorTargetEnabled is required. StorageEndpoint *string }
ExtendedServerBlobAuditingPolicyProperties - Properties of an extended server blob auditing policy.
func (ExtendedServerBlobAuditingPolicyProperties) MarshalJSON ¶
func (e ExtendedServerBlobAuditingPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExtendedServerBlobAuditingPolicyProperties.
func (*ExtendedServerBlobAuditingPolicyProperties) UnmarshalJSON ¶ added in v1.1.0
func (e *ExtendedServerBlobAuditingPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedServerBlobAuditingPolicyProperties.
type FailoverGroup ¶
type FailoverGroup struct { // Resource properties. Properties *FailoverGroupProperties // Resource tags. Tags map[string]*string // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource location. Location *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
FailoverGroup - A failover group.
func (FailoverGroup) MarshalJSON ¶
func (f FailoverGroup) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FailoverGroup.
func (*FailoverGroup) UnmarshalJSON ¶ added in v1.1.0
func (f *FailoverGroup) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FailoverGroup.
type FailoverGroupListResult ¶
type FailoverGroupListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*FailoverGroup }
FailoverGroupListResult - A list of failover groups.
func (FailoverGroupListResult) MarshalJSON ¶
func (f FailoverGroupListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FailoverGroupListResult.
func (*FailoverGroupListResult) UnmarshalJSON ¶ added in v1.1.0
func (f *FailoverGroupListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FailoverGroupListResult.
type FailoverGroupProperties ¶
type FailoverGroupProperties struct { // REQUIRED; List of partner server information for the failover group. PartnerServers []*PartnerInfo // REQUIRED; Read-write endpoint of the failover group instance. ReadWriteEndpoint *FailoverGroupReadWriteEndpoint // List of databases in the failover group. Databases []*string // Read-only endpoint of the failover group instance. ReadOnlyEndpoint *FailoverGroupReadOnlyEndpoint // READ-ONLY; Local replication role of the failover group instance. ReplicationRole *FailoverGroupReplicationRole // READ-ONLY; Replication state of the failover group instance. ReplicationState *string }
FailoverGroupProperties - Properties of a failover group.
func (FailoverGroupProperties) MarshalJSON ¶
func (f FailoverGroupProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FailoverGroupProperties.
func (*FailoverGroupProperties) UnmarshalJSON ¶ added in v1.1.0
func (f *FailoverGroupProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FailoverGroupProperties.
type FailoverGroupReadOnlyEndpoint ¶
type FailoverGroupReadOnlyEndpoint struct { // Failover policy of the read-only endpoint for the failover group. FailoverPolicy *ReadOnlyEndpointFailoverPolicy }
FailoverGroupReadOnlyEndpoint - Read-only endpoint of the failover group instance.
func (FailoverGroupReadOnlyEndpoint) MarshalJSON ¶ added in v1.1.0
func (f FailoverGroupReadOnlyEndpoint) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FailoverGroupReadOnlyEndpoint.
func (*FailoverGroupReadOnlyEndpoint) UnmarshalJSON ¶ added in v1.1.0
func (f *FailoverGroupReadOnlyEndpoint) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FailoverGroupReadOnlyEndpoint.
type FailoverGroupReadWriteEndpoint ¶
type FailoverGroupReadWriteEndpoint struct { // REQUIRED; Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes // is required. FailoverPolicy *ReadWriteEndpointFailoverPolicy // Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then // failoverWithDataLossGracePeriodMinutes is required. FailoverWithDataLossGracePeriodMinutes *int32 }
FailoverGroupReadWriteEndpoint - Read-write endpoint of the failover group instance.
func (FailoverGroupReadWriteEndpoint) MarshalJSON ¶ added in v1.1.0
func (f FailoverGroupReadWriteEndpoint) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FailoverGroupReadWriteEndpoint.
func (*FailoverGroupReadWriteEndpoint) UnmarshalJSON ¶ added in v1.1.0
func (f *FailoverGroupReadWriteEndpoint) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FailoverGroupReadWriteEndpoint.
type FailoverGroupReplicationRole ¶
type FailoverGroupReplicationRole string
FailoverGroupReplicationRole - Local replication role of the failover group instance.
const ( FailoverGroupReplicationRolePrimary FailoverGroupReplicationRole = "Primary" FailoverGroupReplicationRoleSecondary FailoverGroupReplicationRole = "Secondary" )
func PossibleFailoverGroupReplicationRoleValues ¶
func PossibleFailoverGroupReplicationRoleValues() []FailoverGroupReplicationRole
PossibleFailoverGroupReplicationRoleValues returns the possible values for the FailoverGroupReplicationRole const type.
type FailoverGroupUpdate ¶
type FailoverGroupUpdate struct { // Resource properties. Properties *FailoverGroupUpdateProperties // Resource tags. Tags map[string]*string }
FailoverGroupUpdate - A failover group update request.
func (FailoverGroupUpdate) MarshalJSON ¶
func (f FailoverGroupUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FailoverGroupUpdate.
func (*FailoverGroupUpdate) UnmarshalJSON ¶ added in v1.1.0
func (f *FailoverGroupUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FailoverGroupUpdate.
type FailoverGroupUpdateProperties ¶
type FailoverGroupUpdateProperties struct { // List of databases in the failover group. Databases []*string // Read-only endpoint of the failover group instance. ReadOnlyEndpoint *FailoverGroupReadOnlyEndpoint // Read-write endpoint of the failover group instance. ReadWriteEndpoint *FailoverGroupReadWriteEndpoint }
FailoverGroupUpdateProperties - Properties of a failover group update.
func (FailoverGroupUpdateProperties) MarshalJSON ¶
func (f FailoverGroupUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FailoverGroupUpdateProperties.
func (*FailoverGroupUpdateProperties) UnmarshalJSON ¶ added in v1.1.0
func (f *FailoverGroupUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FailoverGroupUpdateProperties.
type FailoverGroupsClient ¶
type FailoverGroupsClient struct {
// contains filtered or unexported fields
}
FailoverGroupsClient contains the methods for the FailoverGroups group. Don't use this type directly, use NewFailoverGroupsClient() instead.
func NewFailoverGroupsClient ¶
func NewFailoverGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FailoverGroupsClient, error)
NewFailoverGroupsClient creates a new instance of FailoverGroupsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*FailoverGroupsClient) BeginCreateOrUpdate ¶
func (client *FailoverGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, parameters FailoverGroup, options *FailoverGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[FailoverGroupsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a failover group. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server containing the failover group.
- failoverGroupName - The name of the failover group.
- parameters - The failover group parameters.
- options - FailoverGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the FailoverGroupsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupCreateOrUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewFailoverGroupsClient().BeginCreateOrUpdate(ctx, "Default", "failover-group-primary-server", "failover-group-test-3", armsql.FailoverGroup{ Properties: &armsql.FailoverGroupProperties{ Databases: []*string{ to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1"), to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-2")}, PartnerServers: []*armsql.PartnerInfo{ { ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server"), }}, ReadOnlyEndpoint: &armsql.FailoverGroupReadOnlyEndpoint{ FailoverPolicy: to.Ptr(armsql.ReadOnlyEndpointFailoverPolicyDisabled), }, ReadWriteEndpoint: &armsql.FailoverGroupReadWriteEndpoint{ FailoverPolicy: to.Ptr(armsql.ReadWriteEndpointFailoverPolicyAutomatic), FailoverWithDataLossGracePeriodMinutes: to.Ptr[int32](480), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.FailoverGroup = armsql.FailoverGroup{ // Name: to.Ptr("failover-group-test-3"), // Type: to.Ptr("Microsoft.Sql/servers/failoverGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test-3"), // Location: to.Ptr("Japan East"), // Properties: &armsql.FailoverGroupProperties{ // Databases: []*string{ // to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1"), // to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-2")}, // PartnerServers: []*armsql.PartnerInfo{ // { // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server"), // Location: to.Ptr("Japan West"), // ReplicationRole: to.Ptr(armsql.FailoverGroupReplicationRoleSecondary), // }}, // ReadOnlyEndpoint: &armsql.FailoverGroupReadOnlyEndpoint{ // FailoverPolicy: to.Ptr(armsql.ReadOnlyEndpointFailoverPolicyDisabled), // }, // ReadWriteEndpoint: &armsql.FailoverGroupReadWriteEndpoint{ // FailoverPolicy: to.Ptr(armsql.ReadWriteEndpointFailoverPolicyAutomatic), // FailoverWithDataLossGracePeriodMinutes: to.Ptr[int32](480), // }, // ReplicationRole: to.Ptr(armsql.FailoverGroupReplicationRolePrimary), // ReplicationState: to.Ptr("CATCH_UP"), // }, // } }
Output:
func (*FailoverGroupsClient) BeginDelete ¶
func (client *FailoverGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, options *FailoverGroupsClientBeginDeleteOptions) (*runtime.Poller[FailoverGroupsClientDeleteResponse], error)
BeginDelete - Deletes a failover group. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server containing the failover group.
- failoverGroupName - The name of the failover group.
- options - FailoverGroupsClientBeginDeleteOptions contains the optional parameters for the FailoverGroupsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewFailoverGroupsClient().BeginDelete(ctx, "Default", "failover-group-primary-server", "failover-group-test-1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*FailoverGroupsClient) BeginFailover ¶
func (client *FailoverGroupsClient) BeginFailover(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, options *FailoverGroupsClientBeginFailoverOptions) (*runtime.Poller[FailoverGroupsClientFailoverResponse], error)
BeginFailover - Fails over from the current primary server to this server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server containing the failover group.
- failoverGroupName - The name of the failover group.
- options - FailoverGroupsClientBeginFailoverOptions contains the optional parameters for the FailoverGroupsClient.BeginFailover method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupFailover.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewFailoverGroupsClient().BeginFailover(ctx, "Default", "failover-group-secondary-server", "failover-group-test-3", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.FailoverGroup = armsql.FailoverGroup{ // Name: to.Ptr("failover-group-test-3"), // Type: to.Ptr("Microsoft.Sql/servers/failoverGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server/failoverGroups/failover-group-test-3"), // Location: to.Ptr("Japan West"), // Properties: &armsql.FailoverGroupProperties{ // Databases: []*string{ // to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server/databases/testdb-1"), // to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server/databases/testdb-2")}, // PartnerServers: []*armsql.PartnerInfo{ // { // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server"), // Location: to.Ptr("Japan East"), // ReplicationRole: to.Ptr(armsql.FailoverGroupReplicationRoleSecondary), // }}, // ReadOnlyEndpoint: &armsql.FailoverGroupReadOnlyEndpoint{ // FailoverPolicy: to.Ptr(armsql.ReadOnlyEndpointFailoverPolicyDisabled), // }, // ReadWriteEndpoint: &armsql.FailoverGroupReadWriteEndpoint{ // FailoverPolicy: to.Ptr(armsql.ReadWriteEndpointFailoverPolicyAutomatic), // FailoverWithDataLossGracePeriodMinutes: to.Ptr[int32](120), // }, // ReplicationRole: to.Ptr(armsql.FailoverGroupReplicationRolePrimary), // ReplicationState: to.Ptr("CATCH_UP"), // }, // } }
Output:
func (*FailoverGroupsClient) BeginForceFailoverAllowDataLoss ¶
func (client *FailoverGroupsClient) BeginForceFailoverAllowDataLoss(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, options *FailoverGroupsClientBeginForceFailoverAllowDataLossOptions) (*runtime.Poller[FailoverGroupsClientForceFailoverAllowDataLossResponse], error)
BeginForceFailoverAllowDataLoss - Fails over from the current primary server to this server. This operation might result in data loss. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server containing the failover group.
- failoverGroupName - The name of the failover group.
- options - FailoverGroupsClientBeginForceFailoverAllowDataLossOptions contains the optional parameters for the FailoverGroupsClient.BeginForceFailoverAllowDataLoss method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupForceFailoverAllowDataLoss.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewFailoverGroupsClient().BeginForceFailoverAllowDataLoss(ctx, "Default", "failover-group-secondary-server", "failover-group-test-3", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.FailoverGroup = armsql.FailoverGroup{ // Name: to.Ptr("failover-group-test-3"), // Type: to.Ptr("Microsoft.Sql/servers/failoverGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server/failoverGroups/failover-group-test-3"), // Location: to.Ptr("Japan West"), // Properties: &armsql.FailoverGroupProperties{ // Databases: []*string{ // to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server/databases/testdb-1"), // to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server/databases/testdb-2")}, // PartnerServers: []*armsql.PartnerInfo{ // { // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server"), // Location: to.Ptr("Japan East"), // ReplicationRole: to.Ptr(armsql.FailoverGroupReplicationRoleSecondary), // }}, // ReadOnlyEndpoint: &armsql.FailoverGroupReadOnlyEndpoint{ // FailoverPolicy: to.Ptr(armsql.ReadOnlyEndpointFailoverPolicyDisabled), // }, // ReadWriteEndpoint: &armsql.FailoverGroupReadWriteEndpoint{ // FailoverPolicy: to.Ptr(armsql.ReadWriteEndpointFailoverPolicyAutomatic), // FailoverWithDataLossGracePeriodMinutes: to.Ptr[int32](120), // }, // ReplicationRole: to.Ptr(armsql.FailoverGroupReplicationRolePrimary), // ReplicationState: to.Ptr("CATCH_UP"), // }, // } }
Output:
func (*FailoverGroupsClient) BeginUpdate ¶
func (client *FailoverGroupsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, parameters FailoverGroupUpdate, options *FailoverGroupsClientBeginUpdateOptions) (*runtime.Poller[FailoverGroupsClientUpdateResponse], error)
BeginUpdate - Updates a failover group. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server containing the failover group.
- failoverGroupName - The name of the failover group.
- parameters - The failover group parameters.
- options - FailoverGroupsClientBeginUpdateOptions contains the optional parameters for the FailoverGroupsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewFailoverGroupsClient().BeginUpdate(ctx, "Default", "failover-group-primary-server", "failover-group-test-1", armsql.FailoverGroupUpdate{ Properties: &armsql.FailoverGroupUpdateProperties{ Databases: []*string{ to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1")}, ReadWriteEndpoint: &armsql.FailoverGroupReadWriteEndpoint{ FailoverPolicy: to.Ptr(armsql.ReadWriteEndpointFailoverPolicyAutomatic), FailoverWithDataLossGracePeriodMinutes: to.Ptr[int32](120), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.FailoverGroup = armsql.FailoverGroup{ // Name: to.Ptr("failover-group-test-3"), // Type: to.Ptr("Microsoft.Sql/servers/failoverGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test-3"), // Location: to.Ptr("Japan East"), // Properties: &armsql.FailoverGroupProperties{ // Databases: []*string{ // to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1")}, // PartnerServers: []*armsql.PartnerInfo{ // { // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server"), // Location: to.Ptr("Japan West"), // ReplicationRole: to.Ptr(armsql.FailoverGroupReplicationRoleSecondary), // }}, // ReadOnlyEndpoint: &armsql.FailoverGroupReadOnlyEndpoint{ // FailoverPolicy: to.Ptr(armsql.ReadOnlyEndpointFailoverPolicyDisabled), // }, // ReadWriteEndpoint: &armsql.FailoverGroupReadWriteEndpoint{ // FailoverPolicy: to.Ptr(armsql.ReadWriteEndpointFailoverPolicyAutomatic), // FailoverWithDataLossGracePeriodMinutes: to.Ptr[int32](120), // }, // ReplicationRole: to.Ptr(armsql.FailoverGroupReplicationRolePrimary), // ReplicationState: to.Ptr("CATCH_UP"), // }, // } }
Output:
func (*FailoverGroupsClient) Get ¶
func (client *FailoverGroupsClient) Get(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, options *FailoverGroupsClientGetOptions) (FailoverGroupsClientGetResponse, error)
Get - Gets a failover group. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server containing the failover group.
- failoverGroupName - The name of the failover group.
- options - FailoverGroupsClientGetOptions contains the optional parameters for the FailoverGroupsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewFailoverGroupsClient().Get(ctx, "Default", "failover-group-primary-server", "failover-group-test", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.FailoverGroup = armsql.FailoverGroup{ // Name: to.Ptr("failover-group-test"), // Type: to.Ptr("Microsoft.Sql/servers/failoverGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test"), // Location: to.Ptr("Japan East"), // Properties: &armsql.FailoverGroupProperties{ // Databases: []*string{ // }, // PartnerServers: []*armsql.PartnerInfo{ // { // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server"), // Location: to.Ptr("Japan West"), // ReplicationRole: to.Ptr(armsql.FailoverGroupReplicationRoleSecondary), // }}, // ReadOnlyEndpoint: &armsql.FailoverGroupReadOnlyEndpoint{ // FailoverPolicy: to.Ptr(armsql.ReadOnlyEndpointFailoverPolicyDisabled), // }, // ReadWriteEndpoint: &armsql.FailoverGroupReadWriteEndpoint{ // FailoverPolicy: to.Ptr(armsql.ReadWriteEndpointFailoverPolicyAutomatic), // FailoverWithDataLossGracePeriodMinutes: to.Ptr[int32](480), // }, // ReplicationRole: to.Ptr(armsql.FailoverGroupReplicationRolePrimary), // ReplicationState: to.Ptr("CATCH_UP"), // }, // } }
Output:
func (*FailoverGroupsClient) NewListByServerPager ¶ added in v0.5.0
func (client *FailoverGroupsClient) NewListByServerPager(resourceGroupName string, serverName string, options *FailoverGroupsClientListByServerOptions) *runtime.Pager[FailoverGroupsClientListByServerResponse]
NewListByServerPager - Lists the failover groups in a server.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server containing the failover group.
- options - FailoverGroupsClientListByServerOptions contains the optional parameters for the FailoverGroupsClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewFailoverGroupsClient().NewListByServerPager("Default", "failover-group-primary-server", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.FailoverGroupListResult = armsql.FailoverGroupListResult{ // Value: []*armsql.FailoverGroup{ // { // Name: to.Ptr("failover-group-test"), // Type: to.Ptr("Microsoft.Sql/servers/failoverGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test"), // Location: to.Ptr("Japan East"), // Properties: &armsql.FailoverGroupProperties{ // Databases: []*string{ // }, // PartnerServers: []*armsql.PartnerInfo{ // { // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server"), // Location: to.Ptr("Japan West"), // ReplicationRole: to.Ptr(armsql.FailoverGroupReplicationRoleSecondary), // }}, // ReadOnlyEndpoint: &armsql.FailoverGroupReadOnlyEndpoint{ // FailoverPolicy: to.Ptr(armsql.ReadOnlyEndpointFailoverPolicyDisabled), // }, // ReadWriteEndpoint: &armsql.FailoverGroupReadWriteEndpoint{ // FailoverPolicy: to.Ptr(armsql.ReadWriteEndpointFailoverPolicyAutomatic), // FailoverWithDataLossGracePeriodMinutes: to.Ptr[int32](480), // }, // ReplicationRole: to.Ptr(armsql.FailoverGroupReplicationRolePrimary), // ReplicationState: to.Ptr("CATCH_UP"), // }, // }, // { // Name: to.Ptr("failover-group-test-2"), // Type: to.Ptr("Microsoft.Sql/servers/failoverGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/failoverGroups/failover-group-test-2"), // Location: to.Ptr("Japan East"), // Properties: &armsql.FailoverGroupProperties{ // Databases: []*string{ // }, // PartnerServers: []*armsql.PartnerInfo{ // { // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server"), // Location: to.Ptr("Japan West"), // ReplicationRole: to.Ptr(armsql.FailoverGroupReplicationRoleSecondary), // }}, // ReadOnlyEndpoint: &armsql.FailoverGroupReadOnlyEndpoint{ // FailoverPolicy: to.Ptr(armsql.ReadOnlyEndpointFailoverPolicyDisabled), // }, // ReadWriteEndpoint: &armsql.FailoverGroupReadWriteEndpoint{ // FailoverPolicy: to.Ptr(armsql.ReadWriteEndpointFailoverPolicyAutomatic), // FailoverWithDataLossGracePeriodMinutes: to.Ptr[int32](480), // }, // ReplicationRole: to.Ptr(armsql.FailoverGroupReplicationRolePrimary), // ReplicationState: to.Ptr("CATCH_UP"), // }, // }}, // } } }
Output:
type FailoverGroupsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type FailoverGroupsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
FailoverGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the FailoverGroupsClient.BeginCreateOrUpdate method.
type FailoverGroupsClientBeginDeleteOptions ¶ added in v0.3.0
type FailoverGroupsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
FailoverGroupsClientBeginDeleteOptions contains the optional parameters for the FailoverGroupsClient.BeginDelete method.
type FailoverGroupsClientBeginFailoverOptions ¶ added in v0.3.0
type FailoverGroupsClientBeginFailoverOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
FailoverGroupsClientBeginFailoverOptions contains the optional parameters for the FailoverGroupsClient.BeginFailover method.
type FailoverGroupsClientBeginForceFailoverAllowDataLossOptions ¶ added in v0.3.0
type FailoverGroupsClientBeginForceFailoverAllowDataLossOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
FailoverGroupsClientBeginForceFailoverAllowDataLossOptions contains the optional parameters for the FailoverGroupsClient.BeginForceFailoverAllowDataLoss method.
type FailoverGroupsClientBeginUpdateOptions ¶ added in v0.3.0
type FailoverGroupsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
FailoverGroupsClientBeginUpdateOptions contains the optional parameters for the FailoverGroupsClient.BeginUpdate method.
type FailoverGroupsClientCreateOrUpdateResponse ¶ added in v0.3.0
type FailoverGroupsClientCreateOrUpdateResponse struct { // A failover group. FailoverGroup }
FailoverGroupsClientCreateOrUpdateResponse contains the response from method FailoverGroupsClient.BeginCreateOrUpdate.
type FailoverGroupsClientDeleteResponse ¶ added in v0.3.0
type FailoverGroupsClientDeleteResponse struct { }
FailoverGroupsClientDeleteResponse contains the response from method FailoverGroupsClient.BeginDelete.
type FailoverGroupsClientFailoverResponse ¶ added in v0.3.0
type FailoverGroupsClientFailoverResponse struct { // A failover group. FailoverGroup }
FailoverGroupsClientFailoverResponse contains the response from method FailoverGroupsClient.BeginFailover.
type FailoverGroupsClientForceFailoverAllowDataLossResponse ¶ added in v0.3.0
type FailoverGroupsClientForceFailoverAllowDataLossResponse struct { // A failover group. FailoverGroup }
FailoverGroupsClientForceFailoverAllowDataLossResponse contains the response from method FailoverGroupsClient.BeginForceFailoverAllowDataLoss.
type FailoverGroupsClientGetOptions ¶ added in v0.3.0
type FailoverGroupsClientGetOptions struct { }
FailoverGroupsClientGetOptions contains the optional parameters for the FailoverGroupsClient.Get method.
type FailoverGroupsClientGetResponse ¶ added in v0.3.0
type FailoverGroupsClientGetResponse struct { // A failover group. FailoverGroup }
FailoverGroupsClientGetResponse contains the response from method FailoverGroupsClient.Get.
type FailoverGroupsClientListByServerOptions ¶ added in v0.3.0
type FailoverGroupsClientListByServerOptions struct { }
FailoverGroupsClientListByServerOptions contains the optional parameters for the FailoverGroupsClient.NewListByServerPager method.
type FailoverGroupsClientListByServerResponse ¶ added in v0.3.0
type FailoverGroupsClientListByServerResponse struct { // A list of failover groups. FailoverGroupListResult }
FailoverGroupsClientListByServerResponse contains the response from method FailoverGroupsClient.NewListByServerPager.
type FailoverGroupsClientUpdateResponse ¶ added in v0.3.0
type FailoverGroupsClientUpdateResponse struct { // A failover group. FailoverGroup }
FailoverGroupsClientUpdateResponse contains the response from method FailoverGroupsClient.BeginUpdate.
type FirewallRule ¶
type FirewallRule struct { // Resource name. Name *string // Resource properties. Properties *ServerFirewallRuleProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource type. Type *string }
FirewallRule - A server firewall rule.
func (FirewallRule) MarshalJSON ¶ added in v1.1.0
func (f FirewallRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FirewallRule.
func (*FirewallRule) UnmarshalJSON ¶ added in v1.1.0
func (f *FirewallRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FirewallRule.
type FirewallRuleList ¶
type FirewallRuleList struct {
Values []*FirewallRule
}
FirewallRuleList - A list of server firewall rules.
func (FirewallRuleList) MarshalJSON ¶
func (f FirewallRuleList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FirewallRuleList.
func (*FirewallRuleList) UnmarshalJSON ¶ added in v1.1.0
func (f *FirewallRuleList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FirewallRuleList.
type FirewallRuleListResult ¶
type FirewallRuleListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*FirewallRule }
FirewallRuleListResult - The response to a list firewall rules request
func (FirewallRuleListResult) MarshalJSON ¶
func (f FirewallRuleListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FirewallRuleListResult.
func (*FirewallRuleListResult) UnmarshalJSON ¶ added in v1.1.0
func (f *FirewallRuleListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type FirewallRuleListResult.
type FirewallRulesClient ¶
type FirewallRulesClient struct {
// contains filtered or unexported fields
}
FirewallRulesClient contains the methods for the FirewallRules group. Don't use this type directly, use NewFirewallRulesClient() instead.
func NewFirewallRulesClient ¶
func NewFirewallRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallRulesClient, error)
NewFirewallRulesClient creates a new instance of FirewallRulesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*FirewallRulesClient) CreateOrUpdate ¶
func (client *FirewallRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, parameters FirewallRule, options *FirewallRulesClientCreateOrUpdateOptions) (FirewallRulesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates a firewall rule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- firewallRuleName - The name of the firewall rule.
- parameters - The required parameters for creating or updating a firewall rule.
- options - FirewallRulesClientCreateOrUpdateOptions contains the optional parameters for the FirewallRulesClient.CreateOrUpdate method.
Example (CreateAFirewallRuleMaxMin) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FirewallRuleCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewFirewallRulesClient().CreateOrUpdate(ctx, "firewallrulecrudtest-12", "firewallrulecrudtest-6285", "firewallrulecrudtest-5370", armsql.FirewallRule{ Properties: &armsql.ServerFirewallRuleProperties{ EndIPAddress: to.Ptr("0.0.0.3"), StartIPAddress: to.Ptr("0.0.0.3"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.FirewallRule = armsql.FirewallRule{ // Name: to.Ptr("firewallrulecrudtest-5370"), // Type: to.Ptr("Microsoft.Sql/servers/firewallRules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-5370"), // Properties: &armsql.ServerFirewallRuleProperties{ // EndIPAddress: to.Ptr("0.0.0.3"), // StartIPAddress: to.Ptr("0.0.0.3"), // }, // } }
Output:
Example (UpdateAFirewallRuleMaxMin) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FirewallRuleUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewFirewallRulesClient().CreateOrUpdate(ctx, "firewallrulecrudtest-12", "firewallrulecrudtest-6285", "firewallrulecrudtest-3927", armsql.FirewallRule{ Properties: &armsql.ServerFirewallRuleProperties{ EndIPAddress: to.Ptr("0.0.0.1"), StartIPAddress: to.Ptr("0.0.0.1"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.FirewallRule = armsql.FirewallRule{ // Name: to.Ptr("firewallrulecrudtest-3927"), // Type: to.Ptr("Microsoft.Sql/servers/firewallRules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-3927"), // Properties: &armsql.ServerFirewallRuleProperties{ // EndIPAddress: to.Ptr("0.0.0.1"), // StartIPAddress: to.Ptr("0.0.0.1"), // }, // } }
Output:
func (*FirewallRulesClient) Delete ¶
func (client *FirewallRulesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, options *FirewallRulesClientDeleteOptions) (FirewallRulesClientDeleteResponse, error)
Delete - Deletes a firewall rule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- firewallRuleName - The name of the firewall rule.
- options - FirewallRulesClientDeleteOptions contains the optional parameters for the FirewallRulesClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FirewallRuleDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewFirewallRulesClient().Delete(ctx, "firewallrulecrudtest-9886", "firewallrulecrudtest-2368", "firewallrulecrudtest-7011", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*FirewallRulesClient) Get ¶
func (client *FirewallRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, options *FirewallRulesClientGetOptions) (FirewallRulesClientGetResponse, error)
Get - Gets a firewall rule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- firewallRuleName - The name of the firewall rule.
- options - FirewallRulesClientGetOptions contains the optional parameters for the FirewallRulesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FirewallRuleGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewFirewallRulesClient().Get(ctx, "firewallrulecrudtest-12", "firewallrulecrudtest-6285", "firewallrulecrudtest-2304", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.FirewallRule = armsql.FirewallRule{ // Name: to.Ptr("firewallrulecrudtest-2304"), // Type: to.Ptr("Microsoft.Sql/servers/firewallRules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-2304"), // Properties: &armsql.ServerFirewallRuleProperties{ // EndIPAddress: to.Ptr("0.0.0.0"), // StartIPAddress: to.Ptr("0.0.0.0"), // }, // } }
Output:
func (*FirewallRulesClient) NewListByServerPager ¶ added in v0.5.0
func (client *FirewallRulesClient) NewListByServerPager(resourceGroupName string, serverName string, options *FirewallRulesClientListByServerOptions) *runtime.Pager[FirewallRulesClientListByServerResponse]
NewListByServerPager - Gets a list of firewall rules.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - FirewallRulesClientListByServerOptions contains the optional parameters for the FirewallRulesClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FirewallRuleList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewFirewallRulesClient().NewListByServerPager("firewallrulecrudtest-12", "firewallrulecrudtest-6285", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.FirewallRuleListResult = armsql.FirewallRuleListResult{ // Value: []*armsql.FirewallRule{ // { // Name: to.Ptr("firewallrulecrudtest-2304"), // Type: to.Ptr("Microsoft.Sql/servers/firewallRules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-2304"), // Properties: &armsql.ServerFirewallRuleProperties{ // EndIPAddress: to.Ptr("0.0.0.0"), // StartIPAddress: to.Ptr("0.0.0.0"), // }, // }, // { // Name: to.Ptr("firewallrulecrudtest-3927"), // Type: to.Ptr("Microsoft.Sql/servers/firewallRules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-3927"), // Properties: &armsql.ServerFirewallRuleProperties{ // EndIPAddress: to.Ptr("0.0.0.1"), // StartIPAddress: to.Ptr("0.0.0.1"), // }, // }, // { // Name: to.Ptr("firewallrulecrudtest-5370"), // Type: to.Ptr("Microsoft.Sql/servers/firewallRules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-5370"), // Properties: &armsql.ServerFirewallRuleProperties{ // EndIPAddress: to.Ptr("0.0.0.3"), // StartIPAddress: to.Ptr("0.0.0.3"), // }, // }, // { // Name: to.Ptr("firewallrulecrudtest-5767"), // Type: to.Ptr("Microsoft.Sql/servers/firewallRules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-5767"), // Properties: &armsql.ServerFirewallRuleProperties{ // EndIPAddress: to.Ptr("0.0.0.2"), // StartIPAddress: to.Ptr("0.0.0.2"), // }, // }}, // } } }
Output:
func (*FirewallRulesClient) Replace ¶
func (client *FirewallRulesClient) Replace(ctx context.Context, resourceGroupName string, serverName string, parameters FirewallRuleList, options *FirewallRulesClientReplaceOptions) (FirewallRulesClientReplaceResponse, error)
Replace - Replaces all firewall rules on the server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - FirewallRulesClientReplaceOptions contains the optional parameters for the FirewallRulesClient.Replace method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FirewallRuleReplace.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewFirewallRulesClient().Replace(ctx, "firewallrulecrudtest-12", "firewallrulecrudtest-6285", armsql.FirewallRuleList{ Values: []*armsql.FirewallRule{ { Name: to.Ptr("firewallrulecrudtest-5370 "), Properties: &armsql.ServerFirewallRuleProperties{ EndIPAddress: to.Ptr("100.0.0.0"), StartIPAddress: to.Ptr("0.0.0.0"), }, }}, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.FirewallRule = armsql.FirewallRule{ // Name: to.Ptr("firewallrulecrudtest-5370"), // Type: to.Ptr("Microsoft.Sql/servers/firewallRules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-5370"), // Properties: &armsql.ServerFirewallRuleProperties{ // EndIPAddress: to.Ptr("0.0.0.3"), // StartIPAddress: to.Ptr("0.0.0.3"), // }, // } }
Output:
type FirewallRulesClientCreateOrUpdateOptions ¶ added in v0.3.0
type FirewallRulesClientCreateOrUpdateOptions struct { }
FirewallRulesClientCreateOrUpdateOptions contains the optional parameters for the FirewallRulesClient.CreateOrUpdate method.
type FirewallRulesClientCreateOrUpdateResponse ¶ added in v0.3.0
type FirewallRulesClientCreateOrUpdateResponse struct { // A server firewall rule. FirewallRule }
FirewallRulesClientCreateOrUpdateResponse contains the response from method FirewallRulesClient.CreateOrUpdate.
type FirewallRulesClientDeleteOptions ¶ added in v0.3.0
type FirewallRulesClientDeleteOptions struct { }
FirewallRulesClientDeleteOptions contains the optional parameters for the FirewallRulesClient.Delete method.
type FirewallRulesClientDeleteResponse ¶ added in v0.3.0
type FirewallRulesClientDeleteResponse struct { }
FirewallRulesClientDeleteResponse contains the response from method FirewallRulesClient.Delete.
type FirewallRulesClientGetOptions ¶ added in v0.3.0
type FirewallRulesClientGetOptions struct { }
FirewallRulesClientGetOptions contains the optional parameters for the FirewallRulesClient.Get method.
type FirewallRulesClientGetResponse ¶ added in v0.3.0
type FirewallRulesClientGetResponse struct { // A server firewall rule. FirewallRule }
FirewallRulesClientGetResponse contains the response from method FirewallRulesClient.Get.
type FirewallRulesClientListByServerOptions ¶ added in v0.3.0
type FirewallRulesClientListByServerOptions struct { }
FirewallRulesClientListByServerOptions contains the optional parameters for the FirewallRulesClient.NewListByServerPager method.
type FirewallRulesClientListByServerResponse ¶ added in v0.3.0
type FirewallRulesClientListByServerResponse struct { // The response to a list firewall rules request FirewallRuleListResult }
FirewallRulesClientListByServerResponse contains the response from method FirewallRulesClient.NewListByServerPager.
type FirewallRulesClientReplaceOptions ¶ added in v0.3.0
type FirewallRulesClientReplaceOptions struct { }
FirewallRulesClientReplaceOptions contains the optional parameters for the FirewallRulesClient.Replace method.
type FirewallRulesClientReplaceResponse ¶ added in v0.3.0
type FirewallRulesClientReplaceResponse struct { // A server firewall rule. FirewallRule }
FirewallRulesClientReplaceResponse contains the response from method FirewallRulesClient.Replace.
type GeoBackupPoliciesClient ¶
type GeoBackupPoliciesClient struct {
// contains filtered or unexported fields
}
GeoBackupPoliciesClient contains the methods for the GeoBackupPolicies group. Don't use this type directly, use NewGeoBackupPoliciesClient() instead.
func NewGeoBackupPoliciesClient ¶
func NewGeoBackupPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GeoBackupPoliciesClient, error)
NewGeoBackupPoliciesClient creates a new instance of GeoBackupPoliciesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*GeoBackupPoliciesClient) CreateOrUpdate ¶
func (client *GeoBackupPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, geoBackupPolicyName GeoBackupPolicyName, parameters GeoBackupPolicy, options *GeoBackupPoliciesClientCreateOrUpdateOptions) (GeoBackupPoliciesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Updates a database geo backup policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2014-04-01
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- geoBackupPolicyName - The name of the geo backup policy.
- parameters - The required parameters for creating or updating the geo backup policy.
- options - GeoBackupPoliciesClientCreateOrUpdateOptions contains the optional parameters for the GeoBackupPoliciesClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/GeoBackupPoliciesCreateOrUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewGeoBackupPoliciesClient().CreateOrUpdate(ctx, "sqlcrudtest-4799", "sqlcrudtest-5961", "testdw", armsql.GeoBackupPolicyNameDefault, armsql.GeoBackupPolicy{ Properties: &armsql.GeoBackupPolicyProperties{ State: to.Ptr(armsql.GeoBackupPolicyStateEnabled), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.GeoBackupPolicy = armsql.GeoBackupPolicy{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/geoBackupPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/databases/testdw/geoBackupPolicies/Default"), // Properties: &armsql.GeoBackupPolicyProperties{ // State: to.Ptr(armsql.GeoBackupPolicyStateEnabled), // }, // } }
Output:
func (*GeoBackupPoliciesClient) Get ¶
func (client *GeoBackupPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, geoBackupPolicyName GeoBackupPolicyName, options *GeoBackupPoliciesClientGetOptions) (GeoBackupPoliciesClientGetResponse, error)
Get - Gets a geo backup policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2014-04-01
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- geoBackupPolicyName - The name of the geo backup policy.
- options - GeoBackupPoliciesClientGetOptions contains the optional parameters for the GeoBackupPoliciesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/GeoBackupPoliciesGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewGeoBackupPoliciesClient().Get(ctx, "sqlcrudtest-4799", "sqlcrudtest-5961", "testdw", armsql.GeoBackupPolicyNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.GeoBackupPolicy = armsql.GeoBackupPolicy{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/geoBackupPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/databases/testdw/geoBackupPolicies/Default"), // Location: to.Ptr("Central US"), // Properties: &armsql.GeoBackupPolicyProperties{ // State: to.Ptr(armsql.GeoBackupPolicyStateEnabled), // StorageType: to.Ptr("Premium"), // }, // } }
Output:
func (*GeoBackupPoliciesClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *GeoBackupPoliciesClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *GeoBackupPoliciesClientListByDatabaseOptions) *runtime.Pager[GeoBackupPoliciesClientListByDatabaseResponse]
NewListByDatabasePager - Returns a list of geo backup policies.
Generated from API version 2014-04-01
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - GeoBackupPoliciesClientListByDatabaseOptions contains the optional parameters for the GeoBackupPoliciesClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/GeoBackupPoliciesList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewGeoBackupPoliciesClient().NewListByDatabasePager("sqlcrudtest-4799", "sqlcrudtest-5961", "testdw", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.GeoBackupPolicyListResult = armsql.GeoBackupPolicyListResult{ // Value: []*armsql.GeoBackupPolicy{ // { // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/geoBackupPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/databases/testdw/geoBackupPolicies/Default"), // Location: to.Ptr("Central US"), // Properties: &armsql.GeoBackupPolicyProperties{ // State: to.Ptr(armsql.GeoBackupPolicyStateEnabled), // StorageType: to.Ptr("Premium"), // }, // }}, // } } }
Output:
type GeoBackupPoliciesClientCreateOrUpdateOptions ¶ added in v0.3.0
type GeoBackupPoliciesClientCreateOrUpdateOptions struct { }
GeoBackupPoliciesClientCreateOrUpdateOptions contains the optional parameters for the GeoBackupPoliciesClient.CreateOrUpdate method.
type GeoBackupPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type GeoBackupPoliciesClientCreateOrUpdateResponse struct { // A database geo backup policy. GeoBackupPolicy }
GeoBackupPoliciesClientCreateOrUpdateResponse contains the response from method GeoBackupPoliciesClient.CreateOrUpdate.
type GeoBackupPoliciesClientGetOptions ¶ added in v0.3.0
type GeoBackupPoliciesClientGetOptions struct { }
GeoBackupPoliciesClientGetOptions contains the optional parameters for the GeoBackupPoliciesClient.Get method.
type GeoBackupPoliciesClientGetResponse ¶ added in v0.3.0
type GeoBackupPoliciesClientGetResponse struct { // A database geo backup policy. GeoBackupPolicy }
GeoBackupPoliciesClientGetResponse contains the response from method GeoBackupPoliciesClient.Get.
type GeoBackupPoliciesClientListByDatabaseOptions ¶ added in v0.3.0
type GeoBackupPoliciesClientListByDatabaseOptions struct { }
GeoBackupPoliciesClientListByDatabaseOptions contains the optional parameters for the GeoBackupPoliciesClient.NewListByDatabasePager method.
type GeoBackupPoliciesClientListByDatabaseResponse ¶ added in v0.3.0
type GeoBackupPoliciesClientListByDatabaseResponse struct { // The response to a list geo backup policies request. GeoBackupPolicyListResult }
GeoBackupPoliciesClientListByDatabaseResponse contains the response from method GeoBackupPoliciesClient.NewListByDatabasePager.
type GeoBackupPolicy ¶
type GeoBackupPolicy struct { // REQUIRED; The properties of the geo backup policy. Properties *GeoBackupPolicyProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Kind of geo backup policy. This is metadata used for the Azure portal experience. Kind *string // READ-ONLY; Backup policy location. Location *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
GeoBackupPolicy - A database geo backup policy.
func (GeoBackupPolicy) MarshalJSON ¶
func (g GeoBackupPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GeoBackupPolicy.
func (*GeoBackupPolicy) UnmarshalJSON ¶ added in v1.1.0
func (g *GeoBackupPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GeoBackupPolicy.
type GeoBackupPolicyListResult ¶
type GeoBackupPolicyListResult struct { // The list of geo backup policies. Value []*GeoBackupPolicy }
GeoBackupPolicyListResult - The response to a list geo backup policies request.
func (GeoBackupPolicyListResult) MarshalJSON ¶
func (g GeoBackupPolicyListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GeoBackupPolicyListResult.
func (*GeoBackupPolicyListResult) UnmarshalJSON ¶ added in v1.1.0
func (g *GeoBackupPolicyListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GeoBackupPolicyListResult.
type GeoBackupPolicyName ¶
type GeoBackupPolicyName string
const (
GeoBackupPolicyNameDefault GeoBackupPolicyName = "Default"
)
func PossibleGeoBackupPolicyNameValues ¶
func PossibleGeoBackupPolicyNameValues() []GeoBackupPolicyName
PossibleGeoBackupPolicyNameValues returns the possible values for the GeoBackupPolicyName const type.
type GeoBackupPolicyProperties ¶
type GeoBackupPolicyProperties struct { // REQUIRED; The state of the geo backup policy. State *GeoBackupPolicyState // READ-ONLY; The storage type of the geo backup policy. StorageType *string }
GeoBackupPolicyProperties - The properties of the geo backup policy.
func (GeoBackupPolicyProperties) MarshalJSON ¶ added in v1.1.0
func (g GeoBackupPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GeoBackupPolicyProperties.
func (*GeoBackupPolicyProperties) UnmarshalJSON ¶ added in v1.1.0
func (g *GeoBackupPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GeoBackupPolicyProperties.
type GeoBackupPolicyState ¶
type GeoBackupPolicyState string
GeoBackupPolicyState - The state of the geo backup policy.
const ( GeoBackupPolicyStateDisabled GeoBackupPolicyState = "Disabled" GeoBackupPolicyStateEnabled GeoBackupPolicyState = "Enabled" )
func PossibleGeoBackupPolicyStateValues ¶
func PossibleGeoBackupPolicyStateValues() []GeoBackupPolicyState
PossibleGeoBackupPolicyStateValues returns the possible values for the GeoBackupPolicyState const type.
type IPv6FirewallRule ¶ added in v0.4.0
type IPv6FirewallRule struct { // Resource name. Name *string // Resource properties. Properties *IPv6ServerFirewallRuleProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource type. Type *string }
IPv6FirewallRule - An IPv6 server firewall rule.
func (IPv6FirewallRule) MarshalJSON ¶ added in v1.1.0
func (i IPv6FirewallRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type IPv6FirewallRule.
func (*IPv6FirewallRule) UnmarshalJSON ¶ added in v1.1.0
func (i *IPv6FirewallRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type IPv6FirewallRule.
type IPv6FirewallRuleListResult ¶ added in v0.4.0
type IPv6FirewallRuleListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*IPv6FirewallRule }
IPv6FirewallRuleListResult - The response to a list IPv6 firewall rules request
func (IPv6FirewallRuleListResult) MarshalJSON ¶ added in v0.4.0
func (i IPv6FirewallRuleListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type IPv6FirewallRuleListResult.
func (*IPv6FirewallRuleListResult) UnmarshalJSON ¶ added in v1.1.0
func (i *IPv6FirewallRuleListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type IPv6FirewallRuleListResult.
type IPv6FirewallRulesClient ¶ added in v0.4.0
type IPv6FirewallRulesClient struct {
// contains filtered or unexported fields
}
IPv6FirewallRulesClient contains the methods for the IPv6FirewallRules group. Don't use this type directly, use NewIPv6FirewallRulesClient() instead.
func NewIPv6FirewallRulesClient ¶ added in v0.4.0
func NewIPv6FirewallRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IPv6FirewallRulesClient, error)
NewIPv6FirewallRulesClient creates a new instance of IPv6FirewallRulesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*IPv6FirewallRulesClient) CreateOrUpdate ¶ added in v0.4.0
func (client *IPv6FirewallRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, parameters IPv6FirewallRule, options *IPv6FirewallRulesClientCreateOrUpdateOptions) (IPv6FirewallRulesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates an IPv6 firewall rule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- firewallRuleName - The name of the firewall rule.
- parameters - The required parameters for creating or updating an IPv6 firewall rule.
- options - IPv6FirewallRulesClientCreateOrUpdateOptions contains the optional parameters for the IPv6FirewallRulesClient.CreateOrUpdate method.
Example (CreateAnIPv6FirewallRuleMaxMin) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/IPv6FirewallRuleCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewIPv6FirewallRulesClient().CreateOrUpdate(ctx, "firewallrulecrudtest-12", "firewallrulecrudtest-6285", "firewallrulecrudtest-5370", armsql.IPv6FirewallRule{ Properties: &armsql.IPv6ServerFirewallRuleProperties{ EndIPv6Address: to.Ptr("0000:0000:0000:0000:0000:ffff:0000:0003"), StartIPv6Address: to.Ptr("0000:0000:0000:0000:0000:ffff:0000:0003"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.IPv6FirewallRule = armsql.IPv6FirewallRule{ // Name: to.Ptr("firewallrulecrudtest-5370"), // Type: to.Ptr("Microsoft.Sql/servers/ipv6FirewallRules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/ipv6FirewallRules/firewallrulecrudtest-5370"), // Properties: &armsql.IPv6ServerFirewallRuleProperties{ // EndIPv6Address: to.Ptr("0000:0000:0000:0000:0000:ffff:0000:0003"), // StartIPv6Address: to.Ptr("0000:0000:0000:0000:0000:ffff:0000:0003"), // }, // } }
Output:
Example (UpdateAnIPv6FirewallRuleMaxMin) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/IPv6FirewallRuleUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewIPv6FirewallRulesClient().CreateOrUpdate(ctx, "firewallrulecrudtest-12", "firewallrulecrudtest-6285", "firewallrulecrudtest-3927", armsql.IPv6FirewallRule{ Properties: &armsql.IPv6ServerFirewallRuleProperties{ EndIPv6Address: to.Ptr("0000:0000:0000:0000:0000:ffff:0000:0001"), StartIPv6Address: to.Ptr("0000:0000:0000:0000:0000:ffff:0000:0001"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.IPv6FirewallRule = armsql.IPv6FirewallRule{ // Name: to.Ptr("firewallrulecrudtest-3927"), // Type: to.Ptr("Microsoft.Sql/servers/ipv6FirewallRules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/ipv6FirewallRules/firewallrulecrudtest-3927"), // Properties: &armsql.IPv6ServerFirewallRuleProperties{ // EndIPv6Address: to.Ptr("0000:0000:0000:0000:0000:ffff:0000:0001"), // StartIPv6Address: to.Ptr("0000:0000:0000:0000:0000:ffff:0000:0001"), // }, // } }
Output:
func (*IPv6FirewallRulesClient) Delete ¶ added in v0.4.0
func (client *IPv6FirewallRulesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, options *IPv6FirewallRulesClientDeleteOptions) (IPv6FirewallRulesClientDeleteResponse, error)
Delete - Deletes an IPv6 firewall rule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- firewallRuleName - The name of the firewall rule.
- options - IPv6FirewallRulesClientDeleteOptions contains the optional parameters for the IPv6FirewallRulesClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/IPv6FirewallRuleDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewIPv6FirewallRulesClient().Delete(ctx, "firewallrulecrudtest-9886", "firewallrulecrudtest-2368", "firewallrulecrudtest-7011", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*IPv6FirewallRulesClient) Get ¶ added in v0.4.0
func (client *IPv6FirewallRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, options *IPv6FirewallRulesClientGetOptions) (IPv6FirewallRulesClientGetResponse, error)
Get - Gets an IPv6 firewall rule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- firewallRuleName - The name of the firewall rule.
- options - IPv6FirewallRulesClientGetOptions contains the optional parameters for the IPv6FirewallRulesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/IPv6FirewallRuleGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewIPv6FirewallRulesClient().Get(ctx, "firewallrulecrudtest-12", "firewallrulecrudtest-6285", "firewallrulecrudtest-2304", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.IPv6FirewallRule = armsql.IPv6FirewallRule{ // Name: to.Ptr("firewallrulecrudtest-2304"), // Type: to.Ptr("Microsoft.Sql/servers/ipv6FirewallRules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/ipv6FirewallRules/firewallrulecrudtest-2304"), // Properties: &armsql.IPv6ServerFirewallRuleProperties{ // EndIPv6Address: to.Ptr("0000:0000:0000:0000:0000:ffff:0000:0000"), // StartIPv6Address: to.Ptr("0000:0000:0000:0000:0000:ffff:0000:0000"), // }, // } }
Output:
func (*IPv6FirewallRulesClient) NewListByServerPager ¶ added in v0.5.0
func (client *IPv6FirewallRulesClient) NewListByServerPager(resourceGroupName string, serverName string, options *IPv6FirewallRulesClientListByServerOptions) *runtime.Pager[IPv6FirewallRulesClientListByServerResponse]
NewListByServerPager - Gets a list of IPv6 firewall rules.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - IPv6FirewallRulesClientListByServerOptions contains the optional parameters for the IPv6FirewallRulesClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/IPv6FirewallRuleList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewIPv6FirewallRulesClient().NewListByServerPager("firewallrulecrudtest-12", "firewallrulecrudtest-6285", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.IPv6FirewallRuleListResult = armsql.IPv6FirewallRuleListResult{ // Value: []*armsql.IPv6FirewallRule{ // { // Name: to.Ptr("firewallrulecrudtest-2304"), // Type: to.Ptr("Microsoft.Sql/servers/ipv6FirewallRules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/ipv6FirewallRules/firewallrulecrudtest-2304"), // Properties: &armsql.IPv6ServerFirewallRuleProperties{ // EndIPv6Address: to.Ptr("0000:0000:0000:0000:0000:ffff:0000:0000"), // StartIPv6Address: to.Ptr("0000:0000:0000:0000:0000:ffff:0000:0000"), // }, // }, // { // Name: to.Ptr("firewallrulecrudtest-3927"), // Type: to.Ptr("Microsoft.Sql/servers/ipv6FirewallRules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/ipv6FirewallRules/firewallrulecrudtest-3927"), // Properties: &armsql.IPv6ServerFirewallRuleProperties{ // EndIPv6Address: to.Ptr("0000:0000:0000:0000:0000:ffff:0000:0001"), // StartIPv6Address: to.Ptr("0000:0000:0000:0000:0000:ffff:0000:0001"), // }, // }, // { // Name: to.Ptr("firewallrulecrudtest-5370"), // Type: to.Ptr("Microsoft.Sql/servers/ipv6FirewallRules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/ipv6FirewallRules/firewallrulecrudtest-5370"), // Properties: &armsql.IPv6ServerFirewallRuleProperties{ // EndIPv6Address: to.Ptr("0000:0000:0000:0000:0000:ffff:0000:0003"), // StartIPv6Address: to.Ptr("0000:0000:0000:0000:0000:ffff:0000:0003"), // }, // }, // { // Name: to.Ptr("firewallrulecrudtest-5767"), // Type: to.Ptr("Microsoft.Sql/servers/ipv6FirewallRules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/ipv6FirewallRules/firewallrulecrudtest-5767"), // Properties: &armsql.IPv6ServerFirewallRuleProperties{ // EndIPv6Address: to.Ptr("0000:0000:0000:0000:0000:ffff:0000:0002"), // StartIPv6Address: to.Ptr("0000:0000:0000:0000:0000:ffff:0000:0002"), // }, // }}, // } } }
Output:
type IPv6FirewallRulesClientCreateOrUpdateOptions ¶ added in v0.4.0
type IPv6FirewallRulesClientCreateOrUpdateOptions struct { }
IPv6FirewallRulesClientCreateOrUpdateOptions contains the optional parameters for the IPv6FirewallRulesClient.CreateOrUpdate method.
type IPv6FirewallRulesClientCreateOrUpdateResponse ¶ added in v0.4.0
type IPv6FirewallRulesClientCreateOrUpdateResponse struct { // An IPv6 server firewall rule. IPv6FirewallRule }
IPv6FirewallRulesClientCreateOrUpdateResponse contains the response from method IPv6FirewallRulesClient.CreateOrUpdate.
type IPv6FirewallRulesClientDeleteOptions ¶ added in v0.4.0
type IPv6FirewallRulesClientDeleteOptions struct { }
IPv6FirewallRulesClientDeleteOptions contains the optional parameters for the IPv6FirewallRulesClient.Delete method.
type IPv6FirewallRulesClientDeleteResponse ¶ added in v0.4.0
type IPv6FirewallRulesClientDeleteResponse struct { }
IPv6FirewallRulesClientDeleteResponse contains the response from method IPv6FirewallRulesClient.Delete.
type IPv6FirewallRulesClientGetOptions ¶ added in v0.4.0
type IPv6FirewallRulesClientGetOptions struct { }
IPv6FirewallRulesClientGetOptions contains the optional parameters for the IPv6FirewallRulesClient.Get method.
type IPv6FirewallRulesClientGetResponse ¶ added in v0.4.0
type IPv6FirewallRulesClientGetResponse struct { // An IPv6 server firewall rule. IPv6FirewallRule }
IPv6FirewallRulesClientGetResponse contains the response from method IPv6FirewallRulesClient.Get.
type IPv6FirewallRulesClientListByServerOptions ¶ added in v0.4.0
type IPv6FirewallRulesClientListByServerOptions struct { }
IPv6FirewallRulesClientListByServerOptions contains the optional parameters for the IPv6FirewallRulesClient.NewListByServerPager method.
type IPv6FirewallRulesClientListByServerResponse ¶ added in v0.4.0
type IPv6FirewallRulesClientListByServerResponse struct { // The response to a list IPv6 firewall rules request IPv6FirewallRuleListResult }
IPv6FirewallRulesClientListByServerResponse contains the response from method IPv6FirewallRulesClient.NewListByServerPager.
type IPv6ServerFirewallRuleProperties ¶ added in v0.4.0
type IPv6ServerFirewallRuleProperties struct { // The end IP address of the firewall rule. Must be IPv6 format. Must be greater than or equal to startIpAddress. EndIPv6Address *string // The start IP address of the firewall rule. Must be IPv6 format. StartIPv6Address *string }
IPv6ServerFirewallRuleProperties - The properties of an IPv6 server firewall rule.
func (IPv6ServerFirewallRuleProperties) MarshalJSON ¶ added in v1.1.0
func (i IPv6ServerFirewallRuleProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type IPv6ServerFirewallRuleProperties.
func (*IPv6ServerFirewallRuleProperties) UnmarshalJSON ¶ added in v1.1.0
func (i *IPv6ServerFirewallRuleProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type IPv6ServerFirewallRuleProperties.
type IdentityType ¶
type IdentityType string
IdentityType - The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource.
const ( IdentityTypeNone IdentityType = "None" IdentityTypeSystemAssigned IdentityType = "SystemAssigned" IdentityTypeSystemAssignedUserAssigned IdentityType = "SystemAssigned,UserAssigned" IdentityTypeUserAssigned IdentityType = "UserAssigned" )
func PossibleIdentityTypeValues ¶
func PossibleIdentityTypeValues() []IdentityType
PossibleIdentityTypeValues returns the possible values for the IdentityType const type.
type ImplementationMethod ¶
type ImplementationMethod string
ImplementationMethod - Gets the method in which this recommended action can be manually implemented. e.g., TSql, AzurePowerShell.
const ( ImplementationMethodAzurePowerShell ImplementationMethod = "AzurePowerShell" ImplementationMethodTSQL ImplementationMethod = "TSql" )
func PossibleImplementationMethodValues ¶
func PossibleImplementationMethodValues() []ImplementationMethod
PossibleImplementationMethodValues returns the possible values for the ImplementationMethod const type.
type ImportExistingDatabaseDefinition ¶
type ImportExistingDatabaseDefinition struct { // REQUIRED; Administrator login name. AdministratorLogin *string // REQUIRED; Administrator login password. AdministratorLoginPassword *string // REQUIRED; Storage key. StorageKey *string // REQUIRED; Storage key type. StorageKeyType *StorageKeyType // REQUIRED; Storage Uri. StorageURI *string // Authentication type. AuthenticationType *string // Optional resource information to enable network isolation for request. NetworkIsolation *NetworkIsolationSettings }
ImportExistingDatabaseDefinition - Contains the information necessary to perform import operation for existing database.
func (ImportExistingDatabaseDefinition) MarshalJSON ¶ added in v1.1.0
func (i ImportExistingDatabaseDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImportExistingDatabaseDefinition.
func (*ImportExistingDatabaseDefinition) UnmarshalJSON ¶ added in v1.1.0
func (i *ImportExistingDatabaseDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImportExistingDatabaseDefinition.
type ImportExportExtensionsOperationListResult ¶
type ImportExportExtensionsOperationListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ImportExportExtensionsOperationResult }
ImportExportExtensionsOperationListResult - Import export operation extensions list.
func (ImportExportExtensionsOperationListResult) MarshalJSON ¶
func (i ImportExportExtensionsOperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImportExportExtensionsOperationListResult.
func (*ImportExportExtensionsOperationListResult) UnmarshalJSON ¶ added in v1.1.0
func (i *ImportExportExtensionsOperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImportExportExtensionsOperationListResult.
type ImportExportExtensionsOperationResult ¶
type ImportExportExtensionsOperationResult struct { // Resource properties. Properties *ImportExportExtensionsOperationResultProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ImportExportExtensionsOperationResult - An Extension operation result resource.
func (ImportExportExtensionsOperationResult) MarshalJSON ¶
func (i ImportExportExtensionsOperationResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImportExportExtensionsOperationResult.
func (*ImportExportExtensionsOperationResult) UnmarshalJSON ¶ added in v1.1.0
func (i *ImportExportExtensionsOperationResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImportExportExtensionsOperationResult.
type ImportExportExtensionsOperationResultProperties ¶
type ImportExportExtensionsOperationResultProperties struct { // READ-ONLY; Database name. DatabaseName *string // READ-ONLY; Error message. ErrorMessage *string // READ-ONLY; Last modified time. LastModifiedTime *string // READ-ONLY; Request Id. RequestID *string // READ-ONLY; Request type. RequestType *string // READ-ONLY; Server name. ServerName *string // READ-ONLY; Operation status. Status *string }
ImportExportExtensionsOperationResultProperties - Contains the operation result properties for import/export operation.
func (ImportExportExtensionsOperationResultProperties) MarshalJSON ¶ added in v1.1.0
func (i ImportExportExtensionsOperationResultProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImportExportExtensionsOperationResultProperties.
func (*ImportExportExtensionsOperationResultProperties) UnmarshalJSON ¶ added in v1.1.0
func (i *ImportExportExtensionsOperationResultProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImportExportExtensionsOperationResultProperties.
type ImportExportOperationResult ¶
type ImportExportOperationResult struct { // Resource properties. Properties *ImportExportOperationResultProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ImportExportOperationResult - An ImportExport operation result resource.
func (ImportExportOperationResult) MarshalJSON ¶
func (i ImportExportOperationResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImportExportOperationResult.
func (*ImportExportOperationResult) UnmarshalJSON ¶ added in v1.1.0
func (i *ImportExportOperationResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImportExportOperationResult.
type ImportExportOperationResultProperties ¶
type ImportExportOperationResultProperties struct { // READ-ONLY; Blob Uri. BlobURI *string // READ-ONLY; Database name. DatabaseName *string // READ-ONLY; Error message. ErrorMessage *string // READ-ONLY; Last modified time. LastModifiedTime *string // READ-ONLY; Gets the status of private endpoints associated with this request. PrivateEndpointConnections []*PrivateEndpointConnectionRequestStatus // READ-ONLY; Queued time. QueuedTime *string // READ-ONLY; Request Id. RequestID *string // READ-ONLY; Request type. RequestType *string // READ-ONLY; Server name. ServerName *string // READ-ONLY; Operation status. Status *string }
ImportExportOperationResultProperties - Contains the operation result properties for import/export operation.
func (ImportExportOperationResultProperties) MarshalJSON ¶
func (i ImportExportOperationResultProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImportExportOperationResultProperties.
func (*ImportExportOperationResultProperties) UnmarshalJSON ¶ added in v1.1.0
func (i *ImportExportOperationResultProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImportExportOperationResultProperties.
type ImportNewDatabaseDefinition ¶
type ImportNewDatabaseDefinition struct { // REQUIRED; Administrator login name. AdministratorLogin *string // REQUIRED; Administrator login password. AdministratorLoginPassword *string // REQUIRED; Storage key. StorageKey *string // REQUIRED; Storage key type. StorageKeyType *StorageKeyType // REQUIRED; Storage Uri. StorageURI *string // Authentication type. AuthenticationType *string // Name of the import database. DatabaseName *string // Edition of the import database. Edition *string // Max size in bytes for the import database. MaxSizeBytes *string // Optional resource information to enable network isolation for request. NetworkIsolation *NetworkIsolationSettings // Service level objective name of the import database. ServiceObjectiveName *string }
ImportNewDatabaseDefinition - Contains the information necessary to perform import operation for new database.
func (ImportNewDatabaseDefinition) MarshalJSON ¶ added in v1.1.0
func (i ImportNewDatabaseDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImportNewDatabaseDefinition.
func (*ImportNewDatabaseDefinition) UnmarshalJSON ¶ added in v1.1.0
func (i *ImportNewDatabaseDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ImportNewDatabaseDefinition.
type InstanceFailoverGroup ¶
type InstanceFailoverGroup struct { // Resource properties. Properties *InstanceFailoverGroupProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
InstanceFailoverGroup - An instance failover group.
func (InstanceFailoverGroup) MarshalJSON ¶
func (i InstanceFailoverGroup) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InstanceFailoverGroup.
func (*InstanceFailoverGroup) UnmarshalJSON ¶ added in v1.1.0
func (i *InstanceFailoverGroup) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type InstanceFailoverGroup.
type InstanceFailoverGroupListResult ¶
type InstanceFailoverGroupListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*InstanceFailoverGroup }
InstanceFailoverGroupListResult - A list of instance failover groups.
func (InstanceFailoverGroupListResult) MarshalJSON ¶
func (i InstanceFailoverGroupListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InstanceFailoverGroupListResult.
func (*InstanceFailoverGroupListResult) UnmarshalJSON ¶ added in v1.1.0
func (i *InstanceFailoverGroupListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type InstanceFailoverGroupListResult.
type InstanceFailoverGroupProperties ¶
type InstanceFailoverGroupProperties struct { // REQUIRED; List of managed instance pairs in the failover group. ManagedInstancePairs []*ManagedInstancePairInfo // REQUIRED; Partner region information for the failover group. PartnerRegions []*PartnerRegionInfo // REQUIRED; Read-write endpoint of the failover group instance. ReadWriteEndpoint *InstanceFailoverGroupReadWriteEndpoint // Read-only endpoint of the failover group instance. ReadOnlyEndpoint *InstanceFailoverGroupReadOnlyEndpoint // READ-ONLY; Local replication role of the failover group instance. ReplicationRole *InstanceFailoverGroupReplicationRole // READ-ONLY; Replication state of the failover group instance. ReplicationState *string }
InstanceFailoverGroupProperties - Properties of a instance failover group.
func (InstanceFailoverGroupProperties) MarshalJSON ¶
func (i InstanceFailoverGroupProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InstanceFailoverGroupProperties.
func (*InstanceFailoverGroupProperties) UnmarshalJSON ¶ added in v1.1.0
func (i *InstanceFailoverGroupProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type InstanceFailoverGroupProperties.
type InstanceFailoverGroupReadOnlyEndpoint ¶
type InstanceFailoverGroupReadOnlyEndpoint struct { // Failover policy of the read-only endpoint for the failover group. FailoverPolicy *ReadOnlyEndpointFailoverPolicy }
InstanceFailoverGroupReadOnlyEndpoint - Read-only endpoint of the failover group instance.
func (InstanceFailoverGroupReadOnlyEndpoint) MarshalJSON ¶ added in v1.1.0
func (i InstanceFailoverGroupReadOnlyEndpoint) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InstanceFailoverGroupReadOnlyEndpoint.
func (*InstanceFailoverGroupReadOnlyEndpoint) UnmarshalJSON ¶ added in v1.1.0
func (i *InstanceFailoverGroupReadOnlyEndpoint) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type InstanceFailoverGroupReadOnlyEndpoint.
type InstanceFailoverGroupReadWriteEndpoint ¶
type InstanceFailoverGroupReadWriteEndpoint struct { // REQUIRED; Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes // is required. FailoverPolicy *ReadWriteEndpointFailoverPolicy // Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then // failoverWithDataLossGracePeriodMinutes is required. FailoverWithDataLossGracePeriodMinutes *int32 }
InstanceFailoverGroupReadWriteEndpoint - Read-write endpoint of the failover group instance.
func (InstanceFailoverGroupReadWriteEndpoint) MarshalJSON ¶ added in v1.1.0
func (i InstanceFailoverGroupReadWriteEndpoint) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InstanceFailoverGroupReadWriteEndpoint.
func (*InstanceFailoverGroupReadWriteEndpoint) UnmarshalJSON ¶ added in v1.1.0
func (i *InstanceFailoverGroupReadWriteEndpoint) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type InstanceFailoverGroupReadWriteEndpoint.
type InstanceFailoverGroupReplicationRole ¶
type InstanceFailoverGroupReplicationRole string
InstanceFailoverGroupReplicationRole - Local replication role of the failover group instance.
const ( InstanceFailoverGroupReplicationRolePrimary InstanceFailoverGroupReplicationRole = "Primary" InstanceFailoverGroupReplicationRoleSecondary InstanceFailoverGroupReplicationRole = "Secondary" )
func PossibleInstanceFailoverGroupReplicationRoleValues ¶
func PossibleInstanceFailoverGroupReplicationRoleValues() []InstanceFailoverGroupReplicationRole
PossibleInstanceFailoverGroupReplicationRoleValues returns the possible values for the InstanceFailoverGroupReplicationRole const type.
type InstanceFailoverGroupsClient ¶
type InstanceFailoverGroupsClient struct {
// contains filtered or unexported fields
}
InstanceFailoverGroupsClient contains the methods for the InstanceFailoverGroups group. Don't use this type directly, use NewInstanceFailoverGroupsClient() instead.
func NewInstanceFailoverGroupsClient ¶
func NewInstanceFailoverGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InstanceFailoverGroupsClient, error)
NewInstanceFailoverGroupsClient creates a new instance of InstanceFailoverGroupsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*InstanceFailoverGroupsClient) BeginCreateOrUpdate ¶
func (client *InstanceFailoverGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, locationName string, failoverGroupName string, parameters InstanceFailoverGroup, options *InstanceFailoverGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[InstanceFailoverGroupsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a failover group. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- locationName - The name of the region where the resource is located.
- failoverGroupName - The name of the failover group.
- parameters - The failover group parameters.
- options - InstanceFailoverGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the InstanceFailoverGroupsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/InstanceFailoverGroupCreateOrUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewInstanceFailoverGroupsClient().BeginCreateOrUpdate(ctx, "Default", "Japan East", "failover-group-test-3", armsql.InstanceFailoverGroup{ Properties: &armsql.InstanceFailoverGroupProperties{ ManagedInstancePairs: []*armsql.ManagedInstancePairInfo{ { PartnerManagedInstanceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-secondary-mngdInstance"), PrimaryManagedInstanceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-primary-mngdInstance"), }}, PartnerRegions: []*armsql.PartnerRegionInfo{ { Location: to.Ptr("Japan West"), }}, ReadOnlyEndpoint: &armsql.InstanceFailoverGroupReadOnlyEndpoint{ FailoverPolicy: to.Ptr(armsql.ReadOnlyEndpointFailoverPolicyDisabled), }, ReadWriteEndpoint: &armsql.InstanceFailoverGroupReadWriteEndpoint{ FailoverPolicy: to.Ptr(armsql.ReadWriteEndpointFailoverPolicyAutomatic), FailoverWithDataLossGracePeriodMinutes: to.Ptr[int32](480), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.InstanceFailoverGroup = armsql.InstanceFailoverGroup{ // Name: to.Ptr("failover-group-test-3"), // Type: to.Ptr("Microsoft.Sql/locations/failoverGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/JapanEast/instanceFailoverGroups/failover-group-test-3"), // Properties: &armsql.InstanceFailoverGroupProperties{ // ManagedInstancePairs: []*armsql.ManagedInstancePairInfo{ // { // PartnerManagedInstanceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-secondary-mngdInstance"), // PrimaryManagedInstanceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-primary-mngdInstance"), // }}, // PartnerRegions: []*armsql.PartnerRegionInfo{ // { // Location: to.Ptr("Japan West"), // ReplicationRole: to.Ptr(armsql.InstanceFailoverGroupReplicationRoleSecondary), // }}, // ReadOnlyEndpoint: &armsql.InstanceFailoverGroupReadOnlyEndpoint{ // FailoverPolicy: to.Ptr(armsql.ReadOnlyEndpointFailoverPolicyDisabled), // }, // ReadWriteEndpoint: &armsql.InstanceFailoverGroupReadWriteEndpoint{ // FailoverPolicy: to.Ptr(armsql.ReadWriteEndpointFailoverPolicyAutomatic), // FailoverWithDataLossGracePeriodMinutes: to.Ptr[int32](480), // }, // ReplicationRole: to.Ptr(armsql.InstanceFailoverGroupReplicationRolePrimary), // ReplicationState: to.Ptr("CATCH_UP"), // }, // } }
Output:
func (*InstanceFailoverGroupsClient) BeginDelete ¶
func (client *InstanceFailoverGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, locationName string, failoverGroupName string, options *InstanceFailoverGroupsClientBeginDeleteOptions) (*runtime.Poller[InstanceFailoverGroupsClientDeleteResponse], error)
BeginDelete - Deletes a failover group. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- locationName - The name of the region where the resource is located.
- failoverGroupName - The name of the failover group.
- options - InstanceFailoverGroupsClientBeginDeleteOptions contains the optional parameters for the InstanceFailoverGroupsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/InstanceFailoverGroupDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewInstanceFailoverGroupsClient().BeginDelete(ctx, "Default", "Japan East", "failover-group-test-1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*InstanceFailoverGroupsClient) BeginFailover ¶
func (client *InstanceFailoverGroupsClient) BeginFailover(ctx context.Context, resourceGroupName string, locationName string, failoverGroupName string, options *InstanceFailoverGroupsClientBeginFailoverOptions) (*runtime.Poller[InstanceFailoverGroupsClientFailoverResponse], error)
BeginFailover - Fails over from the current primary managed instance to this managed instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- locationName - The name of the region where the resource is located.
- failoverGroupName - The name of the failover group.
- options - InstanceFailoverGroupsClientBeginFailoverOptions contains the optional parameters for the InstanceFailoverGroupsClient.BeginFailover method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/InstanceFailoverGroupFailover.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewInstanceFailoverGroupsClient().BeginFailover(ctx, "Default", "Japan West", "failover-group-test-3", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.InstanceFailoverGroup = armsql.InstanceFailoverGroup{ // Name: to.Ptr("failover-group-test-3"), // Type: to.Ptr("Microsoft.Sql/locations/failoverGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/JapanWest/instanceFailoverGroups/failover-group-test-3"), // Properties: &armsql.InstanceFailoverGroupProperties{ // ManagedInstancePairs: []*armsql.ManagedInstancePairInfo{ // { // PartnerManagedInstanceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-primary-mngdInstance"), // PrimaryManagedInstanceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-secondary-mngdInstance"), // }}, // PartnerRegions: []*armsql.PartnerRegionInfo{ // { // Location: to.Ptr("Japan East"), // ReplicationRole: to.Ptr(armsql.InstanceFailoverGroupReplicationRoleSecondary), // }}, // ReadOnlyEndpoint: &armsql.InstanceFailoverGroupReadOnlyEndpoint{ // FailoverPolicy: to.Ptr(armsql.ReadOnlyEndpointFailoverPolicyDisabled), // }, // ReadWriteEndpoint: &armsql.InstanceFailoverGroupReadWriteEndpoint{ // FailoverPolicy: to.Ptr(armsql.ReadWriteEndpointFailoverPolicyAutomatic), // FailoverWithDataLossGracePeriodMinutes: to.Ptr[int32](480), // }, // ReplicationRole: to.Ptr(armsql.InstanceFailoverGroupReplicationRolePrimary), // ReplicationState: to.Ptr("CATCH_UP"), // }, // } }
Output:
func (*InstanceFailoverGroupsClient) BeginForceFailoverAllowDataLoss ¶
func (client *InstanceFailoverGroupsClient) BeginForceFailoverAllowDataLoss(ctx context.Context, resourceGroupName string, locationName string, failoverGroupName string, options *InstanceFailoverGroupsClientBeginForceFailoverAllowDataLossOptions) (*runtime.Poller[InstanceFailoverGroupsClientForceFailoverAllowDataLossResponse], error)
BeginForceFailoverAllowDataLoss - Fails over from the current primary managed instance to this managed instance. This operation might result in data loss. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- locationName - The name of the region where the resource is located.
- failoverGroupName - The name of the failover group.
- options - InstanceFailoverGroupsClientBeginForceFailoverAllowDataLossOptions contains the optional parameters for the InstanceFailoverGroupsClient.BeginForceFailoverAllowDataLoss method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/InstanceFailoverGroupForceFailoverAllowDataLoss.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewInstanceFailoverGroupsClient().BeginForceFailoverAllowDataLoss(ctx, "Default", "Japan West", "failover-group-test-3", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.InstanceFailoverGroup = armsql.InstanceFailoverGroup{ // Name: to.Ptr("failover-group-test-3"), // Type: to.Ptr("Microsoft.Sql/locations/failoverGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/JapanWest/instanceFailoverGroups/failover-group-test-3"), // Properties: &armsql.InstanceFailoverGroupProperties{ // ManagedInstancePairs: []*armsql.ManagedInstancePairInfo{ // { // PartnerManagedInstanceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-primary-mngdInstance"), // PrimaryManagedInstanceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-secondary-mngdInstance"), // }}, // PartnerRegions: []*armsql.PartnerRegionInfo{ // { // Location: to.Ptr("Japan East"), // ReplicationRole: to.Ptr(armsql.InstanceFailoverGroupReplicationRoleSecondary), // }}, // ReadOnlyEndpoint: &armsql.InstanceFailoverGroupReadOnlyEndpoint{ // FailoverPolicy: to.Ptr(armsql.ReadOnlyEndpointFailoverPolicyDisabled), // }, // ReadWriteEndpoint: &armsql.InstanceFailoverGroupReadWriteEndpoint{ // FailoverPolicy: to.Ptr(armsql.ReadWriteEndpointFailoverPolicyAutomatic), // FailoverWithDataLossGracePeriodMinutes: to.Ptr[int32](480), // }, // ReplicationRole: to.Ptr(armsql.InstanceFailoverGroupReplicationRolePrimary), // ReplicationState: to.Ptr("CATCH_UP"), // }, // } }
Output:
func (*InstanceFailoverGroupsClient) Get ¶
func (client *InstanceFailoverGroupsClient) Get(ctx context.Context, resourceGroupName string, locationName string, failoverGroupName string, options *InstanceFailoverGroupsClientGetOptions) (InstanceFailoverGroupsClientGetResponse, error)
Get - Gets a failover group. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- locationName - The name of the region where the resource is located.
- failoverGroupName - The name of the failover group.
- options - InstanceFailoverGroupsClientGetOptions contains the optional parameters for the InstanceFailoverGroupsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/InstanceFailoverGroupGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewInstanceFailoverGroupsClient().Get(ctx, "Default", "Japan East", "failover-group-test", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.InstanceFailoverGroup = armsql.InstanceFailoverGroup{ // Name: to.Ptr("failover-group-test-3"), // Type: to.Ptr("Microsoft.Sql/locations/failoverGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/JapanEast/instanceFailoverGroups/failover-group-test-3"), // Properties: &armsql.InstanceFailoverGroupProperties{ // ManagedInstancePairs: []*armsql.ManagedInstancePairInfo{ // { // PartnerManagedInstanceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-secondary-mngdInstance"), // PrimaryManagedInstanceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-primary-mngdInstance"), // }}, // PartnerRegions: []*armsql.PartnerRegionInfo{ // { // Location: to.Ptr("Japan West"), // ReplicationRole: to.Ptr(armsql.InstanceFailoverGroupReplicationRoleSecondary), // }}, // ReadOnlyEndpoint: &armsql.InstanceFailoverGroupReadOnlyEndpoint{ // FailoverPolicy: to.Ptr(armsql.ReadOnlyEndpointFailoverPolicyDisabled), // }, // ReadWriteEndpoint: &armsql.InstanceFailoverGroupReadWriteEndpoint{ // FailoverPolicy: to.Ptr(armsql.ReadWriteEndpointFailoverPolicyAutomatic), // FailoverWithDataLossGracePeriodMinutes: to.Ptr[int32](480), // }, // ReplicationRole: to.Ptr(armsql.InstanceFailoverGroupReplicationRolePrimary), // ReplicationState: to.Ptr("CATCH_UP"), // }, // } }
Output:
func (*InstanceFailoverGroupsClient) NewListByLocationPager ¶ added in v0.5.0
func (client *InstanceFailoverGroupsClient) NewListByLocationPager(resourceGroupName string, locationName string, options *InstanceFailoverGroupsClientListByLocationOptions) *runtime.Pager[InstanceFailoverGroupsClientListByLocationResponse]
NewListByLocationPager - Lists the failover groups in a location.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- locationName - The name of the region where the resource is located.
- options - InstanceFailoverGroupsClientListByLocationOptions contains the optional parameters for the InstanceFailoverGroupsClient.NewListByLocationPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/InstanceFailoverGroupList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewInstanceFailoverGroupsClient().NewListByLocationPager("Default", "Japan East", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.InstanceFailoverGroupListResult = armsql.InstanceFailoverGroupListResult{ // Value: []*armsql.InstanceFailoverGroup{ // { // Name: to.Ptr("failover-group-test"), // Type: to.Ptr("Microsoft.Sql/locations/failoverGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/JapanEast/instanceFailoverGroups/failover-group-test"), // Properties: &armsql.InstanceFailoverGroupProperties{ // ManagedInstancePairs: []*armsql.ManagedInstancePairInfo{ // { // PartnerManagedInstanceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-secondary-mngdInstance"), // PrimaryManagedInstanceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-primary-mngdInstance"), // }}, // PartnerRegions: []*armsql.PartnerRegionInfo{ // { // Location: to.Ptr("Japan West"), // ReplicationRole: to.Ptr(armsql.InstanceFailoverGroupReplicationRoleSecondary), // }}, // ReadOnlyEndpoint: &armsql.InstanceFailoverGroupReadOnlyEndpoint{ // FailoverPolicy: to.Ptr(armsql.ReadOnlyEndpointFailoverPolicyDisabled), // }, // ReadWriteEndpoint: &armsql.InstanceFailoverGroupReadWriteEndpoint{ // FailoverPolicy: to.Ptr(armsql.ReadWriteEndpointFailoverPolicyAutomatic), // FailoverWithDataLossGracePeriodMinutes: to.Ptr[int32](480), // }, // ReplicationRole: to.Ptr(armsql.InstanceFailoverGroupReplicationRolePrimary), // ReplicationState: to.Ptr("CATCH_UP"), // }, // }, // { // Name: to.Ptr("failover-group-test-1"), // Type: to.Ptr("Microsoft.Sql/locations/failoverGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/JapanEast/instanceFailoverGroups/failover-group-test-1"), // Properties: &armsql.InstanceFailoverGroupProperties{ // ManagedInstancePairs: []*armsql.ManagedInstancePairInfo{ // { // PartnerManagedInstanceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-secondary-mngdInstance-1"), // PrimaryManagedInstanceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/failover-group-primary-mngdInstance-1"), // }}, // PartnerRegions: []*armsql.PartnerRegionInfo{ // { // Location: to.Ptr("Japan West"), // ReplicationRole: to.Ptr(armsql.InstanceFailoverGroupReplicationRoleSecondary), // }}, // ReadOnlyEndpoint: &armsql.InstanceFailoverGroupReadOnlyEndpoint{ // FailoverPolicy: to.Ptr(armsql.ReadOnlyEndpointFailoverPolicyDisabled), // }, // ReadWriteEndpoint: &armsql.InstanceFailoverGroupReadWriteEndpoint{ // FailoverPolicy: to.Ptr(armsql.ReadWriteEndpointFailoverPolicyAutomatic), // FailoverWithDataLossGracePeriodMinutes: to.Ptr[int32](480), // }, // ReplicationRole: to.Ptr(armsql.InstanceFailoverGroupReplicationRolePrimary), // ReplicationState: to.Ptr("CATCH_UP"), // }, // }}, // } } }
Output:
type InstanceFailoverGroupsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type InstanceFailoverGroupsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
InstanceFailoverGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the InstanceFailoverGroupsClient.BeginCreateOrUpdate method.
type InstanceFailoverGroupsClientBeginDeleteOptions ¶ added in v0.3.0
type InstanceFailoverGroupsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
InstanceFailoverGroupsClientBeginDeleteOptions contains the optional parameters for the InstanceFailoverGroupsClient.BeginDelete method.
type InstanceFailoverGroupsClientBeginFailoverOptions ¶ added in v0.3.0
type InstanceFailoverGroupsClientBeginFailoverOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
InstanceFailoverGroupsClientBeginFailoverOptions contains the optional parameters for the InstanceFailoverGroupsClient.BeginFailover method.
type InstanceFailoverGroupsClientBeginForceFailoverAllowDataLossOptions ¶ added in v0.3.0
type InstanceFailoverGroupsClientBeginForceFailoverAllowDataLossOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
InstanceFailoverGroupsClientBeginForceFailoverAllowDataLossOptions contains the optional parameters for the InstanceFailoverGroupsClient.BeginForceFailoverAllowDataLoss method.
type InstanceFailoverGroupsClientCreateOrUpdateResponse ¶ added in v0.3.0
type InstanceFailoverGroupsClientCreateOrUpdateResponse struct { // An instance failover group. InstanceFailoverGroup }
InstanceFailoverGroupsClientCreateOrUpdateResponse contains the response from method InstanceFailoverGroupsClient.BeginCreateOrUpdate.
type InstanceFailoverGroupsClientDeleteResponse ¶ added in v0.3.0
type InstanceFailoverGroupsClientDeleteResponse struct { }
InstanceFailoverGroupsClientDeleteResponse contains the response from method InstanceFailoverGroupsClient.BeginDelete.
type InstanceFailoverGroupsClientFailoverResponse ¶ added in v0.3.0
type InstanceFailoverGroupsClientFailoverResponse struct { // An instance failover group. InstanceFailoverGroup }
InstanceFailoverGroupsClientFailoverResponse contains the response from method InstanceFailoverGroupsClient.BeginFailover.
type InstanceFailoverGroupsClientForceFailoverAllowDataLossResponse ¶ added in v0.3.0
type InstanceFailoverGroupsClientForceFailoverAllowDataLossResponse struct { // An instance failover group. InstanceFailoverGroup }
InstanceFailoverGroupsClientForceFailoverAllowDataLossResponse contains the response from method InstanceFailoverGroupsClient.BeginForceFailoverAllowDataLoss.
type InstanceFailoverGroupsClientGetOptions ¶ added in v0.3.0
type InstanceFailoverGroupsClientGetOptions struct { }
InstanceFailoverGroupsClientGetOptions contains the optional parameters for the InstanceFailoverGroupsClient.Get method.
type InstanceFailoverGroupsClientGetResponse ¶ added in v0.3.0
type InstanceFailoverGroupsClientGetResponse struct { // An instance failover group. InstanceFailoverGroup }
InstanceFailoverGroupsClientGetResponse contains the response from method InstanceFailoverGroupsClient.Get.
type InstanceFailoverGroupsClientListByLocationOptions ¶ added in v0.3.0
type InstanceFailoverGroupsClientListByLocationOptions struct { }
InstanceFailoverGroupsClientListByLocationOptions contains the optional parameters for the InstanceFailoverGroupsClient.NewListByLocationPager method.
type InstanceFailoverGroupsClientListByLocationResponse ¶ added in v0.3.0
type InstanceFailoverGroupsClientListByLocationResponse struct { // A list of instance failover groups. InstanceFailoverGroupListResult }
InstanceFailoverGroupsClientListByLocationResponse contains the response from method InstanceFailoverGroupsClient.NewListByLocationPager.
type InstancePool ¶
type InstancePool struct { // REQUIRED; Resource location. Location *string // Resource properties. Properties *InstancePoolProperties // The name and tier of the SKU. SKU *SKU // Resource tags. Tags map[string]*string // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
InstancePool - An Azure SQL instance pool.
func (InstancePool) MarshalJSON ¶
func (i InstancePool) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InstancePool.
func (*InstancePool) UnmarshalJSON ¶ added in v1.1.0
func (i *InstancePool) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type InstancePool.
type InstancePoolEditionCapability ¶
type InstancePoolEditionCapability struct { // The reason for the capability not being available. Reason *string // READ-ONLY; The instance pool version name. Name *string // READ-ONLY; The status of the capability. Status *CapabilityStatus // READ-ONLY; The supported families. SupportedFamilies []*InstancePoolFamilyCapability }
InstancePoolEditionCapability - The instance pool capability
func (InstancePoolEditionCapability) MarshalJSON ¶
func (i InstancePoolEditionCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InstancePoolEditionCapability.
func (*InstancePoolEditionCapability) UnmarshalJSON ¶ added in v1.1.0
func (i *InstancePoolEditionCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type InstancePoolEditionCapability.
type InstancePoolFamilyCapability ¶
type InstancePoolFamilyCapability struct { // The reason for the capability not being available. Reason *string // READ-ONLY; Family name. Name *string // READ-ONLY; The status of the capability. Status *CapabilityStatus // READ-ONLY; List of supported license types. SupportedLicenseTypes []*LicenseTypeCapability // READ-ONLY; List of supported virtual cores values. SupportedVcoresValues []*InstancePoolVcoresCapability }
InstancePoolFamilyCapability - The instance pool family capability.
func (InstancePoolFamilyCapability) MarshalJSON ¶
func (i InstancePoolFamilyCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InstancePoolFamilyCapability.
func (*InstancePoolFamilyCapability) UnmarshalJSON ¶ added in v1.1.0
func (i *InstancePoolFamilyCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type InstancePoolFamilyCapability.
type InstancePoolLicenseType ¶
type InstancePoolLicenseType string
InstancePoolLicenseType - The license type. Possible values are 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' (without SQL license price).
const ( InstancePoolLicenseTypeBasePrice InstancePoolLicenseType = "BasePrice" InstancePoolLicenseTypeLicenseIncluded InstancePoolLicenseType = "LicenseIncluded" )
func PossibleInstancePoolLicenseTypeValues ¶
func PossibleInstancePoolLicenseTypeValues() []InstancePoolLicenseType
PossibleInstancePoolLicenseTypeValues returns the possible values for the InstancePoolLicenseType const type.
type InstancePoolListResult ¶
type InstancePoolListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*InstancePool }
InstancePoolListResult - A list of Azure SQL instance pools.
func (InstancePoolListResult) MarshalJSON ¶
func (i InstancePoolListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InstancePoolListResult.
func (*InstancePoolListResult) UnmarshalJSON ¶ added in v1.1.0
func (i *InstancePoolListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type InstancePoolListResult.
type InstancePoolProperties ¶
type InstancePoolProperties struct { // REQUIRED; The license type. Possible values are 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' (without // SQL license price). LicenseType *InstancePoolLicenseType // REQUIRED; Resource ID of the subnet to place this instance pool in. SubnetID *string // REQUIRED; Count of vCores belonging to this instance pool. VCores *int32 }
InstancePoolProperties - Properties of an instance pool.
func (InstancePoolProperties) MarshalJSON ¶ added in v1.1.0
func (i InstancePoolProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InstancePoolProperties.
func (*InstancePoolProperties) UnmarshalJSON ¶ added in v1.1.0
func (i *InstancePoolProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type InstancePoolProperties.
type InstancePoolUpdate ¶
InstancePoolUpdate - An update to an Instance pool.
func (InstancePoolUpdate) MarshalJSON ¶
func (i InstancePoolUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InstancePoolUpdate.
func (*InstancePoolUpdate) UnmarshalJSON ¶ added in v1.1.0
func (i *InstancePoolUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type InstancePoolUpdate.
type InstancePoolVcoresCapability ¶
type InstancePoolVcoresCapability struct { // The reason for the capability not being available. Reason *string // READ-ONLY; The virtual cores identifier. Name *string // READ-ONLY; The status of the capability. Status *CapabilityStatus // READ-ONLY; Storage limit. StorageLimit *MaxSizeCapability // READ-ONLY; The virtual cores value. Value *int32 }
InstancePoolVcoresCapability - The managed instance virtual cores capability.
func (InstancePoolVcoresCapability) MarshalJSON ¶ added in v1.1.0
func (i InstancePoolVcoresCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InstancePoolVcoresCapability.
func (*InstancePoolVcoresCapability) UnmarshalJSON ¶ added in v1.1.0
func (i *InstancePoolVcoresCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type InstancePoolVcoresCapability.
type InstancePoolsClient ¶
type InstancePoolsClient struct {
// contains filtered or unexported fields
}
InstancePoolsClient contains the methods for the InstancePools group. Don't use this type directly, use NewInstancePoolsClient() instead.
func NewInstancePoolsClient ¶
func NewInstancePoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InstancePoolsClient, error)
NewInstancePoolsClient creates a new instance of InstancePoolsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*InstancePoolsClient) BeginCreateOrUpdate ¶
func (client *InstancePoolsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, instancePoolName string, parameters InstancePool, options *InstancePoolsClientBeginCreateOrUpdateOptions) (*runtime.Poller[InstancePoolsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates an instance pool. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- instancePoolName - The name of the instance pool to be created or updated.
- parameters - The requested instance pool resource state.
- options - InstancePoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the InstancePoolsClient.BeginCreateOrUpdate method.
Example (CreateAnInstancePoolWithAllProperties) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateInstancePoolMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewInstancePoolsClient().BeginCreateOrUpdate(ctx, "group1", "testIP", armsql.InstancePool{ Location: to.Ptr("japaneast"), Tags: map[string]*string{ "a": to.Ptr("b"), }, Properties: &armsql.InstancePoolProperties{ LicenseType: to.Ptr(armsql.InstancePoolLicenseTypeLicenseIncluded), SubnetID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1"), VCores: to.Ptr[int32](8), }, SKU: &armsql.SKU{ Name: to.Ptr("GP_Gen5"), Family: to.Ptr("Gen5"), Tier: to.Ptr("GeneralPurpose"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.InstancePool = armsql.InstancePool{ // Name: to.Ptr("testIP"), // Type: to.Ptr("Microsoft.Sql/instancePools"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP"), // Location: to.Ptr("japaneast"), // Tags: map[string]*string{ // "a": to.Ptr("b"), // }, // Properties: &armsql.InstancePoolProperties{ // LicenseType: to.Ptr(armsql.InstancePoolLicenseTypeLicenseIncluded), // SubnetID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1"), // VCores: to.Ptr[int32](8), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen5"), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("GeneralPurpose"), // }, // } }
Output:
Example (CreateAnInstancePoolWithMinProperties) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateInstancePoolMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewInstancePoolsClient().BeginCreateOrUpdate(ctx, "group1", "testIP", armsql.InstancePool{ Location: to.Ptr("japaneast"), Properties: &armsql.InstancePoolProperties{ LicenseType: to.Ptr(armsql.InstancePoolLicenseTypeLicenseIncluded), SubnetID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1"), VCores: to.Ptr[int32](8), }, SKU: &armsql.SKU{ Name: to.Ptr("GP_Gen5"), Family: to.Ptr("Gen5"), Tier: to.Ptr("GeneralPurpose"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.InstancePool = armsql.InstancePool{ // Name: to.Ptr("testIP"), // Type: to.Ptr("Microsoft.Sql/instancePools"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP"), // Location: to.Ptr("japaneast"), // Tags: map[string]*string{ // }, // Properties: &armsql.InstancePoolProperties{ // LicenseType: to.Ptr(armsql.InstancePoolLicenseTypeLicenseIncluded), // SubnetID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1"), // VCores: to.Ptr[int32](8), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen5"), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("GeneralPurpose"), // }, // } }
Output:
func (*InstancePoolsClient) BeginDelete ¶
func (client *InstancePoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, instancePoolName string, options *InstancePoolsClientBeginDeleteOptions) (*runtime.Poller[InstancePoolsClientDeleteResponse], error)
BeginDelete - Deletes an instance pool If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- instancePoolName - The name of the instance pool to be deleted
- options - InstancePoolsClientBeginDeleteOptions contains the optional parameters for the InstancePoolsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteInstancePool.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewInstancePoolsClient().BeginDelete(ctx, "group1", "testIP", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*InstancePoolsClient) BeginUpdate ¶
func (client *InstancePoolsClient) BeginUpdate(ctx context.Context, resourceGroupName string, instancePoolName string, parameters InstancePoolUpdate, options *InstancePoolsClientBeginUpdateOptions) (*runtime.Poller[InstancePoolsClientUpdateResponse], error)
BeginUpdate - Updates an instance pool. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- instancePoolName - The name of the instance pool to be updated.
- parameters - The requested instance pool resource state.
- options - InstancePoolsClientBeginUpdateOptions contains the optional parameters for the InstancePoolsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/PatchInstancePool.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewInstancePoolsClient().BeginUpdate(ctx, "group1", "testIP", armsql.InstancePoolUpdate{ Tags: map[string]*string{ "x": to.Ptr("y"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.InstancePool = armsql.InstancePool{ // Name: to.Ptr("testIP"), // Type: to.Ptr("Microsoft.Sql/instancePools"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP"), // Location: to.Ptr("japaneast"), // Tags: map[string]*string{ // "x": to.Ptr("y"), // }, // Properties: &armsql.InstancePoolProperties{ // LicenseType: to.Ptr(armsql.InstancePoolLicenseTypeLicenseIncluded), // SubnetID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetwork/myvnet/subnets/mysubnet1"), // VCores: to.Ptr[int32](8), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen5"), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("GeneralPurpose"), // }, // } }
Output:
func (*InstancePoolsClient) Get ¶
func (client *InstancePoolsClient) Get(ctx context.Context, resourceGroupName string, instancePoolName string, options *InstancePoolsClientGetOptions) (InstancePoolsClientGetResponse, error)
Get - Gets an instance pool. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- instancePoolName - The name of the instance pool to be retrieved.
- options - InstancePoolsClientGetOptions contains the optional parameters for the InstancePoolsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetInstancePool.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewInstancePoolsClient().Get(ctx, "group1", "testIP", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.InstancePool = armsql.InstancePool{ // Name: to.Ptr("testIP"), // Type: to.Ptr("Microsoft.Sql/instancePools"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP"), // Location: to.Ptr("japaneast"), // Tags: map[string]*string{ // "a": to.Ptr("b"), // }, // Properties: &armsql.InstancePoolProperties{ // LicenseType: to.Ptr(armsql.InstancePoolLicenseTypeLicenseIncluded), // SubnetID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetwork/myvnet/subnets/mysubnet1"), // VCores: to.Ptr[int32](8), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen5"), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("GeneralPurpose"), // }, // } }
Output:
func (*InstancePoolsClient) NewListByResourceGroupPager ¶ added in v0.5.0
func (client *InstancePoolsClient) NewListByResourceGroupPager(resourceGroupName string, options *InstancePoolsClientListByResourceGroupOptions) *runtime.Pager[InstancePoolsClientListByResourceGroupResponse]
NewListByResourceGroupPager - Gets a list of instance pools in the resource group
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- options - InstancePoolsClientListByResourceGroupOptions contains the optional parameters for the InstancePoolsClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListInstancePoolsByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewInstancePoolsClient().NewListByResourceGroupPager("group1", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.InstancePoolListResult = armsql.InstancePoolListResult{ // Value: []*armsql.InstancePool{ // { // Name: to.Ptr("testIP"), // Type: to.Ptr("Microsoft.Sql/instancePools"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP"), // Location: to.Ptr("japaneast"), // Tags: map[string]*string{ // "a": to.Ptr("b"), // }, // Properties: &armsql.InstancePoolProperties{ // LicenseType: to.Ptr(armsql.InstancePoolLicenseTypeLicenseIncluded), // SubnetID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetwork/myvnet/subnets/mysubnet1"), // VCores: to.Ptr[int32](8), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen5"), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("GeneralPurpose"), // }, // }, // { // Name: to.Ptr("testIP2"), // Type: to.Ptr("Microsoft.Sql/instancePools"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP2"), // Location: to.Ptr("japaneast"), // Tags: map[string]*string{ // "a": to.Ptr("b"), // }, // Properties: &armsql.InstancePoolProperties{ // LicenseType: to.Ptr(armsql.InstancePoolLicenseTypeLicenseIncluded), // SubnetID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetwork/myvnet/subnets/mysubnet1"), // VCores: to.Ptr[int32](8), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen5"), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("GeneralPurpose"), // }, // }}, // } } }
Output:
func (*InstancePoolsClient) NewListPager ¶ added in v0.5.0
func (client *InstancePoolsClient) NewListPager(options *InstancePoolsClientListOptions) *runtime.Pager[InstancePoolsClientListResponse]
NewListPager - Gets a list of all instance pools in the subscription.
Generated from API version 2020-11-01-preview
- options - InstancePoolsClientListOptions contains the optional parameters for the InstancePoolsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListInstancePoolsBySubscriptionId.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewInstancePoolsClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.InstancePoolListResult = armsql.InstancePoolListResult{ // Value: []*armsql.InstancePool{ // { // Name: to.Ptr("testIP"), // Type: to.Ptr("Microsoft.Sql/instancePools"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP"), // Location: to.Ptr("japaneast"), // Tags: map[string]*string{ // "a": to.Ptr("b"), // }, // Properties: &armsql.InstancePoolProperties{ // LicenseType: to.Ptr(armsql.InstancePoolLicenseTypeLicenseIncluded), // SubnetID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetwork/myvnet/subnets/mysubnet1"), // VCores: to.Ptr[int32](8), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen5"), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("GeneralPurpose"), // }, // }, // { // Name: to.Ptr("testIP2"), // Type: to.Ptr("Microsoft.Sql/instancePools"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group2/providers/Microsoft.Sql/instancePools/testIP2"), // Location: to.Ptr("japaneast"), // Tags: map[string]*string{ // "a": to.Ptr("b"), // }, // Properties: &armsql.InstancePoolProperties{ // LicenseType: to.Ptr(armsql.InstancePoolLicenseTypeLicenseIncluded), // SubnetID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group2/providers/Microsoft.Network/virtualNetwork/myvnet/subnets/mysubnet1"), // VCores: to.Ptr[int32](8), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen5"), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("GeneralPurpose"), // }, // }}, // } } }
Output:
type InstancePoolsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type InstancePoolsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
InstancePoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the InstancePoolsClient.BeginCreateOrUpdate method.
type InstancePoolsClientBeginDeleteOptions ¶ added in v0.3.0
type InstancePoolsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
InstancePoolsClientBeginDeleteOptions contains the optional parameters for the InstancePoolsClient.BeginDelete method.
type InstancePoolsClientBeginUpdateOptions ¶ added in v0.3.0
type InstancePoolsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
InstancePoolsClientBeginUpdateOptions contains the optional parameters for the InstancePoolsClient.BeginUpdate method.
type InstancePoolsClientCreateOrUpdateResponse ¶ added in v0.3.0
type InstancePoolsClientCreateOrUpdateResponse struct { // An Azure SQL instance pool. InstancePool }
InstancePoolsClientCreateOrUpdateResponse contains the response from method InstancePoolsClient.BeginCreateOrUpdate.
type InstancePoolsClientDeleteResponse ¶ added in v0.3.0
type InstancePoolsClientDeleteResponse struct { }
InstancePoolsClientDeleteResponse contains the response from method InstancePoolsClient.BeginDelete.
type InstancePoolsClientGetOptions ¶ added in v0.3.0
type InstancePoolsClientGetOptions struct { }
InstancePoolsClientGetOptions contains the optional parameters for the InstancePoolsClient.Get method.
type InstancePoolsClientGetResponse ¶ added in v0.3.0
type InstancePoolsClientGetResponse struct { // An Azure SQL instance pool. InstancePool }
InstancePoolsClientGetResponse contains the response from method InstancePoolsClient.Get.
type InstancePoolsClientListByResourceGroupOptions ¶ added in v0.3.0
type InstancePoolsClientListByResourceGroupOptions struct { }
InstancePoolsClientListByResourceGroupOptions contains the optional parameters for the InstancePoolsClient.NewListByResourceGroupPager method.
type InstancePoolsClientListByResourceGroupResponse ¶ added in v0.3.0
type InstancePoolsClientListByResourceGroupResponse struct { // A list of Azure SQL instance pools. InstancePoolListResult }
InstancePoolsClientListByResourceGroupResponse contains the response from method InstancePoolsClient.NewListByResourceGroupPager.
type InstancePoolsClientListOptions ¶ added in v0.3.0
type InstancePoolsClientListOptions struct { }
InstancePoolsClientListOptions contains the optional parameters for the InstancePoolsClient.NewListPager method.
type InstancePoolsClientListResponse ¶ added in v0.3.0
type InstancePoolsClientListResponse struct { // A list of Azure SQL instance pools. InstancePoolListResult }
InstancePoolsClientListResponse contains the response from method InstancePoolsClient.NewListPager.
type InstancePoolsClientUpdateResponse ¶ added in v0.3.0
type InstancePoolsClientUpdateResponse struct { // An Azure SQL instance pool. InstancePool }
InstancePoolsClientUpdateResponse contains the response from method InstancePoolsClient.BeginUpdate.
type IsRetryable ¶
type IsRetryable string
IsRetryable - Gets whether the error could be ignored and recommended action could be retried. Possible values are: Yes/No
const ( IsRetryableNo IsRetryable = "No" IsRetryableYes IsRetryable = "Yes" )
func PossibleIsRetryableValues ¶
func PossibleIsRetryableValues() []IsRetryable
PossibleIsRetryableValues returns the possible values for the IsRetryable const type.
type Job ¶
type Job struct { // Resource properties. Properties *JobProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
Job - A job.
func (Job) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Job.
func (*Job) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Job.
type JobAgent ¶
type JobAgent struct { // REQUIRED; Resource location. Location *string // Resource properties. Properties *JobAgentProperties // The name and tier of the SKU. SKU *SKU // Resource tags. Tags map[string]*string // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
JobAgent - An Azure SQL job agent.
func (JobAgent) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type JobAgent.
func (*JobAgent) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type JobAgent.
type JobAgentListResult ¶
type JobAgentListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*JobAgent }
JobAgentListResult - A list of Azure SQL job agents.
func (JobAgentListResult) MarshalJSON ¶
func (j JobAgentListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobAgentListResult.
func (*JobAgentListResult) UnmarshalJSON ¶ added in v1.1.0
func (j *JobAgentListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type JobAgentListResult.
type JobAgentProperties ¶
type JobAgentProperties struct { // REQUIRED; Resource ID of the database to store job metadata in. DatabaseID *string // READ-ONLY; The state of the job agent. State *JobAgentState }
JobAgentProperties - Properties of a job agent.
func (JobAgentProperties) MarshalJSON ¶ added in v1.1.0
func (j JobAgentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobAgentProperties.
func (*JobAgentProperties) UnmarshalJSON ¶ added in v1.1.0
func (j *JobAgentProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type JobAgentProperties.
type JobAgentState ¶
type JobAgentState string
JobAgentState - The state of the job agent.
const ( JobAgentStateCreating JobAgentState = "Creating" JobAgentStateDeleting JobAgentState = "Deleting" JobAgentStateDisabled JobAgentState = "Disabled" JobAgentStateReady JobAgentState = "Ready" JobAgentStateUpdating JobAgentState = "Updating" )
func PossibleJobAgentStateValues ¶
func PossibleJobAgentStateValues() []JobAgentState
PossibleJobAgentStateValues returns the possible values for the JobAgentState const type.
type JobAgentUpdate ¶
JobAgentUpdate - An update to an Azure SQL job agent.
func (JobAgentUpdate) MarshalJSON ¶
func (j JobAgentUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobAgentUpdate.
func (*JobAgentUpdate) UnmarshalJSON ¶ added in v1.1.0
func (j *JobAgentUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type JobAgentUpdate.
type JobAgentsClient ¶
type JobAgentsClient struct {
// contains filtered or unexported fields
}
JobAgentsClient contains the methods for the JobAgents group. Don't use this type directly, use NewJobAgentsClient() instead.
func NewJobAgentsClient ¶
func NewJobAgentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobAgentsClient, error)
NewJobAgentsClient creates a new instance of JobAgentsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*JobAgentsClient) BeginCreateOrUpdate ¶
func (client *JobAgentsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, parameters JobAgent, options *JobAgentsClientBeginCreateOrUpdateOptions) (*runtime.Poller[JobAgentsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a job agent. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent to be created or updated.
- parameters - The requested job agent resource state.
- options - JobAgentsClientBeginCreateOrUpdateOptions contains the optional parameters for the JobAgentsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobAgent.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewJobAgentsClient().BeginCreateOrUpdate(ctx, "group1", "server1", "agent1", armsql.JobAgent{ Location: to.Ptr("southeastasia"), Properties: &armsql.JobAgentProperties{ DatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.JobAgent = armsql.JobAgent{ // Name: to.Ptr("agent1"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1"), // Location: to.Ptr("southeastasia"), // Properties: &armsql.JobAgentProperties{ // DatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1"), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("Agent"), // Capacity: to.Ptr[int32](100), // }, // } }
Output:
func (*JobAgentsClient) BeginDelete ¶
func (client *JobAgentsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, options *JobAgentsClientBeginDeleteOptions) (*runtime.Poller[JobAgentsClientDeleteResponse], error)
BeginDelete - Deletes a job agent. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent to be deleted.
- options - JobAgentsClientBeginDeleteOptions contains the optional parameters for the JobAgentsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteJobAgent.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewJobAgentsClient().BeginDelete(ctx, "group1", "server1", "agent1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*JobAgentsClient) BeginUpdate ¶
func (client *JobAgentsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, parameters JobAgentUpdate, options *JobAgentsClientBeginUpdateOptions) (*runtime.Poller[JobAgentsClientUpdateResponse], error)
BeginUpdate - Updates a job agent. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent to be updated.
- parameters - The update to the job agent.
- options - JobAgentsClientBeginUpdateOptions contains the optional parameters for the JobAgentsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/UpdateJobAgent.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewJobAgentsClient().BeginUpdate(ctx, "group1", "server1", "agent1", armsql.JobAgentUpdate{ Tags: map[string]*string{ "mytag1": to.Ptr("myvalue1"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.JobAgent = armsql.JobAgent{ // Name: to.Ptr("agent1"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1"), // Location: to.Ptr("southeastasia"), // Tags: map[string]*string{ // "mytag1": to.Ptr("myvalue1"), // }, // Properties: &armsql.JobAgentProperties{ // DatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1"), // }, // } }
Output:
func (*JobAgentsClient) Get ¶
func (client *JobAgentsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, options *JobAgentsClientGetOptions) (JobAgentsClientGetResponse, error)
Get - Gets a job agent. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent to be retrieved.
- options - JobAgentsClientGetOptions contains the optional parameters for the JobAgentsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobAgent.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewJobAgentsClient().Get(ctx, "group1", "server1", "agent1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.JobAgent = armsql.JobAgent{ // Name: to.Ptr("agent1"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1"), // Location: to.Ptr("southeastasia"), // Properties: &armsql.JobAgentProperties{ // DatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1"), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("Agent"), // Capacity: to.Ptr[int32](400), // }, // } }
Output:
func (*JobAgentsClient) NewListByServerPager ¶ added in v0.5.0
func (client *JobAgentsClient) NewListByServerPager(resourceGroupName string, serverName string, options *JobAgentsClientListByServerOptions) *runtime.Pager[JobAgentsClientListByServerResponse]
NewListByServerPager - Gets a list of job agents in a server.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - JobAgentsClientListByServerOptions contains the optional parameters for the JobAgentsClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobAgentsByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewJobAgentsClient().NewListByServerPager("group1", "server1", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.JobAgentListResult = armsql.JobAgentListResult{ // Value: []*armsql.JobAgent{ // { // Name: to.Ptr("agent1"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1"), // Location: to.Ptr("southeastasia"), // Properties: &armsql.JobAgentProperties{ // DatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1"), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("Agent"), // Capacity: to.Ptr[int32](200), // }, // }, // { // Name: to.Ptr("jobAgent2"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/jobAgent2"), // Location: to.Ptr("southeastasia"), // Properties: &armsql.JobAgentProperties{ // DatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db12"), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("Agent"), // Capacity: to.Ptr[int32](400), // }, // }}, // } } }
Output:
type JobAgentsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type JobAgentsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
JobAgentsClientBeginCreateOrUpdateOptions contains the optional parameters for the JobAgentsClient.BeginCreateOrUpdate method.
type JobAgentsClientBeginDeleteOptions ¶ added in v0.3.0
type JobAgentsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
JobAgentsClientBeginDeleteOptions contains the optional parameters for the JobAgentsClient.BeginDelete method.
type JobAgentsClientBeginUpdateOptions ¶ added in v0.3.0
type JobAgentsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
JobAgentsClientBeginUpdateOptions contains the optional parameters for the JobAgentsClient.BeginUpdate method.
type JobAgentsClientCreateOrUpdateResponse ¶ added in v0.3.0
type JobAgentsClientCreateOrUpdateResponse struct { // An Azure SQL job agent. JobAgent }
JobAgentsClientCreateOrUpdateResponse contains the response from method JobAgentsClient.BeginCreateOrUpdate.
type JobAgentsClientDeleteResponse ¶ added in v0.3.0
type JobAgentsClientDeleteResponse struct { }
JobAgentsClientDeleteResponse contains the response from method JobAgentsClient.BeginDelete.
type JobAgentsClientGetOptions ¶ added in v0.3.0
type JobAgentsClientGetOptions struct { }
JobAgentsClientGetOptions contains the optional parameters for the JobAgentsClient.Get method.
type JobAgentsClientGetResponse ¶ added in v0.3.0
type JobAgentsClientGetResponse struct { // An Azure SQL job agent. JobAgent }
JobAgentsClientGetResponse contains the response from method JobAgentsClient.Get.
type JobAgentsClientListByServerOptions ¶ added in v0.3.0
type JobAgentsClientListByServerOptions struct { }
JobAgentsClientListByServerOptions contains the optional parameters for the JobAgentsClient.NewListByServerPager method.
type JobAgentsClientListByServerResponse ¶ added in v0.3.0
type JobAgentsClientListByServerResponse struct { // A list of Azure SQL job agents. JobAgentListResult }
JobAgentsClientListByServerResponse contains the response from method JobAgentsClient.NewListByServerPager.
type JobAgentsClientUpdateResponse ¶ added in v0.3.0
type JobAgentsClientUpdateResponse struct { // An Azure SQL job agent. JobAgent }
JobAgentsClientUpdateResponse contains the response from method JobAgentsClient.BeginUpdate.
type JobCredential ¶
type JobCredential struct { // Resource properties. Properties *JobCredentialProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
JobCredential - A stored credential that can be used by a job to connect to target databases.
func (JobCredential) MarshalJSON ¶
func (j JobCredential) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobCredential.
func (*JobCredential) UnmarshalJSON ¶ added in v1.1.0
func (j *JobCredential) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type JobCredential.
type JobCredentialListResult ¶
type JobCredentialListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*JobCredential }
JobCredentialListResult - A list of job credentials.
func (JobCredentialListResult) MarshalJSON ¶
func (j JobCredentialListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobCredentialListResult.
func (*JobCredentialListResult) UnmarshalJSON ¶ added in v1.1.0
func (j *JobCredentialListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type JobCredentialListResult.
type JobCredentialProperties ¶
type JobCredentialProperties struct { // REQUIRED; The credential password. Password *string // REQUIRED; The credential user name. Username *string }
JobCredentialProperties - Properties of a job credential.
func (JobCredentialProperties) MarshalJSON ¶ added in v1.1.0
func (j JobCredentialProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobCredentialProperties.
func (*JobCredentialProperties) UnmarshalJSON ¶ added in v1.1.0
func (j *JobCredentialProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type JobCredentialProperties.
type JobCredentialsClient ¶
type JobCredentialsClient struct {
// contains filtered or unexported fields
}
JobCredentialsClient contains the methods for the JobCredentials group. Don't use this type directly, use NewJobCredentialsClient() instead.
func NewJobCredentialsClient ¶
func NewJobCredentialsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobCredentialsClient, error)
NewJobCredentialsClient creates a new instance of JobCredentialsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*JobCredentialsClient) CreateOrUpdate ¶
func (client *JobCredentialsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, credentialName string, parameters JobCredential, options *JobCredentialsClientCreateOrUpdateOptions) (JobCredentialsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates a job credential. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- credentialName - The name of the credential.
- parameters - The requested job credential state.
- options - JobCredentialsClientCreateOrUpdateOptions contains the optional parameters for the JobCredentialsClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobCredential.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewJobCredentialsClient().CreateOrUpdate(ctx, "group1", "server1", "agent1", "cred1", armsql.JobCredential{ Properties: &armsql.JobCredentialProperties{ Password: to.Ptr("<password>"), Username: to.Ptr("myuser"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.JobCredential = armsql.JobCredential{ // Name: to.Ptr("cred1"), // Type: to.Ptr("Microsoft.Sql/servers/jobAccounts/credentials"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1"), // Properties: &armsql.JobCredentialProperties{ // Username: to.Ptr("myuser"), // }, // } }
Output:
func (*JobCredentialsClient) Delete ¶
func (client *JobCredentialsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, credentialName string, options *JobCredentialsClientDeleteOptions) (JobCredentialsClientDeleteResponse, error)
Delete - Deletes a job credential. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- credentialName - The name of the credential.
- options - JobCredentialsClientDeleteOptions contains the optional parameters for the JobCredentialsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteJobCredential.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewJobCredentialsClient().Delete(ctx, "group1", "server1", "agent1", "cred1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*JobCredentialsClient) Get ¶
func (client *JobCredentialsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, credentialName string, options *JobCredentialsClientGetOptions) (JobCredentialsClientGetResponse, error)
Get - Gets a jobs credential. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- credentialName - The name of the credential.
- options - JobCredentialsClientGetOptions contains the optional parameters for the JobCredentialsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobCredential.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewJobCredentialsClient().Get(ctx, "group1", "server1", "agent1", "cred1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.JobCredential = armsql.JobCredential{ // Name: to.Ptr("cred1"), // Type: to.Ptr("Microsoft.Sql/servers/jobAccounts/credentials"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1"), // Properties: &armsql.JobCredentialProperties{ // Username: to.Ptr("myuser"), // }, // } }
Output:
func (*JobCredentialsClient) NewListByAgentPager ¶ added in v0.5.0
func (client *JobCredentialsClient) NewListByAgentPager(resourceGroupName string, serverName string, jobAgentName string, options *JobCredentialsClientListByAgentOptions) *runtime.Pager[JobCredentialsClientListByAgentResponse]
NewListByAgentPager - Gets a list of jobs credentials.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- options - JobCredentialsClientListByAgentOptions contains the optional parameters for the JobCredentialsClient.NewListByAgentPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobCredentialsByAgent.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewJobCredentialsClient().NewListByAgentPager("group1", "server1", "agent1", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.JobCredentialListResult = armsql.JobCredentialListResult{ // Value: []*armsql.JobCredential{ // { // Name: to.Ptr("cred1"), // Type: to.Ptr("Microsoft.Sql/servers/jobAccounts/credentials"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1"), // Properties: &armsql.JobCredentialProperties{ // Username: to.Ptr("myuser"), // }, // }, // { // Name: to.Ptr("cred2"), // Type: to.Ptr("Microsoft.Sql/servers/jobAccounts/credentials"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred2"), // Properties: &armsql.JobCredentialProperties{ // Username: to.Ptr("anotherUser"), // }, // }}, // } } }
Output:
type JobCredentialsClientCreateOrUpdateOptions ¶ added in v0.3.0
type JobCredentialsClientCreateOrUpdateOptions struct { }
JobCredentialsClientCreateOrUpdateOptions contains the optional parameters for the JobCredentialsClient.CreateOrUpdate method.
type JobCredentialsClientCreateOrUpdateResponse ¶ added in v0.3.0
type JobCredentialsClientCreateOrUpdateResponse struct { // A stored credential that can be used by a job to connect to target databases. JobCredential }
JobCredentialsClientCreateOrUpdateResponse contains the response from method JobCredentialsClient.CreateOrUpdate.
type JobCredentialsClientDeleteOptions ¶ added in v0.3.0
type JobCredentialsClientDeleteOptions struct { }
JobCredentialsClientDeleteOptions contains the optional parameters for the JobCredentialsClient.Delete method.
type JobCredentialsClientDeleteResponse ¶ added in v0.3.0
type JobCredentialsClientDeleteResponse struct { }
JobCredentialsClientDeleteResponse contains the response from method JobCredentialsClient.Delete.
type JobCredentialsClientGetOptions ¶ added in v0.3.0
type JobCredentialsClientGetOptions struct { }
JobCredentialsClientGetOptions contains the optional parameters for the JobCredentialsClient.Get method.
type JobCredentialsClientGetResponse ¶ added in v0.3.0
type JobCredentialsClientGetResponse struct { // A stored credential that can be used by a job to connect to target databases. JobCredential }
JobCredentialsClientGetResponse contains the response from method JobCredentialsClient.Get.
type JobCredentialsClientListByAgentOptions ¶ added in v0.3.0
type JobCredentialsClientListByAgentOptions struct { }
JobCredentialsClientListByAgentOptions contains the optional parameters for the JobCredentialsClient.NewListByAgentPager method.
type JobCredentialsClientListByAgentResponse ¶ added in v0.3.0
type JobCredentialsClientListByAgentResponse struct { // A list of job credentials. JobCredentialListResult }
JobCredentialsClientListByAgentResponse contains the response from method JobCredentialsClient.NewListByAgentPager.
type JobExecution ¶
type JobExecution struct { // Resource properties. Properties *JobExecutionProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
JobExecution - An execution of a job
func (JobExecution) MarshalJSON ¶
func (j JobExecution) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobExecution.
func (*JobExecution) UnmarshalJSON ¶ added in v1.1.0
func (j *JobExecution) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type JobExecution.
type JobExecutionLifecycle ¶
type JobExecutionLifecycle string
JobExecutionLifecycle - The detailed state of the job execution.
const ( JobExecutionLifecycleCanceled JobExecutionLifecycle = "Canceled" JobExecutionLifecycleCreated JobExecutionLifecycle = "Created" JobExecutionLifecycleFailed JobExecutionLifecycle = "Failed" JobExecutionLifecycleInProgress JobExecutionLifecycle = "InProgress" JobExecutionLifecycleSkipped JobExecutionLifecycle = "Skipped" JobExecutionLifecycleSucceeded JobExecutionLifecycle = "Succeeded" JobExecutionLifecycleSucceededWithSkipped JobExecutionLifecycle = "SucceededWithSkipped" JobExecutionLifecycleTimedOut JobExecutionLifecycle = "TimedOut" JobExecutionLifecycleWaitingForChildJobExecutions JobExecutionLifecycle = "WaitingForChildJobExecutions" JobExecutionLifecycleWaitingForRetry JobExecutionLifecycle = "WaitingForRetry" )
func PossibleJobExecutionLifecycleValues ¶
func PossibleJobExecutionLifecycleValues() []JobExecutionLifecycle
PossibleJobExecutionLifecycleValues returns the possible values for the JobExecutionLifecycle const type.
type JobExecutionListResult ¶
type JobExecutionListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*JobExecution }
JobExecutionListResult - A list of job executions.
func (JobExecutionListResult) MarshalJSON ¶
func (j JobExecutionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobExecutionListResult.
func (*JobExecutionListResult) UnmarshalJSON ¶ added in v1.1.0
func (j *JobExecutionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type JobExecutionListResult.
type JobExecutionProperties ¶
type JobExecutionProperties struct { // Number of times the job execution has been attempted. CurrentAttempts *int32 // READ-ONLY; The time that the job execution was created. CreateTime *time.Time // READ-ONLY; Start time of the current attempt. CurrentAttemptStartTime *time.Time // READ-ONLY; The time that the job execution completed. EndTime *time.Time // READ-ONLY; The unique identifier of the job execution. JobExecutionID *string // READ-ONLY; The job version number. JobVersion *int32 // READ-ONLY; The last status or error message. LastMessage *string // READ-ONLY; The detailed state of the job execution. Lifecycle *JobExecutionLifecycle // READ-ONLY; The ARM provisioning state of the job execution. ProvisioningState *ProvisioningState // READ-ONLY; The time that the job execution started. StartTime *time.Time // READ-ONLY; The job step id. StepID *int32 // READ-ONLY; The job step name. StepName *string // READ-ONLY; The target that this execution is executed on. Target *JobExecutionTarget }
JobExecutionProperties - Properties for an Azure SQL Database Elastic job execution.
func (JobExecutionProperties) MarshalJSON ¶
func (j JobExecutionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobExecutionProperties.
func (*JobExecutionProperties) UnmarshalJSON ¶
func (j *JobExecutionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type JobExecutionProperties.
type JobExecutionTarget ¶
type JobExecutionTarget struct { // READ-ONLY; The database name. DatabaseName *string // READ-ONLY; The server name. ServerName *string // READ-ONLY; The type of the target. Type *JobTargetType }
JobExecutionTarget - The target that a job execution is executed on.
func (JobExecutionTarget) MarshalJSON ¶ added in v1.1.0
func (j JobExecutionTarget) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobExecutionTarget.
func (*JobExecutionTarget) UnmarshalJSON ¶ added in v1.1.0
func (j *JobExecutionTarget) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type JobExecutionTarget.
type JobExecutionsClient ¶
type JobExecutionsClient struct {
// contains filtered or unexported fields
}
JobExecutionsClient contains the methods for the JobExecutions group. Don't use this type directly, use NewJobExecutionsClient() instead.
func NewJobExecutionsClient ¶
func NewJobExecutionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobExecutionsClient, error)
NewJobExecutionsClient creates a new instance of JobExecutionsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*JobExecutionsClient) BeginCreate ¶
func (client *JobExecutionsClient) BeginCreate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, options *JobExecutionsClientBeginCreateOptions) (*runtime.Poller[JobExecutionsClientCreateResponse], error)
BeginCreate - Starts an elastic job execution. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- jobName - The name of the job to get.
- options - JobExecutionsClientBeginCreateOptions contains the optional parameters for the JobExecutionsClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateJobExecution.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewJobExecutionsClient().BeginCreate(ctx, "group1", "server1", "agent1", "job1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.JobExecution = armsql.JobExecution{ // Name: to.Ptr("5555-6666-7777-8888-999999999999"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/executions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999"), // Properties: &armsql.JobExecutionProperties{ // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-09-23T01:00:00.000Z"); return t}()), // CurrentAttempts: to.Ptr[int32](0), // JobExecutionID: to.Ptr("5A86BF65-43AC-F258-2524-9E92992F97CA"), // JobVersion: to.Ptr[int32](1), // LastMessage: to.Ptr("Job execution created."), // Lifecycle: to.Ptr(armsql.JobExecutionLifecycleCreated), // ProvisioningState: to.Ptr(armsql.ProvisioningStateSucceeded), // }, // } }
Output:
func (*JobExecutionsClient) BeginCreateOrUpdate ¶
func (client *JobExecutionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID string, options *JobExecutionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[JobExecutionsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a job execution. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- jobName - The name of the job to get.
- jobExecutionID - The job execution id to create the job execution under.
- options - JobExecutionsClientBeginCreateOrUpdateOptions contains the optional parameters for the JobExecutionsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobExecution.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewJobExecutionsClient().BeginCreateOrUpdate(ctx, "group1", "server1", "agent1", "job1", "5A86BF65-43AC-F258-2524-9E92992F97CA", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.JobExecution = armsql.JobExecution{ // Name: to.Ptr("5555-6666-7777-8888-999999999999"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/executions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999"), // Properties: &armsql.JobExecutionProperties{ // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-18T19:02:00.870Z"); return t}()), // CurrentAttempts: to.Ptr[int32](0), // JobExecutionID: to.Ptr("5A86BF65-43AC-F258-2524-9E92992F97CA"), // JobVersion: to.Ptr[int32](1), // LastMessage: to.Ptr("Job execution created."), // Lifecycle: to.Ptr(armsql.JobExecutionLifecycleCreated), // ProvisioningState: to.Ptr(armsql.ProvisioningStateSucceeded), // }, // } }
Output:
func (*JobExecutionsClient) Cancel ¶
func (client *JobExecutionsClient) Cancel(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID string, options *JobExecutionsClientCancelOptions) (JobExecutionsClientCancelResponse, error)
Cancel - Requests cancellation of a job execution. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- jobName - The name of the job.
- jobExecutionID - The id of the job execution to cancel.
- options - JobExecutionsClientCancelOptions contains the optional parameters for the JobExecutionsClient.Cancel method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CancelJobExecution.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewJobExecutionsClient().Cancel(ctx, "group1", "server1", "agent1", "job1", "5A86BF65-43AC-F258-2524-9E92992F97CA", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*JobExecutionsClient) Get ¶
func (client *JobExecutionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID string, options *JobExecutionsClientGetOptions) (JobExecutionsClientGetResponse, error)
Get - Gets a job execution. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- jobName - The name of the job.
- jobExecutionID - The id of the job execution
- options - JobExecutionsClientGetOptions contains the optional parameters for the JobExecutionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobExecution.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewJobExecutionsClient().Get(ctx, "group1", "server1", "agent1", "job1", "5A86BF65-43AC-F258-2524-9E92992F97CA", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.JobExecution = armsql.JobExecution{ // Name: to.Ptr("5555-6666-7777-8888-999999999999"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/executions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999"), // Properties: &armsql.JobExecutionProperties{ // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-21T19:02:00.870Z"); return t}()), // CurrentAttemptStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-13T19:12:00.870Z"); return t}()), // CurrentAttempts: to.Ptr[int32](0), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-21T19:22:00.870Z"); return t}()), // JobExecutionID: to.Ptr("5A86BF65-43AC-F258-2524-9E92992F97CA"), // JobVersion: to.Ptr[int32](1), // LastMessage: to.Ptr("Job execution created."), // Lifecycle: to.Ptr(armsql.JobExecutionLifecycleCreated), // ProvisioningState: to.Ptr(armsql.ProvisioningStateSucceeded), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-21T19:12:00.870Z"); return t}()), // }, // } }
Output:
func (*JobExecutionsClient) NewListByAgentPager ¶ added in v0.5.0
func (client *JobExecutionsClient) NewListByAgentPager(resourceGroupName string, serverName string, jobAgentName string, options *JobExecutionsClientListByAgentOptions) *runtime.Pager[JobExecutionsClientListByAgentResponse]
NewListByAgentPager - Lists all executions in a job agent.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- options - JobExecutionsClientListByAgentOptions contains the optional parameters for the JobExecutionsClient.NewListByAgentPager method.
Example (ListAllJobExecutionsInAJobAgent) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobExecutionsByAgent.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewJobExecutionsClient().NewListByAgentPager("group1", "server1", "agent1", &armsql.JobExecutionsClientListByAgentOptions{CreateTimeMin: nil, CreateTimeMax: nil, EndTimeMin: nil, EndTimeMax: nil, IsActive: nil, Skip: nil, Top: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.JobExecutionListResult = armsql.JobExecutionListResult{ // Value: []*armsql.JobExecution{ // { // Name: to.Ptr("5555-6666-7777-8888-999999999999"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/jobs/executions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999"), // Properties: &armsql.JobExecutionProperties{ // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-21T19:02:00.870Z"); return t}()), // CurrentAttemptStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-21T19:12:00.870Z"); return t}()), // CurrentAttempts: to.Ptr[int32](0), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-21T19:22:00.870Z"); return t}()), // JobExecutionID: to.Ptr("5A86BF65-43AC-F258-2524-9E92992F97CA"), // JobVersion: to.Ptr[int32](1), // LastMessage: to.Ptr("Job execution created."), // Lifecycle: to.Ptr(armsql.JobExecutionLifecycleCreated), // ProvisioningState: to.Ptr(armsql.ProvisioningStateSucceeded), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-21T19:12:00.870Z"); return t}()), // }, // }, // { // Name: to.Ptr("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/jobs/executions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job2/executions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), // Properties: &armsql.JobExecutionProperties{ // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-15T19:02:00.870Z"); return t}()), // CurrentAttempts: to.Ptr[int32](1), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-15T19:22:00.870Z"); return t}()), // JobExecutionID: to.Ptr("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), // JobVersion: to.Ptr[int32](1), // LastMessage: to.Ptr("Job execution succeeded."), // Lifecycle: to.Ptr(armsql.JobExecutionLifecycleSucceeded), // ProvisioningState: to.Ptr(armsql.ProvisioningStateSucceeded), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-15T19:12:00.870Z"); return t}()), // }, // }}, // } } }
Output:
Example (ListAllJobExecutionsInAJobAgentWithFiltering) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobExecutionsByAgentWithFilter.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewJobExecutionsClient().NewListByAgentPager("group1", "server1", "agent1", &armsql.JobExecutionsClientListByAgentOptions{CreateTimeMin: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-21T19:00:00.000Z"); return t }()), CreateTimeMax: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-21T19:05:00.000Z"); return t }()), EndTimeMin: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-21T19:20:00.000Z"); return t }()), EndTimeMax: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-21T19:25:00.000Z"); return t }()), IsActive: to.Ptr(false), Skip: nil, Top: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.JobExecutionListResult = armsql.JobExecutionListResult{ // Value: []*armsql.JobExecution{ // { // Name: to.Ptr("5555-6666-7777-8888-999999999999"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/jobs/executions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999"), // Properties: &armsql.JobExecutionProperties{ // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-21T19:02:00.870Z"); return t}()), // CurrentAttemptStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-21T19:12:00.870Z"); return t}()), // CurrentAttempts: to.Ptr[int32](0), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-21T19:22:00.870Z"); return t}()), // JobExecutionID: to.Ptr("5A86BF65-43AC-F258-2524-9E92992F97CA"), // JobVersion: to.Ptr[int32](1), // LastMessage: to.Ptr("Job execution created."), // Lifecycle: to.Ptr(armsql.JobExecutionLifecycleCreated), // ProvisioningState: to.Ptr(armsql.ProvisioningStateSucceeded), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-21T19:12:00.870Z"); return t}()), // }, // }, // { // Name: to.Ptr("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/jobs/executions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job2/executions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), // Properties: &armsql.JobExecutionProperties{ // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-15T19:02:00.870Z"); return t}()), // CurrentAttempts: to.Ptr[int32](1), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-15T19:22:00.870Z"); return t}()), // JobExecutionID: to.Ptr("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), // JobVersion: to.Ptr[int32](1), // LastMessage: to.Ptr("Job execution succeeded."), // Lifecycle: to.Ptr(armsql.JobExecutionLifecycleSucceeded), // ProvisioningState: to.Ptr(armsql.ProvisioningStateSucceeded), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-15T19:12:00.870Z"); return t}()), // }, // }}, // } } }
Output:
func (*JobExecutionsClient) NewListByJobPager ¶ added in v0.5.0
func (client *JobExecutionsClient) NewListByJobPager(resourceGroupName string, serverName string, jobAgentName string, jobName string, options *JobExecutionsClientListByJobOptions) *runtime.Pager[JobExecutionsClientListByJobResponse]
NewListByJobPager - Lists a job's executions.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- jobName - The name of the job to get.
- options - JobExecutionsClientListByJobOptions contains the optional parameters for the JobExecutionsClient.NewListByJobPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobExecutionsByJob.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewJobExecutionsClient().NewListByJobPager("group1", "server1", "agent1", "job1", &armsql.JobExecutionsClientListByJobOptions{CreateTimeMin: nil, CreateTimeMax: nil, EndTimeMin: nil, EndTimeMax: nil, IsActive: nil, Skip: nil, Top: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.JobExecutionListResult = armsql.JobExecutionListResult{ // Value: []*armsql.JobExecution{ // { // Name: to.Ptr("5555-6666-7777-8888-999999999999"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/jobs/executions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999"), // Properties: &armsql.JobExecutionProperties{ // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-21T19:02:00.870Z"); return t}()), // CurrentAttemptStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-21T19:12:00.870Z"); return t}()), // CurrentAttempts: to.Ptr[int32](0), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-21T19:22:00.870Z"); return t}()), // JobExecutionID: to.Ptr("5A86BF65-43AC-F258-2524-9E92992F97CA"), // JobVersion: to.Ptr[int32](1), // LastMessage: to.Ptr("Job execution created."), // Lifecycle: to.Ptr(armsql.JobExecutionLifecycleCreated), // ProvisioningState: to.Ptr(armsql.ProvisioningStateSucceeded), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-21T19:12:00.870Z"); return t}()), // }, // }, // { // Name: to.Ptr("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/jobs/executions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), // Properties: &armsql.JobExecutionProperties{ // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-15T19:02:00.870Z"); return t}()), // CurrentAttempts: to.Ptr[int32](1), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-15T19:22:00.870Z"); return t}()), // JobExecutionID: to.Ptr("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), // JobVersion: to.Ptr[int32](1), // LastMessage: to.Ptr("Job execution succeeded."), // Lifecycle: to.Ptr(armsql.JobExecutionLifecycleSucceeded), // ProvisioningState: to.Ptr(armsql.ProvisioningStateSucceeded), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-15T19:12:00.870Z"); return t}()), // }, // }}, // } } }
Output:
type JobExecutionsClientBeginCreateOptions ¶ added in v0.3.0
type JobExecutionsClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
JobExecutionsClientBeginCreateOptions contains the optional parameters for the JobExecutionsClient.BeginCreate method.
type JobExecutionsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type JobExecutionsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
JobExecutionsClientBeginCreateOrUpdateOptions contains the optional parameters for the JobExecutionsClient.BeginCreateOrUpdate method.
type JobExecutionsClientCancelOptions ¶ added in v0.3.0
type JobExecutionsClientCancelOptions struct { }
JobExecutionsClientCancelOptions contains the optional parameters for the JobExecutionsClient.Cancel method.
type JobExecutionsClientCancelResponse ¶ added in v0.3.0
type JobExecutionsClientCancelResponse struct { }
JobExecutionsClientCancelResponse contains the response from method JobExecutionsClient.Cancel.
type JobExecutionsClientCreateOrUpdateResponse ¶ added in v0.3.0
type JobExecutionsClientCreateOrUpdateResponse struct { // An execution of a job JobExecution }
JobExecutionsClientCreateOrUpdateResponse contains the response from method JobExecutionsClient.BeginCreateOrUpdate.
type JobExecutionsClientCreateResponse ¶ added in v0.3.0
type JobExecutionsClientCreateResponse struct { // An execution of a job JobExecution }
JobExecutionsClientCreateResponse contains the response from method JobExecutionsClient.BeginCreate.
type JobExecutionsClientGetOptions ¶ added in v0.3.0
type JobExecutionsClientGetOptions struct { }
JobExecutionsClientGetOptions contains the optional parameters for the JobExecutionsClient.Get method.
type JobExecutionsClientGetResponse ¶ added in v0.3.0
type JobExecutionsClientGetResponse struct { // An execution of a job JobExecution }
JobExecutionsClientGetResponse contains the response from method JobExecutionsClient.Get.
type JobExecutionsClientListByAgentOptions ¶ added in v0.3.0
type JobExecutionsClientListByAgentOptions struct { // If specified, only job executions created before the specified time are included. CreateTimeMax *time.Time // If specified, only job executions created at or after the specified time are included. CreateTimeMin *time.Time // If specified, only job executions completed before the specified time are included. EndTimeMax *time.Time // If specified, only job executions completed at or after the specified time are included. EndTimeMin *time.Time // If specified, only active or only completed job executions are included. IsActive *bool // The number of elements in the collection to skip. Skip *int32 // The number of elements to return from the collection. Top *int32 }
JobExecutionsClientListByAgentOptions contains the optional parameters for the JobExecutionsClient.NewListByAgentPager method.
type JobExecutionsClientListByAgentResponse ¶ added in v0.3.0
type JobExecutionsClientListByAgentResponse struct { // A list of job executions. JobExecutionListResult }
JobExecutionsClientListByAgentResponse contains the response from method JobExecutionsClient.NewListByAgentPager.
type JobExecutionsClientListByJobOptions ¶ added in v0.3.0
type JobExecutionsClientListByJobOptions struct { // If specified, only job executions created before the specified time are included. CreateTimeMax *time.Time // If specified, only job executions created at or after the specified time are included. CreateTimeMin *time.Time // If specified, only job executions completed before the specified time are included. EndTimeMax *time.Time // If specified, only job executions completed at or after the specified time are included. EndTimeMin *time.Time // If specified, only active or only completed job executions are included. IsActive *bool // The number of elements in the collection to skip. Skip *int32 // The number of elements to return from the collection. Top *int32 }
JobExecutionsClientListByJobOptions contains the optional parameters for the JobExecutionsClient.NewListByJobPager method.
type JobExecutionsClientListByJobResponse ¶ added in v0.3.0
type JobExecutionsClientListByJobResponse struct { // A list of job executions. JobExecutionListResult }
JobExecutionsClientListByJobResponse contains the response from method JobExecutionsClient.NewListByJobPager.
type JobListResult ¶
type JobListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*Job }
JobListResult - A list of jobs.
func (JobListResult) MarshalJSON ¶
func (j JobListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobListResult.
func (*JobListResult) UnmarshalJSON ¶ added in v1.1.0
func (j *JobListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type JobListResult.
type JobProperties ¶
type JobProperties struct { // User-defined description of the job. Description *string // Schedule properties of the job. Schedule *JobSchedule // READ-ONLY; The job version number. Version *int32 }
JobProperties - Properties of a job.
func (JobProperties) MarshalJSON ¶ added in v1.1.0
func (j JobProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobProperties.
func (*JobProperties) UnmarshalJSON ¶ added in v1.1.0
func (j *JobProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type JobProperties.
type JobSchedule ¶
type JobSchedule struct { // Whether or not the schedule is enabled. Enabled *bool // Schedule end time. EndTime *time.Time // Value of the schedule's recurring interval, if the ScheduleType is recurring. ISO8601 duration format. Interval *string // Schedule start time. StartTime *time.Time // Schedule interval type Type *JobScheduleType }
JobSchedule - Scheduling properties of a job.
func (JobSchedule) MarshalJSON ¶
func (j JobSchedule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobSchedule.
func (*JobSchedule) UnmarshalJSON ¶
func (j *JobSchedule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type JobSchedule.
type JobScheduleType ¶
type JobScheduleType string
JobScheduleType - Schedule interval type
const ( JobScheduleTypeOnce JobScheduleType = "Once" JobScheduleTypeRecurring JobScheduleType = "Recurring" )
func PossibleJobScheduleTypeValues ¶
func PossibleJobScheduleTypeValues() []JobScheduleType
PossibleJobScheduleTypeValues returns the possible values for the JobScheduleType const type.
type JobStep ¶
type JobStep struct { // Resource properties. Properties *JobStepProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
JobStep - A job step.
func (JobStep) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type JobStep.
func (*JobStep) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type JobStep.
type JobStepAction ¶
type JobStepAction struct { // REQUIRED; The action value, for example the text of the T-SQL script to execute. Value *string // The source of the action to execute. Source *JobStepActionSource // Type of action being executed by the job step. Type *JobStepActionType }
JobStepAction - The action to be executed by a job step.
func (JobStepAction) MarshalJSON ¶ added in v1.1.0
func (j JobStepAction) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobStepAction.
func (*JobStepAction) UnmarshalJSON ¶ added in v1.1.0
func (j *JobStepAction) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type JobStepAction.
type JobStepActionSource ¶
type JobStepActionSource string
JobStepActionSource - The source of the action to execute.
const (
JobStepActionSourceInline JobStepActionSource = "Inline"
)
func PossibleJobStepActionSourceValues ¶
func PossibleJobStepActionSourceValues() []JobStepActionSource
PossibleJobStepActionSourceValues returns the possible values for the JobStepActionSource const type.
type JobStepActionType ¶
type JobStepActionType string
JobStepActionType - Type of action being executed by the job step.
const (
JobStepActionTypeTSQL JobStepActionType = "TSql"
)
func PossibleJobStepActionTypeValues ¶
func PossibleJobStepActionTypeValues() []JobStepActionType
PossibleJobStepActionTypeValues returns the possible values for the JobStepActionType const type.
type JobStepExecutionOptions ¶
type JobStepExecutionOptions struct { // Initial delay between retries for job step execution. InitialRetryIntervalSeconds *int32 // The maximum amount of time to wait between retries for job step execution. MaximumRetryIntervalSeconds *int32 // Maximum number of times the job step will be reattempted if the first attempt fails. RetryAttempts *int32 // The backoff multiplier for the time between retries. RetryIntervalBackoffMultiplier *float32 // Execution timeout for the job step. TimeoutSeconds *int32 }
JobStepExecutionOptions - The execution options of a job step.
func (JobStepExecutionOptions) MarshalJSON ¶ added in v1.1.0
func (j JobStepExecutionOptions) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobStepExecutionOptions.
func (*JobStepExecutionOptions) UnmarshalJSON ¶ added in v1.1.0
func (j *JobStepExecutionOptions) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type JobStepExecutionOptions.
type JobStepExecutionsClient ¶
type JobStepExecutionsClient struct {
// contains filtered or unexported fields
}
JobStepExecutionsClient contains the methods for the JobStepExecutions group. Don't use this type directly, use NewJobStepExecutionsClient() instead.
func NewJobStepExecutionsClient ¶
func NewJobStepExecutionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobStepExecutionsClient, error)
NewJobStepExecutionsClient creates a new instance of JobStepExecutionsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*JobStepExecutionsClient) Get ¶
func (client *JobStepExecutionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID string, stepName string, options *JobStepExecutionsClientGetOptions) (JobStepExecutionsClientGetResponse, error)
Get - Gets a step execution of a job execution. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- jobName - The name of the job to get.
- jobExecutionID - The unique id of the job execution
- stepName - The name of the step.
- options - JobStepExecutionsClientGetOptions contains the optional parameters for the JobStepExecutionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobExecutionStep.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewJobStepExecutionsClient().Get(ctx, "group1", "server1", "agent1", "job1", "5A86BF65-43AC-F258-2524-9E92992F97CA", "step1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.JobExecution = armsql.JobExecution{ // Name: to.Ptr("step1"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/jobs/executions/steps"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999/steps/step1"), // Properties: &armsql.JobExecutionProperties{ // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-27T04:33:15.718Z"); return t}()), // CurrentAttemptStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-27T04:33:17.484Z"); return t}()), // CurrentAttempts: to.Ptr[int32](1), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-27T04:33:19.060Z"); return t}()), // JobExecutionID: to.Ptr("5A86BF65-43AC-F258-2524-9E92992F97CA"), // JobVersion: to.Ptr[int32](1), // LastMessage: to.Ptr("Step 1 succeeded."), // Lifecycle: to.Ptr(armsql.JobExecutionLifecycleSucceeded), // ProvisioningState: to.Ptr(armsql.ProvisioningStateSucceeded), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-27T04:33:16.176Z"); return t}()), // StepID: to.Ptr[int32](1), // StepName: to.Ptr("step1"), // }, // } }
Output:
func (*JobStepExecutionsClient) NewListByJobExecutionPager ¶ added in v0.5.0
func (client *JobStepExecutionsClient) NewListByJobExecutionPager(resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID string, options *JobStepExecutionsClientListByJobExecutionOptions) *runtime.Pager[JobStepExecutionsClientListByJobExecutionResponse]
NewListByJobExecutionPager - Lists the step executions of a job execution.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- jobName - The name of the job to get.
- jobExecutionID - The id of the job execution
- options - JobStepExecutionsClientListByJobExecutionOptions contains the optional parameters for the JobStepExecutionsClient.NewListByJobExecutionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobExecutionSteps.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewJobStepExecutionsClient().NewListByJobExecutionPager("group1", "server1", "agent1", "job1", "5A86BF65-43AC-F258-2524-9E92992F97CA", &armsql.JobStepExecutionsClientListByJobExecutionOptions{CreateTimeMin: nil, CreateTimeMax: nil, EndTimeMin: nil, EndTimeMax: nil, IsActive: nil, Skip: nil, Top: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.JobExecutionListResult = armsql.JobExecutionListResult{ // Value: []*armsql.JobExecution{ // { // Name: to.Ptr("step1"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/jobs/executions/steps"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999/steps/step1"), // Properties: &armsql.JobExecutionProperties{ // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-03T04:33:15.718Z"); return t}()), // CurrentAttemptStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-03T04:33:17.484Z"); return t}()), // CurrentAttempts: to.Ptr[int32](1), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-03T04:33:19.060Z"); return t}()), // JobExecutionID: to.Ptr("5A86BF65-43AC-F258-2524-9E92992F97CA"), // JobVersion: to.Ptr[int32](1), // LastMessage: to.Ptr("Step 1 succeeded."), // Lifecycle: to.Ptr(armsql.JobExecutionLifecycleSucceeded), // ProvisioningState: to.Ptr(armsql.ProvisioningStateSucceeded), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-03T04:33:16.176Z"); return t}()), // StepID: to.Ptr[int32](1), // StepName: to.Ptr("step1"), // }, // }}, // } } }
Output:
type JobStepExecutionsClientGetOptions ¶ added in v0.3.0
type JobStepExecutionsClientGetOptions struct { }
JobStepExecutionsClientGetOptions contains the optional parameters for the JobStepExecutionsClient.Get method.
type JobStepExecutionsClientGetResponse ¶ added in v0.3.0
type JobStepExecutionsClientGetResponse struct { // An execution of a job JobExecution }
JobStepExecutionsClientGetResponse contains the response from method JobStepExecutionsClient.Get.
type JobStepExecutionsClientListByJobExecutionOptions ¶ added in v0.3.0
type JobStepExecutionsClientListByJobExecutionOptions struct { // If specified, only job executions created before the specified time are included. CreateTimeMax *time.Time // If specified, only job executions created at or after the specified time are included. CreateTimeMin *time.Time // If specified, only job executions completed before the specified time are included. EndTimeMax *time.Time // If specified, only job executions completed at or after the specified time are included. EndTimeMin *time.Time // If specified, only active or only completed job executions are included. IsActive *bool // The number of elements in the collection to skip. Skip *int32 // The number of elements to return from the collection. Top *int32 }
JobStepExecutionsClientListByJobExecutionOptions contains the optional parameters for the JobStepExecutionsClient.NewListByJobExecutionPager method.
type JobStepExecutionsClientListByJobExecutionResponse ¶ added in v0.3.0
type JobStepExecutionsClientListByJobExecutionResponse struct { // A list of job executions. JobExecutionListResult }
JobStepExecutionsClientListByJobExecutionResponse contains the response from method JobStepExecutionsClient.NewListByJobExecutionPager.
type JobStepListResult ¶
type JobStepListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*JobStep }
JobStepListResult - A list of job steps.
func (JobStepListResult) MarshalJSON ¶
func (j JobStepListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobStepListResult.
func (*JobStepListResult) UnmarshalJSON ¶ added in v1.1.0
func (j *JobStepListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type JobStepListResult.
type JobStepOutput ¶
type JobStepOutput struct { // REQUIRED; The resource ID of the credential to use to connect to the output destination. Credential *string // REQUIRED; The output destination database. DatabaseName *string // REQUIRED; The output destination server name. ServerName *string // REQUIRED; The output destination table. TableName *string // The output destination resource group. ResourceGroupName *string // The output destination schema. SchemaName *string // The output destination subscription id. SubscriptionID *string // The output destination type. Type *JobStepOutputType }
JobStepOutput - The output configuration of a job step.
func (JobStepOutput) MarshalJSON ¶ added in v1.1.0
func (j JobStepOutput) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobStepOutput.
func (*JobStepOutput) UnmarshalJSON ¶ added in v1.1.0
func (j *JobStepOutput) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type JobStepOutput.
type JobStepOutputType ¶
type JobStepOutputType string
JobStepOutputType - The output destination type.
const (
JobStepOutputTypeSQLDatabase JobStepOutputType = "SqlDatabase"
)
func PossibleJobStepOutputTypeValues ¶
func PossibleJobStepOutputTypeValues() []JobStepOutputType
PossibleJobStepOutputTypeValues returns the possible values for the JobStepOutputType const type.
type JobStepProperties ¶
type JobStepProperties struct { // REQUIRED; The action payload of the job step. Action *JobStepAction // REQUIRED; The resource ID of the job credential that will be used to connect to the targets. Credential *string // REQUIRED; The resource ID of the target group that the job step will be executed on. TargetGroup *string // Execution options for the job step. ExecutionOptions *JobStepExecutionOptions // Output destination properties of the job step. Output *JobStepOutput // The job step's index within the job. If not specified when creating the job step, it will be created as the last step. // If not specified when updating the job step, the step id is not modified. StepID *int32 }
JobStepProperties - Properties of a job step.
func (JobStepProperties) MarshalJSON ¶ added in v1.1.0
func (j JobStepProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobStepProperties.
func (*JobStepProperties) UnmarshalJSON ¶ added in v1.1.0
func (j *JobStepProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type JobStepProperties.
type JobStepsClient ¶
type JobStepsClient struct {
// contains filtered or unexported fields
}
JobStepsClient contains the methods for the JobSteps group. Don't use this type directly, use NewJobStepsClient() instead.
func NewJobStepsClient ¶
func NewJobStepsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobStepsClient, error)
NewJobStepsClient creates a new instance of JobStepsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*JobStepsClient) CreateOrUpdate ¶
func (client *JobStepsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, stepName string, parameters JobStep, options *JobStepsClientCreateOrUpdateOptions) (JobStepsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates a job step. This will implicitly create a new job version. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- jobName - The name of the job.
- stepName - The name of the job step.
- parameters - The requested state of the job step.
- options - JobStepsClientCreateOrUpdateOptions contains the optional parameters for the JobStepsClient.CreateOrUpdate method.
Example (CreateOrUpdateAJobStepWithAllPropertiesSpecified) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobStepMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewJobStepsClient().CreateOrUpdate(ctx, "group1", "server1", "agent1", "job1", "step1", armsql.JobStep{ Properties: &armsql.JobStepProperties{ Action: &armsql.JobStepAction{ Type: to.Ptr(armsql.JobStepActionTypeTSQL), Source: to.Ptr(armsql.JobStepActionSourceInline), Value: to.Ptr("select 2"), }, Credential: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1"), ExecutionOptions: &armsql.JobStepExecutionOptions{ InitialRetryIntervalSeconds: to.Ptr[int32](11), MaximumRetryIntervalSeconds: to.Ptr[int32](222), RetryAttempts: to.Ptr[int32](42), RetryIntervalBackoffMultiplier: to.Ptr[float32](3), TimeoutSeconds: to.Ptr[int32](1234), }, Output: &armsql.JobStepOutput{ Type: to.Ptr(armsql.JobStepOutputTypeSQLDatabase), Credential: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0"), DatabaseName: to.Ptr("database3"), ResourceGroupName: to.Ptr("group3"), SchemaName: to.Ptr("myschema1234"), ServerName: to.Ptr("server3"), SubscriptionID: to.Ptr("3501b905-a848-4b5d-96e8-b253f62d735a"), TableName: to.Ptr("mytable5678"), }, StepID: to.Ptr[int32](1), TargetGroup: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.JobStep = armsql.JobStep{ // Name: to.Ptr("step1"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/jobs/steps"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step1"), // Properties: &armsql.JobStepProperties{ // Action: &armsql.JobStepAction{ // Type: to.Ptr(armsql.JobStepActionTypeTSQL), // Source: to.Ptr(armsql.JobStepActionSourceInline), // Value: to.Ptr("select 2"), // }, // Credential: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1"), // ExecutionOptions: &armsql.JobStepExecutionOptions{ // InitialRetryIntervalSeconds: to.Ptr[int32](11), // MaximumRetryIntervalSeconds: to.Ptr[int32](222), // RetryAttempts: to.Ptr[int32](42), // RetryIntervalBackoffMultiplier: to.Ptr[float32](3), // TimeoutSeconds: to.Ptr[int32](1234), // },
Output:
Example (CreateOrUpdateAJobStepWithMinimalPropertiesSpecified) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobStepMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewJobStepsClient().CreateOrUpdate(ctx, "group1", "server1", "agent1", "job1", "step1", armsql.JobStep{ Properties: &armsql.JobStepProperties{ Action: &armsql.JobStepAction{ Value: to.Ptr("select 1"), }, Credential: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0"), TargetGroup: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup0"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.JobStep = armsql.JobStep{ // Name: to.Ptr("step1"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/jobs/steps"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step1"), // Properties: &armsql.JobStepProperties{ // Action: &armsql.JobStepAction{ // Type: to.Ptr(armsql.JobStepActionTypeTSQL), // Source: to.Ptr(armsql.JobStepActionSourceInline), // Value: to.Ptr("select 1"), // }, // Credential: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0"), // ExecutionOptions: &armsql.JobStepExecutionOptions{ // InitialRetryIntervalSeconds: to.Ptr[int32](1), // MaximumRetryIntervalSeconds: to.Ptr[int32](120), // RetryAttempts: to.Ptr[int32](10), // RetryIntervalBackoffMultiplier: to.Ptr[float32](2), // TimeoutSeconds: to.Ptr[int32](43200), // }, // StepID: to.Ptr[int32](1), // TargetGroup: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup0"), // }, // } }
Output:
func (*JobStepsClient) Delete ¶
func (client *JobStepsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, stepName string, options *JobStepsClientDeleteOptions) (JobStepsClientDeleteResponse, error)
Delete - Deletes a job step. This will implicitly create a new job version. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- jobName - The name of the job.
- stepName - The name of the job step to delete.
- options - JobStepsClientDeleteOptions contains the optional parameters for the JobStepsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteJobStep.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewJobStepsClient().Delete(ctx, "group1", "server1", "agent1", "job1", "step1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*JobStepsClient) Get ¶
func (client *JobStepsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, stepName string, options *JobStepsClientGetOptions) (JobStepsClientGetResponse, error)
Get - Gets a job step in a job's current version. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- jobName - The name of the job.
- stepName - The name of the job step.
- options - JobStepsClientGetOptions contains the optional parameters for the JobStepsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobStepByJob.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewJobStepsClient().Get(ctx, "group1", "server1", "agent1", "job1", "step1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.JobStep = armsql.JobStep{ // Name: to.Ptr("step1"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/jobs/steps"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step1"), // Properties: &armsql.JobStepProperties{ // Action: &armsql.JobStepAction{ // Type: to.Ptr(armsql.JobStepActionTypeTSQL), // Source: to.Ptr(armsql.JobStepActionSourceInline), // Value: to.Ptr("select 2"), // }, // Credential: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1"), // ExecutionOptions: &armsql.JobStepExecutionOptions{ // InitialRetryIntervalSeconds: to.Ptr[int32](11), // MaximumRetryIntervalSeconds: to.Ptr[int32](222), // RetryAttempts: to.Ptr[int32](42), // RetryIntervalBackoffMultiplier: to.Ptr[float32](3), // TimeoutSeconds: to.Ptr[int32](1234), // },
Output:
func (*JobStepsClient) GetByVersion ¶
func (client *JobStepsClient) GetByVersion(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32, stepName string, options *JobStepsClientGetByVersionOptions) (JobStepsClientGetByVersionResponse, error)
GetByVersion - Gets the specified version of a job step. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- jobName - The name of the job.
- jobVersion - The version of the job to get.
- stepName - The name of the job step.
- options - JobStepsClientGetByVersionOptions contains the optional parameters for the JobStepsClient.GetByVersion method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobStepByVersion.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewJobStepsClient().GetByVersion(ctx, "group1", "server1", "agent1", "job1", 1, "step1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.JobStep = armsql.JobStep{ // Name: to.Ptr("step1"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/jobs/versions/steps"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/versions/1/steps/step1"), // Properties: &armsql.JobStepProperties{ // Action: &armsql.JobStepAction{ // Type: to.Ptr(armsql.JobStepActionTypeTSQL), // Source: to.Ptr(armsql.JobStepActionSourceInline), // Value: to.Ptr("select 2"), // }, // Credential: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1"), // ExecutionOptions: &armsql.JobStepExecutionOptions{ // InitialRetryIntervalSeconds: to.Ptr[int32](11), // MaximumRetryIntervalSeconds: to.Ptr[int32](222), // RetryAttempts: to.Ptr[int32](42), // RetryIntervalBackoffMultiplier: to.Ptr[float32](3), // TimeoutSeconds: to.Ptr[int32](1234), // },
Output:
func (*JobStepsClient) NewListByJobPager ¶ added in v0.5.0
func (client *JobStepsClient) NewListByJobPager(resourceGroupName string, serverName string, jobAgentName string, jobName string, options *JobStepsClientListByJobOptions) *runtime.Pager[JobStepsClientListByJobResponse]
NewListByJobPager - Gets all job steps for a job's current version.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- jobName - The name of the job to get.
- options - JobStepsClientListByJobOptions contains the optional parameters for the JobStepsClient.NewListByJobPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobStepsByJob.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewJobStepsClient().NewListByJobPager("group1", "server1", "agent1", "job1", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.JobStepListResult = armsql.JobStepListResult{ // Value: []*armsql.JobStep{ // { // Name: to.Ptr("step1"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/jobs/steps"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step1"), // Properties: &armsql.JobStepProperties{ // Action: &armsql.JobStepAction{ // Type: to.Ptr(armsql.JobStepActionTypeTSQL), // Source: to.Ptr(armsql.JobStepActionSourceInline), // Value: to.Ptr("select 2"), // }, // Credential: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1"), // ExecutionOptions: &armsql.JobStepExecutionOptions{ // InitialRetryIntervalSeconds: to.Ptr[int32](11), // MaximumRetryIntervalSeconds: to.Ptr[int32](222), // RetryAttempts: to.Ptr[int32](42), // RetryIntervalBackoffMultiplier: to.Ptr[float32](3), // TimeoutSeconds: to.Ptr[int32](1234), // }, // Output: &armsql.JobStepOutput{ // Type: to.Ptr(armsql.JobStepOutputTypeSQLDatabase), // Credential: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0"), // DatabaseName: to.Ptr("database3"), // ResourceGroupName: to.Ptr("group3"), // SchemaName: to.Ptr("myschema1234"), // ServerName: to.Ptr("server3"), // SubscriptionID: to.Ptr("3501b905-a848-4b5d-96e8-b253f62d735a"), // TableName: to.Ptr("mytable5678"), // }, // StepID: to.Ptr[int32](1), // TargetGroup: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1"), // }, // }, // { // Name: to.Ptr("step2"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/jobs/steps"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step2"), // Properties: &armsql.JobStepProperties{ // Action: &armsql.JobStepAction{ // Type: to.Ptr(armsql.JobStepActionTypeTSQL), // Source: to.Ptr(armsql.JobStepActionSourceInline), // Value: to.Ptr("select 2"), // }, // Credential: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1"), // ExecutionOptions: &armsql.JobStepExecutionOptions{ // InitialRetryIntervalSeconds: to.Ptr[int32](11), // MaximumRetryIntervalSeconds: to.Ptr[int32](222), // RetryAttempts: to.Ptr[int32](42), // RetryIntervalBackoffMultiplier: to.Ptr[float32](3), // TimeoutSeconds: to.Ptr[int32](1234), // },
Output:
func (*JobStepsClient) NewListByVersionPager ¶ added in v0.5.0
func (client *JobStepsClient) NewListByVersionPager(resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32, options *JobStepsClientListByVersionOptions) *runtime.Pager[JobStepsClientListByVersionResponse]
NewListByVersionPager - Gets all job steps in the specified job version.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- jobName - The name of the job to get.
- jobVersion - The version of the job to get.
- options - JobStepsClientListByVersionOptions contains the optional parameters for the JobStepsClient.NewListByVersionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobStepsByVersion.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewJobStepsClient().NewListByVersionPager("group1", "server1", "agent1", "job1", 1, nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.JobStepListResult = armsql.JobStepListResult{ // Value: []*armsql.JobStep{ // { // Name: to.Ptr("step1"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/jobs/versions/steps"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/versions/1/steps/step1"), // Properties: &armsql.JobStepProperties{ // Action: &armsql.JobStepAction{ // Type: to.Ptr(armsql.JobStepActionTypeTSQL), // Source: to.Ptr(armsql.JobStepActionSourceInline), // Value: to.Ptr("select 2"), // }, // Credential: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1"), // ExecutionOptions: &armsql.JobStepExecutionOptions{ // InitialRetryIntervalSeconds: to.Ptr[int32](11), // MaximumRetryIntervalSeconds: to.Ptr[int32](222), // RetryAttempts: to.Ptr[int32](42), // RetryIntervalBackoffMultiplier: to.Ptr[float32](3), // TimeoutSeconds: to.Ptr[int32](1234), // }, // Output: &armsql.JobStepOutput{ // Type: to.Ptr(armsql.JobStepOutputTypeSQLDatabase), // Credential: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0"), // DatabaseName: to.Ptr("database3"), // ResourceGroupName: to.Ptr("group3"), // SchemaName: to.Ptr("myschema1234"), // ServerName: to.Ptr("server3"), // SubscriptionID: to.Ptr("3501b905-a848-4b5d-96e8-b253f62d735a"), // TableName: to.Ptr("mytable5678"), // }, // StepID: to.Ptr[int32](1), // TargetGroup: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1"), // }, // }, // { // Name: to.Ptr("step2"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/jobs/versions/steps"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/versions/1/steps/step2"), // Properties: &armsql.JobStepProperties{ // Action: &armsql.JobStepAction{ // Type: to.Ptr(armsql.JobStepActionTypeTSQL), // Source: to.Ptr(armsql.JobStepActionSourceInline), // Value: to.Ptr("select 2"), // }, // Credential: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1"), // ExecutionOptions: &armsql.JobStepExecutionOptions{ // InitialRetryIntervalSeconds: to.Ptr[int32](11), // MaximumRetryIntervalSeconds: to.Ptr[int32](222), // RetryAttempts: to.Ptr[int32](42), // RetryIntervalBackoffMultiplier: to.Ptr[float32](3), // TimeoutSeconds: to.Ptr[int32](1234), // },
Output:
type JobStepsClientCreateOrUpdateOptions ¶ added in v0.3.0
type JobStepsClientCreateOrUpdateOptions struct { }
JobStepsClientCreateOrUpdateOptions contains the optional parameters for the JobStepsClient.CreateOrUpdate method.
type JobStepsClientCreateOrUpdateResponse ¶ added in v0.3.0
type JobStepsClientCreateOrUpdateResponse struct { // A job step. JobStep }
JobStepsClientCreateOrUpdateResponse contains the response from method JobStepsClient.CreateOrUpdate.
type JobStepsClientDeleteOptions ¶ added in v0.3.0
type JobStepsClientDeleteOptions struct { }
JobStepsClientDeleteOptions contains the optional parameters for the JobStepsClient.Delete method.
type JobStepsClientDeleteResponse ¶ added in v0.3.0
type JobStepsClientDeleteResponse struct { }
JobStepsClientDeleteResponse contains the response from method JobStepsClient.Delete.
type JobStepsClientGetByVersionOptions ¶ added in v0.3.0
type JobStepsClientGetByVersionOptions struct { }
JobStepsClientGetByVersionOptions contains the optional parameters for the JobStepsClient.GetByVersion method.
type JobStepsClientGetByVersionResponse ¶ added in v0.3.0
type JobStepsClientGetByVersionResponse struct { // A job step. JobStep }
JobStepsClientGetByVersionResponse contains the response from method JobStepsClient.GetByVersion.
type JobStepsClientGetOptions ¶ added in v0.3.0
type JobStepsClientGetOptions struct { }
JobStepsClientGetOptions contains the optional parameters for the JobStepsClient.Get method.
type JobStepsClientGetResponse ¶ added in v0.3.0
type JobStepsClientGetResponse struct { // A job step. JobStep }
JobStepsClientGetResponse contains the response from method JobStepsClient.Get.
type JobStepsClientListByJobOptions ¶ added in v0.3.0
type JobStepsClientListByJobOptions struct { }
JobStepsClientListByJobOptions contains the optional parameters for the JobStepsClient.NewListByJobPager method.
type JobStepsClientListByJobResponse ¶ added in v0.3.0
type JobStepsClientListByJobResponse struct { // A list of job steps. JobStepListResult }
JobStepsClientListByJobResponse contains the response from method JobStepsClient.NewListByJobPager.
type JobStepsClientListByVersionOptions ¶ added in v0.3.0
type JobStepsClientListByVersionOptions struct { }
JobStepsClientListByVersionOptions contains the optional parameters for the JobStepsClient.NewListByVersionPager method.
type JobStepsClientListByVersionResponse ¶ added in v0.3.0
type JobStepsClientListByVersionResponse struct { // A list of job steps. JobStepListResult }
JobStepsClientListByVersionResponse contains the response from method JobStepsClient.NewListByVersionPager.
type JobTarget ¶
type JobTarget struct { // REQUIRED; The target type. Type *JobTargetType // The target database name. DatabaseName *string // The target elastic pool name. ElasticPoolName *string // Whether the target is included or excluded from the group. MembershipType *JobTargetGroupMembershipType // The resource ID of the credential that is used during job execution to connect to the target and determine the list of // databases inside the target. RefreshCredential *string // The target server name. ServerName *string // The target shard map. ShardMapName *string }
JobTarget - A job target, for example a specific database or a container of databases that is evaluated during job execution.
func (JobTarget) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type JobTarget.
func (*JobTarget) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type JobTarget.
type JobTargetExecutionsClient ¶
type JobTargetExecutionsClient struct {
// contains filtered or unexported fields
}
JobTargetExecutionsClient contains the methods for the JobTargetExecutions group. Don't use this type directly, use NewJobTargetExecutionsClient() instead.
func NewJobTargetExecutionsClient ¶
func NewJobTargetExecutionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobTargetExecutionsClient, error)
NewJobTargetExecutionsClient creates a new instance of JobTargetExecutionsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*JobTargetExecutionsClient) Get ¶
func (client *JobTargetExecutionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID string, stepName string, targetID string, options *JobTargetExecutionsClientGetOptions) (JobTargetExecutionsClientGetResponse, error)
Get - Gets a target execution. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- jobName - The name of the job to get.
- jobExecutionID - The unique id of the job execution
- stepName - The name of the step.
- targetID - The target id.
- options - JobTargetExecutionsClientGetOptions contains the optional parameters for the JobTargetExecutionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobExecutionTarget.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewJobTargetExecutionsClient().Get(ctx, "group1", "server1", "agent1", "job1", "5A86BF65-43AC-F258-2524-9E92992F97CA", "step1", "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.JobExecution = armsql.JobExecution{ // Name: to.Ptr("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/jobs/executions/steps/targets"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999/steps/step1/targets/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), // Properties: &armsql.JobExecutionProperties{ // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-05T04:33:17.513Z"); return t}()), // CurrentAttemptStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-05T04:33:18.239Z"); return t}()), // CurrentAttempts: to.Ptr[int32](1), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-05T04:33:18.703Z"); return t}()), // JobExecutionID: to.Ptr("5A86BF65-43AC-F258-2524-9E92992F97CA"), // JobVersion: to.Ptr[int32](1), // LastMessage: to.Ptr("Step 1 succeeded execution on target (server 'server1', database 'database1')."), // Lifecycle: to.Ptr(armsql.JobExecutionLifecycleSucceeded), // ProvisioningState: to.Ptr(armsql.ProvisioningStateSucceeded), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-05T04:33:18.123Z"); return t}()), // StepID: to.Ptr[int32](1), // StepName: to.Ptr("step1"), // Target: &armsql.JobExecutionTarget{ // Type: to.Ptr(armsql.JobTargetTypeSQLDatabase), // DatabaseName: to.Ptr("database1"), // ServerName: to.Ptr("server1"), // }, // }, // } }
Output:
func (*JobTargetExecutionsClient) NewListByJobExecutionPager ¶ added in v0.5.0
func (client *JobTargetExecutionsClient) NewListByJobExecutionPager(resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID string, options *JobTargetExecutionsClientListByJobExecutionOptions) *runtime.Pager[JobTargetExecutionsClientListByJobExecutionResponse]
NewListByJobExecutionPager - Lists target executions for all steps of a job execution.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- jobName - The name of the job to get.
- jobExecutionID - The id of the job execution
- options - JobTargetExecutionsClientListByJobExecutionOptions contains the optional parameters for the JobTargetExecutionsClient.NewListByJobExecutionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobExecutionTargetsByExecution.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewJobTargetExecutionsClient().NewListByJobExecutionPager("group1", "server1", "agent1", "job1", "5A86BF65-43AC-F258-2524-9E92992F97CA", &armsql.JobTargetExecutionsClientListByJobExecutionOptions{CreateTimeMin: nil, CreateTimeMax: nil, EndTimeMin: nil, EndTimeMax: nil, IsActive: nil, Skip: nil, Top: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.JobExecutionListResult = armsql.JobExecutionListResult{ // Value: []*armsql.JobExecution{ // { // Name: to.Ptr("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/jobs/executions/steps/targets"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999/steps/step1/targets/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), // Properties: &armsql.JobExecutionProperties{ // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-01T04:33:17.513Z"); return t}()), // CurrentAttemptStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-01T04:33:18.239Z"); return t}()), // CurrentAttempts: to.Ptr[int32](1), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-01T04:33:18.703Z"); return t}()), // JobExecutionID: to.Ptr("5A86BF65-43AC-F258-2524-9E92992F97CA"), // JobVersion: to.Ptr[int32](1), // LastMessage: to.Ptr("Step 1 succeeded execution on target (server 'server1', database 'database1')."), // Lifecycle: to.Ptr(armsql.JobExecutionLifecycleSucceeded), // ProvisioningState: to.Ptr(armsql.ProvisioningStateSucceeded), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-01T04:33:18.123Z"); return t}()), // StepID: to.Ptr[int32](1), // StepName: to.Ptr("step1"), // Target: &armsql.JobExecutionTarget{ // Type: to.Ptr(armsql.JobTargetTypeSQLDatabase), // DatabaseName: to.Ptr("database1"), // ServerName: to.Ptr("server1"), // }, // }, // }}, // } } }
Output:
func (*JobTargetExecutionsClient) NewListByStepPager ¶ added in v0.5.0
func (client *JobTargetExecutionsClient) NewListByStepPager(resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID string, stepName string, options *JobTargetExecutionsClientListByStepOptions) *runtime.Pager[JobTargetExecutionsClientListByStepResponse]
NewListByStepPager - Lists the target executions of a job step execution.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- jobName - The name of the job to get.
- jobExecutionID - The id of the job execution
- stepName - The name of the step.
- options - JobTargetExecutionsClientListByStepOptions contains the optional parameters for the JobTargetExecutionsClient.NewListByStepPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobExecutionTargetsByStep.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewJobTargetExecutionsClient().NewListByStepPager("group1", "server1", "agent1", "job1", "5A86BF65-43AC-F258-2524-9E92992F97CA", "step1", &armsql.JobTargetExecutionsClientListByStepOptions{CreateTimeMin: nil, CreateTimeMax: nil, EndTimeMin: nil, EndTimeMax: nil, IsActive: nil, Skip: nil, Top: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.JobExecutionListResult = armsql.JobExecutionListResult{ // Value: []*armsql.JobExecution{ // { // Name: to.Ptr("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/jobs/executions/steps/targets"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999/steps/step1/targets/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), // Properties: &armsql.JobExecutionProperties{ // CreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-01T04:33:17.513Z"); return t}()), // CurrentAttemptStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-01T04:33:18.239Z"); return t}()), // CurrentAttempts: to.Ptr[int32](1), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-01T04:33:18.703Z"); return t}()), // JobExecutionID: to.Ptr("5A86BF65-43AC-F258-2524-9E92992F97CA"), // JobVersion: to.Ptr[int32](1), // LastMessage: to.Ptr("Step 1 succeeded execution on target (server 'server1', database 'database1')."), // Lifecycle: to.Ptr(armsql.JobExecutionLifecycleSucceeded), // ProvisioningState: to.Ptr(armsql.ProvisioningStateSucceeded), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-01T04:33:18.123Z"); return t}()), // StepID: to.Ptr[int32](1), // StepName: to.Ptr("step1"), // Target: &armsql.JobExecutionTarget{ // Type: to.Ptr(armsql.JobTargetTypeSQLDatabase), // DatabaseName: to.Ptr("database1"), // ServerName: to.Ptr("server1"), // }, // }, // }}, // } } }
Output:
type JobTargetExecutionsClientGetOptions ¶ added in v0.3.0
type JobTargetExecutionsClientGetOptions struct { }
JobTargetExecutionsClientGetOptions contains the optional parameters for the JobTargetExecutionsClient.Get method.
type JobTargetExecutionsClientGetResponse ¶ added in v0.3.0
type JobTargetExecutionsClientGetResponse struct { // An execution of a job JobExecution }
JobTargetExecutionsClientGetResponse contains the response from method JobTargetExecutionsClient.Get.
type JobTargetExecutionsClientListByJobExecutionOptions ¶ added in v0.3.0
type JobTargetExecutionsClientListByJobExecutionOptions struct { // If specified, only job executions created before the specified time are included. CreateTimeMax *time.Time // If specified, only job executions created at or after the specified time are included. CreateTimeMin *time.Time // If specified, only job executions completed before the specified time are included. EndTimeMax *time.Time // If specified, only job executions completed at or after the specified time are included. EndTimeMin *time.Time // If specified, only active or only completed job executions are included. IsActive *bool // The number of elements in the collection to skip. Skip *int32 // The number of elements to return from the collection. Top *int32 }
JobTargetExecutionsClientListByJobExecutionOptions contains the optional parameters for the JobTargetExecutionsClient.NewListByJobExecutionPager method.
type JobTargetExecutionsClientListByJobExecutionResponse ¶ added in v0.3.0
type JobTargetExecutionsClientListByJobExecutionResponse struct { // A list of job executions. JobExecutionListResult }
JobTargetExecutionsClientListByJobExecutionResponse contains the response from method JobTargetExecutionsClient.NewListByJobExecutionPager.
type JobTargetExecutionsClientListByStepOptions ¶ added in v0.3.0
type JobTargetExecutionsClientListByStepOptions struct { // If specified, only job executions created before the specified time are included. CreateTimeMax *time.Time // If specified, only job executions created at or after the specified time are included. CreateTimeMin *time.Time // If specified, only job executions completed before the specified time are included. EndTimeMax *time.Time // If specified, only job executions completed at or after the specified time are included. EndTimeMin *time.Time // If specified, only active or only completed job executions are included. IsActive *bool // The number of elements in the collection to skip. Skip *int32 // The number of elements to return from the collection. Top *int32 }
JobTargetExecutionsClientListByStepOptions contains the optional parameters for the JobTargetExecutionsClient.NewListByStepPager method.
type JobTargetExecutionsClientListByStepResponse ¶ added in v0.3.0
type JobTargetExecutionsClientListByStepResponse struct { // A list of job executions. JobExecutionListResult }
JobTargetExecutionsClientListByStepResponse contains the response from method JobTargetExecutionsClient.NewListByStepPager.
type JobTargetGroup ¶
type JobTargetGroup struct { // Resource properties. Properties *JobTargetGroupProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
JobTargetGroup - A group of job targets.
func (JobTargetGroup) MarshalJSON ¶
func (j JobTargetGroup) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobTargetGroup.
func (*JobTargetGroup) UnmarshalJSON ¶ added in v1.1.0
func (j *JobTargetGroup) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type JobTargetGroup.
type JobTargetGroupListResult ¶
type JobTargetGroupListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*JobTargetGroup }
JobTargetGroupListResult - A list of target groups.
func (JobTargetGroupListResult) MarshalJSON ¶
func (j JobTargetGroupListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobTargetGroupListResult.
func (*JobTargetGroupListResult) UnmarshalJSON ¶ added in v1.1.0
func (j *JobTargetGroupListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type JobTargetGroupListResult.
type JobTargetGroupMembershipType ¶
type JobTargetGroupMembershipType string
JobTargetGroupMembershipType - Whether the target is included or excluded from the group.
const ( JobTargetGroupMembershipTypeExclude JobTargetGroupMembershipType = "Exclude" JobTargetGroupMembershipTypeInclude JobTargetGroupMembershipType = "Include" )
func PossibleJobTargetGroupMembershipTypeValues ¶
func PossibleJobTargetGroupMembershipTypeValues() []JobTargetGroupMembershipType
PossibleJobTargetGroupMembershipTypeValues returns the possible values for the JobTargetGroupMembershipType const type.
type JobTargetGroupProperties ¶
type JobTargetGroupProperties struct { // REQUIRED; Members of the target group. Members []*JobTarget }
JobTargetGroupProperties - Properties of job target group.
func (JobTargetGroupProperties) MarshalJSON ¶
func (j JobTargetGroupProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobTargetGroupProperties.
func (*JobTargetGroupProperties) UnmarshalJSON ¶ added in v1.1.0
func (j *JobTargetGroupProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type JobTargetGroupProperties.
type JobTargetGroupsClient ¶
type JobTargetGroupsClient struct {
// contains filtered or unexported fields
}
JobTargetGroupsClient contains the methods for the JobTargetGroups group. Don't use this type directly, use NewJobTargetGroupsClient() instead.
func NewJobTargetGroupsClient ¶
func NewJobTargetGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobTargetGroupsClient, error)
NewJobTargetGroupsClient creates a new instance of JobTargetGroupsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*JobTargetGroupsClient) CreateOrUpdate ¶
func (client *JobTargetGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, targetGroupName string, parameters JobTargetGroup, options *JobTargetGroupsClientCreateOrUpdateOptions) (JobTargetGroupsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates a target group. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- targetGroupName - The name of the target group.
- parameters - The requested state of the target group.
- options - JobTargetGroupsClientCreateOrUpdateOptions contains the optional parameters for the JobTargetGroupsClient.CreateOrUpdate method.
Example (CreateOrUpdateATargetGroupWithAllProperties) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobTargetGroupMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewJobTargetGroupsClient().CreateOrUpdate(ctx, "group1", "server1", "agent1", "targetGroup1", armsql.JobTargetGroup{ Properties: &armsql.JobTargetGroupProperties{ Members: []*armsql.JobTarget{ { Type: to.Ptr(armsql.JobTargetTypeSQLDatabase), DatabaseName: to.Ptr("database1"), MembershipType: to.Ptr(armsql.JobTargetGroupMembershipTypeExclude), ServerName: to.Ptr("server1"), }, { Type: to.Ptr(armsql.JobTargetTypeSQLServer), MembershipType: to.Ptr(armsql.JobTargetGroupMembershipTypeInclude), RefreshCredential: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential"), ServerName: to.Ptr("server1"), }, { Type: to.Ptr(armsql.JobTargetTypeSQLElasticPool), ElasticPoolName: to.Ptr("pool1"), MembershipType: to.Ptr(armsql.JobTargetGroupMembershipTypeInclude), RefreshCredential: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential"), ServerName: to.Ptr("server2"), }, { Type: to.Ptr(armsql.JobTargetTypeSQLShardMap), MembershipType: to.Ptr(armsql.JobTargetGroupMembershipTypeInclude), RefreshCredential: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential"), ServerName: to.Ptr("server3"), ShardMapName: to.Ptr("shardMap1"), }}, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.JobTargetGroup = armsql.JobTargetGroup{ // Name: to.Ptr("targetGroup1"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/targetGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1"), // Properties: &armsql.JobTargetGroupProperties{ // Members: []*armsql.JobTarget{ // { // Type: to.Ptr(armsql.JobTargetTypeSQLDatabase), // DatabaseName: to.Ptr("database1"), // MembershipType: to.Ptr(armsql.JobTargetGroupMembershipTypeExclude), // ServerName: to.Ptr("server1"), // }, // { // Type: to.Ptr(armsql.JobTargetTypeSQLServer), // MembershipType: to.Ptr(armsql.JobTargetGroupMembershipTypeInclude), // RefreshCredential: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential"), // ServerName: to.Ptr("server1"), // }, // { // Type: to.Ptr(armsql.JobTargetTypeSQLElasticPool), // ElasticPoolName: to.Ptr("pool1"), // MembershipType: to.Ptr(armsql.JobTargetGroupMembershipTypeInclude), // RefreshCredential: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential"), // ServerName: to.Ptr("server2"), // }, // { // Type: to.Ptr(armsql.JobTargetTypeSQLShardMap), // MembershipType: to.Ptr(armsql.JobTargetGroupMembershipTypeInclude), // RefreshCredential: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential"), // ServerName: to.Ptr("server3"), // ShardMapName: to.Ptr("shardMap1"), // }}, // }, // } }
Output:
Example (CreateOrUpdateATargetGroupWithMinimalProperties) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobTargetGroupMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewJobTargetGroupsClient().CreateOrUpdate(ctx, "group1", "server1", "agent1", "targetGroup1", armsql.JobTargetGroup{ Properties: &armsql.JobTargetGroupProperties{ Members: []*armsql.JobTarget{}, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.JobTargetGroup = armsql.JobTargetGroup{ // Name: to.Ptr("targetGroup1"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/targetGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1"), // Properties: &armsql.JobTargetGroupProperties{ // Members: []*armsql.JobTarget{ // }, // }, // } }
Output:
func (*JobTargetGroupsClient) Delete ¶
func (client *JobTargetGroupsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, targetGroupName string, options *JobTargetGroupsClientDeleteOptions) (JobTargetGroupsClientDeleteResponse, error)
Delete - Deletes a target group. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- targetGroupName - The name of the target group.
- options - JobTargetGroupsClientDeleteOptions contains the optional parameters for the JobTargetGroupsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteJobTargetGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewJobTargetGroupsClient().Delete(ctx, "group1", "server1", "agent1", "targetGroup1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*JobTargetGroupsClient) Get ¶
func (client *JobTargetGroupsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, targetGroupName string, options *JobTargetGroupsClientGetOptions) (JobTargetGroupsClientGetResponse, error)
Get - Gets a target group. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- targetGroupName - The name of the target group.
- options - JobTargetGroupsClientGetOptions contains the optional parameters for the JobTargetGroupsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobTargetGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewJobTargetGroupsClient().Get(ctx, "group1", "server1", "agent1", "targetGroup1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.JobTargetGroup = armsql.JobTargetGroup{ // Name: to.Ptr("targetGroup1"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/targetGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1"), // Properties: &armsql.JobTargetGroupProperties{ // Members: []*armsql.JobTarget{ // { // Type: to.Ptr(armsql.JobTargetTypeSQLDatabase), // DatabaseName: to.Ptr("database1"), // MembershipType: to.Ptr(armsql.JobTargetGroupMembershipTypeExclude), // ServerName: to.Ptr("server1"), // }, // { // Type: to.Ptr(armsql.JobTargetTypeSQLServer), // MembershipType: to.Ptr(armsql.JobTargetGroupMembershipTypeInclude), // RefreshCredential: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential"), // ServerName: to.Ptr("server1"), // }, // { // Type: to.Ptr(armsql.JobTargetTypeSQLElasticPool), // ElasticPoolName: to.Ptr("pool1"), // MembershipType: to.Ptr(armsql.JobTargetGroupMembershipTypeInclude), // RefreshCredential: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential"), // ServerName: to.Ptr("server2"), // }, // { // Type: to.Ptr(armsql.JobTargetTypeSQLShardMap), // MembershipType: to.Ptr(armsql.JobTargetGroupMembershipTypeInclude), // RefreshCredential: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential"), // ServerName: to.Ptr("server3"), // ShardMapName: to.Ptr("shardMap1"), // }}, // }, // } }
Output:
func (*JobTargetGroupsClient) NewListByAgentPager ¶ added in v0.5.0
func (client *JobTargetGroupsClient) NewListByAgentPager(resourceGroupName string, serverName string, jobAgentName string, options *JobTargetGroupsClientListByAgentOptions) *runtime.Pager[JobTargetGroupsClientListByAgentResponse]
NewListByAgentPager - Gets all target groups in an agent.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- options - JobTargetGroupsClientListByAgentOptions contains the optional parameters for the JobTargetGroupsClient.NewListByAgentPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobTargetGroups.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewJobTargetGroupsClient().NewListByAgentPager("group1", "server1", "agent1", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.JobTargetGroupListResult = armsql.JobTargetGroupListResult{ // Value: []*armsql.JobTargetGroup{ // { // Name: to.Ptr("targetGroup1"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/targetGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1"), // Properties: &armsql.JobTargetGroupProperties{ // Members: []*armsql.JobTarget{ // { // Type: to.Ptr(armsql.JobTargetTypeSQLDatabase), // DatabaseName: to.Ptr("database1"), // MembershipType: to.Ptr(armsql.JobTargetGroupMembershipTypeExclude), // ServerName: to.Ptr("server1"), // }, // { // Type: to.Ptr(armsql.JobTargetTypeSQLServer), // MembershipType: to.Ptr(armsql.JobTargetGroupMembershipTypeInclude), // RefreshCredential: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential"), // ServerName: to.Ptr("server1"), // }, // { // Type: to.Ptr(armsql.JobTargetTypeSQLElasticPool), // ElasticPoolName: to.Ptr("pool1"), // MembershipType: to.Ptr(armsql.JobTargetGroupMembershipTypeInclude), // RefreshCredential: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential"), // ServerName: to.Ptr("server2"), // }, // { // Type: to.Ptr(armsql.JobTargetTypeSQLShardMap), // MembershipType: to.Ptr(armsql.JobTargetGroupMembershipTypeInclude), // RefreshCredential: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential"), // ServerName: to.Ptr("server3"), // ShardMapName: to.Ptr("shardMap1"), // }}, // }, // }}, // } } }
Output:
type JobTargetGroupsClientCreateOrUpdateOptions ¶ added in v0.3.0
type JobTargetGroupsClientCreateOrUpdateOptions struct { }
JobTargetGroupsClientCreateOrUpdateOptions contains the optional parameters for the JobTargetGroupsClient.CreateOrUpdate method.
type JobTargetGroupsClientCreateOrUpdateResponse ¶ added in v0.3.0
type JobTargetGroupsClientCreateOrUpdateResponse struct { // A group of job targets. JobTargetGroup }
JobTargetGroupsClientCreateOrUpdateResponse contains the response from method JobTargetGroupsClient.CreateOrUpdate.
type JobTargetGroupsClientDeleteOptions ¶ added in v0.3.0
type JobTargetGroupsClientDeleteOptions struct { }
JobTargetGroupsClientDeleteOptions contains the optional parameters for the JobTargetGroupsClient.Delete method.
type JobTargetGroupsClientDeleteResponse ¶ added in v0.3.0
type JobTargetGroupsClientDeleteResponse struct { }
JobTargetGroupsClientDeleteResponse contains the response from method JobTargetGroupsClient.Delete.
type JobTargetGroupsClientGetOptions ¶ added in v0.3.0
type JobTargetGroupsClientGetOptions struct { }
JobTargetGroupsClientGetOptions contains the optional parameters for the JobTargetGroupsClient.Get method.
type JobTargetGroupsClientGetResponse ¶ added in v0.3.0
type JobTargetGroupsClientGetResponse struct { // A group of job targets. JobTargetGroup }
JobTargetGroupsClientGetResponse contains the response from method JobTargetGroupsClient.Get.
type JobTargetGroupsClientListByAgentOptions ¶ added in v0.3.0
type JobTargetGroupsClientListByAgentOptions struct { }
JobTargetGroupsClientListByAgentOptions contains the optional parameters for the JobTargetGroupsClient.NewListByAgentPager method.
type JobTargetGroupsClientListByAgentResponse ¶ added in v0.3.0
type JobTargetGroupsClientListByAgentResponse struct { // A list of target groups. JobTargetGroupListResult }
JobTargetGroupsClientListByAgentResponse contains the response from method JobTargetGroupsClient.NewListByAgentPager.
type JobTargetType ¶
type JobTargetType string
JobTargetType - The type of the target.
const ( JobTargetTypeSQLDatabase JobTargetType = "SqlDatabase" JobTargetTypeSQLElasticPool JobTargetType = "SqlElasticPool" JobTargetTypeSQLServer JobTargetType = "SqlServer" JobTargetTypeSQLShardMap JobTargetType = "SqlShardMap" JobTargetTypeTargetGroup JobTargetType = "TargetGroup" )
func PossibleJobTargetTypeValues ¶
func PossibleJobTargetTypeValues() []JobTargetType
PossibleJobTargetTypeValues returns the possible values for the JobTargetType const type.
type JobVersion ¶
type JobVersion struct { // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
JobVersion - A job version.
func (JobVersion) MarshalJSON ¶ added in v1.1.0
func (j JobVersion) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobVersion.
func (*JobVersion) UnmarshalJSON ¶ added in v1.1.0
func (j *JobVersion) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type JobVersion.
type JobVersionListResult ¶
type JobVersionListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*JobVersion }
JobVersionListResult - A list of job versions.
func (JobVersionListResult) MarshalJSON ¶
func (j JobVersionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobVersionListResult.
func (*JobVersionListResult) UnmarshalJSON ¶ added in v1.1.0
func (j *JobVersionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type JobVersionListResult.
type JobVersionsClient ¶
type JobVersionsClient struct {
// contains filtered or unexported fields
}
JobVersionsClient contains the methods for the JobVersions group. Don't use this type directly, use NewJobVersionsClient() instead.
func NewJobVersionsClient ¶
func NewJobVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobVersionsClient, error)
NewJobVersionsClient creates a new instance of JobVersionsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*JobVersionsClient) Get ¶
func (client *JobVersionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32, options *JobVersionsClientGetOptions) (JobVersionsClientGetResponse, error)
Get - Gets a job version. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- jobName - The name of the job.
- jobVersion - The version of the job to get.
- options - JobVersionsClientGetOptions contains the optional parameters for the JobVersionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobVersion.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewJobVersionsClient().Get(ctx, "group1", "server1", "agent1", "job1", 1, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.JobVersion = armsql.JobVersion{ // Name: to.Ptr("1"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/jobs/versions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/versions/1"), // } }
Output:
func (*JobVersionsClient) NewListByJobPager ¶ added in v0.5.0
func (client *JobVersionsClient) NewListByJobPager(resourceGroupName string, serverName string, jobAgentName string, jobName string, options *JobVersionsClientListByJobOptions) *runtime.Pager[JobVersionsClientListByJobResponse]
NewListByJobPager - Gets all versions of a job.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- jobName - The name of the job to get.
- options - JobVersionsClientListByJobOptions contains the optional parameters for the JobVersionsClient.NewListByJobPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobVersions.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewJobVersionsClient().NewListByJobPager("group1", "server1", "agent1", "job1", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.JobVersionListResult = armsql.JobVersionListResult{ // Value: []*armsql.JobVersion{ // { // Name: to.Ptr("1"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/jobs/versions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/versions/1"), // }, // { // Name: to.Ptr("2"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/jobs/versions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/versions/2"), // }}, // } } }
Output:
type JobVersionsClientGetOptions ¶ added in v0.3.0
type JobVersionsClientGetOptions struct { }
JobVersionsClientGetOptions contains the optional parameters for the JobVersionsClient.Get method.
type JobVersionsClientGetResponse ¶ added in v0.3.0
type JobVersionsClientGetResponse struct { // A job version. JobVersion }
JobVersionsClientGetResponse contains the response from method JobVersionsClient.Get.
type JobVersionsClientListByJobOptions ¶ added in v0.3.0
type JobVersionsClientListByJobOptions struct { }
JobVersionsClientListByJobOptions contains the optional parameters for the JobVersionsClient.NewListByJobPager method.
type JobVersionsClientListByJobResponse ¶ added in v0.3.0
type JobVersionsClientListByJobResponse struct { // A list of job versions. JobVersionListResult }
JobVersionsClientListByJobResponse contains the response from method JobVersionsClient.NewListByJobPager.
type JobsClient ¶
type JobsClient struct {
// contains filtered or unexported fields
}
JobsClient contains the methods for the Jobs group. Don't use this type directly, use NewJobsClient() instead.
func NewJobsClient ¶
func NewJobsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobsClient, error)
NewJobsClient creates a new instance of JobsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*JobsClient) CreateOrUpdate ¶
func (client *JobsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, parameters Job, options *JobsClientCreateOrUpdateOptions) (JobsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates a job. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- jobName - The name of the job to get.
- parameters - The requested job state.
- options - JobsClientCreateOrUpdateOptions contains the optional parameters for the JobsClient.CreateOrUpdate method.
Example (CreateAJobWithAllPropertiesSpecified) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobMax.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewJobsClient().CreateOrUpdate(ctx, "group1", "server1", "agent1", "job1", armsql.Job{ Properties: &armsql.JobProperties{ Description: to.Ptr("my favourite job"), Schedule: &armsql.JobSchedule{ Type: to.Ptr(armsql.JobScheduleTypeRecurring), Enabled: to.Ptr(true), EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-09-24T23:59:59.000Z"); return t }()), Interval: to.Ptr("PT5M"), StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-09-24T18:30:01.000Z"); return t }()), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Job = armsql.Job{ // Name: to.Ptr("job1"), // Type: to.Ptr("Microsoft.Sql/servers/jobAccounts/jobs"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1"), // Properties: &armsql.JobProperties{ // Description: to.Ptr("my favourite job"), // Schedule: &armsql.JobSchedule{ // Type: to.Ptr(armsql.JobScheduleTypeRecurring), // Enabled: to.Ptr(true), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-09-24T23:59:59.000Z"); return t}()), // Interval: to.Ptr("PT5M"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-09-24T18:30:01.000Z"); return t}()), // }, // Version: to.Ptr[int32](0), // }, // } }
Output:
Example (CreateAJobWithDefaultProperties) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewJobsClient().CreateOrUpdate(ctx, "group1", "server1", "agent1", "job1", armsql.Job{}, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Job = armsql.Job{ // Name: to.Ptr("job1"), // Type: to.Ptr("Microsoft.Sql/servers/jobAccounts/jobs"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1"), // Properties: &armsql.JobProperties{ // Description: to.Ptr(""), // Schedule: &armsql.JobSchedule{ // Type: to.Ptr(armsql.JobScheduleTypeOnce), // Enabled: to.Ptr(false), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "9999-12-31T11:59:59.000Z"); return t}()), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T00:00:00.000Z"); return t}()), // }, // Version: to.Ptr[int32](0), // }, // } }
Output:
func (*JobsClient) Delete ¶
func (client *JobsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, options *JobsClientDeleteOptions) (JobsClientDeleteResponse, error)
Delete - Deletes a job. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- jobName - The name of the job to delete.
- options - JobsClientDeleteOptions contains the optional parameters for the JobsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteJob.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewJobsClient().Delete(ctx, "group1", "server1", "agent1", "job1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*JobsClient) Get ¶
func (client *JobsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, options *JobsClientGetOptions) (JobsClientGetResponse, error)
Get - Gets a job. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- jobName - The name of the job to get.
- options - JobsClientGetOptions contains the optional parameters for the JobsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJob.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewJobsClient().Get(ctx, "group1", "server1", "agent1", "job1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Job = armsql.Job{ // Name: to.Ptr("job1"), // Type: to.Ptr("Microsoft.Sql/servers/jobAccounts/jobs"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1"), // Properties: &armsql.JobProperties{ // Description: to.Ptr("my favourite job"), // Schedule: &armsql.JobSchedule{ // Type: to.Ptr(armsql.JobScheduleTypeOnce), // Enabled: to.Ptr(true), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-09-24T23:59:59.000Z"); return t}()), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-09-24T18:30:01.000Z"); return t}()), // }, // Version: to.Ptr[int32](0), // }, // } }
Output:
func (*JobsClient) NewListByAgentPager ¶ added in v0.5.0
func (client *JobsClient) NewListByAgentPager(resourceGroupName string, serverName string, jobAgentName string, options *JobsClientListByAgentOptions) *runtime.Pager[JobsClientListByAgentResponse]
NewListByAgentPager - Gets a list of jobs.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- jobAgentName - The name of the job agent.
- options - JobsClientListByAgentOptions contains the optional parameters for the JobsClient.NewListByAgentPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobsByAgent.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewJobsClient().NewListByAgentPager("group1", "server1", "agent1", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.JobListResult = armsql.JobListResult{ // Value: []*armsql.Job{ // { // Name: to.Ptr("job1"), // Type: to.Ptr("Microsoft.Sql/servers/jobAccounts/jobs"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1"), // Properties: &armsql.JobProperties{ // Description: to.Ptr("my favourite job"), // Schedule: &armsql.JobSchedule{ // Type: to.Ptr(armsql.JobScheduleTypeRecurring), // Enabled: to.Ptr(true), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-09-24T23:59:59.000Z"); return t}()), // Interval: to.Ptr("PT5M"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-09-24T18:30:01.000Z"); return t}()), // }, // Version: to.Ptr[int32](0), // }, // }, // { // Name: to.Ptr("job3"), // Type: to.Ptr("Microsoft.Sql/servers/jobAccounts/jobs"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job3"), // Properties: &armsql.JobProperties{ // Description: to.Ptr("this job will be scheduled once"), // Schedule: &armsql.JobSchedule{ // Type: to.Ptr(armsql.JobScheduleTypeOnce), // Enabled: to.Ptr(true), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-27T06:00:00.000Z"); return t}()), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-01T03:45:00.000Z"); return t}()), // }, // Version: to.Ptr[int32](1), // }, // }, // { // Name: to.Ptr("job2"), // Type: to.Ptr("Microsoft.Sql/servers/jobAccounts/jobs"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job2"), // Properties: &armsql.JobProperties{ // Description: to.Ptr("this job will never be automatically scheduled"), // Schedule: &armsql.JobSchedule{ // Type: to.Ptr(armsql.JobScheduleTypeOnce), // Enabled: to.Ptr(false), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-27T06:00:00.000Z"); return t}()), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-01T03:45:00.000Z"); return t}()), // }, // Version: to.Ptr[int32](1), // }, // }}, // } } }
Output:
type JobsClientCreateOrUpdateOptions ¶ added in v0.3.0
type JobsClientCreateOrUpdateOptions struct { }
JobsClientCreateOrUpdateOptions contains the optional parameters for the JobsClient.CreateOrUpdate method.
type JobsClientCreateOrUpdateResponse ¶ added in v0.3.0
type JobsClientCreateOrUpdateResponse struct { // A job. Job }
JobsClientCreateOrUpdateResponse contains the response from method JobsClient.CreateOrUpdate.
type JobsClientDeleteOptions ¶ added in v0.3.0
type JobsClientDeleteOptions struct { }
JobsClientDeleteOptions contains the optional parameters for the JobsClient.Delete method.
type JobsClientDeleteResponse ¶ added in v0.3.0
type JobsClientDeleteResponse struct { }
JobsClientDeleteResponse contains the response from method JobsClient.Delete.
type JobsClientGetOptions ¶ added in v0.3.0
type JobsClientGetOptions struct { }
JobsClientGetOptions contains the optional parameters for the JobsClient.Get method.
type JobsClientGetResponse ¶ added in v0.3.0
type JobsClientGetResponse struct { // A job. Job }
JobsClientGetResponse contains the response from method JobsClient.Get.
type JobsClientListByAgentOptions ¶ added in v0.3.0
type JobsClientListByAgentOptions struct { }
JobsClientListByAgentOptions contains the optional parameters for the JobsClient.NewListByAgentPager method.
type JobsClientListByAgentResponse ¶ added in v0.3.0
type JobsClientListByAgentResponse struct { // A list of jobs. JobListResult }
JobsClientListByAgentResponse contains the response from method JobsClient.NewListByAgentPager.
type LedgerDigestUploads ¶
type LedgerDigestUploads struct { // Resource properties. Properties *LedgerDigestUploadsProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
LedgerDigestUploads - Azure SQL Database ledger digest upload settings.
func (LedgerDigestUploads) MarshalJSON ¶
func (l LedgerDigestUploads) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LedgerDigestUploads.
func (*LedgerDigestUploads) UnmarshalJSON ¶ added in v1.1.0
func (l *LedgerDigestUploads) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LedgerDigestUploads.
type LedgerDigestUploadsClient ¶
type LedgerDigestUploadsClient struct {
// contains filtered or unexported fields
}
LedgerDigestUploadsClient contains the methods for the LedgerDigestUploads group. Don't use this type directly, use NewLedgerDigestUploadsClient() instead.
func NewLedgerDigestUploadsClient ¶
func NewLedgerDigestUploadsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LedgerDigestUploadsClient, error)
NewLedgerDigestUploadsClient creates a new instance of LedgerDigestUploadsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*LedgerDigestUploadsClient) BeginCreateOrUpdate ¶
func (client *LedgerDigestUploadsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, ledgerDigestUploads LedgerDigestUploadsName, parameters LedgerDigestUploads, options *LedgerDigestUploadsClientBeginCreateOrUpdateOptions) (*runtime.Poller[LedgerDigestUploadsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-02-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - LedgerDigestUploadsClientBeginCreateOrUpdateOptions contains the optional parameters for the LedgerDigestUploadsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsEnable.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewLedgerDigestUploadsClient().BeginCreateOrUpdate(ctx, "ledgertestrg", "ledgertestserver", "testdb", armsql.LedgerDigestUploadsNameCurrent, armsql.LedgerDigestUploads{ Properties: &armsql.LedgerDigestUploadsProperties{ DigestStorageEndpoint: to.Ptr("https://MyAccount.blob.core.windows.net"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.LedgerDigestUploads = armsql.LedgerDigestUploads{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/servers/databases/ledgerDigestUploads"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/servers/ledgertestserver/databases/testdb/ledgerDigestUpload/current"), // Properties: &armsql.LedgerDigestUploadsProperties{ // DigestStorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), // State: to.Ptr(armsql.LedgerDigestUploadsStateEnabled), // }, // } }
Output:
func (*LedgerDigestUploadsClient) BeginDisable ¶
func (client *LedgerDigestUploadsClient) BeginDisable(ctx context.Context, resourceGroupName string, serverName string, databaseName string, ledgerDigestUploads LedgerDigestUploadsName, options *LedgerDigestUploadsClientBeginDisableOptions) (*runtime.Poller[LedgerDigestUploadsClientDisableResponse], error)
BeginDisable - Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-02-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - LedgerDigestUploadsClientBeginDisableOptions contains the optional parameters for the LedgerDigestUploadsClient.BeginDisable method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsDisable.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewLedgerDigestUploadsClient().BeginDisable(ctx, "ledgertestrg", "ledgertestserver", "testdb", armsql.LedgerDigestUploadsNameCurrent, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.LedgerDigestUploads = armsql.LedgerDigestUploads{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/servers/databases/ledgerDigestUploads"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/servers/ledgertestserver/databases/testdb/ledgerDigestUpload/current/disable"), // Properties: &armsql.LedgerDigestUploadsProperties{ // State: to.Ptr(armsql.LedgerDigestUploadsStateDisabled), // }, // } }
Output:
func (*LedgerDigestUploadsClient) Get ¶
func (client *LedgerDigestUploadsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, ledgerDigestUploads LedgerDigestUploadsName, options *LedgerDigestUploadsClientGetOptions) (LedgerDigestUploadsClientGetResponse, error)
Get - Gets the current ledger digest upload configuration for a database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-02-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - LedgerDigestUploadsClientGetOptions contains the optional parameters for the LedgerDigestUploadsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewLedgerDigestUploadsClient().Get(ctx, "ledgertestrg", "ledgertestserver", "testdb", armsql.LedgerDigestUploadsNameCurrent, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.LedgerDigestUploads = armsql.LedgerDigestUploads{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/servers/databases/ledgerDigestUploads"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/servers/ledgertestserver/databases/testdb/current"), // Properties: &armsql.LedgerDigestUploadsProperties{ // DigestStorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), // State: to.Ptr(armsql.LedgerDigestUploadsStateEnabled), // }, // } }
Output:
func (*LedgerDigestUploadsClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *LedgerDigestUploadsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *LedgerDigestUploadsClientListByDatabaseOptions) *runtime.Pager[LedgerDigestUploadsClientListByDatabaseResponse]
NewListByDatabasePager - Gets all ledger digest upload settings on a database.
Generated from API version 2021-02-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - LedgerDigestUploadsClientListByDatabaseOptions contains the optional parameters for the LedgerDigestUploadsClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewLedgerDigestUploadsClient().NewListByDatabasePager("ledgertestrg", "ledgertestserver", "testdb", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.LedgerDigestUploadsListResult = armsql.LedgerDigestUploadsListResult{ // Value: []*armsql.LedgerDigestUploads{ // { // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/servers/databases/ledgerDigestUploads"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/servers/ledgertestserver/databases/testdb/current"), // Properties: &armsql.LedgerDigestUploadsProperties{ // DigestStorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), // State: to.Ptr(armsql.LedgerDigestUploadsStateEnabled), // }, // }}, // } } }
Output:
type LedgerDigestUploadsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type LedgerDigestUploadsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LedgerDigestUploadsClientBeginCreateOrUpdateOptions contains the optional parameters for the LedgerDigestUploadsClient.BeginCreateOrUpdate method.
type LedgerDigestUploadsClientBeginDisableOptions ¶ added in v0.3.0
type LedgerDigestUploadsClientBeginDisableOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LedgerDigestUploadsClientBeginDisableOptions contains the optional parameters for the LedgerDigestUploadsClient.BeginDisable method.
type LedgerDigestUploadsClientCreateOrUpdateResponse ¶ added in v0.3.0
type LedgerDigestUploadsClientCreateOrUpdateResponse struct { // Azure SQL Database ledger digest upload settings. LedgerDigestUploads }
LedgerDigestUploadsClientCreateOrUpdateResponse contains the response from method LedgerDigestUploadsClient.BeginCreateOrUpdate.
type LedgerDigestUploadsClientDisableResponse ¶ added in v0.3.0
type LedgerDigestUploadsClientDisableResponse struct { // Azure SQL Database ledger digest upload settings. LedgerDigestUploads }
LedgerDigestUploadsClientDisableResponse contains the response from method LedgerDigestUploadsClient.BeginDisable.
type LedgerDigestUploadsClientGetOptions ¶ added in v0.3.0
type LedgerDigestUploadsClientGetOptions struct { }
LedgerDigestUploadsClientGetOptions contains the optional parameters for the LedgerDigestUploadsClient.Get method.
type LedgerDigestUploadsClientGetResponse ¶ added in v0.3.0
type LedgerDigestUploadsClientGetResponse struct { // Azure SQL Database ledger digest upload settings. LedgerDigestUploads }
LedgerDigestUploadsClientGetResponse contains the response from method LedgerDigestUploadsClient.Get.
type LedgerDigestUploadsClientListByDatabaseOptions ¶ added in v0.3.0
type LedgerDigestUploadsClientListByDatabaseOptions struct { }
LedgerDigestUploadsClientListByDatabaseOptions contains the optional parameters for the LedgerDigestUploadsClient.NewListByDatabasePager method.
type LedgerDigestUploadsClientListByDatabaseResponse ¶ added in v0.3.0
type LedgerDigestUploadsClientListByDatabaseResponse struct { // A list of ledger digest upload settings. LedgerDigestUploadsListResult }
LedgerDigestUploadsClientListByDatabaseResponse contains the response from method LedgerDigestUploadsClient.NewListByDatabasePager.
type LedgerDigestUploadsListResult ¶
type LedgerDigestUploadsListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*LedgerDigestUploads }
LedgerDigestUploadsListResult - A list of ledger digest upload settings.
func (LedgerDigestUploadsListResult) MarshalJSON ¶
func (l LedgerDigestUploadsListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LedgerDigestUploadsListResult.
func (*LedgerDigestUploadsListResult) UnmarshalJSON ¶ added in v1.1.0
func (l *LedgerDigestUploadsListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LedgerDigestUploadsListResult.
type LedgerDigestUploadsName ¶
type LedgerDigestUploadsName string
const (
LedgerDigestUploadsNameCurrent LedgerDigestUploadsName = "current"
)
func PossibleLedgerDigestUploadsNameValues ¶
func PossibleLedgerDigestUploadsNameValues() []LedgerDigestUploadsName
PossibleLedgerDigestUploadsNameValues returns the possible values for the LedgerDigestUploadsName const type.
type LedgerDigestUploadsProperties ¶
type LedgerDigestUploadsProperties struct { // The digest storage endpoint, which must be either an Azure blob storage endpoint or an URI for Azure Confidential Ledger. DigestStorageEndpoint *string // READ-ONLY; Specifies the state of ledger digest upload. State *LedgerDigestUploadsState }
LedgerDigestUploadsProperties - The properties of a database ledger digest upload settings.
func (LedgerDigestUploadsProperties) MarshalJSON ¶ added in v1.1.0
func (l LedgerDigestUploadsProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LedgerDigestUploadsProperties.
func (*LedgerDigestUploadsProperties) UnmarshalJSON ¶ added in v1.1.0
func (l *LedgerDigestUploadsProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LedgerDigestUploadsProperties.
type LedgerDigestUploadsState ¶
type LedgerDigestUploadsState string
LedgerDigestUploadsState - Specifies the state of ledger digest upload.
const ( LedgerDigestUploadsStateDisabled LedgerDigestUploadsState = "Disabled" LedgerDigestUploadsStateEnabled LedgerDigestUploadsState = "Enabled" )
func PossibleLedgerDigestUploadsStateValues ¶
func PossibleLedgerDigestUploadsStateValues() []LedgerDigestUploadsState
PossibleLedgerDigestUploadsStateValues returns the possible values for the LedgerDigestUploadsState const type.
type LicenseTypeCapability ¶
type LicenseTypeCapability struct { // The reason for the capability not being available. Reason *string // READ-ONLY; License type identifier. Name *string // READ-ONLY; The status of the capability. Status *CapabilityStatus }
LicenseTypeCapability - The license type capability
func (LicenseTypeCapability) MarshalJSON ¶ added in v1.1.0
func (l LicenseTypeCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LicenseTypeCapability.
func (*LicenseTypeCapability) UnmarshalJSON ¶ added in v1.1.0
func (l *LicenseTypeCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LicenseTypeCapability.
type LocationCapabilities ¶
type LocationCapabilities struct { // The reason for the capability not being available. Reason *string // READ-ONLY; The location name. Name *string // READ-ONLY; The status of the capability. Status *CapabilityStatus // READ-ONLY; The list of supported managed instance versions. SupportedManagedInstanceVersions []*ManagedInstanceVersionCapability // READ-ONLY; The list of supported server versions. SupportedServerVersions []*ServerVersionCapability }
LocationCapabilities - The location capability.
func (LocationCapabilities) MarshalJSON ¶
func (l LocationCapabilities) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LocationCapabilities.
func (*LocationCapabilities) UnmarshalJSON ¶ added in v1.1.0
func (l *LocationCapabilities) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LocationCapabilities.
type LogSizeCapability ¶
type LogSizeCapability struct { // READ-ONLY; The log size limit (see 'unit' for the units). Limit *int32 // READ-ONLY; The units that the limit is expressed in. Unit *LogSizeUnit }
LogSizeCapability - The log size capability.
func (LogSizeCapability) MarshalJSON ¶ added in v1.1.0
func (l LogSizeCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LogSizeCapability.
func (*LogSizeCapability) UnmarshalJSON ¶ added in v1.1.0
func (l *LogSizeCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LogSizeCapability.
type LogSizeUnit ¶
type LogSizeUnit string
LogSizeUnit - The units that the limit is expressed in.
const ( LogSizeUnitGigabytes LogSizeUnit = "Gigabytes" LogSizeUnitMegabytes LogSizeUnit = "Megabytes" LogSizeUnitPercent LogSizeUnit = "Percent" LogSizeUnitPetabytes LogSizeUnit = "Petabytes" LogSizeUnitTerabytes LogSizeUnit = "Terabytes" )
func PossibleLogSizeUnitValues ¶
func PossibleLogSizeUnitValues() []LogSizeUnit
PossibleLogSizeUnitValues returns the possible values for the LogSizeUnit const type.
type LogicalDatabaseTransparentDataEncryption ¶
type LogicalDatabaseTransparentDataEncryption struct { // Resource properties. Properties *TransparentDataEncryptionProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
LogicalDatabaseTransparentDataEncryption - A logical database transparent data encryption state.
func (LogicalDatabaseTransparentDataEncryption) MarshalJSON ¶
func (l LogicalDatabaseTransparentDataEncryption) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LogicalDatabaseTransparentDataEncryption.
func (*LogicalDatabaseTransparentDataEncryption) UnmarshalJSON ¶ added in v1.1.0
func (l *LogicalDatabaseTransparentDataEncryption) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LogicalDatabaseTransparentDataEncryption.
type LogicalDatabaseTransparentDataEncryptionListResult ¶
type LogicalDatabaseTransparentDataEncryptionListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*LogicalDatabaseTransparentDataEncryption }
LogicalDatabaseTransparentDataEncryptionListResult - A list of transparent data encryptions
func (LogicalDatabaseTransparentDataEncryptionListResult) MarshalJSON ¶
func (l LogicalDatabaseTransparentDataEncryptionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LogicalDatabaseTransparentDataEncryptionListResult.
func (*LogicalDatabaseTransparentDataEncryptionListResult) UnmarshalJSON ¶ added in v1.1.0
func (l *LogicalDatabaseTransparentDataEncryptionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LogicalDatabaseTransparentDataEncryptionListResult.
type LogicalServerAdvancedThreatProtectionListResult ¶ added in v1.0.0
type LogicalServerAdvancedThreatProtectionListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ServerAdvancedThreatProtection }
LogicalServerAdvancedThreatProtectionListResult - A list of the server's Advanced Threat Protection configurations.
func (LogicalServerAdvancedThreatProtectionListResult) MarshalJSON ¶ added in v1.1.0
func (l LogicalServerAdvancedThreatProtectionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LogicalServerAdvancedThreatProtectionListResult.
func (*LogicalServerAdvancedThreatProtectionListResult) UnmarshalJSON ¶ added in v1.1.0
func (l *LogicalServerAdvancedThreatProtectionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LogicalServerAdvancedThreatProtectionListResult.
type LogicalServerSecurityAlertPolicyListResult ¶
type LogicalServerSecurityAlertPolicyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ServerSecurityAlertPolicy }
LogicalServerSecurityAlertPolicyListResult - A list of the server's security alert policies.
func (LogicalServerSecurityAlertPolicyListResult) MarshalJSON ¶
func (l LogicalServerSecurityAlertPolicyListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LogicalServerSecurityAlertPolicyListResult.
func (*LogicalServerSecurityAlertPolicyListResult) UnmarshalJSON ¶ added in v1.1.0
func (l *LogicalServerSecurityAlertPolicyListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LogicalServerSecurityAlertPolicyListResult.
type LongTermRetentionBackup ¶
type LongTermRetentionBackup struct { // Resource properties. Properties *LongTermRetentionBackupProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
LongTermRetentionBackup - A long term retention backup.
func (LongTermRetentionBackup) MarshalJSON ¶
func (l LongTermRetentionBackup) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LongTermRetentionBackup.
func (*LongTermRetentionBackup) UnmarshalJSON ¶ added in v1.1.0
func (l *LongTermRetentionBackup) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LongTermRetentionBackup.
type LongTermRetentionBackupListResult ¶
type LongTermRetentionBackupListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*LongTermRetentionBackup }
LongTermRetentionBackupListResult - A list of long term retention backups.
func (LongTermRetentionBackupListResult) MarshalJSON ¶
func (l LongTermRetentionBackupListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LongTermRetentionBackupListResult.
func (*LongTermRetentionBackupListResult) UnmarshalJSON ¶ added in v1.1.0
func (l *LongTermRetentionBackupListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LongTermRetentionBackupListResult.
type LongTermRetentionBackupOperationResult ¶
type LongTermRetentionBackupOperationResult struct { // Resource properties. Properties *LongTermRetentionOperationResultProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
LongTermRetentionBackupOperationResult - A LongTermRetentionBackup operation result resource.
func (LongTermRetentionBackupOperationResult) MarshalJSON ¶
func (l LongTermRetentionBackupOperationResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LongTermRetentionBackupOperationResult.
func (*LongTermRetentionBackupOperationResult) UnmarshalJSON ¶ added in v1.1.0
func (l *LongTermRetentionBackupOperationResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LongTermRetentionBackupOperationResult.
type LongTermRetentionBackupProperties ¶
type LongTermRetentionBackupProperties struct { // The storage redundancy type of the backup RequestedBackupStorageRedundancy *BackupStorageRedundancy // READ-ONLY; The time the long term retention backup will expire. BackupExpirationTime *time.Time // READ-ONLY; The storage redundancy type of the backup BackupStorageRedundancy *BackupStorageRedundancy // READ-ONLY; The time the backup was taken BackupTime *time.Time // READ-ONLY; The delete time of the database DatabaseDeletionTime *time.Time // READ-ONLY; The name of the database the backup belong to DatabaseName *string // READ-ONLY; The create time of the server. ServerCreateTime *time.Time // READ-ONLY; The server name that the backup database belong to. ServerName *string }
LongTermRetentionBackupProperties - Properties of a long term retention backup
func (LongTermRetentionBackupProperties) MarshalJSON ¶
func (l LongTermRetentionBackupProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LongTermRetentionBackupProperties.
func (*LongTermRetentionBackupProperties) UnmarshalJSON ¶
func (l *LongTermRetentionBackupProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LongTermRetentionBackupProperties.
type LongTermRetentionBackupsClient ¶
type LongTermRetentionBackupsClient struct {
// contains filtered or unexported fields
}
LongTermRetentionBackupsClient contains the methods for the LongTermRetentionBackups group. Don't use this type directly, use NewLongTermRetentionBackupsClient() instead.
func NewLongTermRetentionBackupsClient ¶
func NewLongTermRetentionBackupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LongTermRetentionBackupsClient, error)
NewLongTermRetentionBackupsClient creates a new instance of LongTermRetentionBackupsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*LongTermRetentionBackupsClient) BeginCopy ¶
func (client *LongTermRetentionBackupsClient) BeginCopy(ctx context.Context, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, parameters CopyLongTermRetentionBackupParameters, options *LongTermRetentionBackupsClientBeginCopyOptions) (*runtime.Poller[LongTermRetentionBackupsClientCopyResponse], error)
BeginCopy - Copy an existing long term retention backup. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- locationName - The location of the database.
- longTermRetentionServerName - The name of the server
- longTermRetentionDatabaseName - The name of the database
- backupName - The backup name.
- parameters - The parameters needed for long term retention copy request
- options - LongTermRetentionBackupsClientBeginCopyOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginCopy method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/LongTermRetentionBackupCopy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewLongTermRetentionBackupsClient().BeginCopy(ctx, "japaneast", "testserver", "testDatabase", "55555555-6666-7777-8888-999999999999;131637960820000000", armsql.CopyLongTermRetentionBackupParameters{ Properties: &armsql.CopyLongTermRetentionBackupParametersProperties{ TargetBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), TargetDatabaseName: to.Ptr("testDatabase2"), TargetServerResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testserver2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.LongTermRetentionBackupOperationResult = armsql.LongTermRetentionBackupOperationResult{ // Name: to.Ptr("a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionBackupOperationResults"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japanEast/longTermRetentionBackupOperationResults/a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706"), // Properties: &armsql.LongTermRetentionOperationResultProperties{ // FromBackupResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japanEast/longTermRetentionServers/testserver/longterRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000"), // OperationType: to.Ptr("CopyBackup"), // RequestID: to.Ptr("a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706"), // Status: to.Ptr("Succeeded"), // TargetBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // ToBackupResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup/providers/Microsoft.Sql/locations/japanEast/longTermRetentionServers/testserver2/longterRetentionDatabases/testDatabase2/longTermRetentionBackups/55555555-6666-7777-8888-111111111111;131637960820000000"), // }, // } }
Output:
func (*LongTermRetentionBackupsClient) BeginCopyByResourceGroup ¶
func (client *LongTermRetentionBackupsClient) BeginCopyByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, parameters CopyLongTermRetentionBackupParameters, options *LongTermRetentionBackupsClientBeginCopyByResourceGroupOptions) (*runtime.Poller[LongTermRetentionBackupsClientCopyByResourceGroupResponse], error)
BeginCopyByResourceGroup - Copy an existing long term retention backup to a different server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- locationName - The location of the database.
- longTermRetentionServerName - The name of the server
- longTermRetentionDatabaseName - The name of the database
- backupName - The backup name.
- parameters - The parameters needed for long term retention copy request
- options - LongTermRetentionBackupsClientBeginCopyByResourceGroupOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginCopyByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupCopy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewLongTermRetentionBackupsClient().BeginCopyByResourceGroup(ctx, "testResourceGroup", "japaneast", "testserver", "testDatabase", "55555555-6666-7777-8888-999999999999;131637960820000000", armsql.CopyLongTermRetentionBackupParameters{ Properties: &armsql.CopyLongTermRetentionBackupParametersProperties{ TargetBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), TargetDatabaseName: to.Ptr("testDatabase2"), TargetServerResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testserver2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.LongTermRetentionBackupOperationResult = armsql.LongTermRetentionBackupOperationResult{ // Name: to.Ptr("a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionBackupOperationResults"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japanEast/longTermRetentionBackupOperationResults/a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706"), // Properties: &armsql.LongTermRetentionOperationResultProperties{ // FromBackupResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japanEast/longTermRetentionServers/testserver/longterRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000"), // OperationType: to.Ptr("CopyBackup"), // RequestID: to.Ptr("a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706"), // Status: to.Ptr("Succeeded"), // TargetBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // ToBackupResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup/providers/Microsoft.Sql/locations/japanEast/longTermRetentionServers/testserver2/longterRetentionDatabases/testDatabase2/longTermRetentionBackups/55555555-6666-7777-8888-111111111111;131637960820000000"), // }, // } }
Output:
func (*LongTermRetentionBackupsClient) BeginDelete ¶
func (client *LongTermRetentionBackupsClient) BeginDelete(ctx context.Context, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, options *LongTermRetentionBackupsClientBeginDeleteOptions) (*runtime.Poller[LongTermRetentionBackupsClientDeleteResponse], error)
BeginDelete - Deletes a long term retention backup. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- locationName - The location of the database
- longTermRetentionServerName - The name of the server
- longTermRetentionDatabaseName - The name of the database
- backupName - The backup name.
- options - LongTermRetentionBackupsClientBeginDeleteOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/LongTermRetentionBackupDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewLongTermRetentionBackupsClient().BeginDelete(ctx, "japaneast", "testserver", "testDatabase", "55555555-6666-7777-8888-999999999999;131637960820000000", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*LongTermRetentionBackupsClient) BeginDeleteByResourceGroup ¶
func (client *LongTermRetentionBackupsClient) BeginDeleteByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, options *LongTermRetentionBackupsClientBeginDeleteByResourceGroupOptions) (*runtime.Poller[LongTermRetentionBackupsClientDeleteByResourceGroupResponse], error)
BeginDeleteByResourceGroup - Deletes a long term retention backup. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- locationName - The location of the database
- longTermRetentionServerName - The name of the server
- longTermRetentionDatabaseName - The name of the database
- backupName - The backup name.
- options - LongTermRetentionBackupsClientBeginDeleteByResourceGroupOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginDeleteByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewLongTermRetentionBackupsClient().BeginDeleteByResourceGroup(ctx, "testResourceGroup", "japaneast", "testserver", "testDatabase", "55555555-6666-7777-8888-999999999999;131637960820000000", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*LongTermRetentionBackupsClient) BeginUpdate ¶
func (client *LongTermRetentionBackupsClient) BeginUpdate(ctx context.Context, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, parameters UpdateLongTermRetentionBackupParameters, options *LongTermRetentionBackupsClientBeginUpdateOptions) (*runtime.Poller[LongTermRetentionBackupsClientUpdateResponse], error)
BeginUpdate - Updates an existing long term retention backup. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- locationName - The location of the database.
- longTermRetentionServerName - The name of the server
- longTermRetentionDatabaseName - The name of the database
- backupName - The backup name.
- parameters - The requested backup resource state
- options - LongTermRetentionBackupsClientBeginUpdateOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/LongTermRetentionBackupUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewLongTermRetentionBackupsClient().BeginUpdate(ctx, "japaneast", "testserver", "testDatabase", "55555555-6666-7777-8888-999999999999;131637960820000000", armsql.UpdateLongTermRetentionBackupParameters{ Properties: &armsql.UpdateLongTermRetentionBackupParametersProperties{ RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.LongTermRetentionBackupOperationResult = armsql.LongTermRetentionBackupOperationResult{ // Name: to.Ptr("a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionBackupOperationResults"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japanEast/longTermRetentionBackupOperationResults/a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706"), // Properties: &armsql.LongTermRetentionOperationResultProperties{ // FromBackupResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japanEast/longTermRetentionServers/testserver/longterRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000"), // OperationType: to.Ptr("UpdateBackup"), // RequestID: to.Ptr("a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706"), // Status: to.Ptr("Succeeded"), // TargetBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // }, // } }
Output:
func (*LongTermRetentionBackupsClient) BeginUpdateByResourceGroup ¶
func (client *LongTermRetentionBackupsClient) BeginUpdateByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, parameters UpdateLongTermRetentionBackupParameters, options *LongTermRetentionBackupsClientBeginUpdateByResourceGroupOptions) (*runtime.Poller[LongTermRetentionBackupsClientUpdateByResourceGroupResponse], error)
BeginUpdateByResourceGroup - Updates an existing long term retention backup. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- locationName - The location of the database.
- longTermRetentionServerName - The name of the server
- longTermRetentionDatabaseName - The name of the database
- backupName - The backup name.
- parameters - The requested backup resource state
- options - LongTermRetentionBackupsClientBeginUpdateByResourceGroupOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginUpdateByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewLongTermRetentionBackupsClient().BeginUpdateByResourceGroup(ctx, "testResourceGroup", "japaneast", "testserver", "testDatabase", "55555555-6666-7777-8888-999999999999;131637960820000000", armsql.UpdateLongTermRetentionBackupParameters{ Properties: &armsql.UpdateLongTermRetentionBackupParametersProperties{ RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.LongTermRetentionBackupOperationResult = armsql.LongTermRetentionBackupOperationResult{ // Name: to.Ptr("a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionBackupOperationResults"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japanEast/longTermRetentionBackupOperationResults/a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706"), // Properties: &armsql.LongTermRetentionOperationResultProperties{ // FromBackupResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japanEast/longTermRetentionServers/testserver/longterRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000"), // OperationType: to.Ptr("UpdateBackup"), // RequestID: to.Ptr("a1aa7c77-961b-4fbb-bcd6-aa9acfcd1706"), // Status: to.Ptr("Succeeded"), // TargetBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // }, // } }
Output:
func (*LongTermRetentionBackupsClient) Get ¶
func (client *LongTermRetentionBackupsClient) Get(ctx context.Context, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, options *LongTermRetentionBackupsClientGetOptions) (LongTermRetentionBackupsClientGetResponse, error)
Get - Gets a long term retention backup. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- locationName - The location of the database.
- longTermRetentionServerName - The name of the server
- longTermRetentionDatabaseName - The name of the database
- backupName - The backup name.
- options - LongTermRetentionBackupsClientGetOptions contains the optional parameters for the LongTermRetentionBackupsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/LongTermRetentionBackupGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewLongTermRetentionBackupsClient().Get(ctx, "japaneast", "testserver", "testDatabase", "55555555-6666-7777-8888-999999999999;131637960820000000", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.LongTermRetentionBackup = armsql.LongTermRetentionBackup{ // Name: to.Ptr("2017-03-10T08:00:00.000Z;55555555-6666-7777-8888-999999999999;131637960820000000"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase/longTermRetentionBackups/2017-03-10T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2017-09-06T08:00:00.000Z"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-09-06T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase"), // ServerCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ServerName: to.Ptr("testserver"), // }, // } }
Output:
func (*LongTermRetentionBackupsClient) GetByResourceGroup ¶
func (client *LongTermRetentionBackupsClient) GetByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, options *LongTermRetentionBackupsClientGetByResourceGroupOptions) (LongTermRetentionBackupsClientGetByResourceGroupResponse, error)
GetByResourceGroup - Gets a long term retention backup. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- locationName - The location of the database.
- longTermRetentionServerName - The name of the server
- longTermRetentionDatabaseName - The name of the database
- backupName - The backup name.
- options - LongTermRetentionBackupsClientGetByResourceGroupOptions contains the optional parameters for the LongTermRetentionBackupsClient.GetByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewLongTermRetentionBackupsClient().GetByResourceGroup(ctx, "testResourceGroup", "japaneast", "testserver", "testDatabase", "55555555-6666-7777-8888-999999999999;131637960820000000", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.LongTermRetentionBackup = armsql.LongTermRetentionBackup{ // Name: to.Ptr("2017-03-10T08:00:00.000Z;55555555-6666-7777-8888-999999999999;131637960820000000"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase/longTermRetentionBackups/2017-03-10T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2017-09-06T08:00:00.000Z"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-09-06T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase"), // ServerCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ServerName: to.Ptr("testserver"), // }, // } }
Output:
func (*LongTermRetentionBackupsClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *LongTermRetentionBackupsClient) NewListByDatabasePager(locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, options *LongTermRetentionBackupsClientListByDatabaseOptions) *runtime.Pager[LongTermRetentionBackupsClientListByDatabaseResponse]
NewListByDatabasePager - Lists all long term retention backups for a database.
Generated from API version 2021-05-01-preview
- locationName - The location of the database
- longTermRetentionServerName - The name of the server
- longTermRetentionDatabaseName - The name of the database
- options - LongTermRetentionBackupsClientListByDatabaseOptions contains the optional parameters for the LongTermRetentionBackupsClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/LongTermRetentionBackupListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewLongTermRetentionBackupsClient().NewListByDatabasePager("japaneast", "testserver", "testDatabase", &armsql.LongTermRetentionBackupsClientListByDatabaseOptions{OnlyLatestPerDatabase: nil, DatabaseState: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.LongTermRetentionBackupListResult = armsql.LongTermRetentionBackupListResult{ // Value: []*armsql.LongTermRetentionBackup{ // { // Name: to.Ptr("55555555-6666-7777-8888-999999999999;131637960820000000"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-23T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase"), // ServerCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ServerName: to.Ptr("testserver"), // }, // }, // { // Name: to.Ptr("55555555-6666-7777-8888-999999999999;131657960820000000"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131657960820000000"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-30T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase"), // ServerCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ServerName: to.Ptr("testserver"), // }, // }, // { // Name: to.Ptr("55555555-6666-7777-8888-999999999999;131677960820000000"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131677960820000000"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-09-06T08:00:00.000Z"); return t}()), // DatabaseDeletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-09-07T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase"), // ServerCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ServerName: to.Ptr("testserver"), // }, // }}, // } } }
Output:
func (*LongTermRetentionBackupsClient) NewListByLocationPager ¶ added in v0.5.0
func (client *LongTermRetentionBackupsClient) NewListByLocationPager(locationName string, options *LongTermRetentionBackupsClientListByLocationOptions) *runtime.Pager[LongTermRetentionBackupsClientListByLocationResponse]
NewListByLocationPager - Lists the long term retention backups for a given location.
Generated from API version 2021-05-01-preview
- locationName - The location of the database
- options - LongTermRetentionBackupsClientListByLocationOptions contains the optional parameters for the LongTermRetentionBackupsClient.NewListByLocationPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/LongTermRetentionBackupListByLocation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewLongTermRetentionBackupsClient().NewListByLocationPager("japaneast", &armsql.LongTermRetentionBackupsClientListByLocationOptions{OnlyLatestPerDatabase: nil, DatabaseState: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.LongTermRetentionBackupListResult = armsql.LongTermRetentionBackupListResult{ // Value: []*armsql.LongTermRetentionBackup{ // { // Name: to.Ptr("55555555-6666-7777-8888-999999999999;2017-08-23T08:00:00.000Z"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver1/longTermRetentionDatabases/testDatabase1/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-23T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase1"), // ServerCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ServerName: to.Ptr("testserver1"), // }, // }, // { // Name: to.Ptr("12341234-1234-1234-1234-123123123123;2017-08-30T08:00:00.000Z"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver2/longTermRetentionDatabases/testDatabase2/longTermRetentionBackups/12341234-1234-1234-1234-123123123123;131657960820000000"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-30T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase2"), // ServerCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-10T08:00:00.000Z"); return t}()), // ServerName: to.Ptr("testserver2"), // }, // }, // { // Name: to.Ptr("43214321-4321-4321-4321-321321321321;2017-09-06T08:00:00.000Z"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver3/longTermRetentionDatabases/testDatabase3/longTermRetentionBackups/43214321-4321-4321-4321-321321321321;131677960820000000"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-09-06T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase3"), // ServerCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-10T08:00:00.000Z"); return t}()), // ServerName: to.Ptr("testserver3"), // }, // }}, // } } }
Output:
func (*LongTermRetentionBackupsClient) NewListByResourceGroupDatabasePager ¶ added in v0.5.0
func (client *LongTermRetentionBackupsClient) NewListByResourceGroupDatabasePager(resourceGroupName string, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, options *LongTermRetentionBackupsClientListByResourceGroupDatabaseOptions) *runtime.Pager[LongTermRetentionBackupsClientListByResourceGroupDatabaseResponse]
NewListByResourceGroupDatabasePager - Lists all long term retention backups for a database.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- locationName - The location of the database
- longTermRetentionServerName - The name of the server
- longTermRetentionDatabaseName - The name of the database
- options - LongTermRetentionBackupsClientListByResourceGroupDatabaseOptions contains the optional parameters for the LongTermRetentionBackupsClient.NewListByResourceGroupDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewLongTermRetentionBackupsClient().NewListByResourceGroupDatabasePager("testResourceGroup", "japaneast", "testserver", "testDatabase", &armsql.LongTermRetentionBackupsClientListByResourceGroupDatabaseOptions{OnlyLatestPerDatabase: nil, DatabaseState: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.LongTermRetentionBackupListResult = armsql.LongTermRetentionBackupListResult{ // Value: []*armsql.LongTermRetentionBackup{ // { // Name: to.Ptr("55555555-6666-7777-8888-999999999999;131637960820000000"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-23T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase"), // ServerCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ServerName: to.Ptr("testserver"), // }, // }, // { // Name: to.Ptr("55555555-6666-7777-8888-999999999999;131657960820000000"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131657960820000000"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-30T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase"), // ServerCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ServerName: to.Ptr("testserver"), // }, // }, // { // Name: to.Ptr("55555555-6666-7777-8888-999999999999;131677960820000000"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131677960820000000"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-09-06T08:00:00.000Z"); return t}()), // DatabaseDeletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-09-07T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase"), // ServerCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ServerName: to.Ptr("testserver"), // }, // }}, // } } }
Output:
func (*LongTermRetentionBackupsClient) NewListByResourceGroupLocationPager ¶ added in v0.5.0
func (client *LongTermRetentionBackupsClient) NewListByResourceGroupLocationPager(resourceGroupName string, locationName string, options *LongTermRetentionBackupsClientListByResourceGroupLocationOptions) *runtime.Pager[LongTermRetentionBackupsClientListByResourceGroupLocationResponse]
NewListByResourceGroupLocationPager - Lists the long term retention backups for a given location.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- locationName - The location of the database
- options - LongTermRetentionBackupsClientListByResourceGroupLocationOptions contains the optional parameters for the LongTermRetentionBackupsClient.NewListByResourceGroupLocationPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByLocation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewLongTermRetentionBackupsClient().NewListByResourceGroupLocationPager("testResourceGroup", "japaneast", &armsql.LongTermRetentionBackupsClientListByResourceGroupLocationOptions{OnlyLatestPerDatabase: nil, DatabaseState: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.LongTermRetentionBackupListResult = armsql.LongTermRetentionBackupListResult{ // Value: []*armsql.LongTermRetentionBackup{ // { // Name: to.Ptr("55555555-6666-7777-8888-999999999999;2017-08-23T08:00:00.000Z"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver1/longTermRetentionDatabases/testDatabase1/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-23T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase1"), // ServerCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ServerName: to.Ptr("testserver1"), // }, // }, // { // Name: to.Ptr("12341234-1234-1234-1234-123123123123;2017-08-30T08:00:00.000Z"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver2/longTermRetentionDatabases/testDatabase2/longTermRetentionBackups/12341234-1234-1234-1234-123123123123;131657960820000000"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-30T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase2"), // ServerCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-10T08:00:00.000Z"); return t}()), // ServerName: to.Ptr("testserver2"), // }, // }, // { // Name: to.Ptr("43214321-4321-4321-4321-321321321321;2017-09-06T08:00:00.000Z"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver3/longTermRetentionDatabases/testDatabase3/longTermRetentionBackups/43214321-4321-4321-4321-321321321321;131677960820000000"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-09-06T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase3"), // ServerCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-10T08:00:00.000Z"); return t}()), // ServerName: to.Ptr("testserver3"), // }, // }}, // } } }
Output:
func (*LongTermRetentionBackupsClient) NewListByResourceGroupServerPager ¶ added in v0.5.0
func (client *LongTermRetentionBackupsClient) NewListByResourceGroupServerPager(resourceGroupName string, locationName string, longTermRetentionServerName string, options *LongTermRetentionBackupsClientListByResourceGroupServerOptions) *runtime.Pager[LongTermRetentionBackupsClientListByResourceGroupServerResponse]
NewListByResourceGroupServerPager - Lists the long term retention backups for a given server.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- locationName - The location of the database
- longTermRetentionServerName - The name of the server
- options - LongTermRetentionBackupsClientListByResourceGroupServerOptions contains the optional parameters for the LongTermRetentionBackupsClient.NewListByResourceGroupServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewLongTermRetentionBackupsClient().NewListByResourceGroupServerPager("testResourceGroup", "japaneast", "testserver", &armsql.LongTermRetentionBackupsClientListByResourceGroupServerOptions{OnlyLatestPerDatabase: nil, DatabaseState: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.LongTermRetentionBackupListResult = armsql.LongTermRetentionBackupListResult{ // Value: []*armsql.LongTermRetentionBackup{ // { // Name: to.Ptr("55555555-6666-7777-8888-999999999999;131637960820000000"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase1/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-23T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase1"), // ServerCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ServerName: to.Ptr("testserver"), // }, // }, // { // Name: to.Ptr("12341234-1234-1234-1234-123123123123;131657960820000000"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase2/longTermRetentionBackups/12341234-1234-1234-1234-123123123123;131657960820000000"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-30T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase2"), // ServerCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ServerName: to.Ptr("testserver"), // }, // }, // { // Name: to.Ptr("43214321-4321-4321-4321-321321321321;131667960820000000"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase3/longTermRetentionBackups/43214321-4321-4321-4321-321321321321;131677960820000000"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-09-06T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase3"), // ServerCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ServerName: to.Ptr("testserver"), // }, // }}, // } } }
Output:
func (*LongTermRetentionBackupsClient) NewListByServerPager ¶ added in v0.5.0
func (client *LongTermRetentionBackupsClient) NewListByServerPager(locationName string, longTermRetentionServerName string, options *LongTermRetentionBackupsClientListByServerOptions) *runtime.Pager[LongTermRetentionBackupsClientListByServerResponse]
NewListByServerPager - Lists the long term retention backups for a given server.
Generated from API version 2021-05-01-preview
- locationName - The location of the database
- longTermRetentionServerName - The name of the server
- options - LongTermRetentionBackupsClientListByServerOptions contains the optional parameters for the LongTermRetentionBackupsClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/LongTermRetentionBackupListByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewLongTermRetentionBackupsClient().NewListByServerPager("japaneast", "testserver", &armsql.LongTermRetentionBackupsClientListByServerOptions{OnlyLatestPerDatabase: nil, DatabaseState: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.LongTermRetentionBackupListResult = armsql.LongTermRetentionBackupListResult{ // Value: []*armsql.LongTermRetentionBackup{ // { // Name: to.Ptr("55555555-6666-7777-8888-999999999999;131637960820000000"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase1/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-23T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase1"), // ServerCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ServerName: to.Ptr("testserver"), // }, // }, // { // Name: to.Ptr("12341234-1234-1234-1234-123123123123;131657960820000000"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase2/longTermRetentionBackups/12341234-1234-1234-1234-123123123123;131657960820000000"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-30T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase2"), // ServerCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ServerName: to.Ptr("testserver"), // }, // }, // { // Name: to.Ptr("43214321-4321-4321-4321-321321321321;131667960820000000"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/testserver/longTermRetentionDatabases/testDatabase3/longTermRetentionBackups/43214321-4321-4321-4321-321321321321;131677960820000000"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-09-06T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase3"), // ServerCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ServerName: to.Ptr("testserver"), // }, // }}, // } } }
Output:
type LongTermRetentionBackupsClientBeginCopyByResourceGroupOptions ¶ added in v0.3.0
type LongTermRetentionBackupsClientBeginCopyByResourceGroupOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LongTermRetentionBackupsClientBeginCopyByResourceGroupOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginCopyByResourceGroup method.
type LongTermRetentionBackupsClientBeginCopyOptions ¶ added in v0.3.0
type LongTermRetentionBackupsClientBeginCopyOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LongTermRetentionBackupsClientBeginCopyOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginCopy method.
type LongTermRetentionBackupsClientBeginDeleteByResourceGroupOptions ¶ added in v0.3.0
type LongTermRetentionBackupsClientBeginDeleteByResourceGroupOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LongTermRetentionBackupsClientBeginDeleteByResourceGroupOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginDeleteByResourceGroup method.
type LongTermRetentionBackupsClientBeginDeleteOptions ¶ added in v0.3.0
type LongTermRetentionBackupsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LongTermRetentionBackupsClientBeginDeleteOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginDelete method.
type LongTermRetentionBackupsClientBeginUpdateByResourceGroupOptions ¶ added in v0.3.0
type LongTermRetentionBackupsClientBeginUpdateByResourceGroupOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LongTermRetentionBackupsClientBeginUpdateByResourceGroupOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginUpdateByResourceGroup method.
type LongTermRetentionBackupsClientBeginUpdateOptions ¶ added in v0.3.0
type LongTermRetentionBackupsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LongTermRetentionBackupsClientBeginUpdateOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginUpdate method.
type LongTermRetentionBackupsClientCopyByResourceGroupResponse ¶ added in v0.3.0
type LongTermRetentionBackupsClientCopyByResourceGroupResponse struct { // A LongTermRetentionBackup operation result resource. LongTermRetentionBackupOperationResult }
LongTermRetentionBackupsClientCopyByResourceGroupResponse contains the response from method LongTermRetentionBackupsClient.BeginCopyByResourceGroup.
type LongTermRetentionBackupsClientCopyResponse ¶ added in v0.3.0
type LongTermRetentionBackupsClientCopyResponse struct { // A LongTermRetentionBackup operation result resource. LongTermRetentionBackupOperationResult }
LongTermRetentionBackupsClientCopyResponse contains the response from method LongTermRetentionBackupsClient.BeginCopy.
type LongTermRetentionBackupsClientDeleteByResourceGroupResponse ¶ added in v0.3.0
type LongTermRetentionBackupsClientDeleteByResourceGroupResponse struct { }
LongTermRetentionBackupsClientDeleteByResourceGroupResponse contains the response from method LongTermRetentionBackupsClient.BeginDeleteByResourceGroup.
type LongTermRetentionBackupsClientDeleteResponse ¶ added in v0.3.0
type LongTermRetentionBackupsClientDeleteResponse struct { }
LongTermRetentionBackupsClientDeleteResponse contains the response from method LongTermRetentionBackupsClient.BeginDelete.
type LongTermRetentionBackupsClientGetByResourceGroupOptions ¶ added in v0.3.0
type LongTermRetentionBackupsClientGetByResourceGroupOptions struct { }
LongTermRetentionBackupsClientGetByResourceGroupOptions contains the optional parameters for the LongTermRetentionBackupsClient.GetByResourceGroup method.
type LongTermRetentionBackupsClientGetByResourceGroupResponse ¶ added in v0.3.0
type LongTermRetentionBackupsClientGetByResourceGroupResponse struct { // A long term retention backup. LongTermRetentionBackup }
LongTermRetentionBackupsClientGetByResourceGroupResponse contains the response from method LongTermRetentionBackupsClient.GetByResourceGroup.
type LongTermRetentionBackupsClientGetOptions ¶ added in v0.3.0
type LongTermRetentionBackupsClientGetOptions struct { }
LongTermRetentionBackupsClientGetOptions contains the optional parameters for the LongTermRetentionBackupsClient.Get method.
type LongTermRetentionBackupsClientGetResponse ¶ added in v0.3.0
type LongTermRetentionBackupsClientGetResponse struct { // A long term retention backup. LongTermRetentionBackup }
LongTermRetentionBackupsClientGetResponse contains the response from method LongTermRetentionBackupsClient.Get.
type LongTermRetentionBackupsClientListByDatabaseOptions ¶ added in v0.3.0
type LongTermRetentionBackupsClientListByDatabaseOptions struct { // Whether to query against just live databases, just deleted databases, or all databases. DatabaseState *DatabaseState // Whether or not to only get the latest backup for each database. OnlyLatestPerDatabase *bool }
LongTermRetentionBackupsClientListByDatabaseOptions contains the optional parameters for the LongTermRetentionBackupsClient.NewListByDatabasePager method.
type LongTermRetentionBackupsClientListByDatabaseResponse ¶ added in v0.3.0
type LongTermRetentionBackupsClientListByDatabaseResponse struct { // A list of long term retention backups. LongTermRetentionBackupListResult }
LongTermRetentionBackupsClientListByDatabaseResponse contains the response from method LongTermRetentionBackupsClient.NewListByDatabasePager.
type LongTermRetentionBackupsClientListByLocationOptions ¶ added in v0.3.0
type LongTermRetentionBackupsClientListByLocationOptions struct { // Whether to query against just live databases, just deleted databases, or all databases. DatabaseState *DatabaseState // Whether or not to only get the latest backup for each database. OnlyLatestPerDatabase *bool }
LongTermRetentionBackupsClientListByLocationOptions contains the optional parameters for the LongTermRetentionBackupsClient.NewListByLocationPager method.
type LongTermRetentionBackupsClientListByLocationResponse ¶ added in v0.3.0
type LongTermRetentionBackupsClientListByLocationResponse struct { // A list of long term retention backups. LongTermRetentionBackupListResult }
LongTermRetentionBackupsClientListByLocationResponse contains the response from method LongTermRetentionBackupsClient.NewListByLocationPager.
type LongTermRetentionBackupsClientListByResourceGroupDatabaseOptions ¶ added in v0.3.0
type LongTermRetentionBackupsClientListByResourceGroupDatabaseOptions struct { // Whether to query against just live databases, just deleted databases, or all databases. DatabaseState *DatabaseState // Whether or not to only get the latest backup for each database. OnlyLatestPerDatabase *bool }
LongTermRetentionBackupsClientListByResourceGroupDatabaseOptions contains the optional parameters for the LongTermRetentionBackupsClient.NewListByResourceGroupDatabasePager method.
type LongTermRetentionBackupsClientListByResourceGroupDatabaseResponse ¶ added in v0.3.0
type LongTermRetentionBackupsClientListByResourceGroupDatabaseResponse struct { // A list of long term retention backups. LongTermRetentionBackupListResult }
LongTermRetentionBackupsClientListByResourceGroupDatabaseResponse contains the response from method LongTermRetentionBackupsClient.NewListByResourceGroupDatabasePager.
type LongTermRetentionBackupsClientListByResourceGroupLocationOptions ¶ added in v0.3.0
type LongTermRetentionBackupsClientListByResourceGroupLocationOptions struct { // Whether to query against just live databases, just deleted databases, or all databases. DatabaseState *DatabaseState // Whether or not to only get the latest backup for each database. OnlyLatestPerDatabase *bool }
LongTermRetentionBackupsClientListByResourceGroupLocationOptions contains the optional parameters for the LongTermRetentionBackupsClient.NewListByResourceGroupLocationPager method.
type LongTermRetentionBackupsClientListByResourceGroupLocationResponse ¶ added in v0.3.0
type LongTermRetentionBackupsClientListByResourceGroupLocationResponse struct { // A list of long term retention backups. LongTermRetentionBackupListResult }
LongTermRetentionBackupsClientListByResourceGroupLocationResponse contains the response from method LongTermRetentionBackupsClient.NewListByResourceGroupLocationPager.
type LongTermRetentionBackupsClientListByResourceGroupServerOptions ¶ added in v0.3.0
type LongTermRetentionBackupsClientListByResourceGroupServerOptions struct { // Whether to query against just live databases, just deleted databases, or all databases. DatabaseState *DatabaseState // Whether or not to only get the latest backup for each database. OnlyLatestPerDatabase *bool }
LongTermRetentionBackupsClientListByResourceGroupServerOptions contains the optional parameters for the LongTermRetentionBackupsClient.NewListByResourceGroupServerPager method.
type LongTermRetentionBackupsClientListByResourceGroupServerResponse ¶ added in v0.3.0
type LongTermRetentionBackupsClientListByResourceGroupServerResponse struct { // A list of long term retention backups. LongTermRetentionBackupListResult }
LongTermRetentionBackupsClientListByResourceGroupServerResponse contains the response from method LongTermRetentionBackupsClient.NewListByResourceGroupServerPager.
type LongTermRetentionBackupsClientListByServerOptions ¶ added in v0.3.0
type LongTermRetentionBackupsClientListByServerOptions struct { // Whether to query against just live databases, just deleted databases, or all databases. DatabaseState *DatabaseState // Whether or not to only get the latest backup for each database. OnlyLatestPerDatabase *bool }
LongTermRetentionBackupsClientListByServerOptions contains the optional parameters for the LongTermRetentionBackupsClient.NewListByServerPager method.
type LongTermRetentionBackupsClientListByServerResponse ¶ added in v0.3.0
type LongTermRetentionBackupsClientListByServerResponse struct { // A list of long term retention backups. LongTermRetentionBackupListResult }
LongTermRetentionBackupsClientListByServerResponse contains the response from method LongTermRetentionBackupsClient.NewListByServerPager.
type LongTermRetentionBackupsClientUpdateByResourceGroupResponse ¶ added in v0.3.0
type LongTermRetentionBackupsClientUpdateByResourceGroupResponse struct { // A LongTermRetentionBackup operation result resource. LongTermRetentionBackupOperationResult }
LongTermRetentionBackupsClientUpdateByResourceGroupResponse contains the response from method LongTermRetentionBackupsClient.BeginUpdateByResourceGroup.
type LongTermRetentionBackupsClientUpdateResponse ¶ added in v0.3.0
type LongTermRetentionBackupsClientUpdateResponse struct { // A LongTermRetentionBackup operation result resource. LongTermRetentionBackupOperationResult }
LongTermRetentionBackupsClientUpdateResponse contains the response from method LongTermRetentionBackupsClient.BeginUpdate.
type LongTermRetentionManagedInstanceBackupsClient ¶
type LongTermRetentionManagedInstanceBackupsClient struct {
// contains filtered or unexported fields
}
LongTermRetentionManagedInstanceBackupsClient contains the methods for the LongTermRetentionManagedInstanceBackups group. Don't use this type directly, use NewLongTermRetentionManagedInstanceBackupsClient() instead.
func NewLongTermRetentionManagedInstanceBackupsClient ¶
func NewLongTermRetentionManagedInstanceBackupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LongTermRetentionManagedInstanceBackupsClient, error)
NewLongTermRetentionManagedInstanceBackupsClient creates a new instance of LongTermRetentionManagedInstanceBackupsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*LongTermRetentionManagedInstanceBackupsClient) BeginDelete ¶
func (client *LongTermRetentionManagedInstanceBackupsClient) BeginDelete(ctx context.Context, locationName string, managedInstanceName string, databaseName string, backupName string, options *LongTermRetentionManagedInstanceBackupsClientBeginDeleteOptions) (*runtime.Poller[LongTermRetentionManagedInstanceBackupsClientDeleteResponse], error)
BeginDelete - Deletes a long term retention backup. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- locationName - The location of the database.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the managed database.
- backupName - The backup name.
- options - LongTermRetentionManagedInstanceBackupsClientBeginDeleteOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewLongTermRetentionManagedInstanceBackupsClient().BeginDelete(ctx, "japaneast", "testInstance", "testDatabase", "55555555-6666-7777-8888-999999999999;131637960820000000", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*LongTermRetentionManagedInstanceBackupsClient) BeginDeleteByResourceGroup ¶
func (client *LongTermRetentionManagedInstanceBackupsClient) BeginDeleteByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, managedInstanceName string, databaseName string, backupName string, options *LongTermRetentionManagedInstanceBackupsClientBeginDeleteByResourceGroupOptions) (*runtime.Poller[LongTermRetentionManagedInstanceBackupsClientDeleteByResourceGroupResponse], error)
BeginDeleteByResourceGroup - Deletes a long term retention backup. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- locationName - The location of the database
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the managed database.
- backupName - The backup name.
- options - LongTermRetentionManagedInstanceBackupsClientBeginDeleteByResourceGroupOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.BeginDeleteByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewLongTermRetentionManagedInstanceBackupsClient().BeginDeleteByResourceGroup(ctx, "testResourceGroup", "japaneast", "testInstance", "testDatabase", "55555555-6666-7777-8888-999999999999;131637960820000000", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*LongTermRetentionManagedInstanceBackupsClient) Get ¶
func (client *LongTermRetentionManagedInstanceBackupsClient) Get(ctx context.Context, locationName string, managedInstanceName string, databaseName string, backupName string, options *LongTermRetentionManagedInstanceBackupsClientGetOptions) (LongTermRetentionManagedInstanceBackupsClientGetResponse, error)
Get - Gets a long term retention backup for a managed database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- locationName - The location of the database.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the managed database.
- backupName - The backup name.
- options - LongTermRetentionManagedInstanceBackupsClientGetOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewLongTermRetentionManagedInstanceBackupsClient().Get(ctx, "japaneast", "testInstance", "testDatabase", "55555555-6666-7777-8888-999999999999;131637960820000000", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstanceLongTermRetentionBackup = armsql.ManagedInstanceLongTermRetentionBackup{ // Name: to.Ptr("55555555-6666-7777-8888-999999999999;131637960820000000"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/Locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase/longTermRetentionManagedInstanceBackups/55555555-6666-7777-8888-999999999999;131637960820000000"), // Properties: &armsql.ManagedInstanceLongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-23T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase"), // ManagedInstanceCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-09-01T08:00:00.000Z"); return t}()), // ManagedInstanceName: to.Ptr("testInstance"), // }, // } }
Output:
func (*LongTermRetentionManagedInstanceBackupsClient) GetByResourceGroup ¶
func (client *LongTermRetentionManagedInstanceBackupsClient) GetByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, managedInstanceName string, databaseName string, backupName string, options *LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupOptions) (LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupResponse, error)
GetByResourceGroup - Gets a long term retention backup for a managed database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- locationName - The location of the database.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the managed database.
- backupName - The backup name.
- options - LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.GetByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewLongTermRetentionManagedInstanceBackupsClient().GetByResourceGroup(ctx, "testResourceGroup", "japaneast", "testInstance", "testDatabase", "55555555-6666-7777-8888-999999999999;131637960820000000", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstanceLongTermRetentionBackup = armsql.ManagedInstanceLongTermRetentionBackup{ // Name: to.Ptr("55555555-6666-7777-8888-999999999999;131637960820000000"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/Locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase/longTermRetentionManagedInstanceBackups/55555555-6666-7777-8888-999999999999;131637960820000000"), // Properties: &armsql.ManagedInstanceLongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-09-06T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase"), // ManagedInstanceCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ManagedInstanceName: to.Ptr("testInstance"), // }, // } }
Output:
func (*LongTermRetentionManagedInstanceBackupsClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *LongTermRetentionManagedInstanceBackupsClient) NewListByDatabasePager(locationName string, managedInstanceName string, databaseName string, options *LongTermRetentionManagedInstanceBackupsClientListByDatabaseOptions) *runtime.Pager[LongTermRetentionManagedInstanceBackupsClientListByDatabaseResponse]
NewListByDatabasePager - Lists all long term retention backups for a managed database.
Generated from API version 2021-05-01-preview
- locationName - The location of the database.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the managed database.
- options - LongTermRetentionManagedInstanceBackupsClientListByDatabaseOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewLongTermRetentionManagedInstanceBackupsClient().NewListByDatabasePager("japaneast", "testInstance", "testDatabase", &armsql.LongTermRetentionManagedInstanceBackupsClientListByDatabaseOptions{OnlyLatestPerDatabase: nil, DatabaseState: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedInstanceLongTermRetentionBackupListResult = armsql.ManagedInstanceLongTermRetentionBackupListResult{ // Value: []*armsql.ManagedInstanceLongTermRetentionBackup{ // { // Name: to.Ptr("2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-08-23T08:00:00.000Z"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/Locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase/longTermRetentionManagedInstanceBackups/2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-08-23T08:00:00.000Z"), // Properties: &armsql.ManagedInstanceLongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-23T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase"), // ManagedInstanceCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ManagedInstanceName: to.Ptr("testInstance"), // }, // }, // { // Name: to.Ptr("2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-08-30T08:00:00.000Z"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/Locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase/longTermRetentionManagedInstanceBackups/2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-08-30T08:00:00.000Z"), // Properties: &armsql.ManagedInstanceLongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-30T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase"), // ManagedInstanceCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ManagedInstanceName: to.Ptr("testInstance"), // }, // }, // { // Name: to.Ptr("2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-09-06T08:00:00.000Z"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/Locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase/longTermRetentionManagedInstanceBackups/2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-09-06T08:00:00.000Z"), // Properties: &armsql.ManagedInstanceLongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-09-06T08:00:00.000Z"); return t}()), // DatabaseDeletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-09-07T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase"), // ManagedInstanceCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ManagedInstanceName: to.Ptr("testInstance"), // }, // }}, // } } }
Output:
func (*LongTermRetentionManagedInstanceBackupsClient) NewListByInstancePager ¶ added in v0.5.0
func (client *LongTermRetentionManagedInstanceBackupsClient) NewListByInstancePager(locationName string, managedInstanceName string, options *LongTermRetentionManagedInstanceBackupsClientListByInstanceOptions) *runtime.Pager[LongTermRetentionManagedInstanceBackupsClientListByInstanceResponse]
NewListByInstancePager - Lists the long term retention backups for a given managed instance.
Generated from API version 2021-05-01-preview
- locationName - The location of the database
- managedInstanceName - The name of the managed instance.
- options - LongTermRetentionManagedInstanceBackupsClientListByInstanceOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.NewListByInstancePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewLongTermRetentionManagedInstanceBackupsClient().NewListByInstancePager("japaneast", "testInstance", &armsql.LongTermRetentionManagedInstanceBackupsClientListByInstanceOptions{OnlyLatestPerDatabase: nil, DatabaseState: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedInstanceLongTermRetentionBackupListResult = armsql.ManagedInstanceLongTermRetentionBackupListResult{ // Value: []*armsql.ManagedInstanceLongTermRetentionBackup{ // { // Name: to.Ptr("55555555-6666-7777-8888-999999999999;131637960820000000"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase1/longTermRetentionManagedInstanceBackups/55555555-6666-7777-8888-999999999999;131637960820000000"), // Properties: &armsql.ManagedInstanceLongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-23T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase1"), // ManagedInstanceCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ManagedInstanceName: to.Ptr("testInstance"), // }, // }, // { // Name: to.Ptr("12341234-1234-1234-1234-123123123123;131657960820000000"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase2/longTermRetentionManagedInstanceBackups/12341234-1234-1234-1234-123123123123;131657960820000000"), // Properties: &armsql.ManagedInstanceLongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-30T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase2"), // ManagedInstanceCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ManagedInstanceName: to.Ptr("testInstance"), // }, // }, // { // Name: to.Ptr("43214321-4321-4321-4321-321321321321;131667960820000000"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase3/longTermRetentionManagedInstanceBackups/43214321-4321-4321-4321-321321321321;131677960820000000"), // Properties: &armsql.ManagedInstanceLongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-09-06T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase3"), // ManagedInstanceCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ManagedInstanceName: to.Ptr("testInstance"), // }, // }}, // } } }
Output:
func (*LongTermRetentionManagedInstanceBackupsClient) NewListByLocationPager ¶ added in v0.5.0
func (client *LongTermRetentionManagedInstanceBackupsClient) NewListByLocationPager(locationName string, options *LongTermRetentionManagedInstanceBackupsClientListByLocationOptions) *runtime.Pager[LongTermRetentionManagedInstanceBackupsClientListByLocationResponse]
NewListByLocationPager - Lists the long term retention backups for managed databases in a given location.
Generated from API version 2021-05-01-preview
- locationName - The location of the database.
- options - LongTermRetentionManagedInstanceBackupsClientListByLocationOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.NewListByLocationPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByLocation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewLongTermRetentionManagedInstanceBackupsClient().NewListByLocationPager("japaneast", &armsql.LongTermRetentionManagedInstanceBackupsClientListByLocationOptions{OnlyLatestPerDatabase: nil, DatabaseState: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedInstanceLongTermRetentionBackupListResult = armsql.ManagedInstanceLongTermRetentionBackupListResult{ // Value: []*armsql.ManagedInstanceLongTermRetentionBackup{ // { // Name: to.Ptr("55555555-6666-7777-8888-999999999999;2017-08-23T08:00:00.000Z"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testserver1/longTermRetentionDatabases/testDatabase1/longTermRetentionManagedInstanceBackups/55555555-6666-7777-8888-999999999999;131637960820000000"), // Properties: &armsql.ManagedInstanceLongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-23T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase1"), // ManagedInstanceCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ManagedInstanceName: to.Ptr("testInstance1"), // }, // }, // { // Name: to.Ptr("12341234-1234-1234-1234-123123123123;2017-08-30T08:00:00.000Z"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testserver2/longTermRetentionDatabases/testDatabase2/longTermRetentionManagedInstanceBackups/12341234-1234-1234-1234-123123123123;131657960820000000"), // Properties: &armsql.ManagedInstanceLongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-30T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase2"), // ManagedInstanceCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-10T08:00:00.000Z"); return t}()), // ManagedInstanceName: to.Ptr("testInstance2"), // }, // }, // { // Name: to.Ptr("43214321-4321-4321-4321-321321321321;2017-09-06T08:00:00.000Z"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testserver3/longTermRetentionDatabases/testDatabase3/longTermRetentionManagedInstanceBackups/43214321-4321-4321-4321-321321321321;131677960820000000"), // Properties: &armsql.ManagedInstanceLongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-09-06T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase3"), // ManagedInstanceCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-10T08:00:00.000Z"); return t}()), // ManagedInstanceName: to.Ptr("testInstance3"), // }, // }}, // } } }
Output:
func (*LongTermRetentionManagedInstanceBackupsClient) NewListByResourceGroupDatabasePager ¶ added in v0.5.0
func (client *LongTermRetentionManagedInstanceBackupsClient) NewListByResourceGroupDatabasePager(resourceGroupName string, locationName string, managedInstanceName string, databaseName string, options *LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseOptions) *runtime.Pager[LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseResponse]
NewListByResourceGroupDatabasePager - Lists all long term retention backups for a managed database.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- locationName - The location of the database
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the managed database.
- options - LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.NewListByResourceGroupDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewLongTermRetentionManagedInstanceBackupsClient().NewListByResourceGroupDatabasePager("testResourceGroup", "japaneast", "testInstance", "testDatabase", &armsql.LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseOptions{OnlyLatestPerDatabase: nil, DatabaseState: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedInstanceLongTermRetentionBackupListResult = armsql.ManagedInstanceLongTermRetentionBackupListResult{ // Value: []*armsql.ManagedInstanceLongTermRetentionBackup{ // { // Name: to.Ptr("2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-08-23T08:00:00.000Z"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/Locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase/longTermRetentionManagedInstanceBackups/2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-08-23T08:00:00.000Z"), // Properties: &armsql.ManagedInstanceLongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-23T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase"), // ManagedInstanceCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ManagedInstanceName: to.Ptr("testInstance"), // }, // }, // { // Name: to.Ptr("2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-08-30T08:00:00.000Z"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/Locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase/longTermRetentionManagedInstanceBackups/2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-08-30T08:00:00.000Z"), // Properties: &armsql.ManagedInstanceLongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-08-30T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase"), // ManagedInstanceCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ManagedInstanceName: to.Ptr("testInstance"), // }, // }, // { // Name: to.Ptr("2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-09-06T08:00:00.000Z"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/Locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase/longTermRetentionManagedInstanceBackups/2018-06-01T08:00:00.000Z;55555555-6666-7777-8888-999999999999;2018-09-06T08:00:00.000Z"), // Properties: &armsql.ManagedInstanceLongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-09-06T08:00:00.000Z"); return t}()), // DatabaseDeletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-09-07T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase"), // ManagedInstanceCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-10T08:00:00.000Z"); return t}()), // ManagedInstanceName: to.Ptr("testInstance"), // }, // }}, // } } }
Output:
func (*LongTermRetentionManagedInstanceBackupsClient) NewListByResourceGroupInstancePager ¶ added in v0.5.0
func (client *LongTermRetentionManagedInstanceBackupsClient) NewListByResourceGroupInstancePager(resourceGroupName string, locationName string, managedInstanceName string, options *LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceOptions) *runtime.Pager[LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceResponse]
NewListByResourceGroupInstancePager - Lists the long term retention backups for a given managed instance.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- locationName - The location of the database.
- managedInstanceName - The name of the managed instance.
- options - LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.NewListByResourceGroupInstancePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewLongTermRetentionManagedInstanceBackupsClient().NewListByResourceGroupInstancePager("testResourceGroup", "japaneast", "testInstance", &armsql.LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceOptions{OnlyLatestPerDatabase: nil, DatabaseState: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedInstanceLongTermRetentionBackupListResult = armsql.ManagedInstanceLongTermRetentionBackupListResult{ // Value: []*armsql.ManagedInstanceLongTermRetentionBackup{ // { // Name: to.Ptr("55555555-6666-7777-8888-999999999999;131637960820000000"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase1/longTermRetentionManagedInstanceBackups/55555555-6666-7777-8888-999999999999;131637960820000000"), // Properties: &armsql.ManagedInstanceLongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-23T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase1"), // ManagedInstanceCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ManagedInstanceName: to.Ptr("testInstance"), // }, // }, // { // Name: to.Ptr("12341234-1234-1234-1234-123123123123;131657960820000000"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase2/longTermRetentionManagedInstanceBackups/12341234-1234-1234-1234-123123123123;131657960820000000"), // Properties: &armsql.ManagedInstanceLongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-30T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase2"), // ManagedInstanceCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ManagedInstanceName: to.Ptr("testInstance"), // }, // }, // { // Name: to.Ptr("43214321-4321-4321-4321-321321321321;131667960820000000"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance/longTermRetentionDatabases/testDatabase3/longTermRetentionManagedInstanceBackups/43214321-4321-4321-4321-321321321321;131677960820000000"), // Properties: &armsql.ManagedInstanceLongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-09-06T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase3"), // ManagedInstanceCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ManagedInstanceName: to.Ptr("testInstance"), // }, // }}, // } } }
Output:
func (*LongTermRetentionManagedInstanceBackupsClient) NewListByResourceGroupLocationPager ¶ added in v0.5.0
func (client *LongTermRetentionManagedInstanceBackupsClient) NewListByResourceGroupLocationPager(resourceGroupName string, locationName string, options *LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationOptions) *runtime.Pager[LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationResponse]
NewListByResourceGroupLocationPager - Lists the long term retention backups for managed databases in a given location.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- locationName - The location of the database.
- options - LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.NewListByResourceGroupLocationPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByLocation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewLongTermRetentionManagedInstanceBackupsClient().NewListByResourceGroupLocationPager("testResourceGroup", "japaneast", &armsql.LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationOptions{OnlyLatestPerDatabase: nil, DatabaseState: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedInstanceLongTermRetentionBackupListResult = armsql.ManagedInstanceLongTermRetentionBackupListResult{ // Value: []*armsql.ManagedInstanceLongTermRetentionBackup{ // { // Name: to.Ptr("55555555-6666-7777-8888-999999999999;2017-08-23T08:00:00.000Z"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance1/longTermRetentionDatabases/testDatabase1/longTermRetentionManagedInstanceBackups/55555555-6666-7777-8888-999999999999;131637960820000000"), // Properties: &armsql.ManagedInstanceLongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-23T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase1"), // ManagedInstanceCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // ManagedInstanceName: to.Ptr("testInstance1"), // }, // }, // { // Name: to.Ptr("12341234-1234-1234-1234-123123123123;2017-08-30T08:00:00.000Z"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance2/longTermRetentionDatabases/testDatabase2/longTermRetentionManagedInstanceBackups/12341234-1234-1234-1234-123123123123;131657960820000000"), // Properties: &armsql.ManagedInstanceLongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-30T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase2"), // ManagedInstanceCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-10T08:00:00.000Z"); return t}()), // ManagedInstanceName: to.Ptr("testInstance2"), // }, // }, // { // Name: to.Ptr("43214321-4321-4321-4321-321321321321;2017-09-06T08:00:00.000Z"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionManagedInstances/longTermRetentionDatabases/longTermRetentionManagedInstanceBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/locations/japaneast/longTermRetentionManagedInstances/testInstance3/longTermRetentionDatabases/testDatabase3/longTermRetentionManagedInstanceBackups/43214321-4321-4321-4321-321321321321;131677960820000000"), // Properties: &armsql.ManagedInstanceLongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-09-06T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("testDatabase3"), // ManagedInstanceCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-10T08:00:00.000Z"); return t}()), // ManagedInstanceName: to.Ptr("testInstance3"), // }, // }}, // } } }
Output:
type LongTermRetentionManagedInstanceBackupsClientBeginDeleteByResourceGroupOptions ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientBeginDeleteByResourceGroupOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LongTermRetentionManagedInstanceBackupsClientBeginDeleteByResourceGroupOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.BeginDeleteByResourceGroup method.
type LongTermRetentionManagedInstanceBackupsClientBeginDeleteOptions ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LongTermRetentionManagedInstanceBackupsClientBeginDeleteOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.BeginDelete method.
type LongTermRetentionManagedInstanceBackupsClientDeleteByResourceGroupResponse ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientDeleteByResourceGroupResponse struct { }
LongTermRetentionManagedInstanceBackupsClientDeleteByResourceGroupResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.BeginDeleteByResourceGroup.
type LongTermRetentionManagedInstanceBackupsClientDeleteResponse ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientDeleteResponse struct { }
LongTermRetentionManagedInstanceBackupsClientDeleteResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.BeginDelete.
type LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupOptions ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupOptions struct { }
LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.GetByResourceGroup method.
type LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupResponse ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupResponse struct { // A long term retention backup for a managed database. ManagedInstanceLongTermRetentionBackup }
LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.GetByResourceGroup.
type LongTermRetentionManagedInstanceBackupsClientGetOptions ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientGetOptions struct { }
LongTermRetentionManagedInstanceBackupsClientGetOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.Get method.
type LongTermRetentionManagedInstanceBackupsClientGetResponse ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientGetResponse struct { // A long term retention backup for a managed database. ManagedInstanceLongTermRetentionBackup }
LongTermRetentionManagedInstanceBackupsClientGetResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.Get.
type LongTermRetentionManagedInstanceBackupsClientListByDatabaseOptions ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientListByDatabaseOptions struct { // Whether to query against just live databases, just deleted databases, or all databases. DatabaseState *DatabaseState // Whether or not to only get the latest backup for each database. OnlyLatestPerDatabase *bool }
LongTermRetentionManagedInstanceBackupsClientListByDatabaseOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.NewListByDatabasePager method.
type LongTermRetentionManagedInstanceBackupsClientListByDatabaseResponse ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientListByDatabaseResponse struct { // A list of long term retention backups for managed database(s). ManagedInstanceLongTermRetentionBackupListResult }
LongTermRetentionManagedInstanceBackupsClientListByDatabaseResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.NewListByDatabasePager.
type LongTermRetentionManagedInstanceBackupsClientListByInstanceOptions ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientListByInstanceOptions struct { // Whether to query against just live databases, just deleted databases, or all databases. DatabaseState *DatabaseState // Whether or not to only get the latest backup for each database. OnlyLatestPerDatabase *bool }
LongTermRetentionManagedInstanceBackupsClientListByInstanceOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.NewListByInstancePager method.
type LongTermRetentionManagedInstanceBackupsClientListByInstanceResponse ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientListByInstanceResponse struct { // A list of long term retention backups for managed database(s). ManagedInstanceLongTermRetentionBackupListResult }
LongTermRetentionManagedInstanceBackupsClientListByInstanceResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.NewListByInstancePager.
type LongTermRetentionManagedInstanceBackupsClientListByLocationOptions ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientListByLocationOptions struct { // Whether to query against just live databases, just deleted databases, or all databases. DatabaseState *DatabaseState // Whether or not to only get the latest backup for each database. OnlyLatestPerDatabase *bool }
LongTermRetentionManagedInstanceBackupsClientListByLocationOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.NewListByLocationPager method.
type LongTermRetentionManagedInstanceBackupsClientListByLocationResponse ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientListByLocationResponse struct { // A list of long term retention backups for managed database(s). ManagedInstanceLongTermRetentionBackupListResult }
LongTermRetentionManagedInstanceBackupsClientListByLocationResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.NewListByLocationPager.
type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseOptions ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseOptions struct { // Whether to query against just live databases, just deleted databases, or all databases. DatabaseState *DatabaseState // Whether or not to only get the latest backup for each database. OnlyLatestPerDatabase *bool }
LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.NewListByResourceGroupDatabasePager method.
type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseResponse ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseResponse struct { // A list of long term retention backups for managed database(s). ManagedInstanceLongTermRetentionBackupListResult }
LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.NewListByResourceGroupDatabasePager.
type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceOptions ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceOptions struct { // Whether to query against just live databases, just deleted databases, or all databases. DatabaseState *DatabaseState // Whether or not to only get the latest backup for each database. OnlyLatestPerDatabase *bool }
LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.NewListByResourceGroupInstancePager method.
type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceResponse ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceResponse struct { // A list of long term retention backups for managed database(s). ManagedInstanceLongTermRetentionBackupListResult }
LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.NewListByResourceGroupInstancePager.
type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationOptions ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationOptions struct { // Whether to query against just live databases, just deleted databases, or all databases. DatabaseState *DatabaseState // Whether or not to only get the latest backup for each database. OnlyLatestPerDatabase *bool }
LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.NewListByResourceGroupLocationPager method.
type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationResponse ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationResponse struct { // A list of long term retention backups for managed database(s). ManagedInstanceLongTermRetentionBackupListResult }
LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.NewListByResourceGroupLocationPager.
type LongTermRetentionOperationResultProperties ¶
type LongTermRetentionOperationResultProperties struct { // READ-ONLY; Source backup resource id FromBackupResourceID *string // READ-ONLY; Progress message Message *string // READ-ONLY; Operation type. OperationType *string // READ-ONLY; Request Id. RequestID *string // READ-ONLY; Operation status Status *string // READ-ONLY; The storage redundancy type of the copied backup TargetBackupStorageRedundancy *BackupStorageRedundancy // READ-ONLY; Target backup resource id ToBackupResourceID *string }
LongTermRetentionOperationResultProperties - Contains the operation result properties for long term retention backup operation.
func (LongTermRetentionOperationResultProperties) MarshalJSON ¶ added in v1.1.0
func (l LongTermRetentionOperationResultProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LongTermRetentionOperationResultProperties.
func (*LongTermRetentionOperationResultProperties) UnmarshalJSON ¶ added in v1.1.0
func (l *LongTermRetentionOperationResultProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LongTermRetentionOperationResultProperties.
type LongTermRetentionPoliciesClient ¶
type LongTermRetentionPoliciesClient struct {
// contains filtered or unexported fields
}
LongTermRetentionPoliciesClient contains the methods for the LongTermRetentionPolicies group. Don't use this type directly, use NewLongTermRetentionPoliciesClient() instead.
func NewLongTermRetentionPoliciesClient ¶
func NewLongTermRetentionPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LongTermRetentionPoliciesClient, error)
NewLongTermRetentionPoliciesClient creates a new instance of LongTermRetentionPoliciesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*LongTermRetentionPoliciesClient) BeginCreateOrUpdate ¶
func (client *LongTermRetentionPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, policyName LongTermRetentionPolicyName, parameters LongTermRetentionPolicy, options *LongTermRetentionPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[LongTermRetentionPoliciesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Sets a database's long term retention policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- policyName - The policy name. Should always be Default.
- parameters - The long term retention policy info.
- options - LongTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the LongTermRetentionPoliciesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/LongTermRetentionPolicyCreateOrUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewLongTermRetentionPoliciesClient().BeginCreateOrUpdate(ctx, "resourceGroup", "testserver", "testDatabase", armsql.LongTermRetentionPolicyNameDefault, armsql.LongTermRetentionPolicy{ Properties: &armsql.BaseLongTermRetentionPolicyProperties{ MonthlyRetention: to.Ptr("P1Y"), WeekOfYear: to.Ptr[int32](5), WeeklyRetention: to.Ptr("P1M"), YearlyRetention: to.Ptr("P5Y"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.LongTermRetentionPolicy = armsql.LongTermRetentionPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/resourceGroups/servers/databases/backupLongTermRetentionPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testserver/databases/testDatabase/backupLongTermRetentionPolicies/default"), // Properties: &armsql.BaseLongTermRetentionPolicyProperties{ // MonthlyRetention: to.Ptr("P1Y"), // WeekOfYear: to.Ptr[int32](5), // WeeklyRetention: to.Ptr("P1M"), // YearlyRetention: to.Ptr("P5Y"), // }, // } }
Output:
func (*LongTermRetentionPoliciesClient) Get ¶
func (client *LongTermRetentionPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, policyName LongTermRetentionPolicyName, options *LongTermRetentionPoliciesClientGetOptions) (LongTermRetentionPoliciesClientGetResponse, error)
Get - Gets a database's long term retention policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- policyName - The policy name. Should always be Default.
- options - LongTermRetentionPoliciesClientGetOptions contains the optional parameters for the LongTermRetentionPoliciesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/LongTermRetentionPolicyGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewLongTermRetentionPoliciesClient().Get(ctx, "resourceGroup", "testserver", "testDatabase", armsql.LongTermRetentionPolicyNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.LongTermRetentionPolicy = armsql.LongTermRetentionPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/resourceGroups/servers/databases/backupLongTermRetentionPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testserver/databases/testDatabase/backupLongTermRetentionPolicies/default"), // Properties: &armsql.BaseLongTermRetentionPolicyProperties{ // MonthlyRetention: to.Ptr("P1Y"), // WeekOfYear: to.Ptr[int32](5), // WeeklyRetention: to.Ptr("P1M"), // YearlyRetention: to.Ptr("P5Y"), // }, // } }
Output:
func (*LongTermRetentionPoliciesClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *LongTermRetentionPoliciesClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *LongTermRetentionPoliciesClientListByDatabaseOptions) *runtime.Pager[LongTermRetentionPoliciesClientListByDatabaseResponse]
NewListByDatabasePager - Gets a database's long term retention policy.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - LongTermRetentionPoliciesClientListByDatabaseOptions contains the optional parameters for the LongTermRetentionPoliciesClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/LongTermRetentionPolicyListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewLongTermRetentionPoliciesClient().NewListByDatabasePager("resourceGroup", "testserver", "testDatabase", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.LongTermRetentionPolicyListResult = armsql.LongTermRetentionPolicyListResult{ // Value: []*armsql.LongTermRetentionPolicy{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/resourceGroups/servers/databases/backupLongTermRetentionPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/resourceGroup/servers/testserver/databases/testDatabase/backupLongTermRetentionPolicies/default"), // Properties: &armsql.BaseLongTermRetentionPolicyProperties{ // MonthlyRetention: to.Ptr("P1Y"), // WeekOfYear: to.Ptr[int32](5), // WeeklyRetention: to.Ptr("P1M"), // YearlyRetention: to.Ptr("P5Y"), // }, // }}, // } } }
Output:
type LongTermRetentionPoliciesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type LongTermRetentionPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LongTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the LongTermRetentionPoliciesClient.BeginCreateOrUpdate method.
type LongTermRetentionPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type LongTermRetentionPoliciesClientCreateOrUpdateResponse struct { // A long term retention policy. LongTermRetentionPolicy }
LongTermRetentionPoliciesClientCreateOrUpdateResponse contains the response from method LongTermRetentionPoliciesClient.BeginCreateOrUpdate.
type LongTermRetentionPoliciesClientGetOptions ¶ added in v0.3.0
type LongTermRetentionPoliciesClientGetOptions struct { }
LongTermRetentionPoliciesClientGetOptions contains the optional parameters for the LongTermRetentionPoliciesClient.Get method.
type LongTermRetentionPoliciesClientGetResponse ¶ added in v0.3.0
type LongTermRetentionPoliciesClientGetResponse struct { // A long term retention policy. LongTermRetentionPolicy }
LongTermRetentionPoliciesClientGetResponse contains the response from method LongTermRetentionPoliciesClient.Get.
type LongTermRetentionPoliciesClientListByDatabaseOptions ¶ added in v0.3.0
type LongTermRetentionPoliciesClientListByDatabaseOptions struct { }
LongTermRetentionPoliciesClientListByDatabaseOptions contains the optional parameters for the LongTermRetentionPoliciesClient.NewListByDatabasePager method.
type LongTermRetentionPoliciesClientListByDatabaseResponse ¶ added in v0.3.0
type LongTermRetentionPoliciesClientListByDatabaseResponse struct { // A list of long term retention policies. LongTermRetentionPolicyListResult }
LongTermRetentionPoliciesClientListByDatabaseResponse contains the response from method LongTermRetentionPoliciesClient.NewListByDatabasePager.
type LongTermRetentionPolicy ¶
type LongTermRetentionPolicy struct { // Resource properties. Properties *BaseLongTermRetentionPolicyProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
LongTermRetentionPolicy - A long term retention policy.
func (LongTermRetentionPolicy) MarshalJSON ¶
func (l LongTermRetentionPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LongTermRetentionPolicy.
func (*LongTermRetentionPolicy) UnmarshalJSON ¶ added in v1.1.0
func (l *LongTermRetentionPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LongTermRetentionPolicy.
type LongTermRetentionPolicyListResult ¶
type LongTermRetentionPolicyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*LongTermRetentionPolicy }
LongTermRetentionPolicyListResult - A list of long term retention policies.
func (LongTermRetentionPolicyListResult) MarshalJSON ¶
func (l LongTermRetentionPolicyListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LongTermRetentionPolicyListResult.
func (*LongTermRetentionPolicyListResult) UnmarshalJSON ¶ added in v1.1.0
func (l *LongTermRetentionPolicyListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LongTermRetentionPolicyListResult.
type LongTermRetentionPolicyName ¶
type LongTermRetentionPolicyName string
const (
LongTermRetentionPolicyNameDefault LongTermRetentionPolicyName = "default"
)
func PossibleLongTermRetentionPolicyNameValues ¶
func PossibleLongTermRetentionPolicyNameValues() []LongTermRetentionPolicyName
PossibleLongTermRetentionPolicyNameValues returns the possible values for the LongTermRetentionPolicyName const type.
type MaintenanceConfigurationCapability ¶
type MaintenanceConfigurationCapability struct { // The reason for the capability not being available. Reason *string // READ-ONLY; Maintenance configuration name Name *string // READ-ONLY; The status of the capability. Status *CapabilityStatus // READ-ONLY; Whether or not zone redundancy is supported for the maintenance configuration. ZoneRedundant *bool }
MaintenanceConfigurationCapability - The maintenance configuration capability
func (MaintenanceConfigurationCapability) MarshalJSON ¶ added in v1.1.0
func (m MaintenanceConfigurationCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MaintenanceConfigurationCapability.
func (*MaintenanceConfigurationCapability) UnmarshalJSON ¶ added in v1.1.0
func (m *MaintenanceConfigurationCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceConfigurationCapability.
type MaintenanceWindowOptions ¶
type MaintenanceWindowOptions struct { // Resource properties. Properties *MaintenanceWindowOptionsProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
MaintenanceWindowOptions - Maintenance window options.
func (MaintenanceWindowOptions) MarshalJSON ¶
func (m MaintenanceWindowOptions) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MaintenanceWindowOptions.
func (*MaintenanceWindowOptions) UnmarshalJSON ¶ added in v1.1.0
func (m *MaintenanceWindowOptions) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceWindowOptions.
type MaintenanceWindowOptionsClient ¶
type MaintenanceWindowOptionsClient struct {
// contains filtered or unexported fields
}
MaintenanceWindowOptionsClient contains the methods for the MaintenanceWindowOptions group. Don't use this type directly, use NewMaintenanceWindowOptionsClient() instead.
func NewMaintenanceWindowOptionsClient ¶
func NewMaintenanceWindowOptionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MaintenanceWindowOptionsClient, error)
NewMaintenanceWindowOptionsClient creates a new instance of MaintenanceWindowOptionsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*MaintenanceWindowOptionsClient) Get ¶
func (client *MaintenanceWindowOptionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, maintenanceWindowOptionsName string, options *MaintenanceWindowOptionsClientGetOptions) (MaintenanceWindowOptionsClientGetResponse, error)
Get - Gets a list of available maintenance windows. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database to get maintenance windows options for.
- maintenanceWindowOptionsName - Maintenance window options name.
- options - MaintenanceWindowOptionsClientGetOptions contains the optional parameters for the MaintenanceWindowOptionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetMaintenanceWindowOptions.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewMaintenanceWindowOptionsClient().Get(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", "current", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.MaintenanceWindowOptions = armsql.MaintenanceWindowOptions{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/servers/databases/maintenancewindows"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/maintenancewindowoptions/current"), // Properties: &armsql.MaintenanceWindowOptionsProperties{ // AllowMultipleMaintenanceWindowsPerCycle: to.Ptr(true), // DefaultDurationInMinutes: to.Ptr[int32](120), // IsEnabled: to.Ptr(true), // MaintenanceWindowCycles: []*armsql.MaintenanceWindowTimeRange{ // { // DayOfWeek: to.Ptr(armsql.DayOfWeekSaturday), // Duration: to.Ptr("PT60M"), // StartTime: to.Ptr("00:00:00"), // }}, // MinCycles: to.Ptr[int32](2), // MinDurationInMinutes: to.Ptr[int32](60), // TimeGranularityInMinutes: to.Ptr[int32](5), // }, // } }
Output:
type MaintenanceWindowOptionsClientGetOptions ¶ added in v0.3.0
type MaintenanceWindowOptionsClientGetOptions struct { }
MaintenanceWindowOptionsClientGetOptions contains the optional parameters for the MaintenanceWindowOptionsClient.Get method.
type MaintenanceWindowOptionsClientGetResponse ¶ added in v0.3.0
type MaintenanceWindowOptionsClientGetResponse struct { // Maintenance window options. MaintenanceWindowOptions }
MaintenanceWindowOptionsClientGetResponse contains the response from method MaintenanceWindowOptionsClient.Get.
type MaintenanceWindowOptionsProperties ¶
type MaintenanceWindowOptionsProperties struct { // Whether we allow multiple maintenance windows per cycle. AllowMultipleMaintenanceWindowsPerCycle *bool // Default duration for maintenance window. DefaultDurationInMinutes *int32 // Whether maintenance windows are enabled for the database. IsEnabled *bool // Available maintenance cycles e.g. {Saturday, 0, 4860}, {Wednesday, 0, 2460}. MaintenanceWindowCycles []*MaintenanceWindowTimeRange // Minimum number of maintenance windows cycles to be set on the database. MinCycles *int32 // Minimum duration of maintenance window. MinDurationInMinutes *int32 // Time granularity in minutes for maintenance windows. TimeGranularityInMinutes *int32 }
MaintenanceWindowOptionsProperties - Maintenance window options properties.
func (MaintenanceWindowOptionsProperties) MarshalJSON ¶
func (m MaintenanceWindowOptionsProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MaintenanceWindowOptionsProperties.
func (*MaintenanceWindowOptionsProperties) UnmarshalJSON ¶ added in v1.1.0
func (m *MaintenanceWindowOptionsProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceWindowOptionsProperties.
type MaintenanceWindowTimeRange ¶
type MaintenanceWindowTimeRange struct { // Day of maintenance window. DayOfWeek *DayOfWeek // Duration of maintenance window in minutes. Duration *string // Start time minutes offset from 12am. StartTime *string }
MaintenanceWindowTimeRange - Maintenance window time range.
func (MaintenanceWindowTimeRange) MarshalJSON ¶ added in v1.1.0
func (m MaintenanceWindowTimeRange) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MaintenanceWindowTimeRange.
func (*MaintenanceWindowTimeRange) UnmarshalJSON ¶ added in v1.1.0
func (m *MaintenanceWindowTimeRange) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceWindowTimeRange.
type MaintenanceWindows ¶
type MaintenanceWindows struct { // Resource properties. Properties *MaintenanceWindowsProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
MaintenanceWindows - Maintenance windows.
func (MaintenanceWindows) MarshalJSON ¶
func (m MaintenanceWindows) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MaintenanceWindows.
func (*MaintenanceWindows) UnmarshalJSON ¶ added in v1.1.0
func (m *MaintenanceWindows) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceWindows.
type MaintenanceWindowsClient ¶
type MaintenanceWindowsClient struct {
// contains filtered or unexported fields
}
MaintenanceWindowsClient contains the methods for the MaintenanceWindows group. Don't use this type directly, use NewMaintenanceWindowsClient() instead.
func NewMaintenanceWindowsClient ¶
func NewMaintenanceWindowsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MaintenanceWindowsClient, error)
NewMaintenanceWindowsClient creates a new instance of MaintenanceWindowsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*MaintenanceWindowsClient) CreateOrUpdate ¶
func (client *MaintenanceWindowsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, maintenanceWindowName string, parameters MaintenanceWindows, options *MaintenanceWindowsClientCreateOrUpdateOptions) (MaintenanceWindowsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Sets maintenance windows settings for a database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database to set maintenance windows for.
- maintenanceWindowName - Maintenance window name.
- options - MaintenanceWindowsClientCreateOrUpdateOptions contains the optional parameters for the MaintenanceWindowsClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateMaintenanceWindows.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewMaintenanceWindowsClient().CreateOrUpdate(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdwdb", "current", armsql.MaintenanceWindows{ Properties: &armsql.MaintenanceWindowsProperties{ TimeRanges: []*armsql.MaintenanceWindowTimeRange{ { DayOfWeek: to.Ptr(armsql.DayOfWeekSaturday), Duration: to.Ptr("PT60M"), StartTime: to.Ptr("00:00:00"), }}, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*MaintenanceWindowsClient) Get ¶
func (client *MaintenanceWindowsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, maintenanceWindowName string, options *MaintenanceWindowsClientGetOptions) (MaintenanceWindowsClientGetResponse, error)
Get - Gets maintenance windows settings for a database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database to get maintenance windows for.
- maintenanceWindowName - Maintenance window name.
- options - MaintenanceWindowsClientGetOptions contains the optional parameters for the MaintenanceWindowsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetMaintenanceWindows.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewMaintenanceWindowsClient().Get(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", "current", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.MaintenanceWindows = armsql.MaintenanceWindows{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/servers/databases/maintenancewindows"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/maintenancewindows/current"), // Properties: &armsql.MaintenanceWindowsProperties{ // TimeRanges: []*armsql.MaintenanceWindowTimeRange{ // { // DayOfWeek: to.Ptr(armsql.DayOfWeekSaturday), // Duration: to.Ptr("PT60M"), // StartTime: to.Ptr("00:00:00"), // }}, // }, // } }
Output:
type MaintenanceWindowsClientCreateOrUpdateOptions ¶ added in v0.3.0
type MaintenanceWindowsClientCreateOrUpdateOptions struct { }
MaintenanceWindowsClientCreateOrUpdateOptions contains the optional parameters for the MaintenanceWindowsClient.CreateOrUpdate method.
type MaintenanceWindowsClientCreateOrUpdateResponse ¶ added in v0.3.0
type MaintenanceWindowsClientCreateOrUpdateResponse struct { }
MaintenanceWindowsClientCreateOrUpdateResponse contains the response from method MaintenanceWindowsClient.CreateOrUpdate.
type MaintenanceWindowsClientGetOptions ¶ added in v0.3.0
type MaintenanceWindowsClientGetOptions struct { }
MaintenanceWindowsClientGetOptions contains the optional parameters for the MaintenanceWindowsClient.Get method.
type MaintenanceWindowsClientGetResponse ¶ added in v0.3.0
type MaintenanceWindowsClientGetResponse struct { // Maintenance windows. MaintenanceWindows }
MaintenanceWindowsClientGetResponse contains the response from method MaintenanceWindowsClient.Get.
type MaintenanceWindowsProperties ¶
type MaintenanceWindowsProperties struct {
TimeRanges []*MaintenanceWindowTimeRange
}
MaintenanceWindowsProperties - Maintenance windows resource properties.
func (MaintenanceWindowsProperties) MarshalJSON ¶
func (m MaintenanceWindowsProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MaintenanceWindowsProperties.
func (*MaintenanceWindowsProperties) UnmarshalJSON ¶ added in v1.1.0
func (m *MaintenanceWindowsProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceWindowsProperties.
type ManagedBackupShortTermRetentionPoliciesClient ¶
type ManagedBackupShortTermRetentionPoliciesClient struct {
// contains filtered or unexported fields
}
ManagedBackupShortTermRetentionPoliciesClient contains the methods for the ManagedBackupShortTermRetentionPolicies group. Don't use this type directly, use NewManagedBackupShortTermRetentionPoliciesClient() instead.
func NewManagedBackupShortTermRetentionPoliciesClient ¶
func NewManagedBackupShortTermRetentionPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedBackupShortTermRetentionPoliciesClient, error)
NewManagedBackupShortTermRetentionPoliciesClient creates a new instance of ManagedBackupShortTermRetentionPoliciesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedBackupShortTermRetentionPoliciesClient) BeginCreateOrUpdate ¶
func (client *ManagedBackupShortTermRetentionPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, policyName ManagedShortTermRetentionPolicyName, parameters ManagedBackupShortTermRetentionPolicy, options *ManagedBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Updates a managed database's short term retention policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- policyName - The policy name. Should always be "default".
- parameters - The short term retention policy info.
- options - ManagedBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedBackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/UpdateManagedShortTermRetentionPolicy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedBackupShortTermRetentionPoliciesClient().BeginCreateOrUpdate(ctx, "resourceGroup", "testsvr", "testdb", armsql.ManagedShortTermRetentionPolicyNameDefault, armsql.ManagedBackupShortTermRetentionPolicy{ Properties: &armsql.ManagedBackupShortTermRetentionPolicyProperties{ RetentionDays: to.Ptr[int32](14), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedBackupShortTermRetentionPolicy = armsql.ManagedBackupShortTermRetentionPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/backupShortTermRetentionPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb/backupShortTermRetentionPolicies/default"), // Properties: &armsql.ManagedBackupShortTermRetentionPolicyProperties{ // RetentionDays: to.Ptr[int32](14), // }, // } }
Output:
func (*ManagedBackupShortTermRetentionPoliciesClient) BeginUpdate ¶
func (client *ManagedBackupShortTermRetentionPoliciesClient) BeginUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, policyName ManagedShortTermRetentionPolicyName, parameters ManagedBackupShortTermRetentionPolicy, options *ManagedBackupShortTermRetentionPoliciesClientBeginUpdateOptions) (*runtime.Poller[ManagedBackupShortTermRetentionPoliciesClientUpdateResponse], error)
BeginUpdate - Updates a managed database's short term retention policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- policyName - The policy name. Should always be "default".
- parameters - The short term retention policy info.
- options - ManagedBackupShortTermRetentionPoliciesClientBeginUpdateOptions contains the optional parameters for the ManagedBackupShortTermRetentionPoliciesClient.BeginUpdate method.
func (*ManagedBackupShortTermRetentionPoliciesClient) Get ¶
func (client *ManagedBackupShortTermRetentionPoliciesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, policyName ManagedShortTermRetentionPolicyName, options *ManagedBackupShortTermRetentionPoliciesClientGetOptions) (ManagedBackupShortTermRetentionPoliciesClientGetResponse, error)
Get - Gets a managed database's short term retention policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- policyName - The policy name.
- options - ManagedBackupShortTermRetentionPoliciesClientGetOptions contains the optional parameters for the ManagedBackupShortTermRetentionPoliciesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetManagedShortTermRetentionPolicy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedBackupShortTermRetentionPoliciesClient().Get(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", armsql.ManagedShortTermRetentionPolicyNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedBackupShortTermRetentionPolicy = armsql.ManagedBackupShortTermRetentionPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/backupShortTermRetentionPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb/backupShortTermRetentionPolicies/default"), // Properties: &armsql.ManagedBackupShortTermRetentionPolicyProperties{ // RetentionDays: to.Ptr[int32](14), // }, // } }
Output:
func (*ManagedBackupShortTermRetentionPoliciesClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *ManagedBackupShortTermRetentionPoliciesClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedBackupShortTermRetentionPoliciesClientListByDatabaseOptions) *runtime.Pager[ManagedBackupShortTermRetentionPoliciesClientListByDatabaseResponse]
NewListByDatabasePager - Gets a managed database's short term retention policy list.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- options - ManagedBackupShortTermRetentionPoliciesClientListByDatabaseOptions contains the optional parameters for the ManagedBackupShortTermRetentionPoliciesClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetListManagedShortTermRetentionPolicy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedBackupShortTermRetentionPoliciesClient().NewListByDatabasePager("Default-SQL-SouthEastAsia", "testsvr", "testdb", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedBackupShortTermRetentionPolicyListResult = armsql.ManagedBackupShortTermRetentionPolicyListResult{ // Value: []*armsql.ManagedBackupShortTermRetentionPolicy{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/restorableDroppedDatabases/backupShortTermRetentionPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb,131403269876900000/backupShortTermRetentionPolicies/default"), // Properties: &armsql.ManagedBackupShortTermRetentionPolicyProperties{ // RetentionDays: to.Ptr[int32](14), // }, // }}, // } } }
Output:
type ManagedBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedBackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate method.
type ManagedBackupShortTermRetentionPoliciesClientBeginUpdateOptions ¶ added in v0.3.0
type ManagedBackupShortTermRetentionPoliciesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedBackupShortTermRetentionPoliciesClientBeginUpdateOptions contains the optional parameters for the ManagedBackupShortTermRetentionPoliciesClient.BeginUpdate method.
type ManagedBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse struct { // A short term retention policy. ManagedBackupShortTermRetentionPolicy }
ManagedBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse contains the response from method ManagedBackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate.
type ManagedBackupShortTermRetentionPoliciesClientGetOptions ¶ added in v0.3.0
type ManagedBackupShortTermRetentionPoliciesClientGetOptions struct { }
ManagedBackupShortTermRetentionPoliciesClientGetOptions contains the optional parameters for the ManagedBackupShortTermRetentionPoliciesClient.Get method.
type ManagedBackupShortTermRetentionPoliciesClientGetResponse ¶ added in v0.3.0
type ManagedBackupShortTermRetentionPoliciesClientGetResponse struct { // A short term retention policy. ManagedBackupShortTermRetentionPolicy }
ManagedBackupShortTermRetentionPoliciesClientGetResponse contains the response from method ManagedBackupShortTermRetentionPoliciesClient.Get.
type ManagedBackupShortTermRetentionPoliciesClientListByDatabaseOptions ¶ added in v0.3.0
type ManagedBackupShortTermRetentionPoliciesClientListByDatabaseOptions struct { }
ManagedBackupShortTermRetentionPoliciesClientListByDatabaseOptions contains the optional parameters for the ManagedBackupShortTermRetentionPoliciesClient.NewListByDatabasePager method.
type ManagedBackupShortTermRetentionPoliciesClientListByDatabaseResponse ¶ added in v0.3.0
type ManagedBackupShortTermRetentionPoliciesClientListByDatabaseResponse struct { // A list of short term retention policies. ManagedBackupShortTermRetentionPolicyListResult }
ManagedBackupShortTermRetentionPoliciesClientListByDatabaseResponse contains the response from method ManagedBackupShortTermRetentionPoliciesClient.NewListByDatabasePager.
type ManagedBackupShortTermRetentionPoliciesClientUpdateResponse ¶ added in v0.3.0
type ManagedBackupShortTermRetentionPoliciesClientUpdateResponse struct { // A short term retention policy. ManagedBackupShortTermRetentionPolicy }
ManagedBackupShortTermRetentionPoliciesClientUpdateResponse contains the response from method ManagedBackupShortTermRetentionPoliciesClient.BeginUpdate.
type ManagedBackupShortTermRetentionPolicy ¶
type ManagedBackupShortTermRetentionPolicy struct { // Resource properties. Properties *ManagedBackupShortTermRetentionPolicyProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ManagedBackupShortTermRetentionPolicy - A short term retention policy.
func (ManagedBackupShortTermRetentionPolicy) MarshalJSON ¶
func (m ManagedBackupShortTermRetentionPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedBackupShortTermRetentionPolicy.
func (*ManagedBackupShortTermRetentionPolicy) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedBackupShortTermRetentionPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedBackupShortTermRetentionPolicy.
type ManagedBackupShortTermRetentionPolicyListResult ¶
type ManagedBackupShortTermRetentionPolicyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ManagedBackupShortTermRetentionPolicy }
ManagedBackupShortTermRetentionPolicyListResult - A list of short term retention policies.
func (ManagedBackupShortTermRetentionPolicyListResult) MarshalJSON ¶
func (m ManagedBackupShortTermRetentionPolicyListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedBackupShortTermRetentionPolicyListResult.
func (*ManagedBackupShortTermRetentionPolicyListResult) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedBackupShortTermRetentionPolicyListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedBackupShortTermRetentionPolicyListResult.
type ManagedBackupShortTermRetentionPolicyProperties ¶
type ManagedBackupShortTermRetentionPolicyProperties struct { // The backup retention period in days. This is how many days Point-in-Time Restore will be supported. RetentionDays *int32 }
ManagedBackupShortTermRetentionPolicyProperties - Properties of a short term retention policy
func (ManagedBackupShortTermRetentionPolicyProperties) MarshalJSON ¶ added in v1.1.0
func (m ManagedBackupShortTermRetentionPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedBackupShortTermRetentionPolicyProperties.
func (*ManagedBackupShortTermRetentionPolicyProperties) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedBackupShortTermRetentionPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedBackupShortTermRetentionPolicyProperties.
type ManagedDatabase ¶
type ManagedDatabase struct { // REQUIRED; Resource location. Location *string // Resource properties. Properties *ManagedDatabaseProperties // Resource tags. Tags map[string]*string // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ManagedDatabase - A managed database resource.
func (ManagedDatabase) MarshalJSON ¶
func (m ManagedDatabase) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedDatabase.
func (*ManagedDatabase) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedDatabase) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDatabase.
type ManagedDatabaseColumnsClient ¶
type ManagedDatabaseColumnsClient struct {
// contains filtered or unexported fields
}
ManagedDatabaseColumnsClient contains the methods for the ManagedDatabaseColumns group. Don't use this type directly, use NewManagedDatabaseColumnsClient() instead.
func NewManagedDatabaseColumnsClient ¶
func NewManagedDatabaseColumnsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseColumnsClient, error)
NewManagedDatabaseColumnsClient creates a new instance of ManagedDatabaseColumnsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedDatabaseColumnsClient) Get ¶
func (client *ManagedDatabaseColumnsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string, options *ManagedDatabaseColumnsClientGetOptions) (ManagedDatabaseColumnsClientGetResponse, error)
Get - Get managed database column If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- schemaName - The name of the schema.
- tableName - The name of the table.
- columnName - The name of the column.
- options - ManagedDatabaseColumnsClientGetOptions contains the optional parameters for the ManagedDatabaseColumnsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseColumnGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedDatabaseColumnsClient().Get(ctx, "myRG", "myManagedInstanceName", "myDatabase", "dbo", "table1", "column1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseColumn = armsql.DatabaseColumn{ // Name: to.Ptr("column1"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/schemas/tables/columns"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/table1/columns/column1"), // Properties: &armsql.DatabaseColumnProperties{ // ColumnType: to.Ptr(armsql.ColumnDataTypeBit), // }, // } }
Output:
func (*ManagedDatabaseColumnsClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *ManagedDatabaseColumnsClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseColumnsClientListByDatabaseOptions) *runtime.Pager[ManagedDatabaseColumnsClientListByDatabaseResponse]
NewListByDatabasePager - List managed database columns
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- options - ManagedDatabaseColumnsClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseColumnsClient.NewListByDatabasePager method.
Example (FilterManagedDatabaseColumns) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedColumnsListByDatabaseMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedDatabaseColumnsClient().NewListByDatabasePager("myRG", "serverName", "myDatabase", &armsql.ManagedDatabaseColumnsClientListByDatabaseOptions{Schema: []string{ "dbo"}, Table: []string{ "customer", "address"}, Column: []string{ "username"}, OrderBy: []string{ "schema asc", "table", "column desc"}, Skiptoken: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DatabaseColumnListResult = armsql.DatabaseColumnListResult{ // Value: []*armsql.DatabaseColumn{ // { // Name: to.Ptr("username"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/schemas/tables/columns"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/serverName/databases/myDatabase/schemas/dbo/tables/customer/columns/username"), // Properties: &armsql.DatabaseColumnProperties{ // ColumnType: to.Ptr(armsql.ColumnDataTypeNvarchar), // IsComputed: to.Ptr(false), // MemoryOptimized: to.Ptr(false), // TemporalType: to.Ptr(armsql.TableTemporalTypeNonTemporalTable), // }, // }}, // } } }
Output:
Example (ListManagedDatabaseColumns) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedColumnsListByDatabaseMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedDatabaseColumnsClient().NewListByDatabasePager("myRG", "serverName", "myDatabase", &armsql.ManagedDatabaseColumnsClientListByDatabaseOptions{Schema: []string{}, Table: []string{}, Column: []string{}, OrderBy: []string{}, Skiptoken: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DatabaseColumnListResult = armsql.DatabaseColumnListResult{ // Value: []*armsql.DatabaseColumn{ // { // Name: to.Ptr("col1"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/schemas/tables/columns"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/serverName/databases/myDatabase/schemas/dbo/tables/table1/columns/col1"), // Properties: &armsql.DatabaseColumnProperties{ // ColumnType: to.Ptr(armsql.ColumnDataTypeInt), // IsComputed: to.Ptr(false), // MemoryOptimized: to.Ptr(false), // TemporalType: to.Ptr(armsql.TableTemporalTypeNonTemporalTable), // }, // }, // { // Name: to.Ptr("col2"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/schemas/tables/columns"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/serverName/databases/myDatabase/schemas/dbo/tables/table1/columns/col2"), // Properties: &armsql.DatabaseColumnProperties{ // ColumnType: to.Ptr(armsql.ColumnDataTypeBit), // IsComputed: to.Ptr(false), // MemoryOptimized: to.Ptr(false), // TemporalType: to.Ptr(armsql.TableTemporalTypeSystemVersionedTemporalTable), // }, // }}, // } } }
Output:
func (*ManagedDatabaseColumnsClient) NewListByTablePager ¶ added in v0.5.0
func (client *ManagedDatabaseColumnsClient) NewListByTablePager(resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, options *ManagedDatabaseColumnsClientListByTableOptions) *runtime.Pager[ManagedDatabaseColumnsClientListByTableResponse]
NewListByTablePager - List managed database columns
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- schemaName - The name of the schema.
- tableName - The name of the table.
- options - ManagedDatabaseColumnsClientListByTableOptions contains the optional parameters for the ManagedDatabaseColumnsClient.NewListByTablePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseColumnListByTable.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedDatabaseColumnsClient().NewListByTablePager("myRG", "myManagedInstanceName", "myDatabase", "dbo", "table1", &armsql.ManagedDatabaseColumnsClientListByTableOptions{Filter: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DatabaseColumnListResult = armsql.DatabaseColumnListResult{ // Value: []*armsql.DatabaseColumn{ // { // Name: to.Ptr("col1"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/schemas/tables/columns"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/table1/columns/col1"), // Properties: &armsql.DatabaseColumnProperties{ // ColumnType: to.Ptr(armsql.ColumnDataTypeNvarchar), // }, // }, // { // Name: to.Ptr("col2"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/schemas/tables/columns"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/table1/columns/col2"), // Properties: &armsql.DatabaseColumnProperties{ // ColumnType: to.Ptr(armsql.ColumnDataTypeBit), // }, // }}, // } } }
Output:
type ManagedDatabaseColumnsClientGetOptions ¶ added in v0.3.0
type ManagedDatabaseColumnsClientGetOptions struct { }
ManagedDatabaseColumnsClientGetOptions contains the optional parameters for the ManagedDatabaseColumnsClient.Get method.
type ManagedDatabaseColumnsClientGetResponse ¶ added in v0.3.0
type ManagedDatabaseColumnsClientGetResponse struct { // A database column resource. DatabaseColumn }
ManagedDatabaseColumnsClientGetResponse contains the response from method ManagedDatabaseColumnsClient.Get.
type ManagedDatabaseColumnsClientListByDatabaseOptions ¶ added in v0.3.0
type ManagedDatabaseColumnsClientListByDatabaseOptions struct { Column []string OrderBy []string Schema []string // An opaque token that identifies a starting point in the collection. Skiptoken *string Table []string }
ManagedDatabaseColumnsClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseColumnsClient.NewListByDatabasePager method.
type ManagedDatabaseColumnsClientListByDatabaseResponse ¶ added in v0.3.0
type ManagedDatabaseColumnsClientListByDatabaseResponse struct { // A list of database columns. DatabaseColumnListResult }
ManagedDatabaseColumnsClientListByDatabaseResponse contains the response from method ManagedDatabaseColumnsClient.NewListByDatabasePager.
type ManagedDatabaseColumnsClientListByTableOptions ¶ added in v0.3.0
type ManagedDatabaseColumnsClientListByTableOptions struct { // An OData filter expression that filters elements in the collection. Filter *string }
ManagedDatabaseColumnsClientListByTableOptions contains the optional parameters for the ManagedDatabaseColumnsClient.NewListByTablePager method.
type ManagedDatabaseColumnsClientListByTableResponse ¶ added in v0.3.0
type ManagedDatabaseColumnsClientListByTableResponse struct { // A list of database columns. DatabaseColumnListResult }
ManagedDatabaseColumnsClientListByTableResponse contains the response from method ManagedDatabaseColumnsClient.NewListByTablePager.
type ManagedDatabaseCreateMode ¶
type ManagedDatabaseCreateMode string
ManagedDatabaseCreateMode - Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required).
const ( ManagedDatabaseCreateModeDefault ManagedDatabaseCreateMode = "Default" ManagedDatabaseCreateModePointInTimeRestore ManagedDatabaseCreateMode = "PointInTimeRestore" ManagedDatabaseCreateModeRecovery ManagedDatabaseCreateMode = "Recovery" ManagedDatabaseCreateModeRestoreExternalBackup ManagedDatabaseCreateMode = "RestoreExternalBackup" ManagedDatabaseCreateModeRestoreLongTermRetentionBackup ManagedDatabaseCreateMode = "RestoreLongTermRetentionBackup" )
func PossibleManagedDatabaseCreateModeValues ¶
func PossibleManagedDatabaseCreateModeValues() []ManagedDatabaseCreateMode
PossibleManagedDatabaseCreateModeValues returns the possible values for the ManagedDatabaseCreateMode const type.
type ManagedDatabaseListResult ¶
type ManagedDatabaseListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ManagedDatabase }
ManagedDatabaseListResult - A list of managed databases.
func (ManagedDatabaseListResult) MarshalJSON ¶
func (m ManagedDatabaseListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedDatabaseListResult.
func (*ManagedDatabaseListResult) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedDatabaseListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDatabaseListResult.
type ManagedDatabaseProperties ¶
type ManagedDatabaseProperties struct { // Whether to auto complete restore of this managed database. AutoCompleteRestore *bool // Collation of the metadata catalog. CatalogCollation *CatalogCollationType // Collation of the managed database. Collation *string // Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing // database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be // specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri // and StorageContainerSasToken must be specified. Recovery: Creates a database // by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to // restore. RestoreLongTermRetentionBackup: Create a database by restoring from a // long term retention backup (longTermRetentionBackupResourceId required). CreateMode *ManagedDatabaseCreateMode // Last backup file name for restore of this managed database. LastBackupName *string // The name of the Long Term Retention backup to be used for restore of this managed database. LongTermRetentionBackupResourceID *string // The resource identifier of the recoverable database associated with create operation of this database. RecoverableDatabaseID *string // The restorable dropped database resource id to restore when creating this database. RestorableDroppedDatabaseID *string // Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) // of the source database that will be restored to create the new database. RestorePointInTime *time.Time // The resource identifier of the source database associated with create operation of this database. SourceDatabaseID *string // Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token. StorageContainerSasToken *string // Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container // where backups for this restore are stored. StorageContainerURI *string // READ-ONLY; Creation date of the database. CreationDate *time.Time // READ-ONLY; Geo paired region. DefaultSecondaryLocation *string // READ-ONLY; Earliest restore point in time for point in time restore. EarliestRestorePoint *time.Time // READ-ONLY; Instance Failover Group resource identifier that this managed database belongs to. FailoverGroupID *string // READ-ONLY; Status of the database. Status *ManagedDatabaseStatus }
ManagedDatabaseProperties - The managed database's properties.
func (ManagedDatabaseProperties) MarshalJSON ¶
func (m ManagedDatabaseProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedDatabaseProperties.
func (*ManagedDatabaseProperties) UnmarshalJSON ¶
func (m *ManagedDatabaseProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDatabaseProperties.
type ManagedDatabaseQueriesClient ¶
type ManagedDatabaseQueriesClient struct {
// contains filtered or unexported fields
}
ManagedDatabaseQueriesClient contains the methods for the ManagedDatabaseQueries group. Don't use this type directly, use NewManagedDatabaseQueriesClient() instead.
func NewManagedDatabaseQueriesClient ¶
func NewManagedDatabaseQueriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseQueriesClient, error)
NewManagedDatabaseQueriesClient creates a new instance of ManagedDatabaseQueriesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedDatabaseQueriesClient) Get ¶
func (client *ManagedDatabaseQueriesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, queryID string, options *ManagedDatabaseQueriesClientGetOptions) (ManagedDatabaseQueriesClientGetResponse, error)
Get - Get query by query id. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- options - ManagedDatabaseQueriesClientGetOptions contains the optional parameters for the ManagedDatabaseQueriesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceQueryGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedDatabaseQueriesClient().Get(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", "database_1", "42", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstanceQuery = armsql.ManagedInstanceQuery{ // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/queries"), // ID: to.Ptr("42"), // Properties: &armsql.QueryProperties{ // QueryText: to.Ptr("select * from DUMMY_TABLE"), // }, // } }
Output:
func (*ManagedDatabaseQueriesClient) NewListByQueryPager ¶ added in v0.5.0
func (client *ManagedDatabaseQueriesClient) NewListByQueryPager(resourceGroupName string, managedInstanceName string, databaseName string, queryID string, options *ManagedDatabaseQueriesClientListByQueryOptions) *runtime.Pager[ManagedDatabaseQueriesClientListByQueryResponse]
NewListByQueryPager - Get query execution statistics by query id.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- options - ManagedDatabaseQueriesClientListByQueryOptions contains the optional parameters for the ManagedDatabaseQueriesClient.NewListByQueryPager method.
Example (ObtainQueryExecutionStatistics) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceQueryStatisticsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedDatabaseQueriesClient().NewListByQueryPager("sqlcrudtest-7398", "sqlcrudtest-4645", "database_1", "42", &armsql.ManagedDatabaseQueriesClientListByQueryOptions{StartTime: nil, EndTime: nil, Interval: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedInstanceQueryStatistics = armsql.ManagedInstanceQueryStatistics{ // Value: []*armsql.QueryStatistics{ // { // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/queries/statistics"), // ID: to.Ptr("35"), // Properties: &armsql.QueryStatisticsProperties{ // DatabaseName: to.Ptr("db1"), // EndTime: to.Ptr("03/02/2020 18:34:58"), // Intervals: []*armsql.QueryMetricInterval{ // { // ExecutionCount: to.Ptr[int64](160), // IntervalStartTime: to.Ptr("03/02/2020 08:00:00"), // IntervalType: to.Ptr(armsql.QueryTimeGrainTypePT1H), // Metrics: []*armsql.QueryMetricProperties{ // { // Name: to.Ptr("cpu"), // Avg: to.Ptr[float64](0.00001665347222222222), // DisplayName: to.Ptr("Cpu"), // Max: to.Ptr[float64](0.000025243055555555557), // Min: to.Ptr[float64](0.00001507638888888889), // Stdev: to.Ptr[float64](0.0000014894345929850385), // Sum: to.Ptr[float64](0.0026645555555555554), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("io"), // Avg: to.Ptr[float64](0), // DisplayName: to.Ptr("Physical Io Reads"), // Max: to.Ptr[float64](0), // Min: to.Ptr[float64](0), // Stdev: to.Ptr[float64](0), // Sum: to.Ptr[float64](0), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("logIo"), // Avg: to.Ptr[float64](0), // DisplayName: to.Ptr("Log Writes"), // Max: to.Ptr[float64](0), // Min: to.Ptr[float64](0), // Stdev: to.Ptr[float64](0), // Sum: to.Ptr[float64](0), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("memory"), // Avg: to.Ptr[float64](0), // DisplayName: to.Ptr("Memory consumption"), // Max: to.Ptr[float64](0), // Min: to.Ptr[float64](0), // Stdev: to.Ptr[float64](0), // Sum: to.Ptr[float64](0), // Unit: to.Ptr(armsql.QueryMetricUnitTypeKB), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("duration"), // Avg: to.Ptr[float64](5026.625), // DisplayName: to.Ptr("Query duration"), // Max: to.Ptr[float64](18490), // Min: to.Ptr[float64](4373), // Stdev: to.Ptr[float64](1487.3520882343225), // Sum: to.Ptr[float64](804260), // Unit: to.Ptr(armsql.QueryMetricUnitTypeMicroseconds), // Value: to.Ptr[float64](0), // }}, // }, // { // ExecutionCount: to.Ptr[int64](20), // IntervalStartTime: to.Ptr("03/02/2020 09:00:00"), // IntervalType: to.Ptr(armsql.QueryTimeGrainTypePT1H), // Metrics: []*armsql.QueryMetricProperties{ // { // Name: to.Ptr("cpu"), // Avg: to.Ptr[float64](0.00004479774305555555), // DisplayName: to.Ptr("Cpu"), // Max: to.Ptr[float64](0.00014645833333333332), // Min: to.Ptr[float64](0.000023430555555555557), // Stdev: to.Ptr[float64](0.00003830118344204395), // Sum: to.Ptr[float64](0.0008959548611111111), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("io"), // Avg: to.Ptr[float64](0), // DisplayName: to.Ptr("Physical Io Reads"), // Max: to.Ptr[float64](0), // Min: to.Ptr[float64](0), // Stdev: to.Ptr[float64](0), // Sum: to.Ptr[float64](0), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("logIo"), // Avg: to.Ptr[float64](0), // DisplayName: to.Ptr("Log Writes"), // Max: to.Ptr[float64](0), // Min: to.Ptr[float64](0), // Stdev: to.Ptr[float64](0), // Sum: to.Ptr[float64](0), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("memory"), // Avg: to.Ptr[float64](0), // DisplayName: to.Ptr("Memory consumption"), // Max: to.Ptr[float64](0), // Min: to.Ptr[float64](0), // Stdev: to.Ptr[float64](0), // Sum: to.Ptr[float64](0), // Unit: to.Ptr(armsql.QueryMetricUnitTypeKB), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("duration"), // Avg: to.Ptr[float64](12963.2), // DisplayName: to.Ptr("Query duration"), // Max: to.Ptr[float64](42289), // Min: to.Ptr[float64](6813), // Stdev: to.Ptr[float64](11040.140794392071), // Sum: to.Ptr[float64](259264), // Unit: to.Ptr(armsql.QueryMetricUnitTypeMicroseconds), // Value: to.Ptr[float64](0), // }}, // }, // { // ExecutionCount: to.Ptr[int64](80), // IntervalStartTime: to.Ptr("03/02/2020 15:00:00"), // IntervalType: to.Ptr(armsql.QueryTimeGrainTypePT1H), // Metrics: []*armsql.QueryMetricProperties{ // { // Name: to.Ptr("cpu"), // Avg: to.Ptr[float64](0.000019315538194444445), // DisplayName: to.Ptr("Cpu"), // Max: to.Ptr[float64](0.00002764236111111111), // Min: to.Ptr[float64](0.000018215277777777777), // Stdev: to.Ptr[float64](0.0000010716305801875179), // Sum: to.Ptr[float64](0.0015452430555555556), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("io"), // Avg: to.Ptr[float64](0), // DisplayName: to.Ptr("Physical Io Reads"), // Max: to.Ptr[float64](0), // Min: to.Ptr[float64](0), // Stdev: to.Ptr[float64](0), // Sum: to.Ptr[float64](0), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("logIo"), // Avg: to.Ptr[float64](0), // DisplayName: to.Ptr("Log Writes"), // Max: to.Ptr[float64](0), // Min: to.Ptr[float64](0), // Stdev: to.Ptr[float64](0), // Sum: to.Ptr[float64](0), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("memory"), // Avg: to.Ptr[float64](0), // DisplayName: to.Ptr("Memory consumption"), // Max: to.Ptr[float64](0), // Min: to.Ptr[float64](0), // Stdev: to.Ptr[float64](0), // Sum: to.Ptr[float64](0), // Unit: to.Ptr(armsql.QueryMetricUnitTypeKB), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("duration"), // Avg: to.Ptr[float64](5586.2625), // DisplayName: to.Ptr("Query duration"), // Max: to.Ptr[float64](7982), // Min: to.Ptr[float64](5264), // Stdev: to.Ptr[float64](310.4915757210727), // Sum: to.Ptr[float64](446901), // Unit: to.Ptr(armsql.QueryMetricUnitTypeMicroseconds), // Value: to.Ptr[float64](0), // }}, // }, // { // ExecutionCount: to.Ptr[int64](80), // IntervalStartTime: to.Ptr("03/02/2020 17:00:00"), // IntervalType: to.Ptr(armsql.QueryTimeGrainTypePT1H), // Metrics: []*armsql.QueryMetricProperties{ // { // Name: to.Ptr("cpu"), // Avg: to.Ptr[float64](0.000019085373263888888), // DisplayName: to.Ptr("Cpu"), // Max: to.Ptr[float64](0.00002782638888888889), // Min: to.Ptr[float64](0.000017819444444444443), // Stdev: to.Ptr[float64](0.0000012309244108727927), // Sum: to.Ptr[float64](0.0015268298611111112), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("io"), // Avg: to.Ptr[float64](0), // DisplayName: to.Ptr("Physical Io Reads"), // Max: to.Ptr[float64](0), // Min: to.Ptr[float64](0), // Stdev: to.Ptr[float64](0), // Sum: to.Ptr[float64](0), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("logIo"), // Avg: to.Ptr[float64](0), // DisplayName: to.Ptr("Log Writes"), // Max: to.Ptr[float64](0), // Min: to.Ptr[float64](0), // Stdev: to.Ptr[float64](0), // Sum: to.Ptr[float64](0), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("memory"), // Avg: to.Ptr[float64](0), // DisplayName: to.Ptr("Memory consumption"), // Max: to.Ptr[float64](0), // Min: to.Ptr[float64](0), // Stdev: to.Ptr[float64](0), // Sum: to.Ptr[float64](0), // Unit: to.Ptr(armsql.QueryMetricUnitTypeKB), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("duration"), // Avg: to.Ptr[float64](5517.2), // DisplayName: to.Ptr("Query duration"), // Max: to.Ptr[float64](8052), // Min: to.Ptr[float64](5147), // Stdev: to.Ptr[float64](356.8763581410226), // Sum: to.Ptr[float64](441376), // Unit: to.Ptr(armsql.QueryMetricUnitTypeMicroseconds), // Value: to.Ptr[float64](0), // }}, // }}, // QueryID: to.Ptr("35"), // StartTime: to.Ptr("03/01/2020 18:34:58"), // }, // }}, // } } }
Output:
Example (ObtainQueryExecutionStatisticsExampleWithAllRequestParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceQueryStatisticsListMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedDatabaseQueriesClient().NewListByQueryPager("sqlcrudtest-7398", "sqlcrudtest-4645", "database_1", "42", &armsql.ManagedDatabaseQueriesClientListByQueryOptions{StartTime: to.Ptr("03/01/2020 16:23:09"), EndTime: to.Ptr("03/11/2020 14:00:00"), Interval: to.Ptr(armsql.QueryTimeGrainTypeP1D), }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedInstanceQueryStatistics = armsql.ManagedInstanceQueryStatistics{ // Value: []*armsql.QueryStatistics{ // { // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/queries/statistics"), // ID: to.Ptr("28"), // Properties: &armsql.QueryStatisticsProperties{ // DatabaseName: to.Ptr("db1"), // EndTime: to.Ptr("03/11/2020 14:00:00"), // Intervals: []*armsql.QueryMetricInterval{ // { // ExecutionCount: to.Ptr[int64](1), // IntervalStartTime: to.Ptr("03/11/2020 00:00:00"), // IntervalType: to.Ptr(armsql.QueryTimeGrainTypeP1D), // Metrics: []*armsql.QueryMetricProperties{ // { // Name: to.Ptr("cpu"), // Avg: to.Ptr[float64](0.0015934667245370371), // DisplayName: to.Ptr("Cpu"), // Max: to.Ptr[float64](0.0015934667245370371), // Min: to.Ptr[float64](0.0015934667245370371), // Stdev: to.Ptr[float64](0), // Sum: to.Ptr[float64](0.0015934667245370371), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("io"), // Avg: to.Ptr[float64](0.000004224537037037037), // DisplayName: to.Ptr("Physical Io Reads"), // Max: to.Ptr[float64](0.000004224537037037037), // Min: to.Ptr[float64](0.000004224537037037037), // Stdev: to.Ptr[float64](0), // Sum: to.Ptr[float64](0.000004224537037037037), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("logIo"), // Avg: to.Ptr[float64](0), // DisplayName: to.Ptr("Log Writes"), // Max: to.Ptr[float64](0), // Min: to.Ptr[float64](0), // Stdev: to.Ptr[float64](0), // Sum: to.Ptr[float64](0), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("memory"), // Avg: to.Ptr[float64](8336), // DisplayName: to.Ptr("Memory consumption"), // Max: to.Ptr[float64](8336), // Min: to.Ptr[float64](8336), // Stdev: to.Ptr[float64](0), // Sum: to.Ptr[float64](8336), // Unit: to.Ptr(armsql.QueryMetricUnitTypeKB), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("duration"), // Avg: to.Ptr[float64](11091296), // DisplayName: to.Ptr("Query duration"), // Max: to.Ptr[float64](11091296), // Min: to.Ptr[float64](11091296), // Stdev: to.Ptr[float64](0), // Sum: to.Ptr[float64](11091296), // Unit: to.Ptr(armsql.QueryMetricUnitTypeMicroseconds), // Value: to.Ptr[float64](0), // }}, // }}, // QueryID: to.Ptr("28"), // StartTime: to.Ptr("03/01/2020 16:23:09"), // }, // }}, // } } }
Output:
Example (ObtainQueryExecutionStatisticsMinimalExampleWithOnlyMandatoryRequestParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceQueryStatisticsListMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedDatabaseQueriesClient().NewListByQueryPager("sqlcrudtest-7398", "sqlcrudtest-4645", "database_1", "42", &armsql.ManagedDatabaseQueriesClientListByQueryOptions{StartTime: nil, EndTime: nil, Interval: to.Ptr(armsql.QueryTimeGrainTypePT1H), }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedInstanceQueryStatistics = armsql.ManagedInstanceQueryStatistics{ // Value: []*armsql.QueryStatistics{ // { // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/queries/statistics"), // ID: to.Ptr("28"), // Properties: &armsql.QueryStatisticsProperties{ // DatabaseName: to.Ptr("db1"), // EndTime: to.Ptr("03/11/2020 14:00:30"), // Intervals: []*armsql.QueryMetricInterval{ // { // ExecutionCount: to.Ptr[int64](1), // IntervalStartTime: to.Ptr("03/11/2020 11:00:00"), // IntervalType: to.Ptr(armsql.QueryTimeGrainTypePT1H), // Metrics: []*armsql.QueryMetricProperties{ // { // Name: to.Ptr("cpu"), // Avg: to.Ptr[float64](0.03824320138888889), // DisplayName: to.Ptr("Cpu"), // Max: to.Ptr[float64](0.03824320138888889), // Min: to.Ptr[float64](0.03824320138888889), // Stdev: to.Ptr[float64](0), // Sum: to.Ptr[float64](0.03824320138888889), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("io"), // Avg: to.Ptr[float64](0.0001013888888888889), // DisplayName: to.Ptr("Physical Io Reads"), // Max: to.Ptr[float64](0.0001013888888888889), // Min: to.Ptr[float64](0.0001013888888888889), // Stdev: to.Ptr[float64](0), // Sum: to.Ptr[float64](0.0001013888888888889), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("logIo"), // Avg: to.Ptr[float64](0), // DisplayName: to.Ptr("Log Writes"), // Max: to.Ptr[float64](0), // Min: to.Ptr[float64](0), // Stdev: to.Ptr[float64](0), // Sum: to.Ptr[float64](0), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("memory"), // Avg: to.Ptr[float64](8336), // DisplayName: to.Ptr("Memory consumption"), // Max: to.Ptr[float64](8336), // Min: to.Ptr[float64](8336), // Stdev: to.Ptr[float64](0), // Sum: to.Ptr[float64](8336), // Unit: to.Ptr(armsql.QueryMetricUnitTypeKB), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("duration"), // Avg: to.Ptr[float64](11091296), // DisplayName: to.Ptr("Query duration"), // Max: to.Ptr[float64](11091296), // Min: to.Ptr[float64](11091296), // Stdev: to.Ptr[float64](0), // Sum: to.Ptr[float64](11091296), // Unit: to.Ptr(armsql.QueryMetricUnitTypeMicroseconds), // Value: to.Ptr[float64](0), // }}, // }}, // QueryID: to.Ptr("28"), // StartTime: to.Ptr("03/10/2020 14:00:30"), // }, // }}, // } } }
Output:
type ManagedDatabaseQueriesClientGetOptions ¶ added in v0.3.0
type ManagedDatabaseQueriesClientGetOptions struct { }
ManagedDatabaseQueriesClientGetOptions contains the optional parameters for the ManagedDatabaseQueriesClient.Get method.
type ManagedDatabaseQueriesClientGetResponse ¶ added in v0.3.0
type ManagedDatabaseQueriesClientGetResponse struct { // Database query. ManagedInstanceQuery }
ManagedDatabaseQueriesClientGetResponse contains the response from method ManagedDatabaseQueriesClient.Get.
type ManagedDatabaseQueriesClientListByQueryOptions ¶ added in v0.3.0
type ManagedDatabaseQueriesClientListByQueryOptions struct { // End time for observed period. EndTime *string // The time step to be used to summarize the metric values. Interval *QueryTimeGrainType // Start time for observed period. StartTime *string }
ManagedDatabaseQueriesClientListByQueryOptions contains the optional parameters for the ManagedDatabaseQueriesClient.NewListByQueryPager method.
type ManagedDatabaseQueriesClientListByQueryResponse ¶ added in v0.3.0
type ManagedDatabaseQueriesClientListByQueryResponse struct { // Execution statistics for one particular query ManagedInstanceQueryStatistics }
ManagedDatabaseQueriesClientListByQueryResponse contains the response from method ManagedDatabaseQueriesClient.NewListByQueryPager.
type ManagedDatabaseRecommendedSensitivityLabelsClient ¶
type ManagedDatabaseRecommendedSensitivityLabelsClient struct {
// contains filtered or unexported fields
}
ManagedDatabaseRecommendedSensitivityLabelsClient contains the methods for the ManagedDatabaseRecommendedSensitivityLabels group. Don't use this type directly, use NewManagedDatabaseRecommendedSensitivityLabelsClient() instead.
func NewManagedDatabaseRecommendedSensitivityLabelsClient ¶
func NewManagedDatabaseRecommendedSensitivityLabelsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseRecommendedSensitivityLabelsClient, error)
NewManagedDatabaseRecommendedSensitivityLabelsClient creates a new instance of ManagedDatabaseRecommendedSensitivityLabelsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedDatabaseRecommendedSensitivityLabelsClient) Update ¶
func (client *ManagedDatabaseRecommendedSensitivityLabelsClient) Update(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters RecommendedSensitivityLabelUpdateList, options *ManagedDatabaseRecommendedSensitivityLabelsClientUpdateOptions) (ManagedDatabaseRecommendedSensitivityLabelsClientUpdateResponse, error)
Update - Update recommended sensitivity labels states of a given database using an operations batch. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- options - ManagedDatabaseRecommendedSensitivityLabelsClientUpdateOptions contains the optional parameters for the ManagedDatabaseRecommendedSensitivityLabelsClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSensitivityLabelsRecommendedUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewManagedDatabaseRecommendedSensitivityLabelsClient().Update(ctx, "myRG", "myManagedInstanceName", "myDatabase", armsql.RecommendedSensitivityLabelUpdateList{ Operations: []*armsql.RecommendedSensitivityLabelUpdate{ { Properties: &armsql.RecommendedSensitivityLabelUpdateProperties{ Schema: to.Ptr("dbo"), Column: to.Ptr("column1"), Op: to.Ptr(armsql.RecommendedSensitivityLabelUpdateKindEnable), Table: to.Ptr("table1"), }, }, { Properties: &armsql.RecommendedSensitivityLabelUpdateProperties{ Schema: to.Ptr("dbo"), Column: to.Ptr("column2"), Op: to.Ptr(armsql.RecommendedSensitivityLabelUpdateKindDisable), Table: to.Ptr("table2"), }, }, { Properties: &armsql.RecommendedSensitivityLabelUpdateProperties{ Schema: to.Ptr("dbo"), Column: to.Ptr("Column3"), Op: to.Ptr(armsql.RecommendedSensitivityLabelUpdateKindDisable), Table: to.Ptr("Table1"), }, }}, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
type ManagedDatabaseRecommendedSensitivityLabelsClientUpdateOptions ¶ added in v0.3.0
type ManagedDatabaseRecommendedSensitivityLabelsClientUpdateOptions struct { }
ManagedDatabaseRecommendedSensitivityLabelsClientUpdateOptions contains the optional parameters for the ManagedDatabaseRecommendedSensitivityLabelsClient.Update method.
type ManagedDatabaseRecommendedSensitivityLabelsClientUpdateResponse ¶ added in v0.3.0
type ManagedDatabaseRecommendedSensitivityLabelsClientUpdateResponse struct { }
ManagedDatabaseRecommendedSensitivityLabelsClientUpdateResponse contains the response from method ManagedDatabaseRecommendedSensitivityLabelsClient.Update.
type ManagedDatabaseRestoreDetailsClient ¶
type ManagedDatabaseRestoreDetailsClient struct {
// contains filtered or unexported fields
}
ManagedDatabaseRestoreDetailsClient contains the methods for the ManagedDatabaseRestoreDetails group. Don't use this type directly, use NewManagedDatabaseRestoreDetailsClient() instead.
func NewManagedDatabaseRestoreDetailsClient ¶
func NewManagedDatabaseRestoreDetailsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseRestoreDetailsClient, error)
NewManagedDatabaseRestoreDetailsClient creates a new instance of ManagedDatabaseRestoreDetailsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedDatabaseRestoreDetailsClient) Get ¶
func (client *ManagedDatabaseRestoreDetailsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, restoreDetailsName RestoreDetailsName, options *ManagedDatabaseRestoreDetailsClientGetOptions) (ManagedDatabaseRestoreDetailsClientGetResponse, error)
Get - Gets managed database restore details. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- restoreDetailsName - The name of the restore details to retrieve.
- options - ManagedDatabaseRestoreDetailsClientGetOptions contains the optional parameters for the ManagedDatabaseRestoreDetailsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseRestoreDetails.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedDatabaseRestoreDetailsClient().Get(ctx, "Default-SQL-SouthEastAsia", "managedInstance", "testdb", armsql.RestoreDetailsNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedDatabaseRestoreDetailsResult = armsql.ManagedDatabaseRestoreDetailsResult{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/restoreDetails"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/testdb/restoreDetails/current"), // Properties: &armsql.ManagedDatabaseRestoreDetailsProperties{ // CurrentRestoringFileName: to.Ptr("full_0"), // LastUploadedFileName: to.Ptr("log2_3"), // LastUploadedFileTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-15T11:38:33.000Z"); return t}()), // NumberOfFilesDetected: to.Ptr[int64](26), // PercentCompleted: to.Ptr[float64](0), // Status: to.Ptr("Restoring"), // UnrestorableFiles: []*string{ // }, // }, // } }
Output:
type ManagedDatabaseRestoreDetailsClientGetOptions ¶ added in v0.3.0
type ManagedDatabaseRestoreDetailsClientGetOptions struct { }
ManagedDatabaseRestoreDetailsClientGetOptions contains the optional parameters for the ManagedDatabaseRestoreDetailsClient.Get method.
type ManagedDatabaseRestoreDetailsClientGetResponse ¶ added in v0.3.0
type ManagedDatabaseRestoreDetailsClientGetResponse struct { // A managed database restore details. ManagedDatabaseRestoreDetailsResult }
ManagedDatabaseRestoreDetailsClientGetResponse contains the response from method ManagedDatabaseRestoreDetailsClient.Get.
type ManagedDatabaseRestoreDetailsProperties ¶
type ManagedDatabaseRestoreDetailsProperties struct { // READ-ONLY; The reason why restore is in Blocked state. BlockReason *string // READ-ONLY; Current restoring file name. CurrentRestoringFileName *string // READ-ONLY; Last restored file name. LastRestoredFileName *string // READ-ONLY; Last restored file time. LastRestoredFileTime *time.Time // READ-ONLY; Last uploaded file name. LastUploadedFileName *string // READ-ONLY; Last uploaded file time. LastUploadedFileTime *time.Time // READ-ONLY; Number of files detected. NumberOfFilesDetected *int64 // READ-ONLY; Percent completed. PercentCompleted *float64 // READ-ONLY; Restore status. Status *string // READ-ONLY; List of unrestorable files. UnrestorableFiles []*string }
ManagedDatabaseRestoreDetailsProperties - The managed database's restore details properties.
func (ManagedDatabaseRestoreDetailsProperties) MarshalJSON ¶
func (m ManagedDatabaseRestoreDetailsProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedDatabaseRestoreDetailsProperties.
func (*ManagedDatabaseRestoreDetailsProperties) UnmarshalJSON ¶
func (m *ManagedDatabaseRestoreDetailsProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDatabaseRestoreDetailsProperties.
type ManagedDatabaseRestoreDetailsResult ¶
type ManagedDatabaseRestoreDetailsResult struct { // Resource properties. Properties *ManagedDatabaseRestoreDetailsProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ManagedDatabaseRestoreDetailsResult - A managed database restore details.
func (ManagedDatabaseRestoreDetailsResult) MarshalJSON ¶
func (m ManagedDatabaseRestoreDetailsResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedDatabaseRestoreDetailsResult.
func (*ManagedDatabaseRestoreDetailsResult) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedDatabaseRestoreDetailsResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDatabaseRestoreDetailsResult.
type ManagedDatabaseSchemasClient ¶
type ManagedDatabaseSchemasClient struct {
// contains filtered or unexported fields
}
ManagedDatabaseSchemasClient contains the methods for the ManagedDatabaseSchemas group. Don't use this type directly, use NewManagedDatabaseSchemasClient() instead.
func NewManagedDatabaseSchemasClient ¶
func NewManagedDatabaseSchemasClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseSchemasClient, error)
NewManagedDatabaseSchemasClient creates a new instance of ManagedDatabaseSchemasClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedDatabaseSchemasClient) Get ¶
func (client *ManagedDatabaseSchemasClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, options *ManagedDatabaseSchemasClientGetOptions) (ManagedDatabaseSchemasClientGetResponse, error)
Get - Get managed database schema If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- schemaName - The name of the schema.
- options - ManagedDatabaseSchemasClientGetOptions contains the optional parameters for the ManagedDatabaseSchemasClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSchemaGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedDatabaseSchemasClient().Get(ctx, "myRG", "myManagedInstanceName", "myDatabase", "dbo", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseSchema = armsql.DatabaseSchema{ // Name: to.Ptr("dbo"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/schemas"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo"), // } }
Output:
func (*ManagedDatabaseSchemasClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *ManagedDatabaseSchemasClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseSchemasClientListByDatabaseOptions) *runtime.Pager[ManagedDatabaseSchemasClientListByDatabaseResponse]
NewListByDatabasePager - List managed database schemas
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- options - ManagedDatabaseSchemasClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseSchemasClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSchemaListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedDatabaseSchemasClient().NewListByDatabasePager("myRG", "myManagedInstanceName", "myDatabase", &armsql.ManagedDatabaseSchemasClientListByDatabaseOptions{Filter: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DatabaseSchemaListResult = armsql.DatabaseSchemaListResult{ // Value: []*armsql.DatabaseSchema{ // { // Name: to.Ptr("dbo"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/schemas"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo"), // }, // { // Name: to.Ptr("schema2"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/schemas"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/schema2"), // }}, // } } }
Output:
type ManagedDatabaseSchemasClientGetOptions ¶ added in v0.3.0
type ManagedDatabaseSchemasClientGetOptions struct { }
ManagedDatabaseSchemasClientGetOptions contains the optional parameters for the ManagedDatabaseSchemasClient.Get method.
type ManagedDatabaseSchemasClientGetResponse ¶ added in v0.3.0
type ManagedDatabaseSchemasClientGetResponse struct { // A database schema resource. DatabaseSchema }
ManagedDatabaseSchemasClientGetResponse contains the response from method ManagedDatabaseSchemasClient.Get.
type ManagedDatabaseSchemasClientListByDatabaseOptions ¶ added in v0.3.0
type ManagedDatabaseSchemasClientListByDatabaseOptions struct { // An OData filter expression that filters elements in the collection. Filter *string }
ManagedDatabaseSchemasClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseSchemasClient.NewListByDatabasePager method.
type ManagedDatabaseSchemasClientListByDatabaseResponse ¶ added in v0.3.0
type ManagedDatabaseSchemasClientListByDatabaseResponse struct { // A list of database schemas. DatabaseSchemaListResult }
ManagedDatabaseSchemasClientListByDatabaseResponse contains the response from method ManagedDatabaseSchemasClient.NewListByDatabasePager.
type ManagedDatabaseSecurityAlertPoliciesClient ¶
type ManagedDatabaseSecurityAlertPoliciesClient struct {
// contains filtered or unexported fields
}
ManagedDatabaseSecurityAlertPoliciesClient contains the methods for the ManagedDatabaseSecurityAlertPolicies group. Don't use this type directly, use NewManagedDatabaseSecurityAlertPoliciesClient() instead.
func NewManagedDatabaseSecurityAlertPoliciesClient ¶
func NewManagedDatabaseSecurityAlertPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseSecurityAlertPoliciesClient, error)
NewManagedDatabaseSecurityAlertPoliciesClient creates a new instance of ManagedDatabaseSecurityAlertPoliciesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedDatabaseSecurityAlertPoliciesClient) CreateOrUpdate ¶
func (client *ManagedDatabaseSecurityAlertPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, securityAlertPolicyName SecurityAlertPolicyName, parameters ManagedDatabaseSecurityAlertPolicy, options *ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions) (ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates a database's security alert policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the managed database for which the security alert policy is defined.
- securityAlertPolicyName - The name of the security alert policy.
- parameters - The database security alert policy.
- options - ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ManagedDatabaseSecurityAlertPoliciesClient.CreateOrUpdate method.
Example (UpdateADatabasesThreatDetectionPolicyWithAllParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSecurityAlertCreateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedDatabaseSecurityAlertPoliciesClient().CreateOrUpdate(ctx, "securityalert-4799", "securityalert-6440", "testdb", armsql.SecurityAlertPolicyNameDefault, armsql.ManagedDatabaseSecurityAlertPolicy{ Properties: &armsql.SecurityAlertPolicyProperties{ DisabledAlerts: []*string{ to.Ptr("Sql_Injection"), to.Ptr("Usage_Anomaly")}, EmailAccountAdmins: to.Ptr(true), EmailAddresses: []*string{ to.Ptr("test@contoso.com"), to.Ptr("user@contoso.com")}, RetentionDays: to.Ptr[int32](6), State: to.Ptr(armsql.SecurityAlertPolicyStateEnabled), StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedDatabaseSecurityAlertPolicy = armsql.ManagedDatabaseSecurityAlertPolicy{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/securityAlertPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/managedInstances/securityalert-6440/databases/testdb"), // Properties: &armsql.SecurityAlertPolicyProperties{ // DisabledAlerts: []*string{ // to.Ptr("Sql_Injection"), // to.Ptr("Usage_Anomaly")}, // EmailAccountAdmins: to.Ptr(true), // EmailAddresses: []*string{ // to.Ptr("test@contoso.com"), // to.Ptr("user@contoso.com")}, // RetentionDays: to.Ptr[int32](6), // State: to.Ptr(armsql.SecurityAlertPolicyStateEnabled), // StorageAccountAccessKey: to.Ptr(""), // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), // }, // } }
Output:
Example (UpdateADatabasesThreatDetectionPolicyWithMinimalParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSecurityAlertCreateMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedDatabaseSecurityAlertPoliciesClient().CreateOrUpdate(ctx, "securityalert-4799", "securityalert-6440", "testdb", armsql.SecurityAlertPolicyNameDefault, armsql.ManagedDatabaseSecurityAlertPolicy{ Properties: &armsql.SecurityAlertPolicyProperties{ State: to.Ptr(armsql.SecurityAlertPolicyStateEnabled), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedDatabaseSecurityAlertPolicy = armsql.ManagedDatabaseSecurityAlertPolicy{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/managedInstance/databases/securityAlertPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/managedInstances/securityalert-6440/databases/testdb"), // Properties: &armsql.SecurityAlertPolicyProperties{ // DisabledAlerts: []*string{ // }, // EmailAccountAdmins: to.Ptr(true), // EmailAddresses: []*string{ // }, // RetentionDays: to.Ptr[int32](0), // State: to.Ptr(armsql.SecurityAlertPolicyStateEnabled), // StorageAccountAccessKey: to.Ptr(""), // StorageEndpoint: to.Ptr(""), // }, // } }
Output:
func (*ManagedDatabaseSecurityAlertPoliciesClient) Get ¶
func (client *ManagedDatabaseSecurityAlertPoliciesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, securityAlertPolicyName SecurityAlertPolicyName, options *ManagedDatabaseSecurityAlertPoliciesClientGetOptions) (ManagedDatabaseSecurityAlertPoliciesClientGetResponse, error)
Get - Gets a managed database's security alert policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the managed database for which the security alert policy is defined.
- securityAlertPolicyName - The name of the security alert policy.
- options - ManagedDatabaseSecurityAlertPoliciesClientGetOptions contains the optional parameters for the ManagedDatabaseSecurityAlertPoliciesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSecurityAlertGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedDatabaseSecurityAlertPoliciesClient().Get(ctx, "securityalert-6852", "securityalert-2080", "testdb", armsql.SecurityAlertPolicyNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedDatabaseSecurityAlertPolicy = armsql.ManagedDatabaseSecurityAlertPolicy{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/securityAlertPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-6852/providers/Microsoft.Sql/managedInstances/securityalert-2080/databases/testdb"), // Properties: &armsql.SecurityAlertPolicyProperties{ // DisabledAlerts: []*string{ // to.Ptr("Usage_Anomaly")}, // EmailAccountAdmins: to.Ptr(true), // EmailAddresses: []*string{ // to.Ptr("test@contoso.com"), // to.Ptr("user@contoso.com")}, // RetentionDays: to.Ptr[int32](0), // State: to.Ptr(armsql.SecurityAlertPolicyStateEnabled), // StorageAccountAccessKey: to.Ptr(""), // StorageEndpoint: to.Ptr(""), // }, // } }
Output:
func (*ManagedDatabaseSecurityAlertPoliciesClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *ManagedDatabaseSecurityAlertPoliciesClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseOptions) *runtime.Pager[ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseResponse]
NewListByDatabasePager - Gets a list of managed database's security alert policies.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the managed database for which the security alert policies are defined.
- options - ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseSecurityAlertPoliciesClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSecurityAlertListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedDatabaseSecurityAlertPoliciesClient().NewListByDatabasePager("securityalert-6852", "securityalert-2080", "testdb", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedDatabaseSecurityAlertPolicyListResult = armsql.ManagedDatabaseSecurityAlertPolicyListResult{ // Value: []*armsql.ManagedDatabaseSecurityAlertPolicy{ // { // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/securityAlertPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-6852/providers/Microsoft.Sql/managedInstances/securityalert-2080/databases/testdb"), // Properties: &armsql.SecurityAlertPolicyProperties{ // DisabledAlerts: []*string{ // to.Ptr("Usage_Anomaly")}, // EmailAccountAdmins: to.Ptr(true), // EmailAddresses: []*string{ // to.Ptr("test@contoso.com"), // to.Ptr("user@contoso.com")}, // RetentionDays: to.Ptr[int32](0), // State: to.Ptr(armsql.SecurityAlertPolicyStateEnabled), // StorageAccountAccessKey: to.Ptr(""), // StorageEndpoint: to.Ptr(""), // }, // }}, // } } }
Output:
type ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions struct { }
ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ManagedDatabaseSecurityAlertPoliciesClient.CreateOrUpdate method.
type ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse struct { // A managed database security alert policy. ManagedDatabaseSecurityAlertPolicy }
ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse contains the response from method ManagedDatabaseSecurityAlertPoliciesClient.CreateOrUpdate.
type ManagedDatabaseSecurityAlertPoliciesClientGetOptions ¶ added in v0.3.0
type ManagedDatabaseSecurityAlertPoliciesClientGetOptions struct { }
ManagedDatabaseSecurityAlertPoliciesClientGetOptions contains the optional parameters for the ManagedDatabaseSecurityAlertPoliciesClient.Get method.
type ManagedDatabaseSecurityAlertPoliciesClientGetResponse ¶ added in v0.3.0
type ManagedDatabaseSecurityAlertPoliciesClientGetResponse struct { // A managed database security alert policy. ManagedDatabaseSecurityAlertPolicy }
ManagedDatabaseSecurityAlertPoliciesClientGetResponse contains the response from method ManagedDatabaseSecurityAlertPoliciesClient.Get.
type ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseOptions ¶ added in v0.3.0
type ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseOptions struct { }
ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseSecurityAlertPoliciesClient.NewListByDatabasePager method.
type ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseResponse ¶ added in v0.3.0
type ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseResponse struct { // A list of the managed database's security alert policies. ManagedDatabaseSecurityAlertPolicyListResult }
ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseResponse contains the response from method ManagedDatabaseSecurityAlertPoliciesClient.NewListByDatabasePager.
type ManagedDatabaseSecurityAlertPolicy ¶
type ManagedDatabaseSecurityAlertPolicy struct { // Resource properties. Properties *SecurityAlertPolicyProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ManagedDatabaseSecurityAlertPolicy - A managed database security alert policy.
func (ManagedDatabaseSecurityAlertPolicy) MarshalJSON ¶
func (m ManagedDatabaseSecurityAlertPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedDatabaseSecurityAlertPolicy.
func (*ManagedDatabaseSecurityAlertPolicy) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedDatabaseSecurityAlertPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDatabaseSecurityAlertPolicy.
type ManagedDatabaseSecurityAlertPolicyListResult ¶
type ManagedDatabaseSecurityAlertPolicyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ManagedDatabaseSecurityAlertPolicy }
ManagedDatabaseSecurityAlertPolicyListResult - A list of the managed database's security alert policies.
func (ManagedDatabaseSecurityAlertPolicyListResult) MarshalJSON ¶
func (m ManagedDatabaseSecurityAlertPolicyListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedDatabaseSecurityAlertPolicyListResult.
func (*ManagedDatabaseSecurityAlertPolicyListResult) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedDatabaseSecurityAlertPolicyListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDatabaseSecurityAlertPolicyListResult.
type ManagedDatabaseSecurityEventsClient ¶
type ManagedDatabaseSecurityEventsClient struct {
// contains filtered or unexported fields
}
ManagedDatabaseSecurityEventsClient contains the methods for the ManagedDatabaseSecurityEvents group. Don't use this type directly, use NewManagedDatabaseSecurityEventsClient() instead.
func NewManagedDatabaseSecurityEventsClient ¶
func NewManagedDatabaseSecurityEventsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseSecurityEventsClient, error)
NewManagedDatabaseSecurityEventsClient creates a new instance of ManagedDatabaseSecurityEventsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedDatabaseSecurityEventsClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *ManagedDatabaseSecurityEventsClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseSecurityEventsClientListByDatabaseOptions) *runtime.Pager[ManagedDatabaseSecurityEventsClientListByDatabaseResponse]
NewListByDatabasePager - Gets a list of security events.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the managed database for which the security events are retrieved.
- options - ManagedDatabaseSecurityEventsClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseSecurityEventsClient.NewListByDatabasePager method.
Example (GetTheManagedDatabasesSecurityEventsWithMaximalParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSecurityEventsGetMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedDatabaseSecurityEventsClient().NewListByDatabasePager("testrg", "testcl", "database1", &armsql.ManagedDatabaseSecurityEventsClientListByDatabaseOptions{Filter: to.Ptr("ShowServerRecords eq true"), Skip: to.Ptr[int32](0), Top: to.Ptr[int32](1), Skiptoken: to.Ptr("eyJCbG9iTmFtZURhdGVUaW1lIjoiXC9EYXRlKDE1MTIyODg4MTIwMTArMDIwMClcLyIsIkJsb2JOYW1lUm9sbG92ZXJJbmRleCI6IjAiLCJFbmREYXRlIjoiXC9EYXRlKDE1MTI0NjYyMDA1MjkpXC8iLCJJc1NraXBUb2tlblNldCI6ZmFsc2UsIklzVjJCbG9iVGltZUZvcm1hdCI6dHJ1ZSwiU2hvd1NlcnZlclJlY29yZHMiOmZhbHNlLCJTa2lwVmFsdWUiOjAsIlRha2VWYWx1ZSI6MTB9"), }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SecurityEventCollection = armsql.SecurityEventCollection{ // Value: []*armsql.SecurityEvent{ // { // Name: to.Ptr("06364798761800000000000000001"), // Type: to.Ptr("Microsoft.Sql/servers/databases/securityEvents"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/database1/securityEvents/06364798761800000000000000001"), // Properties: &armsql.SecurityEventProperties{ // ApplicationName: to.Ptr("myApp"), // ClientIP: to.Ptr("10.166.113.220"), // Database: to.Ptr("database1"), // EventTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-24T10:13:24.729Z"); return t}()), // PrincipalName: to.Ptr("maliciousUser"), // SecurityEventSQLInjectionAdditionalProperties: &armsql.SecurityEventSQLInjectionAdditionalProperties{ // ErrorCode: to.Ptr[int32](0), // ErrorMessage: to.Ptr(""), // ErrorSeverity: to.Ptr[int32](0), // Statement: to.Ptr("select * from sys.databases where database_id like '' or 1 = 1 --' and family = 'test11'"), // StatementHighlightLength: to.Ptr[int32](13), // StatementHighlightOffset: to.Ptr[int32](52), // ThreatID: to.Ptr("1"), // }, // SecurityEventType: to.Ptr(armsql.SecurityEventTypeSQLInjectionExploit), // Server: to.Ptr("testcl"), // Subscription: to.Ptr("00000000-1111-2222-3333-444444444444"), // }, // }}, // } } }
Output:
Example (GetTheManagedDatabasesSecurityEventsWithMinimalParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSecurityEventsGetMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedDatabaseSecurityEventsClient().NewListByDatabasePager("testrg", "testcl", "database1", &armsql.ManagedDatabaseSecurityEventsClientListByDatabaseOptions{Filter: nil, Skip: nil, Top: nil, Skiptoken: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SecurityEventCollection = armsql.SecurityEventCollection{ // Value: []*armsql.SecurityEvent{ // { // Name: to.Ptr("06364798761800000000000000001"), // Type: to.Ptr("Microsoft.Sql/servers/databases/securityEvents"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/database1/securityEvents/06364798761800000000000000001"), // Properties: &armsql.SecurityEventProperties{ // ApplicationName: to.Ptr("myApp"), // ClientIP: to.Ptr("10.166.113.220"), // Database: to.Ptr("database1"), // EventTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-24T10:13:24.729Z"); return t}()), // PrincipalName: to.Ptr("maliciousUser"), // SecurityEventSQLInjectionAdditionalProperties: &armsql.SecurityEventSQLInjectionAdditionalProperties{ // ErrorCode: to.Ptr[int32](0), // ErrorMessage: to.Ptr(""), // ErrorSeverity: to.Ptr[int32](0), // Statement: to.Ptr("select * from sys.databases where database_id like '' or 1 = 1 --' and family = 'test11'"), // StatementHighlightLength: to.Ptr[int32](13), // StatementHighlightOffset: to.Ptr[int32](52), // ThreatID: to.Ptr("1"), // }, // SecurityEventType: to.Ptr(armsql.SecurityEventTypeSQLInjectionExploit), // Server: to.Ptr("testcl"), // Subscription: to.Ptr("00000000-1111-2222-3333-444444444444"), // }, // }, // { // Name: to.Ptr("06364798761800000000000000002"), // Type: to.Ptr("Microsoft.Sql/servers/databases/securityEvents"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/database1/securityEvents/06364798761800000000000000002"), // Properties: &armsql.SecurityEventProperties{ // ApplicationName: to.Ptr("myApp"), // ClientIP: to.Ptr("10.166.113.220"), // Database: to.Ptr("database1"), // EventTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-24T10:11:14.121Z"); return t}()), // PrincipalName: to.Ptr("maliciousUser"), // SecurityEventSQLInjectionAdditionalProperties: &armsql.SecurityEventSQLInjectionAdditionalProperties{ // ErrorCode: to.Ptr[int32](0), // ErrorMessage: to.Ptr(""), // ErrorSeverity: to.Ptr[int32](0), // Statement: to.Ptr("select * from sys.databases where database_id like '' or 1 = 1 --' and family = 'test10'"), // StatementHighlightLength: to.Ptr[int32](13), // StatementHighlightOffset: to.Ptr[int32](52), // ThreatID: to.Ptr("1"), // }, // SecurityEventType: to.Ptr(armsql.SecurityEventTypeSQLInjectionExploit), // Server: to.Ptr("testcl"), // Subscription: to.Ptr("00000000-1111-2222-3333-444444444444"), // }, // }, // { // Name: to.Ptr("06364798761800000000000000003"), // Type: to.Ptr("Microsoft.Sql/servers/databases/securityEvents"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/database1/securityEvents/06364798761800000000000000003"), // Properties: &armsql.SecurityEventProperties{ // ApplicationName: to.Ptr("myApp"), // ClientIP: to.Ptr("10.166.113.220"), // Database: to.Ptr("database1"), // EventTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-24T10:03:17.066Z"); return t}()), // PrincipalName: to.Ptr("maliciousUser"), // SecurityEventSQLInjectionAdditionalProperties: &armsql.SecurityEventSQLInjectionAdditionalProperties{ // ErrorCode: to.Ptr[int32](0), // ErrorMessage: to.Ptr(""), // ErrorSeverity: to.Ptr[int32](0), // Statement: to.Ptr("select * from sys.databases where database_id like '' or 1 = 1 --' and family = 'test9'"), // StatementHighlightLength: to.Ptr[int32](13), // StatementHighlightOffset: to.Ptr[int32](52), // ThreatID: to.Ptr("1"), // }, // SecurityEventType: to.Ptr(armsql.SecurityEventTypeSQLInjectionExploit), // Server: to.Ptr("testcl"), // Subscription: to.Ptr("00000000-1111-2222-3333-444444444444"), // }, // }}, // } } }
Output:
type ManagedDatabaseSecurityEventsClientListByDatabaseOptions ¶ added in v0.3.0
type ManagedDatabaseSecurityEventsClientListByDatabaseOptions struct { // An OData filter expression that filters elements in the collection. Filter *string // The number of elements in the collection to skip. Skip *int32 // An opaque token that identifies a starting point in the collection. Skiptoken *string // The number of elements to return from the collection. Top *int32 }
ManagedDatabaseSecurityEventsClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseSecurityEventsClient.NewListByDatabasePager method.
type ManagedDatabaseSecurityEventsClientListByDatabaseResponse ¶ added in v0.3.0
type ManagedDatabaseSecurityEventsClientListByDatabaseResponse struct { // A list of security events. SecurityEventCollection }
ManagedDatabaseSecurityEventsClientListByDatabaseResponse contains the response from method ManagedDatabaseSecurityEventsClient.NewListByDatabasePager.
type ManagedDatabaseSensitivityLabelsClient ¶
type ManagedDatabaseSensitivityLabelsClient struct {
// contains filtered or unexported fields
}
ManagedDatabaseSensitivityLabelsClient contains the methods for the ManagedDatabaseSensitivityLabels group. Don't use this type directly, use NewManagedDatabaseSensitivityLabelsClient() instead.
func NewManagedDatabaseSensitivityLabelsClient ¶
func NewManagedDatabaseSensitivityLabelsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseSensitivityLabelsClient, error)
NewManagedDatabaseSensitivityLabelsClient creates a new instance of ManagedDatabaseSensitivityLabelsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedDatabaseSensitivityLabelsClient) CreateOrUpdate ¶
func (client *ManagedDatabaseSensitivityLabelsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string, parameters SensitivityLabel, options *ManagedDatabaseSensitivityLabelsClientCreateOrUpdateOptions) (ManagedDatabaseSensitivityLabelsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates the sensitivity label of a given column If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- schemaName - The name of the schema.
- tableName - The name of the table.
- columnName - The name of the column.
- parameters - The column sensitivity label resource.
- options - ManagedDatabaseSensitivityLabelsClientCreateOrUpdateOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseColumnSensitivityLabelCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedDatabaseSensitivityLabelsClient().CreateOrUpdate(ctx, "myRG", "myManagedInstanceName", "myDatabase", "dbo", "myTable", "myColumn", armsql.SensitivityLabel{ Properties: &armsql.SensitivityLabelProperties{ InformationType: to.Ptr("PhoneNumber"), InformationTypeID: to.Ptr("d22fa6e9-5ee4-3bde-4c2b-a409604c4646"), LabelID: to.Ptr("bf91e08c-f4f0-478a-b016-25164b2a65ff"), LabelName: to.Ptr("PII"), Rank: to.Ptr(armsql.SensitivityLabelRankHigh), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SensitivityLabel = armsql.SensitivityLabel{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current"), // Properties: &armsql.SensitivityLabelProperties{ // ColumnName: to.Ptr("myColumn"), // InformationType: to.Ptr("PhoneNumber"), // InformationTypeID: to.Ptr("d22fa6e9-5ee4-3bde-4c2b-a409604c4646"), // LabelID: to.Ptr("bf91e08c-f4f0-478a-b016-25164b2a65ff"), // LabelName: to.Ptr("PII"), // Rank: to.Ptr(armsql.SensitivityLabelRankHigh), // SchemaName: to.Ptr("dbo"), // TableName: to.Ptr("myTable"), // }, // } }
Output:
func (*ManagedDatabaseSensitivityLabelsClient) Delete ¶
func (client *ManagedDatabaseSensitivityLabelsClient) Delete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string, options *ManagedDatabaseSensitivityLabelsClientDeleteOptions) (ManagedDatabaseSensitivityLabelsClientDeleteResponse, error)
Delete - Deletes the sensitivity label of a given column If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- schemaName - The name of the schema.
- tableName - The name of the table.
- columnName - The name of the column.
- options - ManagedDatabaseSensitivityLabelsClientDeleteOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseColumnSensitivityLabelDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewManagedDatabaseSensitivityLabelsClient().Delete(ctx, "myRG", "myManagedInstanceName", "myDatabase", "dbo", "myTable", "myColumn", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*ManagedDatabaseSensitivityLabelsClient) DisableRecommendation ¶
func (client *ManagedDatabaseSensitivityLabelsClient) DisableRecommendation(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string, options *ManagedDatabaseSensitivityLabelsClientDisableRecommendationOptions) (ManagedDatabaseSensitivityLabelsClientDisableRecommendationResponse, error)
DisableRecommendation - Disables sensitivity recommendations on a given column If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- schemaName - The name of the schema.
- tableName - The name of the table.
- columnName - The name of the column.
- options - ManagedDatabaseSensitivityLabelsClientDisableRecommendationOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.DisableRecommendation method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelDisable.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewManagedDatabaseSensitivityLabelsClient().DisableRecommendation(ctx, "myRG", "myManagedInstanceName", "myDatabase", "dbo", "myTable", "myColumn", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*ManagedDatabaseSensitivityLabelsClient) EnableRecommendation ¶
func (client *ManagedDatabaseSensitivityLabelsClient) EnableRecommendation(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string, options *ManagedDatabaseSensitivityLabelsClientEnableRecommendationOptions) (ManagedDatabaseSensitivityLabelsClientEnableRecommendationResponse, error)
EnableRecommendation - Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns) If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- schemaName - The name of the schema.
- tableName - The name of the table.
- columnName - The name of the column.
- options - ManagedDatabaseSensitivityLabelsClientEnableRecommendationOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.EnableRecommendation method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelEnable.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewManagedDatabaseSensitivityLabelsClient().EnableRecommendation(ctx, "myRG", "myManagedInstanceName", "myDatabase", "dbo", "myTable", "myColumn", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*ManagedDatabaseSensitivityLabelsClient) Get ¶
func (client *ManagedDatabaseSensitivityLabelsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string, sensitivityLabelSource SensitivityLabelSource, options *ManagedDatabaseSensitivityLabelsClientGetOptions) (ManagedDatabaseSensitivityLabelsClientGetResponse, error)
Get - Gets the sensitivity label of a given column If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- schemaName - The name of the schema.
- tableName - The name of the table.
- columnName - The name of the column.
- sensitivityLabelSource - The source of the sensitivity label.
- options - ManagedDatabaseSensitivityLabelsClientGetOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseColumnSensitivityLabelGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedDatabaseSensitivityLabelsClient().Get(ctx, "myRG", "myManagedInstanceName", "myDatabase", "dbo", "myTable", "myColumn", armsql.SensitivityLabelSourceCurrent, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SensitivityLabel = armsql.SensitivityLabel{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current"), // Properties: &armsql.SensitivityLabelProperties{ // ColumnName: to.Ptr("myColumn"), // InformationType: to.Ptr("PhoneNumber"), // InformationTypeID: to.Ptr("d22fa6e9-5ee4-3bde-4c2b-a409604c4646"), // LabelID: to.Ptr("bf91e08c-f4f0-478a-b016-25164b2a65ff"), // LabelName: to.Ptr("PII"), // Rank: to.Ptr(armsql.SensitivityLabelRankLow), // SchemaName: to.Ptr("dbo"), // TableName: to.Ptr("myTable"), // }, // } }
Output:
func (*ManagedDatabaseSensitivityLabelsClient) NewListCurrentByDatabasePager ¶ added in v0.5.0
func (client *ManagedDatabaseSensitivityLabelsClient) NewListCurrentByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseOptions) *runtime.Pager[ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseResponse]
NewListCurrentByDatabasePager - Gets the sensitivity labels of a given database
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- options - ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.NewListCurrentByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSensitivityLabelsListByDatabaseCurrent.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedDatabaseSensitivityLabelsClient().NewListCurrentByDatabasePager("myRG", "myManagedInstanceName", "myDatabase", &armsql.ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseOptions{SkipToken: nil, Count: nil, Filter: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SensitivityLabelListResult = armsql.SensitivityLabelListResult{ // Value: []*armsql.SensitivityLabel{ // { // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current"), // Properties: &armsql.SensitivityLabelProperties{ // ColumnName: to.Ptr("myColumn"), // InformationType: to.Ptr("Financial"), // InformationTypeID: to.Ptr("d22fa6e9-5ee4-3bde-4c2b-a409604c4646"), // LabelID: to.Ptr("05e6eaa1-075a-4fb4-a732-a92215a2444a"), // LabelName: to.Ptr("Sensitive"), // Rank: to.Ptr(armsql.SensitivityLabelRankCritical), // SchemaName: to.Ptr("dbo"), // TableName: to.Ptr("myTable"), // }, // }, // { // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn3/sensitivityLabels/current"), // Properties: &armsql.SensitivityLabelProperties{ // ColumnName: to.Ptr("myColumn3"), // InformationType: to.Ptr("Email"), // InformationTypeID: to.Ptr("d22fa6e9-5ee4-3bde-4c2b-a409604c4646"), // LabelID: to.Ptr("bf91e08c-f4f0-478a-b016-25164b2a65ff"), // LabelName: to.Ptr("PII"), // Rank: to.Ptr(armsql.SensitivityLabelRankHigh), // SchemaName: to.Ptr("dbo"), // TableName: to.Ptr("myTable"), // }, // }}, // } } }
Output:
func (*ManagedDatabaseSensitivityLabelsClient) NewListRecommendedByDatabasePager ¶ added in v0.5.0
func (client *ManagedDatabaseSensitivityLabelsClient) NewListRecommendedByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseOptions) *runtime.Pager[ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseResponse]
NewListRecommendedByDatabasePager - Gets the sensitivity labels of a given database
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- options - ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.NewListRecommendedByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSensitivityLabelsListByDatabaseRecommended.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedDatabaseSensitivityLabelsClient().NewListRecommendedByDatabasePager("myRG", "myManagedInstanceName", "myDatabase", &armsql.ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseOptions{SkipToken: nil, IncludeDisabledRecommendations: nil, Filter: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SensitivityLabelListResult = armsql.SensitivityLabelListResult{ // Value: []*armsql.SensitivityLabel{ // { // Name: to.Ptr("recommended"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn2/sensitivityLabels/recommended"), // Properties: &armsql.SensitivityLabelProperties{ // ColumnName: to.Ptr("myColumn2"), // InformationType: to.Ptr("Financial"), // InformationTypeID: to.Ptr("d22fa6e9-5ee4-3bde-4c2b-a409604c4646"), // LabelID: to.Ptr("05e6eaa1-075a-4fb4-a732-a92215a2444a"), // LabelName: to.Ptr("Sensitive"), // SchemaName: to.Ptr("dbo"), // TableName: to.Ptr("myTable"), // }, // }, // { // Name: to.Ptr("recommended"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/schemas/tables/columns/sensitivityLabels"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn4/sensitivityLabels/recommended"), // Properties: &armsql.SensitivityLabelProperties{ // ColumnName: to.Ptr("myColumn4"), // InformationType: to.Ptr("Email"), // InformationTypeID: to.Ptr("d22fa6e9-5ee4-3bde-4c2b-a409604c4646"), // LabelID: to.Ptr("bf91e08c-f4f0-478a-b016-25164b2a65ff"), // LabelName: to.Ptr("PII"), // SchemaName: to.Ptr("dbo"), // TableName: to.Ptr("myTable"), // }, // }}, // } } }
Output:
func (*ManagedDatabaseSensitivityLabelsClient) Update ¶
func (client *ManagedDatabaseSensitivityLabelsClient) Update(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters SensitivityLabelUpdateList, options *ManagedDatabaseSensitivityLabelsClientUpdateOptions) (ManagedDatabaseSensitivityLabelsClientUpdateResponse, error)
Update - Update sensitivity labels of a given database using an operations batch. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- options - ManagedDatabaseSensitivityLabelsClientUpdateOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSensitivityLabelsCurrentUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewManagedDatabaseSensitivityLabelsClient().Update(ctx, "myRG", "myManagedInstanceName", "myDatabase", armsql.SensitivityLabelUpdateList{ Operations: []*armsql.SensitivityLabelUpdate{ { Properties: &armsql.SensitivityLabelUpdateProperties{ Schema: to.Ptr("dbo"), Column: to.Ptr("column1"), Op: to.Ptr(armsql.SensitivityLabelUpdateKindSet), SensitivityLabel: &armsql.SensitivityLabel{ Properties: &armsql.SensitivityLabelProperties{ InformationType: to.Ptr("Financial"), InformationTypeID: to.Ptr("1D3652D6-422C-4115-82F1-65DAEBC665C8"), LabelID: to.Ptr("3A477B16-9423-432B-AA97-6069B481CEC3"), LabelName: to.Ptr("Highly Confidential"), }, }, Table: to.Ptr("table1"), }, }, { Properties: &armsql.SensitivityLabelUpdateProperties{ Schema: to.Ptr("dbo"), Column: to.Ptr("column2"), Op: to.Ptr(armsql.SensitivityLabelUpdateKindSet), SensitivityLabel: &armsql.SensitivityLabel{ Properties: &armsql.SensitivityLabelProperties{ InformationType: to.Ptr("PhoneNumber"), InformationTypeID: to.Ptr("d22fa6e9-5ee4-3bde-4c2b-a409604c4646"), LabelID: to.Ptr("bf91e08c-f4f0-478a-b016-25164b2a65ff"), LabelName: to.Ptr("PII"), }, }, Table: to.Ptr("table2"), }, }, { Properties: &armsql.SensitivityLabelUpdateProperties{ Schema: to.Ptr("dbo"), Column: to.Ptr("Column3"), Op: to.Ptr(armsql.SensitivityLabelUpdateKindRemove), Table: to.Ptr("Table1"), }, }}, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
type ManagedDatabaseSensitivityLabelsClientCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientCreateOrUpdateOptions struct { }
ManagedDatabaseSensitivityLabelsClientCreateOrUpdateOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.CreateOrUpdate method.
type ManagedDatabaseSensitivityLabelsClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientCreateOrUpdateResponse struct { // A sensitivity label. SensitivityLabel }
ManagedDatabaseSensitivityLabelsClientCreateOrUpdateResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.CreateOrUpdate.
type ManagedDatabaseSensitivityLabelsClientDeleteOptions ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientDeleteOptions struct { }
ManagedDatabaseSensitivityLabelsClientDeleteOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.Delete method.
type ManagedDatabaseSensitivityLabelsClientDeleteResponse ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientDeleteResponse struct { }
ManagedDatabaseSensitivityLabelsClientDeleteResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.Delete.
type ManagedDatabaseSensitivityLabelsClientDisableRecommendationOptions ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientDisableRecommendationOptions struct { }
ManagedDatabaseSensitivityLabelsClientDisableRecommendationOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.DisableRecommendation method.
type ManagedDatabaseSensitivityLabelsClientDisableRecommendationResponse ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientDisableRecommendationResponse struct { }
ManagedDatabaseSensitivityLabelsClientDisableRecommendationResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.DisableRecommendation.
type ManagedDatabaseSensitivityLabelsClientEnableRecommendationOptions ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientEnableRecommendationOptions struct { }
ManagedDatabaseSensitivityLabelsClientEnableRecommendationOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.EnableRecommendation method.
type ManagedDatabaseSensitivityLabelsClientEnableRecommendationResponse ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientEnableRecommendationResponse struct { }
ManagedDatabaseSensitivityLabelsClientEnableRecommendationResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.EnableRecommendation.
type ManagedDatabaseSensitivityLabelsClientGetOptions ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientGetOptions struct { }
ManagedDatabaseSensitivityLabelsClientGetOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.Get method.
type ManagedDatabaseSensitivityLabelsClientGetResponse ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientGetResponse struct { // A sensitivity label. SensitivityLabel }
ManagedDatabaseSensitivityLabelsClientGetResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.Get.
type ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseOptions ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseOptions struct { Count *bool // An OData filter expression that filters elements in the collection. Filter *string SkipToken *string }
ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.NewListCurrentByDatabasePager method.
type ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseResponse ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseResponse struct { // A list of sensitivity labels. SensitivityLabelListResult }
ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.NewListCurrentByDatabasePager.
type ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseOptions ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseOptions struct { // An OData filter expression that filters elements in the collection. Filter *string // Specifies whether to include disabled recommendations or not. IncludeDisabledRecommendations *bool SkipToken *string }
ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.NewListRecommendedByDatabasePager method.
type ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseResponse ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseResponse struct { // A list of sensitivity labels. SensitivityLabelListResult }
ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.NewListRecommendedByDatabasePager.
type ManagedDatabaseSensitivityLabelsClientUpdateOptions ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientUpdateOptions struct { }
ManagedDatabaseSensitivityLabelsClientUpdateOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.Update method.
type ManagedDatabaseSensitivityLabelsClientUpdateResponse ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientUpdateResponse struct { }
ManagedDatabaseSensitivityLabelsClientUpdateResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.Update.
type ManagedDatabaseStatus ¶
type ManagedDatabaseStatus string
ManagedDatabaseStatus - Status of the database.
const ( ManagedDatabaseStatusCreating ManagedDatabaseStatus = "Creating" ManagedDatabaseStatusInaccessible ManagedDatabaseStatus = "Inaccessible" ManagedDatabaseStatusOffline ManagedDatabaseStatus = "Offline" ManagedDatabaseStatusOnline ManagedDatabaseStatus = "Online" ManagedDatabaseStatusRestoring ManagedDatabaseStatus = "Restoring" ManagedDatabaseStatusShutdown ManagedDatabaseStatus = "Shutdown" ManagedDatabaseStatusUpdating ManagedDatabaseStatus = "Updating" )
func PossibleManagedDatabaseStatusValues ¶
func PossibleManagedDatabaseStatusValues() []ManagedDatabaseStatus
PossibleManagedDatabaseStatusValues returns the possible values for the ManagedDatabaseStatus const type.
type ManagedDatabaseTablesClient ¶
type ManagedDatabaseTablesClient struct {
// contains filtered or unexported fields
}
ManagedDatabaseTablesClient contains the methods for the ManagedDatabaseTables group. Don't use this type directly, use NewManagedDatabaseTablesClient() instead.
func NewManagedDatabaseTablesClient ¶
func NewManagedDatabaseTablesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseTablesClient, error)
NewManagedDatabaseTablesClient creates a new instance of ManagedDatabaseTablesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedDatabaseTablesClient) Get ¶
func (client *ManagedDatabaseTablesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, options *ManagedDatabaseTablesClientGetOptions) (ManagedDatabaseTablesClientGetResponse, error)
Get - Get managed database table If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- schemaName - The name of the schema.
- tableName - The name of the table.
- options - ManagedDatabaseTablesClientGetOptions contains the optional parameters for the ManagedDatabaseTablesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseTableGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedDatabaseTablesClient().Get(ctx, "myRG", "myManagedInstanceName", "myDatabase", "dbo", "table1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseTable = armsql.DatabaseTable{ // Name: to.Ptr("table1"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/schemas/tables"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/table1"), // } }
Output:
func (*ManagedDatabaseTablesClient) NewListBySchemaPager ¶ added in v0.5.0
func (client *ManagedDatabaseTablesClient) NewListBySchemaPager(resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, options *ManagedDatabaseTablesClientListBySchemaOptions) *runtime.Pager[ManagedDatabaseTablesClientListBySchemaResponse]
NewListBySchemaPager - List managed database tables
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- schemaName - The name of the schema.
- options - ManagedDatabaseTablesClientListBySchemaOptions contains the optional parameters for the ManagedDatabaseTablesClient.NewListBySchemaPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseTableListBySchema.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedDatabaseTablesClient().NewListBySchemaPager("myRG", "myManagedInstanceName", "myDatabase", "dbo", &armsql.ManagedDatabaseTablesClientListBySchemaOptions{Filter: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DatabaseTableListResult = armsql.DatabaseTableListResult{ // Value: []*armsql.DatabaseTable{ // { // Name: to.Ptr("table1"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/schemas/tables"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/table1"), // }, // { // Name: to.Ptr("table2"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/schemas/tables"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/managedInstances/myManagedInstanceName/databases/myDatabase/schemas/dbo/tables/table2"), // }}, // } } }
Output:
type ManagedDatabaseTablesClientGetOptions ¶ added in v0.3.0
type ManagedDatabaseTablesClientGetOptions struct { }
ManagedDatabaseTablesClientGetOptions contains the optional parameters for the ManagedDatabaseTablesClient.Get method.
type ManagedDatabaseTablesClientGetResponse ¶ added in v0.3.0
type ManagedDatabaseTablesClientGetResponse struct { // A database table resource. DatabaseTable }
ManagedDatabaseTablesClientGetResponse contains the response from method ManagedDatabaseTablesClient.Get.
type ManagedDatabaseTablesClientListBySchemaOptions ¶ added in v0.3.0
type ManagedDatabaseTablesClientListBySchemaOptions struct { // An OData filter expression that filters elements in the collection. Filter *string }
ManagedDatabaseTablesClientListBySchemaOptions contains the optional parameters for the ManagedDatabaseTablesClient.NewListBySchemaPager method.
type ManagedDatabaseTablesClientListBySchemaResponse ¶ added in v0.3.0
type ManagedDatabaseTablesClientListBySchemaResponse struct { // A list of database tables. DatabaseTableListResult }
ManagedDatabaseTablesClientListBySchemaResponse contains the response from method ManagedDatabaseTablesClient.NewListBySchemaPager.
type ManagedDatabaseTransparentDataEncryptionClient ¶
type ManagedDatabaseTransparentDataEncryptionClient struct {
// contains filtered or unexported fields
}
ManagedDatabaseTransparentDataEncryptionClient contains the methods for the ManagedDatabaseTransparentDataEncryption group. Don't use this type directly, use NewManagedDatabaseTransparentDataEncryptionClient() instead.
func NewManagedDatabaseTransparentDataEncryptionClient ¶
func NewManagedDatabaseTransparentDataEncryptionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseTransparentDataEncryptionClient, error)
NewManagedDatabaseTransparentDataEncryptionClient creates a new instance of ManagedDatabaseTransparentDataEncryptionClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedDatabaseTransparentDataEncryptionClient) CreateOrUpdate ¶
func (client *ManagedDatabaseTransparentDataEncryptionClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, tdeName TransparentDataEncryptionName, parameters ManagedTransparentDataEncryption, options *ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateOptions) (ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateResponse, error)
CreateOrUpdate - Updates a database's transparent data encryption configuration. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the managed database for which the security alert policy is defined.
- tdeName - The name of the transparent data encryption configuration.
- parameters - The database transparent data encryption.
- options - ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateOptions contains the optional parameters for the ManagedDatabaseTransparentDataEncryptionClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedTransparentDataEncryptionUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedDatabaseTransparentDataEncryptionClient().CreateOrUpdate(ctx, "securitytde-42-rg", "securitytde-42", "testdb", armsql.TransparentDataEncryptionNameCurrent, armsql.ManagedTransparentDataEncryption{ Properties: &armsql.ManagedTransparentDataEncryptionProperties{ State: to.Ptr(armsql.TransparentDataEncryptionStateEnabled), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedTransparentDataEncryption = armsql.ManagedTransparentDataEncryption{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/managedInstance/databases/transparentDataEncryption"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securitytde-42-rg/providers/Microsoft.Sql/managedInstances/securitytde-42/databases/testdb/transparentDataEncryption"), // Properties: &armsql.ManagedTransparentDataEncryptionProperties{ // State: to.Ptr(armsql.TransparentDataEncryptionStateEnabled), // }, // } }
Output:
func (*ManagedDatabaseTransparentDataEncryptionClient) Get ¶
func (client *ManagedDatabaseTransparentDataEncryptionClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, tdeName TransparentDataEncryptionName, options *ManagedDatabaseTransparentDataEncryptionClientGetOptions) (ManagedDatabaseTransparentDataEncryptionClientGetResponse, error)
Get - Gets a managed database's transparent data encryption. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the managed database for which the transparent data encryption is defined.
- tdeName - The name of the transparent data encryption configuration.
- options - ManagedDatabaseTransparentDataEncryptionClientGetOptions contains the optional parameters for the ManagedDatabaseTransparentDataEncryptionClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedTransparentDataEncryptionGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedDatabaseTransparentDataEncryptionClient().Get(ctx, "security-tde-resourcegroup", "securitytde", "testdb", armsql.TransparentDataEncryptionNameCurrent, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedTransparentDataEncryption = armsql.ManagedTransparentDataEncryption{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/transparentDataEncryption"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/security-tde-resourcegroup/providers/Microsoft.Sql/managedInstances/securitytde/databases/testdb"), // Properties: &armsql.ManagedTransparentDataEncryptionProperties{ // State: to.Ptr(armsql.TransparentDataEncryptionStateEnabled), // }, // } }
Output:
func (*ManagedDatabaseTransparentDataEncryptionClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *ManagedDatabaseTransparentDataEncryptionClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseTransparentDataEncryptionClientListByDatabaseOptions) *runtime.Pager[ManagedDatabaseTransparentDataEncryptionClientListByDatabaseResponse]
NewListByDatabasePager - Gets a list of managed database's transparent data encryptions.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the managed database for which the transparent data encryption is defined.
- options - ManagedDatabaseTransparentDataEncryptionClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseTransparentDataEncryptionClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedTransparentDataEncryptionList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedDatabaseTransparentDataEncryptionClient().NewListByDatabasePager("security-tde-resourcegroup", "securitytde", "testdb", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedTransparentDataEncryptionListResult = armsql.ManagedTransparentDataEncryptionListResult{ // Value: []*armsql.ManagedTransparentDataEncryption{ // { // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/transparentDataEncryption"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/security-tde-resourcegroup/providers/Microsoft.Sql/managedInstances/securitytde/databases/testdb"), // Properties: &armsql.ManagedTransparentDataEncryptionProperties{ // State: to.Ptr(armsql.TransparentDataEncryptionStateEnabled), // }, // }}, // } } }
Output:
type ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateOptions struct { }
ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateOptions contains the optional parameters for the ManagedDatabaseTransparentDataEncryptionClient.CreateOrUpdate method.
type ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateResponse struct { // A managed database transparent data encryption state. ManagedTransparentDataEncryption }
ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateResponse contains the response from method ManagedDatabaseTransparentDataEncryptionClient.CreateOrUpdate.
type ManagedDatabaseTransparentDataEncryptionClientGetOptions ¶ added in v0.3.0
type ManagedDatabaseTransparentDataEncryptionClientGetOptions struct { }
ManagedDatabaseTransparentDataEncryptionClientGetOptions contains the optional parameters for the ManagedDatabaseTransparentDataEncryptionClient.Get method.
type ManagedDatabaseTransparentDataEncryptionClientGetResponse ¶ added in v0.3.0
type ManagedDatabaseTransparentDataEncryptionClientGetResponse struct { // A managed database transparent data encryption state. ManagedTransparentDataEncryption }
ManagedDatabaseTransparentDataEncryptionClientGetResponse contains the response from method ManagedDatabaseTransparentDataEncryptionClient.Get.
type ManagedDatabaseTransparentDataEncryptionClientListByDatabaseOptions ¶ added in v0.3.0
type ManagedDatabaseTransparentDataEncryptionClientListByDatabaseOptions struct { }
ManagedDatabaseTransparentDataEncryptionClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseTransparentDataEncryptionClient.NewListByDatabasePager method.
type ManagedDatabaseTransparentDataEncryptionClientListByDatabaseResponse ¶ added in v0.3.0
type ManagedDatabaseTransparentDataEncryptionClientListByDatabaseResponse struct { // A list of managed transparent data encryptions ManagedTransparentDataEncryptionListResult }
ManagedDatabaseTransparentDataEncryptionClientListByDatabaseResponse contains the response from method ManagedDatabaseTransparentDataEncryptionClient.NewListByDatabasePager.
type ManagedDatabaseUpdate ¶
type ManagedDatabaseUpdate struct { // Resource properties. Properties *ManagedDatabaseProperties // Resource tags. Tags map[string]*string }
ManagedDatabaseUpdate - An managed database update.
func (ManagedDatabaseUpdate) MarshalJSON ¶
func (m ManagedDatabaseUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedDatabaseUpdate.
func (*ManagedDatabaseUpdate) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedDatabaseUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDatabaseUpdate.
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient ¶
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient struct {
// contains filtered or unexported fields
}
ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient contains the methods for the ManagedDatabaseVulnerabilityAssessmentRuleBaselines group. Don't use this type directly, use NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient() instead.
func NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient ¶
func NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient, error)
NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient creates a new instance of ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdate ¶
func (client *ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, parameters DatabaseVulnerabilityAssessmentRuleBaseline, options *ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions) (ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates a database's vulnerability assessment rule baseline. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database for which the vulnerability assessment rule baseline is defined.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- ruleID - The vulnerability assessment rule ID.
- baselineName - The name of the vulnerability assessment rule baseline (default implies a baseline on a database level rule and master for server level rule).
- parameters - The requested rule baseline resource.
- options - ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient().CreateOrUpdate(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", armsql.VulnerabilityAssessmentNameDefault, "VA1001", armsql.VulnerabilityAssessmentPolicyBaselineNameDefault, armsql.DatabaseVulnerabilityAssessmentRuleBaseline{ Properties: &armsql.DatabaseVulnerabilityAssessmentRuleBaselineProperties{ BaselineResults: []*armsql.DatabaseVulnerabilityAssessmentRuleBaselineItem{ { Result: []*string{ to.Ptr("userA"), to.Ptr("SELECT")}, }, { Result: []*string{ to.Ptr("userB"), to.Ptr("SELECT")}, }, { Result: []*string{ to.Ptr("userC"), to.Ptr("SELECT"), to.Ptr("tableId_4")}, }}, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseVulnerabilityAssessmentRuleBaseline = armsql.DatabaseVulnerabilityAssessmentRuleBaseline{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/vulnerabilityAssessments/rules/baselines"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/rules/VA1001/baselines/default"), // Properties: &armsql.DatabaseVulnerabilityAssessmentRuleBaselineProperties{ // BaselineResults: []*armsql.DatabaseVulnerabilityAssessmentRuleBaselineItem{ // { // Result: []*string{ // to.Ptr("userA"), // to.Ptr("SELECT")}, // }, // { // Result: []*string{ // to.Ptr("userB"), // to.Ptr("SELECT")}, // }, // { // Result: []*string{ // to.Ptr("userC"), // to.Ptr("SELECT"), // to.Ptr("tableId_4")}, // }}, // }, // } }
Output:
func (*ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient) Delete ¶
func (client *ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient) Delete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, options *ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions) (ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse, error)
Delete - Removes the database's vulnerability assessment rule baseline. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database for which the vulnerability assessment rule baseline is defined.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- ruleID - The vulnerability assessment rule ID.
- baselineName - The name of the vulnerability assessment rule baseline (default implies a baseline on a database level rule and master for server level rule).
- options - ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient().Delete(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", armsql.VulnerabilityAssessmentNameDefault, "VA1001", armsql.VulnerabilityAssessmentPolicyBaselineNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient) Get ¶
func (client *ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, ruleID string, baselineName VulnerabilityAssessmentPolicyBaselineName, options *ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions) (ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse, error)
Get - Gets a database's vulnerability assessment rule baseline. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database for which the vulnerability assessment rule baseline is defined.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- ruleID - The vulnerability assessment rule ID.
- baselineName - The name of the vulnerability assessment rule baseline (default implies a baseline on a database level rule and master for server level rule).
- options - ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient().Get(ctx, "vulnerabilityaseessmenttest-4711", "vulnerabilityaseessmenttest-6411", "testdb", armsql.VulnerabilityAssessmentNameDefault, "VA1001", armsql.VulnerabilityAssessmentPolicyBaselineNameMaster, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseVulnerabilityAssessmentRuleBaseline = armsql.DatabaseVulnerabilityAssessmentRuleBaseline{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/vulnerabilityAssessments/rules/baselines"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/rules/VA1001/baselines/default"), // Properties: &armsql.DatabaseVulnerabilityAssessmentRuleBaselineProperties{ // BaselineResults: []*armsql.DatabaseVulnerabilityAssessmentRuleBaselineItem{ // { // Result: []*string{ // to.Ptr("userA"), // to.Ptr("SELECT")}, // }, // { // Result: []*string{ // to.Ptr("userB"), // to.Ptr("SELECT")}, // }, // { // Result: []*string{ // to.Ptr("userC"), // to.Ptr("SELECT"), // to.Ptr("tableId_4")}, // }}, // }, // } }
Output:
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions struct { }
ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate method.
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse struct { // A database vulnerability assessment rule baseline. DatabaseVulnerabilityAssessmentRuleBaseline }
ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate.
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions struct { }
ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.Delete method.
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse struct { }
ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.Delete.
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions struct { }
ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.Get method.
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse struct { // A database vulnerability assessment rule baseline. DatabaseVulnerabilityAssessmentRuleBaseline }
ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.Get.
type ManagedDatabaseVulnerabilityAssessmentScansClient ¶
type ManagedDatabaseVulnerabilityAssessmentScansClient struct {
// contains filtered or unexported fields
}
ManagedDatabaseVulnerabilityAssessmentScansClient contains the methods for the ManagedDatabaseVulnerabilityAssessmentScans group. Don't use this type directly, use NewManagedDatabaseVulnerabilityAssessmentScansClient() instead.
func NewManagedDatabaseVulnerabilityAssessmentScansClient ¶
func NewManagedDatabaseVulnerabilityAssessmentScansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseVulnerabilityAssessmentScansClient, error)
NewManagedDatabaseVulnerabilityAssessmentScansClient creates a new instance of ManagedDatabaseVulnerabilityAssessmentScansClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedDatabaseVulnerabilityAssessmentScansClient) BeginInitiateScan ¶
func (client *ManagedDatabaseVulnerabilityAssessmentScansClient) BeginInitiateScan(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, scanID string, options *ManagedDatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions) (*runtime.Poller[ManagedDatabaseVulnerabilityAssessmentScansClientInitiateScanResponse], error)
BeginInitiateScan - Executes a Vulnerability Assessment database scan. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- scanID - The vulnerability assessment scan Id of the scan to retrieve.
- options - ManagedDatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentScansClient.BeginInitiateScan method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScansExecute.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedDatabaseVulnerabilityAssessmentScansClient().BeginInitiateScan(ctx, "vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", "testdb", armsql.VulnerabilityAssessmentNameDefault, "scan01", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ManagedDatabaseVulnerabilityAssessmentScansClient) Export ¶
func (client *ManagedDatabaseVulnerabilityAssessmentScansClient) Export(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, scanID string, options *ManagedDatabaseVulnerabilityAssessmentScansClientExportOptions) (ManagedDatabaseVulnerabilityAssessmentScansClientExportResponse, error)
Export - Convert an existing scan result to a human readable format. If already exists nothing happens If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the scanned database.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- scanID - The vulnerability assessment scan Id.
- options - ManagedDatabaseVulnerabilityAssessmentScansClientExportOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentScansClient.Export method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanExport.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedDatabaseVulnerabilityAssessmentScansClient().Export(ctx, "vulnerabilityassessmenttest-4799", "vulnerabilityassessmenttest-6440", "testdb", armsql.VulnerabilityAssessmentNameDefault, "scan001", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseVulnerabilityAssessmentScansExport = armsql.DatabaseVulnerabilityAssessmentScansExport{ // Name: to.Ptr("scan001"), // Type: to.Ptr("Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans/export"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001/export"), // Properties: &armsql.DatabaseVulnerabilityAssessmentScanExportProperties{ // ExportedReportLocation: to.Ptr("https://myaccount.blob.core.windows.net/vulnerabilityAssessment/vulnerabilityassessmenttest-6440/testdb/scan001.xlsx"), // }, // } }
Output:
func (*ManagedDatabaseVulnerabilityAssessmentScansClient) Get ¶
func (client *ManagedDatabaseVulnerabilityAssessmentScansClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, scanID string, options *ManagedDatabaseVulnerabilityAssessmentScansClientGetOptions) (ManagedDatabaseVulnerabilityAssessmentScansClientGetResponse, error)
Get - Gets a vulnerability assessment scan record of a database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- scanID - The vulnerability assessment scan Id of the scan to retrieve.
- options - ManagedDatabaseVulnerabilityAssessmentScansClientGetOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentScansClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedDatabaseVulnerabilityAssessmentScansClient().Get(ctx, "vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", "testdb", armsql.VulnerabilityAssessmentNameDefault, "scan001", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.VulnerabilityAssessmentScanRecord = armsql.VulnerabilityAssessmentScanRecord{ // Name: to.Ptr("scan001"), // Type: to.Ptr("Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001"), // Properties: &armsql.VulnerabilityAssessmentScanRecordProperties{ // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-12T17:47:06.000Z"); return t}()), // Errors: []*armsql.VulnerabilityAssessmentScanError{ // }, // NumberOfFailedSecurityChecks: to.Ptr[int32](9), // ScanID: to.Ptr("scan001"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-12T17:45:06.000Z"); return t}()), // State: to.Ptr(armsql.VulnerabilityAssessmentScanStatePassed), // StorageContainerPath: to.Ptr("https://myaccount.blob.core.windows.net/vulnerability-assessment"), // TriggerType: to.Ptr(armsql.VulnerabilityAssessmentScanTriggerTypeOnDemand), // }, // } }
Output:
func (*ManagedDatabaseVulnerabilityAssessmentScansClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *ManagedDatabaseVulnerabilityAssessmentScansClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions) *runtime.Pager[ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse]
NewListByDatabasePager - Lists the vulnerability assessment scans of a database.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- options - ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentScansClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedDatabaseVulnerabilityAssessmentScansClient().NewListByDatabasePager("vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", "testdb", armsql.VulnerabilityAssessmentNameDefault, nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.VulnerabilityAssessmentScanRecordListResult = armsql.VulnerabilityAssessmentScanRecordListResult{ // Value: []*armsql.VulnerabilityAssessmentScanRecord{ // { // Name: to.Ptr("scan001"), // Type: to.Ptr("Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001"), // Properties: &armsql.VulnerabilityAssessmentScanRecordProperties{ // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-12T17:47:06.000Z"); return t}()), // Errors: []*armsql.VulnerabilityAssessmentScanError{ // }, // NumberOfFailedSecurityChecks: to.Ptr[int32](9), // ScanID: to.Ptr("scan001"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-12T17:45:06.000Z"); return t}()), // State: to.Ptr(armsql.VulnerabilityAssessmentScanStatePassed), // StorageContainerPath: to.Ptr("https://myaccount.blob.core.windows.net/vulnerability-assessment"), // TriggerType: to.Ptr(armsql.VulnerabilityAssessmentScanTriggerTypeOnDemand), // }, // }, // { // Name: to.Ptr("scan002"), // Type: to.Ptr("Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan002"), // Properties: &armsql.VulnerabilityAssessmentScanRecordProperties{ // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-12T17:47:06.000Z"); return t}()), // Errors: []*armsql.VulnerabilityAssessmentScanError{ // }, // NumberOfFailedSecurityChecks: to.Ptr[int32](9), // ScanID: to.Ptr("scan002"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-12T17:45:06.000Z"); return t}()), // State: to.Ptr(armsql.VulnerabilityAssessmentScanStateFailed), // StorageContainerPath: to.Ptr("https://myaccount.blob.core.windows.net/vulnerability-assessment"), // TriggerType: to.Ptr(armsql.VulnerabilityAssessmentScanTriggerTypeRecurring), // }, // }, // { // Name: to.Ptr("scan003"), // Type: to.Ptr("Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan003"), // Properties: &armsql.VulnerabilityAssessmentScanRecordProperties{ // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-12T17:47:06.000Z"); return t}()), // Errors: []*armsql.VulnerabilityAssessmentScanError{ // { // Code: to.Ptr("StorageNotFound"), // Message: to.Ptr("Storage not found"), // }}, // NumberOfFailedSecurityChecks: to.Ptr[int32](0), // ScanID: to.Ptr("scan003"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-12T17:45:06.000Z"); return t}()), // State: to.Ptr(armsql.VulnerabilityAssessmentScanStateFailedToRun), // StorageContainerPath: to.Ptr("https://myaccount.blob.core.windows.net/vulnerability-assessment"), // TriggerType: to.Ptr(armsql.VulnerabilityAssessmentScanTriggerTypeRecurring), // }, // }}, // } } }
Output:
type ManagedDatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedDatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentScansClient.BeginInitiateScan method.
type ManagedDatabaseVulnerabilityAssessmentScansClientExportOptions ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentScansClientExportOptions struct { }
ManagedDatabaseVulnerabilityAssessmentScansClientExportOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentScansClient.Export method.
type ManagedDatabaseVulnerabilityAssessmentScansClientExportResponse ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentScansClientExportResponse struct { // A database Vulnerability Assessment scan export resource. DatabaseVulnerabilityAssessmentScansExport }
ManagedDatabaseVulnerabilityAssessmentScansClientExportResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentScansClient.Export.
type ManagedDatabaseVulnerabilityAssessmentScansClientGetOptions ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentScansClientGetOptions struct { }
ManagedDatabaseVulnerabilityAssessmentScansClientGetOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentScansClient.Get method.
type ManagedDatabaseVulnerabilityAssessmentScansClientGetResponse ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentScansClientGetResponse struct { // A vulnerability assessment scan record. VulnerabilityAssessmentScanRecord }
ManagedDatabaseVulnerabilityAssessmentScansClientGetResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentScansClient.Get.
type ManagedDatabaseVulnerabilityAssessmentScansClientInitiateScanResponse ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentScansClientInitiateScanResponse struct { }
ManagedDatabaseVulnerabilityAssessmentScansClientInitiateScanResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentScansClient.BeginInitiateScan.
type ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions struct { }
ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentScansClient.NewListByDatabasePager method.
type ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse struct { // A list of vulnerability assessment scan records. VulnerabilityAssessmentScanRecordListResult }
ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentScansClient.NewListByDatabasePager.
type ManagedDatabaseVulnerabilityAssessmentsClient ¶
type ManagedDatabaseVulnerabilityAssessmentsClient struct {
// contains filtered or unexported fields
}
ManagedDatabaseVulnerabilityAssessmentsClient contains the methods for the ManagedDatabaseVulnerabilityAssessments group. Don't use this type directly, use NewManagedDatabaseVulnerabilityAssessmentsClient() instead.
func NewManagedDatabaseVulnerabilityAssessmentsClient ¶
func NewManagedDatabaseVulnerabilityAssessmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseVulnerabilityAssessmentsClient, error)
NewManagedDatabaseVulnerabilityAssessmentsClient creates a new instance of ManagedDatabaseVulnerabilityAssessmentsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedDatabaseVulnerabilityAssessmentsClient) CreateOrUpdate ¶
func (client *ManagedDatabaseVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, parameters DatabaseVulnerabilityAssessment, options *ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions) (ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates the database's vulnerability assessment. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database for which the vulnerability assessment is defined.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- parameters - The requested resource.
- options - ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentsClient.CreateOrUpdate method.
Example (CreateADatabasesVulnerabilityAssessmentWithAllParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedDatabaseVulnerabilityAssessmentsClient().CreateOrUpdate(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", armsql.VulnerabilityAssessmentNameDefault, armsql.DatabaseVulnerabilityAssessment{ Properties: &armsql.DatabaseVulnerabilityAssessmentProperties{ RecurringScans: &armsql.VulnerabilityAssessmentRecurringScansProperties{ EmailSubscriptionAdmins: to.Ptr(true), Emails: []*string{ to.Ptr("email1@mail.com"), to.Ptr("email2@mail.com")}, IsEnabled: to.Ptr(true), }, StorageContainerPath: to.Ptr("https://myStorage.blob.core.windows.net/vulnerability-assessment/"), StorageContainerSasKey: to.Ptr("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseVulnerabilityAssessment = armsql.DatabaseVulnerabilityAssessment{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/vulnerabilityAssessments"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default"), // Properties: &armsql.DatabaseVulnerabilityAssessmentProperties{ // RecurringScans: &armsql.VulnerabilityAssessmentRecurringScansProperties{ // EmailSubscriptionAdmins: to.Ptr(true), // Emails: []*string{ // to.Ptr("email1@mail.com"), // to.Ptr("email2@mail.com")}, // IsEnabled: to.Ptr(true), // }, // }, // } }
Output:
Example (CreateADatabasesVulnerabilityAssessmentWithMinimalParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedDatabaseVulnerabilityAssessmentsClient().CreateOrUpdate(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", armsql.VulnerabilityAssessmentNameDefault, armsql.DatabaseVulnerabilityAssessment{ Properties: &armsql.DatabaseVulnerabilityAssessmentProperties{ StorageContainerPath: to.Ptr("https://myStorage.blob.core.windows.net/vulnerability-assessment/"), StorageContainerSasKey: to.Ptr("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseVulnerabilityAssessment = armsql.DatabaseVulnerabilityAssessment{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/vulnerabilityAssessments"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default"), // Properties: &armsql.DatabaseVulnerabilityAssessmentProperties{ // RecurringScans: &armsql.VulnerabilityAssessmentRecurringScansProperties{ // EmailSubscriptionAdmins: to.Ptr(false), // Emails: []*string{ // }, // IsEnabled: to.Ptr(false), // }, // }, // } }
Output:
func (*ManagedDatabaseVulnerabilityAssessmentsClient) Delete ¶
func (client *ManagedDatabaseVulnerabilityAssessmentsClient) Delete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *ManagedDatabaseVulnerabilityAssessmentsClientDeleteOptions) (ManagedDatabaseVulnerabilityAssessmentsClientDeleteResponse, error)
Delete - Removes the database's vulnerability assessment. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database for which the vulnerability assessment is defined.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- options - ManagedDatabaseVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewManagedDatabaseVulnerabilityAssessmentsClient().Delete(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", armsql.VulnerabilityAssessmentNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*ManagedDatabaseVulnerabilityAssessmentsClient) Get ¶
func (client *ManagedDatabaseVulnerabilityAssessmentsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *ManagedDatabaseVulnerabilityAssessmentsClientGetOptions) (ManagedDatabaseVulnerabilityAssessmentsClientGetResponse, error)
Get - Gets the database's vulnerability assessment. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database for which the vulnerability assessment is defined.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- options - ManagedDatabaseVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedDatabaseVulnerabilityAssessmentsClient().Get(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", armsql.VulnerabilityAssessmentNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DatabaseVulnerabilityAssessment = armsql.DatabaseVulnerabilityAssessment{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/vulnerabilityAssessments"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default"), // Properties: &armsql.DatabaseVulnerabilityAssessmentProperties{ // RecurringScans: &armsql.VulnerabilityAssessmentRecurringScansProperties{ // EmailSubscriptionAdmins: to.Ptr(true), // Emails: []*string{ // to.Ptr("email1@mail.com"), // to.Ptr("email2@mail.com")}, // IsEnabled: to.Ptr(true), // }, // }, // } }
Output:
func (*ManagedDatabaseVulnerabilityAssessmentsClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *ManagedDatabaseVulnerabilityAssessmentsClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseOptions) *runtime.Pager[ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseResponse]
NewListByDatabasePager - Lists the vulnerability assessments of a managed database.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database for which the vulnerability assessment is defined.
- options - ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentsClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedDatabaseVulnerabilityAssessmentsClient().NewListByDatabasePager("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.DatabaseVulnerabilityAssessmentListResult = armsql.DatabaseVulnerabilityAssessmentListResult{ // Value: []*armsql.DatabaseVulnerabilityAssessment{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/vulnerabilityAssessments"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default"), // Properties: &armsql.DatabaseVulnerabilityAssessmentProperties{ // RecurringScans: &armsql.VulnerabilityAssessmentRecurringScansProperties{ // EmailSubscriptionAdmins: to.Ptr(true), // Emails: []*string{ // to.Ptr("email1@mail.com"), // to.Ptr("email2@mail.com")}, // IsEnabled: to.Ptr(true), // }, // }, // }}, // } } }
Output:
type ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions struct { }
ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentsClient.CreateOrUpdate method.
type ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse struct { // A database vulnerability assessment. DatabaseVulnerabilityAssessment }
ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentsClient.CreateOrUpdate.
type ManagedDatabaseVulnerabilityAssessmentsClientDeleteOptions ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentsClientDeleteOptions struct { }
ManagedDatabaseVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentsClient.Delete method.
type ManagedDatabaseVulnerabilityAssessmentsClientDeleteResponse ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentsClientDeleteResponse struct { }
ManagedDatabaseVulnerabilityAssessmentsClientDeleteResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentsClient.Delete.
type ManagedDatabaseVulnerabilityAssessmentsClientGetOptions ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentsClientGetOptions struct { }
ManagedDatabaseVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentsClient.Get method.
type ManagedDatabaseVulnerabilityAssessmentsClientGetResponse ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentsClientGetResponse struct { // A database vulnerability assessment. DatabaseVulnerabilityAssessment }
ManagedDatabaseVulnerabilityAssessmentsClientGetResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentsClient.Get.
type ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseOptions ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseOptions struct { }
ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentsClient.NewListByDatabasePager method.
type ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseResponse ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseResponse struct { // A list of the database's vulnerability assessments. DatabaseVulnerabilityAssessmentListResult }
ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentsClient.NewListByDatabasePager.
type ManagedDatabasesClient ¶
type ManagedDatabasesClient struct {
// contains filtered or unexported fields
}
ManagedDatabasesClient contains the methods for the ManagedDatabases group. Don't use this type directly, use NewManagedDatabasesClient() instead.
func NewManagedDatabasesClient ¶
func NewManagedDatabasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabasesClient, error)
NewManagedDatabasesClient creates a new instance of ManagedDatabasesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedDatabasesClient) BeginCompleteRestore ¶
func (client *ManagedDatabasesClient) BeginCompleteRestore(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters CompleteDatabaseRestoreDefinition, options *ManagedDatabasesClientBeginCompleteRestoreOptions) (*runtime.Poller[ManagedDatabasesClientCompleteRestoreResponse], error)
BeginCompleteRestore - Completes the restore operation on a managed database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- parameters - The definition for completing the restore of this managed database.
- options - ManagedDatabasesClientBeginCompleteRestoreOptions contains the optional parameters for the ManagedDatabasesClient.BeginCompleteRestore method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseCompleteExternalRestore.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedDatabasesClient().BeginCompleteRestore(ctx, "myRG", "myManagedInstanceName", "myDatabase", armsql.CompleteDatabaseRestoreDefinition{ LastBackupName: to.Ptr("testdb1_log4"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ManagedDatabasesClient) BeginCreateOrUpdate ¶
func (client *ManagedDatabasesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters ManagedDatabase, options *ManagedDatabasesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedDatabasesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates a new database or updates an existing database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- parameters - The requested database resource state.
- options - ManagedDatabasesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedDatabasesClient.BeginCreateOrUpdate method.
Example (CreatesANewManagedDatabaseByRestoringFromAnExternalBackup) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseCreateRestoreExternalBackup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedDatabasesClient().BeginCreateOrUpdate(ctx, "Default-SQL-SouthEastAsia", "managedInstance", "managedDatabase", armsql.ManagedDatabase{ Location: to.Ptr("southeastasia"), Properties: &armsql.ManagedDatabaseProperties{ AutoCompleteRestore: to.Ptr(true), Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), CreateMode: to.Ptr(armsql.ManagedDatabaseCreateModeRestoreExternalBackup), LastBackupName: to.Ptr("last_backup_name"), StorageContainerSasToken: to.Ptr("sv=2015-12-11&sr=c&sp=rl&sig=1234"), StorageContainerURI: to.Ptr("https://myaccountname.blob.core.windows.net/backups"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedDatabase = armsql.ManagedDatabase{ // Name: to.Ptr("testdb1"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1"), // Location: to.Ptr("southeastasia"), // Tags: map[string]*string{ // "tagKey1": to.Ptr("TagValue1"), // }, // Properties: &armsql.ManagedDatabaseProperties{ // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:41:33.937Z"); return t}()), // DefaultSecondaryLocation: to.Ptr("North Europe"), // Status: to.Ptr(armsql.ManagedDatabaseStatusOnline), // }, // } }
Output:
Example (CreatesANewManagedDatabaseFromRestoringAGeoReplicatedBackup) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseCreateRecovery.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedDatabasesClient().BeginCreateOrUpdate(ctx, "Default-SQL-SouthEastAsia", "server1", "testdb_recovered", armsql.ManagedDatabase{ Location: to.Ptr("southeastasia"), Properties: &armsql.ManagedDatabaseProperties{ CreateMode: to.Ptr(armsql.ManagedDatabaseCreateModeRecovery), RecoverableDatabaseID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/Default-SQL-WestEurope/providers/Microsoft.Sql/managedInstances/testsvr/recoverableDatabases/testdb"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedDatabase = armsql.ManagedDatabase{ // Name: to.Ptr("testdb_recovered"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/server1/recoverableDatabases/testdb_recovered"), // Location: to.Ptr("southeastasia"), // Tags: map[string]*string{ // "tagKey1": to.Ptr("TagValue1"), // }, // Properties: &armsql.ManagedDatabaseProperties{ // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-11-07T04:41:33.937Z"); return t}()), // Status: to.Ptr(armsql.ManagedDatabaseStatusOnline), // }, // } }
Output:
Example (CreatesANewManagedDatabaseFromRestoringALongTermRetentionBackup) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseCreateRestoreLtrBackup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedDatabasesClient().BeginCreateOrUpdate(ctx, "Default-SQL-SouthEastAsia", "managedInstance", "managedDatabase", armsql.ManagedDatabase{ Location: to.Ptr("southeastasia"), Properties: &armsql.ManagedDatabaseProperties{ Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), CreateMode: to.Ptr(armsql.ManagedDatabaseCreateModeRestoreExternalBackup), StorageContainerSasToken: to.Ptr("sv=2015-12-11&sr=c&sp=rl&sig=1234"), StorageContainerURI: to.Ptr("https://myaccountname.blob.core.windows.net/backups"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedDatabase = armsql.ManagedDatabase{ // Name: to.Ptr("testdb1"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1"), // Location: to.Ptr("southeastasia"), // Tags: map[string]*string{ // "tagKey1": to.Ptr("TagValue1"), // }, // Properties: &armsql.ManagedDatabaseProperties{ // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:41:33.937Z"); return t}()), // DefaultSecondaryLocation: to.Ptr("North Europe"), // Status: to.Ptr(armsql.ManagedDatabaseStatusOnline), // }, // } }
Output:
Example (CreatesANewManagedDatabaseUsingPointInTimeRestore) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseCreatePointInTimeRestore.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedDatabasesClient().BeginCreateOrUpdate(ctx, "Default-SQL-SouthEastAsia", "managedInstance", "managedDatabase", armsql.ManagedDatabase{ Location: to.Ptr("southeastasia"), Properties: &armsql.ManagedDatabaseProperties{ CreateMode: to.Ptr(armsql.ManagedDatabaseCreateModePointInTimeRestore), RestorePointInTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-14T05:35:31.503Z"); return t }()), SourceDatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedDatabase = armsql.ManagedDatabase{ // Name: to.Ptr("testdb1"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1"), // Location: to.Ptr("southeastasia"), // Tags: map[string]*string{ // "tagKey1": to.Ptr("TagValue1"), // }, // Properties: &armsql.ManagedDatabaseProperties{ // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:41:33.937Z"); return t}()), // DefaultSecondaryLocation: to.Ptr("North Europe"), // Status: to.Ptr(armsql.ManagedDatabaseStatusOnline), // }, // } }
Output:
Example (CreatesANewManagedDatabaseWithMaximalProperties) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseCreateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedDatabasesClient().BeginCreateOrUpdate(ctx, "Default-SQL-SouthEastAsia", "managedInstance", "managedDatabase", armsql.ManagedDatabase{ Location: to.Ptr("southeastasia"), Tags: map[string]*string{ "tagKey1": to.Ptr("TagValue1"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedDatabase = armsql.ManagedDatabase{ // Name: to.Ptr("testdb1"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1"), // Location: to.Ptr("southeastasia"), // Tags: map[string]*string{ // "tagKey1": to.Ptr("TagValue1"), // }, // Properties: &armsql.ManagedDatabaseProperties{ // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:41:33.937Z"); return t}()), // DefaultSecondaryLocation: to.Ptr("North Europe"), // Status: to.Ptr(armsql.ManagedDatabaseStatusOnline), // }, // } }
Output:
Example (CreatesANewManagedDatabaseWithMinimalProperties) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseCreateMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedDatabasesClient().BeginCreateOrUpdate(ctx, "Default-SQL-SouthEastAsia", "managedInstance", "managedDatabase", armsql.ManagedDatabase{ Location: to.Ptr("southeastasia"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedDatabase = armsql.ManagedDatabase{ // Name: to.Ptr("testdb1"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1"), // Location: to.Ptr("southeastasia"), // Properties: &armsql.ManagedDatabaseProperties{ // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:41:33.937Z"); return t}()), // DefaultSecondaryLocation: to.Ptr("North Europe"), // Status: to.Ptr(armsql.ManagedDatabaseStatusOnline), // }, // } }
Output:
func (*ManagedDatabasesClient) BeginDelete ¶
func (client *ManagedDatabasesClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabasesClientBeginDeleteOptions) (*runtime.Poller[ManagedDatabasesClientDeleteResponse], error)
BeginDelete - Deletes a managed database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- options - ManagedDatabasesClientBeginDeleteOptions contains the optional parameters for the ManagedDatabasesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedDatabasesClient().BeginDelete(ctx, "Default-SQL-SouthEastAsia", "managedInstance", "testdb", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ManagedDatabasesClient) BeginUpdate ¶
func (client *ManagedDatabasesClient) BeginUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters ManagedDatabaseUpdate, options *ManagedDatabasesClientBeginUpdateOptions) (*runtime.Poller[ManagedDatabasesClientUpdateResponse], error)
BeginUpdate - Updates an existing database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- parameters - The requested database resource state.
- options - ManagedDatabasesClientBeginUpdateOptions contains the optional parameters for the ManagedDatabasesClient.BeginUpdate method.
Example (UpdatesAManagedDatabaseWithMaximalProperties) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseUpdateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedDatabasesClient().BeginUpdate(ctx, "Default-SQL-SouthEastAsia", "managedInstance", "testdb", armsql.ManagedDatabaseUpdate{ Tags: map[string]*string{ "tagKey1": to.Ptr("TagValue1"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedDatabase = armsql.ManagedDatabase{ // Name: to.Ptr("testdb"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb"), // Location: to.Ptr("southeastasia"), // Tags: map[string]*string{ // "tagKey1": to.Ptr("TagValue1"), // }, // } }
Output:
Example (UpdatesAManagedDatabaseWithMinimalProperties) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseUpdateMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedDatabasesClient().BeginUpdate(ctx, "Default-SQL-SouthEastAsia", "managedInstance", "testdb", armsql.ManagedDatabaseUpdate{ Tags: map[string]*string{ "tagKey1": to.Ptr("TagValue1"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedDatabase = armsql.ManagedDatabase{ // Name: to.Ptr("testdb"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb"), // Location: to.Ptr("southeastasia"), // Tags: map[string]*string{ // "tagKey1": to.Ptr("TagValue1"), // }, // } }
Output:
func (*ManagedDatabasesClient) Get ¶
func (client *ManagedDatabasesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabasesClientGetOptions) (ManagedDatabasesClientGetResponse, error)
Get - Gets a managed database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- options - ManagedDatabasesClientGetOptions contains the optional parameters for the ManagedDatabasesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedDatabasesClient().Get(ctx, "Test1", "managedInstance", "managedDatabase", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedDatabase = armsql.ManagedDatabase{ // Name: to.Ptr("testdb1"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb1"), // Location: to.Ptr("southeastasia"), // Properties: &armsql.ManagedDatabaseProperties{ // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-04T15:00:17.730Z"); return t}()), // DefaultSecondaryLocation: to.Ptr("North Europe"), // Status: to.Ptr(armsql.ManagedDatabaseStatusOnline), // }, // } }
Output:
func (*ManagedDatabasesClient) NewListByInstancePager ¶ added in v0.5.0
func (client *ManagedDatabasesClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedDatabasesClientListByInstanceOptions) *runtime.Pager[ManagedDatabasesClientListByInstanceResponse]
NewListByInstancePager - Gets a list of managed databases.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - ManagedDatabasesClientListByInstanceOptions contains the optional parameters for the ManagedDatabasesClient.NewListByInstancePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseListByManagedInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedDatabasesClient().NewListByInstancePager("Test1", "managedInstance", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedDatabaseListResult = armsql.ManagedDatabaseListResult{ // Value: []*armsql.ManagedDatabase{ // { // Name: to.Ptr("testdb1"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb1"), // Location: to.Ptr("southeastasia"), // Properties: &armsql.ManagedDatabaseProperties{ // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-04T15:00:17.730Z"); return t}()), // DefaultSecondaryLocation: to.Ptr("North Europe"), // Status: to.Ptr(armsql.ManagedDatabaseStatusOnline), // }, // }, // { // Name: to.Ptr("testdb2"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb2"), // Location: to.Ptr("southeastasia"), // Properties: &armsql.ManagedDatabaseProperties{ // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-04T15:00:17.730Z"); return t}()), // DefaultSecondaryLocation: to.Ptr("North Europe"), // Status: to.Ptr(armsql.ManagedDatabaseStatusOnline), // }, // }}, // } } }
Output:
func (*ManagedDatabasesClient) NewListInaccessibleByInstancePager ¶ added in v0.5.0
func (client *ManagedDatabasesClient) NewListInaccessibleByInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedDatabasesClientListInaccessibleByInstanceOptions) *runtime.Pager[ManagedDatabasesClientListInaccessibleByInstanceResponse]
NewListInaccessibleByInstancePager - Gets a list of inaccessible managed databases in a managed instance
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - ManagedDatabasesClientListInaccessibleByInstanceOptions contains the optional parameters for the ManagedDatabasesClient.NewListInaccessibleByInstancePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/InaccessibleManagedDatabaseListByManagedInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedDatabasesClient().NewListInaccessibleByInstancePager("testrg", "testcl", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedDatabaseListResult = armsql.ManagedDatabaseListResult{ // Value: []*armsql.ManagedDatabase{ // { // Name: to.Ptr("testdb1"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb1"), // Location: to.Ptr("southeastasia"), // Properties: &armsql.ManagedDatabaseProperties{ // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-04T15:00:17.730Z"); return t}()), // DefaultSecondaryLocation: to.Ptr("North Europe"), // Status: to.Ptr(armsql.ManagedDatabaseStatusInaccessible), // }, // }, // { // Name: to.Ptr("testdb2"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb2"), // Location: to.Ptr("southeastasia"), // Properties: &armsql.ManagedDatabaseProperties{ // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-04T15:00:17.730Z"); return t}()), // DefaultSecondaryLocation: to.Ptr("North Europe"), // Status: to.Ptr(armsql.ManagedDatabaseStatusInaccessible), // }, // }}, // } } }
Output:
type ManagedDatabasesClientBeginCompleteRestoreOptions ¶ added in v0.3.0
type ManagedDatabasesClientBeginCompleteRestoreOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedDatabasesClientBeginCompleteRestoreOptions contains the optional parameters for the ManagedDatabasesClient.BeginCompleteRestore method.
type ManagedDatabasesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedDatabasesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedDatabasesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedDatabasesClient.BeginCreateOrUpdate method.
type ManagedDatabasesClientBeginDeleteOptions ¶ added in v0.3.0
type ManagedDatabasesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedDatabasesClientBeginDeleteOptions contains the optional parameters for the ManagedDatabasesClient.BeginDelete method.
type ManagedDatabasesClientBeginUpdateOptions ¶ added in v0.3.0
type ManagedDatabasesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedDatabasesClientBeginUpdateOptions contains the optional parameters for the ManagedDatabasesClient.BeginUpdate method.
type ManagedDatabasesClientCompleteRestoreResponse ¶ added in v0.3.0
type ManagedDatabasesClientCompleteRestoreResponse struct { }
ManagedDatabasesClientCompleteRestoreResponse contains the response from method ManagedDatabasesClient.BeginCompleteRestore.
type ManagedDatabasesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedDatabasesClientCreateOrUpdateResponse struct { // A managed database resource. ManagedDatabase }
ManagedDatabasesClientCreateOrUpdateResponse contains the response from method ManagedDatabasesClient.BeginCreateOrUpdate.
type ManagedDatabasesClientDeleteResponse ¶ added in v0.3.0
type ManagedDatabasesClientDeleteResponse struct { }
ManagedDatabasesClientDeleteResponse contains the response from method ManagedDatabasesClient.BeginDelete.
type ManagedDatabasesClientGetOptions ¶ added in v0.3.0
type ManagedDatabasesClientGetOptions struct { }
ManagedDatabasesClientGetOptions contains the optional parameters for the ManagedDatabasesClient.Get method.
type ManagedDatabasesClientGetResponse ¶ added in v0.3.0
type ManagedDatabasesClientGetResponse struct { // A managed database resource. ManagedDatabase }
ManagedDatabasesClientGetResponse contains the response from method ManagedDatabasesClient.Get.
type ManagedDatabasesClientListByInstanceOptions ¶ added in v0.3.0
type ManagedDatabasesClientListByInstanceOptions struct { }
ManagedDatabasesClientListByInstanceOptions contains the optional parameters for the ManagedDatabasesClient.NewListByInstancePager method.
type ManagedDatabasesClientListByInstanceResponse ¶ added in v0.3.0
type ManagedDatabasesClientListByInstanceResponse struct { // A list of managed databases. ManagedDatabaseListResult }
ManagedDatabasesClientListByInstanceResponse contains the response from method ManagedDatabasesClient.NewListByInstancePager.
type ManagedDatabasesClientListInaccessibleByInstanceOptions ¶ added in v0.3.0
type ManagedDatabasesClientListInaccessibleByInstanceOptions struct { }
ManagedDatabasesClientListInaccessibleByInstanceOptions contains the optional parameters for the ManagedDatabasesClient.NewListInaccessibleByInstancePager method.
type ManagedDatabasesClientListInaccessibleByInstanceResponse ¶ added in v0.3.0
type ManagedDatabasesClientListInaccessibleByInstanceResponse struct { // A list of managed databases. ManagedDatabaseListResult }
ManagedDatabasesClientListInaccessibleByInstanceResponse contains the response from method ManagedDatabasesClient.NewListInaccessibleByInstancePager.
type ManagedDatabasesClientUpdateResponse ¶ added in v0.3.0
type ManagedDatabasesClientUpdateResponse struct { // A managed database resource. ManagedDatabase }
ManagedDatabasesClientUpdateResponse contains the response from method ManagedDatabasesClient.BeginUpdate.
type ManagedInstance ¶
type ManagedInstance struct { // REQUIRED; Resource location. Location *string // The Azure Active Directory identity of the managed instance. Identity *ResourceIdentity // Resource properties. Properties *ManagedInstanceProperties // Managed instance SKU. Allowed values for sku.name: GPGen4, GPGen5, BCGen4, BCGen5 SKU *SKU // Resource tags. Tags map[string]*string // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ManagedInstance - An Azure SQL managed instance.
func (ManagedInstance) MarshalJSON ¶
func (m ManagedInstance) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstance.
func (*ManagedInstance) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstance) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstance.
type ManagedInstanceAdministrator ¶
type ManagedInstanceAdministrator struct { // Resource properties. Properties *ManagedInstanceAdministratorProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ManagedInstanceAdministrator - An Azure SQL managed instance administrator.
func (ManagedInstanceAdministrator) MarshalJSON ¶
func (m ManagedInstanceAdministrator) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceAdministrator.
func (*ManagedInstanceAdministrator) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceAdministrator) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceAdministrator.
type ManagedInstanceAdministratorListResult ¶
type ManagedInstanceAdministratorListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ManagedInstanceAdministrator }
ManagedInstanceAdministratorListResult - A list of managed instance administrators.
func (ManagedInstanceAdministratorListResult) MarshalJSON ¶
func (m ManagedInstanceAdministratorListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceAdministratorListResult.
func (*ManagedInstanceAdministratorListResult) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceAdministratorListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceAdministratorListResult.
type ManagedInstanceAdministratorProperties ¶
type ManagedInstanceAdministratorProperties struct { // REQUIRED; Type of the managed instance administrator. AdministratorType *ManagedInstanceAdministratorType // REQUIRED; Login name of the managed instance administrator. Login *string // REQUIRED; SID (object ID) of the managed instance administrator. Sid *string // Tenant ID of the managed instance administrator. TenantID *string }
ManagedInstanceAdministratorProperties - The properties of a managed instance administrator.
func (ManagedInstanceAdministratorProperties) MarshalJSON ¶ added in v1.1.0
func (m ManagedInstanceAdministratorProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceAdministratorProperties.
func (*ManagedInstanceAdministratorProperties) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceAdministratorProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceAdministratorProperties.
type ManagedInstanceAdministratorType ¶
type ManagedInstanceAdministratorType string
ManagedInstanceAdministratorType - Type of the managed instance administrator.
const (
ManagedInstanceAdministratorTypeActiveDirectory ManagedInstanceAdministratorType = "ActiveDirectory"
)
func PossibleManagedInstanceAdministratorTypeValues ¶
func PossibleManagedInstanceAdministratorTypeValues() []ManagedInstanceAdministratorType
PossibleManagedInstanceAdministratorTypeValues returns the possible values for the ManagedInstanceAdministratorType const type.
type ManagedInstanceAdministratorsClient ¶
type ManagedInstanceAdministratorsClient struct {
// contains filtered or unexported fields
}
ManagedInstanceAdministratorsClient contains the methods for the ManagedInstanceAdministrators group. Don't use this type directly, use NewManagedInstanceAdministratorsClient() instead.
func NewManagedInstanceAdministratorsClient ¶
func NewManagedInstanceAdministratorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedInstanceAdministratorsClient, error)
NewManagedInstanceAdministratorsClient creates a new instance of ManagedInstanceAdministratorsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedInstanceAdministratorsClient) BeginCreateOrUpdate ¶
func (client *ManagedInstanceAdministratorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, administratorName AdministratorName, parameters ManagedInstanceAdministrator, options *ManagedInstanceAdministratorsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedInstanceAdministratorsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a managed instance administrator. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- parameters - The requested administrator parameters.
- options - ManagedInstanceAdministratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceAdministratorsClient.BeginCreateOrUpdate method.
Example (CreateAdministratorOfManagedInstance) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAdministratorCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedInstanceAdministratorsClient().BeginCreateOrUpdate(ctx, "Default-SQL-SouthEastAsia", "managedInstance", armsql.AdministratorNameActiveDirectory, armsql.ManagedInstanceAdministrator{ Properties: &armsql.ManagedInstanceAdministratorProperties{ AdministratorType: to.Ptr(armsql.ManagedInstanceAdministratorTypeActiveDirectory), Login: to.Ptr("bob@contoso.com"), Sid: to.Ptr("44444444-3333-2222-1111-000000000000"), TenantID: to.Ptr("55555555-4444-3333-2222-111111111111"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstanceAdministrator = armsql.ManagedInstanceAdministrator{ // Name: to.Ptr("ActiveDirectory"), // Type: to.Ptr("Microsoft.Sql/managedInstances/administrators"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/administrators/ActiveDirectory"), // Properties: &armsql.ManagedInstanceAdministratorProperties{ // AdministratorType: to.Ptr(armsql.ManagedInstanceAdministratorTypeActiveDirectory), // Login: to.Ptr("bob@contoso.com"), // Sid: to.Ptr("44444444-3333-2222-1111-000000000000"), // TenantID: to.Ptr("55555555-4444-3333-2222-111111111111"), // }, // } }
Output:
Example (UpdateAdministratorOfManagedInstance) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAdministratorUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedInstanceAdministratorsClient().BeginCreateOrUpdate(ctx, "Default-SQL-SouthEastAsia", "managedInstance", armsql.AdministratorNameActiveDirectory, armsql.ManagedInstanceAdministrator{ Properties: &armsql.ManagedInstanceAdministratorProperties{ AdministratorType: to.Ptr(armsql.ManagedInstanceAdministratorTypeActiveDirectory), Login: to.Ptr("bob@contoso.com"), Sid: to.Ptr("44444444-3333-2222-1111-000000000000"), TenantID: to.Ptr("55555555-4444-3333-2222-111111111111"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstanceAdministrator = armsql.ManagedInstanceAdministrator{ // Name: to.Ptr("ActiveDirectory"), // Type: to.Ptr("Microsoft.Sql/managedInstances/administrators"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/administrators/ActiveDirectory"), // Properties: &armsql.ManagedInstanceAdministratorProperties{ // AdministratorType: to.Ptr(armsql.ManagedInstanceAdministratorTypeActiveDirectory), // Login: to.Ptr("bob@contoso.com"), // Sid: to.Ptr("44444444-3333-2222-1111-000000000000"), // TenantID: to.Ptr("55555555-4444-3333-2222-111111111111"), // }, // } }
Output:
func (*ManagedInstanceAdministratorsClient) BeginDelete ¶
func (client *ManagedInstanceAdministratorsClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, administratorName AdministratorName, options *ManagedInstanceAdministratorsClientBeginDeleteOptions) (*runtime.Poller[ManagedInstanceAdministratorsClientDeleteResponse], error)
BeginDelete - Deletes a managed instance administrator. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - ManagedInstanceAdministratorsClientBeginDeleteOptions contains the optional parameters for the ManagedInstanceAdministratorsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAdministratorDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedInstanceAdministratorsClient().BeginDelete(ctx, "Default-SQL-SouthEastAsia", "managedInstance", armsql.AdministratorNameActiveDirectory, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ManagedInstanceAdministratorsClient) Get ¶
func (client *ManagedInstanceAdministratorsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, administratorName AdministratorName, options *ManagedInstanceAdministratorsClientGetOptions) (ManagedInstanceAdministratorsClientGetResponse, error)
Get - Gets a managed instance administrator. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - ManagedInstanceAdministratorsClientGetOptions contains the optional parameters for the ManagedInstanceAdministratorsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAdministratorGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedInstanceAdministratorsClient().Get(ctx, "Default-SQL-SouthEastAsia", "managedInstance", armsql.AdministratorNameActiveDirectory, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstanceAdministrator = armsql.ManagedInstanceAdministrator{ // Name: to.Ptr("ActiveDirectory"), // Type: to.Ptr("Microsoft.Sql/managedInstances/administrators"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/administrators/ActiveDirectory"), // Properties: &armsql.ManagedInstanceAdministratorProperties{ // AdministratorType: to.Ptr(armsql.ManagedInstanceAdministratorTypeActiveDirectory), // Login: to.Ptr("bob@contoso.com"), // Sid: to.Ptr("44444444-3333-2222-1111-000000000000"), // TenantID: to.Ptr("55555555-4444-3333-2222-111111111111"), // }, // } }
Output:
func (*ManagedInstanceAdministratorsClient) NewListByInstancePager ¶ added in v0.5.0
func (client *ManagedInstanceAdministratorsClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedInstanceAdministratorsClientListByInstanceOptions) *runtime.Pager[ManagedInstanceAdministratorsClientListByInstanceResponse]
NewListByInstancePager - Gets a list of managed instance administrators.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - ManagedInstanceAdministratorsClientListByInstanceOptions contains the optional parameters for the ManagedInstanceAdministratorsClient.NewListByInstancePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAdministratorListByInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedInstanceAdministratorsClient().NewListByInstancePager("Default-SQL-SouthEastAsia", "managedInstance", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedInstanceAdministratorListResult = armsql.ManagedInstanceAdministratorListResult{ // Value: []*armsql.ManagedInstanceAdministrator{ // { // Name: to.Ptr("ActiveDirectory"), // Type: to.Ptr("Microsoft.Sql/managedInstances/administrators"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/administrators/ActiveDirectory"), // Properties: &armsql.ManagedInstanceAdministratorProperties{ // AdministratorType: to.Ptr(armsql.ManagedInstanceAdministratorTypeActiveDirectory), // Login: to.Ptr("bob@contoso.com"), // Sid: to.Ptr("44444444-3333-2222-1111-000000000000"), // TenantID: to.Ptr("55555555-4444-3333-2222-111111111111"), // }, // }}, // } } }
Output:
type ManagedInstanceAdministratorsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedInstanceAdministratorsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceAdministratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceAdministratorsClient.BeginCreateOrUpdate method.
type ManagedInstanceAdministratorsClientBeginDeleteOptions ¶ added in v0.3.0
type ManagedInstanceAdministratorsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceAdministratorsClientBeginDeleteOptions contains the optional parameters for the ManagedInstanceAdministratorsClient.BeginDelete method.
type ManagedInstanceAdministratorsClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedInstanceAdministratorsClientCreateOrUpdateResponse struct { // An Azure SQL managed instance administrator. ManagedInstanceAdministrator }
ManagedInstanceAdministratorsClientCreateOrUpdateResponse contains the response from method ManagedInstanceAdministratorsClient.BeginCreateOrUpdate.
type ManagedInstanceAdministratorsClientDeleteResponse ¶ added in v0.3.0
type ManagedInstanceAdministratorsClientDeleteResponse struct { }
ManagedInstanceAdministratorsClientDeleteResponse contains the response from method ManagedInstanceAdministratorsClient.BeginDelete.
type ManagedInstanceAdministratorsClientGetOptions ¶ added in v0.3.0
type ManagedInstanceAdministratorsClientGetOptions struct { }
ManagedInstanceAdministratorsClientGetOptions contains the optional parameters for the ManagedInstanceAdministratorsClient.Get method.
type ManagedInstanceAdministratorsClientGetResponse ¶ added in v0.3.0
type ManagedInstanceAdministratorsClientGetResponse struct { // An Azure SQL managed instance administrator. ManagedInstanceAdministrator }
ManagedInstanceAdministratorsClientGetResponse contains the response from method ManagedInstanceAdministratorsClient.Get.
type ManagedInstanceAdministratorsClientListByInstanceOptions ¶ added in v0.3.0
type ManagedInstanceAdministratorsClientListByInstanceOptions struct { }
ManagedInstanceAdministratorsClientListByInstanceOptions contains the optional parameters for the ManagedInstanceAdministratorsClient.NewListByInstancePager method.
type ManagedInstanceAdministratorsClientListByInstanceResponse ¶ added in v0.3.0
type ManagedInstanceAdministratorsClientListByInstanceResponse struct { // A list of managed instance administrators. ManagedInstanceAdministratorListResult }
ManagedInstanceAdministratorsClientListByInstanceResponse contains the response from method ManagedInstanceAdministratorsClient.NewListByInstancePager.
type ManagedInstanceAzureADOnlyAuthListResult ¶
type ManagedInstanceAzureADOnlyAuthListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ManagedInstanceAzureADOnlyAuthentication }
ManagedInstanceAzureADOnlyAuthListResult - A list of active directory only authentications.
func (ManagedInstanceAzureADOnlyAuthListResult) MarshalJSON ¶
func (m ManagedInstanceAzureADOnlyAuthListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceAzureADOnlyAuthListResult.
func (*ManagedInstanceAzureADOnlyAuthListResult) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceAzureADOnlyAuthListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceAzureADOnlyAuthListResult.
type ManagedInstanceAzureADOnlyAuthProperties ¶
type ManagedInstanceAzureADOnlyAuthProperties struct { // REQUIRED; Azure Active Directory only Authentication enabled. AzureADOnlyAuthentication *bool }
ManagedInstanceAzureADOnlyAuthProperties - Properties of a active directory only authentication for Managed Instance.
func (ManagedInstanceAzureADOnlyAuthProperties) MarshalJSON ¶ added in v1.1.0
func (m ManagedInstanceAzureADOnlyAuthProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceAzureADOnlyAuthProperties.
func (*ManagedInstanceAzureADOnlyAuthProperties) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceAzureADOnlyAuthProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceAzureADOnlyAuthProperties.
type ManagedInstanceAzureADOnlyAuthentication ¶
type ManagedInstanceAzureADOnlyAuthentication struct { // Resource properties. Properties *ManagedInstanceAzureADOnlyAuthProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ManagedInstanceAzureADOnlyAuthentication - Azure Active Directory only authentication.
func (ManagedInstanceAzureADOnlyAuthentication) MarshalJSON ¶
func (m ManagedInstanceAzureADOnlyAuthentication) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceAzureADOnlyAuthentication.
func (*ManagedInstanceAzureADOnlyAuthentication) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceAzureADOnlyAuthentication) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceAzureADOnlyAuthentication.
type ManagedInstanceAzureADOnlyAuthenticationsClient ¶
type ManagedInstanceAzureADOnlyAuthenticationsClient struct {
// contains filtered or unexported fields
}
ManagedInstanceAzureADOnlyAuthenticationsClient contains the methods for the ManagedInstanceAzureADOnlyAuthentications group. Don't use this type directly, use NewManagedInstanceAzureADOnlyAuthenticationsClient() instead.
func NewManagedInstanceAzureADOnlyAuthenticationsClient ¶
func NewManagedInstanceAzureADOnlyAuthenticationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedInstanceAzureADOnlyAuthenticationsClient, error)
NewManagedInstanceAzureADOnlyAuthenticationsClient creates a new instance of ManagedInstanceAzureADOnlyAuthenticationsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedInstanceAzureADOnlyAuthenticationsClient) BeginCreateOrUpdate ¶
func (client *ManagedInstanceAzureADOnlyAuthenticationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, authenticationName AuthenticationName, parameters ManagedInstanceAzureADOnlyAuthentication, options *ManagedInstanceAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedInstanceAzureADOnlyAuthenticationsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Sets Server Active Directory only authentication property or updates an existing server Active Directory only authentication property. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- authenticationName - The name of server azure active directory only authentication.
- parameters - The required parameters for creating or updating an Active Directory only authentication property.
- options - ManagedInstanceAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceAzureADOnlyAuthenticationsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAzureADOnlyAuthCreateOrUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedInstanceAzureADOnlyAuthenticationsClient().BeginCreateOrUpdate(ctx, "Default-SQL-SouthEastAsia", "managedInstance", armsql.AuthenticationNameDefault, armsql.ManagedInstanceAzureADOnlyAuthentication{ Properties: &armsql.ManagedInstanceAzureADOnlyAuthProperties{ AzureADOnlyAuthentication: to.Ptr(false), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstanceAzureADOnlyAuthentication = armsql.ManagedInstanceAzureADOnlyAuthentication{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/azureadonlyauthentications"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/azureADOnlyAuthentications/providers/Microsoft.Sql/managedInstances/managedInstance/azureadonlyauthentications/default"), // Properties: &armsql.ManagedInstanceAzureADOnlyAuthProperties{ // AzureADOnlyAuthentication: to.Ptr(false), // }, // } }
Output:
func (*ManagedInstanceAzureADOnlyAuthenticationsClient) BeginDelete ¶
func (client *ManagedInstanceAzureADOnlyAuthenticationsClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, authenticationName AuthenticationName, options *ManagedInstanceAzureADOnlyAuthenticationsClientBeginDeleteOptions) (*runtime.Poller[ManagedInstanceAzureADOnlyAuthenticationsClientDeleteResponse], error)
BeginDelete - Deletes an existing server Active Directory only authentication property. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- authenticationName - The name of server azure active directory only authentication.
- options - ManagedInstanceAzureADOnlyAuthenticationsClientBeginDeleteOptions contains the optional parameters for the ManagedInstanceAzureADOnlyAuthenticationsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAzureADOnlyAuthDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedInstanceAzureADOnlyAuthenticationsClient().BeginDelete(ctx, "Default-SQL-SouthEastAsia", "managedInstance", armsql.AuthenticationNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ManagedInstanceAzureADOnlyAuthenticationsClient) Get ¶
func (client *ManagedInstanceAzureADOnlyAuthenticationsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, authenticationName AuthenticationName, options *ManagedInstanceAzureADOnlyAuthenticationsClientGetOptions) (ManagedInstanceAzureADOnlyAuthenticationsClientGetResponse, error)
Get - Gets a specific Azure Active Directory only authentication property. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- authenticationName - The name of server azure active directory only authentication.
- options - ManagedInstanceAzureADOnlyAuthenticationsClientGetOptions contains the optional parameters for the ManagedInstanceAzureADOnlyAuthenticationsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAzureADOnlyAuthGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedInstanceAzureADOnlyAuthenticationsClient().Get(ctx, "Default-SQL-SouthEastAsia", "managedInstance", armsql.AuthenticationNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstanceAzureADOnlyAuthentication = armsql.ManagedInstanceAzureADOnlyAuthentication{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/azureadonlyauthentications"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/azureADOnlyAuthentications/providers/Microsoft.Sql/managedInstances/managedInstance/azureadonlyauthentications/default"), // Properties: &armsql.ManagedInstanceAzureADOnlyAuthProperties{ // AzureADOnlyAuthentication: to.Ptr(true), // }, // } }
Output:
func (*ManagedInstanceAzureADOnlyAuthenticationsClient) NewListByInstancePager ¶ added in v0.5.0
func (client *ManagedInstanceAzureADOnlyAuthenticationsClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceOptions) *runtime.Pager[ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceResponse]
NewListByInstancePager - Gets a list of server Azure Active Directory only authentications.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceOptions contains the optional parameters for the ManagedInstanceAzureADOnlyAuthenticationsClient.NewListByInstancePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAzureADOnlyAuthListByInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedInstanceAzureADOnlyAuthenticationsClient().NewListByInstancePager("Default-SQL-SouthEastAsia", "managedInstance", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedInstanceAzureADOnlyAuthListResult = armsql.ManagedInstanceAzureADOnlyAuthListResult{ // Value: []*armsql.ManagedInstanceAzureADOnlyAuthentication{ // { // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/azureadonlyauthentications"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/azureADOnlyAuthentications/providers/Microsoft.Sql/managedInstances/managedInstance/azureadonlyauthentications/default"), // Properties: &armsql.ManagedInstanceAzureADOnlyAuthProperties{ // AzureADOnlyAuthentication: to.Ptr(true), // }, // }}, // } } }
Output:
type ManagedInstanceAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedInstanceAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceAzureADOnlyAuthenticationsClient.BeginCreateOrUpdate method.
type ManagedInstanceAzureADOnlyAuthenticationsClientBeginDeleteOptions ¶ added in v0.3.0
type ManagedInstanceAzureADOnlyAuthenticationsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceAzureADOnlyAuthenticationsClientBeginDeleteOptions contains the optional parameters for the ManagedInstanceAzureADOnlyAuthenticationsClient.BeginDelete method.
type ManagedInstanceAzureADOnlyAuthenticationsClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedInstanceAzureADOnlyAuthenticationsClientCreateOrUpdateResponse struct { // Azure Active Directory only authentication. ManagedInstanceAzureADOnlyAuthentication }
ManagedInstanceAzureADOnlyAuthenticationsClientCreateOrUpdateResponse contains the response from method ManagedInstanceAzureADOnlyAuthenticationsClient.BeginCreateOrUpdate.
type ManagedInstanceAzureADOnlyAuthenticationsClientDeleteResponse ¶ added in v0.3.0
type ManagedInstanceAzureADOnlyAuthenticationsClientDeleteResponse struct { }
ManagedInstanceAzureADOnlyAuthenticationsClientDeleteResponse contains the response from method ManagedInstanceAzureADOnlyAuthenticationsClient.BeginDelete.
type ManagedInstanceAzureADOnlyAuthenticationsClientGetOptions ¶ added in v0.3.0
type ManagedInstanceAzureADOnlyAuthenticationsClientGetOptions struct { }
ManagedInstanceAzureADOnlyAuthenticationsClientGetOptions contains the optional parameters for the ManagedInstanceAzureADOnlyAuthenticationsClient.Get method.
type ManagedInstanceAzureADOnlyAuthenticationsClientGetResponse ¶ added in v0.3.0
type ManagedInstanceAzureADOnlyAuthenticationsClientGetResponse struct { // Azure Active Directory only authentication. ManagedInstanceAzureADOnlyAuthentication }
ManagedInstanceAzureADOnlyAuthenticationsClientGetResponse contains the response from method ManagedInstanceAzureADOnlyAuthenticationsClient.Get.
type ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceOptions ¶ added in v0.3.0
type ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceOptions struct { }
ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceOptions contains the optional parameters for the ManagedInstanceAzureADOnlyAuthenticationsClient.NewListByInstancePager method.
type ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceResponse ¶ added in v0.3.0
type ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceResponse struct { // A list of active directory only authentications. ManagedInstanceAzureADOnlyAuthListResult }
ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceResponse contains the response from method ManagedInstanceAzureADOnlyAuthenticationsClient.NewListByInstancePager.
type ManagedInstanceEditionCapability ¶
type ManagedInstanceEditionCapability struct { // The reason for the capability not being available. Reason *string // READ-ONLY; The managed server version name. Name *string // READ-ONLY; The status of the capability. Status *CapabilityStatus // READ-ONLY; The supported families. SupportedFamilies []*ManagedInstanceFamilyCapability // READ-ONLY; The list of supported storage capabilities for this edition SupportedStorageCapabilities []*StorageCapability // READ-ONLY; Whether or not zone redundancy is supported for the edition. ZoneRedundant *bool }
ManagedInstanceEditionCapability - The managed server capability
func (ManagedInstanceEditionCapability) MarshalJSON ¶
func (m ManagedInstanceEditionCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceEditionCapability.
func (*ManagedInstanceEditionCapability) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceEditionCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceEditionCapability.
type ManagedInstanceEncryptionProtector ¶
type ManagedInstanceEncryptionProtector struct { // Resource properties. Properties *ManagedInstanceEncryptionProtectorProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Kind of encryption protector. This is metadata used for the Azure portal experience. Kind *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ManagedInstanceEncryptionProtector - The managed instance encryption protector.
func (ManagedInstanceEncryptionProtector) MarshalJSON ¶
func (m ManagedInstanceEncryptionProtector) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceEncryptionProtector.
func (*ManagedInstanceEncryptionProtector) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceEncryptionProtector) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceEncryptionProtector.
type ManagedInstanceEncryptionProtectorListResult ¶
type ManagedInstanceEncryptionProtectorListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ManagedInstanceEncryptionProtector }
ManagedInstanceEncryptionProtectorListResult - A list of managed instance encryption protectors.
func (ManagedInstanceEncryptionProtectorListResult) MarshalJSON ¶
func (m ManagedInstanceEncryptionProtectorListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceEncryptionProtectorListResult.
func (*ManagedInstanceEncryptionProtectorListResult) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceEncryptionProtectorListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceEncryptionProtectorListResult.
type ManagedInstanceEncryptionProtectorProperties ¶
type ManagedInstanceEncryptionProtectorProperties struct { // REQUIRED; The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. ServerKeyType *ServerKeyType // Key auto rotation opt-in flag. Either true or false. AutoRotationEnabled *bool // The name of the managed instance key. ServerKeyName *string // READ-ONLY; Thumbprint of the server key. Thumbprint *string // READ-ONLY; The URI of the server key. URI *string }
ManagedInstanceEncryptionProtectorProperties - Properties for an encryption protector execution.
func (ManagedInstanceEncryptionProtectorProperties) MarshalJSON ¶ added in v1.1.0
func (m ManagedInstanceEncryptionProtectorProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceEncryptionProtectorProperties.
func (*ManagedInstanceEncryptionProtectorProperties) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceEncryptionProtectorProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceEncryptionProtectorProperties.
type ManagedInstanceEncryptionProtectorsClient ¶
type ManagedInstanceEncryptionProtectorsClient struct {
// contains filtered or unexported fields
}
ManagedInstanceEncryptionProtectorsClient contains the methods for the ManagedInstanceEncryptionProtectors group. Don't use this type directly, use NewManagedInstanceEncryptionProtectorsClient() instead.
func NewManagedInstanceEncryptionProtectorsClient ¶
func NewManagedInstanceEncryptionProtectorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedInstanceEncryptionProtectorsClient, error)
NewManagedInstanceEncryptionProtectorsClient creates a new instance of ManagedInstanceEncryptionProtectorsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedInstanceEncryptionProtectorsClient) BeginCreateOrUpdate ¶
func (client *ManagedInstanceEncryptionProtectorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, encryptionProtectorName EncryptionProtectorName, parameters ManagedInstanceEncryptionProtector, options *ManagedInstanceEncryptionProtectorsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedInstanceEncryptionProtectorsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Updates an existing encryption protector. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- encryptionProtectorName - The name of the encryption protector to be updated.
- parameters - The requested encryption protector resource state.
- options - ManagedInstanceEncryptionProtectorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceEncryptionProtectorsClient.BeginCreateOrUpdate method.
Example (UpdateTheEncryptionProtectorToKeyVault) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateKeyVault.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedInstanceEncryptionProtectorsClient().BeginCreateOrUpdate(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", armsql.EncryptionProtectorNameCurrent, armsql.ManagedInstanceEncryptionProtector{ Properties: &armsql.ManagedInstanceEncryptionProtectorProperties{ AutoRotationEnabled: to.Ptr(false), ServerKeyName: to.Ptr("someVault_someKey_01234567890123456789012345678901"), ServerKeyType: to.Ptr(armsql.ServerKeyTypeAzureKeyVault), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstanceEncryptionProtector = armsql.ManagedInstanceEncryptionProtector{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/managedInstances/encryptionProtector"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/encryptionProtector/current"), // Kind: to.Ptr("azurekeyvault"), // Properties: &armsql.ManagedInstanceEncryptionProtectorProperties{ // AutoRotationEnabled: to.Ptr(false), // ServerKeyName: to.Ptr("someVault_someKey_01234567890123456789012345678901"), // ServerKeyType: to.Ptr(armsql.ServerKeyTypeAzureKeyVault), // }, // } }
Output:
Example (UpdateTheEncryptionProtectorToServiceManaged) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateServiceManaged.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedInstanceEncryptionProtectorsClient().BeginCreateOrUpdate(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", armsql.EncryptionProtectorNameCurrent, armsql.ManagedInstanceEncryptionProtector{ Properties: &armsql.ManagedInstanceEncryptionProtectorProperties{ ServerKeyName: to.Ptr("ServiceManaged"), ServerKeyType: to.Ptr(armsql.ServerKeyTypeServiceManaged), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstanceEncryptionProtector = armsql.ManagedInstanceEncryptionProtector{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/managedInstances/encryptionProtector"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/encryptionProtector/current"), // Kind: to.Ptr("servicemanaged"), // Properties: &armsql.ManagedInstanceEncryptionProtectorProperties{ // ServerKeyName: to.Ptr("ServiceManaged"), // ServerKeyType: to.Ptr(armsql.ServerKeyTypeServiceManaged), // }, // } }
Output:
func (*ManagedInstanceEncryptionProtectorsClient) BeginRevalidate ¶
func (client *ManagedInstanceEncryptionProtectorsClient) BeginRevalidate(ctx context.Context, resourceGroupName string, managedInstanceName string, encryptionProtectorName EncryptionProtectorName, options *ManagedInstanceEncryptionProtectorsClientBeginRevalidateOptions) (*runtime.Poller[ManagedInstanceEncryptionProtectorsClientRevalidateResponse], error)
BeginRevalidate - Revalidates an existing encryption protector. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- encryptionProtectorName - The name of the encryption protector to be updated.
- options - ManagedInstanceEncryptionProtectorsClientBeginRevalidateOptions contains the optional parameters for the ManagedInstanceEncryptionProtectorsClient.BeginRevalidate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceEncryptionProtectorRevalidate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedInstanceEncryptionProtectorsClient().BeginRevalidate(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", armsql.EncryptionProtectorNameCurrent, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ManagedInstanceEncryptionProtectorsClient) Get ¶
func (client *ManagedInstanceEncryptionProtectorsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, encryptionProtectorName EncryptionProtectorName, options *ManagedInstanceEncryptionProtectorsClientGetOptions) (ManagedInstanceEncryptionProtectorsClientGetResponse, error)
Get - Gets a managed instance encryption protector. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- encryptionProtectorName - The name of the encryption protector to be retrieved.
- options - ManagedInstanceEncryptionProtectorsClientGetOptions contains the optional parameters for the ManagedInstanceEncryptionProtectorsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceEncryptionProtectorGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedInstanceEncryptionProtectorsClient().Get(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", armsql.EncryptionProtectorNameCurrent, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstanceEncryptionProtector = armsql.ManagedInstanceEncryptionProtector{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/managedInstances/encryptionProtector"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/encryptionProtector/current"), // Kind: to.Ptr("azurekeyvault"), // Properties: &armsql.ManagedInstanceEncryptionProtectorProperties{ // ServerKeyName: to.Ptr("someVault_someKey_01234567890123456789012345678901"), // ServerKeyType: to.Ptr(armsql.ServerKeyTypeAzureKeyVault), // URI: to.Ptr("https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901"), // }, // } }
Output:
func (*ManagedInstanceEncryptionProtectorsClient) NewListByInstancePager ¶ added in v0.5.0
func (client *ManagedInstanceEncryptionProtectorsClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedInstanceEncryptionProtectorsClientListByInstanceOptions) *runtime.Pager[ManagedInstanceEncryptionProtectorsClientListByInstanceResponse]
NewListByInstancePager - Gets a list of managed instance encryption protectors
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - ManagedInstanceEncryptionProtectorsClientListByInstanceOptions contains the optional parameters for the ManagedInstanceEncryptionProtectorsClient.NewListByInstancePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceEncryptionProtectorList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedInstanceEncryptionProtectorsClient().NewListByInstancePager("sqlcrudtest-7398", "sqlcrudtest-4645", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedInstanceEncryptionProtectorListResult = armsql.ManagedInstanceEncryptionProtectorListResult{ // Value: []*armsql.ManagedInstanceEncryptionProtector{ // { // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/managedInstances/encryptionProtector"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/encryptionProtector/current"), // Kind: to.Ptr("azurekeyvault"), // Properties: &armsql.ManagedInstanceEncryptionProtectorProperties{ // ServerKeyName: to.Ptr("someVault_someKey_01234567890123456789012345678901"), // ServerKeyType: to.Ptr(armsql.ServerKeyTypeAzureKeyVault), // URI: to.Ptr("https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901"), // }, // }}, // } } }
Output:
type ManagedInstanceEncryptionProtectorsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedInstanceEncryptionProtectorsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceEncryptionProtectorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceEncryptionProtectorsClient.BeginCreateOrUpdate method.
type ManagedInstanceEncryptionProtectorsClientBeginRevalidateOptions ¶ added in v0.3.0
type ManagedInstanceEncryptionProtectorsClientBeginRevalidateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceEncryptionProtectorsClientBeginRevalidateOptions contains the optional parameters for the ManagedInstanceEncryptionProtectorsClient.BeginRevalidate method.
type ManagedInstanceEncryptionProtectorsClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedInstanceEncryptionProtectorsClientCreateOrUpdateResponse struct { // The managed instance encryption protector. ManagedInstanceEncryptionProtector }
ManagedInstanceEncryptionProtectorsClientCreateOrUpdateResponse contains the response from method ManagedInstanceEncryptionProtectorsClient.BeginCreateOrUpdate.
type ManagedInstanceEncryptionProtectorsClientGetOptions ¶ added in v0.3.0
type ManagedInstanceEncryptionProtectorsClientGetOptions struct { }
ManagedInstanceEncryptionProtectorsClientGetOptions contains the optional parameters for the ManagedInstanceEncryptionProtectorsClient.Get method.
type ManagedInstanceEncryptionProtectorsClientGetResponse ¶ added in v0.3.0
type ManagedInstanceEncryptionProtectorsClientGetResponse struct { // The managed instance encryption protector. ManagedInstanceEncryptionProtector }
ManagedInstanceEncryptionProtectorsClientGetResponse contains the response from method ManagedInstanceEncryptionProtectorsClient.Get.
type ManagedInstanceEncryptionProtectorsClientListByInstanceOptions ¶ added in v0.3.0
type ManagedInstanceEncryptionProtectorsClientListByInstanceOptions struct { }
ManagedInstanceEncryptionProtectorsClientListByInstanceOptions contains the optional parameters for the ManagedInstanceEncryptionProtectorsClient.NewListByInstancePager method.
type ManagedInstanceEncryptionProtectorsClientListByInstanceResponse ¶ added in v0.3.0
type ManagedInstanceEncryptionProtectorsClientListByInstanceResponse struct { // A list of managed instance encryption protectors. ManagedInstanceEncryptionProtectorListResult }
ManagedInstanceEncryptionProtectorsClientListByInstanceResponse contains the response from method ManagedInstanceEncryptionProtectorsClient.NewListByInstancePager.
type ManagedInstanceEncryptionProtectorsClientRevalidateResponse ¶ added in v0.3.0
type ManagedInstanceEncryptionProtectorsClientRevalidateResponse struct { }
ManagedInstanceEncryptionProtectorsClientRevalidateResponse contains the response from method ManagedInstanceEncryptionProtectorsClient.BeginRevalidate.
type ManagedInstanceExternalAdministrator ¶
type ManagedInstanceExternalAdministrator struct { // Type of the sever administrator. AdministratorType *AdministratorType // Azure Active Directory only Authentication enabled. AzureADOnlyAuthentication *bool // Login name of the server administrator. Login *string // Principal Type of the sever administrator. PrincipalType *PrincipalType // SID (object ID) of the server administrator. Sid *string // Tenant ID of the administrator. TenantID *string }
ManagedInstanceExternalAdministrator - Properties of a active directory administrator.
func (ManagedInstanceExternalAdministrator) MarshalJSON ¶ added in v1.1.0
func (m ManagedInstanceExternalAdministrator) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceExternalAdministrator.
func (*ManagedInstanceExternalAdministrator) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceExternalAdministrator) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceExternalAdministrator.
type ManagedInstanceFamilyCapability ¶
type ManagedInstanceFamilyCapability struct { // The reason for the capability not being available. Reason *string // READ-ONLY; Family name. Name *string // READ-ONLY; SKU name. SKU *string // READ-ONLY; The status of the capability. Status *CapabilityStatus // READ-ONLY; List of supported license types. SupportedLicenseTypes []*LicenseTypeCapability // READ-ONLY; List of supported virtual cores values. SupportedVcoresValues []*ManagedInstanceVcoresCapability }
ManagedInstanceFamilyCapability - The managed server family capability.
func (ManagedInstanceFamilyCapability) MarshalJSON ¶
func (m ManagedInstanceFamilyCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceFamilyCapability.
func (*ManagedInstanceFamilyCapability) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceFamilyCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceFamilyCapability.
type ManagedInstanceKey ¶
type ManagedInstanceKey struct { // Resource properties. Properties *ManagedInstanceKeyProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Kind of encryption protector. This is metadata used for the Azure portal experience. Kind *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ManagedInstanceKey - A managed instance key.
func (ManagedInstanceKey) MarshalJSON ¶
func (m ManagedInstanceKey) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceKey.
func (*ManagedInstanceKey) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceKey) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceKey.
type ManagedInstanceKeyListResult ¶
type ManagedInstanceKeyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ManagedInstanceKey }
ManagedInstanceKeyListResult - A list of managed instance keys.
func (ManagedInstanceKeyListResult) MarshalJSON ¶
func (m ManagedInstanceKeyListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceKeyListResult.
func (*ManagedInstanceKeyListResult) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceKeyListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceKeyListResult.
type ManagedInstanceKeyProperties ¶
type ManagedInstanceKeyProperties struct { // REQUIRED; The key type like 'ServiceManaged', 'AzureKeyVault'. ServerKeyType *ServerKeyType // The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required. URI *string // READ-ONLY; Key auto rotation opt-in flag. Either true or false. AutoRotationEnabled *bool // READ-ONLY; The key creation date. CreationDate *time.Time // READ-ONLY; Thumbprint of the key. Thumbprint *string }
ManagedInstanceKeyProperties - Properties for a key execution.
func (ManagedInstanceKeyProperties) MarshalJSON ¶
func (m ManagedInstanceKeyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceKeyProperties.
func (*ManagedInstanceKeyProperties) UnmarshalJSON ¶
func (m *ManagedInstanceKeyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceKeyProperties.
type ManagedInstanceKeysClient ¶
type ManagedInstanceKeysClient struct {
// contains filtered or unexported fields
}
ManagedInstanceKeysClient contains the methods for the ManagedInstanceKeys group. Don't use this type directly, use NewManagedInstanceKeysClient() instead.
func NewManagedInstanceKeysClient ¶
func NewManagedInstanceKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedInstanceKeysClient, error)
NewManagedInstanceKeysClient creates a new instance of ManagedInstanceKeysClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedInstanceKeysClient) BeginCreateOrUpdate ¶
func (client *ManagedInstanceKeysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, keyName string, parameters ManagedInstanceKey, options *ManagedInstanceKeysClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedInstanceKeysClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a managed instance key. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- keyName - The name of the managed instance key to be operated on (updated or created).
- parameters - The requested managed instance key resource state.
- options - ManagedInstanceKeysClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceKeysClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceKeyCreateOrUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedInstanceKeysClient().BeginCreateOrUpdate(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", "someVault_someKey_01234567890123456789012345678901", armsql.ManagedInstanceKey{ Properties: &armsql.ManagedInstanceKeyProperties{ ServerKeyType: to.Ptr(armsql.ServerKeyTypeAzureKeyVault), URI: to.Ptr("https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstanceKey = armsql.ManagedInstanceKey{ // Name: to.Ptr("sqlcrudtest-4645"), // Type: to.Ptr("Microsoft.Sql/managedInstances/keys"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/keys/someVault_someKey_01234567890123456789012345678901"), // Kind: to.Ptr("azurekeyvault"), // Properties: &armsql.ManagedInstanceKeyProperties{ // AutoRotationEnabled: to.Ptr(false), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-01T00:00:00.000Z"); return t}()), // Thumbprint: to.Ptr("00112233445566778899AABBCCDDEEFFAABBCCDD"), // }, // } }
Output:
func (*ManagedInstanceKeysClient) BeginDelete ¶
func (client *ManagedInstanceKeysClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, keyName string, options *ManagedInstanceKeysClientBeginDeleteOptions) (*runtime.Poller[ManagedInstanceKeysClientDeleteResponse], error)
BeginDelete - Deletes the managed instance key with the given name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- keyName - The name of the managed instance key to be deleted.
- options - ManagedInstanceKeysClientBeginDeleteOptions contains the optional parameters for the ManagedInstanceKeysClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceKeyDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedInstanceKeysClient().BeginDelete(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", "someVault_someKey_01234567890123456789012345678901", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ManagedInstanceKeysClient) Get ¶
func (client *ManagedInstanceKeysClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, keyName string, options *ManagedInstanceKeysClientGetOptions) (ManagedInstanceKeysClientGetResponse, error)
Get - Gets a managed instance key. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- keyName - The name of the managed instance key to be retrieved.
- options - ManagedInstanceKeysClientGetOptions contains the optional parameters for the ManagedInstanceKeysClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceKeyGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedInstanceKeysClient().Get(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", "someVault_someKey_01234567890123456789012345678901", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstanceKey = armsql.ManagedInstanceKey{ // Name: to.Ptr("sqlcrudtest-4645"), // Type: to.Ptr("Microsoft.Sql/managedInstances/keys"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/keys/someVault_someKey_01234567890123456789012345678901"), // Kind: to.Ptr("azurekeyvault"), // Properties: &armsql.ManagedInstanceKeyProperties{ // AutoRotationEnabled: to.Ptr(false), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-01T00:00:00.000Z"); return t}()), // Thumbprint: to.Ptr("00112233445566778899AABBCCDDEEFFAABBCCDD"), // }, // } }
Output:
func (*ManagedInstanceKeysClient) NewListByInstancePager ¶ added in v0.5.0
func (client *ManagedInstanceKeysClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedInstanceKeysClientListByInstanceOptions) *runtime.Pager[ManagedInstanceKeysClientListByInstanceResponse]
NewListByInstancePager - Gets a list of managed instance keys.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - ManagedInstanceKeysClientListByInstanceOptions contains the optional parameters for the ManagedInstanceKeysClient.NewListByInstancePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceKeyList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedInstanceKeysClient().NewListByInstancePager("sqlcrudtest-7398", "sqlcrudtest-4645", &armsql.ManagedInstanceKeysClientListByInstanceOptions{Filter: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedInstanceKeyListResult = armsql.ManagedInstanceKeyListResult{ // Value: []*armsql.ManagedInstanceKey{ // { // Name: to.Ptr("someVault_someKey_01234567890123456789012345678901"), // Type: to.Ptr("Microsoft.Sql/managedInstances/keys"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/keys/someVault_someKey_01234567890123456789012345678901"), // Kind: to.Ptr("azurekeyvault"), // Properties: &armsql.ManagedInstanceKeyProperties{ // AutoRotationEnabled: to.Ptr(false), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-15T00:00:00.000Z"); return t}()), // Thumbprint: to.Ptr("00112233445566778899AABBCCDDEEFFAABBCCDD"), // }, // }, // { // Name: to.Ptr("myVault_myKey_11111111111111111111111111111111"), // Type: to.Ptr("Microsoft.Sql/managedInstances/keys"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/keys/myVault_myKey_11111111111111111111111111111111"), // Kind: to.Ptr("azurekeyvault"), // Properties: &armsql.ManagedInstanceKeyProperties{ // AutoRotationEnabled: to.Ptr(false), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-15T00:00:00.000Z"); return t}()), // Thumbprint: to.Ptr("AAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBB"), // }, // }, // { // Name: to.Ptr("ServiceManaged"), // Type: to.Ptr("Microsoft.Sql/managedInstances/keys"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/keys/ServiceManaged"), // Kind: to.Ptr("servicemanaged"), // Properties: &armsql.ManagedInstanceKeyProperties{ // }, // }}, // } } }
Output:
type ManagedInstanceKeysClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedInstanceKeysClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceKeysClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceKeysClient.BeginCreateOrUpdate method.
type ManagedInstanceKeysClientBeginDeleteOptions ¶ added in v0.3.0
type ManagedInstanceKeysClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceKeysClientBeginDeleteOptions contains the optional parameters for the ManagedInstanceKeysClient.BeginDelete method.
type ManagedInstanceKeysClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedInstanceKeysClientCreateOrUpdateResponse struct { // A managed instance key. ManagedInstanceKey }
ManagedInstanceKeysClientCreateOrUpdateResponse contains the response from method ManagedInstanceKeysClient.BeginCreateOrUpdate.
type ManagedInstanceKeysClientDeleteResponse ¶ added in v0.3.0
type ManagedInstanceKeysClientDeleteResponse struct { }
ManagedInstanceKeysClientDeleteResponse contains the response from method ManagedInstanceKeysClient.BeginDelete.
type ManagedInstanceKeysClientGetOptions ¶ added in v0.3.0
type ManagedInstanceKeysClientGetOptions struct { }
ManagedInstanceKeysClientGetOptions contains the optional parameters for the ManagedInstanceKeysClient.Get method.
type ManagedInstanceKeysClientGetResponse ¶ added in v0.3.0
type ManagedInstanceKeysClientGetResponse struct { // A managed instance key. ManagedInstanceKey }
ManagedInstanceKeysClientGetResponse contains the response from method ManagedInstanceKeysClient.Get.
type ManagedInstanceKeysClientListByInstanceOptions ¶ added in v0.3.0
type ManagedInstanceKeysClientListByInstanceOptions struct { // An OData filter expression that filters elements in the collection. Filter *string }
ManagedInstanceKeysClientListByInstanceOptions contains the optional parameters for the ManagedInstanceKeysClient.NewListByInstancePager method.
type ManagedInstanceKeysClientListByInstanceResponse ¶ added in v0.3.0
type ManagedInstanceKeysClientListByInstanceResponse struct { // A list of managed instance keys. ManagedInstanceKeyListResult }
ManagedInstanceKeysClientListByInstanceResponse contains the response from method ManagedInstanceKeysClient.NewListByInstancePager.
type ManagedInstanceLicenseType ¶
type ManagedInstanceLicenseType string
ManagedInstanceLicenseType - The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses).
const ( ManagedInstanceLicenseTypeBasePrice ManagedInstanceLicenseType = "BasePrice" ManagedInstanceLicenseTypeLicenseIncluded ManagedInstanceLicenseType = "LicenseIncluded" )
func PossibleManagedInstanceLicenseTypeValues ¶
func PossibleManagedInstanceLicenseTypeValues() []ManagedInstanceLicenseType
PossibleManagedInstanceLicenseTypeValues returns the possible values for the ManagedInstanceLicenseType const type.
type ManagedInstanceListResult ¶
type ManagedInstanceListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ManagedInstance }
ManagedInstanceListResult - A list of managed instances.
func (ManagedInstanceListResult) MarshalJSON ¶
func (m ManagedInstanceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceListResult.
func (*ManagedInstanceListResult) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceListResult.
type ManagedInstanceLongTermRetentionBackup ¶
type ManagedInstanceLongTermRetentionBackup struct { // Resource properties. Properties *ManagedInstanceLongTermRetentionBackupProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ManagedInstanceLongTermRetentionBackup - A long term retention backup for a managed database.
func (ManagedInstanceLongTermRetentionBackup) MarshalJSON ¶
func (m ManagedInstanceLongTermRetentionBackup) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceLongTermRetentionBackup.
func (*ManagedInstanceLongTermRetentionBackup) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceLongTermRetentionBackup) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceLongTermRetentionBackup.
type ManagedInstanceLongTermRetentionBackupListResult ¶
type ManagedInstanceLongTermRetentionBackupListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ManagedInstanceLongTermRetentionBackup }
ManagedInstanceLongTermRetentionBackupListResult - A list of long term retention backups for managed database(s).
func (ManagedInstanceLongTermRetentionBackupListResult) MarshalJSON ¶
func (m ManagedInstanceLongTermRetentionBackupListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceLongTermRetentionBackupListResult.
func (*ManagedInstanceLongTermRetentionBackupListResult) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceLongTermRetentionBackupListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceLongTermRetentionBackupListResult.
type ManagedInstanceLongTermRetentionBackupProperties ¶
type ManagedInstanceLongTermRetentionBackupProperties struct { // READ-ONLY; The time the long term retention backup will expire. BackupExpirationTime *time.Time // READ-ONLY; The storage redundancy type of the backup BackupStorageRedundancy *BackupStorageRedundancy // READ-ONLY; The time the backup was taken BackupTime *time.Time // READ-ONLY; The delete time of the database DatabaseDeletionTime *time.Time // READ-ONLY; The name of the database the backup belong to DatabaseName *string // READ-ONLY; The create time of the instance. ManagedInstanceCreateTime *time.Time // READ-ONLY; The managed instance that the backup database belongs to. ManagedInstanceName *string }
ManagedInstanceLongTermRetentionBackupProperties - Properties of a long term retention backup
func (ManagedInstanceLongTermRetentionBackupProperties) MarshalJSON ¶
func (m ManagedInstanceLongTermRetentionBackupProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceLongTermRetentionBackupProperties.
func (*ManagedInstanceLongTermRetentionBackupProperties) UnmarshalJSON ¶
func (m *ManagedInstanceLongTermRetentionBackupProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceLongTermRetentionBackupProperties.
type ManagedInstanceLongTermRetentionPoliciesClient ¶
type ManagedInstanceLongTermRetentionPoliciesClient struct {
// contains filtered or unexported fields
}
ManagedInstanceLongTermRetentionPoliciesClient contains the methods for the ManagedInstanceLongTermRetentionPolicies group. Don't use this type directly, use NewManagedInstanceLongTermRetentionPoliciesClient() instead.
func NewManagedInstanceLongTermRetentionPoliciesClient ¶
func NewManagedInstanceLongTermRetentionPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedInstanceLongTermRetentionPoliciesClient, error)
NewManagedInstanceLongTermRetentionPoliciesClient creates a new instance of ManagedInstanceLongTermRetentionPoliciesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedInstanceLongTermRetentionPoliciesClient) BeginCreateOrUpdate ¶
func (client *ManagedInstanceLongTermRetentionPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, policyName ManagedInstanceLongTermRetentionPolicyName, parameters ManagedInstanceLongTermRetentionPolicy, options *ManagedInstanceLongTermRetentionPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedInstanceLongTermRetentionPoliciesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Sets a managed database's long term retention policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- policyName - The policy name. Should always be Default.
- parameters - The long term retention policy info.
- options - ManagedInstanceLongTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceLongTermRetentionPoliciesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceLongTermRetentionPolicyCreateOrUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedInstanceLongTermRetentionPoliciesClient().BeginCreateOrUpdate(ctx, "testResourceGroup", "testInstance", "testDatabase", armsql.ManagedInstanceLongTermRetentionPolicyNameDefault, armsql.ManagedInstanceLongTermRetentionPolicy{ Properties: &armsql.BaseLongTermRetentionPolicyProperties{ MonthlyRetention: to.Ptr("P1Y"), WeekOfYear: to.Ptr[int32](5), WeeklyRetention: to.Ptr("P1M"), YearlyRetention: to.Ptr("P5Y"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstanceLongTermRetentionPolicy = armsql.ManagedInstanceLongTermRetentionPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/resourceGroups/managedInstances/databases/backupLongTermRetentionPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/managedInstances/testInstance/databases/testDatabase/backupLongTermRetentionPolicies/default"), // Properties: &armsql.BaseLongTermRetentionPolicyProperties{ // MonthlyRetention: to.Ptr("P1Y"), // WeekOfYear: to.Ptr[int32](5), // WeeklyRetention: to.Ptr("P1M"), // YearlyRetention: to.Ptr("P5Y"), // }, // } }
Output:
func (*ManagedInstanceLongTermRetentionPoliciesClient) Get ¶
func (client *ManagedInstanceLongTermRetentionPoliciesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, policyName ManagedInstanceLongTermRetentionPolicyName, options *ManagedInstanceLongTermRetentionPoliciesClientGetOptions) (ManagedInstanceLongTermRetentionPoliciesClientGetResponse, error)
Get - Gets a managed database's long term retention policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- policyName - The policy name. Should always be Default.
- options - ManagedInstanceLongTermRetentionPoliciesClientGetOptions contains the optional parameters for the ManagedInstanceLongTermRetentionPoliciesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceLongTermRetentionPolicyGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedInstanceLongTermRetentionPoliciesClient().Get(ctx, "testResourceGroup", "testInstance", "testDatabase", armsql.ManagedInstanceLongTermRetentionPolicyNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstanceLongTermRetentionPolicy = armsql.ManagedInstanceLongTermRetentionPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/resourceGroups/managedInstances/databases/backupLongTermRetentionPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/resourceGroups/testResourceGroup/managedInstances/testInstance/databases/testDatabase/backupLongTermRetentionPolicies/default"), // Properties: &armsql.BaseLongTermRetentionPolicyProperties{ // MonthlyRetention: to.Ptr("P1Y"), // WeekOfYear: to.Ptr[int32](5), // WeeklyRetention: to.Ptr("P1M"), // YearlyRetention: to.Ptr("P5Y"), // }, // } }
Output:
func (*ManagedInstanceLongTermRetentionPoliciesClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *ManagedInstanceLongTermRetentionPoliciesClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseOptions) *runtime.Pager[ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseResponse]
NewListByDatabasePager - Gets a database's long term retention policy.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- options - ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseOptions contains the optional parameters for the ManagedInstanceLongTermRetentionPoliciesClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceLongTermRetentionPolicyListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedInstanceLongTermRetentionPoliciesClient().NewListByDatabasePager("testResourceGroup", "testInstance", "testDatabase", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedInstanceLongTermRetentionPolicyListResult = armsql.ManagedInstanceLongTermRetentionPolicyListResult{ // Value: []*armsql.ManagedInstanceLongTermRetentionPolicy{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/resourceGroups/managedInstances/databases/backupLongTermRetentionPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testResourceGroup/providers/Microsoft.Sql/managedInstances/testInstance/databases/testDatabase/backupLongTermRetentionPolicies/default"), // Properties: &armsql.BaseLongTermRetentionPolicyProperties{ // MonthlyRetention: to.Ptr("P1Y"), // WeekOfYear: to.Ptr[int32](5), // WeeklyRetention: to.Ptr("P1M"), // YearlyRetention: to.Ptr("P5Y"), // }, // }}, // } } }
Output:
type ManagedInstanceLongTermRetentionPoliciesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedInstanceLongTermRetentionPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceLongTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceLongTermRetentionPoliciesClient.BeginCreateOrUpdate method.
type ManagedInstanceLongTermRetentionPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedInstanceLongTermRetentionPoliciesClientCreateOrUpdateResponse struct { // A long term retention policy. ManagedInstanceLongTermRetentionPolicy }
ManagedInstanceLongTermRetentionPoliciesClientCreateOrUpdateResponse contains the response from method ManagedInstanceLongTermRetentionPoliciesClient.BeginCreateOrUpdate.
type ManagedInstanceLongTermRetentionPoliciesClientGetOptions ¶ added in v0.3.0
type ManagedInstanceLongTermRetentionPoliciesClientGetOptions struct { }
ManagedInstanceLongTermRetentionPoliciesClientGetOptions contains the optional parameters for the ManagedInstanceLongTermRetentionPoliciesClient.Get method.
type ManagedInstanceLongTermRetentionPoliciesClientGetResponse ¶ added in v0.3.0
type ManagedInstanceLongTermRetentionPoliciesClientGetResponse struct { // A long term retention policy. ManagedInstanceLongTermRetentionPolicy }
ManagedInstanceLongTermRetentionPoliciesClientGetResponse contains the response from method ManagedInstanceLongTermRetentionPoliciesClient.Get.
type ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseOptions ¶ added in v0.3.0
type ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseOptions struct { }
ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseOptions contains the optional parameters for the ManagedInstanceLongTermRetentionPoliciesClient.NewListByDatabasePager method.
type ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseResponse ¶ added in v0.3.0
type ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseResponse struct { // A list of long term retention policies. ManagedInstanceLongTermRetentionPolicyListResult }
ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseResponse contains the response from method ManagedInstanceLongTermRetentionPoliciesClient.NewListByDatabasePager.
type ManagedInstanceLongTermRetentionPolicy ¶
type ManagedInstanceLongTermRetentionPolicy struct { // Resource properties. Properties *BaseLongTermRetentionPolicyProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ManagedInstanceLongTermRetentionPolicy - A long term retention policy.
func (ManagedInstanceLongTermRetentionPolicy) MarshalJSON ¶
func (m ManagedInstanceLongTermRetentionPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceLongTermRetentionPolicy.
func (*ManagedInstanceLongTermRetentionPolicy) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceLongTermRetentionPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceLongTermRetentionPolicy.
type ManagedInstanceLongTermRetentionPolicyListResult ¶
type ManagedInstanceLongTermRetentionPolicyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ManagedInstanceLongTermRetentionPolicy }
ManagedInstanceLongTermRetentionPolicyListResult - A list of long term retention policies.
func (ManagedInstanceLongTermRetentionPolicyListResult) MarshalJSON ¶
func (m ManagedInstanceLongTermRetentionPolicyListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceLongTermRetentionPolicyListResult.
func (*ManagedInstanceLongTermRetentionPolicyListResult) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceLongTermRetentionPolicyListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceLongTermRetentionPolicyListResult.
type ManagedInstanceLongTermRetentionPolicyName ¶
type ManagedInstanceLongTermRetentionPolicyName string
const (
ManagedInstanceLongTermRetentionPolicyNameDefault ManagedInstanceLongTermRetentionPolicyName = "default"
)
func PossibleManagedInstanceLongTermRetentionPolicyNameValues ¶
func PossibleManagedInstanceLongTermRetentionPolicyNameValues() []ManagedInstanceLongTermRetentionPolicyName
PossibleManagedInstanceLongTermRetentionPolicyNameValues returns the possible values for the ManagedInstanceLongTermRetentionPolicyName const type.
type ManagedInstanceMaintenanceConfigurationCapability ¶
type ManagedInstanceMaintenanceConfigurationCapability struct { // The reason for the capability not being available. Reason *string // READ-ONLY; Maintenance configuration name Name *string // READ-ONLY; The status of the capability. Status *CapabilityStatus }
ManagedInstanceMaintenanceConfigurationCapability - The maintenance configuration capability
func (ManagedInstanceMaintenanceConfigurationCapability) MarshalJSON ¶ added in v1.1.0
func (m ManagedInstanceMaintenanceConfigurationCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceMaintenanceConfigurationCapability.
func (*ManagedInstanceMaintenanceConfigurationCapability) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceMaintenanceConfigurationCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceMaintenanceConfigurationCapability.
type ManagedInstanceOperation ¶
type ManagedInstanceOperation struct { // Resource properties. Properties *ManagedInstanceOperationProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ManagedInstanceOperation - A managed instance operation.
func (ManagedInstanceOperation) MarshalJSON ¶
func (m ManagedInstanceOperation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceOperation.
func (*ManagedInstanceOperation) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceOperation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceOperation.
type ManagedInstanceOperationListResult ¶
type ManagedInstanceOperationListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ManagedInstanceOperation }
ManagedInstanceOperationListResult - The response to a list managed instance operations request
func (ManagedInstanceOperationListResult) MarshalJSON ¶
func (m ManagedInstanceOperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceOperationListResult.
func (*ManagedInstanceOperationListResult) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceOperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceOperationListResult.
type ManagedInstanceOperationParametersPair ¶
type ManagedInstanceOperationParametersPair struct { // READ-ONLY; The current parameters. CurrentParameters *UpsertManagedServerOperationParameters // READ-ONLY; The requested parameters. RequestedParameters *UpsertManagedServerOperationParameters }
ManagedInstanceOperationParametersPair - The parameters of a managed instance operation.
func (ManagedInstanceOperationParametersPair) MarshalJSON ¶ added in v1.1.0
func (m ManagedInstanceOperationParametersPair) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceOperationParametersPair.
func (*ManagedInstanceOperationParametersPair) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceOperationParametersPair) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceOperationParametersPair.
type ManagedInstanceOperationProperties ¶
type ManagedInstanceOperationProperties struct { // READ-ONLY; The operation description. Description *string // READ-ONLY; The operation error code. ErrorCode *int32 // READ-ONLY; The operation error description. ErrorDescription *string // READ-ONLY; The operation error severity. ErrorSeverity *int32 // READ-ONLY; The estimated completion time of the operation. EstimatedCompletionTime *time.Time // READ-ONLY; Whether the operation can be cancelled. IsCancellable *bool // READ-ONLY; Whether or not the error is a user error. IsUserError *bool // READ-ONLY; The name of the managed instance the operation is being performed on. ManagedInstanceName *string // READ-ONLY; The name of operation. Operation *string // READ-ONLY; The friendly name of operation. OperationFriendlyName *string // READ-ONLY; The operation parameters. OperationParameters *ManagedInstanceOperationParametersPair // READ-ONLY; The operation steps. OperationSteps *ManagedInstanceOperationSteps // READ-ONLY; The percentage of the operation completed. PercentComplete *int32 // READ-ONLY; The operation start time. StartTime *time.Time // READ-ONLY; The operation state. State *ManagementOperationState }
ManagedInstanceOperationProperties - The properties of a managed instance operation.
func (ManagedInstanceOperationProperties) MarshalJSON ¶
func (m ManagedInstanceOperationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceOperationProperties.
func (*ManagedInstanceOperationProperties) UnmarshalJSON ¶
func (m *ManagedInstanceOperationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceOperationProperties.
type ManagedInstanceOperationSteps ¶
type ManagedInstanceOperationSteps struct { // READ-ONLY; The number of current operation steps. CurrentStep *int32 // READ-ONLY; The operation steps list. StepsList []*UpsertManagedServerOperationStep // READ-ONLY; The total number of operation steps. TotalSteps *string }
ManagedInstanceOperationSteps - The steps of a managed instance operation.
func (ManagedInstanceOperationSteps) MarshalJSON ¶
func (m ManagedInstanceOperationSteps) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceOperationSteps.
func (*ManagedInstanceOperationSteps) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceOperationSteps) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceOperationSteps.
type ManagedInstanceOperationsClient ¶
type ManagedInstanceOperationsClient struct {
// contains filtered or unexported fields
}
ManagedInstanceOperationsClient contains the methods for the ManagedInstanceOperations group. Don't use this type directly, use NewManagedInstanceOperationsClient() instead.
func NewManagedInstanceOperationsClient ¶
func NewManagedInstanceOperationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedInstanceOperationsClient, error)
NewManagedInstanceOperationsClient creates a new instance of ManagedInstanceOperationsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedInstanceOperationsClient) Cancel ¶
func (client *ManagedInstanceOperationsClient) Cancel(ctx context.Context, resourceGroupName string, managedInstanceName string, operationID string, options *ManagedInstanceOperationsClientCancelOptions) (ManagedInstanceOperationsClientCancelResponse, error)
Cancel - Cancels the asynchronous operation on the managed instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - ManagedInstanceOperationsClientCancelOptions contains the optional parameters for the ManagedInstanceOperationsClient.Cancel method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CancelManagedInstanceOperation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewManagedInstanceOperationsClient().Cancel(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", "11111111-1111-1111-1111-111111111111", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*ManagedInstanceOperationsClient) Get ¶
func (client *ManagedInstanceOperationsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, operationID string, options *ManagedInstanceOperationsClientGetOptions) (ManagedInstanceOperationsClientGetResponse, error)
Get - Gets a management operation on a managed instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - ManagedInstanceOperationsClientGetOptions contains the optional parameters for the ManagedInstanceOperationsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetManagedInstanceOperation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedInstanceOperationsClient().Get(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", "00000000-1111-2222-3333-444444444444", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstanceOperation = armsql.ManagedInstanceOperation{ // Name: to.Ptr("11111111-1111-1111-1111-111111111111"), // Type: to.Ptr("Microsoft.Sql/managedInstances/operations"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/11111111-1111-1111-1111-111111111111"), // Properties: &armsql.ManagedInstanceOperationProperties{ // IsCancellable: to.Ptr(false), // ManagedInstanceName: to.Ptr("sqlcrudtest-4645"), // Operation: to.Ptr("UpsertManagedServer"), // OperationFriendlyName: to.Ptr("UPDATE MANAGED SERVER"), // OperationSteps: &armsql.ManagedInstanceOperationSteps{ // CurrentStep: to.Ptr[int32](2), // StepsList: []*armsql.UpsertManagedServerOperationStep{ // { // Name: to.Ptr("Request validation"), // Order: to.Ptr[int32](1), // Status: to.Ptr(armsql.UpsertManagedServerOperationStepStatusCompleted), // }, // { // Name: to.Ptr("New SQL Instance Startup"), // Order: to.Ptr[int32](2), // Status: to.Ptr(armsql.UpsertManagedServerOperationStepStatusCanceled), // }, // { // Name: to.Ptr("Seeding database files"), // Order: to.Ptr[int32](3), // Status: to.Ptr(armsql.UpsertManagedServerOperationStepStatusNotStarted), // }, // { // Name: to.Ptr("Preparing Failover and Failover"), // Order: to.Ptr[int32](4), // Status: to.Ptr(armsql.UpsertManagedServerOperationStepStatusNotStarted), // }, // { // Name: to.Ptr("Old SQL Instance cleanup"), // Order: to.Ptr[int32](5), // Status: to.Ptr(armsql.UpsertManagedServerOperationStepStatusNotStarted), // }}, // TotalSteps: to.Ptr("5"), // }, // PercentComplete: to.Ptr[int32](100), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-06T11:08:44.490Z"); return t}()), // State: to.Ptr(armsql.ManagementOperationStateCancelled), // }, // } }
Output:
func (*ManagedInstanceOperationsClient) NewListByManagedInstancePager ¶ added in v0.5.0
func (client *ManagedInstanceOperationsClient) NewListByManagedInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedInstanceOperationsClientListByManagedInstanceOptions) *runtime.Pager[ManagedInstanceOperationsClientListByManagedInstanceResponse]
NewListByManagedInstancePager - Gets a list of operations performed on the managed instance.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - ManagedInstanceOperationsClientListByManagedInstanceOptions contains the optional parameters for the ManagedInstanceOperationsClient.NewListByManagedInstancePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListManagedInstanceOperations.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedInstanceOperationsClient().NewListByManagedInstancePager("sqlcrudtest-7398", "sqlcrudtest-4645", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedInstanceOperationListResult = armsql.ManagedInstanceOperationListResult{ // Value: []*armsql.ManagedInstanceOperation{ // { // Name: to.Ptr("11111111-1111-1111-1111-111111111111"), // Type: to.Ptr("Microsoft.Sql/managedInstances/operations"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/11111111-1111-1111-1111-111111111111"), // Properties: &armsql.ManagedInstanceOperationProperties{ // IsCancellable: to.Ptr(false), // ManagedInstanceName: to.Ptr("sqlcrudtest-4645"), // Operation: to.Ptr("UpsertManagedServer"), // OperationFriendlyName: to.Ptr("UPDATE MANAGED SERVER"), // PercentComplete: to.Ptr[int32](100), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-06T11:08:44.490Z"); return t}()), // State: to.Ptr(armsql.ManagementOperationStateCancelled), // }, // }, // { // Name: to.Ptr("22222222-2222-2222-2222-222222222222"), // Type: to.Ptr("Microsoft.Sql/managedInstances/operations"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/22222222-2222-2222-2222-222222222222"), // Properties: &armsql.ManagedInstanceOperationProperties{ // IsCancellable: to.Ptr(true), // ManagedInstanceName: to.Ptr("sqlcrudtest-4645"), // Operation: to.Ptr("UpsertManagedServer"), // OperationFriendlyName: to.Ptr("UPDATE MANAGED SERVER"), // OperationParameters: &armsql.ManagedInstanceOperationParametersPair{ // CurrentParameters: &armsql.UpsertManagedServerOperationParameters{ // Family: to.Ptr("Gen4"), // StorageSizeInGB: to.Ptr[int32](32), // Tier: to.Ptr("GeneralPurpose"), // VCores: to.Ptr[int32](8), // }, // RequestedParameters: &armsql.UpsertManagedServerOperationParameters{ // Family: to.Ptr("Gen4"), // StorageSizeInGB: to.Ptr[int32](128), // Tier: to.Ptr("BusinessCritical"), // VCores: to.Ptr[int32](8), // }, // }, // OperationSteps: &armsql.ManagedInstanceOperationSteps{ // CurrentStep: to.Ptr[int32](3), // StepsList: []*armsql.UpsertManagedServerOperationStep{ // { // Name: to.Ptr("Request validation"), // Order: to.Ptr[int32](1), // Status: to.Ptr(armsql.UpsertManagedServerOperationStepStatusCompleted), // }, // { // Name: to.Ptr("Virtual Cluster resize/creation"), // Order: to.Ptr[int32](2), // Status: to.Ptr(armsql.UpsertManagedServerOperationStepStatusCompleted), // }, // { // Name: to.Ptr("New SQL Instance Startup"), // Order: to.Ptr[int32](3), // Status: to.Ptr(armsql.UpsertManagedServerOperationStepStatusInProgress), // }}, // TotalSteps: to.Ptr("3"), // }, // PercentComplete: to.Ptr[int32](50), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-06T11:08:44.490Z"); return t}()), // State: to.Ptr(armsql.ManagementOperationStateInProgress), // }, // }, // { // Name: to.Ptr("33333333-3333-3333-3333-333333333333"), // Type: to.Ptr("Microsoft.Sql/managedInstances/operations"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/33333333-3333-3333-3333-333333333333"), // Properties: &armsql.ManagedInstanceOperationProperties{ // ErrorCode: to.Ptr[int32](45157), // ErrorDescription: to.Ptr("Server 'sqlcrudtest-4645' is busy with another operation. Please try your operation later."), // ErrorSeverity: to.Ptr[int32](16), // IsCancellable: to.Ptr(false), // IsUserError: to.Ptr(true), // ManagedInstanceName: to.Ptr("sqlcrudtest-4645"), // Operation: to.Ptr("UpsertManagedServer"), // OperationFriendlyName: to.Ptr("UPDATE MANAGED SERVER"), // PercentComplete: to.Ptr[int32](100), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-12-06T14:48:34.583Z"); return t}()), // State: to.Ptr(armsql.ManagementOperationStateFailed), // }, // }, // { // Name: to.Ptr("44444444-4444-4444-4444-444444444444"), // Type: to.Ptr("Microsoft.Sql/managedInstances/operations"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/44444444-4444-4444-4444-444444444444"), // Properties: &armsql.ManagedInstanceOperationProperties{ // ManagedInstanceName: to.Ptr("sqlcrudtest-4645"), // Operation: to.Ptr("MakeAllManagedDatabasesAccessible"), // OperationFriendlyName: to.Ptr("MAKE ALL MANAGED DBS ACCESSIBLE"), // OperationSteps: &armsql.ManagedInstanceOperationSteps{ // CurrentStep: to.Ptr[int32](1), // StepsList: []*armsql.UpsertManagedServerOperationStep{ // { // Name: to.Ptr("Request validation"), // Order: to.Ptr[int32](1), // Status: to.Ptr(armsql.UpsertManagedServerOperationStepStatusFailed), // }}, // TotalSteps: to.Ptr("1"), // }, // PercentComplete: to.Ptr[int32](100), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T09:00:08.100Z"); return t}()), // State: to.Ptr(armsql.ManagementOperationStateSucceeded), // }, // }}, // } } }
Output:
type ManagedInstanceOperationsClientCancelOptions ¶ added in v0.3.0
type ManagedInstanceOperationsClientCancelOptions struct { }
ManagedInstanceOperationsClientCancelOptions contains the optional parameters for the ManagedInstanceOperationsClient.Cancel method.
type ManagedInstanceOperationsClientCancelResponse ¶ added in v0.3.0
type ManagedInstanceOperationsClientCancelResponse struct { }
ManagedInstanceOperationsClientCancelResponse contains the response from method ManagedInstanceOperationsClient.Cancel.
type ManagedInstanceOperationsClientGetOptions ¶ added in v0.3.0
type ManagedInstanceOperationsClientGetOptions struct { }
ManagedInstanceOperationsClientGetOptions contains the optional parameters for the ManagedInstanceOperationsClient.Get method.
type ManagedInstanceOperationsClientGetResponse ¶ added in v0.3.0
type ManagedInstanceOperationsClientGetResponse struct { // A managed instance operation. ManagedInstanceOperation }
ManagedInstanceOperationsClientGetResponse contains the response from method ManagedInstanceOperationsClient.Get.
type ManagedInstanceOperationsClientListByManagedInstanceOptions ¶ added in v0.3.0
type ManagedInstanceOperationsClientListByManagedInstanceOptions struct { }
ManagedInstanceOperationsClientListByManagedInstanceOptions contains the optional parameters for the ManagedInstanceOperationsClient.NewListByManagedInstancePager method.
type ManagedInstanceOperationsClientListByManagedInstanceResponse ¶ added in v0.3.0
type ManagedInstanceOperationsClientListByManagedInstanceResponse struct { // The response to a list managed instance operations request ManagedInstanceOperationListResult }
ManagedInstanceOperationsClientListByManagedInstanceResponse contains the response from method ManagedInstanceOperationsClient.NewListByManagedInstancePager.
type ManagedInstancePairInfo ¶
type ManagedInstancePairInfo struct { // Id of Partner Managed Instance in pair. PartnerManagedInstanceID *string // Id of Primary Managed Instance in pair. PrimaryManagedInstanceID *string }
ManagedInstancePairInfo - Pairs of Managed Instances in the failover group.
func (ManagedInstancePairInfo) MarshalJSON ¶ added in v1.1.0
func (m ManagedInstancePairInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstancePairInfo.
func (*ManagedInstancePairInfo) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstancePairInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstancePairInfo.
type ManagedInstancePecProperty ¶
type ManagedInstancePecProperty struct { // READ-ONLY; Resource ID. ID *string // READ-ONLY; Private endpoint connection properties Properties *ManagedInstancePrivateEndpointConnectionProperties }
ManagedInstancePecProperty - A private endpoint connection under a managed instance
func (ManagedInstancePecProperty) MarshalJSON ¶ added in v1.1.0
func (m ManagedInstancePecProperty) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstancePecProperty.
func (*ManagedInstancePecProperty) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstancePecProperty) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstancePecProperty.
type ManagedInstancePrivateEndpointConnection ¶
type ManagedInstancePrivateEndpointConnection struct { // Resource properties. Properties *ManagedInstancePrivateEndpointConnectionProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ManagedInstancePrivateEndpointConnection - A private endpoint connection
func (ManagedInstancePrivateEndpointConnection) MarshalJSON ¶
func (m ManagedInstancePrivateEndpointConnection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstancePrivateEndpointConnection.
func (*ManagedInstancePrivateEndpointConnection) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstancePrivateEndpointConnection) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstancePrivateEndpointConnection.
type ManagedInstancePrivateEndpointConnectionListResult ¶
type ManagedInstancePrivateEndpointConnectionListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ManagedInstancePrivateEndpointConnection }
ManagedInstancePrivateEndpointConnectionListResult - A list of private endpoint connections.
func (ManagedInstancePrivateEndpointConnectionListResult) MarshalJSON ¶
func (m ManagedInstancePrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstancePrivateEndpointConnectionListResult.
func (*ManagedInstancePrivateEndpointConnectionListResult) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstancePrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstancePrivateEndpointConnectionListResult.
type ManagedInstancePrivateEndpointConnectionProperties ¶
type ManagedInstancePrivateEndpointConnectionProperties struct { // Private endpoint which the connection belongs to. PrivateEndpoint *ManagedInstancePrivateEndpointProperty // Connection State of the Private Endpoint Connection. PrivateLinkServiceConnectionState *ManagedInstancePrivateLinkServiceConnectionStateProperty // READ-ONLY; State of the Private Endpoint Connection. ProvisioningState *string }
ManagedInstancePrivateEndpointConnectionProperties - Properties of a private endpoint connection.
func (ManagedInstancePrivateEndpointConnectionProperties) MarshalJSON ¶ added in v1.1.0
func (m ManagedInstancePrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstancePrivateEndpointConnectionProperties.
func (*ManagedInstancePrivateEndpointConnectionProperties) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstancePrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstancePrivateEndpointConnectionProperties.
type ManagedInstancePrivateEndpointConnectionsClient ¶
type ManagedInstancePrivateEndpointConnectionsClient struct {
// contains filtered or unexported fields
}
ManagedInstancePrivateEndpointConnectionsClient contains the methods for the ManagedInstancePrivateEndpointConnections group. Don't use this type directly, use NewManagedInstancePrivateEndpointConnectionsClient() instead.
func NewManagedInstancePrivateEndpointConnectionsClient ¶
func NewManagedInstancePrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedInstancePrivateEndpointConnectionsClient, error)
NewManagedInstancePrivateEndpointConnectionsClient creates a new instance of ManagedInstancePrivateEndpointConnectionsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedInstancePrivateEndpointConnectionsClient) BeginCreateOrUpdate ¶
func (client *ManagedInstancePrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, privateEndpointConnectionName string, parameters ManagedInstancePrivateEndpointConnection, options *ManagedInstancePrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedInstancePrivateEndpointConnectionsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Approve or reject a private endpoint connection with a given name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - ManagedInstancePrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstancePrivateEndpointConnectionsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstancePrivateEndpointConnectionUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedInstancePrivateEndpointConnectionsClient().BeginCreateOrUpdate(ctx, "Default", "test-cl", "private-endpoint-connection-name", armsql.ManagedInstancePrivateEndpointConnection{ Properties: &armsql.ManagedInstancePrivateEndpointConnectionProperties{ PrivateLinkServiceConnectionState: &armsql.ManagedInstancePrivateLinkServiceConnectionStateProperty{ Description: to.Ptr("Approved by johndoe@contoso.com"), Status: to.Ptr("Approved"), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstancePrivateEndpointConnection = armsql.ManagedInstancePrivateEndpointConnection{ // Name: to.Ptr("private-endpoint-connection-name"), // Type: to.Ptr("Microsoft.Sql/managedInstances/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/test-cl/privateEndpointConnections/private-endpoint-connection-name"), // Properties: &armsql.ManagedInstancePrivateEndpointConnectionProperties{ // PrivateEndpoint: &armsql.ManagedInstancePrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"), // }, // PrivateLinkServiceConnectionState: &armsql.ManagedInstancePrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Approved by johndoe@contoso.com"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr("Approved"), // }, // ProvisioningState: to.Ptr("Succeeded"), // }, // } }
Output:
func (*ManagedInstancePrivateEndpointConnectionsClient) BeginDelete ¶
func (client *ManagedInstancePrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, privateEndpointConnectionName string, options *ManagedInstancePrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[ManagedInstancePrivateEndpointConnectionsClientDeleteResponse], error)
BeginDelete - Deletes a private endpoint connection with a given name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - ManagedInstancePrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the ManagedInstancePrivateEndpointConnectionsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstancePrivateEndpointConnectionDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedInstancePrivateEndpointConnectionsClient().BeginDelete(ctx, "Default", "test-cl", "private-endpoint-connection-name", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ManagedInstancePrivateEndpointConnectionsClient) Get ¶
func (client *ManagedInstancePrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, privateEndpointConnectionName string, options *ManagedInstancePrivateEndpointConnectionsClientGetOptions) (ManagedInstancePrivateEndpointConnectionsClientGetResponse, error)
Get - Gets a private endpoint connection. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- privateEndpointConnectionName - The name of the private endpoint connection.
- options - ManagedInstancePrivateEndpointConnectionsClientGetOptions contains the optional parameters for the ManagedInstancePrivateEndpointConnectionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstancePrivateEndpointConnectionGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedInstancePrivateEndpointConnectionsClient().Get(ctx, "Default", "test-cl", "private-endpoint-connection-name", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstancePrivateEndpointConnection = armsql.ManagedInstancePrivateEndpointConnection{ // Name: to.Ptr("private-endpoint-connection-name"), // Type: to.Ptr("Microsoft.Sql/managedInstances/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/test-cl/privateEndpointConnections/private-endpoint-connection-name"), // Properties: &armsql.ManagedInstancePrivateEndpointConnectionProperties{ // PrivateEndpoint: &armsql.ManagedInstancePrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"), // }, // PrivateLinkServiceConnectionState: &armsql.ManagedInstancePrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Auto-approved"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr("Approved"), // }, // ProvisioningState: to.Ptr("Succeeded"), // }, // } }
Output:
func (*ManagedInstancePrivateEndpointConnectionsClient) NewListByManagedInstancePager ¶ added in v0.5.0
func (client *ManagedInstancePrivateEndpointConnectionsClient) NewListByManagedInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceOptions) *runtime.Pager[ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceResponse]
NewListByManagedInstancePager - Gets all private endpoint connections on a server.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceOptions contains the optional parameters for the ManagedInstancePrivateEndpointConnectionsClient.NewListByManagedInstancePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstancePrivateEndpointConnectionList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedInstancePrivateEndpointConnectionsClient().NewListByManagedInstancePager("Default", "test-cl", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedInstancePrivateEndpointConnectionListResult = armsql.ManagedInstancePrivateEndpointConnectionListResult{ // Value: []*armsql.ManagedInstancePrivateEndpointConnection{ // { // Name: to.Ptr("private-endpoint-connection-name"), // Type: to.Ptr("Microsoft.Sql/managedInstances/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/test-cl/privateEndpointConnections/private-endpoint-connection-name"), // Properties: &armsql.ManagedInstancePrivateEndpointConnectionProperties{ // PrivateEndpoint: &armsql.ManagedInstancePrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"), // }, // PrivateLinkServiceConnectionState: &armsql.ManagedInstancePrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Auto-approved"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr("Approved"), // }, // ProvisioningState: to.Ptr("Succeeded"), // }, // }, // { // Name: to.Ptr("private-endpoint-connection-name-2"), // Type: to.Ptr("Microsoft.Sql/managedInstances/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/test-cl/privateEndpointConnections/private-endpoint-connection-name-2"), // Properties: &armsql.ManagedInstancePrivateEndpointConnectionProperties{ // PrivateEndpoint: &armsql.ManagedInstancePrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name-2"), // }, // PrivateLinkServiceConnectionState: &armsql.ManagedInstancePrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Auto-approved"), // ActionsRequired: to.Ptr("None"), // Status: to.Ptr("Approved"), // }, // ProvisioningState: to.Ptr("Succeeded"), // }, // }}, // } } }
Output:
type ManagedInstancePrivateEndpointConnectionsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedInstancePrivateEndpointConnectionsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstancePrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstancePrivateEndpointConnectionsClient.BeginCreateOrUpdate method.
type ManagedInstancePrivateEndpointConnectionsClientBeginDeleteOptions ¶ added in v0.3.0
type ManagedInstancePrivateEndpointConnectionsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstancePrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the ManagedInstancePrivateEndpointConnectionsClient.BeginDelete method.
type ManagedInstancePrivateEndpointConnectionsClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedInstancePrivateEndpointConnectionsClientCreateOrUpdateResponse struct { // A private endpoint connection ManagedInstancePrivateEndpointConnection }
ManagedInstancePrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method ManagedInstancePrivateEndpointConnectionsClient.BeginCreateOrUpdate.
type ManagedInstancePrivateEndpointConnectionsClientDeleteResponse ¶ added in v0.3.0
type ManagedInstancePrivateEndpointConnectionsClientDeleteResponse struct { }
ManagedInstancePrivateEndpointConnectionsClientDeleteResponse contains the response from method ManagedInstancePrivateEndpointConnectionsClient.BeginDelete.
type ManagedInstancePrivateEndpointConnectionsClientGetOptions ¶ added in v0.3.0
type ManagedInstancePrivateEndpointConnectionsClientGetOptions struct { }
ManagedInstancePrivateEndpointConnectionsClientGetOptions contains the optional parameters for the ManagedInstancePrivateEndpointConnectionsClient.Get method.
type ManagedInstancePrivateEndpointConnectionsClientGetResponse ¶ added in v0.3.0
type ManagedInstancePrivateEndpointConnectionsClientGetResponse struct { // A private endpoint connection ManagedInstancePrivateEndpointConnection }
ManagedInstancePrivateEndpointConnectionsClientGetResponse contains the response from method ManagedInstancePrivateEndpointConnectionsClient.Get.
type ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceOptions ¶ added in v0.3.0
type ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceOptions struct { }
ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceOptions contains the optional parameters for the ManagedInstancePrivateEndpointConnectionsClient.NewListByManagedInstancePager method.
type ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceResponse ¶ added in v0.3.0
type ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceResponse struct { // A list of private endpoint connections. ManagedInstancePrivateEndpointConnectionListResult }
ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceResponse contains the response from method ManagedInstancePrivateEndpointConnectionsClient.NewListByManagedInstancePager.
type ManagedInstancePrivateEndpointProperty ¶
type ManagedInstancePrivateEndpointProperty struct { // Resource id of the private endpoint. ID *string }
func (ManagedInstancePrivateEndpointProperty) MarshalJSON ¶ added in v1.1.0
func (m ManagedInstancePrivateEndpointProperty) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstancePrivateEndpointProperty.
func (*ManagedInstancePrivateEndpointProperty) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstancePrivateEndpointProperty) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstancePrivateEndpointProperty.
type ManagedInstancePrivateLink ¶
type ManagedInstancePrivateLink struct { // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; The private link resource group id. Properties *ManagedInstancePrivateLinkProperties // READ-ONLY; Resource type. Type *string }
ManagedInstancePrivateLink - A private link resource
func (ManagedInstancePrivateLink) MarshalJSON ¶
func (m ManagedInstancePrivateLink) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstancePrivateLink.
func (*ManagedInstancePrivateLink) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstancePrivateLink) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstancePrivateLink.
type ManagedInstancePrivateLinkListResult ¶
type ManagedInstancePrivateLinkListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ManagedInstancePrivateLink }
ManagedInstancePrivateLinkListResult - A list of private link resources
func (ManagedInstancePrivateLinkListResult) MarshalJSON ¶
func (m ManagedInstancePrivateLinkListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstancePrivateLinkListResult.
func (*ManagedInstancePrivateLinkListResult) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstancePrivateLinkListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstancePrivateLinkListResult.
type ManagedInstancePrivateLinkProperties ¶
type ManagedInstancePrivateLinkProperties struct { // READ-ONLY; The private link resource group id. GroupID *string // READ-ONLY; The private link resource required member names. RequiredMembers []*string }
ManagedInstancePrivateLinkProperties - Properties of a private link resource.
func (ManagedInstancePrivateLinkProperties) MarshalJSON ¶
func (m ManagedInstancePrivateLinkProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstancePrivateLinkProperties.
func (*ManagedInstancePrivateLinkProperties) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstancePrivateLinkProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstancePrivateLinkProperties.
type ManagedInstancePrivateLinkResourcesClient ¶
type ManagedInstancePrivateLinkResourcesClient struct {
// contains filtered or unexported fields
}
ManagedInstancePrivateLinkResourcesClient contains the methods for the ManagedInstancePrivateLinkResources group. Don't use this type directly, use NewManagedInstancePrivateLinkResourcesClient() instead.
func NewManagedInstancePrivateLinkResourcesClient ¶
func NewManagedInstancePrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedInstancePrivateLinkResourcesClient, error)
NewManagedInstancePrivateLinkResourcesClient creates a new instance of ManagedInstancePrivateLinkResourcesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedInstancePrivateLinkResourcesClient) Get ¶
func (client *ManagedInstancePrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, groupName string, options *ManagedInstancePrivateLinkResourcesClientGetOptions) (ManagedInstancePrivateLinkResourcesClientGetResponse, error)
Get - Gets a private link resource for SQL server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- groupName - The name of the private link resource.
- options - ManagedInstancePrivateLinkResourcesClientGetOptions contains the optional parameters for the ManagedInstancePrivateLinkResourcesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstancePrivateLinkResourcesGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedInstancePrivateLinkResourcesClient().Get(ctx, "Default", "test-cl", "plr", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstancePrivateLink = armsql.ManagedInstancePrivateLink{ // Name: to.Ptr("plr"), // Type: to.Ptr("Microsoft.Sql/managedInstances/privateLinkResources"), // ID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/test-cl/privateLinkResources/plr"), // Properties: &armsql.ManagedInstancePrivateLinkProperties{ // GroupID: to.Ptr("managedInstance"), // RequiredMembers: []*string{ // to.Ptr("managedInstance")}, // }, // } }
Output:
func (*ManagedInstancePrivateLinkResourcesClient) NewListByManagedInstancePager ¶ added in v0.5.0
func (client *ManagedInstancePrivateLinkResourcesClient) NewListByManagedInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedInstancePrivateLinkResourcesClientListByManagedInstanceOptions) *runtime.Pager[ManagedInstancePrivateLinkResourcesClientListByManagedInstanceResponse]
NewListByManagedInstancePager - Gets the private link resources for SQL server.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - ManagedInstancePrivateLinkResourcesClientListByManagedInstanceOptions contains the optional parameters for the ManagedInstancePrivateLinkResourcesClient.NewListByManagedInstancePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstancePrivateLinkResourcesList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedInstancePrivateLinkResourcesClient().NewListByManagedInstancePager("Default", "test-cl", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedInstancePrivateLinkListResult = armsql.ManagedInstancePrivateLinkListResult{ // Value: []*armsql.ManagedInstancePrivateLink{ // { // Name: to.Ptr("plr"), // Type: to.Ptr("Microsoft.Sql/managedInstances/privateLinkResources"), // ID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/test-cl/privateLinkResources/plr"), // Properties: &armsql.ManagedInstancePrivateLinkProperties{ // GroupID: to.Ptr("managedInstance"), // RequiredMembers: []*string{ // to.Ptr("managedInstance")}, // }, // }}, // } } }
Output:
type ManagedInstancePrivateLinkResourcesClientGetOptions ¶ added in v0.3.0
type ManagedInstancePrivateLinkResourcesClientGetOptions struct { }
ManagedInstancePrivateLinkResourcesClientGetOptions contains the optional parameters for the ManagedInstancePrivateLinkResourcesClient.Get method.
type ManagedInstancePrivateLinkResourcesClientGetResponse ¶ added in v0.3.0
type ManagedInstancePrivateLinkResourcesClientGetResponse struct { // A private link resource ManagedInstancePrivateLink }
ManagedInstancePrivateLinkResourcesClientGetResponse contains the response from method ManagedInstancePrivateLinkResourcesClient.Get.
type ManagedInstancePrivateLinkResourcesClientListByManagedInstanceOptions ¶ added in v0.3.0
type ManagedInstancePrivateLinkResourcesClientListByManagedInstanceOptions struct { }
ManagedInstancePrivateLinkResourcesClientListByManagedInstanceOptions contains the optional parameters for the ManagedInstancePrivateLinkResourcesClient.NewListByManagedInstancePager method.
type ManagedInstancePrivateLinkResourcesClientListByManagedInstanceResponse ¶ added in v0.3.0
type ManagedInstancePrivateLinkResourcesClientListByManagedInstanceResponse struct { // A list of private link resources ManagedInstancePrivateLinkListResult }
ManagedInstancePrivateLinkResourcesClientListByManagedInstanceResponse contains the response from method ManagedInstancePrivateLinkResourcesClient.NewListByManagedInstancePager.
type ManagedInstancePrivateLinkServiceConnectionStateProperty ¶
type ManagedInstancePrivateLinkServiceConnectionStateProperty struct { // REQUIRED; The private link service connection description. Description *string // REQUIRED; The private link service connection status. Status *string // READ-ONLY; The private link service connection description. ActionsRequired *string }
func (ManagedInstancePrivateLinkServiceConnectionStateProperty) MarshalJSON ¶ added in v1.1.0
func (m ManagedInstancePrivateLinkServiceConnectionStateProperty) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstancePrivateLinkServiceConnectionStateProperty.
func (*ManagedInstancePrivateLinkServiceConnectionStateProperty) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstancePrivateLinkServiceConnectionStateProperty) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstancePrivateLinkServiceConnectionStateProperty.
type ManagedInstanceProperties ¶
type ManagedInstanceProperties struct { // Administrator username for the managed instance. Can only be specified when the managed instance is being created (and // is required for creation). AdministratorLogin *string // The administrator login password (required for managed instance creation). AdministratorLoginPassword *string // The Azure Active Directory administrator of the server. Administrators *ManagedInstanceExternalAdministrator // Collation of the managed instance. Collation *string // The resource id of another managed instance whose DNS zone this managed instance will share after creation. DNSZonePartner *string // The Id of the instance pool this managed server belongs to. InstancePoolID *string // A CMK URI of the key to use for encryption. KeyID *string // The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' // (discounted AHB price for bringing your own SQL licenses). LicenseType *ManagedInstanceLicenseType // Specifies maintenance configuration id to apply to this managed instance. MaintenanceConfigurationID *string // Specifies the mode of database creation. // Default: Regular instance creation. // Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId // must be specified. ManagedInstanceCreateMode *ManagedServerCreateMode // Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2' MinimalTLSVersion *string // The resource id of a user assigned identity to be used by default. PrimaryUserAssignedIdentityID *string // Connection type used for connecting to the instance. ProxyOverride *ManagedInstanceProxyOverride // Whether or not the public data endpoint is enabled. PublicDataEndpointEnabled *bool // The storage account type to be used to store backups for this instance. The options are Local (LocallyRedundantStorage), // Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and // GeoZone(GeoZoneRedundantStorage) RequestedBackupStorageRedundancy *BackupStorageRedundancy // Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. RestorePointInTime *time.Time // The managed instance's service principal. ServicePrincipal *ServicePrincipal // The resource identifier of the source managed instance associated with create operation of this instance. SourceManagedInstanceID *string // Storage size in GB. Minimum value: 32. Maximum value: 8192. Increments of 32 GB allowed only. StorageSizeInGB *int32 // Subnet resource ID for the managed instance. SubnetID *string // Id of the timezone. Allowed values are timezones supported by Windows. Windows keeps details on supported timezones, including // the id, in registry under KEYLOCALMACHINE\SOFTWARE\Microsoft\Windows // NT\CurrentVersion\Time Zones. You can get those registry values via SQL Server by querying SELECT name AS timezoneid FROM // sys.timezone_info. List of Ids can also be obtained by executing // [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. An example of valid timezone id is "Pacific Standard Time" or // "W. Europe Standard Time". TimezoneID *string // The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. VCores *int32 // Whether or not the multi-az is enabled. ZoneRedundant *bool // READ-ONLY; The storage account type used to store backups for this instance. The options are Local (LocallyRedundantStorage), // Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and // GeoZone(GeoZoneRedundantStorage) CurrentBackupStorageRedundancy *BackupStorageRedundancy // READ-ONLY; The Dns Zone that the managed instance is in. DNSZone *string // READ-ONLY; The fully qualified domain name of the managed instance. FullyQualifiedDomainName *string // READ-ONLY; List of private endpoint connections on a managed instance. PrivateEndpointConnections []*ManagedInstancePecProperty // READ-ONLY ProvisioningState *ManagedInstancePropertiesProvisioningState // READ-ONLY; The state of the managed instance. State *string }
ManagedInstanceProperties - The properties of a managed instance.
func (ManagedInstanceProperties) MarshalJSON ¶
func (m ManagedInstanceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceProperties.
func (*ManagedInstanceProperties) UnmarshalJSON ¶
func (m *ManagedInstanceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceProperties.
type ManagedInstancePropertiesProvisioningState ¶
type ManagedInstancePropertiesProvisioningState string
const ( ManagedInstancePropertiesProvisioningStateAccepted ManagedInstancePropertiesProvisioningState = "Accepted" ManagedInstancePropertiesProvisioningStateCanceled ManagedInstancePropertiesProvisioningState = "Canceled" ManagedInstancePropertiesProvisioningStateCreated ManagedInstancePropertiesProvisioningState = "Created" ManagedInstancePropertiesProvisioningStateCreating ManagedInstancePropertiesProvisioningState = "Creating" ManagedInstancePropertiesProvisioningStateDeleted ManagedInstancePropertiesProvisioningState = "Deleted" ManagedInstancePropertiesProvisioningStateDeleting ManagedInstancePropertiesProvisioningState = "Deleting" ManagedInstancePropertiesProvisioningStateFailed ManagedInstancePropertiesProvisioningState = "Failed" ManagedInstancePropertiesProvisioningStateNotSpecified ManagedInstancePropertiesProvisioningState = "NotSpecified" ManagedInstancePropertiesProvisioningStateRegistering ManagedInstancePropertiesProvisioningState = "Registering" ManagedInstancePropertiesProvisioningStateRunning ManagedInstancePropertiesProvisioningState = "Running" ManagedInstancePropertiesProvisioningStateSucceeded ManagedInstancePropertiesProvisioningState = "Succeeded" ManagedInstancePropertiesProvisioningStateTimedOut ManagedInstancePropertiesProvisioningState = "TimedOut" ManagedInstancePropertiesProvisioningStateUnknown ManagedInstancePropertiesProvisioningState = "Unknown" ManagedInstancePropertiesProvisioningStateUnrecognized ManagedInstancePropertiesProvisioningState = "Unrecognized" ManagedInstancePropertiesProvisioningStateUpdating ManagedInstancePropertiesProvisioningState = "Updating" )
func PossibleManagedInstancePropertiesProvisioningStateValues ¶
func PossibleManagedInstancePropertiesProvisioningStateValues() []ManagedInstancePropertiesProvisioningState
PossibleManagedInstancePropertiesProvisioningStateValues returns the possible values for the ManagedInstancePropertiesProvisioningState const type.
type ManagedInstanceProxyOverride ¶
type ManagedInstanceProxyOverride string
ManagedInstanceProxyOverride - Connection type used for connecting to the instance.
const ( ManagedInstanceProxyOverrideDefault ManagedInstanceProxyOverride = "Default" ManagedInstanceProxyOverrideProxy ManagedInstanceProxyOverride = "Proxy" ManagedInstanceProxyOverrideRedirect ManagedInstanceProxyOverride = "Redirect" )
func PossibleManagedInstanceProxyOverrideValues ¶
func PossibleManagedInstanceProxyOverrideValues() []ManagedInstanceProxyOverride
PossibleManagedInstanceProxyOverrideValues returns the possible values for the ManagedInstanceProxyOverride const type.
type ManagedInstanceQuery ¶
type ManagedInstanceQuery struct { // Resource properties. Properties *QueryProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ManagedInstanceQuery - Database query.
func (ManagedInstanceQuery) MarshalJSON ¶
func (m ManagedInstanceQuery) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceQuery.
func (*ManagedInstanceQuery) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceQuery) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceQuery.
type ManagedInstanceQueryStatistics ¶
type ManagedInstanceQueryStatistics struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*QueryStatistics }
ManagedInstanceQueryStatistics - Execution statistics for one particular query
func (ManagedInstanceQueryStatistics) MarshalJSON ¶
func (m ManagedInstanceQueryStatistics) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceQueryStatistics.
func (*ManagedInstanceQueryStatistics) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceQueryStatistics) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceQueryStatistics.
type ManagedInstanceTdeCertificatesClient ¶
type ManagedInstanceTdeCertificatesClient struct {
// contains filtered or unexported fields
}
ManagedInstanceTdeCertificatesClient contains the methods for the ManagedInstanceTdeCertificates group. Don't use this type directly, use NewManagedInstanceTdeCertificatesClient() instead.
func NewManagedInstanceTdeCertificatesClient ¶
func NewManagedInstanceTdeCertificatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedInstanceTdeCertificatesClient, error)
NewManagedInstanceTdeCertificatesClient creates a new instance of ManagedInstanceTdeCertificatesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedInstanceTdeCertificatesClient) BeginCreate ¶
func (client *ManagedInstanceTdeCertificatesClient) BeginCreate(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters TdeCertificate, options *ManagedInstanceTdeCertificatesClientBeginCreateOptions) (*runtime.Poller[ManagedInstanceTdeCertificatesClientCreateResponse], error)
BeginCreate - Creates a TDE certificate for a given server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- parameters - The requested TDE certificate to be created or updated.
- options - ManagedInstanceTdeCertificatesClientBeginCreateOptions contains the optional parameters for the ManagedInstanceTdeCertificatesClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceTdeCertificate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedInstanceTdeCertificatesClient().BeginCreate(ctx, "testtdecert", "testtdecert", armsql.TdeCertificate{ Properties: &armsql.TdeCertificateProperties{ PrivateBlob: to.Ptr("MIIXXXXXXXX"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
type ManagedInstanceTdeCertificatesClientBeginCreateOptions ¶ added in v0.3.0
type ManagedInstanceTdeCertificatesClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceTdeCertificatesClientBeginCreateOptions contains the optional parameters for the ManagedInstanceTdeCertificatesClient.BeginCreate method.
type ManagedInstanceTdeCertificatesClientCreateResponse ¶ added in v0.3.0
type ManagedInstanceTdeCertificatesClientCreateResponse struct { }
ManagedInstanceTdeCertificatesClientCreateResponse contains the response from method ManagedInstanceTdeCertificatesClient.BeginCreate.
type ManagedInstanceUpdate ¶
type ManagedInstanceUpdate struct { // Managed instance identity Identity *ResourceIdentity // Resource properties. Properties *ManagedInstanceProperties // Managed instance sku SKU *SKU // Resource tags. Tags map[string]*string }
ManagedInstanceUpdate - An update request for an Azure SQL Database managed instance.
func (ManagedInstanceUpdate) MarshalJSON ¶
func (m ManagedInstanceUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceUpdate.
func (*ManagedInstanceUpdate) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceUpdate.
type ManagedInstanceVcoresCapability ¶
type ManagedInstanceVcoresCapability struct { // The reason for the capability not being available. Reason *string // READ-ONLY; Included size. IncludedMaxSize *MaxSizeCapability // READ-ONLY; True if this service objective is supported for managed instances in an instance pool. InstancePoolSupported *bool // READ-ONLY; The virtual cores identifier. Name *string // READ-ONLY; True if this service objective is supported for standalone managed instances. StandaloneSupported *bool // READ-ONLY; The status of the capability. Status *CapabilityStatus // READ-ONLY; List of supported maintenance configurations SupportedMaintenanceConfigurations []*ManagedInstanceMaintenanceConfigurationCapability // READ-ONLY; Storage size ranges. SupportedStorageSizes []*MaxSizeRangeCapability // READ-ONLY; The virtual cores value. Value *int32 }
ManagedInstanceVcoresCapability - The managed instance virtual cores capability.
func (ManagedInstanceVcoresCapability) MarshalJSON ¶
func (m ManagedInstanceVcoresCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceVcoresCapability.
func (*ManagedInstanceVcoresCapability) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceVcoresCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceVcoresCapability.
type ManagedInstanceVersionCapability ¶
type ManagedInstanceVersionCapability struct { // The reason for the capability not being available. Reason *string // READ-ONLY; The server version name. Name *string // READ-ONLY; The status of the capability. Status *CapabilityStatus // READ-ONLY; The list of supported managed instance editions. SupportedEditions []*ManagedInstanceEditionCapability // READ-ONLY; The list of supported instance pool editions. SupportedInstancePoolEditions []*InstancePoolEditionCapability }
ManagedInstanceVersionCapability - The managed instance capability
func (ManagedInstanceVersionCapability) MarshalJSON ¶
func (m ManagedInstanceVersionCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceVersionCapability.
func (*ManagedInstanceVersionCapability) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceVersionCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceVersionCapability.
type ManagedInstanceVulnerabilityAssessment ¶
type ManagedInstanceVulnerabilityAssessment struct { // Resource properties. Properties *ManagedInstanceVulnerabilityAssessmentProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ManagedInstanceVulnerabilityAssessment - A managed instance vulnerability assessment.
func (ManagedInstanceVulnerabilityAssessment) MarshalJSON ¶
func (m ManagedInstanceVulnerabilityAssessment) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceVulnerabilityAssessment.
func (*ManagedInstanceVulnerabilityAssessment) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceVulnerabilityAssessment) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceVulnerabilityAssessment.
type ManagedInstanceVulnerabilityAssessmentListResult ¶
type ManagedInstanceVulnerabilityAssessmentListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ManagedInstanceVulnerabilityAssessment }
ManagedInstanceVulnerabilityAssessmentListResult - A list of the ManagedInstance's vulnerability assessments.
func (ManagedInstanceVulnerabilityAssessmentListResult) MarshalJSON ¶
func (m ManagedInstanceVulnerabilityAssessmentListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceVulnerabilityAssessmentListResult.
func (*ManagedInstanceVulnerabilityAssessmentListResult) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceVulnerabilityAssessmentListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceVulnerabilityAssessmentListResult.
type ManagedInstanceVulnerabilityAssessmentProperties ¶
type ManagedInstanceVulnerabilityAssessmentProperties struct { // REQUIRED; A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). StorageContainerPath *string // The recurring scans settings RecurringScans *VulnerabilityAssessmentRecurringScansProperties // Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' // isn't specified, storageAccountAccessKey is required. Applies only if the // storage account is not behind a Vnet or a firewall StorageAccountAccessKey *string // A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. // If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is // required. Applies only if the storage account is not behind a Vnet or a firewall StorageContainerSasKey *string }
ManagedInstanceVulnerabilityAssessmentProperties - Properties of a managed instance vulnerability assessment.
func (ManagedInstanceVulnerabilityAssessmentProperties) MarshalJSON ¶ added in v1.1.0
func (m ManagedInstanceVulnerabilityAssessmentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceVulnerabilityAssessmentProperties.
func (*ManagedInstanceVulnerabilityAssessmentProperties) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedInstanceVulnerabilityAssessmentProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceVulnerabilityAssessmentProperties.
type ManagedInstanceVulnerabilityAssessmentsClient ¶
type ManagedInstanceVulnerabilityAssessmentsClient struct {
// contains filtered or unexported fields
}
ManagedInstanceVulnerabilityAssessmentsClient contains the methods for the ManagedInstanceVulnerabilityAssessments group. Don't use this type directly, use NewManagedInstanceVulnerabilityAssessmentsClient() instead.
func NewManagedInstanceVulnerabilityAssessmentsClient ¶
func NewManagedInstanceVulnerabilityAssessmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedInstanceVulnerabilityAssessmentsClient, error)
NewManagedInstanceVulnerabilityAssessmentsClient creates a new instance of ManagedInstanceVulnerabilityAssessmentsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedInstanceVulnerabilityAssessmentsClient) CreateOrUpdate ¶
func (client *ManagedInstanceVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, parameters ManagedInstanceVulnerabilityAssessment, options *ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateOptions) (ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates the managed instance's vulnerability assessment. Learn more about setting SQL vulnerability assessment with managed identity - https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance for which the vulnerability assessment is defined.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- parameters - The requested resource.
- options - ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceVulnerabilityAssessmentsClient.CreateOrUpdate method.
Example (CreateAManagedInstancesVulnerabilityAssessmentWithAllParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedInstanceVulnerabilityAssessmentsClient().CreateOrUpdate(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", armsql.VulnerabilityAssessmentNameDefault, armsql.ManagedInstanceVulnerabilityAssessment{ Properties: &armsql.ManagedInstanceVulnerabilityAssessmentProperties{ RecurringScans: &armsql.VulnerabilityAssessmentRecurringScansProperties{ EmailSubscriptionAdmins: to.Ptr(true), Emails: []*string{ to.Ptr("email1@mail.com"), to.Ptr("email2@mail.com")}, IsEnabled: to.Ptr(true), }, StorageAccountAccessKey: to.Ptr("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), StorageContainerPath: to.Ptr("https://myStorage.blob.core.windows.net/vulnerability-assessment/"), StorageContainerSasKey: to.Ptr("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstanceVulnerabilityAssessment = armsql.ManagedInstanceVulnerabilityAssessment{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/vulnerabilityAssessments"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default"), // Properties: &armsql.ManagedInstanceVulnerabilityAssessmentProperties{ // RecurringScans: &armsql.VulnerabilityAssessmentRecurringScansProperties{ // EmailSubscriptionAdmins: to.Ptr(true), // Emails: []*string{ // to.Ptr("email1@mail.com"), // to.Ptr("email2@mail.com")}, // IsEnabled: to.Ptr(true), // }, // }, // } }
Output:
Example (CreateAManagedInstancesVulnerabilityAssessmentWithMinimalParametersWhenStorageAccountAccessKeyIsSpecified) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateStorageAccessKeyMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedInstanceVulnerabilityAssessmentsClient().CreateOrUpdate(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", armsql.VulnerabilityAssessmentNameDefault, armsql.ManagedInstanceVulnerabilityAssessment{ Properties: &armsql.ManagedInstanceVulnerabilityAssessmentProperties{ StorageAccountAccessKey: to.Ptr("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), StorageContainerPath: to.Ptr("https://myStorage.blob.core.windows.net/vulnerability-assessment/"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstanceVulnerabilityAssessment = armsql.ManagedInstanceVulnerabilityAssessment{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/vulnerabilityAssessments"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default"), // Properties: &armsql.ManagedInstanceVulnerabilityAssessmentProperties{ // RecurringScans: &armsql.VulnerabilityAssessmentRecurringScansProperties{ // EmailSubscriptionAdmins: to.Ptr(false), // Emails: []*string{ // }, // IsEnabled: to.Ptr(true), // }, // }, // } }
Output:
Example (CreateAManagedInstancesVulnerabilityAssessmentWithMinimalParametersWhenStorageContainerSasKeyIsSpecified) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateContainerSasKeyMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedInstanceVulnerabilityAssessmentsClient().CreateOrUpdate(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", armsql.VulnerabilityAssessmentNameDefault, armsql.ManagedInstanceVulnerabilityAssessment{ Properties: &armsql.ManagedInstanceVulnerabilityAssessmentProperties{ StorageContainerPath: to.Ptr("https://myStorage.blob.core.windows.net/vulnerability-assessment/"), StorageContainerSasKey: to.Ptr("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstanceVulnerabilityAssessment = armsql.ManagedInstanceVulnerabilityAssessment{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/vulnerabilityAssessments"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default"), // Properties: &armsql.ManagedInstanceVulnerabilityAssessmentProperties{ // RecurringScans: &armsql.VulnerabilityAssessmentRecurringScansProperties{ // EmailSubscriptionAdmins: to.Ptr(false), // Emails: []*string{ // }, // IsEnabled: to.Ptr(true), // }, // }, // } }
Output:
func (*ManagedInstanceVulnerabilityAssessmentsClient) Delete ¶
func (client *ManagedInstanceVulnerabilityAssessmentsClient) Delete(ctx context.Context, resourceGroupName string, managedInstanceName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *ManagedInstanceVulnerabilityAssessmentsClientDeleteOptions) (ManagedInstanceVulnerabilityAssessmentsClientDeleteResponse, error)
Delete - Removes the managed instance's vulnerability assessment. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance for which the vulnerability assessment is defined.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- options - ManagedInstanceVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the ManagedInstanceVulnerabilityAssessmentsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceVulnerabilityAssessmentDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewManagedInstanceVulnerabilityAssessmentsClient().Delete(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", armsql.VulnerabilityAssessmentNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*ManagedInstanceVulnerabilityAssessmentsClient) Get ¶
func (client *ManagedInstanceVulnerabilityAssessmentsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *ManagedInstanceVulnerabilityAssessmentsClientGetOptions) (ManagedInstanceVulnerabilityAssessmentsClientGetResponse, error)
Get - Gets the managed instance's vulnerability assessment. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance for which the vulnerability assessment is defined.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- options - ManagedInstanceVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the ManagedInstanceVulnerabilityAssessmentsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceVulnerabilityAssessmentGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedInstanceVulnerabilityAssessmentsClient().Get(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", armsql.VulnerabilityAssessmentNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstanceVulnerabilityAssessment = armsql.ManagedInstanceVulnerabilityAssessment{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/vulnerabilityAssessments"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default"), // Properties: &armsql.ManagedInstanceVulnerabilityAssessmentProperties{ // RecurringScans: &armsql.VulnerabilityAssessmentRecurringScansProperties{ // EmailSubscriptionAdmins: to.Ptr(true), // Emails: []*string{ // to.Ptr("email1@mail.com"), // to.Ptr("email2@mail.com")}, // IsEnabled: to.Ptr(true), // }, // }, // } }
Output:
func (*ManagedInstanceVulnerabilityAssessmentsClient) NewListByInstancePager ¶ added in v0.5.0
func (client *ManagedInstanceVulnerabilityAssessmentsClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedInstanceVulnerabilityAssessmentsClientListByInstanceOptions) *runtime.Pager[ManagedInstanceVulnerabilityAssessmentsClientListByInstanceResponse]
NewListByInstancePager - Gets the managed instance's vulnerability assessment policies.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance for which the vulnerability assessments is defined.
- options - ManagedInstanceVulnerabilityAssessmentsClientListByInstanceOptions contains the optional parameters for the ManagedInstanceVulnerabilityAssessmentsClient.NewListByInstancePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceVulnerabilityAssessmentListByInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedInstanceVulnerabilityAssessmentsClient().NewListByInstancePager("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedInstanceVulnerabilityAssessmentListResult = armsql.ManagedInstanceVulnerabilityAssessmentListResult{ // Value: []*armsql.ManagedInstanceVulnerabilityAssessment{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/vulnerabilityAssessments"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default"), // Properties: &armsql.ManagedInstanceVulnerabilityAssessmentProperties{ // RecurringScans: &armsql.VulnerabilityAssessmentRecurringScansProperties{ // EmailSubscriptionAdmins: to.Ptr(true), // Emails: []*string{ // to.Ptr("email1@mail.com"), // to.Ptr("email2@mail.com")}, // IsEnabled: to.Ptr(true), // }, // }, // }}, // } } }
Output:
type ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateOptions struct { }
ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceVulnerabilityAssessmentsClient.CreateOrUpdate method.
type ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateResponse struct { // A managed instance vulnerability assessment. ManagedInstanceVulnerabilityAssessment }
ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateResponse contains the response from method ManagedInstanceVulnerabilityAssessmentsClient.CreateOrUpdate.
type ManagedInstanceVulnerabilityAssessmentsClientDeleteOptions ¶ added in v0.3.0
type ManagedInstanceVulnerabilityAssessmentsClientDeleteOptions struct { }
ManagedInstanceVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the ManagedInstanceVulnerabilityAssessmentsClient.Delete method.
type ManagedInstanceVulnerabilityAssessmentsClientDeleteResponse ¶ added in v0.3.0
type ManagedInstanceVulnerabilityAssessmentsClientDeleteResponse struct { }
ManagedInstanceVulnerabilityAssessmentsClientDeleteResponse contains the response from method ManagedInstanceVulnerabilityAssessmentsClient.Delete.
type ManagedInstanceVulnerabilityAssessmentsClientGetOptions ¶ added in v0.3.0
type ManagedInstanceVulnerabilityAssessmentsClientGetOptions struct { }
ManagedInstanceVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the ManagedInstanceVulnerabilityAssessmentsClient.Get method.
type ManagedInstanceVulnerabilityAssessmentsClientGetResponse ¶ added in v0.3.0
type ManagedInstanceVulnerabilityAssessmentsClientGetResponse struct { // A managed instance vulnerability assessment. ManagedInstanceVulnerabilityAssessment }
ManagedInstanceVulnerabilityAssessmentsClientGetResponse contains the response from method ManagedInstanceVulnerabilityAssessmentsClient.Get.
type ManagedInstanceVulnerabilityAssessmentsClientListByInstanceOptions ¶ added in v0.3.0
type ManagedInstanceVulnerabilityAssessmentsClientListByInstanceOptions struct { }
ManagedInstanceVulnerabilityAssessmentsClientListByInstanceOptions contains the optional parameters for the ManagedInstanceVulnerabilityAssessmentsClient.NewListByInstancePager method.
type ManagedInstanceVulnerabilityAssessmentsClientListByInstanceResponse ¶ added in v0.3.0
type ManagedInstanceVulnerabilityAssessmentsClientListByInstanceResponse struct { // A list of the ManagedInstance's vulnerability assessments. ManagedInstanceVulnerabilityAssessmentListResult }
ManagedInstanceVulnerabilityAssessmentsClientListByInstanceResponse contains the response from method ManagedInstanceVulnerabilityAssessmentsClient.NewListByInstancePager.
type ManagedInstancesClient ¶
type ManagedInstancesClient struct {
// contains filtered or unexported fields
}
ManagedInstancesClient contains the methods for the ManagedInstances group. Don't use this type directly, use NewManagedInstancesClient() instead.
func NewManagedInstancesClient ¶
func NewManagedInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedInstancesClient, error)
NewManagedInstancesClient creates a new instance of ManagedInstancesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedInstancesClient) BeginCreateOrUpdate ¶
func (client *ManagedInstancesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters ManagedInstance, options *ManagedInstancesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedInstancesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a managed instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- parameters - The requested managed instance resource state.
- options - ManagedInstancesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstancesClient.BeginCreateOrUpdate method.
Example (CreateManagedInstanceWithAllProperties) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceCreateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedInstancesClient().BeginCreateOrUpdate(ctx, "testrg", "testinstance", armsql.ManagedInstance{ Location: to.Ptr("Japan East"), Tags: map[string]*string{ "tagKey1": to.Ptr("TagValue1"), }, Properties: &armsql.ManagedInstanceProperties{ AdministratorLogin: to.Ptr("dummylogin"), AdministratorLoginPassword: to.Ptr("PLACEHOLDER"), Administrators: &armsql.ManagedInstanceExternalAdministrator{ AzureADOnlyAuthentication: to.Ptr(true), Login: to.Ptr("bob@contoso.com"), PrincipalType: to.Ptr(armsql.PrincipalTypeUser), Sid: to.Ptr("00000011-1111-2222-2222-123456789111"), TenantID: to.Ptr("00000011-1111-2222-2222-123456789111"), }, Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), DNSZonePartner: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance"), InstancePoolID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/pool1"), LicenseType: to.Ptr(armsql.ManagedInstanceLicenseTypeLicenseIncluded), MaintenanceConfigurationID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1"), MinimalTLSVersion: to.Ptr("1.2"), ProxyOverride: to.Ptr(armsql.ManagedInstanceProxyOverrideRedirect), PublicDataEndpointEnabled: to.Ptr(false), RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), ServicePrincipal: &armsql.ServicePrincipal{ Type: to.Ptr(armsql.ServicePrincipalTypeSystemAssigned), }, StorageSizeInGB: to.Ptr[int32](1024), SubnetID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), TimezoneID: to.Ptr("UTC"), VCores: to.Ptr[int32](8), }, SKU: &armsql.SKU{ Name: to.Ptr("GP_Gen5"), Tier: to.Ptr("GeneralPurpose"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstance = armsql.ManagedInstance{ // Name: to.Ptr("testinstance"), // Type: to.Ptr("Microsoft.Sql/managedInstances"), // ID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance"), // Location: to.Ptr("japaneast"), // Tags: map[string]*string{ // "tagKey1": to.Ptr("TagValue1"), // }, // Properties: &armsql.ManagedInstanceProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // Administrators: &armsql.ManagedInstanceExternalAdministrator{ // AzureADOnlyAuthentication: to.Ptr(true), // Login: to.Ptr("bob@contoso.com"), // PrincipalType: to.Ptr(armsql.PrincipalTypeUser), // Sid: to.Ptr("00000011-1111-2222-2222-123456789111"), // TenantID: to.Ptr("00000011-1111-2222-2222-123456789111"), // }, // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // DNSZone: to.Ptr("1b4e2caff2530"), // FullyQualifiedDomainName: to.Ptr("testinstance.1b4e2caff2530.database.windows.net"), // InstancePoolID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/pool1"), // LicenseType: to.Ptr(armsql.ManagedInstanceLicenseTypeLicenseIncluded), // MaintenanceConfigurationID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1"), // MinimalTLSVersion: to.Ptr("1.2"), // ProvisioningState: to.Ptr(armsql.ManagedInstancePropertiesProvisioningStateSucceeded), // ProxyOverride: to.Ptr(armsql.ManagedInstanceProxyOverrideRedirect), // PublicDataEndpointEnabled: to.Ptr(false), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // ServicePrincipal: &armsql.ServicePrincipal{ // Type: to.Ptr(armsql.ServicePrincipalTypeSystemAssigned), // ClientID: to.Ptr("00000011-1111-2222-2222-123456789111"), // PrincipalID: to.Ptr("00000011-1111-2222-2222-123456789111"), // TenantID: to.Ptr("00000011-1111-2222-2222-123456789111"), // }, // State: to.Ptr("Ready"), // StorageSizeInGB: to.Ptr[int32](1024), // SubnetID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // TimezoneID: to.Ptr("UTC"), // VCores: to.Ptr[int32](8), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen5"), // Capacity: to.Ptr[int32](8), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("GeneralPurpose"), // }, // } }
Output:
Example (CreateManagedInstanceWithMinimalProperties) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceCreateMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedInstancesClient().BeginCreateOrUpdate(ctx, "testrg", "testinstance", armsql.ManagedInstance{ Location: to.Ptr("Japan East"), Properties: &armsql.ManagedInstanceProperties{ AdministratorLogin: to.Ptr("dummylogin"), AdministratorLoginPassword: to.Ptr("PLACEHOLDER"), LicenseType: to.Ptr(armsql.ManagedInstanceLicenseTypeLicenseIncluded), StorageSizeInGB: to.Ptr[int32](1024), SubnetID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), VCores: to.Ptr[int32](8), }, SKU: &armsql.SKU{ Name: to.Ptr("GP_Gen4"), Tier: to.Ptr("GeneralPurpose"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstance = armsql.ManagedInstance{ // Name: to.Ptr("testinstance"), // Type: to.Ptr("Microsoft.Sql/managedInstances"), // ID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance"), // Location: to.Ptr("japaneast"), // Tags: map[string]*string{ // }, // Properties: &armsql.ManagedInstanceProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // DNSZone: to.Ptr("1b4e2caff2530"), // FullyQualifiedDomainName: to.Ptr("testinstance.1b4e2caff2530.database.windows.net"), // LicenseType: to.Ptr(armsql.ManagedInstanceLicenseTypeLicenseIncluded), // ProvisioningState: to.Ptr(armsql.ManagedInstancePropertiesProvisioningStateSucceeded), // ProxyOverride: to.Ptr(armsql.ManagedInstanceProxyOverrideRedirect), // PublicDataEndpointEnabled: to.Ptr(false), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // State: to.Ptr("Ready"), // StorageSizeInGB: to.Ptr[int32](1024), // SubnetID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // VCores: to.Ptr[int32](8), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen4"), // Capacity: to.Ptr[int32](8), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("GeneralPurpose"), // }, // } }
Output:
func (*ManagedInstancesClient) BeginDelete ¶
func (client *ManagedInstancesClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstancesClientBeginDeleteOptions) (*runtime.Poller[ManagedInstancesClientDeleteResponse], error)
BeginDelete - Deletes a managed instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - ManagedInstancesClientBeginDeleteOptions contains the optional parameters for the ManagedInstancesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedInstancesClient().BeginDelete(ctx, "testrg", "testinstance", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ManagedInstancesClient) BeginFailover ¶
func (client *ManagedInstancesClient) BeginFailover(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstancesClientBeginFailoverOptions) (*runtime.Poller[ManagedInstancesClientFailoverResponse], error)
BeginFailover - Failovers a managed instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance to failover.
- options - ManagedInstancesClientBeginFailoverOptions contains the optional parameters for the ManagedInstancesClient.BeginFailover method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/FailoverManagedInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedInstancesClient().BeginFailover(ctx, "group1", "instanceName", &armsql.ManagedInstancesClientBeginFailoverOptions{ReplicaType: to.Ptr(armsql.ReplicaTypePrimary)}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ManagedInstancesClient) BeginUpdate ¶
func (client *ManagedInstancesClient) BeginUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters ManagedInstanceUpdate, options *ManagedInstancesClientBeginUpdateOptions) (*runtime.Poller[ManagedInstancesClientUpdateResponse], error)
BeginUpdate - Updates a managed instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- parameters - The requested managed instance resource state.
- options - ManagedInstancesClientBeginUpdateOptions contains the optional parameters for the ManagedInstancesClient.BeginUpdate method.
Example (RemoveMaintenancePolicyFromManagedInstanceSelectDefaultMaintenancePolicy) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceRemoveMaintenanceConfiguration.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedInstancesClient().BeginUpdate(ctx, "testrg", "testinstance", armsql.ManagedInstanceUpdate{ Properties: &armsql.ManagedInstanceProperties{ MaintenanceConfigurationID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstance = armsql.ManagedInstance{ // Name: to.Ptr("testinstance"), // Type: to.Ptr("Microsoft.Sql/managedInstances"), // ID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance"), // Location: to.Ptr("japaneast"), // Properties: &armsql.ManagedInstanceProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // DNSZone: to.Ptr("1b4e2caff2530"), // FullyQualifiedDomainName: to.Ptr("testinstance.1b4e2caff2530.database.windows.net"), // InstancePoolID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/instancePool1"), // LicenseType: to.Ptr(armsql.ManagedInstanceLicenseTypeLicenseIncluded), // MaintenanceConfigurationID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default"), // ProxyOverride: to.Ptr(armsql.ManagedInstanceProxyOverrideDefault), // PublicDataEndpointEnabled: to.Ptr(false), // State: to.Ptr("Ready"), // StorageSizeInGB: to.Ptr[int32](1024), // SubnetID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // VCores: to.Ptr[int32](8), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen4"), // Capacity: to.Ptr[int32](8), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("GeneralPurpose"), // }, // } }
Output:
Example (UpdateManagedInstanceWithAllProperties) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceUpdateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedInstancesClient().BeginUpdate(ctx, "testrg", "testinstance", armsql.ManagedInstanceUpdate{ Properties: &armsql.ManagedInstanceProperties{ AdministratorLogin: to.Ptr("dummylogin"), AdministratorLoginPassword: to.Ptr("PLACEHOLDER"), Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), LicenseType: to.Ptr(armsql.ManagedInstanceLicenseTypeBasePrice), MaintenanceConfigurationID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1"), MinimalTLSVersion: to.Ptr("1.2"), ProxyOverride: to.Ptr(armsql.ManagedInstanceProxyOverrideRedirect), PublicDataEndpointEnabled: to.Ptr(false), RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), StorageSizeInGB: to.Ptr[int32](448), VCores: to.Ptr[int32](8), }, SKU: &armsql.SKU{ Name: to.Ptr("GP_Gen4"), Capacity: to.Ptr[int32](8), Tier: to.Ptr("GeneralPurpose"), }, Tags: map[string]*string{ "tagKey1": to.Ptr("TagValue1"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstance = armsql.ManagedInstance{ // Name: to.Ptr("testinstance"), // Type: to.Ptr("Microsoft.Sql/managedInstances"), // ID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance"), // Location: to.Ptr("japaneast"), // Tags: map[string]*string{ // "tagKey1": to.Ptr("TagValue1"), // }, // Properties: &armsql.ManagedInstanceProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // DNSZone: to.Ptr("1b4e2caff2530"), // FullyQualifiedDomainName: to.Ptr("testinstance.1b4e2caff2530.database.windows.net"), // InstancePoolID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/instancePool1"), // LicenseType: to.Ptr(armsql.ManagedInstanceLicenseTypeBasePrice), // MaintenanceConfigurationID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1"), // MinimalTLSVersion: to.Ptr("1.2"), // ProxyOverride: to.Ptr(armsql.ManagedInstanceProxyOverrideRedirect), // PublicDataEndpointEnabled: to.Ptr(false), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // State: to.Ptr("Ready"), // StorageSizeInGB: to.Ptr[int32](448), // SubnetID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // VCores: to.Ptr[int32](8), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen4"), // Capacity: to.Ptr[int32](8), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("GeneralPurpose"), // }, // } }
Output:
Example (UpdateManagedInstanceWithMinimalProperties) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceUpdateMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedInstancesClient().BeginUpdate(ctx, "testrg", "testinstance", armsql.ManagedInstanceUpdate{ Tags: map[string]*string{ "tagKey1": to.Ptr("TagValue1"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstance = armsql.ManagedInstance{ // Name: to.Ptr("testinstance"), // Type: to.Ptr("Microsoft.Sql/managedInstances"), // ID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance"), // Location: to.Ptr("japaneast"), // Tags: map[string]*string{ // "tagKey1": to.Ptr("TagValue1"), // }, // Properties: &armsql.ManagedInstanceProperties{ // AdministratorLogin: to.Ptr("PLACEHOLDER"), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // DNSZone: to.Ptr("1b4e2caff2530"), // FullyQualifiedDomainName: to.Ptr("testinstance.1b4e2caff2530.database.windows.net"), // InstancePoolID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/instancePool1"), // LicenseType: to.Ptr(armsql.ManagedInstanceLicenseTypeLicenseIncluded), // MaintenanceConfigurationID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default"), // ProxyOverride: to.Ptr(armsql.ManagedInstanceProxyOverrideDefault), // PublicDataEndpointEnabled: to.Ptr(false), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // State: to.Ptr("Ready"), // StorageSizeInGB: to.Ptr[int32](1024), // SubnetID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // VCores: to.Ptr[int32](8), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen4"), // Capacity: to.Ptr[int32](8), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("GeneralPurpose"), // }, // } }
Output:
func (*ManagedInstancesClient) Get ¶
func (client *ManagedInstancesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstancesClientGetOptions) (ManagedInstancesClientGetResponse, error)
Get - Gets a managed instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - ManagedInstancesClientGetOptions contains the optional parameters for the ManagedInstancesClient.Get method.
Example (GetManagedInstance) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedInstancesClient().Get(ctx, "testrg", "testinstance", &armsql.ManagedInstancesClientGetOptions{Expand: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstance = armsql.ManagedInstance{ // Name: to.Ptr("testinstance"), // Type: to.Ptr("Microsoft.Sql/managedInstances"), // ID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance"), // Location: to.Ptr("japaneast"), // Tags: map[string]*string{ // "key": to.Ptr("value"), // }, // Properties: &armsql.ManagedInstanceProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // DNSZone: to.Ptr("1b4e2caff2530"), // FullyQualifiedDomainName: to.Ptr("testinstance.1b4e2caff2530.database.windows.net"), // InstancePoolID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/instancePool1"), // LicenseType: to.Ptr(armsql.ManagedInstanceLicenseTypeLicenseIncluded), // MaintenanceConfigurationID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1"), // MinimalTLSVersion: to.Ptr("1.2"), // ProvisioningState: to.Ptr(armsql.ManagedInstancePropertiesProvisioningStateSucceeded), // ProxyOverride: to.Ptr(armsql.ManagedInstanceProxyOverrideDefault), // PublicDataEndpointEnabled: to.Ptr(false), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // ServicePrincipal: &armsql.ServicePrincipal{ // Type: to.Ptr(armsql.ServicePrincipalTypeSystemAssigned), // ClientID: to.Ptr("00000011-1111-2222-2222-123456789111"), // PrincipalID: to.Ptr("00000011-1111-2222-2222-123456789111"), // TenantID: to.Ptr("00000011-1111-2222-2222-123456789111"), // }, // State: to.Ptr("Ready"), // StorageSizeInGB: to.Ptr[int32](1024), // SubnetID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // VCores: to.Ptr[int32](8), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen4"), // Capacity: to.Ptr[int32](8), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("GeneralPurpose"), // }, // } }
Output:
Example (GetManagedInstanceWithExpandAdministratorsActivedirectory) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceGetWithExpandEqualsAdministrators.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedInstancesClient().Get(ctx, "testrg", "testinstance", &armsql.ManagedInstancesClientGetOptions{Expand: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedInstance = armsql.ManagedInstance{ // Name: to.Ptr("testinstance"), // Type: to.Ptr("Microsoft.Sql/managedInstances"), // ID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance"), // Location: to.Ptr("japaneast"), // Tags: map[string]*string{ // "key": to.Ptr("value"), // }, // Properties: &armsql.ManagedInstanceProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // Administrators: &armsql.ManagedInstanceExternalAdministrator{ // AzureADOnlyAuthentication: to.Ptr(true), // Login: to.Ptr("bob@contoso.com"), // PrincipalType: to.Ptr(armsql.PrincipalTypeUser), // Sid: to.Ptr("00000011-1111-2222-2222-123456789111"), // TenantID: to.Ptr("00000011-1111-2222-2222-123456789111"), // }, // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // DNSZone: to.Ptr("1b4e2caff2530"), // FullyQualifiedDomainName: to.Ptr("testinstance.1b4e2caff2530.database.windows.net"), // InstancePoolID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/instancePool1"), // LicenseType: to.Ptr(armsql.ManagedInstanceLicenseTypeLicenseIncluded), // MaintenanceConfigurationID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1"), // MinimalTLSVersion: to.Ptr("1.2"), // ProvisioningState: to.Ptr(armsql.ManagedInstancePropertiesProvisioningStateSucceeded), // ProxyOverride: to.Ptr(armsql.ManagedInstanceProxyOverrideDefault), // PublicDataEndpointEnabled: to.Ptr(false), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // State: to.Ptr("Ready"), // StorageSizeInGB: to.Ptr[int32](1024), // SubnetID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // VCores: to.Ptr[int32](8), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen4"), // Capacity: to.Ptr[int32](8), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("GeneralPurpose"), // }, // } }
Output:
func (*ManagedInstancesClient) NewListByInstancePoolPager ¶ added in v0.5.0
func (client *ManagedInstancesClient) NewListByInstancePoolPager(resourceGroupName string, instancePoolName string, options *ManagedInstancesClientListByInstancePoolOptions) *runtime.Pager[ManagedInstancesClientListByInstancePoolResponse]
NewListByInstancePoolPager - Gets a list of all managed instances in an instance pool.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- instancePoolName - The instance pool name.
- options - ManagedInstancesClientListByInstancePoolOptions contains the optional parameters for the ManagedInstancesClient.NewListByInstancePoolPager method.
Example (ListManagedInstancesByInstancePool) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceListByInstancePool.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedInstancesClient().NewListByInstancePoolPager("Test1", "pool1", &armsql.ManagedInstancesClientListByInstancePoolOptions{Expand: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedInstanceListResult = armsql.ManagedInstanceListResult{ // Value: []*armsql.ManagedInstance{ // { // Name: to.Ptr("testinstance1"), // Type: to.Ptr("Microsoft.Sql/managedInstances"), // ID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance1"), // Location: to.Ptr("canadacentral"), // Properties: &armsql.ManagedInstanceProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // DNSZone: to.Ptr("1b4e2caff2530"), // FullyQualifiedDomainName: to.Ptr("testinstance1.1b4e2caff2530.database.windows.net"), // InstancePoolID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/Test1/providers/Microsoft.Sql/instancePools/pool1"), // LicenseType: to.Ptr(armsql.ManagedInstanceLicenseTypeLicenseIncluded), // MaintenanceConfigurationID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_CanadaCentral_MI_1"), // MinimalTLSVersion: to.Ptr("1.2"), // ProvisioningState: to.Ptr(armsql.ManagedInstancePropertiesProvisioningStateSucceeded), // ProxyOverride: to.Ptr(armsql.ManagedInstanceProxyOverrideRedirect), // PublicDataEndpointEnabled: to.Ptr(false), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // State: to.Ptr("Ready"), // StorageSizeInGB: to.Ptr[int32](1024), // SubnetID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/Test1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // VCores: to.Ptr[int32](8), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen5"), // Capacity: to.Ptr[int32](8), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("GeneralPurpose"), // }, // }, // { // Name: to.Ptr("testinstance2"), // Type: to.Ptr("Microsoft.Sql/managedInstances"), // ID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance2"), // Location: to.Ptr("canadacentral"), // Properties: &armsql.ManagedInstanceProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // DNSZone: to.Ptr("2c3d1bdae3412"), // FullyQualifiedDomainName: to.Ptr("testinstance2.2c3d1bdae3412.database.windows.net"), // InstancePoolID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/Test1/providers/Microsoft.Sql/instancePools/pool1"), // LicenseType: to.Ptr(armsql.ManagedInstanceLicenseType("Full")), // MaintenanceConfigurationID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_CanadaCentral_MI_1"), // MinimalTLSVersion: to.Ptr("1.2"), // ProvisioningState: to.Ptr(armsql.ManagedInstancePropertiesProvisioningStateSucceeded), // ProxyOverride: to.Ptr(armsql.ManagedInstanceProxyOverrideRedirect), // PublicDataEndpointEnabled: to.Ptr(false), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // State: to.Ptr("Ready"), // StorageSizeInGB: to.Ptr[int32](1024), // SubnetID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/Test1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // VCores: to.Ptr[int32](16), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen5"), // Capacity: to.Ptr[int32](16), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("GeneralPurpose"), // }, // }}, // } } }
Output:
Example (ListManagedInstancesByInstancePoolWithExpandAdministratorsActivedirectory) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceListByInstancePoolWithExpandEqualsAdministrators.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedInstancesClient().NewListByInstancePoolPager("Test1", "pool1", &armsql.ManagedInstancesClientListByInstancePoolOptions{Expand: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedInstanceListResult = armsql.ManagedInstanceListResult{ // Value: []*armsql.ManagedInstance{ // { // Name: to.Ptr("testinstance1"), // Type: to.Ptr("Microsoft.Sql/managedInstances"), // ID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance1"), // Location: to.Ptr("canadacentral"), // Properties: &armsql.ManagedInstanceProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // Administrators: &armsql.ManagedInstanceExternalAdministrator{ // AzureADOnlyAuthentication: to.Ptr(true), // Login: to.Ptr("bob@contoso.com"), // PrincipalType: to.Ptr(armsql.PrincipalTypeUser), // Sid: to.Ptr("00000011-1111-2222-2222-123456789111"), // TenantID: to.Ptr("00000011-1111-2222-2222-123456789111"), // }, // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // DNSZone: to.Ptr("1b4e2caff2530"), // FullyQualifiedDomainName: to.Ptr("testinstance1.1b4e2caff2530.database.windows.net"), // InstancePoolID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/Test1/providers/Microsoft.Sql/instancePools/pool1"), // LicenseType: to.Ptr(armsql.ManagedInstanceLicenseTypeLicenseIncluded), // MaintenanceConfigurationID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_CanadaCentral_MI_1"), // MinimalTLSVersion: to.Ptr("1.2"), // ProvisioningState: to.Ptr(armsql.ManagedInstancePropertiesProvisioningStateSucceeded), // ProxyOverride: to.Ptr(armsql.ManagedInstanceProxyOverrideRedirect), // PublicDataEndpointEnabled: to.Ptr(false), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // State: to.Ptr("Ready"), // StorageSizeInGB: to.Ptr[int32](1024), // SubnetID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/Test1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // VCores: to.Ptr[int32](8), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen5"), // Capacity: to.Ptr[int32](8), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("GeneralPurpose"), // }, // }, // { // Name: to.Ptr("testinstance2"), // Type: to.Ptr("Microsoft.Sql/managedInstances"), // ID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance2"), // Location: to.Ptr("canadacentral"), // Properties: &armsql.ManagedInstanceProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // Administrators: &armsql.ManagedInstanceExternalAdministrator{ // AzureADOnlyAuthentication: to.Ptr(true), // Login: to.Ptr("bob@contoso.com"), // PrincipalType: to.Ptr(armsql.PrincipalTypeUser), // Sid: to.Ptr("00000011-1111-2222-2222-123456789111"), // TenantID: to.Ptr("00000011-1111-2222-2222-123456789111"), // }, // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // DNSZone: to.Ptr("2c3d1bdae3412"), // FullyQualifiedDomainName: to.Ptr("testinstance2.2c3d1bdae3412.database.windows.net"), // InstancePoolID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/Test1/providers/Microsoft.Sql/instancePools/pool1"), // LicenseType: to.Ptr(armsql.ManagedInstanceLicenseType("Full")), // MaintenanceConfigurationID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_CanadaCentral_MI_2"), // MinimalTLSVersion: to.Ptr("1.2"), // ProvisioningState: to.Ptr(armsql.ManagedInstancePropertiesProvisioningStateSucceeded), // ProxyOverride: to.Ptr(armsql.ManagedInstanceProxyOverrideRedirect), // PublicDataEndpointEnabled: to.Ptr(false), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // State: to.Ptr("Ready"), // StorageSizeInGB: to.Ptr[int32](1024), // SubnetID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/Test1/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // VCores: to.Ptr[int32](16), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen5"), // Capacity: to.Ptr[int32](16), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("GeneralPurpose"), // }, // }}, // } } }
Output:
func (*ManagedInstancesClient) NewListByManagedInstancePager ¶ added in v0.5.0
func (client *ManagedInstancesClient) NewListByManagedInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedInstancesClientListByManagedInstanceOptions) *runtime.Pager[ManagedInstancesClientListByManagedInstanceResponse]
NewListByManagedInstancePager - Get top resource consuming queries of a managed instance.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - ManagedInstancesClientListByManagedInstanceOptions contains the optional parameters for the ManagedInstancesClient.NewListByManagedInstancePager method.
Example (ObtainListOfInstancesTopResourceConsumingQueries) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceTopQueriesList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedInstancesClient().NewListByManagedInstancePager("sqlcrudtest-7398", "sqlcrudtest-4645", &armsql.ManagedInstancesClientListByManagedInstanceOptions{NumberOfQueries: nil, Databases: nil, StartTime: nil, EndTime: nil, Interval: to.Ptr(armsql.QueryTimeGrainTypePT1H), AggregationFunction: nil, ObservationMetric: to.Ptr(armsql.MetricTypeDuration), }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.TopQueriesListResult = armsql.TopQueriesListResult{ // Value: []*armsql.TopQueries{ // { // AggregationFunction: to.Ptr("sum"), // EndTime: to.Ptr("03/05/2020 13:00:00"), // IntervalType: to.Ptr(armsql.QueryTimeGrainTypeP1D), // NumberOfQueries: to.Ptr[int32](5), // ObservationMetric: to.Ptr("cpu"), // Queries: []*armsql.QueryStatisticsProperties{ // { // DatabaseName: to.Ptr("db1"), // Intervals: []*armsql.QueryMetricInterval{ // { // ExecutionCount: to.Ptr[int64](1), // IntervalStartTime: to.Ptr("03/03/2020 00:00:00"), // Metrics: []*armsql.QueryMetricProperties{ // { // Name: to.Ptr("cpu"), // DisplayName: to.Ptr("Cpu"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0.0015841714409722222), // }, // { // Name: to.Ptr("io"), // DisplayName: to.Ptr("Physical Io Reads"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0.000004340277777777778), // }, // { // Name: to.Ptr("logIo"), // DisplayName: to.Ptr("Log Writes"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("memory"), // DisplayName: to.Ptr("Memory consumption"), // Unit: to.Ptr(armsql.QueryMetricUnitTypeKB), // Value: to.Ptr[float64](8336), // }, // { // Name: to.Ptr("duration"), // DisplayName: to.Ptr("Query duration"), // Unit: to.Ptr(armsql.QueryMetricUnitTypeMicroseconds), // Value: to.Ptr[float64](11306905), // }}, // }}, // QueryID: to.Ptr("25"), // }, // { // DatabaseName: to.Ptr("db1"), // Intervals: []*armsql.QueryMetricInterval{ // { // ExecutionCount: to.Ptr[int64](1), // IntervalStartTime: to.Ptr("03/03/2020 00:00:00"), // Metrics: []*armsql.QueryMetricProperties{ // { // Name: to.Ptr("cpu"), // DisplayName: to.Ptr("Cpu"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0.0009521432291666667), // }, // { // Name: to.Ptr("io"), // DisplayName: to.Ptr("Physical Io Reads"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](2.3148148148148148e-7), // }, // { // Name: to.Ptr("logIo"), // DisplayName: to.Ptr("Log Writes"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("memory"), // DisplayName: to.Ptr("Memory consumption"), // Unit: to.Ptr(armsql.QueryMetricUnitTypeKB), // Value: to.Ptr[float64](1024), // }, // { // Name: to.Ptr("duration"), // DisplayName: to.Ptr("Query duration"), // Unit: to.Ptr(armsql.QueryMetricUnitTypeMicroseconds), // Value: to.Ptr[float64](6620020), // }}, // }}, // QueryID: to.Ptr("21"), // }, // { // DatabaseName: to.Ptr("db3"), // Intervals: []*armsql.QueryMetricInterval{ // { // ExecutionCount: to.Ptr[int64](104), // IntervalStartTime: to.Ptr("03/04/2020 00:00:00"), // Metrics: []*armsql.QueryMetricProperties{ // { // Name: to.Ptr("cpu"), // DisplayName: to.Ptr("Cpu"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0.0008006611689814815), // }, // { // Name: to.Ptr("io"), // DisplayName: to.Ptr("Physical Io Reads"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("logIo"), // DisplayName: to.Ptr("Log Writes"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("memory"), // DisplayName: to.Ptr("Memory consumption"), // Unit: to.Ptr(armsql.QueryMetricUnitTypeKB), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("duration"), // DisplayName: to.Ptr("Query duration"), // Unit: to.Ptr(armsql.QueryMetricUnitTypeMicroseconds), // Value: to.Ptr[float64](5543088), // }}, // }}, // QueryID: to.Ptr("3"), // }, // { // DatabaseName: to.Ptr("db2"), // Intervals: []*armsql.QueryMetricInterval{ // { // ExecutionCount: to.Ptr[int64](89), // IntervalStartTime: to.Ptr("03/03/2020 00:00:00"), // Metrics: []*armsql.QueryMetricProperties{ // { // Name: to.Ptr("cpu"), // DisplayName: to.Ptr("Cpu"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0.0006882543402777778), // }, // { // Name: to.Ptr("io"), // DisplayName: to.Ptr("Physical Io Reads"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("logIo"), // DisplayName: to.Ptr("Log Writes"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("memory"), // DisplayName: to.Ptr("Memory consumption"), // Unit: to.Ptr(armsql.QueryMetricUnitTypeKB), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("duration"), // DisplayName: to.Ptr("Query duration"), // Unit: to.Ptr(armsql.QueryMetricUnitTypeMicroseconds), // Value: to.Ptr[float64](4761877), // }}, // }}, // QueryID: to.Ptr("3"), // }, // { // DatabaseName: to.Ptr("db3"), // Intervals: []*armsql.QueryMetricInterval{ // { // ExecutionCount: to.Ptr[int64](1), // IntervalStartTime: to.Ptr("03/04/2020 00:00:00"), // Metrics: []*armsql.QueryMetricProperties{ // { // Name: to.Ptr("cpu"), // DisplayName: to.Ptr("Cpu"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0.0006220661168981482), // }, // { // Name: to.Ptr("io"), // DisplayName: to.Ptr("Physical Io Reads"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("logIo"), // DisplayName: to.Ptr("Log Writes"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("memory"), // DisplayName: to.Ptr("Memory consumption"), // Unit: to.Ptr(armsql.QueryMetricUnitTypeKB), // Value: to.Ptr[float64](1024), // }, // { // Name: to.Ptr("duration"), // DisplayName: to.Ptr("Query duration"), // Unit: to.Ptr(armsql.QueryMetricUnitTypeMicroseconds), // Value: to.Ptr[float64](4454161), // }}, // }}, // QueryID: to.Ptr("22"), // }}, // StartTime: to.Ptr("03/01/2020 00:00:00"), // }}, // } } }
Output:
Example (ObtainListOfInstancesTopResourceConsumingQueriesFullBlownRequestAndResponse) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceTopQueriesListMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedInstancesClient().NewListByManagedInstancePager("sqlcrudtest-7398", "sqlcrudtest-4645", &armsql.ManagedInstancesClientListByManagedInstanceOptions{NumberOfQueries: nil, Databases: to.Ptr("db1,db2"), StartTime: to.Ptr("2020-03-10T12:00:00Z"), EndTime: to.Ptr("2020-03-12T12:00:00Z"), Interval: to.Ptr(armsql.QueryTimeGrainTypeP1D), AggregationFunction: nil, ObservationMetric: to.Ptr(armsql.MetricTypeCPU), }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.TopQueriesListResult = armsql.TopQueriesListResult{ // Value: []*armsql.TopQueries{ // { // AggregationFunction: to.Ptr("sum"), // EndTime: to.Ptr("03/12/2020 13:00:00"), // IntervalType: to.Ptr(armsql.QueryTimeGrainTypeP1D), // NumberOfQueries: to.Ptr[int32](5), // ObservationMetric: to.Ptr("cpu"), // Queries: []*armsql.QueryStatisticsProperties{ // { // DatabaseName: to.Ptr("db1"), // Intervals: []*armsql.QueryMetricInterval{ // { // ExecutionCount: to.Ptr[int64](1), // IntervalStartTime: to.Ptr("03/11/2020 00:00:00"), // Metrics: []*armsql.QueryMetricProperties{ // { // Name: to.Ptr("cpu"), // DisplayName: to.Ptr("Cpu"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0.0015934667245370371), // }, // { // Name: to.Ptr("io"), // DisplayName: to.Ptr("Physical Io Reads"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0.000004224537037037037), // }, // { // Name: to.Ptr("logIo"), // DisplayName: to.Ptr("Log Writes"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("memory"), // DisplayName: to.Ptr("Memory consumption"), // Unit: to.Ptr(armsql.QueryMetricUnitTypeKB), // Value: to.Ptr[float64](8336), // }, // { // Name: to.Ptr("duration"), // DisplayName: to.Ptr("Query duration"), // Unit: to.Ptr(armsql.QueryMetricUnitTypeMicroseconds), // Value: to.Ptr[float64](11091296), // }}, // }}, // QueryID: to.Ptr("28"), // }, // { // DatabaseName: to.Ptr("db1"), // Intervals: []*armsql.QueryMetricInterval{ // { // ExecutionCount: to.Ptr[int64](1), // IntervalStartTime: to.Ptr("03/11/2020 00:00:00"), // Metrics: []*armsql.QueryMetricProperties{ // { // Name: to.Ptr("cpu"), // DisplayName: to.Ptr("Cpu"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0.0009522783564814815), // }, // { // Name: to.Ptr("io"), // DisplayName: to.Ptr("Physical Io Reads"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](1.7361111111111112e-7), // }, // { // Name: to.Ptr("logIo"), // DisplayName: to.Ptr("Log Writes"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("memory"), // DisplayName: to.Ptr("Memory consumption"), // Unit: to.Ptr(armsql.QueryMetricUnitTypeKB), // Value: to.Ptr[float64](1024), // }, // { // Name: to.Ptr("duration"), // DisplayName: to.Ptr("Query duration"), // Unit: to.Ptr(armsql.QueryMetricUnitTypeMicroseconds), // Value: to.Ptr[float64](6625562), // }}, // }}, // QueryID: to.Ptr("24"), // }, // { // DatabaseName: to.Ptr("db1"), // Intervals: []*armsql.QueryMetricInterval{ // { // ExecutionCount: to.Ptr[int64](82), // IntervalStartTime: to.Ptr("03/11/2020 00:00:00"), // Metrics: []*armsql.QueryMetricProperties{ // { // Name: to.Ptr("cpu"), // DisplayName: to.Ptr("Cpu"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0.0007183139467592593), // }, // { // Name: to.Ptr("io"), // DisplayName: to.Ptr("Physical Io Reads"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("logIo"), // DisplayName: to.Ptr("Log Writes"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("memory"), // DisplayName: to.Ptr("Memory consumption"), // Unit: to.Ptr(armsql.QueryMetricUnitTypeKB), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("duration"), // DisplayName: to.Ptr("Query duration"), // Unit: to.Ptr(armsql.QueryMetricUnitTypeMicroseconds), // Value: to.Ptr[float64](4970199), // }}, // }}, // QueryID: to.Ptr("3"), // }, // { // DatabaseName: to.Ptr("db1"), // Intervals: []*armsql.QueryMetricInterval{ // { // ExecutionCount: to.Ptr[int64](1), // IntervalStartTime: to.Ptr("03/11/2020 00:00:00"), // Metrics: []*armsql.QueryMetricProperties{ // { // Name: to.Ptr("cpu"), // DisplayName: to.Ptr("Cpu"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0.0006494454571759259), // }, // { // Name: to.Ptr("io"), // DisplayName: to.Ptr("Physical Io Reads"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0.000005034722222222222), // }, // { // Name: to.Ptr("logIo"), // DisplayName: to.Ptr("Log Writes"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("memory"), // DisplayName: to.Ptr("Memory consumption"), // Unit: to.Ptr(armsql.QueryMetricUnitTypeKB), // Value: to.Ptr[float64](1024), // }, // { // Name: to.Ptr("duration"), // DisplayName: to.Ptr("Query duration"), // Unit: to.Ptr(armsql.QueryMetricUnitTypeMicroseconds), // Value: to.Ptr[float64](4530668), // }}, // }}, // QueryID: to.Ptr("29"), // }, // { // DatabaseName: to.Ptr("db2"), // Intervals: []*armsql.QueryMetricInterval{ // { // ExecutionCount: to.Ptr[int64](1), // IntervalStartTime: to.Ptr("03/11/2020 00:00:00"), // Metrics: []*armsql.QueryMetricProperties{ // { // Name: to.Ptr("cpu"), // DisplayName: to.Ptr("Cpu"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0.0006275368923611112), // }, // { // Name: to.Ptr("io"), // DisplayName: to.Ptr("Physical Io Reads"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("logIo"), // DisplayName: to.Ptr("Log Writes"), // Unit: to.Ptr(armsql.QueryMetricUnitTypePercentage), // Value: to.Ptr[float64](0), // }, // { // Name: to.Ptr("memory"), // DisplayName: to.Ptr("Memory consumption"), // Unit: to.Ptr(armsql.QueryMetricUnitTypeKB), // Value: to.Ptr[float64](1024), // }, // { // Name: to.Ptr("duration"), // DisplayName: to.Ptr("Query duration"), // Unit: to.Ptr(armsql.QueryMetricUnitTypeMicroseconds), // Value: to.Ptr[float64](4349943), // }}, // }}, // QueryID: to.Ptr("25"), // }}, // StartTime: to.Ptr("03/10/2020 00:00:00"), // }}, // } } }
Output:
Example (ObtainListOfInstancesTopResourceConsumingQueriesMinimalRequestAndResponse) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceTopQueriesListMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedInstancesClient().NewListByManagedInstancePager("sqlcrudtest-7398", "sqlcrudtest-4645", &armsql.ManagedInstancesClientListByManagedInstanceOptions{NumberOfQueries: nil, Databases: nil, StartTime: nil, EndTime: nil, Interval: nil, AggregationFunction: nil, ObservationMetric: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.TopQueriesListResult = armsql.TopQueriesListResult{ // Value: []*armsql.TopQueries{ // { // AggregationFunction: to.Ptr("sum"), // EndTime: to.Ptr("03/11/2020 12:24:07"), // IntervalType: to.Ptr(armsql.QueryTimeGrainTypePT1H), // NumberOfQueries: to.Ptr[int32](5), // ObservationMetric: to.Ptr("cpu"), // Queries: []*armsql.QueryStatisticsProperties{ // }, // StartTime: to.Ptr("03/10/2020 12:00:00"), // }}, // } } }
Output:
func (*ManagedInstancesClient) NewListByResourceGroupPager ¶ added in v0.5.0
func (client *ManagedInstancesClient) NewListByResourceGroupPager(resourceGroupName string, options *ManagedInstancesClientListByResourceGroupOptions) *runtime.Pager[ManagedInstancesClientListByResourceGroupResponse]
NewListByResourceGroupPager - Gets a list of managed instances in a resource group.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- options - ManagedInstancesClientListByResourceGroupOptions contains the optional parameters for the ManagedInstancesClient.NewListByResourceGroupPager method.
Example (ListManagedInstancesByResourceGroup) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedInstancesClient().NewListByResourceGroupPager("Test1", &armsql.ManagedInstancesClientListByResourceGroupOptions{Expand: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedInstanceListResult = armsql.ManagedInstanceListResult{ // Value: []*armsql.ManagedInstance{ // { // Name: to.Ptr("testinstance1"), // Type: to.Ptr("Microsoft.Sql/managedInstances"), // ID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance1"), // Location: to.Ptr("japaneast"), // Properties: &armsql.ManagedInstanceProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // DNSZone: to.Ptr("1b4e2caff2530"), // FullyQualifiedDomainName: to.Ptr("testinstance1.1b4e2caff2530.database.windows.net"), // LicenseType: to.Ptr(armsql.ManagedInstanceLicenseTypeLicenseIncluded), // MaintenanceConfigurationID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1"), // MinimalTLSVersion: to.Ptr("1.2"), // ProvisioningState: to.Ptr(armsql.ManagedInstancePropertiesProvisioningStateSucceeded), // ProxyOverride: to.Ptr(armsql.ManagedInstanceProxyOverrideDefault), // PublicDataEndpointEnabled: to.Ptr(false), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // State: to.Ptr("Ready"), // StorageSizeInGB: to.Ptr[int32](1024), // SubnetID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // VCores: to.Ptr[int32](8), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen4"), // Capacity: to.Ptr[int32](8), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("GeneralPurpose"), // }, // }, // { // Name: to.Ptr("testinstance2"), // Type: to.Ptr("Microsoft.Sql/managedInstances"), // ID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance2"), // Location: to.Ptr("japaneast"), // Properties: &armsql.ManagedInstanceProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // DNSZone: to.Ptr("2c3d1bdae3412"), // FullyQualifiedDomainName: to.Ptr("testinstance2.2c3d1bdae3412.database.windows.net"), // LicenseType: to.Ptr(armsql.ManagedInstanceLicenseType("Full")), // MaintenanceConfigurationID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1"), // MinimalTLSVersion: to.Ptr("1.2"), // ProvisioningState: to.Ptr(armsql.ManagedInstancePropertiesProvisioningStateSucceeded), // ProxyOverride: to.Ptr(armsql.ManagedInstanceProxyOverrideDefault), // PublicDataEndpointEnabled: to.Ptr(false), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // State: to.Ptr("Ready"), // StorageSizeInGB: to.Ptr[int32](1024), // SubnetID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/subnet2"), // VCores: to.Ptr[int32](16), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("BC_Gen5"), // Capacity: to.Ptr[int32](16), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("BusinessCritical"), // }, // }}, // } } }
Output:
Example (ListManagedInstancesByResourceGroupWithExpandAdministratorsActivedirectory) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceListByResourceGroupWithExpandEqualsAdministrators.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedInstancesClient().NewListByResourceGroupPager("Test1", &armsql.ManagedInstancesClientListByResourceGroupOptions{Expand: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedInstanceListResult = armsql.ManagedInstanceListResult{ // Value: []*armsql.ManagedInstance{ // { // Name: to.Ptr("testinstance1"), // Type: to.Ptr("Microsoft.Sql/managedInstances"), // ID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance1"), // Location: to.Ptr("japaneast"), // Properties: &armsql.ManagedInstanceProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // Administrators: &armsql.ManagedInstanceExternalAdministrator{ // AzureADOnlyAuthentication: to.Ptr(true), // Login: to.Ptr("bob@contoso.com"), // PrincipalType: to.Ptr(armsql.PrincipalTypeUser), // Sid: to.Ptr("00000011-1111-2222-2222-123456789111"), // TenantID: to.Ptr("00000011-1111-2222-2222-123456789111"), // }, // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // DNSZone: to.Ptr("1b4e2caff2530"), // FullyQualifiedDomainName: to.Ptr("testinstance1.1b4e2caff2530.database.windows.net"), // LicenseType: to.Ptr(armsql.ManagedInstanceLicenseTypeLicenseIncluded), // MaintenanceConfigurationID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1"), // MinimalTLSVersion: to.Ptr("1.2"), // ProvisioningState: to.Ptr(armsql.ManagedInstancePropertiesProvisioningStateSucceeded), // ProxyOverride: to.Ptr(armsql.ManagedInstanceProxyOverrideDefault), // PublicDataEndpointEnabled: to.Ptr(false), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // State: to.Ptr("Ready"), // StorageSizeInGB: to.Ptr[int32](1024), // SubnetID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // VCores: to.Ptr[int32](8), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen4"), // Capacity: to.Ptr[int32](8), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("GeneralPurpose"), // }, // }, // { // Name: to.Ptr("testinstance2"), // Type: to.Ptr("Microsoft.Sql/managedInstances"), // ID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance2"), // Location: to.Ptr("japaneast"), // Properties: &armsql.ManagedInstanceProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // Administrators: &armsql.ManagedInstanceExternalAdministrator{ // AzureADOnlyAuthentication: to.Ptr(true), // Login: to.Ptr("bob@contoso.com"), // PrincipalType: to.Ptr(armsql.PrincipalTypeUser), // Sid: to.Ptr("00000011-1111-2222-2222-123456789111"), // TenantID: to.Ptr("00000011-1111-2222-2222-123456789111"), // }, // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // DNSZone: to.Ptr("2c3d1bdae3412"), // FullyQualifiedDomainName: to.Ptr("testinstance2.2c3d1bdae3412.database.windows.net"), // LicenseType: to.Ptr(armsql.ManagedInstanceLicenseType("Full")), // MaintenanceConfigurationID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_2"), // MinimalTLSVersion: to.Ptr("1.2"), // ProvisioningState: to.Ptr(armsql.ManagedInstancePropertiesProvisioningStateSucceeded), // ProxyOverride: to.Ptr(armsql.ManagedInstanceProxyOverrideDefault), // PublicDataEndpointEnabled: to.Ptr(false), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // State: to.Ptr("Ready"), // StorageSizeInGB: to.Ptr[int32](1024), // SubnetID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/subnet2"), // VCores: to.Ptr[int32](16), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("BC_Gen5"), // Capacity: to.Ptr[int32](16), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("BusinessCritical"), // }, // }}, // } } }
Output:
func (*ManagedInstancesClient) NewListPager ¶ added in v0.5.0
func (client *ManagedInstancesClient) NewListPager(options *ManagedInstancesClientListOptions) *runtime.Pager[ManagedInstancesClientListResponse]
NewListPager - Gets a list of all managed instances in the subscription.
Generated from API version 2021-05-01-preview
- options - ManagedInstancesClientListOptions contains the optional parameters for the ManagedInstancesClient.NewListPager method.
Example (ListManagedInstances) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedInstancesClient().NewListPager(&armsql.ManagedInstancesClientListOptions{Expand: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedInstanceListResult = armsql.ManagedInstanceListResult{ // Value: []*armsql.ManagedInstance{ // { // Name: to.Ptr("testinstance1"), // Type: to.Ptr("Microsoft.Sql/managedInstances"), // ID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance1"), // Location: to.Ptr("japaneast"), // Properties: &armsql.ManagedInstanceProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // DNSZone: to.Ptr("1b4e2caff2530"), // FullyQualifiedDomainName: to.Ptr("testinstance1.1b4e2caff2530.database.windows.net"), // LicenseType: to.Ptr(armsql.ManagedInstanceLicenseTypeLicenseIncluded), // MaintenanceConfigurationID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1"), // MinimalTLSVersion: to.Ptr("1.2"), // ProvisioningState: to.Ptr(armsql.ManagedInstancePropertiesProvisioningStateSucceeded), // ProxyOverride: to.Ptr(armsql.ManagedInstanceProxyOverrideDefault), // PublicDataEndpointEnabled: to.Ptr(false), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // State: to.Ptr("Ready"), // StorageSizeInGB: to.Ptr[int32](1024), // SubnetID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // VCores: to.Ptr[int32](8), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen4"), // Capacity: to.Ptr[int32](8), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("GeneralPurpose"), // }, // }, // { // Name: to.Ptr("testinstance2"), // Type: to.Ptr("Microsoft.Sql/managedInstances"), // ID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance2"), // Location: to.Ptr("japaneast"), // Properties: &armsql.ManagedInstanceProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // DNSZone: to.Ptr("2c3d1bdae3412"), // FullyQualifiedDomainName: to.Ptr("testinstance2.2c3d1bdae3412.database.windows.net"), // LicenseType: to.Ptr(armsql.ManagedInstanceLicenseType("Full")), // MaintenanceConfigurationID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1"), // MinimalTLSVersion: to.Ptr("1.2"), // ProvisioningState: to.Ptr(armsql.ManagedInstancePropertiesProvisioningStateSucceeded), // ProxyOverride: to.Ptr(armsql.ManagedInstanceProxyOverrideDefault), // PublicDataEndpointEnabled: to.Ptr(false), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // State: to.Ptr("Ready"), // StorageSizeInGB: to.Ptr[int32](1024), // SubnetID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/subnet2"), // VCores: to.Ptr[int32](16), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("BC_Gen5"), // Capacity: to.Ptr[int32](16), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("BusinessCritical"), // }, // }}, // } } }
Output:
Example (ListManagedInstancesWithExpandAdministratorsActivedirectory) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceListWithExpandEqualsAdministrators.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedInstancesClient().NewListPager(&armsql.ManagedInstancesClientListOptions{Expand: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedInstanceListResult = armsql.ManagedInstanceListResult{ // Value: []*armsql.ManagedInstance{ // { // Name: to.Ptr("testinstance1"), // Type: to.Ptr("Microsoft.Sql/managedInstances"), // ID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance1"), // Location: to.Ptr("japaneast"), // Properties: &armsql.ManagedInstanceProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // Administrators: &armsql.ManagedInstanceExternalAdministrator{ // AzureADOnlyAuthentication: to.Ptr(true), // Login: to.Ptr("bob@contoso.com"), // PrincipalType: to.Ptr(armsql.PrincipalTypeUser), // Sid: to.Ptr("00000011-1111-2222-2222-123456789111"), // TenantID: to.Ptr("00000011-1111-2222-2222-123456789111"), // }, // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // DNSZone: to.Ptr("1b4e2caff2530"), // FullyQualifiedDomainName: to.Ptr("testinstance1.1b4e2caff2530.database.windows.net"), // LicenseType: to.Ptr(armsql.ManagedInstanceLicenseTypeLicenseIncluded), // MaintenanceConfigurationID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1"), // MinimalTLSVersion: to.Ptr("1.2"), // ProvisioningState: to.Ptr(armsql.ManagedInstancePropertiesProvisioningStateSucceeded), // ProxyOverride: to.Ptr(armsql.ManagedInstanceProxyOverrideDefault), // PublicDataEndpointEnabled: to.Ptr(false), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // State: to.Ptr("Ready"), // StorageSizeInGB: to.Ptr[int32](1024), // SubnetID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // VCores: to.Ptr[int32](8), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen4"), // Capacity: to.Ptr[int32](8), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("GeneralPurpose"), // }, // }, // { // Name: to.Ptr("testinstance2"), // Type: to.Ptr("Microsoft.Sql/managedInstances"), // ID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/Test1/providers/Microsoft.Sql/managedInstances/testinstance2"), // Location: to.Ptr("japaneast"), // Properties: &armsql.ManagedInstanceProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // Administrators: &armsql.ManagedInstanceExternalAdministrator{ // AzureADOnlyAuthentication: to.Ptr(true), // Login: to.Ptr("bob@contoso.com"), // PrincipalType: to.Ptr(armsql.PrincipalTypeUser), // Sid: to.Ptr("00000011-1111-2222-2222-123456789111"), // TenantID: to.Ptr("00000011-1111-2222-2222-123456789111"), // }, // Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // DNSZone: to.Ptr("2c3d1bdae3412"), // FullyQualifiedDomainName: to.Ptr("testinstance2.2c3d1bdae3412.database.windows.net"), // LicenseType: to.Ptr(armsql.ManagedInstanceLicenseType("Full")), // MaintenanceConfigurationID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_2"), // MinimalTLSVersion: to.Ptr("1.2"), // ProvisioningState: to.Ptr(armsql.ManagedInstancePropertiesProvisioningStateSucceeded), // ProxyOverride: to.Ptr(armsql.ManagedInstanceProxyOverrideDefault), // PublicDataEndpointEnabled: to.Ptr(false), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // State: to.Ptr("Ready"), // StorageSizeInGB: to.Ptr[int32](1024), // SubnetID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/subnet2"), // VCores: to.Ptr[int32](16), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("BC_Gen5"), // Capacity: to.Ptr[int32](16), // Family: to.Ptr("Gen4"), // Tier: to.Ptr("BusinessCritical"), // }, // }}, // } } }
Output:
type ManagedInstancesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedInstancesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstancesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstancesClient.BeginCreateOrUpdate method.
type ManagedInstancesClientBeginDeleteOptions ¶ added in v0.3.0
type ManagedInstancesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstancesClientBeginDeleteOptions contains the optional parameters for the ManagedInstancesClient.BeginDelete method.
type ManagedInstancesClientBeginFailoverOptions ¶ added in v0.3.0
type ManagedInstancesClientBeginFailoverOptions struct { // The type of replica to be failed over. ReplicaType *ReplicaType // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstancesClientBeginFailoverOptions contains the optional parameters for the ManagedInstancesClient.BeginFailover method.
type ManagedInstancesClientBeginUpdateOptions ¶ added in v0.3.0
type ManagedInstancesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstancesClientBeginUpdateOptions contains the optional parameters for the ManagedInstancesClient.BeginUpdate method.
type ManagedInstancesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedInstancesClientCreateOrUpdateResponse struct { // An Azure SQL managed instance. ManagedInstance }
ManagedInstancesClientCreateOrUpdateResponse contains the response from method ManagedInstancesClient.BeginCreateOrUpdate.
type ManagedInstancesClientDeleteResponse ¶ added in v0.3.0
type ManagedInstancesClientDeleteResponse struct { }
ManagedInstancesClientDeleteResponse contains the response from method ManagedInstancesClient.BeginDelete.
type ManagedInstancesClientFailoverResponse ¶ added in v0.3.0
type ManagedInstancesClientFailoverResponse struct { }
ManagedInstancesClientFailoverResponse contains the response from method ManagedInstancesClient.BeginFailover.
type ManagedInstancesClientGetOptions ¶ added in v0.3.0
type ManagedInstancesClientGetOptions struct { // The child resources to include in the response. Expand *string }
ManagedInstancesClientGetOptions contains the optional parameters for the ManagedInstancesClient.Get method.
type ManagedInstancesClientGetResponse ¶ added in v0.3.0
type ManagedInstancesClientGetResponse struct { // An Azure SQL managed instance. ManagedInstance }
ManagedInstancesClientGetResponse contains the response from method ManagedInstancesClient.Get.
type ManagedInstancesClientListByInstancePoolOptions ¶ added in v0.3.0
type ManagedInstancesClientListByInstancePoolOptions struct { // The child resources to include in the response. Expand *string }
ManagedInstancesClientListByInstancePoolOptions contains the optional parameters for the ManagedInstancesClient.NewListByInstancePoolPager method.
type ManagedInstancesClientListByInstancePoolResponse ¶ added in v0.3.0
type ManagedInstancesClientListByInstancePoolResponse struct { // A list of managed instances. ManagedInstanceListResult }
ManagedInstancesClientListByInstancePoolResponse contains the response from method ManagedInstancesClient.NewListByInstancePoolPager.
type ManagedInstancesClientListByManagedInstanceOptions ¶ added in v0.3.0
type ManagedInstancesClientListByManagedInstanceOptions struct { // Aggregation function to be used, default value is 'sum' AggregationFunction *AggregationFunctionType // Comma separated list of databases to be included into search. All DB's are included if this parameter is not specified. Databases *string // End time for observed period. EndTime *string // The time step to be used to summarize the metric values. Default value is PT1H Interval *QueryTimeGrainType // How many 'top queries' to return. Default is 5. NumberOfQueries *int32 // Metric to be used for ranking top queries. Default is 'cpu' ObservationMetric *MetricType // Start time for observed period. StartTime *string }
ManagedInstancesClientListByManagedInstanceOptions contains the optional parameters for the ManagedInstancesClient.NewListByManagedInstancePager method.
type ManagedInstancesClientListByManagedInstanceResponse ¶ added in v0.3.0
type ManagedInstancesClientListByManagedInstanceResponse struct { // A list of top resource consuming queries on managed instance TopQueriesListResult }
ManagedInstancesClientListByManagedInstanceResponse contains the response from method ManagedInstancesClient.NewListByManagedInstancePager.
type ManagedInstancesClientListByResourceGroupOptions ¶ added in v0.3.0
type ManagedInstancesClientListByResourceGroupOptions struct { // The child resources to include in the response. Expand *string }
ManagedInstancesClientListByResourceGroupOptions contains the optional parameters for the ManagedInstancesClient.NewListByResourceGroupPager method.
type ManagedInstancesClientListByResourceGroupResponse ¶ added in v0.3.0
type ManagedInstancesClientListByResourceGroupResponse struct { // A list of managed instances. ManagedInstanceListResult }
ManagedInstancesClientListByResourceGroupResponse contains the response from method ManagedInstancesClient.NewListByResourceGroupPager.
type ManagedInstancesClientListOptions ¶ added in v0.3.0
type ManagedInstancesClientListOptions struct { // The child resources to include in the response. Expand *string }
ManagedInstancesClientListOptions contains the optional parameters for the ManagedInstancesClient.NewListPager method.
type ManagedInstancesClientListResponse ¶ added in v0.3.0
type ManagedInstancesClientListResponse struct { // A list of managed instances. ManagedInstanceListResult }
ManagedInstancesClientListResponse contains the response from method ManagedInstancesClient.NewListPager.
type ManagedInstancesClientUpdateResponse ¶ added in v0.3.0
type ManagedInstancesClientUpdateResponse struct { // An Azure SQL managed instance. ManagedInstance }
ManagedInstancesClientUpdateResponse contains the response from method ManagedInstancesClient.BeginUpdate.
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient ¶
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient struct {
// contains filtered or unexported fields
}
ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient contains the methods for the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies group. Don't use this type directly, use NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient() instead.
func NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient ¶
func NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient, error)
NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient creates a new instance of ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) BeginCreateOrUpdate ¶
func (client *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, restorableDroppedDatabaseID string, policyName ManagedShortTermRetentionPolicyName, parameters ManagedBackupShortTermRetentionPolicy, options *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Sets a database's short term retention policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- policyName - The policy name. Should always be "default".
- parameters - The short term retention policy info.
- options - ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/UpdateManagedShortTermRetentionPolicyRestorableDropped.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient().BeginCreateOrUpdate(ctx, "resourceGroup", "testsvr", "testdb,131403269876900000", armsql.ManagedShortTermRetentionPolicyNameDefault, armsql.ManagedBackupShortTermRetentionPolicy{ Properties: &armsql.ManagedBackupShortTermRetentionPolicyProperties{ RetentionDays: to.Ptr[int32](14), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedBackupShortTermRetentionPolicy = armsql.ManagedBackupShortTermRetentionPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/restorableDroppedDatabases/backupShortTermRetentionPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup/providers/Microsoft.Sql/managedInstances/testsvr/restorableDroppedDatabases/testdb,131403269876900000/backupShortTermRetentionPolicies/default"), // Properties: &armsql.ManagedBackupShortTermRetentionPolicyProperties{ // RetentionDays: to.Ptr[int32](14), // }, // } }
Output:
func (*ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) BeginUpdate ¶
func (client *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) BeginUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, restorableDroppedDatabaseID string, policyName ManagedShortTermRetentionPolicyName, parameters ManagedBackupShortTermRetentionPolicy, options *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginUpdateOptions) (*runtime.Poller[ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientUpdateResponse], error)
BeginUpdate - Sets a database's short term retention policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- policyName - The policy name. Should always be "default".
- parameters - The short term retention policy info.
- options - ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginUpdateOptions contains the optional parameters for the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.BeginUpdate method.
func (*ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) Get ¶
func (client *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, restorableDroppedDatabaseID string, policyName ManagedShortTermRetentionPolicyName, options *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetOptions) (ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetResponse, error)
Get - Gets a dropped database's short term retention policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- policyName - The policy name.
- options - ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetOptions contains the optional parameters for the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetManagedShortTermRetentionPolicyRestorableDropped.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient().Get(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb,131403269876900000", armsql.ManagedShortTermRetentionPolicyNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedBackupShortTermRetentionPolicy = armsql.ManagedBackupShortTermRetentionPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/restorableDroppedDatabases/backupShortTermRetentionPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstance/testsvr/restorableDroppedDatabases/testdb,131403269876900000/backupShortTermRetentionPolicies/default"), // Properties: &armsql.ManagedBackupShortTermRetentionPolicyProperties{ // RetentionDays: to.Ptr[int32](14), // }, // } }
Output:
func (*ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) NewListByRestorableDroppedDatabasePager ¶ added in v0.5.0
func (client *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) NewListByRestorableDroppedDatabasePager(resourceGroupName string, managedInstanceName string, restorableDroppedDatabaseID string, options *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseOptions) *runtime.Pager[ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseResponse]
NewListByRestorableDroppedDatabasePager - Gets a dropped database's short term retention policy list.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseOptions contains the optional parameters for the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.NewListByRestorableDroppedDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetListManagedShortTermRetentionPolicyRestorableDropped.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient().NewListByRestorableDroppedDatabasePager("Default-SQL-SouthEastAsia", "testsvr", "testdb,131403269876900000", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedBackupShortTermRetentionPolicyListResult = armsql.ManagedBackupShortTermRetentionPolicyListResult{ // Value: []*armsql.ManagedBackupShortTermRetentionPolicy{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/restorableDroppedDatabases/backupShortTermRetentionPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/restorableDroppedDatabases/testdb,131403269876900000/backupShortTermRetentionPolicies/default"), // Properties: &armsql.ManagedBackupShortTermRetentionPolicyProperties{ // RetentionDays: to.Ptr[int32](14), // }, // }, // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/restorableDroppedDatabases/backupShortTermRetentionPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/restorableDroppedDatabases/testdb,131403269876900000/backupShortTermRetentionPolicies/default"), // Properties: &armsql.ManagedBackupShortTermRetentionPolicyProperties{ // RetentionDays: to.Ptr[int32](14), // }, // }}, // } } }
Output:
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate method.
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginUpdateOptions ¶ added in v0.3.0
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginUpdateOptions contains the optional parameters for the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.BeginUpdate method.
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse struct { // A short term retention policy. ManagedBackupShortTermRetentionPolicy }
ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse contains the response from method ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate.
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetOptions ¶ added in v0.3.0
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetOptions struct { }
ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetOptions contains the optional parameters for the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.Get method.
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetResponse ¶ added in v0.3.0
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetResponse struct { // A short term retention policy. ManagedBackupShortTermRetentionPolicy }
ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetResponse contains the response from method ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.Get.
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseOptions ¶ added in v0.3.0
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseOptions struct { }
ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseOptions contains the optional parameters for the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.NewListByRestorableDroppedDatabasePager method.
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseResponse ¶ added in v0.3.0
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseResponse struct { // A list of short term retention policies. ManagedBackupShortTermRetentionPolicyListResult }
ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseResponse contains the response from method ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.NewListByRestorableDroppedDatabasePager.
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientUpdateResponse ¶ added in v0.3.0
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientUpdateResponse struct { // A short term retention policy. ManagedBackupShortTermRetentionPolicy }
ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientUpdateResponse contains the response from method ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.BeginUpdate.
type ManagedServerCreateMode ¶
type ManagedServerCreateMode string
ManagedServerCreateMode - Specifies the mode of database creation. Default: Regular instance creation. Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified.
const ( ManagedServerCreateModeDefault ManagedServerCreateMode = "Default" ManagedServerCreateModePointInTimeRestore ManagedServerCreateMode = "PointInTimeRestore" )
func PossibleManagedServerCreateModeValues ¶
func PossibleManagedServerCreateModeValues() []ManagedServerCreateMode
PossibleManagedServerCreateModeValues returns the possible values for the ManagedServerCreateMode const type.
type ManagedServerSecurityAlertPoliciesClient ¶
type ManagedServerSecurityAlertPoliciesClient struct {
// contains filtered or unexported fields
}
ManagedServerSecurityAlertPoliciesClient contains the methods for the ManagedServerSecurityAlertPolicies group. Don't use this type directly, use NewManagedServerSecurityAlertPoliciesClient() instead.
func NewManagedServerSecurityAlertPoliciesClient ¶
func NewManagedServerSecurityAlertPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedServerSecurityAlertPoliciesClient, error)
NewManagedServerSecurityAlertPoliciesClient creates a new instance of ManagedServerSecurityAlertPoliciesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedServerSecurityAlertPoliciesClient) BeginCreateOrUpdate ¶
func (client *ManagedServerSecurityAlertPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, securityAlertPolicyName SecurityAlertPolicyName, parameters ManagedServerSecurityAlertPolicy, options *ManagedServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedServerSecurityAlertPoliciesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a threat detection policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- securityAlertPolicyName - The name of the security alert policy.
- parameters - The managed server security alert policy.
- options - ManagedServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedServerSecurityAlertPoliciesClient.BeginCreateOrUpdate method.
Example (UpdateAManagedServersThreatDetectionPolicyWithAllParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedServerSecurityAlertCreateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedServerSecurityAlertPoliciesClient().BeginCreateOrUpdate(ctx, "securityalert-4799", "securityalert-6440", armsql.SecurityAlertPolicyNameDefault, armsql.ManagedServerSecurityAlertPolicy{ Properties: &armsql.SecurityAlertsPolicyProperties{ DisabledAlerts: []*string{ to.Ptr("Access_Anomaly"), to.Ptr("Usage_Anomaly")}, EmailAccountAdmins: to.Ptr(true), EmailAddresses: []*string{ to.Ptr("testSecurityAlert@microsoft.com")}, RetentionDays: to.Ptr[int32](5), State: to.Ptr(armsql.SecurityAlertsPolicyStateEnabled), StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedServerSecurityAlertPolicy = armsql.ManagedServerSecurityAlertPolicy{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/securityAlertPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/managedInstances/securityalert-6440"), // Properties: &armsql.SecurityAlertsPolicyProperties{ // DisabledAlerts: []*string{ // to.Ptr("Access_Anomaly"), // to.Ptr("Usage_Anomaly")}, // EmailAccountAdmins: to.Ptr(true), // EmailAddresses: []*string{ // to.Ptr("testSecurityAlert@microsoft.com")}, // RetentionDays: to.Ptr[int32](5), // State: to.Ptr(armsql.SecurityAlertsPolicyStateEnabled), // StorageAccountAccessKey: to.Ptr(""), // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), // }, // SystemData: &armsql.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armsql.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armsql.CreatedByTypeUser), // }, // } }
Output:
Example (UpdateAManagedServersThreatDetectionPolicyWithMinimalParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedServerSecurityAlertCreateMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedServerSecurityAlertPoliciesClient().BeginCreateOrUpdate(ctx, "securityalert-4799", "securityalert-6440", armsql.SecurityAlertPolicyNameDefault, armsql.ManagedServerSecurityAlertPolicy{ Properties: &armsql.SecurityAlertsPolicyProperties{ State: to.Ptr(armsql.SecurityAlertsPolicyStateEnabled), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedServerSecurityAlertPolicy = armsql.ManagedServerSecurityAlertPolicy{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/securityAlertPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/managedInstances/securityalert-6440"), // Properties: &armsql.SecurityAlertsPolicyProperties{ // DisabledAlerts: []*string{ // }, // EmailAccountAdmins: to.Ptr(true), // EmailAddresses: []*string{ // }, // RetentionDays: to.Ptr[int32](0), // State: to.Ptr(armsql.SecurityAlertsPolicyStateEnabled), // StorageAccountAccessKey: to.Ptr(""), // StorageEndpoint: to.Ptr(""), // }, // SystemData: &armsql.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armsql.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armsql.CreatedByTypeUser), // }, // } }
Output:
func (*ManagedServerSecurityAlertPoliciesClient) Get ¶
func (client *ManagedServerSecurityAlertPoliciesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, securityAlertPolicyName SecurityAlertPolicyName, options *ManagedServerSecurityAlertPoliciesClientGetOptions) (ManagedServerSecurityAlertPoliciesClientGetResponse, error)
Get - Get a managed server's threat detection policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- securityAlertPolicyName - The name of the security alert policy.
- options - ManagedServerSecurityAlertPoliciesClientGetOptions contains the optional parameters for the ManagedServerSecurityAlertPoliciesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedServerSecurityAlertGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedServerSecurityAlertPoliciesClient().Get(ctx, "securityalert-4799", "securityalert-6440", armsql.SecurityAlertPolicyNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedServerSecurityAlertPolicy = armsql.ManagedServerSecurityAlertPolicy{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/securityAlertPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/managedInstances/securityalert-6440"), // Properties: &armsql.SecurityAlertsPolicyProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // DisabledAlerts: []*string{ // to.Ptr("Access_Anomaly")}, // EmailAccountAdmins: to.Ptr(true), // EmailAddresses: []*string{ // to.Ptr("test@consoto.com;user@consoto.com")}, // RetentionDays: to.Ptr[int32](0), // State: to.Ptr(armsql.SecurityAlertsPolicyStateDisabled), // StorageAccountAccessKey: to.Ptr(""), // StorageEndpoint: to.Ptr(""), // }, // SystemData: &armsql.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armsql.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armsql.CreatedByTypeUser), // }, // } }
Output:
func (*ManagedServerSecurityAlertPoliciesClient) NewListByInstancePager ¶ added in v0.5.0
func (client *ManagedServerSecurityAlertPoliciesClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedServerSecurityAlertPoliciesClientListByInstanceOptions) *runtime.Pager[ManagedServerSecurityAlertPoliciesClientListByInstanceResponse]
NewListByInstancePager - Get the managed server's threat detection policies.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - ManagedServerSecurityAlertPoliciesClientListByInstanceOptions contains the optional parameters for the ManagedServerSecurityAlertPoliciesClient.NewListByInstancePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedServerSecurityAlertListByInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedServerSecurityAlertPoliciesClient().NewListByInstancePager("securityalert-4799", "securityalert-6440", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ManagedServerSecurityAlertPolicyListResult = armsql.ManagedServerSecurityAlertPolicyListResult{ // Value: []*armsql.ManagedServerSecurityAlertPolicy{ // { // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/securityAlertPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/managedInstances/securityalert-6440"), // Properties: &armsql.SecurityAlertsPolicyProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // DisabledAlerts: []*string{ // to.Ptr("Access_Anomaly")}, // EmailAccountAdmins: to.Ptr(true), // EmailAddresses: []*string{ // to.Ptr("test@consoto.com;user@consoto.com")}, // RetentionDays: to.Ptr[int32](0), // State: to.Ptr(armsql.SecurityAlertsPolicyStateDisabled), // StorageAccountAccessKey: to.Ptr(""), // StorageEndpoint: to.Ptr(""), // }, // SystemData: &armsql.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armsql.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armsql.CreatedByTypeUser), // }, // }}, // } } }
Output:
type ManagedServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedServerSecurityAlertPoliciesClient.BeginCreateOrUpdate method.
type ManagedServerSecurityAlertPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedServerSecurityAlertPoliciesClientCreateOrUpdateResponse struct { // A managed server security alert policy. ManagedServerSecurityAlertPolicy }
ManagedServerSecurityAlertPoliciesClientCreateOrUpdateResponse contains the response from method ManagedServerSecurityAlertPoliciesClient.BeginCreateOrUpdate.
type ManagedServerSecurityAlertPoliciesClientGetOptions ¶ added in v0.3.0
type ManagedServerSecurityAlertPoliciesClientGetOptions struct { }
ManagedServerSecurityAlertPoliciesClientGetOptions contains the optional parameters for the ManagedServerSecurityAlertPoliciesClient.Get method.
type ManagedServerSecurityAlertPoliciesClientGetResponse ¶ added in v0.3.0
type ManagedServerSecurityAlertPoliciesClientGetResponse struct { // A managed server security alert policy. ManagedServerSecurityAlertPolicy }
ManagedServerSecurityAlertPoliciesClientGetResponse contains the response from method ManagedServerSecurityAlertPoliciesClient.Get.
type ManagedServerSecurityAlertPoliciesClientListByInstanceOptions ¶ added in v0.3.0
type ManagedServerSecurityAlertPoliciesClientListByInstanceOptions struct { }
ManagedServerSecurityAlertPoliciesClientListByInstanceOptions contains the optional parameters for the ManagedServerSecurityAlertPoliciesClient.NewListByInstancePager method.
type ManagedServerSecurityAlertPoliciesClientListByInstanceResponse ¶ added in v0.3.0
type ManagedServerSecurityAlertPoliciesClientListByInstanceResponse struct { // A list of the managed Server's security alert policies. ManagedServerSecurityAlertPolicyListResult }
ManagedServerSecurityAlertPoliciesClientListByInstanceResponse contains the response from method ManagedServerSecurityAlertPoliciesClient.NewListByInstancePager.
type ManagedServerSecurityAlertPolicy ¶
type ManagedServerSecurityAlertPolicy struct { // Resource properties. Properties *SecurityAlertsPolicyProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; SystemData of SecurityAlertPolicyResource. SystemData *SystemData // READ-ONLY; Resource type. Type *string }
ManagedServerSecurityAlertPolicy - A managed server security alert policy.
func (ManagedServerSecurityAlertPolicy) MarshalJSON ¶
func (m ManagedServerSecurityAlertPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedServerSecurityAlertPolicy.
func (*ManagedServerSecurityAlertPolicy) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedServerSecurityAlertPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServerSecurityAlertPolicy.
type ManagedServerSecurityAlertPolicyListResult ¶
type ManagedServerSecurityAlertPolicyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ManagedServerSecurityAlertPolicy }
ManagedServerSecurityAlertPolicyListResult - A list of the managed Server's security alert policies.
func (ManagedServerSecurityAlertPolicyListResult) MarshalJSON ¶
func (m ManagedServerSecurityAlertPolicyListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedServerSecurityAlertPolicyListResult.
func (*ManagedServerSecurityAlertPolicyListResult) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedServerSecurityAlertPolicyListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServerSecurityAlertPolicyListResult.
type ManagedShortTermRetentionPolicyName ¶
type ManagedShortTermRetentionPolicyName string
const (
ManagedShortTermRetentionPolicyNameDefault ManagedShortTermRetentionPolicyName = "default"
)
func PossibleManagedShortTermRetentionPolicyNameValues ¶
func PossibleManagedShortTermRetentionPolicyNameValues() []ManagedShortTermRetentionPolicyName
PossibleManagedShortTermRetentionPolicyNameValues returns the possible values for the ManagedShortTermRetentionPolicyName const type.
type ManagedTransparentDataEncryption ¶
type ManagedTransparentDataEncryption struct { // Resource properties. Properties *ManagedTransparentDataEncryptionProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ManagedTransparentDataEncryption - A managed database transparent data encryption state.
func (ManagedTransparentDataEncryption) MarshalJSON ¶
func (m ManagedTransparentDataEncryption) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedTransparentDataEncryption.
func (*ManagedTransparentDataEncryption) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedTransparentDataEncryption) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedTransparentDataEncryption.
type ManagedTransparentDataEncryptionListResult ¶
type ManagedTransparentDataEncryptionListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ManagedTransparentDataEncryption }
ManagedTransparentDataEncryptionListResult - A list of managed transparent data encryptions
func (ManagedTransparentDataEncryptionListResult) MarshalJSON ¶
func (m ManagedTransparentDataEncryptionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedTransparentDataEncryptionListResult.
func (*ManagedTransparentDataEncryptionListResult) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedTransparentDataEncryptionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedTransparentDataEncryptionListResult.
type ManagedTransparentDataEncryptionProperties ¶
type ManagedTransparentDataEncryptionProperties struct { // REQUIRED; Specifies the state of the transparent data encryption. State *TransparentDataEncryptionState }
ManagedTransparentDataEncryptionProperties - Properties of a transparent data encryption.
func (ManagedTransparentDataEncryptionProperties) MarshalJSON ¶ added in v1.1.0
func (m ManagedTransparentDataEncryptionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedTransparentDataEncryptionProperties.
func (*ManagedTransparentDataEncryptionProperties) UnmarshalJSON ¶ added in v1.1.0
func (m *ManagedTransparentDataEncryptionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedTransparentDataEncryptionProperties.
type ManagementOperationState ¶
type ManagementOperationState string
ManagementOperationState - The operation state.
const ( ManagementOperationStateCancelInProgress ManagementOperationState = "CancelInProgress" ManagementOperationStateCancelled ManagementOperationState = "Cancelled" ManagementOperationStateFailed ManagementOperationState = "Failed" ManagementOperationStateInProgress ManagementOperationState = "InProgress" ManagementOperationStatePending ManagementOperationState = "Pending" ManagementOperationStateSucceeded ManagementOperationState = "Succeeded" )
func PossibleManagementOperationStateValues ¶
func PossibleManagementOperationStateValues() []ManagementOperationState
PossibleManagementOperationStateValues returns the possible values for the ManagementOperationState const type.
type MaxSizeCapability ¶
type MaxSizeCapability struct { // READ-ONLY; The maximum size limit (see 'unit' for the units). Limit *int32 // READ-ONLY; The units that the limit is expressed in. Unit *MaxSizeUnit }
MaxSizeCapability - The maximum size capability.
func (MaxSizeCapability) MarshalJSON ¶ added in v1.1.0
func (m MaxSizeCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MaxSizeCapability.
func (*MaxSizeCapability) UnmarshalJSON ¶ added in v1.1.0
func (m *MaxSizeCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MaxSizeCapability.
type MaxSizeRangeCapability ¶
type MaxSizeRangeCapability struct { // The reason for the capability not being available. Reason *string // READ-ONLY; Size of transaction log. LogSize *LogSizeCapability // READ-ONLY; Maximum value. MaxValue *MaxSizeCapability // READ-ONLY; Minimum value. MinValue *MaxSizeCapability // READ-ONLY; Scale/step size for discrete values between the minimum value and the maximum value. ScaleSize *MaxSizeCapability // READ-ONLY; The status of the capability. Status *CapabilityStatus }
MaxSizeRangeCapability - The maximum size range capability.
func (MaxSizeRangeCapability) MarshalJSON ¶ added in v1.1.0
func (m MaxSizeRangeCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MaxSizeRangeCapability.
func (*MaxSizeRangeCapability) UnmarshalJSON ¶ added in v1.1.0
func (m *MaxSizeRangeCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MaxSizeRangeCapability.
type MaxSizeUnit ¶
type MaxSizeUnit string
MaxSizeUnit - The units that the limit is expressed in.
const ( MaxSizeUnitGigabytes MaxSizeUnit = "Gigabytes" MaxSizeUnitMegabytes MaxSizeUnit = "Megabytes" MaxSizeUnitPetabytes MaxSizeUnit = "Petabytes" MaxSizeUnitTerabytes MaxSizeUnit = "Terabytes" )
func PossibleMaxSizeUnitValues ¶
func PossibleMaxSizeUnitValues() []MaxSizeUnit
PossibleMaxSizeUnitValues returns the possible values for the MaxSizeUnit const type.
type Metric ¶
type Metric struct { // READ-ONLY; The end time for the metric (ISO-8601 format). EndTime *time.Time // READ-ONLY; The metric values for the specified time window and timestep. MetricValues []*MetricValue // READ-ONLY; The name information for the metric. Name *MetricName // READ-ONLY; The start time for the metric (ISO-8601 format). StartTime *time.Time // READ-ONLY; The time step to be used to summarize the metric values. TimeGrain *string // READ-ONLY; The unit of the metric. Unit *UnitType }
Metric - Database metrics.
func (Metric) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Metric.
func (*Metric) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Metric.
type MetricAvailability ¶
type MetricAvailability struct { // READ-ONLY; The length of retention for the database metric. Retention *string // READ-ONLY; The granularity of the database metric. TimeGrain *string }
MetricAvailability - A metric availability value.
func (MetricAvailability) MarshalJSON ¶ added in v1.1.0
func (m MetricAvailability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MetricAvailability.
func (*MetricAvailability) UnmarshalJSON ¶ added in v1.1.0
func (m *MetricAvailability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MetricAvailability.
type MetricDefinition ¶
type MetricDefinition struct { // READ-ONLY; The list of database metric availabilities for the metric. MetricAvailabilities []*MetricAvailability // READ-ONLY; The name information for the metric. Name *MetricName // READ-ONLY; The primary aggregation type defining how metric values are displayed. PrimaryAggregationType *PrimaryAggregationType // READ-ONLY; The resource uri of the database. ResourceURI *string // READ-ONLY; The unit of the metric. Unit *UnitDefinitionType }
MetricDefinition - A database metric definition.
func (MetricDefinition) MarshalJSON ¶
func (m MetricDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MetricDefinition.
func (*MetricDefinition) UnmarshalJSON ¶ added in v1.1.0
func (m *MetricDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MetricDefinition.
type MetricDefinitionListResult ¶
type MetricDefinitionListResult struct { // REQUIRED; The list of metric definitions for the database. Value []*MetricDefinition }
MetricDefinitionListResult - The response to a list database metric definitions request.
func (MetricDefinitionListResult) MarshalJSON ¶
func (m MetricDefinitionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MetricDefinitionListResult.
func (*MetricDefinitionListResult) UnmarshalJSON ¶ added in v1.1.0
func (m *MetricDefinitionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MetricDefinitionListResult.
type MetricListResult ¶
type MetricListResult struct { // REQUIRED; The list of metrics for the database. Value []*Metric }
MetricListResult - The response to a list database metrics request.
func (MetricListResult) MarshalJSON ¶
func (m MetricListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MetricListResult.
func (*MetricListResult) UnmarshalJSON ¶ added in v1.1.0
func (m *MetricListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MetricListResult.
type MetricName ¶
type MetricName struct { // READ-ONLY; The friendly name of the database metric. LocalizedValue *string // READ-ONLY; The name of the database metric. Value *string }
MetricName - A database metric name.
func (MetricName) MarshalJSON ¶ added in v1.1.0
func (m MetricName) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MetricName.
func (*MetricName) UnmarshalJSON ¶ added in v1.1.0
func (m *MetricName) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MetricName.
type MetricType ¶
type MetricType string
const ( MetricTypeCPU MetricType = "cpu" MetricTypeDtu MetricType = "dtu" MetricTypeDuration MetricType = "duration" MetricTypeIo MetricType = "io" MetricTypeLogIo MetricType = "logIo" )
func PossibleMetricTypeValues ¶
func PossibleMetricTypeValues() []MetricType
PossibleMetricTypeValues returns the possible values for the MetricType const type.
type MetricValue ¶
type MetricValue struct { // READ-ONLY; The average value of the metric. Average *float64 // READ-ONLY; The number of values for the metric. Count *int32 // READ-ONLY; The max value of the metric. Maximum *float64 // READ-ONLY; The min value of the metric. Minimum *float64 // READ-ONLY; The metric timestamp (ISO-8601 format). Timestamp *time.Time // READ-ONLY; The total value of the metric. Total *float64 }
MetricValue - Represents database metrics.
func (MetricValue) MarshalJSON ¶
func (m MetricValue) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MetricValue.
func (*MetricValue) UnmarshalJSON ¶
func (m *MetricValue) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MetricValue.
type MinCapacityCapability ¶
type MinCapacityCapability struct { // The reason for the capability not being available. Reason *string // READ-ONLY; The status of the capability. Status *CapabilityStatus // READ-ONLY; Min capacity value Value *float64 }
MinCapacityCapability - The min capacity capability
func (MinCapacityCapability) MarshalJSON ¶ added in v1.1.0
func (m MinCapacityCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MinCapacityCapability.
func (*MinCapacityCapability) UnmarshalJSON ¶ added in v1.1.0
func (m *MinCapacityCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MinCapacityCapability.
type Name ¶
type Name struct { // Usage name localized value. LocalizedValue *string // Usage name value Value *string }
Name - ARM Usage Name
func (Name) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type Name.
func (*Name) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Name.
type NetworkIsolationSettings ¶
type NetworkIsolationSettings struct { // The resource id for the SQL server which is the target of this request. If set, private endpoint connection will be created // for the SQL server. Must match server which is target of the operation. SQLServerResourceID *string // The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created // for the storage account. Must match storage account used for StorageUri // parameter. StorageAccountResourceID *string }
NetworkIsolationSettings - Contains the ARM resources for which to create private endpoint connection.
func (NetworkIsolationSettings) MarshalJSON ¶ added in v1.1.0
func (n NetworkIsolationSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkIsolationSettings.
func (*NetworkIsolationSettings) UnmarshalJSON ¶ added in v1.1.0
func (n *NetworkIsolationSettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type NetworkIsolationSettings.
type Operation ¶
type Operation struct { // READ-ONLY; The localized display information for this particular operation / action. Display *OperationDisplay // READ-ONLY; The name of the operation being performed on this particular object. Name *string // READ-ONLY; The intended executor of the operation. Origin *OperationOrigin // READ-ONLY; Additional descriptions for the operation. Properties map[string]any }
Operation - SQL REST API operation definition.
func (Operation) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Operation.
type OperationDisplay ¶
type OperationDisplay struct { // READ-ONLY; The localized friendly description for the operation. Description *string // READ-ONLY; The localized friendly name for the operation. Operation *string // READ-ONLY; The localized friendly form of the resource provider name. Provider *string // READ-ONLY; The localized friendly form of the resource type related to this action/operation. Resource *string }
OperationDisplay - Display metadata associated with the operation.
func (OperationDisplay) MarshalJSON ¶ added in v1.1.0
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶ added in v1.1.0
func (o *OperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.
type OperationImpact ¶
type OperationImpact struct { // READ-ONLY; The absolute impact to dimension. ChangeValueAbsolute *float64 // READ-ONLY; The relative impact to dimension (null if not applicable) ChangeValueRelative *float64 // READ-ONLY; The name of the impact dimension. Name *string // READ-ONLY; The unit in which estimated impact to dimension is measured. Unit *string }
OperationImpact - The impact of an operation, both in absolute and relative terms.
func (OperationImpact) MarshalJSON ¶ added in v1.1.0
func (o OperationImpact) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationImpact.
func (*OperationImpact) UnmarshalJSON ¶ added in v1.1.0
func (o *OperationImpact) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationImpact.
type OperationListResult ¶
type OperationListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*Operation }
OperationListResult - Result of the request to list SQL operations.
func (OperationListResult) MarshalJSON ¶
func (o OperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationListResult.
func (*OperationListResult) UnmarshalJSON ¶ added in v1.1.0
func (o *OperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.
type OperationMode ¶
type OperationMode string
OperationMode - Operation Mode.
const (
OperationModePolybaseImport OperationMode = "PolybaseImport"
)
func PossibleOperationModeValues ¶
func PossibleOperationModeValues() []OperationMode
PossibleOperationModeValues returns the possible values for the OperationMode const type.
type OperationOrigin ¶
type OperationOrigin string
OperationOrigin - The intended executor of the operation.
const ( OperationOriginSystem OperationOrigin = "system" OperationOriginUser OperationOrigin = "user" )
func PossibleOperationOriginValues ¶
func PossibleOperationOriginValues() []OperationOrigin
PossibleOperationOriginValues returns the possible values for the OperationOrigin const type.
type OperationsClient ¶
type OperationsClient struct {
// contains filtered or unexported fields
}
OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.
func NewOperationsClient ¶
func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)
NewOperationsClient creates a new instance of OperationsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*OperationsClient) NewListPager ¶ added in v0.5.0
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Lists all of the available SQL Rest API operations.
Generated from API version 2020-11-01-preview
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListOptions ¶ added in v0.3.0
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶ added in v0.3.0
type OperationsClientListResponse struct { // Result of the request to list SQL operations. OperationListResult }
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type OutboundFirewallRule ¶
type OutboundFirewallRule struct { // Resource properties. Properties *OutboundFirewallRuleProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
OutboundFirewallRule - An Azure SQL DB Server Outbound Firewall Rule.
func (OutboundFirewallRule) MarshalJSON ¶
func (o OutboundFirewallRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OutboundFirewallRule.
func (*OutboundFirewallRule) UnmarshalJSON ¶ added in v1.1.0
func (o *OutboundFirewallRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OutboundFirewallRule.
type OutboundFirewallRuleListResult ¶
type OutboundFirewallRuleListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*OutboundFirewallRule }
OutboundFirewallRuleListResult - A list of outbound rules.
func (OutboundFirewallRuleListResult) MarshalJSON ¶
func (o OutboundFirewallRuleListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OutboundFirewallRuleListResult.
func (*OutboundFirewallRuleListResult) UnmarshalJSON ¶ added in v1.1.0
func (o *OutboundFirewallRuleListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OutboundFirewallRuleListResult.
type OutboundFirewallRuleProperties ¶
type OutboundFirewallRuleProperties struct { // READ-ONLY; The state of the outbound rule. ProvisioningState *string }
OutboundFirewallRuleProperties - The properties of an outbound firewall rule.
func (OutboundFirewallRuleProperties) MarshalJSON ¶ added in v1.1.0
func (o OutboundFirewallRuleProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OutboundFirewallRuleProperties.
func (*OutboundFirewallRuleProperties) UnmarshalJSON ¶ added in v1.1.0
func (o *OutboundFirewallRuleProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OutboundFirewallRuleProperties.
type OutboundFirewallRulesClient ¶
type OutboundFirewallRulesClient struct {
// contains filtered or unexported fields
}
OutboundFirewallRulesClient contains the methods for the OutboundFirewallRules group. Don't use this type directly, use NewOutboundFirewallRulesClient() instead.
func NewOutboundFirewallRulesClient ¶
func NewOutboundFirewallRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OutboundFirewallRulesClient, error)
NewOutboundFirewallRulesClient creates a new instance of OutboundFirewallRulesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*OutboundFirewallRulesClient) BeginCreateOrUpdate ¶
func (client *OutboundFirewallRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, outboundRuleFqdn string, parameters OutboundFirewallRule, options *OutboundFirewallRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[OutboundFirewallRulesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a outbound firewall rule with a given name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-02-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - OutboundFirewallRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the OutboundFirewallRulesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewOutboundFirewallRulesClient().BeginCreateOrUpdate(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", "server.database.windows.net", armsql.OutboundFirewallRule{}, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.OutboundFirewallRule = armsql.OutboundFirewallRule{ // Name: to.Ptr("server.database.windows.net"), // Type: to.Ptr("Microsoft.Sql/servers/outboundFirewallRules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/outboundFirewallRules/server.datbase.windows.net"), // Properties: &armsql.OutboundFirewallRuleProperties{ // ProvisioningState: to.Ptr("Succeeded"), // }, // } }
Output:
func (*OutboundFirewallRulesClient) BeginDelete ¶
func (client *OutboundFirewallRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, outboundRuleFqdn string, options *OutboundFirewallRulesClientBeginDeleteOptions) (*runtime.Poller[OutboundFirewallRulesClientDeleteResponse], error)
BeginDelete - Deletes a outbound firewall rule with a given name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-02-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - OutboundFirewallRulesClientBeginDeleteOptions contains the optional parameters for the OutboundFirewallRulesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewOutboundFirewallRulesClient().BeginDelete(ctx, "sqlcrudtest-7398", "sqlcrudtest-6661", "server.database.windows.net", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*OutboundFirewallRulesClient) Get ¶
func (client *OutboundFirewallRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, outboundRuleFqdn string, options *OutboundFirewallRulesClientGetOptions) (OutboundFirewallRulesClientGetResponse, error)
Get - Gets an outbound firewall rule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-02-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - OutboundFirewallRulesClientGetOptions contains the optional parameters for the OutboundFirewallRulesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewOutboundFirewallRulesClient().Get(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", "server.database.windows.net", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.OutboundFirewallRule = armsql.OutboundFirewallRule{ // Name: to.Ptr("server.database.windows.net"), // Type: to.Ptr("Microsoft.Sql/servers/outboundFirewallRules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/outboundFirewallRules/server.datbase.windows.net"), // Properties: &armsql.OutboundFirewallRuleProperties{ // ProvisioningState: to.Ptr("Succeeded"), // }, // } }
Output:
func (*OutboundFirewallRulesClient) NewListByServerPager ¶ added in v0.5.0
func (client *OutboundFirewallRulesClient) NewListByServerPager(resourceGroupName string, serverName string, options *OutboundFirewallRulesClientListByServerOptions) *runtime.Pager[OutboundFirewallRulesClientListByServerResponse]
NewListByServerPager - Gets all outbound firewall rules on a server.
Generated from API version 2021-02-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - OutboundFirewallRulesClientListByServerOptions contains the optional parameters for the OutboundFirewallRulesClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewOutboundFirewallRulesClient().NewListByServerPager("sqlcrudtest-7398", "sqlcrudtest-4645", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.OutboundFirewallRuleListResult = armsql.OutboundFirewallRuleListResult{ // Value: []*armsql.OutboundFirewallRule{ // { // Name: to.Ptr("server.database.windows.net"), // Type: to.Ptr("Microsoft.Sql/servers/outboundFirewallRules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/outboundFirewallRules/server.datbase.windows.net"), // Properties: &armsql.OutboundFirewallRuleProperties{ // ProvisioningState: to.Ptr("Succeeded"), // }, // }, // { // Name: to.Ptr("storage.blob.windows.net"), // Type: to.Ptr("Microsoft.Sql/servers/outboundFirewallRules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/outboundFirewallRules/storage.blob.windows.net"), // Properties: &armsql.OutboundFirewallRuleProperties{ // ProvisioningState: to.Ptr("Succeeded"), // }, // }}, // } } }
Output:
type OutboundFirewallRulesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type OutboundFirewallRulesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
OutboundFirewallRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the OutboundFirewallRulesClient.BeginCreateOrUpdate method.
type OutboundFirewallRulesClientBeginDeleteOptions ¶ added in v0.3.0
type OutboundFirewallRulesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
OutboundFirewallRulesClientBeginDeleteOptions contains the optional parameters for the OutboundFirewallRulesClient.BeginDelete method.
type OutboundFirewallRulesClientCreateOrUpdateResponse ¶ added in v0.3.0
type OutboundFirewallRulesClientCreateOrUpdateResponse struct { // An Azure SQL DB Server Outbound Firewall Rule. OutboundFirewallRule }
OutboundFirewallRulesClientCreateOrUpdateResponse contains the response from method OutboundFirewallRulesClient.BeginCreateOrUpdate.
type OutboundFirewallRulesClientDeleteResponse ¶ added in v0.3.0
type OutboundFirewallRulesClientDeleteResponse struct { }
OutboundFirewallRulesClientDeleteResponse contains the response from method OutboundFirewallRulesClient.BeginDelete.
type OutboundFirewallRulesClientGetOptions ¶ added in v0.3.0
type OutboundFirewallRulesClientGetOptions struct { }
OutboundFirewallRulesClientGetOptions contains the optional parameters for the OutboundFirewallRulesClient.Get method.
type OutboundFirewallRulesClientGetResponse ¶ added in v0.3.0
type OutboundFirewallRulesClientGetResponse struct { // An Azure SQL DB Server Outbound Firewall Rule. OutboundFirewallRule }
OutboundFirewallRulesClientGetResponse contains the response from method OutboundFirewallRulesClient.Get.
type OutboundFirewallRulesClientListByServerOptions ¶ added in v0.3.0
type OutboundFirewallRulesClientListByServerOptions struct { }
OutboundFirewallRulesClientListByServerOptions contains the optional parameters for the OutboundFirewallRulesClient.NewListByServerPager method.
type OutboundFirewallRulesClientListByServerResponse ¶ added in v0.3.0
type OutboundFirewallRulesClientListByServerResponse struct { // A list of outbound rules. OutboundFirewallRuleListResult }
OutboundFirewallRulesClientListByServerResponse contains the response from method OutboundFirewallRulesClient.NewListByServerPager.
type PartnerInfo ¶
type PartnerInfo struct { // REQUIRED; Resource identifier of the partner server. ID *string // READ-ONLY; Geo location of the partner server. Location *string // READ-ONLY; Replication role of the partner server. ReplicationRole *FailoverGroupReplicationRole }
PartnerInfo - Partner server information for the failover group.
func (PartnerInfo) MarshalJSON ¶ added in v1.1.0
func (p PartnerInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PartnerInfo.
func (*PartnerInfo) UnmarshalJSON ¶ added in v1.1.0
func (p *PartnerInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PartnerInfo.
type PartnerRegionInfo ¶
type PartnerRegionInfo struct { // Geo location of the partner managed instances. Location *string // READ-ONLY; Replication role of the partner managed instances. ReplicationRole *InstanceFailoverGroupReplicationRole }
PartnerRegionInfo - Partner region information for the failover group.
func (PartnerRegionInfo) MarshalJSON ¶ added in v1.1.0
func (p PartnerRegionInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PartnerRegionInfo.
func (*PartnerRegionInfo) UnmarshalJSON ¶ added in v1.1.0
func (p *PartnerRegionInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PartnerRegionInfo.
type PauseDelayTimeUnit ¶
type PauseDelayTimeUnit string
PauseDelayTimeUnit - Unit of time that delay is expressed in
const (
PauseDelayTimeUnitMinutes PauseDelayTimeUnit = "Minutes"
)
func PossiblePauseDelayTimeUnitValues ¶
func PossiblePauseDelayTimeUnitValues() []PauseDelayTimeUnit
PossiblePauseDelayTimeUnitValues returns the possible values for the PauseDelayTimeUnit const type.
type PerformanceLevelCapability ¶
type PerformanceLevelCapability struct { // READ-ONLY; Unit type used to measure performance level. Unit *PerformanceLevelUnit // READ-ONLY; Performance level value. Value *float64 }
PerformanceLevelCapability - The performance level capability.
func (PerformanceLevelCapability) MarshalJSON ¶ added in v1.1.0
func (p PerformanceLevelCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PerformanceLevelCapability.
func (*PerformanceLevelCapability) UnmarshalJSON ¶ added in v1.1.0
func (p *PerformanceLevelCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PerformanceLevelCapability.
type PerformanceLevelUnit ¶
type PerformanceLevelUnit string
PerformanceLevelUnit - Unit type used to measure performance level.
const ( PerformanceLevelUnitDTU PerformanceLevelUnit = "DTU" PerformanceLevelUnitVCores PerformanceLevelUnit = "VCores" )
func PossiblePerformanceLevelUnitValues ¶
func PossiblePerformanceLevelUnitValues() []PerformanceLevelUnit
PossiblePerformanceLevelUnitValues returns the possible values for the PerformanceLevelUnit const type.
type PrimaryAggregationType ¶
type PrimaryAggregationType string
PrimaryAggregationType - The primary aggregation type defining how metric values are displayed.
const ( PrimaryAggregationTypeAverage PrimaryAggregationType = "Average" PrimaryAggregationTypeCount PrimaryAggregationType = "Count" PrimaryAggregationTypeMaximum PrimaryAggregationType = "Maximum" PrimaryAggregationTypeMinimum PrimaryAggregationType = "Minimum" PrimaryAggregationTypeNone PrimaryAggregationType = "None" PrimaryAggregationTypeTotal PrimaryAggregationType = "Total" )
func PossiblePrimaryAggregationTypeValues ¶
func PossiblePrimaryAggregationTypeValues() []PrimaryAggregationType
PossiblePrimaryAggregationTypeValues returns the possible values for the PrimaryAggregationType const type.
type PrincipalType ¶
type PrincipalType string
PrincipalType - Principal Type of the sever administrator.
const ( PrincipalTypeApplication PrincipalType = "Application" PrincipalTypeGroup PrincipalType = "Group" PrincipalTypeUser PrincipalType = "User" )
func PossiblePrincipalTypeValues ¶
func PossiblePrincipalTypeValues() []PrincipalType
PossiblePrincipalTypeValues returns the possible values for the PrincipalType const type.
type PrivateEndpointConnection ¶
type PrivateEndpointConnection struct { // Resource properties. Properties *PrivateEndpointConnectionProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
PrivateEndpointConnection - A private endpoint connection
func (PrivateEndpointConnection) MarshalJSON ¶
func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection.
func (*PrivateEndpointConnection) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection.
type PrivateEndpointConnectionListResult ¶
type PrivateEndpointConnectionListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*PrivateEndpointConnection }
PrivateEndpointConnectionListResult - A list of private endpoint connections.
func (PrivateEndpointConnectionListResult) MarshalJSON ¶
func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult.
func (*PrivateEndpointConnectionListResult) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult.
type PrivateEndpointConnectionProperties ¶
type PrivateEndpointConnectionProperties struct { // Private endpoint which the connection belongs to. PrivateEndpoint *PrivateEndpointProperty // Connection state of the private endpoint connection. PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionStateProperty // READ-ONLY; State of the private endpoint connection. ProvisioningState *PrivateEndpointProvisioningState }
PrivateEndpointConnectionProperties - Properties of a private endpoint connection.
func (PrivateEndpointConnectionProperties) MarshalJSON ¶ added in v1.1.0
func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties.
func (*PrivateEndpointConnectionProperties) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties.
type PrivateEndpointConnectionRequestStatus ¶
type PrivateEndpointConnectionRequestStatus struct { // READ-ONLY; The connection name for the private endpoint. PrivateEndpointConnectionName *string // READ-ONLY; Resource id for which the private endpoint is created. PrivateLinkServiceID *string // READ-ONLY; Status of this private endpoint connection. Status *string }
PrivateEndpointConnectionRequestStatus - Contains the private endpoint connection requests status.
func (PrivateEndpointConnectionRequestStatus) MarshalJSON ¶ added in v1.1.0
func (p PrivateEndpointConnectionRequestStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionRequestStatus.
func (*PrivateEndpointConnectionRequestStatus) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateEndpointConnectionRequestStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionRequestStatus.
type PrivateEndpointConnectionsClient ¶
type PrivateEndpointConnectionsClient struct {
// contains filtered or unexported fields
}
PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead.
func NewPrivateEndpointConnectionsClient ¶
func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error)
NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*PrivateEndpointConnectionsClient) BeginCreateOrUpdate ¶
func (client *PrivateEndpointConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection, options *PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[PrivateEndpointConnectionsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Approve or reject a private endpoint connection with a given name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/PrivateEndpointConnectionUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginCreateOrUpdate(ctx, "Default", "test-svr", "private-endpoint-connection-name", armsql.PrivateEndpointConnection{ Properties: &armsql.PrivateEndpointConnectionProperties{ PrivateLinkServiceConnectionState: &armsql.PrivateLinkServiceConnectionStateProperty{ Description: to.Ptr("Approved by johndoe@contoso.com"), Status: to.Ptr(armsql.PrivateLinkServiceConnectionStateStatusApproved), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PrivateEndpointConnection = armsql.PrivateEndpointConnection{ // Name: to.Ptr("private-endpoint-connection-name"), // Type: to.Ptr("Microsoft.Sql/servers/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/test-svr/privateEndpointConnections/private-endpoint-connection-name"), // Properties: &armsql.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armsql.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"), // }, // PrivateLinkServiceConnectionState: &armsql.PrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Approved by johndoe@contoso.com"), // ActionsRequired: to.Ptr(armsql.PrivateLinkServiceConnectionStateActionsRequireNone), // Status: to.Ptr(armsql.PrivateLinkServiceConnectionStateStatusApproved), // }, // ProvisioningState: to.Ptr(armsql.PrivateEndpointProvisioningState("Succeeded")), // }, // } }
Output:
func (*PrivateEndpointConnectionsClient) BeginDelete ¶
func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)
BeginDelete - Deletes a private endpoint connection with a given name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/PrivateEndpointConnectionDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginDelete(ctx, "Default", "test-svr", "private-endpoint-connection-name", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*PrivateEndpointConnectionsClient) Get ¶
func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error)
Get - Gets a private endpoint connection. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- privateEndpointConnectionName - The name of the private endpoint connection.
- options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/PrivateEndpointConnectionGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "Default", "test-svr", "private-endpoint-connection-name", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PrivateEndpointConnection = armsql.PrivateEndpointConnection{ // Name: to.Ptr("private-endpoint-connection-name"), // Type: to.Ptr("Microsoft.Sql/servers/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/test-svr/privateEndpointConnections/private-endpoint-connection-name"), // Properties: &armsql.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armsql.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"), // }, // PrivateLinkServiceConnectionState: &armsql.PrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Auto-approved"), // ActionsRequired: to.Ptr(armsql.PrivateLinkServiceConnectionStateActionsRequireNone), // Status: to.Ptr(armsql.PrivateLinkServiceConnectionStateStatusApproved), // }, // ProvisioningState: to.Ptr(armsql.PrivateEndpointProvisioningState("Succeeded")), // }, // } }
Output:
func (*PrivateEndpointConnectionsClient) NewListByServerPager ¶ added in v0.5.0
func (client *PrivateEndpointConnectionsClient) NewListByServerPager(resourceGroupName string, serverName string, options *PrivateEndpointConnectionsClientListByServerOptions) *runtime.Pager[PrivateEndpointConnectionsClientListByServerResponse]
NewListByServerPager - Gets all private endpoint connections on a server.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - PrivateEndpointConnectionsClientListByServerOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/PrivateEndpointConnectionList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListByServerPager("Default", "test-svr", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PrivateEndpointConnectionListResult = armsql.PrivateEndpointConnectionListResult{ // Value: []*armsql.PrivateEndpointConnection{ // { // Name: to.Ptr("private-endpoint-connection-name"), // Type: to.Ptr("Microsoft.Sql/servers/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/test-svr/privateEndpointConnections/private-endpoint-connection-name-2"), // Properties: &armsql.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armsql.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"), // }, // PrivateLinkServiceConnectionState: &armsql.PrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Auto-approved"), // ActionsRequired: to.Ptr(armsql.PrivateLinkServiceConnectionStateActionsRequireNone), // Status: to.Ptr(armsql.PrivateLinkServiceConnectionStateStatusApproved), // }, // ProvisioningState: to.Ptr(armsql.PrivateEndpointProvisioningState("Succeeded")), // }, // }, // { // Name: to.Ptr("private-endpoint-connection-name-2"), // Type: to.Ptr("Microsoft.Sql/servers/privateEndpointConnections"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/test-svr/privateEndpointConnections/private-endpoint-connection-name-2"), // Properties: &armsql.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armsql.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name-2"), // }, // PrivateLinkServiceConnectionState: &armsql.PrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Auto-approved"), // ActionsRequired: to.Ptr(armsql.PrivateLinkServiceConnectionStateActionsRequireNone), // Status: to.Ptr(armsql.PrivateLinkServiceConnectionStateStatusApproved), // }, // ProvisioningState: to.Ptr(armsql.PrivateEndpointProvisioningState("Succeeded")), // }, // }}, // } } }
Output:
type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate method.
type PrivateEndpointConnectionsClientBeginDeleteOptions ¶ added in v0.3.0
type PrivateEndpointConnectionsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
type PrivateEndpointConnectionsClientCreateOrUpdateResponse ¶ added in v0.3.0
type PrivateEndpointConnectionsClientCreateOrUpdateResponse struct { // A private endpoint connection PrivateEndpointConnection }
PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.BeginCreateOrUpdate.
type PrivateEndpointConnectionsClientDeleteResponse ¶ added in v0.3.0
type PrivateEndpointConnectionsClientDeleteResponse struct { }
PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete.
type PrivateEndpointConnectionsClientGetOptions ¶ added in v0.3.0
type PrivateEndpointConnectionsClientGetOptions struct { }
PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
type PrivateEndpointConnectionsClientGetResponse ¶ added in v0.3.0
type PrivateEndpointConnectionsClientGetResponse struct { // A private endpoint connection PrivateEndpointConnection }
PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.
type PrivateEndpointConnectionsClientListByServerOptions ¶ added in v0.3.0
type PrivateEndpointConnectionsClientListByServerOptions struct { }
PrivateEndpointConnectionsClientListByServerOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByServerPager method.
type PrivateEndpointConnectionsClientListByServerResponse ¶ added in v0.3.0
type PrivateEndpointConnectionsClientListByServerResponse struct { // A list of private endpoint connections. PrivateEndpointConnectionListResult }
PrivateEndpointConnectionsClientListByServerResponse contains the response from method PrivateEndpointConnectionsClient.NewListByServerPager.
type PrivateEndpointProperty ¶
type PrivateEndpointProperty struct { // Resource id of the private endpoint. ID *string }
func (PrivateEndpointProperty) MarshalJSON ¶ added in v1.1.0
func (p PrivateEndpointProperty) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointProperty.
func (*PrivateEndpointProperty) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateEndpointProperty) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointProperty.
type PrivateEndpointProvisioningState ¶
type PrivateEndpointProvisioningState string
PrivateEndpointProvisioningState - State of the private endpoint connection.
const ( PrivateEndpointProvisioningStateApproving PrivateEndpointProvisioningState = "Approving" PrivateEndpointProvisioningStateDropping PrivateEndpointProvisioningState = "Dropping" PrivateEndpointProvisioningStateFailed PrivateEndpointProvisioningState = "Failed" PrivateEndpointProvisioningStateReady PrivateEndpointProvisioningState = "Ready" PrivateEndpointProvisioningStateRejecting PrivateEndpointProvisioningState = "Rejecting" )
func PossiblePrivateEndpointProvisioningStateValues ¶
func PossiblePrivateEndpointProvisioningStateValues() []PrivateEndpointProvisioningState
PossiblePrivateEndpointProvisioningStateValues returns the possible values for the PrivateEndpointProvisioningState const type.
type PrivateLinkResource ¶
type PrivateLinkResource struct { // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; The private link resource group id. Properties *PrivateLinkResourceProperties // READ-ONLY; Resource type. Type *string }
PrivateLinkResource - A private link resource
func (PrivateLinkResource) MarshalJSON ¶
func (p PrivateLinkResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource.
func (*PrivateLinkResource) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource.
type PrivateLinkResourceListResult ¶
type PrivateLinkResourceListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*PrivateLinkResource }
PrivateLinkResourceListResult - A list of private link resources
func (PrivateLinkResourceListResult) MarshalJSON ¶
func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult.
func (*PrivateLinkResourceListResult) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult.
type PrivateLinkResourceProperties ¶
type PrivateLinkResourceProperties struct { // READ-ONLY; The private link resource group id. GroupID *string // READ-ONLY; The private link resource required member names. RequiredMembers []*string // READ-ONLY; The private link resource required zone names. RequiredZoneNames []*string }
PrivateLinkResourceProperties - Properties of a private link resource.
func (PrivateLinkResourceProperties) MarshalJSON ¶
func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties.
func (*PrivateLinkResourceProperties) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties.
type PrivateLinkResourcesClient ¶
type PrivateLinkResourcesClient struct {
// contains filtered or unexported fields
}
PrivateLinkResourcesClient contains the methods for the PrivateLinkResources group. Don't use this type directly, use NewPrivateLinkResourcesClient() instead.
func NewPrivateLinkResourcesClient ¶
func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error)
NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*PrivateLinkResourcesClient) Get ¶
func (client *PrivateLinkResourcesClient) Get(ctx context.Context, resourceGroupName string, serverName string, groupName string, options *PrivateLinkResourcesClientGetOptions) (PrivateLinkResourcesClientGetResponse, error)
Get - Gets a private link resource for SQL server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- groupName - The name of the private link resource.
- options - PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/PrivateLinkResourcesGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPrivateLinkResourcesClient().Get(ctx, "Default", "test-svr", "plr", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PrivateLinkResource = armsql.PrivateLinkResource{ // Name: to.Ptr("plr"), // Type: to.Ptr("Microsoft.Sql/servers/privateLinkResources"), // ID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/test-svr/privateLinkResources/plr"), // Properties: &armsql.PrivateLinkResourceProperties{ // GroupID: to.Ptr("sqlServer"), // RequiredMembers: []*string{ // to.Ptr("sqlServer")}, // }, // } }
Output:
func (*PrivateLinkResourcesClient) NewListByServerPager ¶ added in v0.5.0
func (client *PrivateLinkResourcesClient) NewListByServerPager(resourceGroupName string, serverName string, options *PrivateLinkResourcesClientListByServerOptions) *runtime.Pager[PrivateLinkResourcesClientListByServerResponse]
NewListByServerPager - Gets the private link resources for SQL server.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - PrivateLinkResourcesClientListByServerOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/PrivateLinkResourcesList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewPrivateLinkResourcesClient().NewListByServerPager("Default", "test-svr", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PrivateLinkResourceListResult = armsql.PrivateLinkResourceListResult{ // Value: []*armsql.PrivateLinkResource{ // { // Name: to.Ptr("plr"), // Type: to.Ptr("Microsoft.Sql/servers/privateLinkResources"), // ID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/test-svr/privateLinkResources/plr"), // Properties: &armsql.PrivateLinkResourceProperties{ // GroupID: to.Ptr("sqlServer"), // RequiredMembers: []*string{ // to.Ptr("sqlServer")}, // }, // }}, // } } }
Output:
type PrivateLinkResourcesClientGetOptions ¶ added in v0.3.0
type PrivateLinkResourcesClientGetOptions struct { }
PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.
type PrivateLinkResourcesClientGetResponse ¶ added in v0.3.0
type PrivateLinkResourcesClientGetResponse struct { // A private link resource PrivateLinkResource }
PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get.
type PrivateLinkResourcesClientListByServerOptions ¶ added in v0.3.0
type PrivateLinkResourcesClientListByServerOptions struct { }
PrivateLinkResourcesClientListByServerOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListByServerPager method.
type PrivateLinkResourcesClientListByServerResponse ¶ added in v0.3.0
type PrivateLinkResourcesClientListByServerResponse struct { // A list of private link resources PrivateLinkResourceListResult }
PrivateLinkResourcesClientListByServerResponse contains the response from method PrivateLinkResourcesClient.NewListByServerPager.
type PrivateLinkServiceConnectionStateActionsRequire ¶
type PrivateLinkServiceConnectionStateActionsRequire string
PrivateLinkServiceConnectionStateActionsRequire - The actions required for private link service connection.
const (
PrivateLinkServiceConnectionStateActionsRequireNone PrivateLinkServiceConnectionStateActionsRequire = "None"
)
func PossiblePrivateLinkServiceConnectionStateActionsRequireValues ¶
func PossiblePrivateLinkServiceConnectionStateActionsRequireValues() []PrivateLinkServiceConnectionStateActionsRequire
PossiblePrivateLinkServiceConnectionStateActionsRequireValues returns the possible values for the PrivateLinkServiceConnectionStateActionsRequire const type.
type PrivateLinkServiceConnectionStateProperty ¶
type PrivateLinkServiceConnectionStateProperty struct { // REQUIRED; The private link service connection description. Description *string // REQUIRED; The private link service connection status. Status *PrivateLinkServiceConnectionStateStatus // READ-ONLY; The actions required for private link service connection. ActionsRequired *PrivateLinkServiceConnectionStateActionsRequire }
func (PrivateLinkServiceConnectionStateProperty) MarshalJSON ¶ added in v1.1.0
func (p PrivateLinkServiceConnectionStateProperty) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionStateProperty.
func (*PrivateLinkServiceConnectionStateProperty) UnmarshalJSON ¶ added in v1.1.0
func (p *PrivateLinkServiceConnectionStateProperty) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionStateProperty.
type PrivateLinkServiceConnectionStateStatus ¶
type PrivateLinkServiceConnectionStateStatus string
PrivateLinkServiceConnectionStateStatus - The private link service connection status.
const ( PrivateLinkServiceConnectionStateStatusApproved PrivateLinkServiceConnectionStateStatus = "Approved" PrivateLinkServiceConnectionStateStatusDisconnected PrivateLinkServiceConnectionStateStatus = "Disconnected" PrivateLinkServiceConnectionStateStatusPending PrivateLinkServiceConnectionStateStatus = "Pending" PrivateLinkServiceConnectionStateStatusRejected PrivateLinkServiceConnectionStateStatus = "Rejected" )
func PossiblePrivateLinkServiceConnectionStateStatusValues ¶
func PossiblePrivateLinkServiceConnectionStateStatusValues() []PrivateLinkServiceConnectionStateStatus
PossiblePrivateLinkServiceConnectionStateStatusValues returns the possible values for the PrivateLinkServiceConnectionStateStatus const type.
type ProvisioningState ¶
type ProvisioningState string
ProvisioningState - The ARM provisioning state of the job execution.
const ( ProvisioningStateCanceled ProvisioningState = "Canceled" ProvisioningStateCreated ProvisioningState = "Created" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateInProgress ProvisioningState = "InProgress" ProvisioningStateSucceeded ProvisioningState = "Succeeded" )
func PossibleProvisioningStateValues ¶
func PossibleProvisioningStateValues() []ProvisioningState
PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.
type ProxyResource ¶
type ProxyResource struct { // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ProxyResource - ARM proxy resource.
func (ProxyResource) MarshalJSON ¶ added in v1.1.0
func (p ProxyResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProxyResource.
func (*ProxyResource) UnmarshalJSON ¶ added in v1.1.0
func (p *ProxyResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.
type ProxyResourceWithWritableName ¶
type ProxyResourceWithWritableName struct { // Resource name. Name *string // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource type. Type *string }
ProxyResourceWithWritableName - ARM proxy resource.
func (ProxyResourceWithWritableName) MarshalJSON ¶ added in v1.1.0
func (p ProxyResourceWithWritableName) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProxyResourceWithWritableName.
func (*ProxyResourceWithWritableName) UnmarshalJSON ¶ added in v1.1.0
func (p *ProxyResourceWithWritableName) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResourceWithWritableName.
type QueryMetricInterval ¶
type QueryMetricInterval struct { // List of metric objects for this interval Metrics []*QueryMetricProperties // READ-ONLY; Execution count of a query in this interval. ExecutionCount *int64 // READ-ONLY; The start time for the metric interval (ISO-8601 format). IntervalStartTime *string // READ-ONLY; Interval type (length). IntervalType *QueryTimeGrainType }
QueryMetricInterval - Properties of a query metrics interval.
func (QueryMetricInterval) MarshalJSON ¶
func (q QueryMetricInterval) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type QueryMetricInterval.
func (*QueryMetricInterval) UnmarshalJSON ¶ added in v1.1.0
func (q *QueryMetricInterval) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type QueryMetricInterval.
type QueryMetricProperties ¶
type QueryMetricProperties struct { // READ-ONLY; Metric value when avg() aggregate function is used over the interval. Avg *float64 // READ-ONLY; The UI appropriate name for the metric. DisplayName *string // READ-ONLY; Metric value when max() aggregate function is used over the interval. Max *float64 // READ-ONLY; Metric value when min() aggregate function is used over the interval. Min *float64 // READ-ONLY; The name information for the metric. Name *string // READ-ONLY; Metric value when stdev aggregate function is used over the interval. Stdev *float64 // READ-ONLY; Metric value when sum() aggregate function is used over the interval. Sum *float64 // READ-ONLY; The unit of the metric. Unit *QueryMetricUnitType // READ-ONLY; The value of the metric. Value *float64 }
QueryMetricProperties - Properties of a topquery metric in one interval.
func (QueryMetricProperties) MarshalJSON ¶ added in v1.1.0
func (q QueryMetricProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type QueryMetricProperties.
func (*QueryMetricProperties) UnmarshalJSON ¶ added in v1.1.0
func (q *QueryMetricProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type QueryMetricProperties.
type QueryMetricUnitType ¶
type QueryMetricUnitType string
QueryMetricUnitType - The unit of the metric.
const ( QueryMetricUnitTypeCount QueryMetricUnitType = "count" QueryMetricUnitTypeKB QueryMetricUnitType = "KB" QueryMetricUnitTypeMicroseconds QueryMetricUnitType = "microseconds" QueryMetricUnitTypePercentage QueryMetricUnitType = "percentage" )
func PossibleQueryMetricUnitTypeValues ¶
func PossibleQueryMetricUnitTypeValues() []QueryMetricUnitType
PossibleQueryMetricUnitTypeValues returns the possible values for the QueryMetricUnitType const type.
type QueryProperties ¶
type QueryProperties struct { // Query text. QueryText *string }
QueryProperties - Properties of a database query.
func (QueryProperties) MarshalJSON ¶ added in v1.1.0
func (q QueryProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type QueryProperties.
func (*QueryProperties) UnmarshalJSON ¶ added in v1.1.0
func (q *QueryProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type QueryProperties.
type QueryStatistics ¶
type QueryStatistics struct { // Resource properties. Properties *QueryStatisticsProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
func (QueryStatistics) MarshalJSON ¶
func (q QueryStatistics) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type QueryStatistics.
func (*QueryStatistics) UnmarshalJSON ¶ added in v1.1.0
func (q *QueryStatistics) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type QueryStatistics.
type QueryStatisticsProperties ¶
type QueryStatisticsProperties struct { // List of intervals with appropriate metric data Intervals []*QueryMetricInterval // READ-ONLY; Database name of the database in which this query was executed. DatabaseName *string // READ-ONLY; The end time for the metric (ISO-8601 format). EndTime *string // READ-ONLY; Unique query id (unique within one database). QueryID *string // READ-ONLY; The start time for the metric (ISO-8601 format). StartTime *string }
QueryStatisticsProperties - Properties of a query execution statistics.
func (QueryStatisticsProperties) MarshalJSON ¶
func (q QueryStatisticsProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type QueryStatisticsProperties.
func (*QueryStatisticsProperties) UnmarshalJSON ¶ added in v1.1.0
func (q *QueryStatisticsProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type QueryStatisticsProperties.
type QueryTimeGrainType ¶
type QueryTimeGrainType string
QueryTimeGrainType - Interval type (length).
const ( QueryTimeGrainTypeP1D QueryTimeGrainType = "P1D" QueryTimeGrainTypePT1H QueryTimeGrainType = "PT1H" )
func PossibleQueryTimeGrainTypeValues ¶
func PossibleQueryTimeGrainTypeValues() []QueryTimeGrainType
PossibleQueryTimeGrainTypeValues returns the possible values for the QueryTimeGrainType const type.
type ReadOnlyEndpointFailoverPolicy ¶
type ReadOnlyEndpointFailoverPolicy string
ReadOnlyEndpointFailoverPolicy - Failover policy of the read-only endpoint for the failover group.
const ( ReadOnlyEndpointFailoverPolicyDisabled ReadOnlyEndpointFailoverPolicy = "Disabled" ReadOnlyEndpointFailoverPolicyEnabled ReadOnlyEndpointFailoverPolicy = "Enabled" )
func PossibleReadOnlyEndpointFailoverPolicyValues ¶
func PossibleReadOnlyEndpointFailoverPolicyValues() []ReadOnlyEndpointFailoverPolicy
PossibleReadOnlyEndpointFailoverPolicyValues returns the possible values for the ReadOnlyEndpointFailoverPolicy const type.
type ReadScaleCapability ¶
type ReadScaleCapability struct { // The reason for the capability not being available. Reason *string // READ-ONLY; The maximum number of read scale replicas. MaxNumberOfReplicas *int32 // READ-ONLY; The status of the capability. Status *CapabilityStatus }
ReadScaleCapability - The read scale capability.
func (ReadScaleCapability) MarshalJSON ¶ added in v1.1.0
func (r ReadScaleCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ReadScaleCapability.
func (*ReadScaleCapability) UnmarshalJSON ¶ added in v1.1.0
func (r *ReadScaleCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ReadScaleCapability.
type ReadWriteEndpointFailoverPolicy ¶
type ReadWriteEndpointFailoverPolicy string
ReadWriteEndpointFailoverPolicy - Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required.
const ( ReadWriteEndpointFailoverPolicyAutomatic ReadWriteEndpointFailoverPolicy = "Automatic" ReadWriteEndpointFailoverPolicyManual ReadWriteEndpointFailoverPolicy = "Manual" )
func PossibleReadWriteEndpointFailoverPolicyValues ¶
func PossibleReadWriteEndpointFailoverPolicyValues() []ReadWriteEndpointFailoverPolicy
PossibleReadWriteEndpointFailoverPolicyValues returns the possible values for the ReadWriteEndpointFailoverPolicy const type.
type RecommendedAction ¶
type RecommendedAction struct { // Resource properties. Properties *RecommendedActionProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource kind. Kind *string // READ-ONLY; Resource location. Location *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
RecommendedAction - Database, Server or Elastic Pool Recommended Action.
func (RecommendedAction) MarshalJSON ¶
func (r RecommendedAction) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecommendedAction.
func (*RecommendedAction) UnmarshalJSON ¶ added in v1.1.0
func (r *RecommendedAction) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RecommendedAction.
type RecommendedActionCurrentState ¶
type RecommendedActionCurrentState string
RecommendedActionCurrentState - Current state the recommended action is in. Some commonly used states are: Active -> recommended action is active and no action has been taken yet. Pending -> recommended action is approved for and is awaiting execution. Executing -> recommended action is being applied on the user database. Verifying -> recommended action was applied and is being verified of its usefulness by the system. Success -> recommended action was applied and improvement found during verification. Pending Revert -> verification found little or no improvement so recommended action is queued for revert or user has manually reverted. Reverting -> changes made while applying recommended action are being reverted on the user database. Reverted -> successfully reverted the changes made by recommended action on user database. Ignored -> user explicitly ignored/discarded the recommended action.
const ( RecommendedActionCurrentStateActive RecommendedActionCurrentState = "Active" RecommendedActionCurrentStateError RecommendedActionCurrentState = "Error" RecommendedActionCurrentStateExecuting RecommendedActionCurrentState = "Executing" RecommendedActionCurrentStateExpired RecommendedActionCurrentState = "Expired" RecommendedActionCurrentStateIgnored RecommendedActionCurrentState = "Ignored" RecommendedActionCurrentStateMonitoring RecommendedActionCurrentState = "Monitoring" RecommendedActionCurrentStatePending RecommendedActionCurrentState = "Pending" RecommendedActionCurrentStatePendingRevert RecommendedActionCurrentState = "PendingRevert" RecommendedActionCurrentStateResolved RecommendedActionCurrentState = "Resolved" RecommendedActionCurrentStateRevertCancelled RecommendedActionCurrentState = "RevertCancelled" RecommendedActionCurrentStateReverted RecommendedActionCurrentState = "Reverted" RecommendedActionCurrentStateReverting RecommendedActionCurrentState = "Reverting" RecommendedActionCurrentStateSuccess RecommendedActionCurrentState = "Success" RecommendedActionCurrentStateVerifying RecommendedActionCurrentState = "Verifying" )
func PossibleRecommendedActionCurrentStateValues ¶
func PossibleRecommendedActionCurrentStateValues() []RecommendedActionCurrentState
PossibleRecommendedActionCurrentStateValues returns the possible values for the RecommendedActionCurrentState const type.
type RecommendedActionErrorInfo ¶
type RecommendedActionErrorInfo struct { // READ-ONLY; Gets the reason why the recommended action was put to error state. e.g., DatabaseHasQdsOff, IndexAlreadyExists ErrorCode *string // READ-ONLY; Gets whether the error could be ignored and recommended action could be retried. Possible values are: Yes/No IsRetryable *IsRetryable }
RecommendedActionErrorInfo - Contains error information for an Azure SQL Database, Server or Elastic Pool Recommended Action.
func (RecommendedActionErrorInfo) MarshalJSON ¶ added in v1.1.0
func (r RecommendedActionErrorInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecommendedActionErrorInfo.
func (*RecommendedActionErrorInfo) UnmarshalJSON ¶ added in v1.1.0
func (r *RecommendedActionErrorInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RecommendedActionErrorInfo.
type RecommendedActionImpactRecord ¶
type RecommendedActionImpactRecord struct { // READ-ONLY; Gets the absolute value of this dimension if applicable. e.g., Number of Queries affected AbsoluteValue *float64 // READ-ONLY; Gets the absolute change in the value of this dimension. e.g., Absolute Disk space change in Megabytes ChangeValueAbsolute *float64 // READ-ONLY; Gets the relative change in the value of this dimension. e.g., Relative Disk space change in Percentage ChangeValueRelative *float64 // READ-ONLY; Gets the name of the impact dimension. e.g., CPUChange, DiskSpaceChange, NumberOfQueriesAffected. DimensionName *string // READ-ONLY; Gets the name of the impact dimension. e.g., CPUChange, DiskSpaceChange, NumberOfQueriesAffected. Unit *string }
RecommendedActionImpactRecord - Contains information of estimated or observed impact on various metrics for an Azure SQL Database, Server or Elastic Pool Recommended Action.
func (RecommendedActionImpactRecord) MarshalJSON ¶ added in v1.1.0
func (r RecommendedActionImpactRecord) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecommendedActionImpactRecord.
func (*RecommendedActionImpactRecord) UnmarshalJSON ¶ added in v1.1.0
func (r *RecommendedActionImpactRecord) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RecommendedActionImpactRecord.
type RecommendedActionImplementationInfo ¶
type RecommendedActionImplementationInfo struct { // READ-ONLY; Gets the method in which this recommended action can be manually implemented. e.g., TSql, AzurePowerShell. Method *ImplementationMethod // READ-ONLY; Gets the manual implementation script. e.g., T-SQL script that could be executed on the database. Script *string }
RecommendedActionImplementationInfo - Contains information for manual implementation for an Azure SQL Database, Server or Elastic Pool Recommended Action.
func (RecommendedActionImplementationInfo) MarshalJSON ¶ added in v1.1.0
func (r RecommendedActionImplementationInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecommendedActionImplementationInfo.
func (*RecommendedActionImplementationInfo) UnmarshalJSON ¶ added in v1.1.0
func (r *RecommendedActionImplementationInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RecommendedActionImplementationInfo.
type RecommendedActionInitiatedBy ¶
type RecommendedActionInitiatedBy string
RecommendedActionInitiatedBy - Gets if approval for applying this recommended action was given by user/system.
const ( RecommendedActionInitiatedBySystem RecommendedActionInitiatedBy = "System" RecommendedActionInitiatedByUser RecommendedActionInitiatedBy = "User" )
func PossibleRecommendedActionInitiatedByValues ¶
func PossibleRecommendedActionInitiatedByValues() []RecommendedActionInitiatedBy
PossibleRecommendedActionInitiatedByValues returns the possible values for the RecommendedActionInitiatedBy const type.
type RecommendedActionMetricInfo ¶
type RecommendedActionMetricInfo struct { // READ-ONLY; Gets the name of the metric. e.g., CPU, Number of Queries. MetricName *string // READ-ONLY; Gets the start time of time interval given by this MetricInfo. StartTime *time.Time // READ-ONLY; Gets the duration of time interval for the value given by this MetricInfo. e.g., PT1H (1 hour) TimeGrain *string // READ-ONLY; Gets the unit in which metric is measured. e.g., DTU, Frequency Unit *string // READ-ONLY; Gets the value of the metric in the time interval given by this MetricInfo. Value *float64 }
RecommendedActionMetricInfo - Contains time series of various impacted metrics for an Azure SQL Database, Server or Elastic Pool Recommended Action.
func (RecommendedActionMetricInfo) MarshalJSON ¶
func (r RecommendedActionMetricInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecommendedActionMetricInfo.
func (*RecommendedActionMetricInfo) UnmarshalJSON ¶
func (r *RecommendedActionMetricInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RecommendedActionMetricInfo.
type RecommendedActionProperties ¶
type RecommendedActionProperties struct { // REQUIRED; Gets the info of the current state the recommended action is in. State *RecommendedActionStateInfo // READ-ONLY; Gets additional details specific to this recommended action. Details map[string]any // READ-ONLY; Gets the error details if and why this recommended action is put to error state. ErrorDetails *RecommendedActionErrorInfo // READ-ONLY; Gets the estimated impact info for this recommended action e.g., Estimated CPU gain, Estimated Disk Space change EstimatedImpact []*RecommendedActionImpactRecord // READ-ONLY; Gets the time taken for applying this recommended action on user resource. e.g., time taken for index creation ExecuteActionDuration *string // READ-ONLY; Gets if approval for applying this recommended action was given by user/system. ExecuteActionInitiatedBy *RecommendedActionInitiatedBy // READ-ONLY; Gets the time when this recommended action was approved for execution. ExecuteActionInitiatedTime *time.Time // READ-ONLY; Gets the time when system started applying this recommended action on the user resource. e.g., index creation // start time ExecuteActionStartTime *time.Time // READ-ONLY; Gets the implementation details of this recommended action for user to apply it manually. ImplementationDetails *RecommendedActionImplementationInfo // READ-ONLY; Gets if this recommended action was suggested some time ago but user chose to ignore this and system added a // new recommended action again. IsArchivedAction *bool // READ-ONLY; Gets if this recommended action is actionable by user IsExecutableAction *bool // READ-ONLY; Gets if changes applied by this recommended action can be reverted by user IsRevertableAction *bool // READ-ONLY; Gets time when this recommended action was last refreshed. LastRefresh *time.Time // READ-ONLY; Gets the linked objects, if any. LinkedObjects []*string // READ-ONLY; Gets the observed/actual impact info for this recommended action e.g., Actual CPU gain, Actual Disk Space change ObservedImpact []*RecommendedActionImpactRecord // READ-ONLY; Gets the reason for recommending this action. e.g., DuplicateIndex RecommendationReason *string // READ-ONLY; Gets the time taken for reverting changes of this recommended action on user resource. e.g., time taken for // dropping the created index. RevertActionDuration *string // READ-ONLY; Gets if approval for reverting this recommended action was given by user/system. RevertActionInitiatedBy *RecommendedActionInitiatedBy // READ-ONLY; Gets the time when this recommended action was approved for revert. RevertActionInitiatedTime *time.Time // READ-ONLY; Gets the time when system started reverting changes of this recommended action on user resource. e.g., time // when index drop is executed. RevertActionStartTime *time.Time // READ-ONLY; Gets the impact of this recommended action. Possible values are 1 - Low impact, 2 - Medium Impact and 3 - High // Impact Score *int32 // READ-ONLY; Gets the time series info of metrics for this recommended action e.g., CPU consumption time series TimeSeries []*RecommendedActionMetricInfo // READ-ONLY; Gets the time since when this recommended action is valid. ValidSince *time.Time }
RecommendedActionProperties - Properties for a Database, Server or Elastic Pool Recommended Action.
func (RecommendedActionProperties) MarshalJSON ¶
func (r RecommendedActionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecommendedActionProperties.
func (*RecommendedActionProperties) UnmarshalJSON ¶
func (r *RecommendedActionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RecommendedActionProperties.
type RecommendedActionStateInfo ¶
type RecommendedActionStateInfo struct { // REQUIRED; Current state the recommended action is in. Some commonly used states are: Active -> recommended action is active // and no action has been taken yet. Pending -> recommended action is approved for and is // awaiting execution. Executing -> recommended action is being applied on the user database. Verifying -> recommended action // was applied and is being verified of its usefulness by the system. Success -> // recommended action was applied and improvement found during verification. Pending Revert -> verification found little or // no improvement so recommended action is queued for revert or user has manually // reverted. Reverting -> changes made while applying recommended action are being reverted on the user database. Reverted // -> successfully reverted the changes made by recommended action on user // database. Ignored -> user explicitly ignored/discarded the recommended action. CurrentValue *RecommendedActionCurrentState // READ-ONLY; Gets who initiated the execution of this recommended action. Possible Value are: User -> When user explicity // notified system to apply the recommended action. System -> When auto-execute status of this // advisor was set to 'Enabled', in which case the system applied it. ActionInitiatedBy *RecommendedActionInitiatedBy // READ-ONLY; Gets the time when the state was last modified LastModified *time.Time }
RecommendedActionStateInfo - Contains information of current state for an Azure SQL Database, Server or Elastic Pool Recommended Action.
func (RecommendedActionStateInfo) MarshalJSON ¶
func (r RecommendedActionStateInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecommendedActionStateInfo.
func (*RecommendedActionStateInfo) UnmarshalJSON ¶
func (r *RecommendedActionStateInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RecommendedActionStateInfo.
type RecommendedSensitivityLabelUpdate ¶
type RecommendedSensitivityLabelUpdate struct { // Resource properties. Properties *RecommendedSensitivityLabelUpdateProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
RecommendedSensitivityLabelUpdate - A recommended sensitivity label update operation.
func (RecommendedSensitivityLabelUpdate) MarshalJSON ¶
func (r RecommendedSensitivityLabelUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecommendedSensitivityLabelUpdate.
func (*RecommendedSensitivityLabelUpdate) UnmarshalJSON ¶ added in v1.1.0
func (r *RecommendedSensitivityLabelUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RecommendedSensitivityLabelUpdate.
type RecommendedSensitivityLabelUpdateKind ¶
type RecommendedSensitivityLabelUpdateKind string
const ( RecommendedSensitivityLabelUpdateKindDisable RecommendedSensitivityLabelUpdateKind = "disable" RecommendedSensitivityLabelUpdateKindEnable RecommendedSensitivityLabelUpdateKind = "enable" )
func PossibleRecommendedSensitivityLabelUpdateKindValues ¶
func PossibleRecommendedSensitivityLabelUpdateKindValues() []RecommendedSensitivityLabelUpdateKind
PossibleRecommendedSensitivityLabelUpdateKindValues returns the possible values for the RecommendedSensitivityLabelUpdateKind const type.
type RecommendedSensitivityLabelUpdateList ¶
type RecommendedSensitivityLabelUpdateList struct {
Operations []*RecommendedSensitivityLabelUpdate
}
RecommendedSensitivityLabelUpdateList - A list of recommended sensitivity label update operations.
func (RecommendedSensitivityLabelUpdateList) MarshalJSON ¶
func (r RecommendedSensitivityLabelUpdateList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecommendedSensitivityLabelUpdateList.
func (*RecommendedSensitivityLabelUpdateList) UnmarshalJSON ¶ added in v1.1.0
func (r *RecommendedSensitivityLabelUpdateList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RecommendedSensitivityLabelUpdateList.
type RecommendedSensitivityLabelUpdateProperties ¶
type RecommendedSensitivityLabelUpdateProperties struct { // REQUIRED; Column name to update. Column *string // REQUIRED Op *RecommendedSensitivityLabelUpdateKind // REQUIRED; Schema name of the column to update. Schema *string // REQUIRED; Table name of the column to update. Table *string }
RecommendedSensitivityLabelUpdateProperties - Properties of an operation executed on a recommended sensitivity label.
func (RecommendedSensitivityLabelUpdateProperties) MarshalJSON ¶ added in v1.1.0
func (r RecommendedSensitivityLabelUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecommendedSensitivityLabelUpdateProperties.
func (*RecommendedSensitivityLabelUpdateProperties) UnmarshalJSON ¶ added in v1.1.0
func (r *RecommendedSensitivityLabelUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RecommendedSensitivityLabelUpdateProperties.
type RecommendedSensitivityLabelsClient ¶
type RecommendedSensitivityLabelsClient struct {
// contains filtered or unexported fields
}
RecommendedSensitivityLabelsClient contains the methods for the RecommendedSensitivityLabels group. Don't use this type directly, use NewRecommendedSensitivityLabelsClient() instead.
func NewRecommendedSensitivityLabelsClient ¶
func NewRecommendedSensitivityLabelsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RecommendedSensitivityLabelsClient, error)
NewRecommendedSensitivityLabelsClient creates a new instance of RecommendedSensitivityLabelsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*RecommendedSensitivityLabelsClient) Update ¶
func (client *RecommendedSensitivityLabelsClient) Update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters RecommendedSensitivityLabelUpdateList, options *RecommendedSensitivityLabelsClientUpdateOptions) (RecommendedSensitivityLabelsClientUpdateResponse, error)
Update - Update recommended sensitivity labels states of a given database using an operations batch. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - RecommendedSensitivityLabelsClientUpdateOptions contains the optional parameters for the RecommendedSensitivityLabelsClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SensitivityLabelsRecommendedUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewRecommendedSensitivityLabelsClient().Update(ctx, "myRG", "myServer", "myDatabase", armsql.RecommendedSensitivityLabelUpdateList{ Operations: []*armsql.RecommendedSensitivityLabelUpdate{ { Properties: &armsql.RecommendedSensitivityLabelUpdateProperties{ Schema: to.Ptr("dbo"), Column: to.Ptr("column1"), Op: to.Ptr(armsql.RecommendedSensitivityLabelUpdateKindEnable), Table: to.Ptr("table1"), }, }, { Properties: &armsql.RecommendedSensitivityLabelUpdateProperties{ Schema: to.Ptr("dbo"), Column: to.Ptr("column2"), Op: to.Ptr(armsql.RecommendedSensitivityLabelUpdateKindEnable), Table: to.Ptr("table2"), }, }, { Properties: &armsql.RecommendedSensitivityLabelUpdateProperties{ Schema: to.Ptr("dbo"), Column: to.Ptr("column3"), Op: to.Ptr(armsql.RecommendedSensitivityLabelUpdateKindDisable), Table: to.Ptr("table1"), }, }}, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
type RecommendedSensitivityLabelsClientUpdateOptions ¶ added in v0.3.0
type RecommendedSensitivityLabelsClientUpdateOptions struct { }
RecommendedSensitivityLabelsClientUpdateOptions contains the optional parameters for the RecommendedSensitivityLabelsClient.Update method.
type RecommendedSensitivityLabelsClientUpdateResponse ¶ added in v0.3.0
type RecommendedSensitivityLabelsClientUpdateResponse struct { }
RecommendedSensitivityLabelsClientUpdateResponse contains the response from method RecommendedSensitivityLabelsClient.Update.
type RecoverableDatabase ¶
type RecoverableDatabase struct { // The properties of a recoverable database Properties *RecoverableDatabaseProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
RecoverableDatabase - A recoverable database
func (RecoverableDatabase) MarshalJSON ¶
func (r RecoverableDatabase) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecoverableDatabase.
func (*RecoverableDatabase) UnmarshalJSON ¶ added in v1.1.0
func (r *RecoverableDatabase) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RecoverableDatabase.
type RecoverableDatabaseListResult ¶
type RecoverableDatabaseListResult struct { // REQUIRED; A list of recoverable databases Value []*RecoverableDatabase }
RecoverableDatabaseListResult - The response to a list recoverable databases request
func (RecoverableDatabaseListResult) MarshalJSON ¶
func (r RecoverableDatabaseListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecoverableDatabaseListResult.
func (*RecoverableDatabaseListResult) UnmarshalJSON ¶ added in v1.1.0
func (r *RecoverableDatabaseListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RecoverableDatabaseListResult.
type RecoverableDatabaseProperties ¶
type RecoverableDatabaseProperties struct { // READ-ONLY; The edition of the database Edition *string // READ-ONLY; The elastic pool name of the database ElasticPoolName *string // READ-ONLY; The last available backup date of the database (ISO8601 format) LastAvailableBackupDate *time.Time // READ-ONLY; The service level objective name of the database ServiceLevelObjective *string }
RecoverableDatabaseProperties - The properties of a recoverable database
func (RecoverableDatabaseProperties) MarshalJSON ¶
func (r RecoverableDatabaseProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecoverableDatabaseProperties.
func (*RecoverableDatabaseProperties) UnmarshalJSON ¶
func (r *RecoverableDatabaseProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RecoverableDatabaseProperties.
type RecoverableDatabasesClient ¶
type RecoverableDatabasesClient struct {
// contains filtered or unexported fields
}
RecoverableDatabasesClient contains the methods for the RecoverableDatabases group. Don't use this type directly, use NewRecoverableDatabasesClient() instead.
func NewRecoverableDatabasesClient ¶
func NewRecoverableDatabasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RecoverableDatabasesClient, error)
NewRecoverableDatabasesClient creates a new instance of RecoverableDatabasesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*RecoverableDatabasesClient) Get ¶
func (client *RecoverableDatabasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *RecoverableDatabasesClientGetOptions) (RecoverableDatabasesClientGetResponse, error)
Get - Gets a recoverable database, which is a resource representing a database's geo backup If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2014-04-01
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database
- options - RecoverableDatabasesClientGetOptions contains the optional parameters for the RecoverableDatabasesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/RecoverableDatabaseGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRecoverableDatabasesClient().Get(ctx, "recoverabledatabasetest-6852", "recoverabledatabasetest-2080", "recoverabledatabasetest-9187", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RecoverableDatabase = armsql.RecoverableDatabase{ // Name: to.Ptr("recoverabledatabasetest-9187"), // Type: to.Ptr("Microsoft.Sql/servers/recoverabledatabases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/recoverabledatabasetest-6852/providers/Microsoft.Sql/servers/recoverabledatabasetest-2080/recoverabledatabases/recoverabledatabasetest-9187"), // Properties: &armsql.RecoverableDatabaseProperties{ // Edition: to.Ptr("Basic"), // LastAvailableBackupDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T01:06:29.780Z"); return t}()), // ServiceLevelObjective: to.Ptr("Basic"), // }, // } }
Output:
func (*RecoverableDatabasesClient) NewListByServerPager ¶ added in v0.5.0
func (client *RecoverableDatabasesClient) NewListByServerPager(resourceGroupName string, serverName string, options *RecoverableDatabasesClientListByServerOptions) *runtime.Pager[RecoverableDatabasesClientListByServerResponse]
NewListByServerPager - Gets a list of recoverable databases
Generated from API version 2014-04-01
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - RecoverableDatabasesClientListByServerOptions contains the optional parameters for the RecoverableDatabasesClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/RecoverableDatabaseList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRecoverableDatabasesClient().NewListByServerPager("recoverabledatabasetest-1234", "recoverabledatabasetest-7177", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RecoverableDatabaseListResult = armsql.RecoverableDatabaseListResult{ // Value: []*armsql.RecoverableDatabase{ // { // Name: to.Ptr("recoverabledatabasetest-1235"), // Type: to.Ptr("Microsoft.Sql/servers/recoverabledatabases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/recoverabledatabasetest-1234/providers/Microsoft.Sql/servers/recoverabledatabasetest-7177/recoverabledatabases/recoverabledatabasetest-1235"), // Properties: &armsql.RecoverableDatabaseProperties{ // Edition: to.Ptr("Standard"), // LastAvailableBackupDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T01:06:29.780Z"); return t}()), // ServiceLevelObjective: to.Ptr("S0"), // }, // }, // { // Name: to.Ptr("recoverabledatabasetest-9231"), // Type: to.Ptr("Microsoft.Sql/servers/recoverabledatabases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/recoverabledatabasetest-1234/providers/Microsoft.Sql/servers/recoverabledatabasetest-7177/recoverabledatabases/recoverabledatabasetest-9231"), // Properties: &armsql.RecoverableDatabaseProperties{ // Edition: to.Ptr("Premium"), // LastAvailableBackupDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-26T03:20:31.780Z"); return t}()), // ServiceLevelObjective: to.Ptr("P1"), // }, // }, // { // Name: to.Ptr("recoverabledatabasetest-0342"), // Type: to.Ptr("Microsoft.Sql/servers/recoverabledatabases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/recoverabledatabasetest-1234/providers/Microsoft.Sql/servers/recoverabledatabasetest-7177/recoverabledatabases/recoverabledatabasetest-0342"), // Properties: &armsql.RecoverableDatabaseProperties{ // Edition: to.Ptr("Basic"), // LastAvailableBackupDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-24T02:06:18.780Z"); return t}()), // ServiceLevelObjective: to.Ptr("Basic"), // }, // }}, // } } }
Output:
type RecoverableDatabasesClientGetOptions ¶ added in v0.3.0
type RecoverableDatabasesClientGetOptions struct { }
RecoverableDatabasesClientGetOptions contains the optional parameters for the RecoverableDatabasesClient.Get method.
type RecoverableDatabasesClientGetResponse ¶ added in v0.3.0
type RecoverableDatabasesClientGetResponse struct { // A recoverable database RecoverableDatabase }
RecoverableDatabasesClientGetResponse contains the response from method RecoverableDatabasesClient.Get.
type RecoverableDatabasesClientListByServerOptions ¶ added in v0.3.0
type RecoverableDatabasesClientListByServerOptions struct { }
RecoverableDatabasesClientListByServerOptions contains the optional parameters for the RecoverableDatabasesClient.NewListByServerPager method.
type RecoverableDatabasesClientListByServerResponse ¶ added in v0.3.0
type RecoverableDatabasesClientListByServerResponse struct { // The response to a list recoverable databases request RecoverableDatabaseListResult }
RecoverableDatabasesClientListByServerResponse contains the response from method RecoverableDatabasesClient.NewListByServerPager.
type RecoverableManagedDatabase ¶
type RecoverableManagedDatabase struct { // Resource properties. Properties *RecoverableManagedDatabaseProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
RecoverableManagedDatabase - A recoverable managed database resource.
func (RecoverableManagedDatabase) MarshalJSON ¶
func (r RecoverableManagedDatabase) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecoverableManagedDatabase.
func (*RecoverableManagedDatabase) UnmarshalJSON ¶ added in v1.1.0
func (r *RecoverableManagedDatabase) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RecoverableManagedDatabase.
type RecoverableManagedDatabaseListResult ¶
type RecoverableManagedDatabaseListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*RecoverableManagedDatabase }
RecoverableManagedDatabaseListResult - A list of recoverable managed databases.
func (RecoverableManagedDatabaseListResult) MarshalJSON ¶
func (r RecoverableManagedDatabaseListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecoverableManagedDatabaseListResult.
func (*RecoverableManagedDatabaseListResult) UnmarshalJSON ¶ added in v1.1.0
func (r *RecoverableManagedDatabaseListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RecoverableManagedDatabaseListResult.
type RecoverableManagedDatabaseProperties ¶
type RecoverableManagedDatabaseProperties struct { // READ-ONLY; The last available backup date. LastAvailableBackupDate *string }
RecoverableManagedDatabaseProperties - The recoverable managed database's properties.
func (RecoverableManagedDatabaseProperties) MarshalJSON ¶ added in v1.1.0
func (r RecoverableManagedDatabaseProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecoverableManagedDatabaseProperties.
func (*RecoverableManagedDatabaseProperties) UnmarshalJSON ¶ added in v1.1.0
func (r *RecoverableManagedDatabaseProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RecoverableManagedDatabaseProperties.
type RecoverableManagedDatabasesClient ¶
type RecoverableManagedDatabasesClient struct {
// contains filtered or unexported fields
}
RecoverableManagedDatabasesClient contains the methods for the RecoverableManagedDatabases group. Don't use this type directly, use NewRecoverableManagedDatabasesClient() instead.
func NewRecoverableManagedDatabasesClient ¶
func NewRecoverableManagedDatabasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RecoverableManagedDatabasesClient, error)
NewRecoverableManagedDatabasesClient creates a new instance of RecoverableManagedDatabasesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*RecoverableManagedDatabasesClient) Get ¶
func (client *RecoverableManagedDatabasesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, recoverableDatabaseName string, options *RecoverableManagedDatabasesClientGetOptions) (RecoverableManagedDatabasesClientGetResponse, error)
Get - Gets a recoverable managed database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - RecoverableManagedDatabasesClientGetOptions contains the optional parameters for the RecoverableManagedDatabasesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetRecoverableManagedDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRecoverableManagedDatabasesClient().Get(ctx, "Test1", "managedInstance", "testdb", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RecoverableManagedDatabase = armsql.RecoverableManagedDatabase{ // Name: to.Ptr("testdb"), // Type: to.Ptr("Microsoft.Sql/managedInstances/recoverableDatabases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/recoverableDatabases/testdb"), // Properties: &armsql.RecoverableManagedDatabaseProperties{ // LastAvailableBackupDate: to.Ptr("2017-05-26T01:06:29.78Z"), // }, // } }
Output:
func (*RecoverableManagedDatabasesClient) NewListByInstancePager ¶ added in v0.5.0
func (client *RecoverableManagedDatabasesClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, options *RecoverableManagedDatabasesClientListByInstanceOptions) *runtime.Pager[RecoverableManagedDatabasesClientListByInstanceResponse]
NewListByInstancePager - Gets a list of recoverable managed databases.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - RecoverableManagedDatabasesClientListByInstanceOptions contains the optional parameters for the RecoverableManagedDatabasesClient.NewListByInstancePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListRecoverableManagedDatabasesByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRecoverableManagedDatabasesClient().NewListByInstancePager("Test1", "managedInstance", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RecoverableManagedDatabaseListResult = armsql.RecoverableManagedDatabaseListResult{ // Value: []*armsql.RecoverableManagedDatabase{ // { // Name: to.Ptr("testdb"), // Type: to.Ptr("Microsoft.Sql/managedInstances/recoverableDaatabases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/recoverableDaatabases/testdb"), // Properties: &armsql.RecoverableManagedDatabaseProperties{ // LastAvailableBackupDate: to.Ptr("2017-05-26T01:06:29.78Z"), // }, // }, // { // Name: to.Ptr("testdb2"), // Type: to.Ptr("Microsoft.Sql/managedInstances/recoverableDaatabases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/recoverableDaatabases/testdb2"), // Properties: &armsql.RecoverableManagedDatabaseProperties{ // LastAvailableBackupDate: to.Ptr("2018-04-26T02:17:23.44Z"), // }, // }}, // } } }
Output:
type RecoverableManagedDatabasesClientGetOptions ¶ added in v0.3.0
type RecoverableManagedDatabasesClientGetOptions struct { }
RecoverableManagedDatabasesClientGetOptions contains the optional parameters for the RecoverableManagedDatabasesClient.Get method.
type RecoverableManagedDatabasesClientGetResponse ¶ added in v0.3.0
type RecoverableManagedDatabasesClientGetResponse struct { // A recoverable managed database resource. RecoverableManagedDatabase }
RecoverableManagedDatabasesClientGetResponse contains the response from method RecoverableManagedDatabasesClient.Get.
type RecoverableManagedDatabasesClientListByInstanceOptions ¶ added in v0.3.0
type RecoverableManagedDatabasesClientListByInstanceOptions struct { }
RecoverableManagedDatabasesClientListByInstanceOptions contains the optional parameters for the RecoverableManagedDatabasesClient.NewListByInstancePager method.
type RecoverableManagedDatabasesClientListByInstanceResponse ¶ added in v0.3.0
type RecoverableManagedDatabasesClientListByInstanceResponse struct { // A list of recoverable managed databases. RecoverableManagedDatabaseListResult }
RecoverableManagedDatabasesClientListByInstanceResponse contains the response from method RecoverableManagedDatabasesClient.NewListByInstancePager.
type ReplicaType ¶
type ReplicaType string
const ( ReplicaTypePrimary ReplicaType = "Primary" ReplicaTypeReadableSecondary ReplicaType = "ReadableSecondary" )
func PossibleReplicaTypeValues ¶
func PossibleReplicaTypeValues() []ReplicaType
PossibleReplicaTypeValues returns the possible values for the ReplicaType const type.
type ReplicationLink ¶
type ReplicationLink struct { // Resource properties. Properties *ReplicationLinkProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ReplicationLink - A replication link.
func (ReplicationLink) MarshalJSON ¶
func (r ReplicationLink) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ReplicationLink.
func (*ReplicationLink) UnmarshalJSON ¶ added in v1.1.0
func (r *ReplicationLink) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationLink.
type ReplicationLinkListResult ¶
type ReplicationLinkListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ReplicationLink }
ReplicationLinkListResult - A list of replication links.
func (ReplicationLinkListResult) MarshalJSON ¶
func (r ReplicationLinkListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ReplicationLinkListResult.
func (*ReplicationLinkListResult) UnmarshalJSON ¶ added in v1.1.0
func (r *ReplicationLinkListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationLinkListResult.
type ReplicationLinkProperties ¶
type ReplicationLinkProperties struct { // READ-ONLY; Whether the user is currently allowed to terminate the link. IsTerminationAllowed *bool // READ-ONLY; Link type (GEO, NAMED). LinkType *ReplicationLinkType // READ-ONLY; Resource partner database. PartnerDatabase *string // READ-ONLY; Resource partner location. PartnerLocation *string // READ-ONLY; Partner replication role. PartnerRole *ReplicationRole // READ-ONLY; Resource partner server. PartnerServer *string // READ-ONLY; Seeding completion percentage for the link. PercentComplete *int32 // READ-ONLY; Replication mode. ReplicationMode *string // READ-ONLY; Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED). ReplicationState *ReplicationState // READ-ONLY; Local replication role. Role *ReplicationRole // READ-ONLY; Time at which the link was created. StartTime *time.Time }
ReplicationLinkProperties - Properties of a replication link.
func (ReplicationLinkProperties) MarshalJSON ¶
func (r ReplicationLinkProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ReplicationLinkProperties.
func (*ReplicationLinkProperties) UnmarshalJSON ¶
func (r *ReplicationLinkProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationLinkProperties.
type ReplicationLinkType ¶
type ReplicationLinkType string
ReplicationLinkType - Link type (GEO, NAMED).
const ( ReplicationLinkTypeGEO ReplicationLinkType = "GEO" ReplicationLinkTypeNAMED ReplicationLinkType = "NAMED" )
func PossibleReplicationLinkTypeValues ¶
func PossibleReplicationLinkTypeValues() []ReplicationLinkType
PossibleReplicationLinkTypeValues returns the possible values for the ReplicationLinkType const type.
type ReplicationLinksClient ¶
type ReplicationLinksClient struct {
// contains filtered or unexported fields
}
ReplicationLinksClient contains the methods for the ReplicationLinks group. Don't use this type directly, use NewReplicationLinksClient() instead.
func NewReplicationLinksClient ¶
func NewReplicationLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationLinksClient, error)
NewReplicationLinksClient creates a new instance of ReplicationLinksClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ReplicationLinksClient) BeginFailover ¶
func (client *ReplicationLinksClient) BeginFailover(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string, options *ReplicationLinksClientBeginFailoverOptions) (*runtime.Poller[ReplicationLinksClientFailoverResponse], error)
BeginFailover - Fails over from the current primary server to this server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- linkID - The name of the replication link.
- options - ReplicationLinksClientBeginFailoverOptions contains the optional parameters for the ReplicationLinksClient.BeginFailover method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ReplicationLinkFailover.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewReplicationLinksClient().BeginFailover(ctx, "Default", "sourcesvr", "gamma-db", "4891ca10-ebd0-47d7-9182-c722651780fb", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ReplicationLink = armsql.ReplicationLink{ // Name: to.Ptr("4891ca10-ebd0-47d7-9182-c722651780fb"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sourcesvr/databases/gamma-db/replicationLinks/4891ca10-ebd0-47d7-9182-c722651780fb"), // Properties: &armsql.ReplicationLinkProperties{ // IsTerminationAllowed: to.Ptr(true), // LinkType: to.Ptr(armsql.ReplicationLinkTypeGEO), // PartnerDatabase: to.Ptr("gamma-db"), // PartnerLocation: to.Ptr("Japan East"), // PartnerRole: to.Ptr(armsql.ReplicationRoleSecondary), // PartnerServer: to.Ptr("testsvr"), // PercentComplete: to.Ptr[int32](100), // ReplicationMode: to.Ptr("ASYNC"), // ReplicationState: to.Ptr(armsql.ReplicationStateCATCHUP), // Role: to.Ptr(armsql.ReplicationRolePrimary), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-21T08:12:43.783Z"); return t}()), // }, // } }
Output:
func (*ReplicationLinksClient) BeginFailoverAllowDataLoss ¶
func (client *ReplicationLinksClient) BeginFailoverAllowDataLoss(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string, options *ReplicationLinksClientBeginFailoverAllowDataLossOptions) (*runtime.Poller[ReplicationLinksClientFailoverAllowDataLossResponse], error)
BeginFailoverAllowDataLoss - Fails over from the current primary server to this server allowing data loss. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- linkID - The name of the replication link.
- options - ReplicationLinksClientBeginFailoverAllowDataLossOptions contains the optional parameters for the ReplicationLinksClient.BeginFailoverAllowDataLoss method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ReplicationLinkFailoverAllowDataLoss.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewReplicationLinksClient().BeginFailoverAllowDataLoss(ctx, "Default", "sourcesvr", "gamma-db", "4891ca10-ebd0-47d7-9182-c722651780fb", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ReplicationLink = armsql.ReplicationLink{ // Name: to.Ptr("4891ca10-ebd0-47d7-9182-c722651780fb"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sourcesvr/databases/gamma-db/replicationLinks/4891ca10-ebd0-47d7-9182-c722651780fb"), // Properties: &armsql.ReplicationLinkProperties{ // IsTerminationAllowed: to.Ptr(true), // LinkType: to.Ptr(armsql.ReplicationLinkTypeGEO), // PartnerDatabase: to.Ptr("gamma-db"), // PartnerLocation: to.Ptr("Japan East"), // PartnerRole: to.Ptr(armsql.ReplicationRoleSecondary), // PartnerServer: to.Ptr("testsvr"), // PercentComplete: to.Ptr[int32](100), // ReplicationMode: to.Ptr("ASYNC"), // ReplicationState: to.Ptr(armsql.ReplicationStateCATCHUP), // Role: to.Ptr(armsql.ReplicationRolePrimary), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-21T08:12:43.783Z"); return t}()), // }, // } }
Output:
func (*ReplicationLinksClient) Delete ¶
func (client *ReplicationLinksClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string, options *ReplicationLinksClientDeleteOptions) (ReplicationLinksClientDeleteResponse, error)
Delete - Deletes the replication link. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - ReplicationLinksClientDeleteOptions contains the optional parameters for the ReplicationLinksClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ReplicationLinkDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewReplicationLinksClient().Delete(ctx, "Default", "sourcesvr", "gamma-db", "4891ca10-ebd0-47d7-9182-c722651780fb", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*ReplicationLinksClient) Get ¶
func (client *ReplicationLinksClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string, options *ReplicationLinksClientGetOptions) (ReplicationLinksClientGetResponse, error)
Get - Gets a replication link. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- linkID - The name of the replication link.
- options - ReplicationLinksClientGetOptions contains the optional parameters for the ReplicationLinksClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ReplicationLinkGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewReplicationLinksClient().Get(ctx, "Default", "sourcesvr", "gamma-db", "4891ca10-ebd0-47d7-9182-c722651780fb", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ReplicationLink = armsql.ReplicationLink{ // Name: to.Ptr("4891ca10-ebd0-47d7-9182-c722651780fb"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sourcesvr/databases/gamma-db/replicationLinks/4891ca10-ebd0-47d7-9182-c722651780fb"), // Properties: &armsql.ReplicationLinkProperties{ // IsTerminationAllowed: to.Ptr(true), // LinkType: to.Ptr(armsql.ReplicationLinkTypeGEO), // PartnerDatabase: to.Ptr("gamma-db"), // PartnerLocation: to.Ptr("Japan East"), // PartnerRole: to.Ptr(armsql.ReplicationRoleSecondary), // PartnerServer: to.Ptr("testsvr"), // PercentComplete: to.Ptr[int32](100), // ReplicationMode: to.Ptr("ASYNC"), // ReplicationState: to.Ptr(armsql.ReplicationStateCATCHUP), // Role: to.Ptr(armsql.ReplicationRolePrimary), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-21T08:12:43.783Z"); return t}()), // }, // } }
Output:
func (*ReplicationLinksClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *ReplicationLinksClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *ReplicationLinksClientListByDatabaseOptions) *runtime.Pager[ReplicationLinksClientListByDatabaseResponse]
NewListByDatabasePager - Gets a list of replication links on database.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - ReplicationLinksClientListByDatabaseOptions contains the optional parameters for the ReplicationLinksClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ReplicationLinkListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewReplicationLinksClient().NewListByDatabasePager("Default", "sourcesvr", "tetha-db", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ReplicationLinkListResult = armsql.ReplicationLinkListResult{ // Value: []*armsql.ReplicationLink{ // { // Name: to.Ptr("fb92de60-eb87-4a58-b250-3362d0cfdf26"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sourcesvr/databases/tetha-db/replicationLinks/fb92de60-eb87-4a58-b250-3362d0cfdf26"), // Properties: &armsql.ReplicationLinkProperties{ // IsTerminationAllowed: to.Ptr(true), // LinkType: to.Ptr(armsql.ReplicationLinkTypeGEO), // PartnerDatabase: to.Ptr("tetha-db"), // PartnerLocation: to.Ptr("Japan East"), // PartnerRole: to.Ptr(armsql.ReplicationRoleSecondary), // PartnerServer: to.Ptr("testsvr"), // PercentComplete: to.Ptr[int32](100), // ReplicationMode: to.Ptr("ASYNC"), // ReplicationState: to.Ptr(armsql.ReplicationStateCATCHUP), // Role: to.Ptr(armsql.ReplicationRolePrimary), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-21T08:11:46.907Z"); return t}()), // }, // }, // { // Name: to.Ptr("6ad1eefc-18a2-4fcb-94f3-4b654ba788d7"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/sourcesvr/databases/tetha-db/replicationLinks/6ad1eefc-18a2-4fcb-94f3-4b654ba788d7"), // Properties: &armsql.ReplicationLinkProperties{ // IsTerminationAllowed: to.Ptr(true), // LinkType: to.Ptr(armsql.ReplicationLinkTypeGEO), // PartnerDatabase: to.Ptr("tetha-db"), // PartnerLocation: to.Ptr("Japan East"), // PartnerRole: to.Ptr(armsql.ReplicationRoleSecondary), // PartnerServer: to.Ptr("targetsvr"), // PercentComplete: to.Ptr[int32](100), // ReplicationMode: to.Ptr("ASYNC"), // ReplicationState: to.Ptr(armsql.ReplicationStateCATCHUP), // Role: to.Ptr(armsql.ReplicationRolePrimary), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-21T08:11:34.423Z"); return t}()), // }, // }}, // } } }
Output:
func (*ReplicationLinksClient) NewListByServerPager ¶ added in v0.5.0
func (client *ReplicationLinksClient) NewListByServerPager(resourceGroupName string, serverName string, options *ReplicationLinksClientListByServerOptions) *runtime.Pager[ReplicationLinksClientListByServerResponse]
NewListByServerPager - Gets a list of replication links.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - ReplicationLinksClientListByServerOptions contains the optional parameters for the ReplicationLinksClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ReplicationLinkListByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewReplicationLinksClient().NewListByServerPager("Default", "sourcesvr", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ReplicationLinkListResult = armsql.ReplicationLinkListResult{ // Value: []*armsql.ReplicationLink{ // { // Name: to.Ptr("fb92de60-eb87-4a58-b250-3362d0cfdf26"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/sourcesvr/databases/tetha-db/replicationLinks/fb92de60-eb87-4a58-b250-3362d0cfdf26"), // Properties: &armsql.ReplicationLinkProperties{ // IsTerminationAllowed: to.Ptr(true), // LinkType: to.Ptr(armsql.ReplicationLinkTypeGEO), // PartnerDatabase: to.Ptr("tetha-db"), // PartnerLocation: to.Ptr("Japan East"), // PartnerRole: to.Ptr(armsql.ReplicationRoleSecondary), // PartnerServer: to.Ptr("testsvr"), // PercentComplete: to.Ptr[int32](100), // ReplicationMode: to.Ptr("ASYNC"), // ReplicationState: to.Ptr(armsql.ReplicationStateCATCHUP), // Role: to.Ptr(armsql.ReplicationRolePrimary), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-21T08:11:46.907Z"); return t}()), // }, // }, // { // Name: to.Ptr("6ad1eefc-18a2-4fcb-94f3-4b654ba788d7"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/sourcesvr/databases/tetha-db/replicationLinks/6ad1eefc-18a2-4fcb-94f3-4b654ba788d7"), // Properties: &armsql.ReplicationLinkProperties{ // IsTerminationAllowed: to.Ptr(true), // LinkType: to.Ptr(armsql.ReplicationLinkTypeGEO), // PartnerDatabase: to.Ptr("tetha-db"), // PartnerLocation: to.Ptr("Japan East"), // PartnerRole: to.Ptr(armsql.ReplicationRoleSecondary), // PartnerServer: to.Ptr("targetsvr"), // PercentComplete: to.Ptr[int32](100), // ReplicationMode: to.Ptr("ASYNC"), // ReplicationState: to.Ptr(armsql.ReplicationStateCATCHUP), // Role: to.Ptr(armsql.ReplicationRolePrimary), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-21T08:11:34.423Z"); return t}()), // }, // }, // { // Name: to.Ptr("4891ca10-ebd0-47d7-9182-c722651780fb"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/sourcesvr/databases/gamma-db/replicationLinks/4891ca10-ebd0-47d7-9182-c722651780fb"), // Properties: &armsql.ReplicationLinkProperties{ // IsTerminationAllowed: to.Ptr(true), // LinkType: to.Ptr(armsql.ReplicationLinkTypeGEO), // PartnerDatabase: to.Ptr("gamma-db"), // PartnerLocation: to.Ptr("Japan East"), // PartnerRole: to.Ptr(armsql.ReplicationRoleSecondary), // PartnerServer: to.Ptr("testsvr"), // PercentComplete: to.Ptr[int32](100), // ReplicationMode: to.Ptr("ASYNC"), // ReplicationState: to.Ptr(armsql.ReplicationStateCATCHUP), // Role: to.Ptr(armsql.ReplicationRolePrimary), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-06-21T08:12:43.783Z"); return t}()), // }, // }}, // } } }
Output:
type ReplicationLinksClientBeginFailoverAllowDataLossOptions ¶ added in v0.3.0
type ReplicationLinksClientBeginFailoverAllowDataLossOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ReplicationLinksClientBeginFailoverAllowDataLossOptions contains the optional parameters for the ReplicationLinksClient.BeginFailoverAllowDataLoss method.
type ReplicationLinksClientBeginFailoverOptions ¶ added in v0.3.0
type ReplicationLinksClientBeginFailoverOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ReplicationLinksClientBeginFailoverOptions contains the optional parameters for the ReplicationLinksClient.BeginFailover method.
type ReplicationLinksClientDeleteOptions ¶ added in v0.3.0
type ReplicationLinksClientDeleteOptions struct { }
ReplicationLinksClientDeleteOptions contains the optional parameters for the ReplicationLinksClient.Delete method.
type ReplicationLinksClientDeleteResponse ¶ added in v0.3.0
type ReplicationLinksClientDeleteResponse struct { }
ReplicationLinksClientDeleteResponse contains the response from method ReplicationLinksClient.Delete.
type ReplicationLinksClientFailoverAllowDataLossResponse ¶ added in v0.3.0
type ReplicationLinksClientFailoverAllowDataLossResponse struct { // A replication link. ReplicationLink }
ReplicationLinksClientFailoverAllowDataLossResponse contains the response from method ReplicationLinksClient.BeginFailoverAllowDataLoss.
type ReplicationLinksClientFailoverResponse ¶ added in v0.3.0
type ReplicationLinksClientFailoverResponse struct { // A replication link. ReplicationLink }
ReplicationLinksClientFailoverResponse contains the response from method ReplicationLinksClient.BeginFailover.
type ReplicationLinksClientGetOptions ¶ added in v0.3.0
type ReplicationLinksClientGetOptions struct { }
ReplicationLinksClientGetOptions contains the optional parameters for the ReplicationLinksClient.Get method.
type ReplicationLinksClientGetResponse ¶ added in v0.3.0
type ReplicationLinksClientGetResponse struct { // A replication link. ReplicationLink }
ReplicationLinksClientGetResponse contains the response from method ReplicationLinksClient.Get.
type ReplicationLinksClientListByDatabaseOptions ¶ added in v0.3.0
type ReplicationLinksClientListByDatabaseOptions struct { }
ReplicationLinksClientListByDatabaseOptions contains the optional parameters for the ReplicationLinksClient.NewListByDatabasePager method.
type ReplicationLinksClientListByDatabaseResponse ¶ added in v0.3.0
type ReplicationLinksClientListByDatabaseResponse struct { // A list of replication links. ReplicationLinkListResult }
ReplicationLinksClientListByDatabaseResponse contains the response from method ReplicationLinksClient.NewListByDatabasePager.
type ReplicationLinksClientListByServerOptions ¶ added in v0.3.0
type ReplicationLinksClientListByServerOptions struct { }
ReplicationLinksClientListByServerOptions contains the optional parameters for the ReplicationLinksClient.NewListByServerPager method.
type ReplicationLinksClientListByServerResponse ¶ added in v0.3.0
type ReplicationLinksClientListByServerResponse struct { // A list of replication links. ReplicationLinkListResult }
ReplicationLinksClientListByServerResponse contains the response from method ReplicationLinksClient.NewListByServerPager.
type ReplicationMode ¶ added in v0.4.0
type ReplicationMode string
ReplicationMode - The replication mode of a distributed availability group. Parameter will be ignored during link creation.
const ( ReplicationModeAsync ReplicationMode = "Async" ReplicationModeSync ReplicationMode = "Sync" )
func PossibleReplicationModeValues ¶ added in v0.4.0
func PossibleReplicationModeValues() []ReplicationMode
PossibleReplicationModeValues returns the possible values for the ReplicationMode const type.
type ReplicationRole ¶
type ReplicationRole string
ReplicationRole - Local replication role.
const ( ReplicationRoleCopy ReplicationRole = "Copy" ReplicationRoleNonReadableSecondary ReplicationRole = "NonReadableSecondary" ReplicationRolePrimary ReplicationRole = "Primary" ReplicationRoleSecondary ReplicationRole = "Secondary" ReplicationRoleSource ReplicationRole = "Source" )
func PossibleReplicationRoleValues ¶
func PossibleReplicationRoleValues() []ReplicationRole
PossibleReplicationRoleValues returns the possible values for the ReplicationRole const type.
type ReplicationState ¶
type ReplicationState string
ReplicationState - Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED).
const ( ReplicationStateCATCHUP ReplicationState = "CATCH_UP" ReplicationStatePENDING ReplicationState = "PENDING" ReplicationStateSEEDING ReplicationState = "SEEDING" ReplicationStateSUSPENDED ReplicationState = "SUSPENDED" )
func PossibleReplicationStateValues ¶
func PossibleReplicationStateValues() []ReplicationState
PossibleReplicationStateValues returns the possible values for the ReplicationState const type.
type Resource ¶
type Resource struct { // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
Resource - ARM resource.
func (Resource) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Resource.
func (*Resource) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Resource.
type ResourceIdentity ¶
type ResourceIdentity struct { // The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal // for the resource. Type *IdentityType // The resource ids of the user assigned identities to use UserAssignedIdentities map[string]*UserIdentity // READ-ONLY; The Azure Active Directory principal id. PrincipalID *string // READ-ONLY; The Azure Active Directory tenant id. TenantID *string }
ResourceIdentity - Azure Active Directory identity configuration for a resource.
func (ResourceIdentity) MarshalJSON ¶
func (r ResourceIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceIdentity.
func (*ResourceIdentity) UnmarshalJSON ¶ added in v1.1.0
func (r *ResourceIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceIdentity.
type ResourceMoveDefinition ¶
type ResourceMoveDefinition struct { // REQUIRED; The target ID for the resource ID *string }
ResourceMoveDefinition - Contains the information necessary to perform a resource move (rename).
func (ResourceMoveDefinition) MarshalJSON ¶ added in v1.1.0
func (r ResourceMoveDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceMoveDefinition.
func (*ResourceMoveDefinition) UnmarshalJSON ¶ added in v1.1.0
func (r *ResourceMoveDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceMoveDefinition.
type ResourceWithWritableName ¶
type ResourceWithWritableName struct { // Resource name. Name *string // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource type. Type *string }
ResourceWithWritableName - ARM resource.
func (ResourceWithWritableName) MarshalJSON ¶ added in v1.1.0
func (r ResourceWithWritableName) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceWithWritableName.
func (*ResourceWithWritableName) UnmarshalJSON ¶ added in v1.1.0
func (r *ResourceWithWritableName) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceWithWritableName.
type RestorableDroppedDatabase ¶
type RestorableDroppedDatabase struct { // Resource location. Location *string // Resource properties. Properties *RestorableDroppedDatabaseProperties // The name and tier of the SKU. SKU *SKU // Resource tags. Tags map[string]*string // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
RestorableDroppedDatabase - A restorable dropped database resource.
func (RestorableDroppedDatabase) MarshalJSON ¶
func (r RestorableDroppedDatabase) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableDroppedDatabase.
func (*RestorableDroppedDatabase) UnmarshalJSON ¶ added in v1.1.0
func (r *RestorableDroppedDatabase) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableDroppedDatabase.
type RestorableDroppedDatabaseListResult ¶
type RestorableDroppedDatabaseListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*RestorableDroppedDatabase }
RestorableDroppedDatabaseListResult - A list of restorable dropped databases.
func (RestorableDroppedDatabaseListResult) MarshalJSON ¶
func (r RestorableDroppedDatabaseListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableDroppedDatabaseListResult.
func (*RestorableDroppedDatabaseListResult) UnmarshalJSON ¶ added in v1.1.0
func (r *RestorableDroppedDatabaseListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableDroppedDatabaseListResult.
type RestorableDroppedDatabaseProperties ¶
type RestorableDroppedDatabaseProperties struct { // READ-ONLY; The storage account type used to store backups for this database. BackupStorageRedundancy *BackupStorageRedundancy // READ-ONLY; The creation date of the database (ISO8601 format). CreationDate *time.Time // READ-ONLY; The name of the database. DatabaseName *string // READ-ONLY; The deletion date of the database (ISO8601 format). DeletionDate *time.Time // READ-ONLY; The earliest restore date of the database (ISO8601 format). EarliestRestoreDate *time.Time // READ-ONLY; The max size of the database expressed in bytes. MaxSizeBytes *int64 }
RestorableDroppedDatabaseProperties - The restorable dropped database's properties.
func (RestorableDroppedDatabaseProperties) MarshalJSON ¶
func (r RestorableDroppedDatabaseProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableDroppedDatabaseProperties.
func (*RestorableDroppedDatabaseProperties) UnmarshalJSON ¶
func (r *RestorableDroppedDatabaseProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableDroppedDatabaseProperties.
type RestorableDroppedDatabasesClient ¶
type RestorableDroppedDatabasesClient struct {
// contains filtered or unexported fields
}
RestorableDroppedDatabasesClient contains the methods for the RestorableDroppedDatabases group. Don't use this type directly, use NewRestorableDroppedDatabasesClient() instead.
func NewRestorableDroppedDatabasesClient ¶
func NewRestorableDroppedDatabasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableDroppedDatabasesClient, error)
NewRestorableDroppedDatabasesClient creates a new instance of RestorableDroppedDatabasesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*RestorableDroppedDatabasesClient) Get ¶
func (client *RestorableDroppedDatabasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, restorableDroppedDatabaseID string, options *RestorableDroppedDatabasesClientGetOptions) (RestorableDroppedDatabasesClientGetResponse, error)
Get - Gets a restorable dropped database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - RestorableDroppedDatabasesClientGetOptions contains the optional parameters for the RestorableDroppedDatabasesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/GetRestorableDroppedDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRestorableDroppedDatabasesClient().Get(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb,131403269876900000", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RestorableDroppedDatabase = armsql.RestorableDroppedDatabase{ // Name: to.Ptr("testdb,131403269876900000"), // Type: to.Ptr("Microsoft.Sql/servers/restorableDroppedDatabases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/restorableDroppedDatabases/testdb"), // Location: to.Ptr("southeastasia"), // Properties: &armsql.RestorableDroppedDatabaseProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-07T04:41:33.937Z"); return t}()), // DatabaseName: to.Ptr("testdb"), // DeletionDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-27T02:49:47.690Z"); return t}()), // MaxSizeBytes: to.Ptr[int64](268435456000), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("BC_Gen4_2"), // Tier: to.Ptr("BusinessCritical"), // }, // } }
Output:
func (*RestorableDroppedDatabasesClient) NewListByServerPager ¶ added in v0.5.0
func (client *RestorableDroppedDatabasesClient) NewListByServerPager(resourceGroupName string, serverName string, options *RestorableDroppedDatabasesClientListByServerOptions) *runtime.Pager[RestorableDroppedDatabasesClientListByServerResponse]
NewListByServerPager - Gets a list of restorable dropped databases.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - RestorableDroppedDatabasesClientListByServerOptions contains the optional parameters for the RestorableDroppedDatabasesClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ListRestorableDroppedDatabasesByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRestorableDroppedDatabasesClient().NewListByServerPager("Default-SQL-SouthEastAsia", "testsvr", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RestorableDroppedDatabaseListResult = armsql.RestorableDroppedDatabaseListResult{ // Value: []*armsql.RestorableDroppedDatabase{ // { // Name: to.Ptr("testdb,131403269876900000"), // Type: to.Ptr("Microsoft.Sql/servers/restorableDroppedDatabases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/restorableDroppedDatabases/testdb"), // Location: to.Ptr("southeastasia"), // Properties: &armsql.RestorableDroppedDatabaseProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:41:33.937Z"); return t}()), // DatabaseName: to.Ptr("testdb"), // DeletionDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-27T02:49:47.690Z"); return t}()), // MaxSizeBytes: to.Ptr[int64](268435456000), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("BC_Gen4_2"), // Tier: to.Ptr("BusinessCritical"), // }, // }, // { // Name: to.Ptr("testdb2,131403269876900000"), // Type: to.Ptr("Microsoft.Sql/servers/restorableDroppedDatabases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/restorableDroppedDatabases/testdb2"), // Location: to.Ptr("southeastasia"), // Properties: &armsql.RestorableDroppedDatabaseProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T04:41:33.937Z"); return t}()), // DatabaseName: to.Ptr("testdb2"), // DeletionDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-27T02:49:47.690Z"); return t}()), // MaxSizeBytes: to.Ptr[int64](268435456000), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen4_2"), // Tier: to.Ptr("GeneralPurpose"), // }, // }}, // } } }
Output:
type RestorableDroppedDatabasesClientGetOptions ¶ added in v0.3.0
type RestorableDroppedDatabasesClientGetOptions struct { }
RestorableDroppedDatabasesClientGetOptions contains the optional parameters for the RestorableDroppedDatabasesClient.Get method.
type RestorableDroppedDatabasesClientGetResponse ¶ added in v0.3.0
type RestorableDroppedDatabasesClientGetResponse struct { // A restorable dropped database resource. RestorableDroppedDatabase }
RestorableDroppedDatabasesClientGetResponse contains the response from method RestorableDroppedDatabasesClient.Get.
type RestorableDroppedDatabasesClientListByServerOptions ¶ added in v0.3.0
type RestorableDroppedDatabasesClientListByServerOptions struct { }
RestorableDroppedDatabasesClientListByServerOptions contains the optional parameters for the RestorableDroppedDatabasesClient.NewListByServerPager method.
type RestorableDroppedDatabasesClientListByServerResponse ¶ added in v0.3.0
type RestorableDroppedDatabasesClientListByServerResponse struct { // A list of restorable dropped databases. RestorableDroppedDatabaseListResult }
RestorableDroppedDatabasesClientListByServerResponse contains the response from method RestorableDroppedDatabasesClient.NewListByServerPager.
type RestorableDroppedManagedDatabase ¶
type RestorableDroppedManagedDatabase struct { // REQUIRED; Resource location. Location *string // Resource properties. Properties *RestorableDroppedManagedDatabaseProperties // Resource tags. Tags map[string]*string // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
RestorableDroppedManagedDatabase - A restorable dropped managed database resource.
func (RestorableDroppedManagedDatabase) MarshalJSON ¶
func (r RestorableDroppedManagedDatabase) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableDroppedManagedDatabase.
func (*RestorableDroppedManagedDatabase) UnmarshalJSON ¶ added in v1.1.0
func (r *RestorableDroppedManagedDatabase) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableDroppedManagedDatabase.
type RestorableDroppedManagedDatabaseListResult ¶
type RestorableDroppedManagedDatabaseListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*RestorableDroppedManagedDatabase }
RestorableDroppedManagedDatabaseListResult - A list of restorable dropped managed databases.
func (RestorableDroppedManagedDatabaseListResult) MarshalJSON ¶
func (r RestorableDroppedManagedDatabaseListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableDroppedManagedDatabaseListResult.
func (*RestorableDroppedManagedDatabaseListResult) UnmarshalJSON ¶ added in v1.1.0
func (r *RestorableDroppedManagedDatabaseListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableDroppedManagedDatabaseListResult.
type RestorableDroppedManagedDatabaseProperties ¶
type RestorableDroppedManagedDatabaseProperties struct { // READ-ONLY; The creation date of the database (ISO8601 format). CreationDate *time.Time // READ-ONLY; The name of the database. DatabaseName *string // READ-ONLY; The deletion date of the database (ISO8601 format). DeletionDate *time.Time // READ-ONLY; The earliest restore date of the database (ISO8601 format). EarliestRestoreDate *time.Time }
RestorableDroppedManagedDatabaseProperties - The restorable dropped managed database's properties.
func (RestorableDroppedManagedDatabaseProperties) MarshalJSON ¶
func (r RestorableDroppedManagedDatabaseProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableDroppedManagedDatabaseProperties.
func (*RestorableDroppedManagedDatabaseProperties) UnmarshalJSON ¶
func (r *RestorableDroppedManagedDatabaseProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableDroppedManagedDatabaseProperties.
type RestorableDroppedManagedDatabasesClient ¶
type RestorableDroppedManagedDatabasesClient struct {
// contains filtered or unexported fields
}
RestorableDroppedManagedDatabasesClient contains the methods for the RestorableDroppedManagedDatabases group. Don't use this type directly, use NewRestorableDroppedManagedDatabasesClient() instead.
func NewRestorableDroppedManagedDatabasesClient ¶
func NewRestorableDroppedManagedDatabasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorableDroppedManagedDatabasesClient, error)
NewRestorableDroppedManagedDatabasesClient creates a new instance of RestorableDroppedManagedDatabasesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*RestorableDroppedManagedDatabasesClient) Get ¶
func (client *RestorableDroppedManagedDatabasesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, restorableDroppedDatabaseID string, options *RestorableDroppedManagedDatabasesClientGetOptions) (RestorableDroppedManagedDatabasesClientGetResponse, error)
Get - Gets a restorable dropped managed database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - RestorableDroppedManagedDatabasesClientGetOptions contains the optional parameters for the RestorableDroppedManagedDatabasesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/GetRestorableDroppedManagedDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRestorableDroppedManagedDatabasesClient().Get(ctx, "Test1", "managedInstance", "testdb,131403269876900000", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RestorableDroppedManagedDatabase = armsql.RestorableDroppedManagedDatabase{ // Name: to.Ptr("testdb,131403269876900000"), // Type: to.Ptr("Microsoft.Sql/managedInstances/restorableDroppedDatabases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/restorableDroppedDatabases/testdb,131403269876900000"), // Location: to.Ptr("southeastasia"), // Properties: &armsql.RestorableDroppedManagedDatabaseProperties{ // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-07T04:41:33.937Z"); return t}()), // DatabaseName: to.Ptr("testdb"), // DeletionDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-27T02:49:47.690Z"); return t}()), // }, // } }
Output:
func (*RestorableDroppedManagedDatabasesClient) NewListByInstancePager ¶ added in v0.5.0
func (client *RestorableDroppedManagedDatabasesClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, options *RestorableDroppedManagedDatabasesClientListByInstanceOptions) *runtime.Pager[RestorableDroppedManagedDatabasesClientListByInstanceResponse]
NewListByInstancePager - Gets a list of restorable dropped managed databases.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - RestorableDroppedManagedDatabasesClientListByInstanceOptions contains the optional parameters for the RestorableDroppedManagedDatabasesClient.NewListByInstancePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/RestorableDroppedManagedDatabaseListByManagedInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRestorableDroppedManagedDatabasesClient().NewListByInstancePager("Test1", "managedInstance", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RestorableDroppedManagedDatabaseListResult = armsql.RestorableDroppedManagedDatabaseListResult{ // Value: []*armsql.RestorableDroppedManagedDatabase{ // { // Name: to.Ptr("testdb,131403269876900000"), // Type: to.Ptr("Microsoft.Sql/managedInstances/restorableDroppedDatabases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/restorableDroppedDatabases/testdb,131403269876900000"), // Location: to.Ptr("southeastasia"), // Properties: &armsql.RestorableDroppedManagedDatabaseProperties{ // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-07T04:41:33.937Z"); return t}()), // DatabaseName: to.Ptr("testdb"), // DeletionDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-27T02:49:47.690Z"); return t}()), // }, // }, // { // Name: to.Ptr("testdb2,131403269876900000"), // Type: to.Ptr("Microsoft.Sql/managedInstances/restorableDroppedDatabases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/restorableDroppedDatabases/testdb2,131403269876900000"), // Location: to.Ptr("southeastasia"), // Properties: &armsql.RestorableDroppedManagedDatabaseProperties{ // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-07T04:41:33.937Z"); return t}()), // DatabaseName: to.Ptr("testdb2"), // DeletionDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-27T02:49:47.690Z"); return t}()), // }, // }}, // } } }
Output:
type RestorableDroppedManagedDatabasesClientGetOptions ¶ added in v0.3.0
type RestorableDroppedManagedDatabasesClientGetOptions struct { }
RestorableDroppedManagedDatabasesClientGetOptions contains the optional parameters for the RestorableDroppedManagedDatabasesClient.Get method.
type RestorableDroppedManagedDatabasesClientGetResponse ¶ added in v0.3.0
type RestorableDroppedManagedDatabasesClientGetResponse struct { // A restorable dropped managed database resource. RestorableDroppedManagedDatabase }
RestorableDroppedManagedDatabasesClientGetResponse contains the response from method RestorableDroppedManagedDatabasesClient.Get.
type RestorableDroppedManagedDatabasesClientListByInstanceOptions ¶ added in v0.3.0
type RestorableDroppedManagedDatabasesClientListByInstanceOptions struct { }
RestorableDroppedManagedDatabasesClientListByInstanceOptions contains the optional parameters for the RestorableDroppedManagedDatabasesClient.NewListByInstancePager method.
type RestorableDroppedManagedDatabasesClientListByInstanceResponse ¶ added in v0.3.0
type RestorableDroppedManagedDatabasesClientListByInstanceResponse struct { // A list of restorable dropped managed databases. RestorableDroppedManagedDatabaseListResult }
RestorableDroppedManagedDatabasesClientListByInstanceResponse contains the response from method RestorableDroppedManagedDatabasesClient.NewListByInstancePager.
type RestoreDetailsName ¶
type RestoreDetailsName string
const (
RestoreDetailsNameDefault RestoreDetailsName = "Default"
)
func PossibleRestoreDetailsNameValues ¶
func PossibleRestoreDetailsNameValues() []RestoreDetailsName
PossibleRestoreDetailsNameValues returns the possible values for the RestoreDetailsName const type.
type RestorePoint ¶
type RestorePoint struct { // Resource properties. Properties *RestorePointProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource location. Location *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
RestorePoint - Database restore points.
func (RestorePoint) MarshalJSON ¶
func (r RestorePoint) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorePoint.
func (*RestorePoint) UnmarshalJSON ¶ added in v1.1.0
func (r *RestorePoint) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorePoint.
type RestorePointListResult ¶
type RestorePointListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*RestorePoint }
RestorePointListResult - A list of long term retention backups.
func (RestorePointListResult) MarshalJSON ¶
func (r RestorePointListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorePointListResult.
func (*RestorePointListResult) UnmarshalJSON ¶ added in v1.1.0
func (r *RestorePointListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorePointListResult.
type RestorePointProperties ¶
type RestorePointProperties struct { // READ-ONLY; The earliest time to which this database can be restored EarliestRestoreDate *time.Time // READ-ONLY; The time the backup was taken RestorePointCreationDate *time.Time // READ-ONLY; The label of restore point for backup request by user RestorePointLabel *string // READ-ONLY; The type of restore point RestorePointType *RestorePointType }
RestorePointProperties - Properties of a database restore point
func (RestorePointProperties) MarshalJSON ¶
func (r RestorePointProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorePointProperties.
func (*RestorePointProperties) UnmarshalJSON ¶
func (r *RestorePointProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorePointProperties.
type RestorePointType ¶
type RestorePointType string
RestorePointType - The type of restore point
const ( RestorePointTypeCONTINUOUS RestorePointType = "CONTINUOUS" RestorePointTypeDISCRETE RestorePointType = "DISCRETE" )
func PossibleRestorePointTypeValues ¶
func PossibleRestorePointTypeValues() []RestorePointType
PossibleRestorePointTypeValues returns the possible values for the RestorePointType const type.
type RestorePointsClient ¶
type RestorePointsClient struct {
// contains filtered or unexported fields
}
RestorePointsClient contains the methods for the RestorePoints group. Don't use this type directly, use NewRestorePointsClient() instead.
func NewRestorePointsClient ¶
func NewRestorePointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RestorePointsClient, error)
NewRestorePointsClient creates a new instance of RestorePointsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*RestorePointsClient) BeginCreate ¶
func (client *RestorePointsClient) BeginCreate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters CreateDatabaseRestorePointDefinition, options *RestorePointsClientBeginCreateOptions) (*runtime.Poller[RestorePointsClientCreateResponse], error)
BeginCreate - Creates a restore point for a data warehouse. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- parameters - The definition for creating the restore point of this database.
- options - RestorePointsClientBeginCreateOptions contains the optional parameters for the RestorePointsClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRestorePointsPost.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewRestorePointsClient().BeginCreate(ctx, "Default-SQL-SouthEastAsia", "testserver", "testDatabase", armsql.CreateDatabaseRestorePointDefinition{ RestorePointLabel: to.Ptr("mylabel"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RestorePoint = armsql.RestorePoint{ // Name: to.Ptr("131546477590000000"), // Type: to.Ptr("Microsoft.Sql/servers/databases/restorePoints"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/servers/testserver/databases/testDatabase/restorePoints/131546477590000000"), // Location: to.Ptr("japaneast"), // Properties: &armsql.RestorePointProperties{ // RestorePointCreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // RestorePointLabel: to.Ptr("mylabel"), // RestorePointType: to.Ptr(armsql.RestorePointTypeDISCRETE), // }, // } }
Output:
func (*RestorePointsClient) Delete ¶
func (client *RestorePointsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, restorePointName string, options *RestorePointsClientDeleteOptions) (RestorePointsClientDeleteResponse, error)
Delete - Deletes a restore point. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- restorePointName - The name of the restore point.
- options - RestorePointsClientDeleteOptions contains the optional parameters for the RestorePointsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRestorePointsDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewRestorePointsClient().Delete(ctx, "Default-SQL-SouthEastAsia", "testserver", "testDatabase", "131546477590000000", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*RestorePointsClient) Get ¶
func (client *RestorePointsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, restorePointName string, options *RestorePointsClientGetOptions) (RestorePointsClientGetResponse, error)
Get - Gets a restore point. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- restorePointName - The name of the restore point.
- options - RestorePointsClientGetOptions contains the optional parameters for the RestorePointsClient.Get method.
Example (GetsADatabaseRestorePoint) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRestorePointsGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRestorePointsClient().Get(ctx, "Default-SQL-SouthEastAsia", "testserver", "testDatabase", "131546477590000000", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RestorePoint = armsql.RestorePoint{ // Name: to.Ptr("ContinuousRestorePoint"), // Type: to.Ptr("Microsoft.Sql/servers/databases/restorePoints"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/servers/testserver/databases/testDatabase/restorePoints/ContinuousRestorePoint"), // Location: to.Ptr("japaneast"), // Properties: &armsql.RestorePointProperties{ // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // RestorePointType: to.Ptr(armsql.RestorePointTypeCONTINUOUS), // }, // } }
Output:
Example (GetsADatawarehouseDatabaseRestorePoint) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DataWarehouseRestorePointsGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewRestorePointsClient().Get(ctx, "Default-SQL-SouthEastAsia", "testserver", "testDatabase", "131546477590000000", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.RestorePoint = armsql.RestorePoint{ // Name: to.Ptr("131546477590000000"), // Type: to.Ptr("Microsoft.Sql/servers/databases/restorePoints"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/servers/testserver/databases/testDatabase/restorePoints/131546477590000000"), // Location: to.Ptr("japaneast"), // Properties: &armsql.RestorePointProperties{ // RestorePointCreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // RestorePointLabel: to.Ptr("mylabel"), // RestorePointType: to.Ptr(armsql.RestorePointTypeDISCRETE), // }, // } }
Output:
func (*RestorePointsClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *RestorePointsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *RestorePointsClientListByDatabaseOptions) *runtime.Pager[RestorePointsClientListByDatabaseResponse]
NewListByDatabasePager - Gets a list of database restore points.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - RestorePointsClientListByDatabaseOptions contains the optional parameters for the RestorePointsClient.NewListByDatabasePager method.
Example (ListDatabaseRestorePoints) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRestorePointsListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRestorePointsClient().NewListByDatabasePager("sqlcrudtest-6730", "sqlcrudtest-9007", "3481", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RestorePointListResult = armsql.RestorePointListResult{ // Value: []*armsql.RestorePoint{ // { // Name: to.Ptr("ContinuousRestorePoint"), // Type: to.Ptr("Microsoft.Sql/servers/databases/restorePoints"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/sqlcrudtest-9007/databases/3481/restorepoints/ContinuousRestorePoint"), // Location: to.Ptr("West US"), // Properties: &armsql.RestorePointProperties{ // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-12T00:00:00.000Z"); return t}()), // RestorePointType: to.Ptr(armsql.RestorePointTypeCONTINUOUS), // }, // }}, // } } }
Output:
Example (ListDatawarehouseDatabaseRestorePoints) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DataWarehouseRestorePointsListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewRestorePointsClient().NewListByDatabasePager("Default-SQL-SouthEastAsia", "testserver", "testDatabase", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.RestorePointListResult = armsql.RestorePointListResult{ // Value: []*armsql.RestorePoint{ // { // Name: to.Ptr("131546477590000000"), // Type: to.Ptr("Microsoft.Sql/servers/databases/restorePoints"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/servers/testserver/databases/testDatabase/restorePoints/131546477590000000"), // Location: to.Ptr("japaneast"), // Properties: &armsql.RestorePointProperties{ // RestorePointCreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-10T08:00:00.000Z"); return t}()), // RestorePointLabel: to.Ptr("mylabel1"), // RestorePointType: to.Ptr(armsql.RestorePointTypeDISCRETE), // }, // }, // { // Name: to.Ptr("131553636140000000"), // Type: to.Ptr("Microsoft.Sql/servers/databases/restorePoints"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/servers/testserver/databases/testDatabase/restorePoints/131553636140000000"), // Location: to.Ptr("japaneast"), // Properties: &armsql.RestorePointProperties{ // RestorePointCreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-17T03:40:14.000Z"); return t}()), // RestorePointLabel: to.Ptr("mylabel2"), // RestorePointType: to.Ptr(armsql.RestorePointTypeDISCRETE), // }, // }, // { // Name: to.Ptr("131553619750000000"), // Type: to.Ptr("Microsoft.Sql/servers/databases/restorePoints"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/servers/testserver/databases/testDatabase/restorePoints/131553619750000000"), // Location: to.Ptr("japaneast"), // Properties: &armsql.RestorePointProperties{ // RestorePointCreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-11-17T03:12:55.000Z"); return t}()), // RestorePointType: to.Ptr(armsql.RestorePointTypeDISCRETE), // }, // }}, // } } }
Output:
type RestorePointsClientBeginCreateOptions ¶ added in v0.3.0
type RestorePointsClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
RestorePointsClientBeginCreateOptions contains the optional parameters for the RestorePointsClient.BeginCreate method.
type RestorePointsClientCreateResponse ¶ added in v0.3.0
type RestorePointsClientCreateResponse struct { // Database restore points. RestorePoint }
RestorePointsClientCreateResponse contains the response from method RestorePointsClient.BeginCreate.
type RestorePointsClientDeleteOptions ¶ added in v0.3.0
type RestorePointsClientDeleteOptions struct { }
RestorePointsClientDeleteOptions contains the optional parameters for the RestorePointsClient.Delete method.
type RestorePointsClientDeleteResponse ¶ added in v0.3.0
type RestorePointsClientDeleteResponse struct { }
RestorePointsClientDeleteResponse contains the response from method RestorePointsClient.Delete.
type RestorePointsClientGetOptions ¶ added in v0.3.0
type RestorePointsClientGetOptions struct { }
RestorePointsClientGetOptions contains the optional parameters for the RestorePointsClient.Get method.
type RestorePointsClientGetResponse ¶ added in v0.3.0
type RestorePointsClientGetResponse struct { // Database restore points. RestorePoint }
RestorePointsClientGetResponse contains the response from method RestorePointsClient.Get.
type RestorePointsClientListByDatabaseOptions ¶ added in v0.3.0
type RestorePointsClientListByDatabaseOptions struct { }
RestorePointsClientListByDatabaseOptions contains the optional parameters for the RestorePointsClient.NewListByDatabasePager method.
type RestorePointsClientListByDatabaseResponse ¶ added in v0.3.0
type RestorePointsClientListByDatabaseResponse struct { // A list of long term retention backups. RestorePointListResult }
RestorePointsClientListByDatabaseResponse contains the response from method RestorePointsClient.NewListByDatabasePager.
type SKU ¶
type SKU struct { // REQUIRED; The name of the SKU, typically, a letter + Number code, e.g. P3. Name *string // Capacity of the particular SKU. Capacity *int32 // If the service has different generations of hardware, for the same SKU, then that can be captured here. Family *string // Size of the particular SKU Size *string // The tier or edition of the particular SKU, e.g. Basic, Premium. Tier *string }
SKU - An ARM Resource SKU.
func (SKU) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type SKU.
func (*SKU) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type SKU.
type SQLAgentConfigurationPropertiesState ¶
type SQLAgentConfigurationPropertiesState string
SQLAgentConfigurationPropertiesState - The state of Sql Agent.
const ( SQLAgentConfigurationPropertiesStateDisabled SQLAgentConfigurationPropertiesState = "Disabled" SQLAgentConfigurationPropertiesStateEnabled SQLAgentConfigurationPropertiesState = "Enabled" )
func PossibleSQLAgentConfigurationPropertiesStateValues ¶
func PossibleSQLAgentConfigurationPropertiesStateValues() []SQLAgentConfigurationPropertiesState
PossibleSQLAgentConfigurationPropertiesStateValues returns the possible values for the SQLAgentConfigurationPropertiesState const type.
type SampleName ¶
type SampleName string
SampleName - The name of the sample schema to apply when creating this database.
const ( SampleNameAdventureWorksLT SampleName = "AdventureWorksLT" SampleNameWideWorldImportersFull SampleName = "WideWorldImportersFull" SampleNameWideWorldImportersStd SampleName = "WideWorldImportersStd" )
func PossibleSampleNameValues ¶
func PossibleSampleNameValues() []SampleName
PossibleSampleNameValues returns the possible values for the SampleName const type.
type SecondaryType ¶
type SecondaryType string
SecondaryType - The secondary type of the database if it is a secondary. Valid values are Geo and Named.
const ( SecondaryTypeGeo SecondaryType = "Geo" SecondaryTypeNamed SecondaryType = "Named" )
func PossibleSecondaryTypeValues ¶
func PossibleSecondaryTypeValues() []SecondaryType
PossibleSecondaryTypeValues returns the possible values for the SecondaryType const type.
type SecurityAlertPolicyName ¶
type SecurityAlertPolicyName string
const (
SecurityAlertPolicyNameDefault SecurityAlertPolicyName = "Default"
)
func PossibleSecurityAlertPolicyNameValues ¶
func PossibleSecurityAlertPolicyNameValues() []SecurityAlertPolicyName
PossibleSecurityAlertPolicyNameValues returns the possible values for the SecurityAlertPolicyName const type.
type SecurityAlertPolicyProperties ¶
type SecurityAlertPolicyProperties struct { // REQUIRED; Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on // the specific database. State *SecurityAlertPolicyState // Specifies an array of alerts that are disabled. Allowed values are: SqlInjection, SqlInjectionVulnerability, AccessAnomaly, // DataExfiltration, UnsafeAction, Brute_Force DisabledAlerts []*string // Specifies that the alert is sent to the account administrators. EmailAccountAdmins *bool // Specifies an array of e-mail addresses to which the alert is sent. EmailAddresses []*string // Specifies the number of days to keep in the Threat Detection audit logs. RetentionDays *int32 // Specifies the identifier key of the Threat Detection audit storage account. StorageAccountAccessKey *string // Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat // Detection audit logs. StorageEndpoint *string // READ-ONLY; Specifies the UTC creation time of the policy. CreationTime *time.Time }
SecurityAlertPolicyProperties - Properties of a security alert policy.
func (SecurityAlertPolicyProperties) MarshalJSON ¶
func (s SecurityAlertPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SecurityAlertPolicyProperties.
func (*SecurityAlertPolicyProperties) UnmarshalJSON ¶
func (s *SecurityAlertPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SecurityAlertPolicyProperties.
type SecurityAlertPolicyState ¶
type SecurityAlertPolicyState string
SecurityAlertPolicyState - Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database.
const ( SecurityAlertPolicyStateDisabled SecurityAlertPolicyState = "Disabled" SecurityAlertPolicyStateEnabled SecurityAlertPolicyState = "Enabled" SecurityAlertPolicyStateNew SecurityAlertPolicyState = "New" )
func PossibleSecurityAlertPolicyStateValues ¶
func PossibleSecurityAlertPolicyStateValues() []SecurityAlertPolicyState
PossibleSecurityAlertPolicyStateValues returns the possible values for the SecurityAlertPolicyState const type.
type SecurityAlertsPolicyProperties ¶
type SecurityAlertsPolicyProperties struct { // REQUIRED; Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on // the specific database. State *SecurityAlertsPolicyState // Specifies an array of alerts that are disabled. Allowed values are: SqlInjection, SqlInjectionVulnerability, AccessAnomaly, // DataExfiltration, UnsafeAction, Brute_Force DisabledAlerts []*string // Specifies that the alert is sent to the account administrators. EmailAccountAdmins *bool // Specifies an array of e-mail addresses to which the alert is sent. EmailAddresses []*string // Specifies the number of days to keep in the Threat Detection audit logs. RetentionDays *int32 // Specifies the identifier key of the Threat Detection audit storage account. StorageAccountAccessKey *string // Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat // Detection audit logs. StorageEndpoint *string // READ-ONLY; Specifies the UTC creation time of the policy. CreationTime *time.Time }
SecurityAlertsPolicyProperties - Properties of a security alert policy.
func (SecurityAlertsPolicyProperties) MarshalJSON ¶
func (s SecurityAlertsPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SecurityAlertsPolicyProperties.
func (*SecurityAlertsPolicyProperties) UnmarshalJSON ¶
func (s *SecurityAlertsPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SecurityAlertsPolicyProperties.
type SecurityAlertsPolicyState ¶
type SecurityAlertsPolicyState string
SecurityAlertsPolicyState - Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database.
const ( SecurityAlertsPolicyStateDisabled SecurityAlertsPolicyState = "Disabled" SecurityAlertsPolicyStateEnabled SecurityAlertsPolicyState = "Enabled" )
func PossibleSecurityAlertsPolicyStateValues ¶
func PossibleSecurityAlertsPolicyStateValues() []SecurityAlertsPolicyState
PossibleSecurityAlertsPolicyStateValues returns the possible values for the SecurityAlertsPolicyState const type.
type SecurityEvent ¶
type SecurityEvent struct { // Resource properties. Properties *SecurityEventProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
SecurityEvent - A security event.
func (SecurityEvent) MarshalJSON ¶
func (s SecurityEvent) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SecurityEvent.
func (*SecurityEvent) UnmarshalJSON ¶ added in v1.1.0
func (s *SecurityEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SecurityEvent.
type SecurityEventCollection ¶
type SecurityEventCollection struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*SecurityEvent }
SecurityEventCollection - A list of security events.
func (SecurityEventCollection) MarshalJSON ¶
func (s SecurityEventCollection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SecurityEventCollection.
func (*SecurityEventCollection) UnmarshalJSON ¶ added in v1.1.0
func (s *SecurityEventCollection) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SecurityEventCollection.
type SecurityEventProperties ¶
type SecurityEventProperties struct { // READ-ONLY; The application used to execute the statement. ApplicationName *string // READ-ONLY; The IP address of the client who executed the statement. ClientIP *string // READ-ONLY; The database name Database *string // READ-ONLY; The time when the security event occurred. EventTime *time.Time // READ-ONLY; The principal user who executed the statement PrincipalName *string // READ-ONLY; The sql injection additional properties, populated only if the type of the security event is sql injection. SecurityEventSQLInjectionAdditionalProperties *SecurityEventSQLInjectionAdditionalProperties // READ-ONLY; The type of the security event. SecurityEventType *SecurityEventType // READ-ONLY; The server name Server *string // READ-ONLY; The subscription name Subscription *string }
SecurityEventProperties - The properties of a security event.
func (SecurityEventProperties) MarshalJSON ¶
func (s SecurityEventProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SecurityEventProperties.
func (*SecurityEventProperties) UnmarshalJSON ¶
func (s *SecurityEventProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SecurityEventProperties.
type SecurityEventSQLInjectionAdditionalProperties ¶
type SecurityEventSQLInjectionAdditionalProperties struct { // READ-ONLY; The sql error code ErrorCode *int32 // READ-ONLY; The sql error message ErrorMessage *string // READ-ONLY; The sql error severity ErrorSeverity *int32 // READ-ONLY; The statement Statement *string // READ-ONLY; The statement highlight length StatementHighlightLength *int32 // READ-ONLY; The statement highlight offset StatementHighlightOffset *int32 // READ-ONLY; The threat ID. ThreatID *string }
SecurityEventSQLInjectionAdditionalProperties - The properties of a security event sql injection additional properties.
func (SecurityEventSQLInjectionAdditionalProperties) MarshalJSON ¶ added in v1.1.0
func (s SecurityEventSQLInjectionAdditionalProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SecurityEventSQLInjectionAdditionalProperties.
func (*SecurityEventSQLInjectionAdditionalProperties) UnmarshalJSON ¶ added in v1.1.0
func (s *SecurityEventSQLInjectionAdditionalProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SecurityEventSQLInjectionAdditionalProperties.
type SecurityEventType ¶
type SecurityEventType string
SecurityEventType - The type of the security event.
const ( SecurityEventTypeSQLInjectionExploit SecurityEventType = "SqlInjectionExploit" SecurityEventTypeSQLInjectionVulnerability SecurityEventType = "SqlInjectionVulnerability" SecurityEventTypeUndefined SecurityEventType = "Undefined" )
func PossibleSecurityEventTypeValues ¶
func PossibleSecurityEventTypeValues() []SecurityEventType
PossibleSecurityEventTypeValues returns the possible values for the SecurityEventType const type.
type SecurityEventsFilterParameters ¶
type SecurityEventsFilterParameters struct { // Filter on the event time. EventTime *time.Time // Whether to show server records or not. ShowServerRecords *bool }
SecurityEventsFilterParameters - The properties that are supported in the $filter operation.
func (SecurityEventsFilterParameters) MarshalJSON ¶
func (s SecurityEventsFilterParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SecurityEventsFilterParameters.
func (*SecurityEventsFilterParameters) UnmarshalJSON ¶
func (s *SecurityEventsFilterParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SecurityEventsFilterParameters.
type SensitivityLabel ¶
type SensitivityLabel struct { // Resource properties. Properties *SensitivityLabelProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource that manages the sensitivity label. ManagedBy *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
SensitivityLabel - A sensitivity label.
func (SensitivityLabel) MarshalJSON ¶
func (s SensitivityLabel) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SensitivityLabel.
func (*SensitivityLabel) UnmarshalJSON ¶ added in v1.1.0
func (s *SensitivityLabel) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SensitivityLabel.
type SensitivityLabelListResult ¶
type SensitivityLabelListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*SensitivityLabel }
SensitivityLabelListResult - A list of sensitivity labels.
func (SensitivityLabelListResult) MarshalJSON ¶
func (s SensitivityLabelListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SensitivityLabelListResult.
func (*SensitivityLabelListResult) UnmarshalJSON ¶ added in v1.1.0
func (s *SensitivityLabelListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SensitivityLabelListResult.
type SensitivityLabelProperties ¶
type SensitivityLabelProperties struct { // The information type. InformationType *string // The information type ID. InformationTypeID *string // The label ID. LabelID *string // The label name. LabelName *string Rank *SensitivityLabelRank // READ-ONLY; The column name. ColumnName *string // READ-ONLY; Is sensitivity recommendation disabled. Applicable for recommended sensitivity label only. Specifies whether // the sensitivity recommendation on this column is disabled (dismissed) or not. IsDisabled *bool // READ-ONLY; The schema name. SchemaName *string // READ-ONLY; The table name. TableName *string }
SensitivityLabelProperties - Properties of a sensitivity label.
func (SensitivityLabelProperties) MarshalJSON ¶ added in v1.1.0
func (s SensitivityLabelProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SensitivityLabelProperties.
func (*SensitivityLabelProperties) UnmarshalJSON ¶ added in v1.1.0
func (s *SensitivityLabelProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SensitivityLabelProperties.
type SensitivityLabelRank ¶
type SensitivityLabelRank string
const ( SensitivityLabelRankCritical SensitivityLabelRank = "Critical" SensitivityLabelRankHigh SensitivityLabelRank = "High" SensitivityLabelRankLow SensitivityLabelRank = "Low" SensitivityLabelRankMedium SensitivityLabelRank = "Medium" SensitivityLabelRankNone SensitivityLabelRank = "None" )
func PossibleSensitivityLabelRankValues ¶
func PossibleSensitivityLabelRankValues() []SensitivityLabelRank
PossibleSensitivityLabelRankValues returns the possible values for the SensitivityLabelRank const type.
type SensitivityLabelSource ¶
type SensitivityLabelSource string
const ( SensitivityLabelSourceCurrent SensitivityLabelSource = "current" SensitivityLabelSourceRecommended SensitivityLabelSource = "recommended" )
func PossibleSensitivityLabelSourceValues ¶
func PossibleSensitivityLabelSourceValues() []SensitivityLabelSource
PossibleSensitivityLabelSourceValues returns the possible values for the SensitivityLabelSource const type.
type SensitivityLabelUpdate ¶
type SensitivityLabelUpdate struct { // Resource properties. Properties *SensitivityLabelUpdateProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
SensitivityLabelUpdate - A sensitivity label update operation.
func (SensitivityLabelUpdate) MarshalJSON ¶
func (s SensitivityLabelUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SensitivityLabelUpdate.
func (*SensitivityLabelUpdate) UnmarshalJSON ¶ added in v1.1.0
func (s *SensitivityLabelUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SensitivityLabelUpdate.
type SensitivityLabelUpdateKind ¶
type SensitivityLabelUpdateKind string
const ( SensitivityLabelUpdateKindRemove SensitivityLabelUpdateKind = "remove" SensitivityLabelUpdateKindSet SensitivityLabelUpdateKind = "set" )
func PossibleSensitivityLabelUpdateKindValues ¶
func PossibleSensitivityLabelUpdateKindValues() []SensitivityLabelUpdateKind
PossibleSensitivityLabelUpdateKindValues returns the possible values for the SensitivityLabelUpdateKind const type.
type SensitivityLabelUpdateList ¶
type SensitivityLabelUpdateList struct {
Operations []*SensitivityLabelUpdate
}
SensitivityLabelUpdateList - A list of sensitivity label update operations.
func (SensitivityLabelUpdateList) MarshalJSON ¶
func (s SensitivityLabelUpdateList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SensitivityLabelUpdateList.
func (*SensitivityLabelUpdateList) UnmarshalJSON ¶ added in v1.1.0
func (s *SensitivityLabelUpdateList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SensitivityLabelUpdateList.
type SensitivityLabelUpdateProperties ¶
type SensitivityLabelUpdateProperties struct { // REQUIRED; Column name to update. Column *string // REQUIRED Op *SensitivityLabelUpdateKind // REQUIRED; Schema name of the column to update. Schema *string // REQUIRED; Table name of the column to update. Table *string // The sensitivity label information to apply on a column. SensitivityLabel *SensitivityLabel }
SensitivityLabelUpdateProperties - Properties of an operation executed on a sensitivity label.
func (SensitivityLabelUpdateProperties) MarshalJSON ¶ added in v1.1.0
func (s SensitivityLabelUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SensitivityLabelUpdateProperties.
func (*SensitivityLabelUpdateProperties) UnmarshalJSON ¶ added in v1.1.0
func (s *SensitivityLabelUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SensitivityLabelUpdateProperties.
type SensitivityLabelsClient ¶
type SensitivityLabelsClient struct {
// contains filtered or unexported fields
}
SensitivityLabelsClient contains the methods for the SensitivityLabels group. Don't use this type directly, use NewSensitivityLabelsClient() instead.
func NewSensitivityLabelsClient ¶
func NewSensitivityLabelsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SensitivityLabelsClient, error)
NewSensitivityLabelsClient creates a new instance of SensitivityLabelsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*SensitivityLabelsClient) CreateOrUpdate ¶
func (client *SensitivityLabelsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string, parameters SensitivityLabel, options *SensitivityLabelsClientCreateOrUpdateOptions) (SensitivityLabelsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates the sensitivity label of a given column If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- schemaName - The name of the schema.
- tableName - The name of the table.
- columnName - The name of the column.
- parameters - The column sensitivity label resource.
- options - SensitivityLabelsClientCreateOrUpdateOptions contains the optional parameters for the SensitivityLabelsClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ColumnSensitivityLabelCreateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSensitivityLabelsClient().CreateOrUpdate(ctx, "myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", armsql.SensitivityLabel{ Properties: &armsql.SensitivityLabelProperties{ InformationType: to.Ptr("PhoneNumber"), InformationTypeID: to.Ptr("d22fa6e9-5ee4-3bde-4c2b-a409604c4646"), LabelID: to.Ptr("bf91e08c-f4f0-478a-b016-25164b2a65ff"), LabelName: to.Ptr("PII"), Rank: to.Ptr(armsql.SensitivityLabelRankLow), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SensitivityLabel = armsql.SensitivityLabel{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current"), // Properties: &armsql.SensitivityLabelProperties{ // ColumnName: to.Ptr("myColumn"), // InformationType: to.Ptr("PhoneNumber"), // InformationTypeID: to.Ptr("d22fa6e9-5ee4-3bde-4c2b-a409604c4646"), // LabelID: to.Ptr("bf91e08c-f4f0-478a-b016-25164b2a65ff"), // LabelName: to.Ptr("PII"), // Rank: to.Ptr(armsql.SensitivityLabelRankMedium), // SchemaName: to.Ptr("dbo"), // TableName: to.Ptr("myTable"), // }, // } }
Output:
func (*SensitivityLabelsClient) Delete ¶
func (client *SensitivityLabelsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string, options *SensitivityLabelsClientDeleteOptions) (SensitivityLabelsClientDeleteResponse, error)
Delete - Deletes the sensitivity label of a given column If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- schemaName - The name of the schema.
- tableName - The name of the table.
- columnName - The name of the column.
- options - SensitivityLabelsClientDeleteOptions contains the optional parameters for the SensitivityLabelsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ColumnSensitivityLabelDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewSensitivityLabelsClient().Delete(ctx, "myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*SensitivityLabelsClient) DisableRecommendation ¶
func (client *SensitivityLabelsClient) DisableRecommendation(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string, options *SensitivityLabelsClientDisableRecommendationOptions) (SensitivityLabelsClientDisableRecommendationResponse, error)
DisableRecommendation - Disables sensitivity recommendations on a given column If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- schemaName - The name of the schema.
- tableName - The name of the table.
- columnName - The name of the column.
- options - SensitivityLabelsClientDisableRecommendationOptions contains the optional parameters for the SensitivityLabelsClient.DisableRecommendation method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/RecommendedColumnSensitivityLabelDisable.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewSensitivityLabelsClient().DisableRecommendation(ctx, "myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*SensitivityLabelsClient) EnableRecommendation ¶
func (client *SensitivityLabelsClient) EnableRecommendation(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string, options *SensitivityLabelsClientEnableRecommendationOptions) (SensitivityLabelsClientEnableRecommendationResponse, error)
EnableRecommendation - Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns) If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- schemaName - The name of the schema.
- tableName - The name of the table.
- columnName - The name of the column.
- options - SensitivityLabelsClientEnableRecommendationOptions contains the optional parameters for the SensitivityLabelsClient.EnableRecommendation method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/RecommendedColumnSensitivityLabelEnable.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewSensitivityLabelsClient().EnableRecommendation(ctx, "myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*SensitivityLabelsClient) Get ¶
func (client *SensitivityLabelsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, columnName string, sensitivityLabelSource SensitivityLabelSource, options *SensitivityLabelsClientGetOptions) (SensitivityLabelsClientGetResponse, error)
Get - Gets the sensitivity label of a given column If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- schemaName - The name of the schema.
- tableName - The name of the table.
- columnName - The name of the column.
- sensitivityLabelSource - The source of the sensitivity label.
- options - SensitivityLabelsClientGetOptions contains the optional parameters for the SensitivityLabelsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ColumnSensitivityLabelGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSensitivityLabelsClient().Get(ctx, "myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", armsql.SensitivityLabelSourceCurrent, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SensitivityLabel = armsql.SensitivityLabel{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/current"), // Properties: &armsql.SensitivityLabelProperties{ // ColumnName: to.Ptr("myColumn"), // InformationType: to.Ptr("PhoneNumber"), // InformationTypeID: to.Ptr("d22fa6e9-5ee4-3bde-4c2b-a409604c4646"), // LabelID: to.Ptr("bf91e08c-f4f0-478a-b016-25164b2a65ff"), // LabelName: to.Ptr("PII"), // Rank: to.Ptr(armsql.SensitivityLabelRankHigh), // SchemaName: to.Ptr("dbo"), // TableName: to.Ptr("myTable"), // }, // } }
Output:
func (*SensitivityLabelsClient) NewListCurrentByDatabasePager ¶ added in v0.5.0
func (client *SensitivityLabelsClient) NewListCurrentByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *SensitivityLabelsClientListCurrentByDatabaseOptions) *runtime.Pager[SensitivityLabelsClientListCurrentByDatabaseResponse]
NewListCurrentByDatabasePager - Gets the sensitivity labels of a given database
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - SensitivityLabelsClientListCurrentByDatabaseOptions contains the optional parameters for the SensitivityLabelsClient.NewListCurrentByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SensitivityLabelsListByDatabaseWithSourceCurrent.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSensitivityLabelsClient().NewListCurrentByDatabasePager("myRG", "myServer", "myDatabase", &armsql.SensitivityLabelsClientListCurrentByDatabaseOptions{SkipToken: nil, Count: nil, Filter: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SensitivityLabelListResult = armsql.SensitivityLabelListResult{ // Value: []*armsql.SensitivityLabel{ // { // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn3/sensitivityLabels/current"), // Properties: &armsql.SensitivityLabelProperties{ // ColumnName: to.Ptr("myColumn3"), // InformationType: to.Ptr("Financial"), // InformationTypeID: to.Ptr("d22fa6e9-5ee4-3bde-4c2b-a409604c4646"), // LabelID: to.Ptr("05e6eaa1-075a-4fb4-a732-a92215a2444a"), // LabelName: to.Ptr("Sensitive"), // Rank: to.Ptr(armsql.SensitivityLabelRankLow), // SchemaName: to.Ptr("dbo"), // TableName: to.Ptr("myTable"), // }, // }, // { // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn4/sensitivityLabels/current"), // Properties: &armsql.SensitivityLabelProperties{ // ColumnName: to.Ptr("myColumn4"), // InformationType: to.Ptr("Email"), // InformationTypeID: to.Ptr("d22fa6e9-5ee4-3bde-4c2b-a409604c4646"), // LabelID: to.Ptr("bf91e08c-f4f0-478a-b016-25164b2a65ff"), // LabelName: to.Ptr("PII"), // Rank: to.Ptr(armsql.SensitivityLabelRankNone), // SchemaName: to.Ptr("dbo"), // TableName: to.Ptr("myTable"), // }, // }}, // } } }
Output:
func (*SensitivityLabelsClient) NewListRecommendedByDatabasePager ¶ added in v0.5.0
func (client *SensitivityLabelsClient) NewListRecommendedByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *SensitivityLabelsClientListRecommendedByDatabaseOptions) *runtime.Pager[SensitivityLabelsClientListRecommendedByDatabaseResponse]
NewListRecommendedByDatabasePager - Gets the sensitivity labels of a given database
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - SensitivityLabelsClientListRecommendedByDatabaseOptions contains the optional parameters for the SensitivityLabelsClient.NewListRecommendedByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SensitivityLabelsListByDatabaseWithSourceRecommended.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSensitivityLabelsClient().NewListRecommendedByDatabasePager("myRG", "myServer", "myDatabase", &armsql.SensitivityLabelsClientListRecommendedByDatabaseOptions{SkipToken: nil, IncludeDisabledRecommendations: nil, Filter: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SensitivityLabelListResult = armsql.SensitivityLabelListResult{ // Value: []*armsql.SensitivityLabel{ // { // Name: to.Ptr("recommended"), // Type: to.Ptr("Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn/sensitivityLabels/recommended"), // Properties: &armsql.SensitivityLabelProperties{ // ColumnName: to.Ptr("myColumn"), // InformationType: to.Ptr("Financial"), // InformationTypeID: to.Ptr("d22fa6e9-5ee4-3bde-4c2b-a409604c4646"), // LabelID: to.Ptr("05e6eaa1-075a-4fb4-a732-a92215a2444a"), // LabelName: to.Ptr("Sensitive"), // SchemaName: to.Ptr("dbo"), // TableName: to.Ptr("myTable"), // }, // }, // { // Name: to.Ptr("recommended"), // Type: to.Ptr("Microsoft.Sql/servers/databases/schemas/tables/columns/sensitivityLabels"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myRG/providers/Microsoft.Sql/servers/myServer/databases/myDatabase/schemas/dbo/tables/myTable/columns/myColumn2/sensitivityLabels/recommended"), // Properties: &armsql.SensitivityLabelProperties{ // ColumnName: to.Ptr("myColumn2"), // InformationType: to.Ptr("Email"), // InformationTypeID: to.Ptr("d22fa6e9-5ee4-3bde-4c2b-a409604c4646"), // LabelID: to.Ptr("bf91e08c-f4f0-478a-b016-25164b2a65ff"), // LabelName: to.Ptr("PII"), // SchemaName: to.Ptr("dbo"), // TableName: to.Ptr("myTable"), // }, // }}, // } } }
Output:
func (*SensitivityLabelsClient) Update ¶
func (client *SensitivityLabelsClient) Update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters SensitivityLabelUpdateList, options *SensitivityLabelsClientUpdateOptions) (SensitivityLabelsClientUpdateResponse, error)
Update - Update sensitivity labels of a given database using an operations batch. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - SensitivityLabelsClientUpdateOptions contains the optional parameters for the SensitivityLabelsClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SensitivityLabelsCurrentUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewSensitivityLabelsClient().Update(ctx, "myRG", "myServer", "myDatabase", armsql.SensitivityLabelUpdateList{ Operations: []*armsql.SensitivityLabelUpdate{ { Properties: &armsql.SensitivityLabelUpdateProperties{ Schema: to.Ptr("dbo"), Column: to.Ptr("column1"), Op: to.Ptr(armsql.SensitivityLabelUpdateKindSet), SensitivityLabel: &armsql.SensitivityLabel{ Properties: &armsql.SensitivityLabelProperties{ InformationType: to.Ptr("Financial"), InformationTypeID: to.Ptr("1D3652D6-422C-4115-82F1-65DAEBC665C8"), LabelID: to.Ptr("3A477B16-9423-432B-AA97-6069B481CEC3"), LabelName: to.Ptr("Highly Confidential"), Rank: to.Ptr(armsql.SensitivityLabelRankLow), }, }, Table: to.Ptr("table1"), }, }, { Properties: &armsql.SensitivityLabelUpdateProperties{ Schema: to.Ptr("dbo"), Column: to.Ptr("column2"), Op: to.Ptr(armsql.SensitivityLabelUpdateKindSet), SensitivityLabel: &armsql.SensitivityLabel{ Properties: &armsql.SensitivityLabelProperties{ InformationType: to.Ptr("PhoneNumber"), InformationTypeID: to.Ptr("d22fa6e9-5ee4-3bde-4c2b-a409604c4646"), LabelID: to.Ptr("bf91e08c-f4f0-478a-b016-25164b2a65ff"), LabelName: to.Ptr("PII"), Rank: to.Ptr(armsql.SensitivityLabelRankCritical), }, }, Table: to.Ptr("table2"), }, }, { Properties: &armsql.SensitivityLabelUpdateProperties{ Schema: to.Ptr("dbo"), Column: to.Ptr("Column3"), Op: to.Ptr(armsql.SensitivityLabelUpdateKindRemove), Table: to.Ptr("Table1"), }, }}, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
type SensitivityLabelsClientCreateOrUpdateOptions ¶ added in v0.3.0
type SensitivityLabelsClientCreateOrUpdateOptions struct { }
SensitivityLabelsClientCreateOrUpdateOptions contains the optional parameters for the SensitivityLabelsClient.CreateOrUpdate method.
type SensitivityLabelsClientCreateOrUpdateResponse ¶ added in v0.3.0
type SensitivityLabelsClientCreateOrUpdateResponse struct { // A sensitivity label. SensitivityLabel }
SensitivityLabelsClientCreateOrUpdateResponse contains the response from method SensitivityLabelsClient.CreateOrUpdate.
type SensitivityLabelsClientDeleteOptions ¶ added in v0.3.0
type SensitivityLabelsClientDeleteOptions struct { }
SensitivityLabelsClientDeleteOptions contains the optional parameters for the SensitivityLabelsClient.Delete method.
type SensitivityLabelsClientDeleteResponse ¶ added in v0.3.0
type SensitivityLabelsClientDeleteResponse struct { }
SensitivityLabelsClientDeleteResponse contains the response from method SensitivityLabelsClient.Delete.
type SensitivityLabelsClientDisableRecommendationOptions ¶ added in v0.3.0
type SensitivityLabelsClientDisableRecommendationOptions struct { }
SensitivityLabelsClientDisableRecommendationOptions contains the optional parameters for the SensitivityLabelsClient.DisableRecommendation method.
type SensitivityLabelsClientDisableRecommendationResponse ¶ added in v0.3.0
type SensitivityLabelsClientDisableRecommendationResponse struct { }
SensitivityLabelsClientDisableRecommendationResponse contains the response from method SensitivityLabelsClient.DisableRecommendation.
type SensitivityLabelsClientEnableRecommendationOptions ¶ added in v0.3.0
type SensitivityLabelsClientEnableRecommendationOptions struct { }
SensitivityLabelsClientEnableRecommendationOptions contains the optional parameters for the SensitivityLabelsClient.EnableRecommendation method.
type SensitivityLabelsClientEnableRecommendationResponse ¶ added in v0.3.0
type SensitivityLabelsClientEnableRecommendationResponse struct { }
SensitivityLabelsClientEnableRecommendationResponse contains the response from method SensitivityLabelsClient.EnableRecommendation.
type SensitivityLabelsClientGetOptions ¶ added in v0.3.0
type SensitivityLabelsClientGetOptions struct { }
SensitivityLabelsClientGetOptions contains the optional parameters for the SensitivityLabelsClient.Get method.
type SensitivityLabelsClientGetResponse ¶ added in v0.3.0
type SensitivityLabelsClientGetResponse struct { // A sensitivity label. SensitivityLabel }
SensitivityLabelsClientGetResponse contains the response from method SensitivityLabelsClient.Get.
type SensitivityLabelsClientListCurrentByDatabaseOptions ¶ added in v0.3.0
type SensitivityLabelsClientListCurrentByDatabaseOptions struct { Count *bool // An OData filter expression that filters elements in the collection. Filter *string SkipToken *string }
SensitivityLabelsClientListCurrentByDatabaseOptions contains the optional parameters for the SensitivityLabelsClient.NewListCurrentByDatabasePager method.
type SensitivityLabelsClientListCurrentByDatabaseResponse ¶ added in v0.3.0
type SensitivityLabelsClientListCurrentByDatabaseResponse struct { // A list of sensitivity labels. SensitivityLabelListResult }
SensitivityLabelsClientListCurrentByDatabaseResponse contains the response from method SensitivityLabelsClient.NewListCurrentByDatabasePager.
type SensitivityLabelsClientListRecommendedByDatabaseOptions ¶ added in v0.3.0
type SensitivityLabelsClientListRecommendedByDatabaseOptions struct { // An OData filter expression that filters elements in the collection. Filter *string // Specifies whether to include disabled recommendations or not. IncludeDisabledRecommendations *bool SkipToken *string }
SensitivityLabelsClientListRecommendedByDatabaseOptions contains the optional parameters for the SensitivityLabelsClient.NewListRecommendedByDatabasePager method.
type SensitivityLabelsClientListRecommendedByDatabaseResponse ¶ added in v0.3.0
type SensitivityLabelsClientListRecommendedByDatabaseResponse struct { // A list of sensitivity labels. SensitivityLabelListResult }
SensitivityLabelsClientListRecommendedByDatabaseResponse contains the response from method SensitivityLabelsClient.NewListRecommendedByDatabasePager.
type SensitivityLabelsClientUpdateOptions ¶ added in v0.3.0
type SensitivityLabelsClientUpdateOptions struct { }
SensitivityLabelsClientUpdateOptions contains the optional parameters for the SensitivityLabelsClient.Update method.
type SensitivityLabelsClientUpdateResponse ¶ added in v0.3.0
type SensitivityLabelsClientUpdateResponse struct { }
SensitivityLabelsClientUpdateResponse contains the response from method SensitivityLabelsClient.Update.
type Server ¶
type Server struct { // REQUIRED; Resource location. Location *string // The Azure Active Directory identity of the server. Identity *ResourceIdentity // Resource properties. Properties *ServerProperties // Resource tags. Tags map[string]*string // READ-ONLY; Resource ID. ID *string // READ-ONLY; Kind of sql server. This is metadata used for the Azure portal experience. Kind *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
Server - An Azure SQL Database server.
func (Server) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Server.
func (*Server) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Server.
type ServerAdvancedThreatProtection ¶ added in v1.0.0
type ServerAdvancedThreatProtection struct { // Resource properties. Properties *AdvancedThreatProtectionProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; SystemData of AdvancedThreatProtectionResource. SystemData *SystemData // READ-ONLY; Resource type. Type *string }
ServerAdvancedThreatProtection - A server Advanced Threat Protection.
func (ServerAdvancedThreatProtection) MarshalJSON ¶ added in v1.1.0
func (s ServerAdvancedThreatProtection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerAdvancedThreatProtection.
func (*ServerAdvancedThreatProtection) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerAdvancedThreatProtection) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerAdvancedThreatProtection.
type ServerAdvancedThreatProtectionSettingsClient ¶ added in v1.0.0
type ServerAdvancedThreatProtectionSettingsClient struct {
// contains filtered or unexported fields
}
ServerAdvancedThreatProtectionSettingsClient contains the methods for the ServerAdvancedThreatProtectionSettings group. Don't use this type directly, use NewServerAdvancedThreatProtectionSettingsClient() instead.
func NewServerAdvancedThreatProtectionSettingsClient ¶ added in v1.0.0
func NewServerAdvancedThreatProtectionSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerAdvancedThreatProtectionSettingsClient, error)
NewServerAdvancedThreatProtectionSettingsClient creates a new instance of ServerAdvancedThreatProtectionSettingsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ServerAdvancedThreatProtectionSettingsClient) BeginCreateOrUpdate ¶ added in v1.0.0
func (client *ServerAdvancedThreatProtectionSettingsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, advancedThreatProtectionName AdvancedThreatProtectionName, parameters ServerAdvancedThreatProtection, options *ServerAdvancedThreatProtectionSettingsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates an Advanced Threat Protection state. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- advancedThreatProtectionName - The name of the Advanced Threat Protection state.
- parameters - The server Advanced Threat Protection state.
- options - ServerAdvancedThreatProtectionSettingsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerAdvancedThreatProtectionSettingsClient.BeginCreateOrUpdate method.
Example (UpdateAServersAdvancedThreatProtectionSettingsWithAllParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerAdvancedThreatProtectionSettingsCreateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerAdvancedThreatProtectionSettingsClient().BeginCreateOrUpdate(ctx, "threatprotection-4799", "threatprotection-6440", armsql.AdvancedThreatProtectionNameDefault, armsql.ServerAdvancedThreatProtection{ Properties: &armsql.AdvancedThreatProtectionProperties{ State: to.Ptr(armsql.AdvancedThreatProtectionStateEnabled), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerAdvancedThreatProtection = armsql.ServerAdvancedThreatProtection{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/advancedThreatProtectionSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/servers/threatprotection-6440/advancedThreatProtectionSettings/Default"), // Properties: &armsql.AdvancedThreatProtectionProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // State: to.Ptr(armsql.AdvancedThreatProtectionStateEnabled), // }, // SystemData: &armsql.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armsql.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armsql.CreatedByTypeUser), // }, // } }
Output:
Example (UpdateAServersAdvancedThreatProtectionSettingsWithMinimalParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerAdvancedThreatProtectionSettingsCreateMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerAdvancedThreatProtectionSettingsClient().BeginCreateOrUpdate(ctx, "threatprotection-4799", "threatprotection-6440", armsql.AdvancedThreatProtectionNameDefault, armsql.ServerAdvancedThreatProtection{ Properties: &armsql.AdvancedThreatProtectionProperties{ State: to.Ptr(armsql.AdvancedThreatProtectionStateDisabled), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerAdvancedThreatProtection = armsql.ServerAdvancedThreatProtection{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/advancedThreatProtectionSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/servers/threatprotection-6440/advancedThreatProtectionSettings/Default"), // Properties: &armsql.AdvancedThreatProtectionProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // State: to.Ptr(armsql.AdvancedThreatProtectionStateDisabled), // }, // SystemData: &armsql.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armsql.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armsql.CreatedByTypeUser), // }, // } }
Output:
func (*ServerAdvancedThreatProtectionSettingsClient) Get ¶ added in v1.0.0
func (client *ServerAdvancedThreatProtectionSettingsClient) Get(ctx context.Context, resourceGroupName string, serverName string, advancedThreatProtectionName AdvancedThreatProtectionName, options *ServerAdvancedThreatProtectionSettingsClientGetOptions) (ServerAdvancedThreatProtectionSettingsClientGetResponse, error)
Get - Get a server's Advanced Threat Protection state. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- advancedThreatProtectionName - The name of the Advanced Threat Protection state.
- options - ServerAdvancedThreatProtectionSettingsClientGetOptions contains the optional parameters for the ServerAdvancedThreatProtectionSettingsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerAdvancedThreatProtectionSettingsGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServerAdvancedThreatProtectionSettingsClient().Get(ctx, "threatprotection-4799", "threatprotection-6440", armsql.AdvancedThreatProtectionNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerAdvancedThreatProtection = armsql.ServerAdvancedThreatProtection{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/advancedThreatProtectionSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/servers/threatprotection-6440/advancedThreatProtectionSettings/Default"), // Properties: &armsql.AdvancedThreatProtectionProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // State: to.Ptr(armsql.AdvancedThreatProtectionStateDisabled), // }, // SystemData: &armsql.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armsql.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armsql.CreatedByTypeUser), // }, // } }
Output:
func (*ServerAdvancedThreatProtectionSettingsClient) NewListByServerPager ¶ added in v1.0.0
func (client *ServerAdvancedThreatProtectionSettingsClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServerAdvancedThreatProtectionSettingsClientListByServerOptions) *runtime.Pager[ServerAdvancedThreatProtectionSettingsClientListByServerResponse]
NewListByServerPager - Get a list of the server's Advanced Threat Protection states.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - ServerAdvancedThreatProtectionSettingsClientListByServerOptions contains the optional parameters for the ServerAdvancedThreatProtectionSettingsClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerAdvancedThreatProtectionSettingsListByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServerAdvancedThreatProtectionSettingsClient().NewListByServerPager("threatprotection-4799", "threatprotection-6440", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.LogicalServerAdvancedThreatProtectionListResult = armsql.LogicalServerAdvancedThreatProtectionListResult{ // Value: []*armsql.ServerAdvancedThreatProtection{ // { // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/advancedThreatProtectionSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/servers/threatprotection-6440/advancedThreatProtectionSettings"), // Properties: &armsql.AdvancedThreatProtectionProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // State: to.Ptr(armsql.AdvancedThreatProtectionStateDisabled), // }, // SystemData: &armsql.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armsql.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-04-03T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armsql.CreatedByTypeUser), // }, // }}, // } } }
Output:
type ServerAdvancedThreatProtectionSettingsClientBeginCreateOrUpdateOptions ¶ added in v1.0.0
type ServerAdvancedThreatProtectionSettingsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerAdvancedThreatProtectionSettingsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerAdvancedThreatProtectionSettingsClient.BeginCreateOrUpdate method.
type ServerAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse ¶ added in v1.0.0
type ServerAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse struct { // A server Advanced Threat Protection. ServerAdvancedThreatProtection }
ServerAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse contains the response from method ServerAdvancedThreatProtectionSettingsClient.BeginCreateOrUpdate.
type ServerAdvancedThreatProtectionSettingsClientGetOptions ¶ added in v1.0.0
type ServerAdvancedThreatProtectionSettingsClientGetOptions struct { }
ServerAdvancedThreatProtectionSettingsClientGetOptions contains the optional parameters for the ServerAdvancedThreatProtectionSettingsClient.Get method.
type ServerAdvancedThreatProtectionSettingsClientGetResponse ¶ added in v1.0.0
type ServerAdvancedThreatProtectionSettingsClientGetResponse struct { // A server Advanced Threat Protection. ServerAdvancedThreatProtection }
ServerAdvancedThreatProtectionSettingsClientGetResponse contains the response from method ServerAdvancedThreatProtectionSettingsClient.Get.
type ServerAdvancedThreatProtectionSettingsClientListByServerOptions ¶ added in v1.0.0
type ServerAdvancedThreatProtectionSettingsClientListByServerOptions struct { }
ServerAdvancedThreatProtectionSettingsClientListByServerOptions contains the optional parameters for the ServerAdvancedThreatProtectionSettingsClient.NewListByServerPager method.
type ServerAdvancedThreatProtectionSettingsClientListByServerResponse ¶ added in v1.0.0
type ServerAdvancedThreatProtectionSettingsClientListByServerResponse struct { // A list of the server's Advanced Threat Protection configurations. LogicalServerAdvancedThreatProtectionListResult }
ServerAdvancedThreatProtectionSettingsClientListByServerResponse contains the response from method ServerAdvancedThreatProtectionSettingsClient.NewListByServerPager.
type ServerAdvisorsClient ¶
type ServerAdvisorsClient struct {
// contains filtered or unexported fields
}
ServerAdvisorsClient contains the methods for the ServerAdvisors group. Don't use this type directly, use NewServerAdvisorsClient() instead.
func NewServerAdvisorsClient ¶
func NewServerAdvisorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerAdvisorsClient, error)
NewServerAdvisorsClient creates a new instance of ServerAdvisorsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ServerAdvisorsClient) Get ¶
func (client *ServerAdvisorsClient) Get(ctx context.Context, resourceGroupName string, serverName string, advisorName string, options *ServerAdvisorsClientGetOptions) (ServerAdvisorsClientGetResponse, error)
Get - Gets a server advisor. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- advisorName - The name of the Server Advisor.
- options - ServerAdvisorsClientGetOptions contains the optional parameters for the ServerAdvisorsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerAdvisorGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServerAdvisorsClient().Get(ctx, "workloadinsight-demos", "misosisvr", "CreateIndex", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Advisor = armsql.Advisor{ // Name: to.Ptr("CreateIndex"), // Type: to.Ptr("Microsoft.Sql/servers/advisors"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/CreateIndex"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.AdvisorProperties{ // AdvisorStatus: to.Ptr(armsql.AdvisorStatusGA), // AutoExecuteStatus: to.Ptr(armsql.AutoExecuteStatusDisabled), // AutoExecuteStatusInheritedFrom: to.Ptr(armsql.AutoExecuteStatusInheritedFromDefault), // }, // } }
Output:
func (*ServerAdvisorsClient) ListByServer ¶
func (client *ServerAdvisorsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string, options *ServerAdvisorsClientListByServerOptions) (ServerAdvisorsClientListByServerResponse, error)
ListByServer - Gets a list of server advisors. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - ServerAdvisorsClientListByServerOptions contains the optional parameters for the ServerAdvisorsClient.ListByServer method.
Example (ListOfServerAdvisors) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerAdvisorList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServerAdvisorsClient().ListByServer(ctx, "workloadinsight-demos", "misosisvr", &armsql.ServerAdvisorsClientListByServerOptions{Expand: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.AdvisorArray = []*armsql.Advisor{ // { // Name: to.Ptr("CreateIndex"), // Type: to.Ptr("Microsoft.Sql/servers/advisors"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/CreateIndex"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.AdvisorProperties{ // AdvisorStatus: to.Ptr(armsql.AdvisorStatusGA), // AutoExecuteStatus: to.Ptr(armsql.AutoExecuteStatusDisabled), // AutoExecuteStatusInheritedFrom: to.Ptr(armsql.AutoExecuteStatusInheritedFromDefault), // }, // }, // { // Name: to.Ptr("DropIndex"), // Type: to.Ptr("Microsoft.Sql/servers/advisors"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/DropIndex"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.AdvisorProperties{ // AdvisorStatus: to.Ptr(armsql.AdvisorStatusGA), // AutoExecuteStatus: to.Ptr(armsql.AutoExecuteStatusDisabled), // AutoExecuteStatusInheritedFrom: to.Ptr(armsql.AutoExecuteStatusInheritedFromDefault), // }, // }, // { // Name: to.Ptr("DbParameterization"), // Type: to.Ptr("Microsoft.Sql/servers/advisors"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/DbParameterization"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.AdvisorProperties{ // AdvisorStatus: to.Ptr(armsql.AdvisorStatusGA), // AutoExecuteStatus: to.Ptr(armsql.AutoExecuteStatusDisabled), // AutoExecuteStatusInheritedFrom: to.Ptr(armsql.AutoExecuteStatusInheritedFromDefault), // }, // }, // { // Name: to.Ptr("SchemaIssue"), // Type: to.Ptr("Microsoft.Sql/servers/advisors"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/SchemaIssue"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.AdvisorProperties{ // AdvisorStatus: to.Ptr(armsql.AdvisorStatusPublicPreview), // AutoExecuteStatus: to.Ptr(armsql.AutoExecuteStatusDisabled), // AutoExecuteStatusInheritedFrom: to.Ptr(armsql.AutoExecuteStatusInheritedFromDefault), // }, // }, // { // Name: to.Ptr("ForceLastGoodPlan"), // Type: to.Ptr("Microsoft.Sql/servers/advisors"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/ForceLastGoodPlan"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.AdvisorProperties{ // AdvisorStatus: to.Ptr(armsql.AdvisorStatusPrivatePreview), // AutoExecuteStatus: to.Ptr(armsql.AutoExecuteStatusDisabled), // AutoExecuteStatusInheritedFrom: to.Ptr(armsql.AutoExecuteStatusInheritedFromDefault), // }, // }} }
Output:
Example (ListOfServerRecommendedActionsForAllAdvisors) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerRecommendedActionListExpand.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServerAdvisorsClient().ListByServer(ctx, "workloadinsight-demos", "misosisvr", &armsql.ServerAdvisorsClientListByServerOptions{Expand: to.Ptr("recommendedActions")}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.AdvisorArray = []*armsql.Advisor{ // { // Name: to.Ptr("CreateIndex"), // Type: to.Ptr("Microsoft.Sql/servers/advisors"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/CreateIndex"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.AdvisorProperties{ // AdvisorStatus: to.Ptr(armsql.AdvisorStatusGA), // AutoExecuteStatus: to.Ptr(armsql.AutoExecuteStatusDisabled), // AutoExecuteStatusInheritedFrom: to.Ptr(armsql.AutoExecuteStatusInheritedFromServer), // RecommendedActions: []*armsql.RecommendedAction{ // { // Name: to.Ptr("IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB"), // Type: to.Ptr("Microsoft.Sql/servers/advisors/recommendedActions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/CreateIndex/recommendedActions/IR_[CRM]_[DataPoints]_4821CD2F9510D98184BB"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.RecommendedActionProperties{ // ErrorDetails: &armsql.RecommendedActionErrorInfo{ // }, // EstimatedImpact: []*armsql.RecommendedActionImpactRecord{ // { // AbsoluteValue: to.Ptr[float64](1440), // DimensionName: to.Ptr("ActionDuration"), // Unit: to.Ptr("Seconds"), // }, // { // AbsoluteValue: to.Ptr[float64](209.3125), // DimensionName: to.Ptr("SpaceChange"), // Unit: to.Ptr("Megabytes"), // }}, // ImplementationDetails: &armsql.RecommendedActionImplementationInfo{ // Method: to.Ptr(armsql.ImplementationMethodTSQL), // Script: to.Ptr("CREATE NONCLUSTERED INDEX [nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B] ON [CRM].[DataPoints] ([Name],[Money],[Power]) INCLUDE ([Hour], [System], [LastChanged]) WITH (ONLINE = ON)"), // }, // IsArchivedAction: to.Ptr(false), // IsExecutableAction: to.Ptr(true), // IsRevertableAction: to.Ptr(true), // LastRefresh: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:04.000Z"); return t}()), // ObservedImpact: []*armsql.RecommendedActionImpactRecord{ // }, // RecommendationReason: to.Ptr(""), // Score: to.Ptr[int32](1), // State: &armsql.RecommendedActionStateInfo{ // CurrentValue: to.Ptr(armsql.RecommendedActionCurrentStateActive), // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-20T15:15:40.000Z"); return t}()), // }, // TimeSeries: []*armsql.RecommendedActionMetricInfo{ // }, // ValidSince: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:04.000Z"); return t}()), // Details: map[string]any{ // "schema": "[CRM]", // "databaseName": "IndexAdvisor_test_3", // "includedColumns": "[Hour], [System], [LastChanged]", // "indexColumns": "[Name],[Money],[Power]", // "indexName": "nci_wi_DataPoints_B892614093BAC56295EF6018BD4CB51B", // "indexType": "NONCLUSTERED", // "table": "[DataPoints]", // }, // }, // }, // { // Name: to.Ptr("IR_[dbo]_[Employees]_560E15A98D14CA09BDFB"), // Type: to.Ptr("Microsoft.Sql/servers/advisors/recommendedActions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/CreateIndex/recommendedActions/IR_[dbo]_[Employees]_560E15A98D14CA09BDFB"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.RecommendedActionProperties{ // ErrorDetails: &armsql.RecommendedActionErrorInfo{ // }, // EstimatedImpact: []*armsql.RecommendedActionImpactRecord{ // { // AbsoluteValue: to.Ptr[float64](17), // DimensionName: to.Ptr("ActionDuration"), // Unit: to.Ptr("Seconds"), // }, // { // AbsoluteValue: to.Ptr[float64](128), // DimensionName: to.Ptr("SpaceChange"), // Unit: to.Ptr("Megabytes"), // }}, // ImplementationDetails: &armsql.RecommendedActionImplementationInfo{ // Method: to.Ptr(armsql.ImplementationMethodTSQL), // Script: to.Ptr("CREATE NONCLUSTERED INDEX [nci_wi_Employees_8C18C2AF4267DC77793040782641CCDE] ON [dbo].[Employees] ([City], [State]) INCLUDE ([Postal]) WITH (ONLINE = ON)"), // }, // IsArchivedAction: to.Ptr(false), // IsExecutableAction: to.Ptr(true), // IsRevertableAction: to.Ptr(true), // LastRefresh: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ObservedImpact: []*armsql.RecommendedActionImpactRecord{ // }, // RecommendationReason: to.Ptr(""), // Score: to.Ptr[int32](3), // State: &armsql.RecommendedActionStateInfo{ // CurrentValue: to.Ptr(armsql.RecommendedActionCurrentStateActive), // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // }, // TimeSeries: []*armsql.RecommendedActionMetricInfo{ // }, // ValidSince: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // Details: map[string]any{ // "schema": "[dbo]", // "databaseName": "IndexAdvisor_test_3", // "includedColumns": "[Postal]", // "indexColumns": "[City], [State]", // "indexName": "nci_wi_Employees_8C18C2AF4267DC77793040782641CCDE", // "indexType": "NONCLUSTERED", // "table": "[Employees]", // }, // }, // }, // { // Name: to.Ptr("IR_[dbo]_[DataPoints]_F5D2F347AA22DB46E4CC"), // Type: to.Ptr("Microsoft.Sql/servers/advisors/recommendedActions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/CreateIndex/recommendedActions/IR_[dbo]_[DataPoints]_F5D2F347AA22DB46E4CC"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.RecommendedActionProperties{ // ErrorDetails: &armsql.RecommendedActionErrorInfo{ // }, // EstimatedImpact: []*armsql.RecommendedActionImpactRecord{ // { // AbsoluteValue: to.Ptr[float64](5040), // DimensionName: to.Ptr("ActionDuration"), // Unit: to.Ptr("Seconds"), // }, // { // AbsoluteValue: to.Ptr[float64](120), // DimensionName: to.Ptr("SpaceChange"), // Unit: to.Ptr("Megabytes"), // }}, // ExecuteActionDuration: to.Ptr("PT1M"), // ExecuteActionInitiatedBy: to.Ptr(armsql.RecommendedActionInitiatedByUser), // ExecuteActionInitiatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ExecuteActionStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ImplementationDetails: &armsql.RecommendedActionImplementationInfo{ // Method: to.Ptr(armsql.ImplementationMethodTSQL), // Script: to.Ptr("DROP INDEX [nci_wi_DataPoints_609E4B7D6A3813990ED44B28B340C8FC] ON [dbo].[DataPoints]"), // }, // IsArchivedAction: to.Ptr(false), // IsExecutableAction: to.Ptr(true), // IsRevertableAction: to.Ptr(true), // LastRefresh: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ObservedImpact: []*armsql.RecommendedActionImpactRecord{ // { // ChangeValueAbsolute: to.Ptr[float64](-12.7), // ChangeValueRelative: to.Ptr[float64](-0.9), // DimensionName: to.Ptr("AffectedQueriesCpuUtilization"), // Unit: to.Ptr("CpuCores"), // }, // { // ChangeValueAbsolute: to.Ptr[float64](-12.7), // ChangeValueRelative: to.Ptr[float64](-0.3175), // DimensionName: to.Ptr("CpuUtilization"), // Unit: to.Ptr("CpuCores"), // }, // { // AbsoluteValue: to.Ptr[float64](12), // DimensionName: to.Ptr("QueriesWithImprovedPerformance"), // Unit: to.Ptr("Count"), // }, // { // AbsoluteValue: to.Ptr[float64](1), // DimensionName: to.Ptr("QueriesWithRegressedPerformance"), // Unit: to.Ptr("Count"), // }, // { // AbsoluteValue: to.Ptr[float64](130.742187), // DimensionName: to.Ptr("SpaceChange"), // Unit: to.Ptr("Megabytes"), // }, // { // AbsoluteValue: to.Ptr[float64](0), // DimensionName: to.Ptr("VerificationProgress"), // Unit: to.Ptr("Percent"), // }}, // RecommendationReason: to.Ptr(""), // Score: to.Ptr[int32](3), // State: &armsql.RecommendedActionStateInfo{ // ActionInitiatedBy: to.Ptr(armsql.RecommendedActionInitiatedByUser), // CurrentValue: to.Ptr(armsql.RecommendedActionCurrentStateSuccess), // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // }, // TimeSeries: []*armsql.RecommendedActionMetricInfo{ // }, // ValidSince: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // Details: map[string]any{ // "schema": "[dbo]", // "databaseName": "IndexAdvisor_test_3", // "includedColumns": "[Power],[Pineapple]", // "indexActionDuration": "00:01:00", // "indexActionStartTime": "2017-03-01T14:38:05.337", // "indexColumns": "[Name],[Money]", // "indexName": "nci_wi_DataPoints_609E4B7D6A3813990ED44B28B340C8FC", // "indexType": "NONCLUSTERED", // "table": "[DataPoints]", // }, // }, // }}, // }, // }, // { // Name: to.Ptr("DropIndex"), // Type: to.Ptr("Microsoft.Sql/servers/advisors"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/DropIndex"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.AdvisorProperties{ // AdvisorStatus: to.Ptr(armsql.AdvisorStatusGA), // AutoExecuteStatus: to.Ptr(armsql.AutoExecuteStatusDisabled), // AutoExecuteStatusInheritedFrom: to.Ptr(armsql.AutoExecuteStatusInheritedFromDefault), // RecommendedActions: []*armsql.RecommendedAction{ // { // Name: to.Ptr("IR_[CRM]_[DataPoints1]_29AEA82685D24704DE1A"), // Type: to.Ptr("Microsoft.Sql/servers/advisors/recommendedActions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/DropIndex/recommendedActions/IR_[CRM]_[DataPoints1]_29AEA82685D24704DE1A"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.RecommendedActionProperties{ // ErrorDetails: &armsql.RecommendedActionErrorInfo{ // }, // EstimatedImpact: []*armsql.RecommendedActionImpactRecord{ // { // AbsoluteValue: to.Ptr[float64](803), // DimensionName: to.Ptr("ActionDuration"), // Unit: to.Ptr("Seconds"), // }, // { // AbsoluteValue: to.Ptr[float64](144.6875), // DimensionName: to.Ptr("SpaceChange"), // Unit: to.Ptr("Megabytes"), // }}, // ExecuteActionInitiatedBy: to.Ptr(armsql.RecommendedActionInitiatedBySystem), // ExecuteActionInitiatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ImplementationDetails: &armsql.RecommendedActionImplementationInfo{ // Method: to.Ptr(armsql.ImplementationMethodTSQL), // Script: to.Ptr("DROP INDEX [MyIndex123] ON [CRM].[DataPoints1]"), // }, // IsArchivedAction: to.Ptr(false), // IsExecutableAction: to.Ptr(true), // IsRevertableAction: to.Ptr(true), // LastRefresh: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ObservedImpact: []*armsql.RecommendedActionImpactRecord{ // }, // RecommendationReason: to.Ptr("Duplicate"), // Score: to.Ptr[int32](1), // State: &armsql.RecommendedActionStateInfo{ // ActionInitiatedBy: to.Ptr(armsql.RecommendedActionInitiatedBySystem), // CurrentValue: to.Ptr(armsql.RecommendedActionCurrentStatePending), // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // }, // TimeSeries: []*armsql.RecommendedActionMetricInfo{ // }, // ValidSince: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // Details: map[string]any{ // "schema": "[CRM]", // "databaseName": "IndexAdvisor_test_3", // "includedColumns": "[Apple]", // "indexColumns": "[Cookies],[SessionId]", // "indexName": "MyIndex123", // "indexType": "NONCLUSTERED", // "originalIndexName": "IX_COM_SKU_SKUDepartmentID", // "table": "[DataPoints1]", // }, // }, // }, // { // Name: to.Ptr("IR_[CRM]_[DataPoints2]_E4B21F229379807E531A"), // Type: to.Ptr("Microsoft.Sql/servers/advisors/recommendedActions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/DropIndex/recommendedActions/IR_[CRM]_[DataPoints2]_E4B21F229379807E531A"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.RecommendedActionProperties{ // ErrorDetails: &armsql.RecommendedActionErrorInfo{ // }, // EstimatedImpact: []*armsql.RecommendedActionImpactRecord{ // { // AbsoluteValue: to.Ptr[float64](705), // DimensionName: to.Ptr("ActionDuration"), // Unit: to.Ptr("Seconds"), // }, // { // AbsoluteValue: to.Ptr[float64](342), // DimensionName: to.Ptr("SpaceChange"), // Unit: to.Ptr("Megabytes"), // }}, // ExecuteActionDuration: to.Ptr("PT1M"), // ExecuteActionInitiatedBy: to.Ptr(armsql.RecommendedActionInitiatedByUser), // ExecuteActionInitiatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ExecuteActionStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ImplementationDetails: &armsql.RecommendedActionImplementationInfo{ // Method: to.Ptr(armsql.ImplementationMethodTSQL), // Script: to.Ptr("CREATE NONCLUSTERED INDEX [MyIndex321] ON [CRM].[DataPoints2] ([Cookies],[SessionId],[Protocol]) INCLUDE ([Apple]) WITH (ONLINE = ON)"), // }, // IsArchivedAction: to.Ptr(false), // IsExecutableAction: to.Ptr(true), // IsRevertableAction: to.Ptr(true), // LastRefresh: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ObservedImpact: []*armsql.RecommendedActionImpactRecord{ // { // ChangeValueAbsolute: to.Ptr[float64](0), // ChangeValueRelative: to.Ptr[float64](0), // DimensionName: to.Ptr("AffectedQueriesCpuUtilization"), // Unit: to.Ptr("CpuCores"), // }, // { // ChangeValueAbsolute: to.Ptr[float64](0), // ChangeValueRelative: to.Ptr[float64](0), // DimensionName: to.Ptr("CpuUtilization"), // Unit: to.Ptr("CpuCores"), // }, // { // AbsoluteValue: to.Ptr[float64](0), // DimensionName: to.Ptr("QueriesWithImprovedPerformance"), // Unit: to.Ptr("Count"), // }, // { // AbsoluteValue: to.Ptr[float64](0), // DimensionName: to.Ptr("QueriesWithRegressedPerformance"), // Unit: to.Ptr("Count"), // }, // { // AbsoluteValue: to.Ptr[float64](-342), // DimensionName: to.Ptr("SpaceChange"), // Unit: to.Ptr("Megabytes"), // }, // { // AbsoluteValue: to.Ptr[float64](0), // DimensionName: to.Ptr("VerificationProgress"), // Unit: to.Ptr("Percent"), // }}, // RecommendationReason: to.Ptr("Duplicate"), // Score: to.Ptr[int32](1), // State: &armsql.RecommendedActionStateInfo{ // ActionInitiatedBy: to.Ptr(armsql.RecommendedActionInitiatedByUser), // CurrentValue: to.Ptr(armsql.RecommendedActionCurrentStateSuccess), // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // }, // TimeSeries: []*armsql.RecommendedActionMetricInfo{ // }, // ValidSince: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // Details: map[string]any{ // "schema": "[CRM]", // "databaseName": "IndexAdvisor_test_3", // "includedColumns": "[Apple]", // "indexActionDuration": "00:01:00", // "indexActionStartTime": "2017-03-01T14:38:05.697", // "indexColumns": "[Cookies],[SessionId],[Protocol]", // "indexName": "MyIndex321", // "indexType": "NONCLUSTERED", // "originalIndexName": "IX_COM_SKU_SKUDepartmentID", // "table": "[DataPoints2]", // }, // }, // }, // { // Name: to.Ptr("IR_[dbo]_[FactFinance]_13ADA5F354E9E14A983B"), // Type: to.Ptr("Microsoft.Sql/servers/advisors/recommendedActions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/DropIndex/recommendedActions/IR_[dbo]_[FactFinance]_13ADA5F354E9E14A983B"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.RecommendedActionProperties{ // ErrorDetails: &armsql.RecommendedActionErrorInfo{ // }, // EstimatedImpact: []*armsql.RecommendedActionImpactRecord{ // { // AbsoluteValue: to.Ptr[float64](705), // DimensionName: to.Ptr("ActionDuration"), // Unit: to.Ptr("Seconds"), // }, // { // AbsoluteValue: to.Ptr[float64](342), // DimensionName: to.Ptr("SpaceChange"), // Unit: to.Ptr("Megabytes"), // }}, // ExecuteActionDuration: to.Ptr("PT1M"), // ExecuteActionInitiatedBy: to.Ptr(armsql.RecommendedActionInitiatedBySystem), // ExecuteActionInitiatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ExecuteActionStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ImplementationDetails: &armsql.RecommendedActionImplementationInfo{ // Method: to.Ptr(armsql.ImplementationMethodTSQL), // Script: to.Ptr("CREATE NONCLUSTERED INDEX [IX_FF] ON [dbo].[FactFinance] ([FinanceKey],[DateKey]) INCLUDE ([OrganizationKey]) WITH (ONLINE = ON)"), // }, // IsArchivedAction: to.Ptr(false), // IsExecutableAction: to.Ptr(true), // IsRevertableAction: to.Ptr(true), // LastRefresh: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ObservedImpact: []*armsql.RecommendedActionImpactRecord{ // { // ChangeValueAbsolute: to.Ptr[float64](0), // ChangeValueRelative: to.Ptr[float64](0), // DimensionName: to.Ptr("AffectedQueriesCpuUtilization"), // Unit: to.Ptr("CpuCores"), // }, // { // ChangeValueAbsolute: to.Ptr[float64](0), // ChangeValueRelative: to.Ptr[float64](0), // DimensionName: to.Ptr("CpuUtilization"), // Unit: to.Ptr("CpuCores"), // }, // { // AbsoluteValue: to.Ptr[float64](0), // DimensionName: to.Ptr("QueriesWithImprovedPerformance"), // Unit: to.Ptr("Count"), // }, // { // AbsoluteValue: to.Ptr[float64](0), // DimensionName: to.Ptr("QueriesWithRegressedPerformance"), // Unit: to.Ptr("Count"), // }, // { // AbsoluteValue: to.Ptr[float64](-342), // DimensionName: to.Ptr("SpaceChange"), // Unit: to.Ptr("Megabytes"), // }, // { // AbsoluteValue: to.Ptr[float64](0), // DimensionName: to.Ptr("VerificationProgress"), // Unit: to.Ptr("Percent"), // }}, // RecommendationReason: to.Ptr("Duplicate"), // Score: to.Ptr[int32](1), // State: &armsql.RecommendedActionStateInfo{ // ActionInitiatedBy: to.Ptr(armsql.RecommendedActionInitiatedBySystem), // CurrentValue: to.Ptr(armsql.RecommendedActionCurrentStateSuccess), // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-02-28T14:38:05.000Z"); return t}()), // }, // TimeSeries: []*armsql.RecommendedActionMetricInfo{ // }, // ValidSince: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // Details: map[string]any{ // "schema": "[dbo]", // "databaseName": "IndexAdvisor_test_3", // "includedColumns": "[OrganizationKey]", // "indexActionDuration": "00:01:00", // "indexActionStartTime": "2017-03-01T14:38:05.837", // "indexColumns": "[FinanceKey],[DateKey]", // "indexName": "IX_FF", // "indexType": "NONCLUSTERED", // "originalIndexName": "IX_COM_SKU_SKUDepartmentID", // "table": "[FactFinance]", // }, // }, // }, // { // Name: to.Ptr("IR_[CRM]_[DataPoints1]_13ADA5F354E9E14A983B"), // Type: to.Ptr("Microsoft.Sql/servers/advisors/recommendedActions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/DropIndex/recommendedActions/IR_[CRM]_[DataPoints1]_13ADA5F354E9E14A983B"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.RecommendedActionProperties{ // ErrorDetails: &armsql.RecommendedActionErrorInfo{ // }, // EstimatedImpact: []*armsql.RecommendedActionImpactRecord{ // { // AbsoluteValue: to.Ptr[float64](645), // DimensionName: to.Ptr("ActionDuration"), // Unit: to.Ptr("Seconds"), // }, // { // AbsoluteValue: to.Ptr[float64](342), // DimensionName: to.Ptr("SpaceChange"), // Unit: to.Ptr("Megabytes"), // }}, // ExecuteActionInitiatedBy: to.Ptr(armsql.RecommendedActionInitiatedBySystem), // ExecuteActionInitiatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-23T14:14:35.000Z"); return t}()), // ImplementationDetails: &armsql.RecommendedActionImplementationInfo{ // Method: to.Ptr(armsql.ImplementationMethodTSQL), // Script: to.Ptr("DROP INDEX [IX_FF] ON [CRM].[DataPoints1]"), // }, // IsArchivedAction: to.Ptr(false), // IsExecutableAction: to.Ptr(true), // IsRevertableAction: to.Ptr(true), // LastRefresh: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // ObservedImpact: []*armsql.RecommendedActionImpactRecord{ // }, // RecommendationReason: to.Ptr("Unused"), // Score: to.Ptr[int32](1), // State: &armsql.RecommendedActionStateInfo{ // ActionInitiatedBy: to.Ptr(armsql.RecommendedActionInitiatedBySystem), // CurrentValue: to.Ptr(armsql.RecommendedActionCurrentStatePending), // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-23T14:14:35.000Z"); return t}()), // }, // TimeSeries: []*armsql.RecommendedActionMetricInfo{ // }, // ValidSince: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:38:05.000Z"); return t}()), // Details: map[string]any{ // "schema": "[CRM]", // "databaseName": "IndexAdvisor_test_3", // "includedColumns": "[Apple]", // "indexColumns": "[Protocol],[SessionId]", // "indexName": "IX_FF", // "indexType": "NONCLUSTERED", // "originalIndexName": "IX_COM_SKU_SKUDepartmentID", // "table": "[DataPoints1]", // }, // }, // }}, // }, // }, // { // Name: to.Ptr("DbParameterization"), // Type: to.Ptr("Microsoft.Sql/servers/advisors"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/DbParameterization"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.AdvisorProperties{ // AdvisorStatus: to.Ptr(armsql.AdvisorStatusGA), // AutoExecuteStatus: to.Ptr(armsql.AutoExecuteStatusDisabled), // AutoExecuteStatusInheritedFrom: to.Ptr(armsql.AutoExecuteStatusInheritedFromDefault), // RecommendedActions: []*armsql.RecommendedAction{ // { // Name: to.Ptr("ForceDbParameterization"), // Type: to.Ptr("Microsoft.Sql/servers/advisors/recommendedActions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/DbParameterization/recommendedActions/ForceDbParameterization"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.RecommendedActionProperties{ // ErrorDetails: &armsql.RecommendedActionErrorInfo{ // }, // EstimatedImpact: []*armsql.RecommendedActionImpactRecord{ // { // ChangeValueAbsolute: to.Ptr[float64](22.5613696939135), // DimensionName: to.Ptr("CpuSavings"), // Unit: to.Ptr("Percent"), // }, // { // ChangeValueAbsolute: to.Ptr[float64](0.701823681806341), // DimensionName: to.Ptr("QueryDurationDecrease"), // Unit: to.Ptr("secs"), // }}, // ExecuteActionInitiatedBy: to.Ptr(armsql.RecommendedActionInitiatedBySystem), // ExecuteActionInitiatedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-11T15:08:31.000Z"); return t}()), // ImplementationDetails: &armsql.RecommendedActionImplementationInfo{ // Method: to.Ptr(armsql.ImplementationMethodTSQL), // Script: to.Ptr("ALTER DATABASE [IndexAdvisor_test_3] SET PARAMETERIZATION FORCED"), // }, // IsArchivedAction: to.Ptr(false), // IsExecutableAction: to.Ptr(true), // IsRevertableAction: to.Ptr(true), // LastRefresh: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:37:44.000Z"); return t}()), // ObservedImpact: []*armsql.RecommendedActionImpactRecord{ // }, // RecommendationReason: to.Ptr(""), // Score: to.Ptr[int32](3), // State: &armsql.RecommendedActionStateInfo{ // ActionInitiatedBy: to.Ptr(armsql.RecommendedActionInitiatedBySystem), // CurrentValue: to.Ptr(armsql.RecommendedActionCurrentStatePending), // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-11T15:08:31.000Z"); return t}()), // }, // TimeSeries: []*armsql.RecommendedActionMetricInfo{ // }, // ValidSince: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:37:44.000Z"); return t}()), // Details: map[string]any{ // "databaseName": "IndexAdvisor_test_3", // }, // }, // }}, // }, // }, // { // Name: to.Ptr("SchemaIssue"), // Type: to.Ptr("Microsoft.Sql/servers/advisors"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/SchemaIssue"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.AdvisorProperties{ // AdvisorStatus: to.Ptr(armsql.AdvisorStatusPublicPreview), // AutoExecuteStatus: to.Ptr(armsql.AutoExecuteStatusDisabled), // AutoExecuteStatusInheritedFrom: to.Ptr(armsql.AutoExecuteStatusInheritedFromDefault), // RecommendedActions: []*armsql.RecommendedAction{ // { // Name: to.Ptr("SchemaProblem_1A258C5714A7410C9D23"), // Type: to.Ptr("Microsoft.Sql/servers/advisors/recommendedActions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/SchemaIssue/recommendedActions/SchemaProblem_1A258C5714A7410C9D23"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.RecommendedActionProperties{ // ErrorDetails: &armsql.RecommendedActionErrorInfo{ // }, // EstimatedImpact: []*armsql.RecommendedActionImpactRecord{ // }, // ImplementationDetails: &armsql.RecommendedActionImplementationInfo{ // }, // IsArchivedAction: to.Ptr(false), // IsExecutableAction: to.Ptr(false), // IsRevertableAction: to.Ptr(false), // LastRefresh: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-07T22:19:53.000Z"); return t}()), // ObservedImpact: []*armsql.RecommendedActionImpactRecord{ // }, // RecommendationReason: to.Ptr("SchemaProblem"), // Score: to.Ptr[int32](3), // State: &armsql.RecommendedActionStateInfo{ // CurrentValue: to.Ptr(armsql.RecommendedActionCurrentStateActive), // LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:37:48.000Z"); return t}()), // }, // TimeSeries: []*armsql.RecommendedActionMetricInfo{ // }, // ValidSince: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-01T14:37:48.000Z"); return t}()), // Details: map[string]any{ // "databaseName": "IndexAdvisor_test_3", // "sqlErrorCount": float64(342482), // "sqlErrorMessage": "Invalid object name 'dbo.Companies'.", // "sqlErrorNumber": float64(208), // }, // }, // }}, // }, // }, // { // Name: to.Ptr("ForceLastGoodPlan"), // Type: to.Ptr("Microsoft.Sql/servers/advisors"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/ForceLastGoodPlan"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.AdvisorProperties{ // AdvisorStatus: to.Ptr(armsql.AdvisorStatusPrivatePreview), // AutoExecuteStatus: to.Ptr(armsql.AutoExecuteStatusDisabled), // AutoExecuteStatusInheritedFrom: to.Ptr(armsql.AutoExecuteStatusInheritedFromDefault), // RecommendedActions: []*armsql.RecommendedAction{ // }, // }, // }} }
Output:
func (*ServerAdvisorsClient) Update ¶
func (client *ServerAdvisorsClient) Update(ctx context.Context, resourceGroupName string, serverName string, advisorName string, parameters Advisor, options *ServerAdvisorsClientUpdateOptions) (ServerAdvisorsClientUpdateResponse, error)
Update - Updates a server advisor. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- advisorName - The name of the Server Advisor.
- parameters - The requested advisor resource state.
- options - ServerAdvisorsClientUpdateOptions contains the optional parameters for the ServerAdvisorsClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerAdvisorUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServerAdvisorsClient().Update(ctx, "workloadinsight-demos", "misosisvr", "CreateIndex", armsql.Advisor{ Properties: &armsql.AdvisorProperties{ AutoExecuteStatus: to.Ptr(armsql.AutoExecuteStatusDisabled), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Advisor = armsql.Advisor{ // Name: to.Ptr("CreateIndex"), // Type: to.Ptr("Microsoft.Sql/servers/advisors"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workloadinsight-demos/providers/Microsoft.Sql/servers/misosisvr/advisors/CreateIndex"), // Kind: to.Ptr(""), // Location: to.Ptr("East Asia"), // Properties: &armsql.AdvisorProperties{ // AdvisorStatus: to.Ptr(armsql.AdvisorStatusGA), // AutoExecuteStatus: to.Ptr(armsql.AutoExecuteStatusDisabled), // AutoExecuteStatusInheritedFrom: to.Ptr(armsql.AutoExecuteStatusInheritedFromServer), // }, // } }
Output:
type ServerAdvisorsClientGetOptions ¶ added in v0.3.0
type ServerAdvisorsClientGetOptions struct { }
ServerAdvisorsClientGetOptions contains the optional parameters for the ServerAdvisorsClient.Get method.
type ServerAdvisorsClientGetResponse ¶ added in v0.3.0
type ServerAdvisorsClientGetResponse struct { // Database, Server or Elastic Pool Advisor. Advisor }
ServerAdvisorsClientGetResponse contains the response from method ServerAdvisorsClient.Get.
type ServerAdvisorsClientListByServerOptions ¶ added in v0.3.0
type ServerAdvisorsClientListByServerOptions struct { // The child resources to include in the response. Expand *string }
ServerAdvisorsClientListByServerOptions contains the optional parameters for the ServerAdvisorsClient.ListByServer method.
type ServerAdvisorsClientListByServerResponse ¶ added in v0.3.0
type ServerAdvisorsClientListByServerResponse struct { // Array of Advisor AdvisorArray []*Advisor }
ServerAdvisorsClientListByServerResponse contains the response from method ServerAdvisorsClient.ListByServer.
type ServerAdvisorsClientUpdateOptions ¶ added in v0.3.0
type ServerAdvisorsClientUpdateOptions struct { }
ServerAdvisorsClientUpdateOptions contains the optional parameters for the ServerAdvisorsClient.Update method.
type ServerAdvisorsClientUpdateResponse ¶ added in v0.3.0
type ServerAdvisorsClientUpdateResponse struct { // Database, Server or Elastic Pool Advisor. Advisor }
ServerAdvisorsClientUpdateResponse contains the response from method ServerAdvisorsClient.Update.
type ServerAutomaticTuning ¶
type ServerAutomaticTuning struct { // Resource properties. Properties *AutomaticTuningServerProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ServerAutomaticTuning - Server-level Automatic Tuning.
func (ServerAutomaticTuning) MarshalJSON ¶
func (s ServerAutomaticTuning) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerAutomaticTuning.
func (*ServerAutomaticTuning) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerAutomaticTuning) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerAutomaticTuning.
type ServerAutomaticTuningClient ¶
type ServerAutomaticTuningClient struct {
// contains filtered or unexported fields
}
ServerAutomaticTuningClient contains the methods for the ServerAutomaticTuning group. Don't use this type directly, use NewServerAutomaticTuningClient() instead.
func NewServerAutomaticTuningClient ¶
func NewServerAutomaticTuningClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerAutomaticTuningClient, error)
NewServerAutomaticTuningClient creates a new instance of ServerAutomaticTuningClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ServerAutomaticTuningClient) Get ¶
func (client *ServerAutomaticTuningClient) Get(ctx context.Context, resourceGroupName string, serverName string, options *ServerAutomaticTuningClientGetOptions) (ServerAutomaticTuningClientGetResponse, error)
Get - Retrieves server automatic tuning options. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - ServerAutomaticTuningClientGetOptions contains the optional parameters for the ServerAutomaticTuningClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerAutomaticTuningGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServerAutomaticTuningClient().Get(ctx, "default-sql-onebox", "testsvr11", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerAutomaticTuning = armsql.ServerAutomaticTuning{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/servers/automaticTuning"), // ID: to.Ptr("/subscriptions/c3aa9078-0000-0000-0000-e36f151182d7/resourceGroups/default-sql-onebox/providers/Microsoft.Sql/servers/testsvr11/automaticTuning/current"), // Properties: &armsql.AutomaticTuningServerProperties{ // ActualState: to.Ptr(armsql.AutomaticTuningServerModeAuto), // DesiredState: to.Ptr(armsql.AutomaticTuningServerModeAuto), // Options: map[string]*armsql.AutomaticTuningServerOptions{ // "createIndex": &armsql.AutomaticTuningServerOptions{ // ActualState: to.Ptr(armsql.AutomaticTuningOptionModeActualOn), // DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredDefault), // ReasonCode: to.Ptr[int32](2), // ReasonDesc: to.Ptr(armsql.AutomaticTuningServerReasonAutoConfigured), // }, // "dropIndex": &armsql.AutomaticTuningServerOptions{ // ActualState: to.Ptr(armsql.AutomaticTuningOptionModeActualOff), // DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredDefault), // ReasonCode: to.Ptr[int32](2), // ReasonDesc: to.Ptr(armsql.AutomaticTuningServerReasonAutoConfigured), // }, // "forceLastGoodPlan": &armsql.AutomaticTuningServerOptions{ // ActualState: to.Ptr(armsql.AutomaticTuningOptionModeActualOn), // DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredDefault), // ReasonCode: to.Ptr[int32](2), // ReasonDesc: to.Ptr(armsql.AutomaticTuningServerReasonAutoConfigured), // }, // "maintainIndex": &armsql.AutomaticTuningServerOptions{ // ActualState: to.Ptr(armsql.AutomaticTuningOptionModeActualOff), // DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredDefault), // ReasonCode: to.Ptr[int32](2), // ReasonDesc: to.Ptr(armsql.AutomaticTuningServerReasonAutoConfigured), // }, // }, // }, // } }
Output:
func (*ServerAutomaticTuningClient) Update ¶
func (client *ServerAutomaticTuningClient) Update(ctx context.Context, resourceGroupName string, serverName string, parameters ServerAutomaticTuning, options *ServerAutomaticTuningClientUpdateOptions) (ServerAutomaticTuningClientUpdateResponse, error)
Update - Update automatic tuning options on server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- parameters - The requested automatic tuning resource state.
- options - ServerAutomaticTuningClientUpdateOptions contains the optional parameters for the ServerAutomaticTuningClient.Update method.
Example (UpdatesServerAutomaticTuningSettingsWithAllProperties) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerAutomaticTuningUpdateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServerAutomaticTuningClient().Update(ctx, "default-sql-onebox", "testsvr11", armsql.ServerAutomaticTuning{ Properties: &armsql.AutomaticTuningServerProperties{ DesiredState: to.Ptr(armsql.AutomaticTuningServerModeAuto), Options: map[string]*armsql.AutomaticTuningServerOptions{ "createIndex": { DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredOff), }, "dropIndex": { DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredOn), }, "forceLastGoodPlan": { DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredDefault), }, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerAutomaticTuning = armsql.ServerAutomaticTuning{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/servers/automaticTuning"), // ID: to.Ptr("/subscriptions/c3aa9078-0000-0000-0000-e36f151182d7/resourceGroups/default-sql-onebox/providers/Microsoft.Sql/servers/testsvr11/automaticTuning/current"), // Properties: &armsql.AutomaticTuningServerProperties{ // ActualState: to.Ptr(armsql.AutomaticTuningServerModeAuto), // DesiredState: to.Ptr(armsql.AutomaticTuningServerModeAuto), // Options: map[string]*armsql.AutomaticTuningServerOptions{ // "createIndex": &armsql.AutomaticTuningServerOptions{ // ActualState: to.Ptr(armsql.AutomaticTuningOptionModeActualOff), // DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredOff), // }, // "dropIndex": &armsql.AutomaticTuningServerOptions{ // ActualState: to.Ptr(armsql.AutomaticTuningOptionModeActualOn), // DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredOn), // }, // "forceLastGoodPlan": &armsql.AutomaticTuningServerOptions{ // ActualState: to.Ptr(armsql.AutomaticTuningOptionModeActualOn), // DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredDefault), // ReasonCode: to.Ptr[int32](2), // ReasonDesc: to.Ptr(armsql.AutomaticTuningServerReasonAutoConfigured), // }, // "maintainIndex": &armsql.AutomaticTuningServerOptions{ // ActualState: to.Ptr(armsql.AutomaticTuningOptionModeActualOff), // DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredDefault), // ReasonCode: to.Ptr[int32](2), // ReasonDesc: to.Ptr(armsql.AutomaticTuningServerReasonAutoConfigured), // }, // }, // }, // } }
Output:
Example (UpdatesServerAutomaticTuningSettingsWithMinimalProperties) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerAutomaticTuningUpdateMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServerAutomaticTuningClient().Update(ctx, "default-sql-onebox", "testsvr11", armsql.ServerAutomaticTuning{ Properties: &armsql.AutomaticTuningServerProperties{ DesiredState: to.Ptr(armsql.AutomaticTuningServerModeAuto), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerAutomaticTuning = armsql.ServerAutomaticTuning{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/servers/automaticTuning"), // ID: to.Ptr("/subscriptions/c3aa9078-0000-0000-0000-e36f151182d7/resourceGroups/default-sql-onebox/providers/Microsoft.Sql/servers/testsvr11/automaticTuning/current"), // Properties: &armsql.AutomaticTuningServerProperties{ // ActualState: to.Ptr(armsql.AutomaticTuningServerModeAuto), // DesiredState: to.Ptr(armsql.AutomaticTuningServerModeAuto), // Options: map[string]*armsql.AutomaticTuningServerOptions{ // "createIndex": &armsql.AutomaticTuningServerOptions{ // ActualState: to.Ptr(armsql.AutomaticTuningOptionModeActualOn), // DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredDefault), // ReasonCode: to.Ptr[int32](2), // ReasonDesc: to.Ptr(armsql.AutomaticTuningServerReasonAutoConfigured), // }, // "dropIndex": &armsql.AutomaticTuningServerOptions{ // ActualState: to.Ptr(armsql.AutomaticTuningOptionModeActualOff), // DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredDefault), // ReasonCode: to.Ptr[int32](2), // ReasonDesc: to.Ptr(armsql.AutomaticTuningServerReasonAutoConfigured), // }, // "forceLastGoodPlan": &armsql.AutomaticTuningServerOptions{ // ActualState: to.Ptr(armsql.AutomaticTuningOptionModeActualOn), // DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredDefault), // ReasonCode: to.Ptr[int32](2), // ReasonDesc: to.Ptr(armsql.AutomaticTuningServerReasonAutoConfigured), // }, // "maintainIndex": &armsql.AutomaticTuningServerOptions{ // ActualState: to.Ptr(armsql.AutomaticTuningOptionModeActualOff), // DesiredState: to.Ptr(armsql.AutomaticTuningOptionModeDesiredDefault), // ReasonCode: to.Ptr[int32](2), // ReasonDesc: to.Ptr(armsql.AutomaticTuningServerReasonAutoConfigured), // }, // }, // }, // } }
Output:
type ServerAutomaticTuningClientGetOptions ¶ added in v0.3.0
type ServerAutomaticTuningClientGetOptions struct { }
ServerAutomaticTuningClientGetOptions contains the optional parameters for the ServerAutomaticTuningClient.Get method.
type ServerAutomaticTuningClientGetResponse ¶ added in v0.3.0
type ServerAutomaticTuningClientGetResponse struct { // Server-level Automatic Tuning. ServerAutomaticTuning }
ServerAutomaticTuningClientGetResponse contains the response from method ServerAutomaticTuningClient.Get.
type ServerAutomaticTuningClientUpdateOptions ¶ added in v0.3.0
type ServerAutomaticTuningClientUpdateOptions struct { }
ServerAutomaticTuningClientUpdateOptions contains the optional parameters for the ServerAutomaticTuningClient.Update method.
type ServerAutomaticTuningClientUpdateResponse ¶ added in v0.3.0
type ServerAutomaticTuningClientUpdateResponse struct { // Server-level Automatic Tuning. ServerAutomaticTuning }
ServerAutomaticTuningClientUpdateResponse contains the response from method ServerAutomaticTuningClient.Update.
type ServerAzureADAdministrator ¶
type ServerAzureADAdministrator struct { // Resource properties. Properties *AdministratorProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ServerAzureADAdministrator - Azure Active Directory administrator.
func (ServerAzureADAdministrator) MarshalJSON ¶
func (s ServerAzureADAdministrator) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerAzureADAdministrator.
func (*ServerAzureADAdministrator) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerAzureADAdministrator) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerAzureADAdministrator.
type ServerAzureADAdministratorsClient ¶
type ServerAzureADAdministratorsClient struct {
// contains filtered or unexported fields
}
ServerAzureADAdministratorsClient contains the methods for the ServerAzureADAdministrators group. Don't use this type directly, use NewServerAzureADAdministratorsClient() instead.
func NewServerAzureADAdministratorsClient ¶
func NewServerAzureADAdministratorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerAzureADAdministratorsClient, error)
NewServerAzureADAdministratorsClient creates a new instance of ServerAzureADAdministratorsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ServerAzureADAdministratorsClient) BeginCreateOrUpdate ¶
func (client *ServerAzureADAdministratorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, administratorName AdministratorName, parameters ServerAzureADAdministrator, options *ServerAzureADAdministratorsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerAzureADAdministratorsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates an existing Azure Active Directory administrator. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- administratorName - The name of server active directory administrator.
- parameters - The requested Azure Active Directory administrator Resource state.
- options - ServerAzureADAdministratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerAzureADAdministratorsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AdministratorCreateOrUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerAzureADAdministratorsClient().BeginCreateOrUpdate(ctx, "sqlcrudtest-4799", "sqlcrudtest-6440", armsql.AdministratorNameActiveDirectory, armsql.ServerAzureADAdministrator{ Properties: &armsql.AdministratorProperties{ AdministratorType: to.Ptr(armsql.AdministratorTypeActiveDirectory), Login: to.Ptr("bob@contoso.com"), Sid: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), TenantID: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerAzureADAdministrator = armsql.ServerAzureADAdministrator{ // Name: to.Ptr("ActiveDirectory"), // Type: to.Ptr("Microsoft.Sql/servers/administrators"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory"), // Properties: &armsql.AdministratorProperties{ // AdministratorType: to.Ptr(armsql.AdministratorTypeActiveDirectory), // AzureADOnlyAuthentication: to.Ptr(true), // Login: to.Ptr("bob@contoso.com"), // Sid: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), // TenantID: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), // }, // } }
Output:
func (*ServerAzureADAdministratorsClient) BeginDelete ¶
func (client *ServerAzureADAdministratorsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, administratorName AdministratorName, options *ServerAzureADAdministratorsClientBeginDeleteOptions) (*runtime.Poller[ServerAzureADAdministratorsClientDeleteResponse], error)
BeginDelete - Deletes the Azure Active Directory administrator with the given name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- administratorName - The name of server active directory administrator.
- options - ServerAzureADAdministratorsClientBeginDeleteOptions contains the optional parameters for the ServerAzureADAdministratorsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AdministratorDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerAzureADAdministratorsClient().BeginDelete(ctx, "sqlcrudtest-4799", "sqlcrudtest-6440", armsql.AdministratorNameActiveDirectory, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ServerAzureADAdministratorsClient) Get ¶
func (client *ServerAzureADAdministratorsClient) Get(ctx context.Context, resourceGroupName string, serverName string, administratorName AdministratorName, options *ServerAzureADAdministratorsClientGetOptions) (ServerAzureADAdministratorsClientGetResponse, error)
Get - Gets a Azure Active Directory administrator. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- administratorName - The name of server active directory administrator.
- options - ServerAzureADAdministratorsClientGetOptions contains the optional parameters for the ServerAzureADAdministratorsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AdministratorGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServerAzureADAdministratorsClient().Get(ctx, "sqlcrudtest-4799", "sqlcrudtest-6440", armsql.AdministratorNameActiveDirectory, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerAzureADAdministrator = armsql.ServerAzureADAdministrator{ // Name: to.Ptr("ActiveDirectory"), // Type: to.Ptr("Microsoft.Sql/servers/administrators"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory"), // Properties: &armsql.AdministratorProperties{ // AdministratorType: to.Ptr(armsql.AdministratorTypeActiveDirectory), // AzureADOnlyAuthentication: to.Ptr(true), // Login: to.Ptr("bob@contoso.com"), // Sid: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), // TenantID: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), // }, // } }
Output:
func (*ServerAzureADAdministratorsClient) NewListByServerPager ¶ added in v0.5.0
func (client *ServerAzureADAdministratorsClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServerAzureADAdministratorsClientListByServerOptions) *runtime.Pager[ServerAzureADAdministratorsClientListByServerResponse]
NewListByServerPager - Gets a list of Azure Active Directory administrators in a server.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - ServerAzureADAdministratorsClientListByServerOptions contains the optional parameters for the ServerAzureADAdministratorsClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AdministratorList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServerAzureADAdministratorsClient().NewListByServerPager("sqlcrudtest-4799", "sqlcrudtest-6440", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.AdministratorListResult = armsql.AdministratorListResult{ // Value: []*armsql.ServerAzureADAdministrator{ // { // Name: to.Ptr("ActiveDirectory"), // Type: to.Ptr("Microsoft.Sql/servers/administrators"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/administrators/ActiveDirectory"), // Properties: &armsql.AdministratorProperties{ // AdministratorType: to.Ptr(armsql.AdministratorTypeActiveDirectory), // AzureADOnlyAuthentication: to.Ptr(true), // Login: to.Ptr("bob@contoso.com"), // Sid: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), // TenantID: to.Ptr("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), // }, // }}, // } } }
Output:
type ServerAzureADAdministratorsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ServerAzureADAdministratorsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerAzureADAdministratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerAzureADAdministratorsClient.BeginCreateOrUpdate method.
type ServerAzureADAdministratorsClientBeginDeleteOptions ¶ added in v0.3.0
type ServerAzureADAdministratorsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerAzureADAdministratorsClientBeginDeleteOptions contains the optional parameters for the ServerAzureADAdministratorsClient.BeginDelete method.
type ServerAzureADAdministratorsClientCreateOrUpdateResponse ¶ added in v0.3.0
type ServerAzureADAdministratorsClientCreateOrUpdateResponse struct { // Azure Active Directory administrator. ServerAzureADAdministrator }
ServerAzureADAdministratorsClientCreateOrUpdateResponse contains the response from method ServerAzureADAdministratorsClient.BeginCreateOrUpdate.
type ServerAzureADAdministratorsClientDeleteResponse ¶ added in v0.3.0
type ServerAzureADAdministratorsClientDeleteResponse struct { }
ServerAzureADAdministratorsClientDeleteResponse contains the response from method ServerAzureADAdministratorsClient.BeginDelete.
type ServerAzureADAdministratorsClientGetOptions ¶ added in v0.3.0
type ServerAzureADAdministratorsClientGetOptions struct { }
ServerAzureADAdministratorsClientGetOptions contains the optional parameters for the ServerAzureADAdministratorsClient.Get method.
type ServerAzureADAdministratorsClientGetResponse ¶ added in v0.3.0
type ServerAzureADAdministratorsClientGetResponse struct { // Azure Active Directory administrator. ServerAzureADAdministrator }
ServerAzureADAdministratorsClientGetResponse contains the response from method ServerAzureADAdministratorsClient.Get.
type ServerAzureADAdministratorsClientListByServerOptions ¶ added in v0.3.0
type ServerAzureADAdministratorsClientListByServerOptions struct { }
ServerAzureADAdministratorsClientListByServerOptions contains the optional parameters for the ServerAzureADAdministratorsClient.NewListByServerPager method.
type ServerAzureADAdministratorsClientListByServerResponse ¶ added in v0.3.0
type ServerAzureADAdministratorsClientListByServerResponse struct { // A list of active directory administrators. AdministratorListResult }
ServerAzureADAdministratorsClientListByServerResponse contains the response from method ServerAzureADAdministratorsClient.NewListByServerPager.
type ServerAzureADOnlyAuthentication ¶
type ServerAzureADOnlyAuthentication struct { // Resource properties. Properties *AzureADOnlyAuthProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ServerAzureADOnlyAuthentication - Azure Active Directory only authentication.
func (ServerAzureADOnlyAuthentication) MarshalJSON ¶
func (s ServerAzureADOnlyAuthentication) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerAzureADOnlyAuthentication.
func (*ServerAzureADOnlyAuthentication) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerAzureADOnlyAuthentication) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerAzureADOnlyAuthentication.
type ServerAzureADOnlyAuthenticationsClient ¶
type ServerAzureADOnlyAuthenticationsClient struct {
// contains filtered or unexported fields
}
ServerAzureADOnlyAuthenticationsClient contains the methods for the ServerAzureADOnlyAuthentications group. Don't use this type directly, use NewServerAzureADOnlyAuthenticationsClient() instead.
func NewServerAzureADOnlyAuthenticationsClient ¶
func NewServerAzureADOnlyAuthenticationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerAzureADOnlyAuthenticationsClient, error)
NewServerAzureADOnlyAuthenticationsClient creates a new instance of ServerAzureADOnlyAuthenticationsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ServerAzureADOnlyAuthenticationsClient) BeginCreateOrUpdate ¶
func (client *ServerAzureADOnlyAuthenticationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, authenticationName AuthenticationName, parameters ServerAzureADOnlyAuthentication, options *ServerAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerAzureADOnlyAuthenticationsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Sets Server Active Directory only authentication property or updates an existing server Active Directory only authentication property. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- authenticationName - The name of server azure active directory only authentication.
- parameters - The required parameters for creating or updating an Active Directory only authentication property.
- options - ServerAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerAzureADOnlyAuthenticationsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AzureADOnlyAuthCreateOrUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerAzureADOnlyAuthenticationsClient().BeginCreateOrUpdate(ctx, "sqlcrudtest-4799", "sqlcrudtest-6440", armsql.AuthenticationNameDefault, armsql.ServerAzureADOnlyAuthentication{ Properties: &armsql.AzureADOnlyAuthProperties{ AzureADOnlyAuthentication: to.Ptr(false), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerAzureADOnlyAuthentication = armsql.ServerAzureADOnlyAuthentication{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/azureadonlyauthentications"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/azureadonlyauthentications/default"), // Properties: &armsql.AzureADOnlyAuthProperties{ // AzureADOnlyAuthentication: to.Ptr(false), // }, // } }
Output:
func (*ServerAzureADOnlyAuthenticationsClient) BeginDelete ¶
func (client *ServerAzureADOnlyAuthenticationsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, authenticationName AuthenticationName, options *ServerAzureADOnlyAuthenticationsClientBeginDeleteOptions) (*runtime.Poller[ServerAzureADOnlyAuthenticationsClientDeleteResponse], error)
BeginDelete - Deletes an existing server Active Directory only authentication property. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- authenticationName - The name of server azure active directory only authentication.
- options - ServerAzureADOnlyAuthenticationsClientBeginDeleteOptions contains the optional parameters for the ServerAzureADOnlyAuthenticationsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AzureADOnlyAuthDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerAzureADOnlyAuthenticationsClient().BeginDelete(ctx, "sqlcrudtest-4799", "sqlcrudtest-6440", armsql.AuthenticationNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ServerAzureADOnlyAuthenticationsClient) Get ¶
func (client *ServerAzureADOnlyAuthenticationsClient) Get(ctx context.Context, resourceGroupName string, serverName string, authenticationName AuthenticationName, options *ServerAzureADOnlyAuthenticationsClientGetOptions) (ServerAzureADOnlyAuthenticationsClientGetResponse, error)
Get - Gets a specific Azure Active Directory only authentication property. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- authenticationName - The name of server azure active directory only authentication.
- options - ServerAzureADOnlyAuthenticationsClientGetOptions contains the optional parameters for the ServerAzureADOnlyAuthenticationsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AzureADOnlyAuthGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServerAzureADOnlyAuthenticationsClient().Get(ctx, "sqlcrudtest-4799", "sqlcrudtest-6440", armsql.AuthenticationNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerAzureADOnlyAuthentication = armsql.ServerAzureADOnlyAuthentication{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/azureadonlyauthentications"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/azureadonlyauthentications/default"), // Properties: &armsql.AzureADOnlyAuthProperties{ // AzureADOnlyAuthentication: to.Ptr(true), // }, // } }
Output:
func (*ServerAzureADOnlyAuthenticationsClient) NewListByServerPager ¶ added in v0.5.0
func (client *ServerAzureADOnlyAuthenticationsClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServerAzureADOnlyAuthenticationsClientListByServerOptions) *runtime.Pager[ServerAzureADOnlyAuthenticationsClientListByServerResponse]
NewListByServerPager - Gets a list of server Azure Active Directory only authentications.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - ServerAzureADOnlyAuthenticationsClientListByServerOptions contains the optional parameters for the ServerAzureADOnlyAuthenticationsClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AzureADOnlyAuthList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServerAzureADOnlyAuthenticationsClient().NewListByServerPager("sqlcrudtest-4799", "sqlcrudtest-6440", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.AzureADOnlyAuthListResult = armsql.AzureADOnlyAuthListResult{ // Value: []*armsql.ServerAzureADOnlyAuthentication{ // { // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/azureadonlyauthentications"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-6440/azureadonlyauthentications/default"), // Properties: &armsql.AzureADOnlyAuthProperties{ // AzureADOnlyAuthentication: to.Ptr(true), // }, // }}, // } } }
Output:
type ServerAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ServerAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerAzureADOnlyAuthenticationsClient.BeginCreateOrUpdate method.
type ServerAzureADOnlyAuthenticationsClientBeginDeleteOptions ¶ added in v0.3.0
type ServerAzureADOnlyAuthenticationsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerAzureADOnlyAuthenticationsClientBeginDeleteOptions contains the optional parameters for the ServerAzureADOnlyAuthenticationsClient.BeginDelete method.
type ServerAzureADOnlyAuthenticationsClientCreateOrUpdateResponse ¶ added in v0.3.0
type ServerAzureADOnlyAuthenticationsClientCreateOrUpdateResponse struct { // Azure Active Directory only authentication. ServerAzureADOnlyAuthentication }
ServerAzureADOnlyAuthenticationsClientCreateOrUpdateResponse contains the response from method ServerAzureADOnlyAuthenticationsClient.BeginCreateOrUpdate.
type ServerAzureADOnlyAuthenticationsClientDeleteResponse ¶ added in v0.3.0
type ServerAzureADOnlyAuthenticationsClientDeleteResponse struct { }
ServerAzureADOnlyAuthenticationsClientDeleteResponse contains the response from method ServerAzureADOnlyAuthenticationsClient.BeginDelete.
type ServerAzureADOnlyAuthenticationsClientGetOptions ¶ added in v0.3.0
type ServerAzureADOnlyAuthenticationsClientGetOptions struct { }
ServerAzureADOnlyAuthenticationsClientGetOptions contains the optional parameters for the ServerAzureADOnlyAuthenticationsClient.Get method.
type ServerAzureADOnlyAuthenticationsClientGetResponse ¶ added in v0.3.0
type ServerAzureADOnlyAuthenticationsClientGetResponse struct { // Azure Active Directory only authentication. ServerAzureADOnlyAuthentication }
ServerAzureADOnlyAuthenticationsClientGetResponse contains the response from method ServerAzureADOnlyAuthenticationsClient.Get.
type ServerAzureADOnlyAuthenticationsClientListByServerOptions ¶ added in v0.3.0
type ServerAzureADOnlyAuthenticationsClientListByServerOptions struct { }
ServerAzureADOnlyAuthenticationsClientListByServerOptions contains the optional parameters for the ServerAzureADOnlyAuthenticationsClient.NewListByServerPager method.
type ServerAzureADOnlyAuthenticationsClientListByServerResponse ¶ added in v0.3.0
type ServerAzureADOnlyAuthenticationsClientListByServerResponse struct { // A list of active directory only authentications. AzureADOnlyAuthListResult }
ServerAzureADOnlyAuthenticationsClientListByServerResponse contains the response from method ServerAzureADOnlyAuthenticationsClient.NewListByServerPager.
type ServerBlobAuditingPoliciesClient ¶
type ServerBlobAuditingPoliciesClient struct {
// contains filtered or unexported fields
}
ServerBlobAuditingPoliciesClient contains the methods for the ServerBlobAuditingPolicies group. Don't use this type directly, use NewServerBlobAuditingPoliciesClient() instead.
func NewServerBlobAuditingPoliciesClient ¶
func NewServerBlobAuditingPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerBlobAuditingPoliciesClient, error)
NewServerBlobAuditingPoliciesClient creates a new instance of ServerBlobAuditingPoliciesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ServerBlobAuditingPoliciesClient) BeginCreateOrUpdate ¶
func (client *ServerBlobAuditingPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters ServerBlobAuditingPolicy, options *ServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerBlobAuditingPoliciesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a server's blob auditing policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- parameters - Properties of blob auditing policy
- options - ServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerBlobAuditingPoliciesClient.BeginCreateOrUpdate method.
Example (UpdateAServersBlobAuditingPolicyWithAllParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerBlobAuditingCreateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerBlobAuditingPoliciesClient().BeginCreateOrUpdate(ctx, "blobauditingtest-4799", "blobauditingtest-6440", armsql.ServerBlobAuditingPolicy{ Properties: &armsql.ServerBlobAuditingPolicyProperties{ AuditActionsAndGroups: []*string{ to.Ptr("SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP"), to.Ptr("FAILED_DATABASE_AUTHENTICATION_GROUP"), to.Ptr("BATCH_COMPLETED_GROUP")}, IsAzureMonitorTargetEnabled: to.Ptr(true), IsStorageSecondaryKeyInUse: to.Ptr(false), QueueDelayMs: to.Ptr[int32](4000), RetentionDays: to.Ptr[int32](6), State: to.Ptr(armsql.BlobAuditingPolicyStateEnabled), StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), StorageAccountSubscriptionID: to.Ptr("00000000-1234-0000-5678-000000000000"), StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerBlobAuditingPolicy = armsql.ServerBlobAuditingPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/auditingSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/auditingSettings/default"), // Properties: &armsql.ServerBlobAuditingPolicyProperties{ // AuditActionsAndGroups: []*string{ // to.Ptr("SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP"), // to.Ptr("FAILED_DATABASE_AUTHENTICATION_GROUP"), // to.Ptr("BATCH_COMPLETED_GROUP")}, // IsAzureMonitorTargetEnabled: to.Ptr(true), // IsStorageSecondaryKeyInUse: to.Ptr(false), // QueueDelayMs: to.Ptr[int32](4000), // RetentionDays: to.Ptr[int32](6), // State: to.Ptr(armsql.BlobAuditingPolicyStateEnabled), // StorageAccountSubscriptionID: to.Ptr("00000000-1234-0000-5678-000000000000"), // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), // }, // } }
Output:
Example (UpdateAServersBlobAuditingPolicyWithMinimalParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerBlobAuditingCreateMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerBlobAuditingPoliciesClient().BeginCreateOrUpdate(ctx, "blobauditingtest-4799", "blobauditingtest-6440", armsql.ServerBlobAuditingPolicy{ Properties: &armsql.ServerBlobAuditingPolicyProperties{ State: to.Ptr(armsql.BlobAuditingPolicyStateEnabled), StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerBlobAuditingPolicy = armsql.ServerBlobAuditingPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/auditingSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/auditingSettings/default"), // Properties: &armsql.ServerBlobAuditingPolicyProperties{ // AuditActionsAndGroups: []*string{ // to.Ptr("SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP"), // to.Ptr("FAILED_DATABASE_AUTHENTICATION_GROUP"), // to.Ptr("BATCH_COMPLETED_GROUP")}, // IsStorageSecondaryKeyInUse: to.Ptr(false), // RetentionDays: to.Ptr[int32](6), // State: to.Ptr(armsql.BlobAuditingPolicyStateEnabled), // StorageAccountSubscriptionID: to.Ptr("00000000-1234-0000-5678-000000000000"), // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), // }, // } }
Output:
func (*ServerBlobAuditingPoliciesClient) Get ¶
func (client *ServerBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, options *ServerBlobAuditingPoliciesClientGetOptions) (ServerBlobAuditingPoliciesClientGetResponse, error)
Get - Gets a server's blob auditing policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - ServerBlobAuditingPoliciesClientGetOptions contains the optional parameters for the ServerBlobAuditingPoliciesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerBlobAuditingGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServerBlobAuditingPoliciesClient().Get(ctx, "blobauditingtest-4799", "blobauditingtest-6440", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerBlobAuditingPolicy = armsql.ServerBlobAuditingPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/auditingSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/auditingSettings/default"), // Properties: &armsql.ServerBlobAuditingPolicyProperties{ // AuditActionsAndGroups: []*string{ // }, // IsAzureMonitorTargetEnabled: to.Ptr(false), // IsManagedIdentityInUse: to.Ptr(false), // IsStorageSecondaryKeyInUse: to.Ptr(false), // RetentionDays: to.Ptr[int32](0), // State: to.Ptr(armsql.BlobAuditingPolicyStateDisabled), // StorageAccountSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"), // StorageEndpoint: to.Ptr(""), // }, // } }
Output:
func (*ServerBlobAuditingPoliciesClient) NewListByServerPager ¶ added in v0.5.0
func (client *ServerBlobAuditingPoliciesClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServerBlobAuditingPoliciesClientListByServerOptions) *runtime.Pager[ServerBlobAuditingPoliciesClientListByServerResponse]
NewListByServerPager - Lists auditing settings of a server.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - ServerBlobAuditingPoliciesClientListByServerOptions contains the optional parameters for the ServerBlobAuditingPoliciesClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerAuditingSettingsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServerBlobAuditingPoliciesClient().NewListByServerPager("blobauditingtest-4799", "blobauditingtest-6440", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ServerBlobAuditingPolicyListResult = armsql.ServerBlobAuditingPolicyListResult{ // Value: []*armsql.ServerBlobAuditingPolicy{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/auditingSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/auditingSettings/default"), // Properties: &armsql.ServerBlobAuditingPolicyProperties{ // AuditActionsAndGroups: []*string{ // }, // IsAzureMonitorTargetEnabled: to.Ptr(false), // IsManagedIdentityInUse: to.Ptr(false), // IsStorageSecondaryKeyInUse: to.Ptr(false), // RetentionDays: to.Ptr[int32](0), // State: to.Ptr(armsql.BlobAuditingPolicyStateDisabled), // StorageAccountSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"), // StorageEndpoint: to.Ptr(""), // }, // }}, // } } }
Output:
type ServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerBlobAuditingPoliciesClient.BeginCreateOrUpdate method.
type ServerBlobAuditingPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ServerBlobAuditingPoliciesClientCreateOrUpdateResponse struct { // A server blob auditing policy. ServerBlobAuditingPolicy }
ServerBlobAuditingPoliciesClientCreateOrUpdateResponse contains the response from method ServerBlobAuditingPoliciesClient.BeginCreateOrUpdate.
type ServerBlobAuditingPoliciesClientGetOptions ¶ added in v0.3.0
type ServerBlobAuditingPoliciesClientGetOptions struct { }
ServerBlobAuditingPoliciesClientGetOptions contains the optional parameters for the ServerBlobAuditingPoliciesClient.Get method.
type ServerBlobAuditingPoliciesClientGetResponse ¶ added in v0.3.0
type ServerBlobAuditingPoliciesClientGetResponse struct { // A server blob auditing policy. ServerBlobAuditingPolicy }
ServerBlobAuditingPoliciesClientGetResponse contains the response from method ServerBlobAuditingPoliciesClient.Get.
type ServerBlobAuditingPoliciesClientListByServerOptions ¶ added in v0.3.0
type ServerBlobAuditingPoliciesClientListByServerOptions struct { }
ServerBlobAuditingPoliciesClientListByServerOptions contains the optional parameters for the ServerBlobAuditingPoliciesClient.NewListByServerPager method.
type ServerBlobAuditingPoliciesClientListByServerResponse ¶ added in v0.3.0
type ServerBlobAuditingPoliciesClientListByServerResponse struct { // A list of server auditing settings. ServerBlobAuditingPolicyListResult }
ServerBlobAuditingPoliciesClientListByServerResponse contains the response from method ServerBlobAuditingPoliciesClient.NewListByServerPager.
type ServerBlobAuditingPolicy ¶
type ServerBlobAuditingPolicy struct { // Resource properties. Properties *ServerBlobAuditingPolicyProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ServerBlobAuditingPolicy - A server blob auditing policy.
func (ServerBlobAuditingPolicy) MarshalJSON ¶
func (s ServerBlobAuditingPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerBlobAuditingPolicy.
func (*ServerBlobAuditingPolicy) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerBlobAuditingPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerBlobAuditingPolicy.
type ServerBlobAuditingPolicyListResult ¶
type ServerBlobAuditingPolicyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ServerBlobAuditingPolicy }
ServerBlobAuditingPolicyListResult - A list of server auditing settings.
func (ServerBlobAuditingPolicyListResult) MarshalJSON ¶
func (s ServerBlobAuditingPolicyListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerBlobAuditingPolicyListResult.
func (*ServerBlobAuditingPolicyListResult) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerBlobAuditingPolicyListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerBlobAuditingPolicyListResult.
type ServerBlobAuditingPolicyProperties ¶
type ServerBlobAuditingPolicyProperties struct { // REQUIRED; Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. State *BlobAuditingPolicyState // Specifies the Actions-Groups and Actions to audit. // The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures // executed against the database, as well as successful and failed logins: // BATCHCOMPLETEDGROUP, SUCCESSFULDATABASEAUTHENTICATIONGROUP, FAILEDDATABASEAUTHENTICATIONGROUP. // This above combination is also the set that is configured by default when enabling auditing from the Azure portal. // The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary // groups could lead to very large quantities of audit records): // APPLICATIONROLECHANGEPASSWORDGROUP BACKUPRESTOREGROUP DATABASELOGOUTGROUP DATABASEOBJECTCHANGEGROUP DATABASEOBJECTOWNERSHIPCHANGEGROUP // DATABASEOBJECTPERMISSIONCHANGEGROUP DATABASEOPERATIONGROUP // DATABASEPERMISSIONCHANGEGROUP DATABASEPRINCIPALCHANGEGROUP DATABASEPRINCIPALIMPERSONATIONGROUP DATABASEROLEMEMBERCHANGEGROUP // FAILEDDATABASEAUTHENTICATIONGROUP SCHEMAOBJECTACCESSGROUP SCHEMAOBJECT // CHANGEGROUP SCHEMAOBJECTOWNERSHIPCHANGEGROUP SCHEMAOBJECTPERMISSIONCHANGEGROUP SUCCESSFULDATABASEAUTHENTICATIONGROUP USERCHANGEPASSWORDGROUP // BATCHSTARTEDGROUP BATCHCOMPLETEDGROUP DBCCGROUP DATABASE // OWNERSHIPCHANGEGROUP DATABASECHANGEGROUP LEDGEROPERATION_GROUP // These are groups that cover all sql statements and stored procedures executed against the database, and should not be used // in combination with other groups as this will result in duplicate audit logs. // For more information, see Database-Level Audit Action Groups // [https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups]. // For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server // auditing policy). The supported actions to audit are: SELECT UPDATE INSERT DELETE // EXECUTE RECEIVE REFERENCES // The general form for defining an action to be audited is: {action} ON {object} BY {principal} // Note that in the above format can refer to an object like a table, view, or stored procedure, or an entire database or // schema. For the latter cases, the forms DATABASE::{dbname} and SCHEMA::{schema // name} are used, respectively. // For example: SELECT on dbo.myTable by public SELECT on DATABASE::myDatabase by public SELECT on SCHEMA::mySchema by public // For more information, see Database-Level Audit Actions // [https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions] AuditActionsAndGroups []*string // Specifies whether audit events are sent to Azure Monitor. In order to send the events to Azure Monitor, specify 'State' // as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true. // When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on // the database should be also created. Note that for server level audit you // should use the 'master' database as {databaseName}. // Diagnostic Settings URI format: PUT // https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview // For more information, see Diagnostic Settings REST API [https://go.microsoft.com/fwlink/?linkid=2033207]or Diagnostic Settings // PowerShell [https://go.microsoft.com/fwlink/?linkid=2033043] IsAzureMonitorTargetEnabled *bool // Specifies the state of devops audit. If state is Enabled, devops logs will be sent to Azure Monitor. In order to send the // events to Azure Monitor, specify 'State' as 'Enabled', // 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true // When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs category on // the master database should also be created. // Diagnostic Settings URI format: PUT // https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview // For more information, see Diagnostic Settings REST API [https://go.microsoft.com/fwlink/?linkid=2033207]or Diagnostic Settings // PowerShell [https://go.microsoft.com/fwlink/?linkid=2033043] IsDevopsAuditEnabled *bool // Specifies whether Managed Identity is used to access blob storage IsManagedIdentityInUse *bool // Specifies whether storageAccountAccessKey value is the storage's secondary key. IsStorageSecondaryKeyInUse *bool // Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. The default // minimum value is 1000 (1 second). The maximum is 2,147,483,647. QueueDelayMs *int32 // Specifies the number of days to keep in the audit logs in the storage account. RetentionDays *int32 // Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, not // specifying the storageAccountAccessKey will use SQL server system-assigned // managed identity to access the storage. Prerequisites for using managed identity authentication: // 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). // 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server // identity. For more information, see Auditing to storage using Managed // Identity authentication [https://go.microsoft.com/fwlink/?linkid=2114355] StorageAccountAccessKey *string // Specifies the blob storage subscription Id. StorageAccountSubscriptionID *string // Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint // or isAzureMonitorTargetEnabled is required. StorageEndpoint *string }
ServerBlobAuditingPolicyProperties - Properties of a server blob auditing policy.
func (ServerBlobAuditingPolicyProperties) MarshalJSON ¶
func (s ServerBlobAuditingPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerBlobAuditingPolicyProperties.
func (*ServerBlobAuditingPolicyProperties) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerBlobAuditingPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerBlobAuditingPolicyProperties.
type ServerCommunicationLink ¶
type ServerCommunicationLink struct { // The properties of resource. Properties *ServerCommunicationLinkProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Communication link kind. This property is used for Azure Portal metadata. Kind *string // READ-ONLY; Communication link location. Location *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ServerCommunicationLink - Server communication link.
func (ServerCommunicationLink) MarshalJSON ¶
func (s ServerCommunicationLink) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerCommunicationLink.
func (*ServerCommunicationLink) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerCommunicationLink) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerCommunicationLink.
type ServerCommunicationLinkListResult ¶
type ServerCommunicationLinkListResult struct { // The list of server communication links. Value []*ServerCommunicationLink }
ServerCommunicationLinkListResult - A list of server communication links.
func (ServerCommunicationLinkListResult) MarshalJSON ¶
func (s ServerCommunicationLinkListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerCommunicationLinkListResult.
func (*ServerCommunicationLinkListResult) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerCommunicationLinkListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerCommunicationLinkListResult.
type ServerCommunicationLinkProperties ¶
type ServerCommunicationLinkProperties struct { // REQUIRED; The name of the partner server. PartnerServer *string // READ-ONLY; The state. State *string }
ServerCommunicationLinkProperties - The properties of a server communication link.
func (ServerCommunicationLinkProperties) MarshalJSON ¶ added in v1.1.0
func (s ServerCommunicationLinkProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerCommunicationLinkProperties.
func (*ServerCommunicationLinkProperties) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerCommunicationLinkProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerCommunicationLinkProperties.
type ServerCommunicationLinksClient ¶
type ServerCommunicationLinksClient struct {
// contains filtered or unexported fields
}
ServerCommunicationLinksClient contains the methods for the ServerCommunicationLinks group. Don't use this type directly, use NewServerCommunicationLinksClient() instead.
func NewServerCommunicationLinksClient ¶
func NewServerCommunicationLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerCommunicationLinksClient, error)
NewServerCommunicationLinksClient creates a new instance of ServerCommunicationLinksClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ServerCommunicationLinksClient) BeginCreateOrUpdate ¶
func (client *ServerCommunicationLinksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, communicationLinkName string, parameters ServerCommunicationLink, options *ServerCommunicationLinksClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerCommunicationLinksClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates a server communication link. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2014-04-01
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- communicationLinkName - The name of the server communication link.
- parameters - The required parameters for creating a server communication link.
- options - ServerCommunicationLinksClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerCommunicationLinksClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ServerCommunicationLinkCreateOrUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerCommunicationLinksClient().BeginCreateOrUpdate(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", "link1", armsql.ServerCommunicationLink{ Properties: &armsql.ServerCommunicationLinkProperties{ PartnerServer: to.Ptr("sqldcrudtest-test"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ServerCommunicationLinksClient) Delete ¶
func (client *ServerCommunicationLinksClient) Delete(ctx context.Context, resourceGroupName string, serverName string, communicationLinkName string, options *ServerCommunicationLinksClientDeleteOptions) (ServerCommunicationLinksClientDeleteResponse, error)
Delete - Deletes a server communication link. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2014-04-01
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- communicationLinkName - The name of the server communication link.
- options - ServerCommunicationLinksClientDeleteOptions contains the optional parameters for the ServerCommunicationLinksClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ServerCommunicationLinkDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewServerCommunicationLinksClient().Delete(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", "link1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*ServerCommunicationLinksClient) Get ¶
func (client *ServerCommunicationLinksClient) Get(ctx context.Context, resourceGroupName string, serverName string, communicationLinkName string, options *ServerCommunicationLinksClientGetOptions) (ServerCommunicationLinksClientGetResponse, error)
Get - Returns a server communication link. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2014-04-01
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- communicationLinkName - The name of the server communication link.
- options - ServerCommunicationLinksClientGetOptions contains the optional parameters for the ServerCommunicationLinksClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ServerCommunicationLinkGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServerCommunicationLinksClient().Get(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", "link1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerCommunicationLink = armsql.ServerCommunicationLink{ // Name: to.Ptr("link1"), // Type: to.Ptr("Microsoft.Sql/servers/communicationLinks"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/communicationLinks/link1"), // Location: to.Ptr("Central US"), // Properties: &armsql.ServerCommunicationLinkProperties{ // PartnerServer: to.Ptr("sqlcrudtest-test"), // State: to.Ptr("Ready"), // }, // } }
Output:
func (*ServerCommunicationLinksClient) NewListByServerPager ¶ added in v0.5.0
func (client *ServerCommunicationLinksClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServerCommunicationLinksClientListByServerOptions) *runtime.Pager[ServerCommunicationLinksClientListByServerResponse]
NewListByServerPager - Gets a list of server communication links.
Generated from API version 2014-04-01
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - ServerCommunicationLinksClientListByServerOptions contains the optional parameters for the ServerCommunicationLinksClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ServerCommunicationLinkList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServerCommunicationLinksClient().NewListByServerPager("sqlcrudtest-7398", "sqlcrudtest-4645", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ServerCommunicationLinkListResult = armsql.ServerCommunicationLinkListResult{ // Value: []*armsql.ServerCommunicationLink{ // { // Name: to.Ptr("link1"), // Type: to.Ptr("Microsoft.Sql/servers/communicationLinks"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/communicationLinks/link1"), // Location: to.Ptr("Central US"), // Properties: &armsql.ServerCommunicationLinkProperties{ // PartnerServer: to.Ptr("sqlcrudtest-test"), // State: to.Ptr("Ready"), // }, // }}, // } } }
Output:
type ServerCommunicationLinksClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ServerCommunicationLinksClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerCommunicationLinksClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerCommunicationLinksClient.BeginCreateOrUpdate method.
type ServerCommunicationLinksClientCreateOrUpdateResponse ¶ added in v0.3.0
type ServerCommunicationLinksClientCreateOrUpdateResponse struct { // Server communication link. ServerCommunicationLink }
ServerCommunicationLinksClientCreateOrUpdateResponse contains the response from method ServerCommunicationLinksClient.BeginCreateOrUpdate.
type ServerCommunicationLinksClientDeleteOptions ¶ added in v0.3.0
type ServerCommunicationLinksClientDeleteOptions struct { }
ServerCommunicationLinksClientDeleteOptions contains the optional parameters for the ServerCommunicationLinksClient.Delete method.
type ServerCommunicationLinksClientDeleteResponse ¶ added in v0.3.0
type ServerCommunicationLinksClientDeleteResponse struct { }
ServerCommunicationLinksClientDeleteResponse contains the response from method ServerCommunicationLinksClient.Delete.
type ServerCommunicationLinksClientGetOptions ¶ added in v0.3.0
type ServerCommunicationLinksClientGetOptions struct { }
ServerCommunicationLinksClientGetOptions contains the optional parameters for the ServerCommunicationLinksClient.Get method.
type ServerCommunicationLinksClientGetResponse ¶ added in v0.3.0
type ServerCommunicationLinksClientGetResponse struct { // Server communication link. ServerCommunicationLink }
ServerCommunicationLinksClientGetResponse contains the response from method ServerCommunicationLinksClient.Get.
type ServerCommunicationLinksClientListByServerOptions ¶ added in v0.3.0
type ServerCommunicationLinksClientListByServerOptions struct { }
ServerCommunicationLinksClientListByServerOptions contains the optional parameters for the ServerCommunicationLinksClient.NewListByServerPager method.
type ServerCommunicationLinksClientListByServerResponse ¶ added in v0.3.0
type ServerCommunicationLinksClientListByServerResponse struct { // A list of server communication links. ServerCommunicationLinkListResult }
ServerCommunicationLinksClientListByServerResponse contains the response from method ServerCommunicationLinksClient.NewListByServerPager.
type ServerConnectionPoliciesClient ¶
type ServerConnectionPoliciesClient struct {
// contains filtered or unexported fields
}
ServerConnectionPoliciesClient contains the methods for the ServerConnectionPolicies group. Don't use this type directly, use NewServerConnectionPoliciesClient() instead.
func NewServerConnectionPoliciesClient ¶
func NewServerConnectionPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerConnectionPoliciesClient, error)
NewServerConnectionPoliciesClient creates a new instance of ServerConnectionPoliciesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ServerConnectionPoliciesClient) BeginCreateOrUpdate ¶ added in v0.3.0
func (client *ServerConnectionPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, connectionPolicyName ConnectionPolicyName, parameters ServerConnectionPolicy, options *ServerConnectionPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerConnectionPoliciesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Updates a server connection policy If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- connectionPolicyName - The name of the connection policy.
- parameters - The required parameters for updating a server connection policy.
- options - ServerConnectionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerConnectionPoliciesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ServerConnectionPoliciesUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerConnectionPoliciesClient().BeginCreateOrUpdate(ctx, "testrg", "testserver", armsql.ConnectionPolicyNameDefault, armsql.ServerConnectionPolicy{ Properties: &armsql.ServerConnectionPolicyProperties{ ConnectionType: to.Ptr(armsql.ServerConnectionTypeRedirect), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerConnectionPolicy = armsql.ServerConnectionPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/connectionPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/servers/testserver/connectionPolicies/default"), // Location: to.Ptr("eastus"), // Properties: &armsql.ServerConnectionPolicyProperties{ // ConnectionType: to.Ptr(armsql.ServerConnectionTypeRedirect), // }, // } }
Output:
func (*ServerConnectionPoliciesClient) Get ¶
func (client *ServerConnectionPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, connectionPolicyName ConnectionPolicyName, options *ServerConnectionPoliciesClientGetOptions) (ServerConnectionPoliciesClientGetResponse, error)
Get - Gets a server connection policy If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- connectionPolicyName - The name of the connection policy.
- options - ServerConnectionPoliciesClientGetOptions contains the optional parameters for the ServerConnectionPoliciesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ServerConnectionPoliciesGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServerConnectionPoliciesClient().Get(ctx, "rgtest-12", "servertest-6285", armsql.ConnectionPolicyNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerConnectionPolicy = armsql.ServerConnectionPolicy{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/connectionPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rgtest-12/providers/Microsoft.Sql/servers/servertest-6285/connectionPolicies/default"), // Location: to.Ptr("eastus"), // Properties: &armsql.ServerConnectionPolicyProperties{ // ConnectionType: to.Ptr(armsql.ServerConnectionTypeRedirect), // }, // } }
Output:
func (*ServerConnectionPoliciesClient) NewListByServerPager ¶ added in v0.5.0
func (client *ServerConnectionPoliciesClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServerConnectionPoliciesClientListByServerOptions) *runtime.Pager[ServerConnectionPoliciesClientListByServerResponse]
NewListByServerPager - Lists connection policy
Generated from API version 2021-05-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - ServerConnectionPoliciesClientListByServerOptions contains the optional parameters for the ServerConnectionPoliciesClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ServerConnectionPoliciesList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServerConnectionPoliciesClient().NewListByServerPager("rgtest-12", "servertest-6285", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ServerConnectionPolicyListResult = armsql.ServerConnectionPolicyListResult{ // Value: []*armsql.ServerConnectionPolicy{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/connectionPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rgtest-12/providers/Microsoft.Sql/servers/servertest-6285/connectionPolicies/default"), // Location: to.Ptr("eastus"), // Properties: &armsql.ServerConnectionPolicyProperties{ // ConnectionType: to.Ptr(armsql.ServerConnectionTypeRedirect), // }, // }}, // } } }
Output:
type ServerConnectionPoliciesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ServerConnectionPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerConnectionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerConnectionPoliciesClient.BeginCreateOrUpdate method.
type ServerConnectionPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ServerConnectionPoliciesClientCreateOrUpdateResponse struct { // A server connection policy ServerConnectionPolicy }
ServerConnectionPoliciesClientCreateOrUpdateResponse contains the response from method ServerConnectionPoliciesClient.BeginCreateOrUpdate.
type ServerConnectionPoliciesClientGetOptions ¶ added in v0.3.0
type ServerConnectionPoliciesClientGetOptions struct { }
ServerConnectionPoliciesClientGetOptions contains the optional parameters for the ServerConnectionPoliciesClient.Get method.
type ServerConnectionPoliciesClientGetResponse ¶ added in v0.3.0
type ServerConnectionPoliciesClientGetResponse struct { // A server connection policy ServerConnectionPolicy }
ServerConnectionPoliciesClientGetResponse contains the response from method ServerConnectionPoliciesClient.Get.
type ServerConnectionPoliciesClientListByServerOptions ¶ added in v0.3.0
type ServerConnectionPoliciesClientListByServerOptions struct { }
ServerConnectionPoliciesClientListByServerOptions contains the optional parameters for the ServerConnectionPoliciesClient.NewListByServerPager method.
type ServerConnectionPoliciesClientListByServerResponse ¶ added in v0.3.0
type ServerConnectionPoliciesClientListByServerResponse struct { // A list of server connection policy objects. ServerConnectionPolicyListResult }
ServerConnectionPoliciesClientListByServerResponse contains the response from method ServerConnectionPoliciesClient.NewListByServerPager.
type ServerConnectionPolicy ¶
type ServerConnectionPolicy struct { // Resource properties. Properties *ServerConnectionPolicyProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Metadata used for the Azure portal experience. Kind *string // READ-ONLY; Resource location. Location *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ServerConnectionPolicy - A server connection policy
func (ServerConnectionPolicy) MarshalJSON ¶
func (s ServerConnectionPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerConnectionPolicy.
func (*ServerConnectionPolicy) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerConnectionPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerConnectionPolicy.
type ServerConnectionPolicyListResult ¶ added in v0.3.0
type ServerConnectionPolicyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ServerConnectionPolicy }
ServerConnectionPolicyListResult - A list of server connection policy objects.
func (ServerConnectionPolicyListResult) MarshalJSON ¶ added in v0.3.0
func (s ServerConnectionPolicyListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerConnectionPolicyListResult.
func (*ServerConnectionPolicyListResult) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerConnectionPolicyListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerConnectionPolicyListResult.
type ServerConnectionPolicyProperties ¶
type ServerConnectionPolicyProperties struct { // REQUIRED; The server connection type. ConnectionType *ServerConnectionType }
ServerConnectionPolicyProperties - The properties of a server connection policy.
func (ServerConnectionPolicyProperties) MarshalJSON ¶ added in v1.1.0
func (s ServerConnectionPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerConnectionPolicyProperties.
func (*ServerConnectionPolicyProperties) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerConnectionPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerConnectionPolicyProperties.
type ServerConnectionType ¶
type ServerConnectionType string
ServerConnectionType - The server connection type.
const ( ServerConnectionTypeDefault ServerConnectionType = "Default" ServerConnectionTypeProxy ServerConnectionType = "Proxy" ServerConnectionTypeRedirect ServerConnectionType = "Redirect" )
func PossibleServerConnectionTypeValues ¶
func PossibleServerConnectionTypeValues() []ServerConnectionType
PossibleServerConnectionTypeValues returns the possible values for the ServerConnectionType const type.
type ServerDNSAlias ¶
type ServerDNSAlias struct { // Resource properties. Properties *ServerDNSAliasProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ServerDNSAlias - A server DNS alias.
func (ServerDNSAlias) MarshalJSON ¶
func (s ServerDNSAlias) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerDNSAlias.
func (*ServerDNSAlias) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerDNSAlias) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerDNSAlias.
type ServerDNSAliasAcquisition ¶
type ServerDNSAliasAcquisition struct { // REQUIRED; The id of the server alias that will be acquired to point to this server instead. OldServerDNSAliasID *string }
ServerDNSAliasAcquisition - A server dns alias acquisition request.
func (ServerDNSAliasAcquisition) MarshalJSON ¶ added in v1.1.0
func (s ServerDNSAliasAcquisition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerDNSAliasAcquisition.
func (*ServerDNSAliasAcquisition) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerDNSAliasAcquisition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerDNSAliasAcquisition.
type ServerDNSAliasListResult ¶
type ServerDNSAliasListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ServerDNSAlias }
ServerDNSAliasListResult - A list of server DNS aliases.
func (ServerDNSAliasListResult) MarshalJSON ¶
func (s ServerDNSAliasListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerDNSAliasListResult.
func (*ServerDNSAliasListResult) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerDNSAliasListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerDNSAliasListResult.
type ServerDNSAliasProperties ¶
type ServerDNSAliasProperties struct { // READ-ONLY; The fully qualified DNS record for alias AzureDNSRecord *string }
ServerDNSAliasProperties - Properties of a server DNS alias.
func (ServerDNSAliasProperties) MarshalJSON ¶ added in v1.1.0
func (s ServerDNSAliasProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerDNSAliasProperties.
func (*ServerDNSAliasProperties) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerDNSAliasProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerDNSAliasProperties.
type ServerDNSAliasesClient ¶
type ServerDNSAliasesClient struct {
// contains filtered or unexported fields
}
ServerDNSAliasesClient contains the methods for the ServerDNSAliases group. Don't use this type directly, use NewServerDNSAliasesClient() instead.
func NewServerDNSAliasesClient ¶
func NewServerDNSAliasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerDNSAliasesClient, error)
NewServerDNSAliasesClient creates a new instance of ServerDNSAliasesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ServerDNSAliasesClient) BeginAcquire ¶
func (client *ServerDNSAliasesClient) BeginAcquire(ctx context.Context, resourceGroupName string, serverName string, dnsAliasName string, parameters ServerDNSAliasAcquisition, options *ServerDNSAliasesClientBeginAcquireOptions) (*runtime.Poller[ServerDNSAliasesClientAcquireResponse], error)
BeginAcquire - Acquires server DNS alias from another server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server that the alias is pointing to.
- dnsAliasName - The name of the server dns alias.
- options - ServerDNSAliasesClientBeginAcquireOptions contains the optional parameters for the ServerDNSAliasesClient.BeginAcquire method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDnsAliasAcquire.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerDNSAliasesClient().BeginAcquire(ctx, "Default", "dns-alias-new-server", "dns-alias-name-1", armsql.ServerDNSAliasAcquisition{ OldServerDNSAliasID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-old-server/dnsAliases/dns-alias-name-1"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerDNSAlias = armsql.ServerDNSAlias{ // Name: to.Ptr("server-dns-alias-name-1"), // Type: to.Ptr("Microsoft.Sql/servers/dnsAliases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-new-server/dnsAliases/dns-alias-name-1"), // Properties: &armsql.ServerDNSAliasProperties{ // AzureDNSRecord: to.Ptr("dns-alias-name-1.database.windows.net"), // }, // } }
Output:
func (*ServerDNSAliasesClient) BeginCreateOrUpdate ¶
func (client *ServerDNSAliasesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, dnsAliasName string, options *ServerDNSAliasesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerDNSAliasesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates a server DNS alias. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server that the alias is pointing to.
- dnsAliasName - The name of the server dns alias.
- options - ServerDNSAliasesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerDNSAliasesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDnsAliasCreateOrUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerDNSAliasesClient().BeginCreateOrUpdate(ctx, "Default", "dns-alias-server", "dns-alias-name-1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerDNSAlias = armsql.ServerDNSAlias{ // Name: to.Ptr("dns-alias-name-1"), // Type: to.Ptr("Microsoft.Sql/servers/dnsAliases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-server/dnsAliases/dns-alias-name-1"), // Properties: &armsql.ServerDNSAliasProperties{ // AzureDNSRecord: to.Ptr("dns-alias-name-1.database.windows.net"), // }, // } }
Output:
func (*ServerDNSAliasesClient) BeginDelete ¶
func (client *ServerDNSAliasesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, dnsAliasName string, options *ServerDNSAliasesClientBeginDeleteOptions) (*runtime.Poller[ServerDNSAliasesClientDeleteResponse], error)
BeginDelete - Deletes the server DNS alias with the given name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server that the alias is pointing to.
- dnsAliasName - The name of the server dns alias.
- options - ServerDNSAliasesClientBeginDeleteOptions contains the optional parameters for the ServerDNSAliasesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDnsAliasDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerDNSAliasesClient().BeginDelete(ctx, "Default", "dns-alias-server", "dns-alias-name-1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ServerDNSAliasesClient) Get ¶
func (client *ServerDNSAliasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, dnsAliasName string, options *ServerDNSAliasesClientGetOptions) (ServerDNSAliasesClientGetResponse, error)
Get - Gets a server DNS alias. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server that the alias is pointing to.
- dnsAliasName - The name of the server dns alias.
- options - ServerDNSAliasesClientGetOptions contains the optional parameters for the ServerDNSAliasesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDnsAliasGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServerDNSAliasesClient().Get(ctx, "Default", "dns-alias-server", "dns-alias-name-1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerDNSAlias = armsql.ServerDNSAlias{ // Name: to.Ptr("dns-alias-name-1"), // Type: to.Ptr("Microsoft.Sql/servers/dnsAliases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-server/dnsAliases/dns-alias-name-1"), // Properties: &armsql.ServerDNSAliasProperties{ // AzureDNSRecord: to.Ptr("dns-alias-name-1.database.windows.net"), // }, // } }
Output:
func (*ServerDNSAliasesClient) NewListByServerPager ¶ added in v0.5.0
func (client *ServerDNSAliasesClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServerDNSAliasesClientListByServerOptions) *runtime.Pager[ServerDNSAliasesClientListByServerResponse]
NewListByServerPager - Gets a list of server DNS aliases for a server.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server that the alias is pointing to.
- options - ServerDNSAliasesClientListByServerOptions contains the optional parameters for the ServerDNSAliasesClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDnsAliasList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServerDNSAliasesClient().NewListByServerPager("Default", "dns-alias-server", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ServerDNSAliasListResult = armsql.ServerDNSAliasListResult{ // Value: []*armsql.ServerDNSAlias{ // { // Name: to.Ptr("server-dns-alias-1"), // Type: to.Ptr("Microsoft.Sql/servers/dnsAliases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-server/dnsAliases/dns-alias-1"), // Properties: &armsql.ServerDNSAliasProperties{ // AzureDNSRecord: to.Ptr("dns-alias-1.database.windows.net"), // }, // }, // { // Name: to.Ptr("server-dns-alias-2"), // Type: to.Ptr("Microsoft.Sql/servers/dnsAliases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-server/dnsAliases/dns-alias-2"), // Properties: &armsql.ServerDNSAliasProperties{ // AzureDNSRecord: to.Ptr("dns-alias-2.database.windows.net"), // }, // }}, // } } }
Output:
type ServerDNSAliasesClientAcquireResponse ¶ added in v0.3.0
type ServerDNSAliasesClientAcquireResponse struct { // A server DNS alias. ServerDNSAlias }
ServerDNSAliasesClientAcquireResponse contains the response from method ServerDNSAliasesClient.BeginAcquire.
type ServerDNSAliasesClientBeginAcquireOptions ¶ added in v0.3.0
type ServerDNSAliasesClientBeginAcquireOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerDNSAliasesClientBeginAcquireOptions contains the optional parameters for the ServerDNSAliasesClient.BeginAcquire method.
type ServerDNSAliasesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ServerDNSAliasesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerDNSAliasesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerDNSAliasesClient.BeginCreateOrUpdate method.
type ServerDNSAliasesClientBeginDeleteOptions ¶ added in v0.3.0
type ServerDNSAliasesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerDNSAliasesClientBeginDeleteOptions contains the optional parameters for the ServerDNSAliasesClient.BeginDelete method.
type ServerDNSAliasesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ServerDNSAliasesClientCreateOrUpdateResponse struct { // A server DNS alias. ServerDNSAlias }
ServerDNSAliasesClientCreateOrUpdateResponse contains the response from method ServerDNSAliasesClient.BeginCreateOrUpdate.
type ServerDNSAliasesClientDeleteResponse ¶ added in v0.3.0
type ServerDNSAliasesClientDeleteResponse struct { }
ServerDNSAliasesClientDeleteResponse contains the response from method ServerDNSAliasesClient.BeginDelete.
type ServerDNSAliasesClientGetOptions ¶ added in v0.3.0
type ServerDNSAliasesClientGetOptions struct { }
ServerDNSAliasesClientGetOptions contains the optional parameters for the ServerDNSAliasesClient.Get method.
type ServerDNSAliasesClientGetResponse ¶ added in v0.3.0
type ServerDNSAliasesClientGetResponse struct { // A server DNS alias. ServerDNSAlias }
ServerDNSAliasesClientGetResponse contains the response from method ServerDNSAliasesClient.Get.
type ServerDNSAliasesClientListByServerOptions ¶ added in v0.3.0
type ServerDNSAliasesClientListByServerOptions struct { }
ServerDNSAliasesClientListByServerOptions contains the optional parameters for the ServerDNSAliasesClient.NewListByServerPager method.
type ServerDNSAliasesClientListByServerResponse ¶ added in v0.3.0
type ServerDNSAliasesClientListByServerResponse struct { // A list of server DNS aliases. ServerDNSAliasListResult }
ServerDNSAliasesClientListByServerResponse contains the response from method ServerDNSAliasesClient.NewListByServerPager.
type ServerDevOpsAuditSettingsClient ¶
type ServerDevOpsAuditSettingsClient struct {
// contains filtered or unexported fields
}
ServerDevOpsAuditSettingsClient contains the methods for the ServerDevOpsAuditSettings group. Don't use this type directly, use NewServerDevOpsAuditSettingsClient() instead.
func NewServerDevOpsAuditSettingsClient ¶
func NewServerDevOpsAuditSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerDevOpsAuditSettingsClient, error)
NewServerDevOpsAuditSettingsClient creates a new instance of ServerDevOpsAuditSettingsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ServerDevOpsAuditSettingsClient) BeginCreateOrUpdate ¶
func (client *ServerDevOpsAuditSettingsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, devOpsAuditingSettingsName string, parameters ServerDevOpsAuditingSettings, options *ServerDevOpsAuditSettingsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerDevOpsAuditSettingsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a server's DevOps audit settings. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- devOpsAuditingSettingsName - The name of the devops audit settings. This should always be 'default'.
- parameters - Properties of DevOps audit settings
- options - ServerDevOpsAuditSettingsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerDevOpsAuditSettingsClient.BeginCreateOrUpdate method.
Example (UpdateAServersDevOpsAuditSettingsWithAllParams) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDevOpsAuditCreateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerDevOpsAuditSettingsClient().BeginCreateOrUpdate(ctx, "devAuditTestRG", "devOpsAuditTestSvr", "default", armsql.ServerDevOpsAuditingSettings{ Properties: &armsql.ServerDevOpsAuditSettingsProperties{ IsAzureMonitorTargetEnabled: to.Ptr(true), State: to.Ptr(armsql.BlobAuditingPolicyStateEnabled), StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), StorageAccountSubscriptionID: to.Ptr("00000000-1234-0000-5678-000000000000"), StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerDevOpsAuditingSettings = armsql.ServerDevOpsAuditingSettings{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/devOpsAuditingSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/devAuditTestRG/providers/Microsoft.Sql/servers/devOpsAuditTestSvr/devOpsAuditingSettings/default"), // Properties: &armsql.ServerDevOpsAuditSettingsProperties{ // IsAzureMonitorTargetEnabled: to.Ptr(true), // State: to.Ptr(armsql.BlobAuditingPolicyStateEnabled), // StorageAccountSubscriptionID: to.Ptr("00000000-1234-0000-5678-000000000000"), // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), // }, // } }
Output:
Example (UpdateAServersDevOpsAuditSettingsWithMinimalInput) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDevOpsAuditCreateMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerDevOpsAuditSettingsClient().BeginCreateOrUpdate(ctx, "devAuditTestRG", "devOpsAuditTestSvr", "default", armsql.ServerDevOpsAuditingSettings{ Properties: &armsql.ServerDevOpsAuditSettingsProperties{ State: to.Ptr(armsql.BlobAuditingPolicyStateEnabled), StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerDevOpsAuditingSettings = armsql.ServerDevOpsAuditingSettings{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/devOpsAuditingSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/devAuditTestRG/providers/Microsoft.Sql/servers/devOpsAuditTestSvr/devOpsAuditingSettings/default"), // Properties: &armsql.ServerDevOpsAuditSettingsProperties{ // State: to.Ptr(armsql.BlobAuditingPolicyStateEnabled), // StorageAccountSubscriptionID: to.Ptr("00000000-1234-0000-5678-000000000000"), // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), // }, // } }
Output:
func (*ServerDevOpsAuditSettingsClient) Get ¶
func (client *ServerDevOpsAuditSettingsClient) Get(ctx context.Context, resourceGroupName string, serverName string, devOpsAuditingSettingsName string, options *ServerDevOpsAuditSettingsClientGetOptions) (ServerDevOpsAuditSettingsClientGetResponse, error)
Get - Gets a server's DevOps audit settings. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- devOpsAuditingSettingsName - The name of the devops audit settings. This should always be 'default'.
- options - ServerDevOpsAuditSettingsClientGetOptions contains the optional parameters for the ServerDevOpsAuditSettingsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDevOpsAuditGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServerDevOpsAuditSettingsClient().Get(ctx, "devAuditTestRG", "devOpsAuditTestSvr", "default", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerDevOpsAuditingSettings = armsql.ServerDevOpsAuditingSettings{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/devOpsAuditingSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/devAuditTestRG/providers/Microsoft.Sql/servers/devOpsAuditTestSvr/devOpsAuditingSettings/default"), // Properties: &armsql.ServerDevOpsAuditSettingsProperties{ // IsAzureMonitorTargetEnabled: to.Ptr(false), // State: to.Ptr(armsql.BlobAuditingPolicyStateDisabled), // StorageAccountSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"), // StorageEndpoint: to.Ptr(""), // }, // } }
Output:
func (*ServerDevOpsAuditSettingsClient) NewListByServerPager ¶ added in v0.5.0
func (client *ServerDevOpsAuditSettingsClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServerDevOpsAuditSettingsClientListByServerOptions) *runtime.Pager[ServerDevOpsAuditSettingsClientListByServerResponse]
NewListByServerPager - Lists DevOps audit settings of a server.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - ServerDevOpsAuditSettingsClientListByServerOptions contains the optional parameters for the ServerDevOpsAuditSettingsClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDevOpsAuditSettingsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServerDevOpsAuditSettingsClient().NewListByServerPager("devAuditTestRG", "devOpsAuditTestSvr", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ServerDevOpsAuditSettingsListResult = armsql.ServerDevOpsAuditSettingsListResult{ // Value: []*armsql.ServerDevOpsAuditingSettings{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/devOpsAuditingSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/devAuditTestRG/providers/Microsoft.Sql/servers/devOpsAuditTestSvr/devOpsAuditingSettings/default"), // Properties: &armsql.ServerDevOpsAuditSettingsProperties{ // IsAzureMonitorTargetEnabled: to.Ptr(false), // State: to.Ptr(armsql.BlobAuditingPolicyStateDisabled), // StorageAccountSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"), // StorageEndpoint: to.Ptr(""), // }, // }}, // } } }
Output:
type ServerDevOpsAuditSettingsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ServerDevOpsAuditSettingsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerDevOpsAuditSettingsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerDevOpsAuditSettingsClient.BeginCreateOrUpdate method.
type ServerDevOpsAuditSettingsClientCreateOrUpdateResponse ¶ added in v0.3.0
type ServerDevOpsAuditSettingsClientCreateOrUpdateResponse struct { // A server DevOps auditing settings. ServerDevOpsAuditingSettings }
ServerDevOpsAuditSettingsClientCreateOrUpdateResponse contains the response from method ServerDevOpsAuditSettingsClient.BeginCreateOrUpdate.
type ServerDevOpsAuditSettingsClientGetOptions ¶ added in v0.3.0
type ServerDevOpsAuditSettingsClientGetOptions struct { }
ServerDevOpsAuditSettingsClientGetOptions contains the optional parameters for the ServerDevOpsAuditSettingsClient.Get method.
type ServerDevOpsAuditSettingsClientGetResponse ¶ added in v0.3.0
type ServerDevOpsAuditSettingsClientGetResponse struct { // A server DevOps auditing settings. ServerDevOpsAuditingSettings }
ServerDevOpsAuditSettingsClientGetResponse contains the response from method ServerDevOpsAuditSettingsClient.Get.
type ServerDevOpsAuditSettingsClientListByServerOptions ¶ added in v0.3.0
type ServerDevOpsAuditSettingsClientListByServerOptions struct { }
ServerDevOpsAuditSettingsClientListByServerOptions contains the optional parameters for the ServerDevOpsAuditSettingsClient.NewListByServerPager method.
type ServerDevOpsAuditSettingsClientListByServerResponse ¶ added in v0.3.0
type ServerDevOpsAuditSettingsClientListByServerResponse struct { // A list of server DevOps audit settings. ServerDevOpsAuditSettingsListResult }
ServerDevOpsAuditSettingsClientListByServerResponse contains the response from method ServerDevOpsAuditSettingsClient.NewListByServerPager.
type ServerDevOpsAuditSettingsListResult ¶
type ServerDevOpsAuditSettingsListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ServerDevOpsAuditingSettings }
ServerDevOpsAuditSettingsListResult - A list of server DevOps audit settings.
func (ServerDevOpsAuditSettingsListResult) MarshalJSON ¶
func (s ServerDevOpsAuditSettingsListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerDevOpsAuditSettingsListResult.
func (*ServerDevOpsAuditSettingsListResult) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerDevOpsAuditSettingsListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerDevOpsAuditSettingsListResult.
type ServerDevOpsAuditSettingsProperties ¶
type ServerDevOpsAuditSettingsProperties struct { // REQUIRED; Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. State *BlobAuditingPolicyState // Specifies whether DevOps audit events are sent to Azure Monitor. In order to send the events to Azure Monitor, specify // 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true. // When using REST API to configure DevOps audit, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs category // on the master database should be also created. // Diagnostic Settings URI format: PUT // https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview // For more information, see Diagnostic Settings REST API [https://go.microsoft.com/fwlink/?linkid=2033207]or Diagnostic Settings // PowerShell [https://go.microsoft.com/fwlink/?linkid=2033043] IsAzureMonitorTargetEnabled *bool // Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, not // specifying the storageAccountAccessKey will use SQL server system-assigned // managed identity to access the storage. Prerequisites for using managed identity authentication: // 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). // 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server // identity. For more information, see Auditing to storage using Managed // Identity authentication [https://go.microsoft.com/fwlink/?linkid=2114355] StorageAccountAccessKey *string // Specifies the blob storage subscription Id. StorageAccountSubscriptionID *string // Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint // or isAzureMonitorTargetEnabled is required. StorageEndpoint *string }
ServerDevOpsAuditSettingsProperties - Properties of a server DevOps audit settings.
func (ServerDevOpsAuditSettingsProperties) MarshalJSON ¶ added in v1.1.0
func (s ServerDevOpsAuditSettingsProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerDevOpsAuditSettingsProperties.
func (*ServerDevOpsAuditSettingsProperties) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerDevOpsAuditSettingsProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerDevOpsAuditSettingsProperties.
type ServerDevOpsAuditingSettings ¶
type ServerDevOpsAuditingSettings struct { // Resource properties. Properties *ServerDevOpsAuditSettingsProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; SystemData of ServerDevOpsAuditSettingsResource. SystemData *SystemData // READ-ONLY; Resource type. Type *string }
ServerDevOpsAuditingSettings - A server DevOps auditing settings.
func (ServerDevOpsAuditingSettings) MarshalJSON ¶
func (s ServerDevOpsAuditingSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerDevOpsAuditingSettings.
func (*ServerDevOpsAuditingSettings) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerDevOpsAuditingSettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerDevOpsAuditingSettings.
type ServerExternalAdministrator ¶
type ServerExternalAdministrator struct { // Type of the sever administrator. AdministratorType *AdministratorType // Azure Active Directory only Authentication enabled. AzureADOnlyAuthentication *bool // Login name of the server administrator. Login *string // Principal Type of the sever administrator. PrincipalType *PrincipalType // SID (object ID) of the server administrator. Sid *string // Tenant ID of the administrator. TenantID *string }
ServerExternalAdministrator - Properties of a active directory administrator.
func (ServerExternalAdministrator) MarshalJSON ¶ added in v1.1.0
func (s ServerExternalAdministrator) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerExternalAdministrator.
func (*ServerExternalAdministrator) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerExternalAdministrator) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerExternalAdministrator.
type ServerFirewallRuleProperties ¶
type ServerFirewallRuleProperties struct { // The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to startIpAddress. Use value // '0.0.0.0' for all Azure-internal IP addresses. EndIPAddress *string // The start IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' for all Azure-internal IP addresses. StartIPAddress *string }
ServerFirewallRuleProperties - The properties of a server firewall rule.
func (ServerFirewallRuleProperties) MarshalJSON ¶ added in v1.1.0
func (s ServerFirewallRuleProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerFirewallRuleProperties.
func (*ServerFirewallRuleProperties) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerFirewallRuleProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerFirewallRuleProperties.
type ServerInfo ¶
type ServerInfo struct { // REQUIRED; Server Id. ServerID *string }
ServerInfo - Server info for the server trust group.
func (ServerInfo) MarshalJSON ¶ added in v1.1.0
func (s ServerInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerInfo.
func (*ServerInfo) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerInfo.
type ServerKey ¶
type ServerKey struct { // Resource properties. Properties *ServerKeyProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Kind of encryption protector. This is metadata used for the Azure portal experience. Kind *string // READ-ONLY; Resource location. Location *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ServerKey - A server key.
func (ServerKey) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type ServerKey.
func (*ServerKey) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type ServerKey.
type ServerKeyListResult ¶
type ServerKeyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ServerKey }
ServerKeyListResult - A list of server keys.
func (ServerKeyListResult) MarshalJSON ¶
func (s ServerKeyListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerKeyListResult.
func (*ServerKeyListResult) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerKeyListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerKeyListResult.
type ServerKeyProperties ¶
type ServerKeyProperties struct { // REQUIRED; The server key type like 'ServiceManaged', 'AzureKeyVault'. ServerKeyType *ServerKeyType // The URI of the server key. If the ServerKeyType is AzureKeyVault, then the URI is required. URI *string // READ-ONLY; Key auto rotation opt-in flag. Either true or false. AutoRotationEnabled *bool // READ-ONLY; The server key creation date. CreationDate *time.Time // READ-ONLY; Subregion of the server key. Subregion *string // READ-ONLY; Thumbprint of the server key. Thumbprint *string }
ServerKeyProperties - Properties for a server key execution.
func (ServerKeyProperties) MarshalJSON ¶
func (s ServerKeyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerKeyProperties.
func (*ServerKeyProperties) UnmarshalJSON ¶
func (s *ServerKeyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerKeyProperties.
type ServerKeyType ¶
type ServerKeyType string
ServerKeyType - The encryption protector type like 'ServiceManaged', 'AzureKeyVault'.
const ( ServerKeyTypeAzureKeyVault ServerKeyType = "AzureKeyVault" ServerKeyTypeServiceManaged ServerKeyType = "ServiceManaged" )
func PossibleServerKeyTypeValues ¶
func PossibleServerKeyTypeValues() []ServerKeyType
PossibleServerKeyTypeValues returns the possible values for the ServerKeyType const type.
type ServerKeysClient ¶
type ServerKeysClient struct {
// contains filtered or unexported fields
}
ServerKeysClient contains the methods for the ServerKeys group. Don't use this type directly, use NewServerKeysClient() instead.
func NewServerKeysClient ¶
func NewServerKeysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerKeysClient, error)
NewServerKeysClient creates a new instance of ServerKeysClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ServerKeysClient) BeginCreateOrUpdate ¶
func (client *ServerKeysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, keyName string, parameters ServerKey, options *ServerKeysClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerKeysClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a server key. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- keyName - The name of the server key to be operated on (updated or created). The key name is required to be in the format of 'vaultkeyversion'. For example, if the keyId is https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion, then the server key name should be formatted as: YourVaultNameYourKeyNameYourKeyVersion
- parameters - The requested server key resource state.
- options - ServerKeysClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerKeysClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerKeyCreateOrUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerKeysClient().BeginCreateOrUpdate(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", "someVault_someKey_01234567890123456789012345678901", armsql.ServerKey{ Properties: &armsql.ServerKeyProperties{ ServerKeyType: to.Ptr(armsql.ServerKeyTypeAzureKeyVault), URI: to.Ptr("https://someVault.vault.azure.net/keys/someKey/01234567890123456789012345678901"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerKey = armsql.ServerKey{ // Name: to.Ptr("sqlcrudtest-4645"), // Type: to.Ptr("Microsoft.Sql/servers/keys"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/keys/someVault_someKey_01234567890123456789012345678901"), // Kind: to.Ptr("azurekeyvault"), // Location: to.Ptr("Japan East"), // Properties: &armsql.ServerKeyProperties{ // AutoRotationEnabled: to.Ptr(false), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-15T00:00:00.000Z"); return t}()), // Thumbprint: to.Ptr("00112233445566778899AABBCCDDEEFFAABBCCDD"), // }, // } }
Output:
func (*ServerKeysClient) BeginDelete ¶
func (client *ServerKeysClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, keyName string, options *ServerKeysClientBeginDeleteOptions) (*runtime.Poller[ServerKeysClientDeleteResponse], error)
BeginDelete - Deletes the server key with the given name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- keyName - The name of the server key to be deleted.
- options - ServerKeysClientBeginDeleteOptions contains the optional parameters for the ServerKeysClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerKeyDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerKeysClient().BeginDelete(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", "someVault_someKey_01234567890123456789012345678901", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ServerKeysClient) Get ¶
func (client *ServerKeysClient) Get(ctx context.Context, resourceGroupName string, serverName string, keyName string, options *ServerKeysClientGetOptions) (ServerKeysClientGetResponse, error)
Get - Gets a server key. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- keyName - The name of the server key to be retrieved.
- options - ServerKeysClientGetOptions contains the optional parameters for the ServerKeysClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerKeyGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServerKeysClient().Get(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", "someVault_someKey_01234567890123456789012345678901", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerKey = armsql.ServerKey{ // Name: to.Ptr("sqlcrudtest-4645"), // Type: to.Ptr("Microsoft.Sql/servers/keys"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/keys/someVault_someKey_01234567890123456789012345678901"), // Kind: to.Ptr("azurekeyvault"), // Location: to.Ptr("Japan East"), // Properties: &armsql.ServerKeyProperties{ // AutoRotationEnabled: to.Ptr(false), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-15T00:00:00.000Z"); return t}()), // Thumbprint: to.Ptr("00112233445566778899AABBCCDDEEFFAABBCCDD"), // }, // } }
Output:
func (*ServerKeysClient) NewListByServerPager ¶ added in v0.5.0
func (client *ServerKeysClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServerKeysClientListByServerOptions) *runtime.Pager[ServerKeysClientListByServerResponse]
NewListByServerPager - Gets a list of server keys.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - ServerKeysClientListByServerOptions contains the optional parameters for the ServerKeysClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerKeyList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServerKeysClient().NewListByServerPager("sqlcrudtest-7398", "sqlcrudtest-4645", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ServerKeyListResult = armsql.ServerKeyListResult{ // Value: []*armsql.ServerKey{ // { // Name: to.Ptr("someVault_someKey_01234567890123456789012345678901"), // Type: to.Ptr("Microsoft.Sql/servers/keys"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/keys/someVault_someKey_01234567890123456789012345678901"), // Kind: to.Ptr("azurekeyvault"), // Location: to.Ptr("Japan East"), // Properties: &armsql.ServerKeyProperties{ // AutoRotationEnabled: to.Ptr(false), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-15T00:00:00.000Z"); return t}()), // Thumbprint: to.Ptr("00112233445566778899AABBCCDDEEFFAABBCCDD"), // }, // }, // { // Name: to.Ptr("myVault_myKey_11111111111111111111111111111111"), // Type: to.Ptr("Microsoft.Sql/servers/keys"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/keys/myVault_myKey_11111111111111111111111111111111"), // Kind: to.Ptr("azurekeyvault"), // Location: to.Ptr("Japan East"), // Properties: &armsql.ServerKeyProperties{ // AutoRotationEnabled: to.Ptr(false), // CreationDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-15T00:00:00.000Z"); return t}()), // Thumbprint: to.Ptr("AAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBB"), // }, // }, // { // Name: to.Ptr("ServiceManaged"), // Type: to.Ptr("Microsoft.Sql/servers/keys"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/keys/ServiceManaged"), // Kind: to.Ptr("servicemanaged"), // Location: to.Ptr("Japan East"), // Properties: &armsql.ServerKeyProperties{ // }, // }}, // } } }
Output:
type ServerKeysClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ServerKeysClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerKeysClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerKeysClient.BeginCreateOrUpdate method.
type ServerKeysClientBeginDeleteOptions ¶ added in v0.3.0
type ServerKeysClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerKeysClientBeginDeleteOptions contains the optional parameters for the ServerKeysClient.BeginDelete method.
type ServerKeysClientCreateOrUpdateResponse ¶ added in v0.3.0
type ServerKeysClientCreateOrUpdateResponse struct { // A server key. ServerKey }
ServerKeysClientCreateOrUpdateResponse contains the response from method ServerKeysClient.BeginCreateOrUpdate.
type ServerKeysClientDeleteResponse ¶ added in v0.3.0
type ServerKeysClientDeleteResponse struct { }
ServerKeysClientDeleteResponse contains the response from method ServerKeysClient.BeginDelete.
type ServerKeysClientGetOptions ¶ added in v0.3.0
type ServerKeysClientGetOptions struct { }
ServerKeysClientGetOptions contains the optional parameters for the ServerKeysClient.Get method.
type ServerKeysClientGetResponse ¶ added in v0.3.0
type ServerKeysClientGetResponse struct { // A server key. ServerKey }
ServerKeysClientGetResponse contains the response from method ServerKeysClient.Get.
type ServerKeysClientListByServerOptions ¶ added in v0.3.0
type ServerKeysClientListByServerOptions struct { }
ServerKeysClientListByServerOptions contains the optional parameters for the ServerKeysClient.NewListByServerPager method.
type ServerKeysClientListByServerResponse ¶ added in v0.3.0
type ServerKeysClientListByServerResponse struct { // A list of server keys. ServerKeyListResult }
ServerKeysClientListByServerResponse contains the response from method ServerKeysClient.NewListByServerPager.
type ServerListResult ¶
type ServerListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*Server }
ServerListResult - A list of servers.
func (ServerListResult) MarshalJSON ¶
func (s ServerListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerListResult.
func (*ServerListResult) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerListResult.
type ServerNetworkAccessFlag ¶
type ServerNetworkAccessFlag string
ServerNetworkAccessFlag - Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'
const ( ServerNetworkAccessFlagDisabled ServerNetworkAccessFlag = "Disabled" ServerNetworkAccessFlagEnabled ServerNetworkAccessFlag = "Enabled" )
func PossibleServerNetworkAccessFlagValues ¶
func PossibleServerNetworkAccessFlagValues() []ServerNetworkAccessFlag
PossibleServerNetworkAccessFlagValues returns the possible values for the ServerNetworkAccessFlag const type.
type ServerOperation ¶
type ServerOperation struct { // Resource properties. Properties *ServerOperationProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ServerOperation - A server operation.
func (ServerOperation) MarshalJSON ¶
func (s ServerOperation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerOperation.
func (*ServerOperation) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerOperation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerOperation.
type ServerOperationListResult ¶
type ServerOperationListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ServerOperation }
ServerOperationListResult - The response to a list server operations request
func (ServerOperationListResult) MarshalJSON ¶
func (s ServerOperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerOperationListResult.
func (*ServerOperationListResult) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerOperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerOperationListResult.
type ServerOperationProperties ¶
type ServerOperationProperties struct { // READ-ONLY; The operation description. Description *string // READ-ONLY; The operation error code. ErrorCode *int32 // READ-ONLY; The operation error description. ErrorDescription *string // READ-ONLY; The operation error severity. ErrorSeverity *int32 // READ-ONLY; The estimated completion time of the operation. EstimatedCompletionTime *time.Time // READ-ONLY; Whether the operation can be cancelled. IsCancellable *bool // READ-ONLY; Whether or not the error is a user error. IsUserError *bool // READ-ONLY; The name of operation. Operation *string // READ-ONLY; The friendly name of operation. OperationFriendlyName *string // READ-ONLY; The percentage of the operation completed. PercentComplete *int32 // READ-ONLY; The name of the server. ServerName *string // READ-ONLY; The operation start time. StartTime *time.Time // READ-ONLY; The operation state. State *ManagementOperationState }
ServerOperationProperties - The properties of a server operation.
func (ServerOperationProperties) MarshalJSON ¶
func (s ServerOperationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerOperationProperties.
func (*ServerOperationProperties) UnmarshalJSON ¶
func (s *ServerOperationProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerOperationProperties.
type ServerOperationsClient ¶
type ServerOperationsClient struct {
// contains filtered or unexported fields
}
ServerOperationsClient contains the methods for the ServerOperations group. Don't use this type directly, use NewServerOperationsClient() instead.
func NewServerOperationsClient ¶
func NewServerOperationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerOperationsClient, error)
NewServerOperationsClient creates a new instance of ServerOperationsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ServerOperationsClient) NewListByServerPager ¶ added in v0.5.0
func (client *ServerOperationsClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServerOperationsClientListByServerOptions) *runtime.Pager[ServerOperationsClientListByServerResponse]
NewListByServerPager - Gets a list of operations performed on the server.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - ServerOperationsClientListByServerOptions contains the optional parameters for the ServerOperationsClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListServerOperations.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServerOperationsClient().NewListByServerPager("sqlcrudtest-7398", "sqlcrudtest-4645", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ServerOperationListResult = armsql.ServerOperationListResult{ // Value: []*armsql.ServerOperation{ // { // Name: to.Ptr("11111111-1111-1111-1111-111111111111"), // Type: to.Ptr("Microsoft.Sql/servers/operations"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/operations/11111111-1111-1111-1111-111111111111"), // Properties: &armsql.ServerOperationProperties{ // Operation: to.Ptr("MakeAllLogicalDatabasesAccessible"), // OperationFriendlyName: to.Ptr("MAKE ALL DBS ACCESSIBLE"), // PercentComplete: to.Ptr[int32](0), // ServerName: to.Ptr("sqlcrudtest-4645"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T09:10:08.100Z"); return t}()), // State: to.Ptr(armsql.ManagementOperationStateInProgress), // }, // }, // { // Name: to.Ptr("22222222-2222-2222-2222-222222222222"), // Type: to.Ptr("Microsoft.Sql/servers/operations"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/operations/22222222-2222-2222-2222-222222222222"), // Properties: &armsql.ServerOperationProperties{ // Operation: to.Ptr("MakeAllLogicalDatabasesAccessible"), // OperationFriendlyName: to.Ptr("MAKE ALL DBS ACCESSIBLE"), // PercentComplete: to.Ptr[int32](100), // ServerName: to.Ptr("sqlcrudtest-4645"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-06-01T09:00:08.100Z"); return t}()), // State: to.Ptr(armsql.ManagementOperationStateSucceeded), // }, // }}, // } } }
Output:
type ServerOperationsClientListByServerOptions ¶ added in v0.3.0
type ServerOperationsClientListByServerOptions struct { }
ServerOperationsClientListByServerOptions contains the optional parameters for the ServerOperationsClient.NewListByServerPager method.
type ServerOperationsClientListByServerResponse ¶ added in v0.3.0
type ServerOperationsClientListByServerResponse struct { // The response to a list server operations request ServerOperationListResult }
ServerOperationsClientListByServerResponse contains the response from method ServerOperationsClient.NewListByServerPager.
type ServerPrivateEndpointConnection ¶
type ServerPrivateEndpointConnection struct { // READ-ONLY; Resource ID. ID *string // READ-ONLY; Private endpoint connection properties Properties *PrivateEndpointConnectionProperties }
ServerPrivateEndpointConnection - A private endpoint connection under a server
func (ServerPrivateEndpointConnection) MarshalJSON ¶ added in v1.1.0
func (s ServerPrivateEndpointConnection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerPrivateEndpointConnection.
func (*ServerPrivateEndpointConnection) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerPrivateEndpointConnection) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerPrivateEndpointConnection.
type ServerProperties ¶
type ServerProperties struct { // Administrator username for the server. Once created it cannot be changed. AdministratorLogin *string // The administrator login password (required for server creation). AdministratorLoginPassword *string // The Azure Active Directory identity of the server. Administrators *ServerExternalAdministrator // The Client id used for cross tenant CMK scenario FederatedClientID *string // A CMK URI of the key to use for encryption. KeyID *string // Minimal TLS version. Allowed values: '1.0', '1.1', '1.2' MinimalTLSVersion *string // The resource id of a user assigned identity to be used by default. PrimaryUserAssignedIdentityID *string // Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' // or 'Disabled' PublicNetworkAccess *ServerNetworkAccessFlag // Whether or not to restrict outbound network access for this server. Value is optional but if passed in, must be 'Enabled' // or 'Disabled' RestrictOutboundNetworkAccess *ServerNetworkAccessFlag // The version of the server. Version *string // READ-ONLY; The fully qualified domain name of the server. FullyQualifiedDomainName *string // READ-ONLY; List of private endpoint connections on a server PrivateEndpointConnections []*ServerPrivateEndpointConnection // READ-ONLY; The state of the server. State *string // READ-ONLY; Whether or not existing server has a workspace created and if it allows connection from workspace WorkspaceFeature *ServerWorkspaceFeature }
ServerProperties - The properties of a server.
func (ServerProperties) MarshalJSON ¶
func (s ServerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerProperties.
func (*ServerProperties) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerProperties.
type ServerSecurityAlertPoliciesClient ¶
type ServerSecurityAlertPoliciesClient struct {
// contains filtered or unexported fields
}
ServerSecurityAlertPoliciesClient contains the methods for the ServerSecurityAlertPolicies group. Don't use this type directly, use NewServerSecurityAlertPoliciesClient() instead.
func NewServerSecurityAlertPoliciesClient ¶
func NewServerSecurityAlertPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerSecurityAlertPoliciesClient, error)
NewServerSecurityAlertPoliciesClient creates a new instance of ServerSecurityAlertPoliciesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ServerSecurityAlertPoliciesClient) BeginCreateOrUpdate ¶
func (client *ServerSecurityAlertPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, securityAlertPolicyName SecurityAlertPolicyName, parameters ServerSecurityAlertPolicy, options *ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerSecurityAlertPoliciesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a threat detection policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- securityAlertPolicyName - The name of the threat detection policy.
- parameters - The server security alert policy.
- options - ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.BeginCreateOrUpdate method.
Example (UpdateAServersThreatDetectionPolicyWithAllParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerSecurityAlertsCreateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerSecurityAlertPoliciesClient().BeginCreateOrUpdate(ctx, "securityalert-4799", "securityalert-6440", armsql.SecurityAlertPolicyNameDefault, armsql.ServerSecurityAlertPolicy{ Properties: &armsql.SecurityAlertsPolicyProperties{ DisabledAlerts: []*string{ to.Ptr("Access_Anomaly"), to.Ptr("Usage_Anomaly")}, EmailAccountAdmins: to.Ptr(true), EmailAddresses: []*string{ to.Ptr("testSecurityAlert@microsoft.com")}, RetentionDays: to.Ptr[int32](5), State: to.Ptr(armsql.SecurityAlertsPolicyStateEnabled), StorageAccountAccessKey: to.Ptr("sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD=="), StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerSecurityAlertPolicy = armsql.ServerSecurityAlertPolicy{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/securityAlertPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/servers/securityalert-6440/securityAlertPolicies/default"), // Properties: &armsql.SecurityAlertsPolicyProperties{ // DisabledAlerts: []*string{ // to.Ptr("Access_Anomaly"), // to.Ptr("Usage_Anomaly")}, // EmailAccountAdmins: to.Ptr(true), // EmailAddresses: []*string{ // to.Ptr("testSecurityAlert@microsoft.com")}, // RetentionDays: to.Ptr[int32](5), // State: to.Ptr(armsql.SecurityAlertsPolicyStateEnabled), // StorageAccountAccessKey: to.Ptr(""), // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), // }, // SystemData: &armsql.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armsql.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armsql.CreatedByTypeUser), // }, // } }
Output:
Example (UpdateAServersThreatDetectionPolicyWithMinimalParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerSecurityAlertsCreateMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerSecurityAlertPoliciesClient().BeginCreateOrUpdate(ctx, "securityalert-4799", "securityalert-6440", armsql.SecurityAlertPolicyNameDefault, armsql.ServerSecurityAlertPolicy{ Properties: &armsql.SecurityAlertsPolicyProperties{ State: to.Ptr(armsql.SecurityAlertsPolicyStateEnabled), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerSecurityAlertPolicy = armsql.ServerSecurityAlertPolicy{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/securityAlertPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/servers/securityalert-6440/securityAlertPolicies/default"), // Properties: &armsql.SecurityAlertsPolicyProperties{ // DisabledAlerts: []*string{ // to.Ptr("")}, // EmailAccountAdmins: to.Ptr(false), // EmailAddresses: []*string{ // to.Ptr("")}, // RetentionDays: to.Ptr[int32](0), // State: to.Ptr(armsql.SecurityAlertsPolicyStateEnabled), // StorageAccountAccessKey: to.Ptr(""), // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), // }, // SystemData: &armsql.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armsql.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armsql.CreatedByTypeUser), // }, // } }
Output:
func (*ServerSecurityAlertPoliciesClient) Get ¶
func (client *ServerSecurityAlertPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, securityAlertPolicyName SecurityAlertPolicyName, options *ServerSecurityAlertPoliciesClientGetOptions) (ServerSecurityAlertPoliciesClientGetResponse, error)
Get - Get a server's security alert policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- securityAlertPolicyName - The name of the security alert policy.
- options - ServerSecurityAlertPoliciesClientGetOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerSecurityAlertsGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServerSecurityAlertPoliciesClient().Get(ctx, "securityalert-4799", "securityalert-6440", armsql.SecurityAlertPolicyNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerSecurityAlertPolicy = armsql.ServerSecurityAlertPolicy{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/securityAlertPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/servers/securityalert-6440/securityAlertPolicies/default"), // Properties: &armsql.SecurityAlertsPolicyProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // DisabledAlerts: []*string{ // to.Ptr("Access_Anomaly")}, // EmailAccountAdmins: to.Ptr(true), // EmailAddresses: []*string{ // to.Ptr("test@consoto.com;user@consoto.com")}, // RetentionDays: to.Ptr[int32](0), // State: to.Ptr(armsql.SecurityAlertsPolicyStateEnabled), // StorageAccountAccessKey: to.Ptr(""), // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), // }, // SystemData: &armsql.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armsql.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armsql.CreatedByTypeUser), // }, // } }
Output:
func (*ServerSecurityAlertPoliciesClient) NewListByServerPager ¶ added in v0.5.0
func (client *ServerSecurityAlertPoliciesClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServerSecurityAlertPoliciesClientListByServerOptions) *runtime.Pager[ServerSecurityAlertPoliciesClientListByServerResponse]
NewListByServerPager - Get the server's threat detection policies.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - ServerSecurityAlertPoliciesClientListByServerOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerSecurityAlertsListByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServerSecurityAlertPoliciesClient().NewListByServerPager("securityalert-4799", "securityalert-6440", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.LogicalServerSecurityAlertPolicyListResult = armsql.LogicalServerSecurityAlertPolicyListResult{ // Value: []*armsql.ServerSecurityAlertPolicy{ // { // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/securityAlertPolicies"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/servers/securityalert-6440/securityAlertPolicies"), // Properties: &armsql.SecurityAlertsPolicyProperties{ // CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // DisabledAlerts: []*string{ // to.Ptr("Access_Anomaly")}, // EmailAccountAdmins: to.Ptr(true), // EmailAddresses: []*string{ // to.Ptr("test@consoto.com;user@consoto.com")}, // RetentionDays: to.Ptr[int32](0), // State: to.Ptr(armsql.SecurityAlertsPolicyStateEnabled), // StorageAccountAccessKey: to.Ptr(""), // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), // }, // SystemData: &armsql.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // CreatedBy: to.Ptr("string"), // CreatedByType: to.Ptr(armsql.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-03T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armsql.CreatedByTypeUser), // }, // }}, // } } }
Output:
type ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.BeginCreateOrUpdate method.
type ServerSecurityAlertPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ServerSecurityAlertPoliciesClientCreateOrUpdateResponse struct { // A server security alert policy. ServerSecurityAlertPolicy }
ServerSecurityAlertPoliciesClientCreateOrUpdateResponse contains the response from method ServerSecurityAlertPoliciesClient.BeginCreateOrUpdate.
type ServerSecurityAlertPoliciesClientGetOptions ¶ added in v0.3.0
type ServerSecurityAlertPoliciesClientGetOptions struct { }
ServerSecurityAlertPoliciesClientGetOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.Get method.
type ServerSecurityAlertPoliciesClientGetResponse ¶ added in v0.3.0
type ServerSecurityAlertPoliciesClientGetResponse struct { // A server security alert policy. ServerSecurityAlertPolicy }
ServerSecurityAlertPoliciesClientGetResponse contains the response from method ServerSecurityAlertPoliciesClient.Get.
type ServerSecurityAlertPoliciesClientListByServerOptions ¶ added in v0.3.0
type ServerSecurityAlertPoliciesClientListByServerOptions struct { }
ServerSecurityAlertPoliciesClientListByServerOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.NewListByServerPager method.
type ServerSecurityAlertPoliciesClientListByServerResponse ¶ added in v0.3.0
type ServerSecurityAlertPoliciesClientListByServerResponse struct { // A list of the server's security alert policies. LogicalServerSecurityAlertPolicyListResult }
ServerSecurityAlertPoliciesClientListByServerResponse contains the response from method ServerSecurityAlertPoliciesClient.NewListByServerPager.
type ServerSecurityAlertPolicy ¶
type ServerSecurityAlertPolicy struct { // Resource properties. Properties *SecurityAlertsPolicyProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; SystemData of SecurityAlertPolicyResource. SystemData *SystemData // READ-ONLY; Resource type. Type *string }
ServerSecurityAlertPolicy - A server security alert policy.
func (ServerSecurityAlertPolicy) MarshalJSON ¶
func (s ServerSecurityAlertPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerSecurityAlertPolicy.
func (*ServerSecurityAlertPolicy) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerSecurityAlertPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerSecurityAlertPolicy.
type ServerTrustCertificate ¶ added in v0.4.0
type ServerTrustCertificate struct { // Resource properties. Properties *ServerTrustCertificateProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ServerTrustCertificate - Server trust certificate imported from box to enable connection between box and Sql Managed Instance.
func (ServerTrustCertificate) MarshalJSON ¶ added in v1.1.0
func (s ServerTrustCertificate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerTrustCertificate.
func (*ServerTrustCertificate) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerTrustCertificate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerTrustCertificate.
type ServerTrustCertificateProperties ¶ added in v0.4.0
type ServerTrustCertificateProperties struct { // The certificate public blob PublicBlob *string // READ-ONLY; The certificate name CertificateName *string // READ-ONLY; The certificate thumbprint Thumbprint *string }
ServerTrustCertificateProperties - The properties of a server trust certificate.
func (ServerTrustCertificateProperties) MarshalJSON ¶ added in v1.1.0
func (s ServerTrustCertificateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerTrustCertificateProperties.
func (*ServerTrustCertificateProperties) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerTrustCertificateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerTrustCertificateProperties.
type ServerTrustCertificatesClient ¶ added in v0.4.0
type ServerTrustCertificatesClient struct {
// contains filtered or unexported fields
}
ServerTrustCertificatesClient contains the methods for the ServerTrustCertificates group. Don't use this type directly, use NewServerTrustCertificatesClient() instead.
func NewServerTrustCertificatesClient ¶ added in v0.4.0
func NewServerTrustCertificatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerTrustCertificatesClient, error)
NewServerTrustCertificatesClient creates a new instance of ServerTrustCertificatesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ServerTrustCertificatesClient) BeginCreateOrUpdate ¶ added in v0.4.0
func (client *ServerTrustCertificatesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, certificateName string, parameters ServerTrustCertificate, options *ServerTrustCertificatesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerTrustCertificatesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Uploads a server trust certificate from box to Sql Managed Instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- certificateName - Name of of the certificate to upload.
- parameters - The server trust certificate info.
- options - ServerTrustCertificatesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerTrustCertificatesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerTrustCertificatesCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerTrustCertificatesClient().BeginCreateOrUpdate(ctx, "testrg", "testcl", "customerCertificateName", armsql.ServerTrustCertificate{ Properties: &armsql.ServerTrustCertificateProperties{ PublicBlob: to.Ptr("308203AE30820296A0030201020210"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerTrustCertificate = armsql.ServerTrustCertificate{ // Name: to.Ptr("customerCertificateName"), // Type: to.Ptr("Microsoft.Sql/managedInstances/serverTrustCertificates"), // ID: to.Ptr("/subscriptions/0574222d-5c7f-489c-a172-b3013eafab53/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/serverTrustCertificates/customerCertificateName"), // Properties: &armsql.ServerTrustCertificateProperties{ // CertificateName: to.Ptr("customerCertificateName"), // Thumbprint: to.Ptr("33702D20EC86119985283"), // }, // } }
Output:
func (*ServerTrustCertificatesClient) BeginDelete ¶ added in v0.4.0
func (client *ServerTrustCertificatesClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, certificateName string, options *ServerTrustCertificatesClientBeginDeleteOptions) (*runtime.Poller[ServerTrustCertificatesClientDeleteResponse], error)
BeginDelete - Deletes a server trust certificate that was uploaded from box to Sql Managed Instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- certificateName - Name of of the certificate to delete.
- options - ServerTrustCertificatesClientBeginDeleteOptions contains the optional parameters for the ServerTrustCertificatesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerTrustCertificatesDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerTrustCertificatesClient().BeginDelete(ctx, "testrg", "testcl", "customerCertificateName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ServerTrustCertificatesClient) Get ¶ added in v0.4.0
func (client *ServerTrustCertificatesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, certificateName string, options *ServerTrustCertificatesClientGetOptions) (ServerTrustCertificatesClientGetResponse, error)
Get - Gets a server trust certificate that was uploaded from box to Sql Managed Instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- certificateName - Name of of the certificate to get.
- options - ServerTrustCertificatesClientGetOptions contains the optional parameters for the ServerTrustCertificatesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerTrustCertificatesGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServerTrustCertificatesClient().Get(ctx, "testrg", "testcl", "customerCertificateName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerTrustCertificate = armsql.ServerTrustCertificate{ // Name: to.Ptr("customerCertificateName"), // Type: to.Ptr("Microsoft.Sql/managedInstances/serverTrustCertificates"), // ID: to.Ptr("/subscriptions/38e0dc56-907f-45ba-a97c-74233baad471/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/serverTrustCertificates/customerCertificateName"), // Properties: &armsql.ServerTrustCertificateProperties{ // CertificateName: to.Ptr("customerCertificateName"), // Thumbprint: to.Ptr("57CFA9CF16F2FB2775AF059A95C6D5B897DA2C05"), // }, // } }
Output:
func (*ServerTrustCertificatesClient) NewListByInstancePager ¶ added in v0.5.0
func (client *ServerTrustCertificatesClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, options *ServerTrustCertificatesClientListByInstanceOptions) *runtime.Pager[ServerTrustCertificatesClientListByInstanceResponse]
NewListByInstancePager - Gets a list of server trust certificates that were uploaded from box to the given Sql Managed Instance.
Generated from API version 2021-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - ServerTrustCertificatesClientListByInstanceOptions contains the optional parameters for the ServerTrustCertificatesClient.NewListByInstancePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerTrustCertificatesListByInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServerTrustCertificatesClient().NewListByInstancePager("testrg", "testcl", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ServerTrustCertificatesListResult = armsql.ServerTrustCertificatesListResult{ // Value: []*armsql.ServerTrustCertificate{ // { // Name: to.Ptr("customerCertificate1"), // Type: to.Ptr("Microsoft.Sql/managedInstances/serverTrustCertificates"), // ID: to.Ptr("/subscriptions/38e0dc56-907f-45ba-a97c-74233baad471/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/serverTrustCertificates/customerCertificate1"), // Properties: &armsql.ServerTrustCertificateProperties{ // CertificateName: to.Ptr("customerCertificate1"), // Thumbprint: to.Ptr("33702D20EC861199852837AE6BD1A71544B681E2"), // }, // }, // { // Name: to.Ptr("customerCertificate2"), // Type: to.Ptr("Microsoft.Sql/managedInstances/serverTrustCertificates"), // ID: to.Ptr("/subscriptions/38e0dc56-907f-45ba-a97c-74233baad471/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl/serverTrustCertificates/customerCertificate2"), // Properties: &armsql.ServerTrustCertificateProperties{ // CertificateName: to.Ptr("customerCertificate2"), // Thumbprint: to.Ptr("57CFA9CF16F2FB2775AF059A95C6D5B897DA2C05"), // }, // }}, // } } }
Output:
type ServerTrustCertificatesClientBeginCreateOrUpdateOptions ¶ added in v0.4.0
type ServerTrustCertificatesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerTrustCertificatesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerTrustCertificatesClient.BeginCreateOrUpdate method.
type ServerTrustCertificatesClientBeginDeleteOptions ¶ added in v0.4.0
type ServerTrustCertificatesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerTrustCertificatesClientBeginDeleteOptions contains the optional parameters for the ServerTrustCertificatesClient.BeginDelete method.
type ServerTrustCertificatesClientCreateOrUpdateResponse ¶ added in v0.4.0
type ServerTrustCertificatesClientCreateOrUpdateResponse struct { // Server trust certificate imported from box to enable connection between box and Sql Managed Instance. ServerTrustCertificate }
ServerTrustCertificatesClientCreateOrUpdateResponse contains the response from method ServerTrustCertificatesClient.BeginCreateOrUpdate.
type ServerTrustCertificatesClientDeleteResponse ¶ added in v0.4.0
type ServerTrustCertificatesClientDeleteResponse struct { }
ServerTrustCertificatesClientDeleteResponse contains the response from method ServerTrustCertificatesClient.BeginDelete.
type ServerTrustCertificatesClientGetOptions ¶ added in v0.4.0
type ServerTrustCertificatesClientGetOptions struct { }
ServerTrustCertificatesClientGetOptions contains the optional parameters for the ServerTrustCertificatesClient.Get method.
type ServerTrustCertificatesClientGetResponse ¶ added in v0.4.0
type ServerTrustCertificatesClientGetResponse struct { // Server trust certificate imported from box to enable connection between box and Sql Managed Instance. ServerTrustCertificate }
ServerTrustCertificatesClientGetResponse contains the response from method ServerTrustCertificatesClient.Get.
type ServerTrustCertificatesClientListByInstanceOptions ¶ added in v0.4.0
type ServerTrustCertificatesClientListByInstanceOptions struct { }
ServerTrustCertificatesClientListByInstanceOptions contains the optional parameters for the ServerTrustCertificatesClient.NewListByInstancePager method.
type ServerTrustCertificatesClientListByInstanceResponse ¶ added in v0.4.0
type ServerTrustCertificatesClientListByInstanceResponse struct { // A list of server trust certificates in instance. ServerTrustCertificatesListResult }
ServerTrustCertificatesClientListByInstanceResponse contains the response from method ServerTrustCertificatesClient.NewListByInstancePager.
type ServerTrustCertificatesListResult ¶ added in v0.4.0
type ServerTrustCertificatesListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ServerTrustCertificate }
ServerTrustCertificatesListResult - A list of server trust certificates in instance.
func (ServerTrustCertificatesListResult) MarshalJSON ¶ added in v0.4.0
func (s ServerTrustCertificatesListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerTrustCertificatesListResult.
func (*ServerTrustCertificatesListResult) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerTrustCertificatesListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerTrustCertificatesListResult.
type ServerTrustGroup ¶
type ServerTrustGroup struct { // Resource properties. Properties *ServerTrustGroupProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ServerTrustGroup - A server trust group.
func (ServerTrustGroup) MarshalJSON ¶
func (s ServerTrustGroup) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerTrustGroup.
func (*ServerTrustGroup) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerTrustGroup) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerTrustGroup.
type ServerTrustGroupListResult ¶
type ServerTrustGroupListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ServerTrustGroup }
ServerTrustGroupListResult - A list of server trust groups.
func (ServerTrustGroupListResult) MarshalJSON ¶
func (s ServerTrustGroupListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerTrustGroupListResult.
func (*ServerTrustGroupListResult) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerTrustGroupListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerTrustGroupListResult.
type ServerTrustGroupProperties ¶
type ServerTrustGroupProperties struct { // REQUIRED; Group members information for the server trust group. GroupMembers []*ServerInfo // REQUIRED; Trust scope of the server trust group. TrustScopes []*ServerTrustGroupPropertiesTrustScopesItem }
ServerTrustGroupProperties - Properties of a server trust group.
func (ServerTrustGroupProperties) MarshalJSON ¶
func (s ServerTrustGroupProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerTrustGroupProperties.
func (*ServerTrustGroupProperties) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerTrustGroupProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerTrustGroupProperties.
type ServerTrustGroupPropertiesTrustScopesItem ¶
type ServerTrustGroupPropertiesTrustScopesItem string
const ( ServerTrustGroupPropertiesTrustScopesItemGlobalTransactions ServerTrustGroupPropertiesTrustScopesItem = "GlobalTransactions" ServerTrustGroupPropertiesTrustScopesItemServiceBroker ServerTrustGroupPropertiesTrustScopesItem = "ServiceBroker" )
func PossibleServerTrustGroupPropertiesTrustScopesItemValues ¶
func PossibleServerTrustGroupPropertiesTrustScopesItemValues() []ServerTrustGroupPropertiesTrustScopesItem
PossibleServerTrustGroupPropertiesTrustScopesItemValues returns the possible values for the ServerTrustGroupPropertiesTrustScopesItem const type.
type ServerTrustGroupsClient ¶
type ServerTrustGroupsClient struct {
// contains filtered or unexported fields
}
ServerTrustGroupsClient contains the methods for the ServerTrustGroups group. Don't use this type directly, use NewServerTrustGroupsClient() instead.
func NewServerTrustGroupsClient ¶
func NewServerTrustGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerTrustGroupsClient, error)
NewServerTrustGroupsClient creates a new instance of ServerTrustGroupsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ServerTrustGroupsClient) BeginCreateOrUpdate ¶
func (client *ServerTrustGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, locationName string, serverTrustGroupName string, parameters ServerTrustGroup, options *ServerTrustGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerTrustGroupsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a server trust group. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- locationName - The name of the region where the resource is located.
- serverTrustGroupName - The name of the server trust group.
- parameters - The server trust group parameters.
- options - ServerTrustGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerTrustGroupsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerTrustGroupCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerTrustGroupsClient().BeginCreateOrUpdate(ctx, "Default", "Japan East", "server-trust-group-test", armsql.ServerTrustGroup{ Properties: &armsql.ServerTrustGroupProperties{ GroupMembers: []*armsql.ServerInfo{ { ServerID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1"), }, { ServerID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2"), }}, TrustScopes: []*armsql.ServerTrustGroupPropertiesTrustScopesItem{ to.Ptr(armsql.ServerTrustGroupPropertiesTrustScopesItemGlobalTransactions), to.Ptr(armsql.ServerTrustGroupPropertiesTrustScopesItemServiceBroker)}, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerTrustGroup = armsql.ServerTrustGroup{ // Name: to.Ptr("server-trust-group-test"), // Type: to.Ptr("Microsoft.Sql/locations/serverTrustGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test"), // Properties: &armsql.ServerTrustGroupProperties{ // GroupMembers: []*armsql.ServerInfo{ // { // ServerID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1"), // }, // { // ServerID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2"), // }}, // TrustScopes: []*armsql.ServerTrustGroupPropertiesTrustScopesItem{ // to.Ptr(armsql.ServerTrustGroupPropertiesTrustScopesItemGlobalTransactions), // to.Ptr(armsql.ServerTrustGroupPropertiesTrustScopesItemServiceBroker)}, // }, // } }
Output:
func (*ServerTrustGroupsClient) BeginDelete ¶
func (client *ServerTrustGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, locationName string, serverTrustGroupName string, options *ServerTrustGroupsClientBeginDeleteOptions) (*runtime.Poller[ServerTrustGroupsClientDeleteResponse], error)
BeginDelete - Deletes a server trust group. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- locationName - The name of the region where the resource is located.
- serverTrustGroupName - The name of the server trust group.
- options - ServerTrustGroupsClientBeginDeleteOptions contains the optional parameters for the ServerTrustGroupsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerTrustGroupDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServerTrustGroupsClient().BeginDelete(ctx, "Default", "Japan East", "server-trust-group-test", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ServerTrustGroupsClient) Get ¶
func (client *ServerTrustGroupsClient) Get(ctx context.Context, resourceGroupName string, locationName string, serverTrustGroupName string, options *ServerTrustGroupsClientGetOptions) (ServerTrustGroupsClientGetResponse, error)
Get - Gets a server trust group. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- locationName - The name of the region where the resource is located.
- serverTrustGroupName - The name of the server trust group.
- options - ServerTrustGroupsClientGetOptions contains the optional parameters for the ServerTrustGroupsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerTrustGroupGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServerTrustGroupsClient().Get(ctx, "Default", "Japan East", "server-trust-group-test", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerTrustGroup = armsql.ServerTrustGroup{ // Name: to.Ptr("server-trust-group-test"), // Type: to.Ptr("Microsoft.Sql/locations/serverTrustGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test"), // Properties: &armsql.ServerTrustGroupProperties{ // GroupMembers: []*armsql.ServerInfo{ // { // ServerID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1"), // }, // { // ServerID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2"), // }}, // TrustScopes: []*armsql.ServerTrustGroupPropertiesTrustScopesItem{ // to.Ptr(armsql.ServerTrustGroupPropertiesTrustScopesItemGlobalTransactions), // to.Ptr(armsql.ServerTrustGroupPropertiesTrustScopesItemServiceBroker)}, // }, // } }
Output:
func (*ServerTrustGroupsClient) NewListByInstancePager ¶ added in v0.5.0
func (client *ServerTrustGroupsClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, options *ServerTrustGroupsClientListByInstanceOptions) *runtime.Pager[ServerTrustGroupsClientListByInstanceResponse]
NewListByInstancePager - Gets a server trust groups by instance name.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- managedInstanceName - The name of the managed instance.
- options - ServerTrustGroupsClientListByInstanceOptions contains the optional parameters for the ServerTrustGroupsClient.NewListByInstancePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerTrustGroupListByManagedInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServerTrustGroupsClient().NewListByInstancePager("Default-SQL-SouthEastAsia", "managedInstance-1", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ServerTrustGroupListResult = armsql.ServerTrustGroupListResult{ // Value: []*armsql.ServerTrustGroup{ // { // Name: to.Ptr("server-trust-group-test"), // Type: to.Ptr("Microsoft.Sql/locations/serverTrustGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test"), // Properties: &armsql.ServerTrustGroupProperties{ // GroupMembers: []*armsql.ServerInfo{ // { // ServerID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1"), // }, // { // ServerID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2"), // }}, // TrustScopes: []*armsql.ServerTrustGroupPropertiesTrustScopesItem{ // to.Ptr(armsql.ServerTrustGroupPropertiesTrustScopesItemGlobalTransactions), // to.Ptr(armsql.ServerTrustGroupPropertiesTrustScopesItemServiceBroker)}, // }, // }, // { // Name: to.Ptr("server-trust-group-test-2"), // Type: to.Ptr("Microsoft.Sql/locations/serverTrustGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test-2"), // Properties: &armsql.ServerTrustGroupProperties{ // GroupMembers: []*armsql.ServerInfo{ // { // ServerID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1"), // }, // { // ServerID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-3"), // }}, // TrustScopes: []*armsql.ServerTrustGroupPropertiesTrustScopesItem{ // to.Ptr(armsql.ServerTrustGroupPropertiesTrustScopesItemGlobalTransactions), // to.Ptr(armsql.ServerTrustGroupPropertiesTrustScopesItemServiceBroker)}, // }, // }}, // } } }
Output:
func (*ServerTrustGroupsClient) NewListByLocationPager ¶ added in v0.5.0
func (client *ServerTrustGroupsClient) NewListByLocationPager(resourceGroupName string, locationName string, options *ServerTrustGroupsClientListByLocationOptions) *runtime.Pager[ServerTrustGroupsClientListByLocationResponse]
NewListByLocationPager - Lists a server trust group.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- locationName - The name of the region where the resource is located.
- options - ServerTrustGroupsClientListByLocationOptions contains the optional parameters for the ServerTrustGroupsClient.NewListByLocationPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerTrustGroupList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServerTrustGroupsClient().NewListByLocationPager("Default", "Japan East", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ServerTrustGroupListResult = armsql.ServerTrustGroupListResult{ // Value: []*armsql.ServerTrustGroup{ // { // Name: to.Ptr("server-trust-group-test"), // Type: to.Ptr("Microsoft.Sql/locations/serverTrustGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test"), // Properties: &armsql.ServerTrustGroupProperties{ // GroupMembers: []*armsql.ServerInfo{ // { // ServerID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1"), // }, // { // ServerID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-2"), // }}, // TrustScopes: []*armsql.ServerTrustGroupPropertiesTrustScopesItem{ // to.Ptr(armsql.ServerTrustGroupPropertiesTrustScopesItemGlobalTransactions), // to.Ptr(armsql.ServerTrustGroupPropertiesTrustScopesItemServiceBroker)}, // }, // }, // { // Name: to.Ptr("server-trust-group-test-2"), // Type: to.Ptr("Microsoft.Sql/locations/serverTrustGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/locations/Japan East/serverTrustGroups/server-trust-group-test-2"), // Properties: &armsql.ServerTrustGroupProperties{ // GroupMembers: []*armsql.ServerInfo{ // { // ServerID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-1"), // }, // { // ServerID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/managedInstance-3"), // }}, // TrustScopes: []*armsql.ServerTrustGroupPropertiesTrustScopesItem{ // to.Ptr(armsql.ServerTrustGroupPropertiesTrustScopesItemGlobalTransactions), // to.Ptr(armsql.ServerTrustGroupPropertiesTrustScopesItemServiceBroker)}, // }, // }}, // } } }
Output:
type ServerTrustGroupsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ServerTrustGroupsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerTrustGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerTrustGroupsClient.BeginCreateOrUpdate method.
type ServerTrustGroupsClientBeginDeleteOptions ¶ added in v0.3.0
type ServerTrustGroupsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerTrustGroupsClientBeginDeleteOptions contains the optional parameters for the ServerTrustGroupsClient.BeginDelete method.
type ServerTrustGroupsClientCreateOrUpdateResponse ¶ added in v0.3.0
type ServerTrustGroupsClientCreateOrUpdateResponse struct { // A server trust group. ServerTrustGroup }
ServerTrustGroupsClientCreateOrUpdateResponse contains the response from method ServerTrustGroupsClient.BeginCreateOrUpdate.
type ServerTrustGroupsClientDeleteResponse ¶ added in v0.3.0
type ServerTrustGroupsClientDeleteResponse struct { }
ServerTrustGroupsClientDeleteResponse contains the response from method ServerTrustGroupsClient.BeginDelete.
type ServerTrustGroupsClientGetOptions ¶ added in v0.3.0
type ServerTrustGroupsClientGetOptions struct { }
ServerTrustGroupsClientGetOptions contains the optional parameters for the ServerTrustGroupsClient.Get method.
type ServerTrustGroupsClientGetResponse ¶ added in v0.3.0
type ServerTrustGroupsClientGetResponse struct { // A server trust group. ServerTrustGroup }
ServerTrustGroupsClientGetResponse contains the response from method ServerTrustGroupsClient.Get.
type ServerTrustGroupsClientListByInstanceOptions ¶ added in v0.3.0
type ServerTrustGroupsClientListByInstanceOptions struct { }
ServerTrustGroupsClientListByInstanceOptions contains the optional parameters for the ServerTrustGroupsClient.NewListByInstancePager method.
type ServerTrustGroupsClientListByInstanceResponse ¶ added in v0.3.0
type ServerTrustGroupsClientListByInstanceResponse struct { // A list of server trust groups. ServerTrustGroupListResult }
ServerTrustGroupsClientListByInstanceResponse contains the response from method ServerTrustGroupsClient.NewListByInstancePager.
type ServerTrustGroupsClientListByLocationOptions ¶ added in v0.3.0
type ServerTrustGroupsClientListByLocationOptions struct { }
ServerTrustGroupsClientListByLocationOptions contains the optional parameters for the ServerTrustGroupsClient.NewListByLocationPager method.
type ServerTrustGroupsClientListByLocationResponse ¶ added in v0.3.0
type ServerTrustGroupsClientListByLocationResponse struct { // A list of server trust groups. ServerTrustGroupListResult }
ServerTrustGroupsClientListByLocationResponse contains the response from method ServerTrustGroupsClient.NewListByLocationPager.
type ServerUpdate ¶
type ServerUpdate struct { // Server identity Identity *ResourceIdentity // Resource properties. Properties *ServerProperties // Resource tags. Tags map[string]*string }
ServerUpdate - An update request for an Azure SQL Database server.
func (ServerUpdate) MarshalJSON ¶
func (s ServerUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerUpdate.
func (*ServerUpdate) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerUpdate.
type ServerUsage ¶
type ServerUsage struct { // READ-ONLY; The current value of the metric. CurrentValue *float64 // READ-ONLY; The metric display name. DisplayName *string // READ-ONLY; The current limit of the metric. Limit *float64 // READ-ONLY; Name of the server usage metric. Name *string // READ-ONLY; The next reset time for the metric (ISO8601 format). NextResetTime *time.Time // READ-ONLY; The name of the resource. ResourceName *string // READ-ONLY; The units of the metric. Unit *string }
ServerUsage - Represents server metrics.
func (ServerUsage) MarshalJSON ¶
func (s ServerUsage) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerUsage.
func (*ServerUsage) UnmarshalJSON ¶
func (s *ServerUsage) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerUsage.
type ServerUsageListResult ¶
type ServerUsageListResult struct { // REQUIRED; The list of server metrics for the server. Value []*ServerUsage }
ServerUsageListResult - Represents the response to a list server metrics request.
func (ServerUsageListResult) MarshalJSON ¶
func (s ServerUsageListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerUsageListResult.
func (*ServerUsageListResult) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerUsageListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerUsageListResult.
type ServerUsagesClient ¶
type ServerUsagesClient struct {
// contains filtered or unexported fields
}
ServerUsagesClient contains the methods for the ServerUsages group. Don't use this type directly, use NewServerUsagesClient() instead.
func NewServerUsagesClient ¶
func NewServerUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerUsagesClient, error)
NewServerUsagesClient creates a new instance of ServerUsagesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ServerUsagesClient) NewListByServerPager ¶ added in v0.5.0
func (client *ServerUsagesClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServerUsagesClientListByServerOptions) *runtime.Pager[ServerUsagesClientListByServerResponse]
NewListByServerPager - Returns server usages.
Generated from API version 2014-04-01
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - ServerUsagesClientListByServerOptions contains the optional parameters for the ServerUsagesClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ServerUsageMetricsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServerUsagesClient().NewListByServerPager("sqlcrudtest-6730", "sqlcrudtest-9007", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ServerUsageListResult = armsql.ServerUsageListResult{ // Value: []*armsql.ServerUsage{ // { // Name: to.Ptr("server_dtu_quota"), // CurrentValue: to.Ptr[float64](0), // DisplayName: to.Ptr("Database Throughput Unit Quota"), // Limit: to.Ptr[float64](45000), // ResourceName: to.Ptr("sqlcrudtest-9007"), // Unit: to.Ptr("DTUs"), // }, // { // Name: to.Ptr("server_dtu_quota_current"), // CurrentValue: to.Ptr[float64](0), // DisplayName: to.Ptr("Database Throughput Unit Quota"), // Limit: to.Ptr[float64](45000), // ResourceName: to.Ptr("sqlcrudtest-9007"), // Unit: to.Ptr("DTUs"), // }}, // } } }
Output:
type ServerUsagesClientListByServerOptions ¶ added in v0.3.0
type ServerUsagesClientListByServerOptions struct { }
ServerUsagesClientListByServerOptions contains the optional parameters for the ServerUsagesClient.NewListByServerPager method.
type ServerUsagesClientListByServerResponse ¶ added in v0.3.0
type ServerUsagesClientListByServerResponse struct { // Represents the response to a list server metrics request. ServerUsageListResult }
ServerUsagesClientListByServerResponse contains the response from method ServerUsagesClient.NewListByServerPager.
type ServerVersionCapability ¶
type ServerVersionCapability struct { // The reason for the capability not being available. Reason *string // READ-ONLY; The server version name. Name *string // READ-ONLY; The status of the capability. Status *CapabilityStatus // READ-ONLY; The list of supported database editions. SupportedEditions []*EditionCapability // READ-ONLY; The list of supported elastic pool editions. SupportedElasticPoolEditions []*ElasticPoolEditionCapability }
ServerVersionCapability - The server capability
func (ServerVersionCapability) MarshalJSON ¶
func (s ServerVersionCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerVersionCapability.
func (*ServerVersionCapability) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerVersionCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerVersionCapability.
type ServerVulnerabilityAssessment ¶
type ServerVulnerabilityAssessment struct { // Resource properties. Properties *ServerVulnerabilityAssessmentProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ServerVulnerabilityAssessment - A server vulnerability assessment.
func (ServerVulnerabilityAssessment) MarshalJSON ¶
func (s ServerVulnerabilityAssessment) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerVulnerabilityAssessment.
func (*ServerVulnerabilityAssessment) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerVulnerabilityAssessment) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerVulnerabilityAssessment.
type ServerVulnerabilityAssessmentListResult ¶
type ServerVulnerabilityAssessmentListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ServerVulnerabilityAssessment }
ServerVulnerabilityAssessmentListResult - A list of the server's vulnerability assessments.
func (ServerVulnerabilityAssessmentListResult) MarshalJSON ¶
func (s ServerVulnerabilityAssessmentListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerVulnerabilityAssessmentListResult.
func (*ServerVulnerabilityAssessmentListResult) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerVulnerabilityAssessmentListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerVulnerabilityAssessmentListResult.
type ServerVulnerabilityAssessmentProperties ¶
type ServerVulnerabilityAssessmentProperties struct { // REQUIRED; A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). StorageContainerPath *string // The recurring scans settings RecurringScans *VulnerabilityAssessmentRecurringScansProperties // Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' // isn't specified, storageAccountAccessKey is required. Applies only if the // storage account is not behind a Vnet or a firewall StorageAccountAccessKey *string // A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. // If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is // required. Applies only if the storage account is not behind a Vnet or a firewall StorageContainerSasKey *string }
ServerVulnerabilityAssessmentProperties - Properties of a server Vulnerability Assessment.
func (ServerVulnerabilityAssessmentProperties) MarshalJSON ¶ added in v1.1.0
func (s ServerVulnerabilityAssessmentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerVulnerabilityAssessmentProperties.
func (*ServerVulnerabilityAssessmentProperties) UnmarshalJSON ¶ added in v1.1.0
func (s *ServerVulnerabilityAssessmentProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerVulnerabilityAssessmentProperties.
type ServerVulnerabilityAssessmentsClient ¶
type ServerVulnerabilityAssessmentsClient struct {
// contains filtered or unexported fields
}
ServerVulnerabilityAssessmentsClient contains the methods for the ServerVulnerabilityAssessments group. Don't use this type directly, use NewServerVulnerabilityAssessmentsClient() instead.
func NewServerVulnerabilityAssessmentsClient ¶
func NewServerVulnerabilityAssessmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerVulnerabilityAssessmentsClient, error)
NewServerVulnerabilityAssessmentsClient creates a new instance of ServerVulnerabilityAssessmentsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ServerVulnerabilityAssessmentsClient) CreateOrUpdate ¶
func (client *ServerVulnerabilityAssessmentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, parameters ServerVulnerabilityAssessment, options *ServerVulnerabilityAssessmentsClientCreateOrUpdateOptions) (ServerVulnerabilityAssessmentsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates the server's vulnerability assessment. Learn more about setting SQL vulnerability assessment with managed identity - https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server for which the vulnerability assessment is defined.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- parameters - The requested resource.
- options - ServerVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the ServerVulnerabilityAssessmentsClient.CreateOrUpdate method.
Example (CreateAServersVulnerabilityAssessmentWithAllParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerVulnerabilityAssessmentCreateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServerVulnerabilityAssessmentsClient().CreateOrUpdate(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", armsql.VulnerabilityAssessmentNameDefault, armsql.ServerVulnerabilityAssessment{ Properties: &armsql.ServerVulnerabilityAssessmentProperties{ RecurringScans: &armsql.VulnerabilityAssessmentRecurringScansProperties{ EmailSubscriptionAdmins: to.Ptr(true), Emails: []*string{ to.Ptr("email1@mail.com"), to.Ptr("email2@mail.com")}, IsEnabled: to.Ptr(true), }, StorageAccountAccessKey: to.Ptr("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), StorageContainerPath: to.Ptr("https://myStorage.blob.core.windows.net/vulnerability-assessment/"), StorageContainerSasKey: to.Ptr("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerVulnerabilityAssessment = armsql.ServerVulnerabilityAssessment{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/vulnerabilityAssessments"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default"), // Properties: &armsql.ServerVulnerabilityAssessmentProperties{ // RecurringScans: &armsql.VulnerabilityAssessmentRecurringScansProperties{ // EmailSubscriptionAdmins: to.Ptr(true), // Emails: []*string{ // to.Ptr("email1@mail.com"), // to.Ptr("email2@mail.com")}, // IsEnabled: to.Ptr(true), // }, // }, // } }
Output:
Example (CreateAServersVulnerabilityAssessmentWithMinimalParametersWhenStorageAccountAccessKeyIsSpecified) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerVulnerabilityAssessmentCreateStorageAccessKeyMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServerVulnerabilityAssessmentsClient().CreateOrUpdate(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", armsql.VulnerabilityAssessmentNameDefault, armsql.ServerVulnerabilityAssessment{ Properties: &armsql.ServerVulnerabilityAssessmentProperties{ StorageAccountAccessKey: to.Ptr("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), StorageContainerPath: to.Ptr("https://myStorage.blob.core.windows.net/vulnerability-assessment/"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerVulnerabilityAssessment = armsql.ServerVulnerabilityAssessment{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/vulnerabilityAssessments"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default"), // Properties: &armsql.ServerVulnerabilityAssessmentProperties{ // RecurringScans: &armsql.VulnerabilityAssessmentRecurringScansProperties{ // EmailSubscriptionAdmins: to.Ptr(false), // Emails: []*string{ // }, // IsEnabled: to.Ptr(true), // }, // }, // } }
Output:
Example (CreateAServersVulnerabilityAssessmentWithMinimalParametersWhenStorageContainerSasKeyIsSpecified) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerVulnerabilityAssessmentCreateContainerSasKeyMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServerVulnerabilityAssessmentsClient().CreateOrUpdate(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", armsql.VulnerabilityAssessmentNameDefault, armsql.ServerVulnerabilityAssessment{ Properties: &armsql.ServerVulnerabilityAssessmentProperties{ StorageContainerPath: to.Ptr("https://myStorage.blob.core.windows.net/vulnerability-assessment/"), StorageContainerSasKey: to.Ptr("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerVulnerabilityAssessment = armsql.ServerVulnerabilityAssessment{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/vulnerabilityAssessments"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default"), // Properties: &armsql.ServerVulnerabilityAssessmentProperties{ // RecurringScans: &armsql.VulnerabilityAssessmentRecurringScansProperties{ // EmailSubscriptionAdmins: to.Ptr(false), // Emails: []*string{ // }, // IsEnabled: to.Ptr(true), // }, // }, // } }
Output:
func (*ServerVulnerabilityAssessmentsClient) Delete ¶
func (client *ServerVulnerabilityAssessmentsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *ServerVulnerabilityAssessmentsClientDeleteOptions) (ServerVulnerabilityAssessmentsClientDeleteResponse, error)
Delete - Removes the server's vulnerability assessment. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server for which the vulnerability assessment is defined.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- options - ServerVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the ServerVulnerabilityAssessmentsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerVulnerabilityAssessmentDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewServerVulnerabilityAssessmentsClient().Delete(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", armsql.VulnerabilityAssessmentNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*ServerVulnerabilityAssessmentsClient) Get ¶
func (client *ServerVulnerabilityAssessmentsClient) Get(ctx context.Context, resourceGroupName string, serverName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *ServerVulnerabilityAssessmentsClientGetOptions) (ServerVulnerabilityAssessmentsClientGetResponse, error)
Get - Gets the server's vulnerability assessment. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server for which the vulnerability assessment is defined.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- options - ServerVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the ServerVulnerabilityAssessmentsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerVulnerabilityAssessmentGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServerVulnerabilityAssessmentsClient().Get(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", armsql.VulnerabilityAssessmentNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServerVulnerabilityAssessment = armsql.ServerVulnerabilityAssessment{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/vulnerabilityAssessments"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/default"), // Properties: &armsql.ServerVulnerabilityAssessmentProperties{ // RecurringScans: &armsql.VulnerabilityAssessmentRecurringScansProperties{ // EmailSubscriptionAdmins: to.Ptr(true), // Emails: []*string{ // to.Ptr("email1@mail.com"), // to.Ptr("email2@mail.com")}, // IsEnabled: to.Ptr(true), // }, // }, // } }
Output:
func (*ServerVulnerabilityAssessmentsClient) NewListByServerPager ¶ added in v0.5.0
func (client *ServerVulnerabilityAssessmentsClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServerVulnerabilityAssessmentsClientListByServerOptions) *runtime.Pager[ServerVulnerabilityAssessmentsClientListByServerResponse]
NewListByServerPager - Lists the vulnerability assessment policies associated with a server.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - ServerVulnerabilityAssessmentsClientListByServerOptions contains the optional parameters for the ServerVulnerabilityAssessmentsClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerVulnerabilityAssessmentListByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServerVulnerabilityAssessmentsClient().NewListByServerPager("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ServerVulnerabilityAssessmentListResult = armsql.ServerVulnerabilityAssessmentListResult{ // Value: []*armsql.ServerVulnerabilityAssessment{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/vulnerabilityAssessments"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/vulnerabilityAssessments/"), // Properties: &armsql.ServerVulnerabilityAssessmentProperties{ // RecurringScans: &armsql.VulnerabilityAssessmentRecurringScansProperties{ // EmailSubscriptionAdmins: to.Ptr(true), // Emails: []*string{ // to.Ptr("email1@mail.com"), // to.Ptr("email2@mail.com")}, // IsEnabled: to.Ptr(true), // }, // }, // }}, // } } }
Output:
type ServerVulnerabilityAssessmentsClientCreateOrUpdateOptions ¶ added in v0.3.0
type ServerVulnerabilityAssessmentsClientCreateOrUpdateOptions struct { }
ServerVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the ServerVulnerabilityAssessmentsClient.CreateOrUpdate method.
type ServerVulnerabilityAssessmentsClientCreateOrUpdateResponse ¶ added in v0.3.0
type ServerVulnerabilityAssessmentsClientCreateOrUpdateResponse struct { // A server vulnerability assessment. ServerVulnerabilityAssessment }
ServerVulnerabilityAssessmentsClientCreateOrUpdateResponse contains the response from method ServerVulnerabilityAssessmentsClient.CreateOrUpdate.
type ServerVulnerabilityAssessmentsClientDeleteOptions ¶ added in v0.3.0
type ServerVulnerabilityAssessmentsClientDeleteOptions struct { }
ServerVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the ServerVulnerabilityAssessmentsClient.Delete method.
type ServerVulnerabilityAssessmentsClientDeleteResponse ¶ added in v0.3.0
type ServerVulnerabilityAssessmentsClientDeleteResponse struct { }
ServerVulnerabilityAssessmentsClientDeleteResponse contains the response from method ServerVulnerabilityAssessmentsClient.Delete.
type ServerVulnerabilityAssessmentsClientGetOptions ¶ added in v0.3.0
type ServerVulnerabilityAssessmentsClientGetOptions struct { }
ServerVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the ServerVulnerabilityAssessmentsClient.Get method.
type ServerVulnerabilityAssessmentsClientGetResponse ¶ added in v0.3.0
type ServerVulnerabilityAssessmentsClientGetResponse struct { // A server vulnerability assessment. ServerVulnerabilityAssessment }
ServerVulnerabilityAssessmentsClientGetResponse contains the response from method ServerVulnerabilityAssessmentsClient.Get.
type ServerVulnerabilityAssessmentsClientListByServerOptions ¶ added in v0.3.0
type ServerVulnerabilityAssessmentsClientListByServerOptions struct { }
ServerVulnerabilityAssessmentsClientListByServerOptions contains the optional parameters for the ServerVulnerabilityAssessmentsClient.NewListByServerPager method.
type ServerVulnerabilityAssessmentsClientListByServerResponse ¶ added in v0.3.0
type ServerVulnerabilityAssessmentsClientListByServerResponse struct { // A list of the server's vulnerability assessments. ServerVulnerabilityAssessmentListResult }
ServerVulnerabilityAssessmentsClientListByServerResponse contains the response from method ServerVulnerabilityAssessmentsClient.NewListByServerPager.
type ServerWorkspaceFeature ¶
type ServerWorkspaceFeature string
ServerWorkspaceFeature - Whether or not existing server has a workspace created and if it allows connection from workspace
const ( ServerWorkspaceFeatureConnected ServerWorkspaceFeature = "Connected" ServerWorkspaceFeatureDisconnected ServerWorkspaceFeature = "Disconnected" )
func PossibleServerWorkspaceFeatureValues ¶
func PossibleServerWorkspaceFeatureValues() []ServerWorkspaceFeature
PossibleServerWorkspaceFeatureValues returns the possible values for the ServerWorkspaceFeature const type.
type ServersClient ¶
type ServersClient struct {
// contains filtered or unexported fields
}
ServersClient contains the methods for the Servers group. Don't use this type directly, use NewServersClient() instead.
func NewServersClient ¶
func NewServersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServersClient, error)
NewServersClient creates a new instance of ServersClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ServersClient) BeginCreateOrUpdate ¶
func (client *ServersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters Server, options *ServersClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServersClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-02-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- parameters - The requested server resource state.
- options - ServersClientBeginCreateOrUpdateOptions contains the optional parameters for the ServersClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServersClient().BeginCreateOrUpdate(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", armsql.Server{ Location: to.Ptr("Japan East"), Properties: &armsql.ServerProperties{ AdministratorLogin: to.Ptr("dummylogin"), AdministratorLoginPassword: to.Ptr("PLACEHOLDER"), Administrators: &armsql.ServerExternalAdministrator{ AzureADOnlyAuthentication: to.Ptr(true), Login: to.Ptr("bob@contoso.com"), PrincipalType: to.Ptr(armsql.PrincipalTypeUser), Sid: to.Ptr("00000011-1111-2222-2222-123456789111"), TenantID: to.Ptr("00000011-1111-2222-2222-123456789111"), }, PublicNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), RestrictOutboundNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Server = armsql.Server{ // Name: to.Ptr("sqlcrudtest-4645"), // Type: to.Ptr("Microsoft.Sql/servers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645"), // Location: to.Ptr("japaneast"), // Kind: to.Ptr("v12.0"), // Properties: &armsql.ServerProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // Administrators: &armsql.ServerExternalAdministrator{ // AzureADOnlyAuthentication: to.Ptr(true), // Login: to.Ptr("bob@contoso.com"), // PrincipalType: to.Ptr(armsql.PrincipalTypeUser), // Sid: to.Ptr("00000011-1111-2222-2222-123456789111"), // TenantID: to.Ptr("00000011-1111-2222-2222-123456789111"), // }, // FullyQualifiedDomainName: to.Ptr("sqlcrudtest-4645.database.windows.net"), // PrivateEndpointConnections: []*armsql.ServerPrivateEndpointConnection{ // { // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444"), // Properties: &armsql.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armsql.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"), // }, // PrivateLinkServiceConnectionState: &armsql.PrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Auto-approved"), // ActionsRequired: to.Ptr(armsql.PrivateLinkServiceConnectionStateActionsRequireNone), // Status: to.Ptr(armsql.PrivateLinkServiceConnectionStateStatusApproved), // }, // ProvisioningState: to.Ptr(armsql.PrivateEndpointProvisioningState("Succeeded")), // }, // }}, // PublicNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // RestrictOutboundNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // State: to.Ptr("Ready"), // Version: to.Ptr("12.0"), // }, // } }
Output:
func (*ServersClient) BeginDelete ¶
func (client *ServersClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientBeginDeleteOptions) (*runtime.Poller[ServersClientDeleteResponse], error)
BeginDelete - Deletes a server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-02-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - ServersClientBeginDeleteOptions contains the optional parameters for the ServersClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServersClient().BeginDelete(ctx, "sqlcrudtest-7398", "sqlcrudtest-6661", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ServersClient) BeginImportDatabase ¶
func (client *ServersClient) BeginImportDatabase(ctx context.Context, resourceGroupName string, serverName string, parameters ImportNewDatabaseDefinition, options *ServersClientBeginImportDatabaseOptions) (*runtime.Poller[ServersClientImportDatabaseResponse], error)
BeginImportDatabase - Imports a bacpac into a new database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-02-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- parameters - The database import request parameters.
- options - ServersClientBeginImportDatabaseOptions contains the optional parameters for the ServersClient.BeginImportDatabase method.
Example (ImportsToANewDatabase) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ImportNewDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServersClient().BeginImportDatabase(ctx, "Default-SQL-SouthEastAsia", "testsvr", armsql.ImportNewDatabaseDefinition{ AdministratorLogin: to.Ptr("login"), AdministratorLoginPassword: to.Ptr("password"), AuthenticationType: to.Ptr("Sql"), DatabaseName: to.Ptr("testdb"), StorageKey: to.Ptr("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=="), StorageKeyType: to.Ptr(armsql.StorageKeyTypeStorageAccessKey), StorageURI: to.Ptr("https://test.blob.core.windows.net/test.bacpac"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ImportExportOperationResult = armsql.ImportExportOperationResult{ // Name: to.Ptr("9d9a794a-5cec-4f23-af70-d29511b522a4"), // Type: to.Ptr("Microsoft.Sql/servers/databases/importExportOperationResults"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/importExportOperationResults/9d9a794a-5cec-4f23-af70-d29511b522a4"), // Properties: &armsql.ImportExportOperationResultProperties{ // BlobURI: to.Ptr("https://test.blob.core.windows.net/test.bacpac"), // DatabaseName: to.Ptr("testdb"), // LastModifiedTime: to.Ptr("2/2/2020 8:34:47 PM"), // QueuedTime: to.Ptr("2/2/2020 8:33:27 PM"), // RequestID: to.Ptr("9d9a794a-5cec-4f23-af70-d29511b522a4"), // RequestType: to.Ptr("Import"), // ServerName: to.Ptr("testsvr.database.windows.net"), // Status: to.Ptr("Completed"), // }, // } }
Output:
Example (ImportsToANewDatabaseUsingPrivateLinkForTheSqlServerAndStorageAccount) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ImportNewDatabaseWithNetworkIsolation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServersClient().BeginImportDatabase(ctx, "Default-SQL-SouthEastAsia", "testsvr", armsql.ImportNewDatabaseDefinition{ AdministratorLogin: to.Ptr("login"), AdministratorLoginPassword: to.Ptr("password"), AuthenticationType: to.Ptr("Sql"), DatabaseName: to.Ptr("testdb"), NetworkIsolation: &armsql.NetworkIsolationSettings{ SQLServerResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr"), StorageAccountResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Storage/storageAccounts/test-privatelink"), }, StorageKey: to.Ptr("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=="), StorageKeyType: to.Ptr(armsql.StorageKeyTypeStorageAccessKey), StorageURI: to.Ptr("https://test.blob.core.windows.net/test.bacpac"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ImportExportOperationResult = armsql.ImportExportOperationResult{ // Name: to.Ptr("9d9a794a-5cec-4f23-af70-d29511b522a4"), // Type: to.Ptr("Microsoft.Sql/servers/databases/importExportOperationResults"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/importExportOperationResults/9d9a794a-5cec-4f23-af70-d29511b522a4"), // Properties: &armsql.ImportExportOperationResultProperties{ // BlobURI: to.Ptr("https://test.blob.core.windows.net/test.bacpac"), // DatabaseName: to.Ptr("testdb"), // LastModifiedTime: to.Ptr("2/2/2020 8:34:47 PM"), // QueuedTime: to.Ptr("2/2/2020 8:33:27 PM"), // RequestID: to.Ptr("9d9a794a-5cec-4f23-af70-d29511b522a4"), // RequestType: to.Ptr("Import"), // ServerName: to.Ptr("testsvr.database.windows.net"), // Status: to.Ptr("Completed"), // }, // } }
Output:
func (*ServersClient) BeginUpdate ¶
func (client *ServersClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters ServerUpdate, options *ServersClientBeginUpdateOptions) (*runtime.Poller[ServersClientUpdateResponse], error)
BeginUpdate - Updates a server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-02-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- parameters - The requested server resource state.
- options - ServersClientBeginUpdateOptions contains the optional parameters for the ServersClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewServersClient().BeginUpdate(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", armsql.ServerUpdate{ Properties: &armsql.ServerProperties{ AdministratorLogin: to.Ptr("dummylogin"), AdministratorLoginPassword: to.Ptr("placeholder"), PublicNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagDisabled), RestrictOutboundNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Server = armsql.Server{ // Name: to.Ptr("sqlcrudtest-4645"), // Type: to.Ptr("Microsoft.Sql/servers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645"), // Location: to.Ptr("japaneast"), // Tags: map[string]*string{ // "tagKey1": to.Ptr("TagValue1"), // }, // Kind: to.Ptr("v12.0"), // Properties: &armsql.ServerProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // FullyQualifiedDomainName: to.Ptr("sqlcrudtest-4645.database.windows.net"), // PrivateEndpointConnections: []*armsql.ServerPrivateEndpointConnection{ // { // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444"), // Properties: &armsql.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armsql.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"), // }, // PrivateLinkServiceConnectionState: &armsql.PrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Auto-approved"), // ActionsRequired: to.Ptr(armsql.PrivateLinkServiceConnectionStateActionsRequireNone), // Status: to.Ptr(armsql.PrivateLinkServiceConnectionStateStatusApproved), // }, // ProvisioningState: to.Ptr(armsql.PrivateEndpointProvisioningState("Succeeded")), // }, // }}, // PublicNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagDisabled), // RestrictOutboundNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // State: to.Ptr("Ready"), // Version: to.Ptr("12.0"), // }, // } }
Output:
func (*ServersClient) CheckNameAvailability ¶
func (client *ServersClient) CheckNameAvailability(ctx context.Context, parameters CheckNameAvailabilityRequest, options *ServersClientCheckNameAvailabilityOptions) (ServersClientCheckNameAvailabilityResponse, error)
CheckNameAvailability - Determines whether a resource can be created with the specified name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-02-01-preview
- parameters - The name availability request parameters.
- options - ServersClientCheckNameAvailabilityOptions contains the optional parameters for the ServersClient.CheckNameAvailability method.
Example (CheckForAServerNameThatAlreadyExists) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CheckNameAvailabilityServerAlreadyExists.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServersClient().CheckNameAvailability(ctx, armsql.CheckNameAvailabilityRequest{ Name: to.Ptr("server1"), Type: to.Ptr("Microsoft.Sql/servers"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.CheckNameAvailabilityResponse = armsql.CheckNameAvailabilityResponse{ // Name: to.Ptr("server1"), // Available: to.Ptr(false), // Message: to.Ptr("Specified server name is already used"), // Reason: to.Ptr(armsql.CheckNameAvailabilityReasonAlreadyExists), // } }
Output:
Example (CheckForAServerNameThatIsAvailable) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CheckNameAvailabilityServerAvailable.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServersClient().CheckNameAvailability(ctx, armsql.CheckNameAvailabilityRequest{ Name: to.Ptr("server1"), Type: to.Ptr("Microsoft.Sql/servers"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.CheckNameAvailabilityResponse = armsql.CheckNameAvailabilityResponse{ // Name: to.Ptr("server1"), // Available: to.Ptr(true), // } }
Output:
Example (CheckForAServerNameThatIsInvalid) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CheckNameAvailabilityServerInvalid.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServersClient().CheckNameAvailability(ctx, armsql.CheckNameAvailabilityRequest{ Name: to.Ptr("SERVER1"), Type: to.Ptr("Microsoft.Sql/servers"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.CheckNameAvailabilityResponse = armsql.CheckNameAvailabilityResponse{ // Name: to.Ptr("SERVER1"), // Available: to.Ptr(false), // Message: to.Ptr("Specified server name contains unsupported characters or is too long. Server name must be no longer than 63 characters long, contain only lower-case characters or digits, cannot contain '.' or '_' characters and can't start or end with '-' character."), // Reason: to.Ptr(armsql.CheckNameAvailabilityReasonInvalid), // } }
Output:
func (*ServersClient) Get ¶
func (client *ServersClient) Get(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientGetOptions) (ServersClientGetResponse, error)
Get - Gets a server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-02-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - ServersClientGetOptions contains the optional parameters for the ServersClient.Get method.
Example (GetServer) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServersClient().Get(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", &armsql.ServersClientGetOptions{Expand: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Server = armsql.Server{ // Name: to.Ptr("sqlcrudtest-4645"), // Type: to.Ptr("Microsoft.Sql/servers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645"), // Location: to.Ptr("japaneast"), // Tags: map[string]*string{ // "tagKey1": to.Ptr("TagValue1"), // }, // Kind: to.Ptr("v12.0"), // Properties: &armsql.ServerProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // FullyQualifiedDomainName: to.Ptr("sqlcrudtest-4645.database.windows.net"), // PrivateEndpointConnections: []*armsql.ServerPrivateEndpointConnection{ // { // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444"), // Properties: &armsql.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armsql.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"), // }, // PrivateLinkServiceConnectionState: &armsql.PrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Auto-approved"), // ActionsRequired: to.Ptr(armsql.PrivateLinkServiceConnectionStateActionsRequireNone), // Status: to.Ptr(armsql.PrivateLinkServiceConnectionStateStatusApproved), // }, // ProvisioningState: to.Ptr(armsql.PrivateEndpointProvisioningState("Succeeded")), // }, // }}, // PublicNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // RestrictOutboundNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // State: to.Ptr("Ready"), // Version: to.Ptr("12.0"), // WorkspaceFeature: to.Ptr(armsql.ServerWorkspaceFeatureConnected), // }, // } }
Output:
Example (GetServerWithExpandAdministrators) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServersClient().Get(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", &armsql.ServersClientGetOptions{Expand: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Server = armsql.Server{ // Name: to.Ptr("sqlcrudtest-4645"), // Type: to.Ptr("Microsoft.Sql/servers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645"), // Location: to.Ptr("japaneast"), // Tags: map[string]*string{ // "tagKey1": to.Ptr("TagValue1"), // }, // Kind: to.Ptr("v12.0"), // Properties: &armsql.ServerProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // Administrators: &armsql.ServerExternalAdministrator{ // AzureADOnlyAuthentication: to.Ptr(true), // Login: to.Ptr("bob@contoso.com"), // PrincipalType: to.Ptr(armsql.PrincipalTypeUser), // Sid: to.Ptr("00000011-1111-2222-2222-123456789111"), // TenantID: to.Ptr("00000011-1111-2222-2222-123456789111"), // }, // FullyQualifiedDomainName: to.Ptr("sqlcrudtest-4645.database.windows.net"), // PrivateEndpointConnections: []*armsql.ServerPrivateEndpointConnection{ // { // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444"), // Properties: &armsql.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armsql.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"), // }, // PrivateLinkServiceConnectionState: &armsql.PrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Auto-approved"), // ActionsRequired: to.Ptr(armsql.PrivateLinkServiceConnectionStateActionsRequireNone), // Status: to.Ptr(armsql.PrivateLinkServiceConnectionStateStatusApproved), // }, // ProvisioningState: to.Ptr(armsql.PrivateEndpointProvisioningState("Succeeded")), // }, // }}, // PublicNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // RestrictOutboundNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // State: to.Ptr("Ready"), // Version: to.Ptr("12.0"), // WorkspaceFeature: to.Ptr(armsql.ServerWorkspaceFeatureConnected), // }, // } }
Output:
func (*ServersClient) NewListByResourceGroupPager ¶ added in v0.5.0
func (client *ServersClient) NewListByResourceGroupPager(resourceGroupName string, options *ServersClientListByResourceGroupOptions) *runtime.Pager[ServersClientListByResourceGroupResponse]
NewListByResourceGroupPager - Gets a list of servers in a resource groups.
Generated from API version 2021-02-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- options - ServersClientListByResourceGroupOptions contains the optional parameters for the ServersClient.NewListByResourceGroupPager method.
Example (ListServersByResourceGroup) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServersClient().NewListByResourceGroupPager("sqlcrudtest-7398", &armsql.ServersClientListByResourceGroupOptions{Expand: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ServerListResult = armsql.ServerListResult{ // Value: []*armsql.Server{ // { // Name: to.Ptr("sqlcrudtest-4645"), // Type: to.Ptr("Microsoft.Sql/servers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645"), // Location: to.Ptr("japaneast"), // Kind: to.Ptr("v12.0"), // Properties: &armsql.ServerProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // FullyQualifiedDomainName: to.Ptr("sqlcrudtest-4645.database.windows.net"), // PrivateEndpointConnections: []*armsql.ServerPrivateEndpointConnection{ // { // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444"), // Properties: &armsql.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armsql.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"), // }, // PrivateLinkServiceConnectionState: &armsql.PrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Auto-approved"), // ActionsRequired: to.Ptr(armsql.PrivateLinkServiceConnectionStateActionsRequireNone), // Status: to.Ptr(armsql.PrivateLinkServiceConnectionStateStatusApproved), // }, // ProvisioningState: to.Ptr(armsql.PrivateEndpointProvisioningState("Succeeded")), // }, // }}, // PublicNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // RestrictOutboundNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // State: to.Ptr("Ready"), // Version: to.Ptr("12.0"), // WorkspaceFeature: to.Ptr(armsql.ServerWorkspaceFeatureConnected), // }, // }, // { // Name: to.Ptr("sqlcrudtest-6661"), // Type: to.Ptr("Microsoft.Sql/servers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-6661"), // Location: to.Ptr("japaneast"), // Kind: to.Ptr("v12.0"), // Properties: &armsql.ServerProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // FullyQualifiedDomainName: to.Ptr("sqlcrudtest-6661.database.windows.net"), // PrivateEndpointConnections: []*armsql.ServerPrivateEndpointConnection{ // { // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444"), // Properties: &armsql.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armsql.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"), // }, // PrivateLinkServiceConnectionState: &armsql.PrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Auto-approved"), // ActionsRequired: to.Ptr(armsql.PrivateLinkServiceConnectionStateActionsRequireNone), // Status: to.Ptr(armsql.PrivateLinkServiceConnectionStateStatusApproved), // }, // ProvisioningState: to.Ptr(armsql.PrivateEndpointProvisioningState("Succeeded")), // }, // }}, // PublicNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // RestrictOutboundNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // State: to.Ptr("Ready"), // Version: to.Ptr("12.0"), // WorkspaceFeature: to.Ptr(armsql.ServerWorkspaceFeatureConnected), // }, // }}, // } } }
Output:
Example (ListServersByResourceGroupWithExpandAdministrators) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerListByResourceGroupWithExpandEqualsAdministrators.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServersClient().NewListByResourceGroupPager("sqlcrudtest-7398", &armsql.ServersClientListByResourceGroupOptions{Expand: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ServerListResult = armsql.ServerListResult{ // Value: []*armsql.Server{ // { // Name: to.Ptr("sqlcrudtest-4645"), // Type: to.Ptr("Microsoft.Sql/servers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645"), // Location: to.Ptr("japaneast"), // Kind: to.Ptr("v12.0"), // Properties: &armsql.ServerProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // Administrators: &armsql.ServerExternalAdministrator{ // AzureADOnlyAuthentication: to.Ptr(true), // Login: to.Ptr("bob@contoso.com"), // PrincipalType: to.Ptr(armsql.PrincipalTypeUser), // Sid: to.Ptr("00000011-1111-2222-2222-123456789111"), // TenantID: to.Ptr("00000011-1111-2222-2222-123456789111"), // }, // FullyQualifiedDomainName: to.Ptr("sqlcrudtest-4645.database.windows.net"), // PrivateEndpointConnections: []*armsql.ServerPrivateEndpointConnection{ // { // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444"), // Properties: &armsql.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armsql.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"), // }, // PrivateLinkServiceConnectionState: &armsql.PrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Auto-approved"), // ActionsRequired: to.Ptr(armsql.PrivateLinkServiceConnectionStateActionsRequireNone), // Status: to.Ptr(armsql.PrivateLinkServiceConnectionStateStatusApproved), // }, // ProvisioningState: to.Ptr(armsql.PrivateEndpointProvisioningState("Succeeded")), // }, // }}, // PublicNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // RestrictOutboundNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // State: to.Ptr("Ready"), // Version: to.Ptr("12.0"), // WorkspaceFeature: to.Ptr(armsql.ServerWorkspaceFeatureConnected), // }, // }, // { // Name: to.Ptr("sqlcrudtest-6661"), // Type: to.Ptr("Microsoft.Sql/servers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-6661"), // Location: to.Ptr("japaneast"), // Kind: to.Ptr("v12.0"), // Properties: &armsql.ServerProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // Administrators: &armsql.ServerExternalAdministrator{ // AzureADOnlyAuthentication: to.Ptr(true), // Login: to.Ptr("bob@contoso.com"), // PrincipalType: to.Ptr(armsql.PrincipalTypeUser), // Sid: to.Ptr("00000011-1111-2222-2222-123456789111"), // TenantID: to.Ptr("00000011-1111-2222-2222-123456789111"), // }, // FullyQualifiedDomainName: to.Ptr("sqlcrudtest-6661.database.windows.net"), // PrivateEndpointConnections: []*armsql.ServerPrivateEndpointConnection{ // { // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444"), // Properties: &armsql.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armsql.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"), // }, // PrivateLinkServiceConnectionState: &armsql.PrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Auto-approved"), // ActionsRequired: to.Ptr(armsql.PrivateLinkServiceConnectionStateActionsRequireNone), // Status: to.Ptr(armsql.PrivateLinkServiceConnectionStateStatusApproved), // }, // ProvisioningState: to.Ptr(armsql.PrivateEndpointProvisioningState("Succeeded")), // }, // }}, // PublicNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // RestrictOutboundNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // State: to.Ptr("Ready"), // Version: to.Ptr("12.0"), // WorkspaceFeature: to.Ptr(armsql.ServerWorkspaceFeatureConnected), // }, // }}, // } } }
Output:
func (*ServersClient) NewListPager ¶ added in v0.5.0
func (client *ServersClient) NewListPager(options *ServersClientListOptions) *runtime.Pager[ServersClientListResponse]
NewListPager - Gets a list of all servers in the subscription.
Generated from API version 2021-02-01-preview
- options - ServersClientListOptions contains the optional parameters for the ServersClient.NewListPager method.
Example (ListServers) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServersClient().NewListPager(&armsql.ServersClientListOptions{Expand: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ServerListResult = armsql.ServerListResult{ // Value: []*armsql.Server{ // { // Name: to.Ptr("sqlcrudtest-4645"), // Type: to.Ptr("Microsoft.Sql/servers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645"), // Location: to.Ptr("japaneast"), // Kind: to.Ptr("v12.0"), // Properties: &armsql.ServerProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // FullyQualifiedDomainName: to.Ptr("sqlcrudtest-4645.database.windows.net"), // PrivateEndpointConnections: []*armsql.ServerPrivateEndpointConnection{ // { // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444"), // Properties: &armsql.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armsql.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"), // }, // PrivateLinkServiceConnectionState: &armsql.PrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Auto-approved"), // ActionsRequired: to.Ptr(armsql.PrivateLinkServiceConnectionStateActionsRequireNone), // Status: to.Ptr(armsql.PrivateLinkServiceConnectionStateStatusApproved), // }, // ProvisioningState: to.Ptr(armsql.PrivateEndpointProvisioningState("Succeeded")), // }, // }}, // PublicNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // RestrictOutboundNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // State: to.Ptr("Ready"), // Version: to.Ptr("12.0"), // WorkspaceFeature: to.Ptr(armsql.ServerWorkspaceFeatureConnected), // }, // }, // { // Name: to.Ptr("sqlcrudtest-6661"), // Type: to.Ptr("Microsoft.Sql/servers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-6661"), // Location: to.Ptr("japaneast"), // Kind: to.Ptr("v12.0"), // Properties: &armsql.ServerProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // FullyQualifiedDomainName: to.Ptr("sqlcrudtest-6661.database.windows.net"), // PrivateEndpointConnections: []*armsql.ServerPrivateEndpointConnection{ // { // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444"), // Properties: &armsql.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armsql.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"), // }, // PrivateLinkServiceConnectionState: &armsql.PrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Auto-approved"), // ActionsRequired: to.Ptr(armsql.PrivateLinkServiceConnectionStateActionsRequireNone), // Status: to.Ptr(armsql.PrivateLinkServiceConnectionStateStatusApproved), // }, // ProvisioningState: to.Ptr(armsql.PrivateEndpointProvisioningState("Succeeded")), // }, // }}, // PublicNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // RestrictOutboundNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // State: to.Ptr("Ready"), // Version: to.Ptr("12.0"), // WorkspaceFeature: to.Ptr(armsql.ServerWorkspaceFeatureConnected), // }, // }}, // } } }
Output:
Example (ListServersWithExpandEqualsAdministrators) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerListWithExpandEqualsAdministrators.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServersClient().NewListPager(&armsql.ServersClientListOptions{Expand: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ServerListResult = armsql.ServerListResult{ // Value: []*armsql.Server{ // { // Name: to.Ptr("sqlcrudtest-4645"), // Type: to.Ptr("Microsoft.Sql/servers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645"), // Location: to.Ptr("japaneast"), // Kind: to.Ptr("v12.0"), // Properties: &armsql.ServerProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // Administrators: &armsql.ServerExternalAdministrator{ // AzureADOnlyAuthentication: to.Ptr(true), // Login: to.Ptr("bob@contoso.com"), // PrincipalType: to.Ptr(armsql.PrincipalTypeUser), // Sid: to.Ptr("00000011-1111-2222-2222-123456789111"), // TenantID: to.Ptr("00000011-1111-2222-2222-123456789111"), // }, // FullyQualifiedDomainName: to.Ptr("sqlcrudtest-4645.database.windows.net"), // PrivateEndpointConnections: []*armsql.ServerPrivateEndpointConnection{ // { // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444"), // Properties: &armsql.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armsql.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"), // }, // PrivateLinkServiceConnectionState: &armsql.PrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Auto-approved"), // ActionsRequired: to.Ptr(armsql.PrivateLinkServiceConnectionStateActionsRequireNone), // Status: to.Ptr(armsql.PrivateLinkServiceConnectionStateStatusApproved), // }, // ProvisioningState: to.Ptr(armsql.PrivateEndpointProvisioningState("Succeeded")), // }, // }}, // PublicNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // RestrictOutboundNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // State: to.Ptr("Ready"), // Version: to.Ptr("12.0"), // WorkspaceFeature: to.Ptr(armsql.ServerWorkspaceFeatureConnected), // }, // }, // { // Name: to.Ptr("sqlcrudtest-6661"), // Type: to.Ptr("Microsoft.Sql/servers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-6661"), // Location: to.Ptr("japaneast"), // Kind: to.Ptr("v12.0"), // Properties: &armsql.ServerProperties{ // AdministratorLogin: to.Ptr("dummylogin"), // Administrators: &armsql.ServerExternalAdministrator{ // AzureADOnlyAuthentication: to.Ptr(true), // Login: to.Ptr("bob@contoso.com"), // PrincipalType: to.Ptr(armsql.PrincipalTypeUser), // Sid: to.Ptr("00000011-1111-2222-2222-123456789111"), // TenantID: to.Ptr("00000011-1111-2222-2222-123456789111"), // }, // FullyQualifiedDomainName: to.Ptr("sqlcrudtest-6661.database.windows.net"), // PrivateEndpointConnections: []*armsql.ServerPrivateEndpointConnection{ // { // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444"), // Properties: &armsql.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armsql.PrivateEndpointProperty{ // ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"), // }, // PrivateLinkServiceConnectionState: &armsql.PrivateLinkServiceConnectionStateProperty{ // Description: to.Ptr("Auto-approved"), // ActionsRequired: to.Ptr(armsql.PrivateLinkServiceConnectionStateActionsRequireNone), // Status: to.Ptr(armsql.PrivateLinkServiceConnectionStateStatusApproved), // }, // ProvisioningState: to.Ptr(armsql.PrivateEndpointProvisioningState("Succeeded")), // }, // }}, // PublicNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // RestrictOutboundNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // State: to.Ptr("Ready"), // Version: to.Ptr("12.0"), // WorkspaceFeature: to.Ptr(armsql.ServerWorkspaceFeatureConnected), // }, // }}, // } } }
Output:
type ServersClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ServersClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServersClientBeginCreateOrUpdateOptions contains the optional parameters for the ServersClient.BeginCreateOrUpdate method.
type ServersClientBeginDeleteOptions ¶ added in v0.3.0
type ServersClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServersClientBeginDeleteOptions contains the optional parameters for the ServersClient.BeginDelete method.
type ServersClientBeginImportDatabaseOptions ¶ added in v0.3.0
type ServersClientBeginImportDatabaseOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServersClientBeginImportDatabaseOptions contains the optional parameters for the ServersClient.BeginImportDatabase method.
type ServersClientBeginUpdateOptions ¶ added in v0.3.0
type ServersClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServersClientBeginUpdateOptions contains the optional parameters for the ServersClient.BeginUpdate method.
type ServersClientCheckNameAvailabilityOptions ¶ added in v0.3.0
type ServersClientCheckNameAvailabilityOptions struct { }
ServersClientCheckNameAvailabilityOptions contains the optional parameters for the ServersClient.CheckNameAvailability method.
type ServersClientCheckNameAvailabilityResponse ¶ added in v0.3.0
type ServersClientCheckNameAvailabilityResponse struct { // The result of a name availability check. CheckNameAvailabilityResponse }
ServersClientCheckNameAvailabilityResponse contains the response from method ServersClient.CheckNameAvailability.
type ServersClientCreateOrUpdateResponse ¶ added in v0.3.0
type ServersClientCreateOrUpdateResponse struct { // An Azure SQL Database server. Server }
ServersClientCreateOrUpdateResponse contains the response from method ServersClient.BeginCreateOrUpdate.
type ServersClientDeleteResponse ¶ added in v0.3.0
type ServersClientDeleteResponse struct { }
ServersClientDeleteResponse contains the response from method ServersClient.BeginDelete.
type ServersClientGetOptions ¶ added in v0.3.0
type ServersClientGetOptions struct { // The child resources to include in the response. Expand *string }
ServersClientGetOptions contains the optional parameters for the ServersClient.Get method.
type ServersClientGetResponse ¶ added in v0.3.0
type ServersClientGetResponse struct { // An Azure SQL Database server. Server }
ServersClientGetResponse contains the response from method ServersClient.Get.
type ServersClientImportDatabaseResponse ¶ added in v0.3.0
type ServersClientImportDatabaseResponse struct { // An ImportExport operation result resource. ImportExportOperationResult }
ServersClientImportDatabaseResponse contains the response from method ServersClient.BeginImportDatabase.
type ServersClientListByResourceGroupOptions ¶ added in v0.3.0
type ServersClientListByResourceGroupOptions struct { // The child resources to include in the response. Expand *string }
ServersClientListByResourceGroupOptions contains the optional parameters for the ServersClient.NewListByResourceGroupPager method.
type ServersClientListByResourceGroupResponse ¶ added in v0.3.0
type ServersClientListByResourceGroupResponse struct { // A list of servers. ServerListResult }
ServersClientListByResourceGroupResponse contains the response from method ServersClient.NewListByResourceGroupPager.
type ServersClientListOptions ¶ added in v0.3.0
type ServersClientListOptions struct { // The child resources to include in the response. Expand *string }
ServersClientListOptions contains the optional parameters for the ServersClient.NewListPager method.
type ServersClientListResponse ¶ added in v0.3.0
type ServersClientListResponse struct { // A list of servers. ServerListResult }
ServersClientListResponse contains the response from method ServersClient.NewListPager.
type ServersClientUpdateResponse ¶ added in v0.3.0
type ServersClientUpdateResponse struct { // An Azure SQL Database server. Server }
ServersClientUpdateResponse contains the response from method ServersClient.BeginUpdate.
type ServiceObjective ¶
type ServiceObjective struct { // Represents the properties of the resource. Properties *ServiceObjectiveProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ServiceObjective - Represents a database service objective.
func (ServiceObjective) MarshalJSON ¶
func (s ServiceObjective) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceObjective.
func (*ServiceObjective) UnmarshalJSON ¶ added in v1.1.0
func (s *ServiceObjective) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceObjective.
type ServiceObjectiveCapability ¶
type ServiceObjectiveCapability struct { // The reason for the capability not being available. Reason *string // READ-ONLY; The compute model ComputeModel *string // READ-ONLY; The unique ID of the service objective. ID *string // READ-ONLY; The included (free) max size. IncludedMaxSize *MaxSizeCapability // READ-ONLY; The service objective name. Name *string // READ-ONLY; The performance level. PerformanceLevel *PerformanceLevelCapability // READ-ONLY; The sku. SKU *SKU // READ-ONLY; The status of the capability. Status *CapabilityStatus // READ-ONLY; Supported time range for auto pause delay SupportedAutoPauseDelay *AutoPauseDelayTimeRange // READ-ONLY; List of supported license types. SupportedLicenseTypes []*LicenseTypeCapability // READ-ONLY; List of supported maintenance configurations SupportedMaintenanceConfigurations []*MaintenanceConfigurationCapability // READ-ONLY; The list of supported maximum database sizes. SupportedMaxSizes []*MaxSizeRangeCapability // READ-ONLY; List of supported min capacities SupportedMinCapacities []*MinCapacityCapability // READ-ONLY; Whether or not zone redundancy is supported for the service objective. ZoneRedundant *bool }
ServiceObjectiveCapability - The service objectives capability.
func (ServiceObjectiveCapability) MarshalJSON ¶
func (s ServiceObjectiveCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceObjectiveCapability.
func (*ServiceObjectiveCapability) UnmarshalJSON ¶ added in v1.1.0
func (s *ServiceObjectiveCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceObjectiveCapability.
type ServiceObjectiveListResult ¶
type ServiceObjectiveListResult struct { // REQUIRED; The list of database service objectives. Value []*ServiceObjective }
ServiceObjectiveListResult - Represents the response to a get database service objectives request.
func (ServiceObjectiveListResult) MarshalJSON ¶
func (s ServiceObjectiveListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceObjectiveListResult.
func (*ServiceObjectiveListResult) UnmarshalJSON ¶ added in v1.1.0
func (s *ServiceObjectiveListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceObjectiveListResult.
type ServiceObjectiveName ¶
type ServiceObjectiveName string
ServiceObjectiveName - The serviceLevelObjective for SLO usage metric.
const ( ServiceObjectiveNameBasic ServiceObjectiveName = "Basic" ServiceObjectiveNameDS100 ServiceObjectiveName = "DS100" ServiceObjectiveNameDS1000 ServiceObjectiveName = "DS1000" ServiceObjectiveNameDS1200 ServiceObjectiveName = "DS1200" ServiceObjectiveNameDS1500 ServiceObjectiveName = "DS1500" ServiceObjectiveNameDS200 ServiceObjectiveName = "DS200" ServiceObjectiveNameDS2000 ServiceObjectiveName = "DS2000" ServiceObjectiveNameDS300 ServiceObjectiveName = "DS300" ServiceObjectiveNameDS400 ServiceObjectiveName = "DS400" ServiceObjectiveNameDS500 ServiceObjectiveName = "DS500" ServiceObjectiveNameDS600 ServiceObjectiveName = "DS600" ServiceObjectiveNameDW100 ServiceObjectiveName = "DW100" ServiceObjectiveNameDW1000 ServiceObjectiveName = "DW1000" ServiceObjectiveNameDW10000C ServiceObjectiveName = "DW10000c" ServiceObjectiveNameDW1000C ServiceObjectiveName = "DW1000c" ServiceObjectiveNameDW1200 ServiceObjectiveName = "DW1200" ServiceObjectiveNameDW1500 ServiceObjectiveName = "DW1500" ServiceObjectiveNameDW15000C ServiceObjectiveName = "DW15000c" ServiceObjectiveNameDW1500C ServiceObjectiveName = "DW1500c" ServiceObjectiveNameDW200 ServiceObjectiveName = "DW200" ServiceObjectiveNameDW2000 ServiceObjectiveName = "DW2000" ServiceObjectiveNameDW2000C ServiceObjectiveName = "DW2000c" ServiceObjectiveNameDW2500C ServiceObjectiveName = "DW2500c" ServiceObjectiveNameDW300 ServiceObjectiveName = "DW300" ServiceObjectiveNameDW3000 ServiceObjectiveName = "DW3000" ServiceObjectiveNameDW30000C ServiceObjectiveName = "DW30000c" ServiceObjectiveNameDW3000C ServiceObjectiveName = "DW3000c" ServiceObjectiveNameDW400 ServiceObjectiveName = "DW400" ServiceObjectiveNameDW500 ServiceObjectiveName = "DW500" ServiceObjectiveNameDW5000C ServiceObjectiveName = "DW5000c" ServiceObjectiveNameDW600 ServiceObjectiveName = "DW600" ServiceObjectiveNameDW6000 ServiceObjectiveName = "DW6000" ServiceObjectiveNameDW6000C ServiceObjectiveName = "DW6000c" ServiceObjectiveNameDW7500C ServiceObjectiveName = "DW7500c" ServiceObjectiveNameElasticPool ServiceObjectiveName = "ElasticPool" ServiceObjectiveNameFree ServiceObjectiveName = "Free" ServiceObjectiveNameP1 ServiceObjectiveName = "P1" ServiceObjectiveNameP11 ServiceObjectiveName = "P11" ServiceObjectiveNameP15 ServiceObjectiveName = "P15" ServiceObjectiveNameP2 ServiceObjectiveName = "P2" ServiceObjectiveNameP3 ServiceObjectiveName = "P3" ServiceObjectiveNameP4 ServiceObjectiveName = "P4" ServiceObjectiveNameP6 ServiceObjectiveName = "P6" ServiceObjectiveNamePRS1 ServiceObjectiveName = "PRS1" ServiceObjectiveNamePRS2 ServiceObjectiveName = "PRS2" ServiceObjectiveNamePRS4 ServiceObjectiveName = "PRS4" ServiceObjectiveNamePRS6 ServiceObjectiveName = "PRS6" ServiceObjectiveNameS0 ServiceObjectiveName = "S0" ServiceObjectiveNameS1 ServiceObjectiveName = "S1" ServiceObjectiveNameS12 ServiceObjectiveName = "S12" ServiceObjectiveNameS2 ServiceObjectiveName = "S2" ServiceObjectiveNameS3 ServiceObjectiveName = "S3" ServiceObjectiveNameS4 ServiceObjectiveName = "S4" ServiceObjectiveNameS6 ServiceObjectiveName = "S6" ServiceObjectiveNameS7 ServiceObjectiveName = "S7" ServiceObjectiveNameS9 ServiceObjectiveName = "S9" ServiceObjectiveNameSystem ServiceObjectiveName = "System" ServiceObjectiveNameSystem0 ServiceObjectiveName = "System0" ServiceObjectiveNameSystem1 ServiceObjectiveName = "System1" ServiceObjectiveNameSystem2 ServiceObjectiveName = "System2" ServiceObjectiveNameSystem2L ServiceObjectiveName = "System2L" ServiceObjectiveNameSystem3 ServiceObjectiveName = "System3" ServiceObjectiveNameSystem3L ServiceObjectiveName = "System3L" ServiceObjectiveNameSystem4 ServiceObjectiveName = "System4" ServiceObjectiveNameSystem4L ServiceObjectiveName = "System4L" )
func PossibleServiceObjectiveNameValues ¶
func PossibleServiceObjectiveNameValues() []ServiceObjectiveName
PossibleServiceObjectiveNameValues returns the possible values for the ServiceObjectiveName const type.
type ServiceObjectiveProperties ¶
type ServiceObjectiveProperties struct { // READ-ONLY; The description for the service level objective. Description *string // READ-ONLY; Gets whether the service level objective is enabled. Enabled *bool // READ-ONLY; Gets whether the service level objective is the default service objective. IsDefault *bool // READ-ONLY; Gets whether the service level objective is a system service objective. IsSystem *bool // READ-ONLY; The name for the service objective. ServiceObjectiveName *string }
ServiceObjectiveProperties - Represents the properties of a database service objective.
func (ServiceObjectiveProperties) MarshalJSON ¶ added in v1.1.0
func (s ServiceObjectiveProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceObjectiveProperties.
func (*ServiceObjectiveProperties) UnmarshalJSON ¶ added in v1.1.0
func (s *ServiceObjectiveProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServiceObjectiveProperties.
type ServiceObjectivesClient ¶
type ServiceObjectivesClient struct {
// contains filtered or unexported fields
}
ServiceObjectivesClient contains the methods for the ServiceObjectives group. Don't use this type directly, use NewServiceObjectivesClient() instead.
func NewServiceObjectivesClient ¶
func NewServiceObjectivesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceObjectivesClient, error)
NewServiceObjectivesClient creates a new instance of ServiceObjectivesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ServiceObjectivesClient) Get ¶
func (client *ServiceObjectivesClient) Get(ctx context.Context, resourceGroupName string, serverName string, serviceObjectiveName string, options *ServiceObjectivesClientGetOptions) (ServiceObjectivesClientGetResponse, error)
Get - Gets a database service objective. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2014-04-01
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- serviceObjectiveName - The name of the service objective to retrieve.
- options - ServiceObjectivesClientGetOptions contains the optional parameters for the ServiceObjectivesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ServiceObjectiveGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewServiceObjectivesClient().Get(ctx, "group1", "sqlcrudtest", "29dd7459-4a7c-4e56-be22-f0adda49440d", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ServiceObjective = armsql.ServiceObjective{ // Name: to.Ptr("29dd7459-4a7c-4e56-be22-f0adda49440d"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/serviceObjectives/29dd7459-4a7c-4e56-be22-f0adda49440d"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(false), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(true), // ServiceObjectiveName: to.Ptr("System0"), // }, // } }
Output:
func (*ServiceObjectivesClient) NewListByServerPager ¶ added in v0.5.0
func (client *ServiceObjectivesClient) NewListByServerPager(resourceGroupName string, serverName string, options *ServiceObjectivesClientListByServerOptions) *runtime.Pager[ServiceObjectivesClientListByServerResponse]
NewListByServerPager - Returns database service objectives.
Generated from API version 2014-04-01
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - ServiceObjectivesClientListByServerOptions contains the optional parameters for the ServiceObjectivesClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ServiceObjectiveList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewServiceObjectivesClient().NewListByServerPager("group1", "sqlcrudtest", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ServiceObjectiveListResult = armsql.ServiceObjectiveListResult{ // Value: []*armsql.ServiceObjective{ // { // Name: to.Ptr("26e021db-f1f9-4c98-84c6-92af8ef433d7"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/26e021db-f1f9-4c98-84c6-92af8ef433d7"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(false), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(true), // ServiceObjectiveName: to.Ptr("System"), // }, // }, // { // Name: to.Ptr("29dd7459-4a7c-4e56-be22-f0adda49440d"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/29dd7459-4a7c-4e56-be22-f0adda49440d"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(false), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(true), // ServiceObjectiveName: to.Ptr("System0"), // }, // }, // { // Name: to.Ptr("c99ac918-dbea-463f-a475-16ec020fdc12"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/c99ac918-dbea-463f-a475-16ec020fdc12"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(false), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(true), // ServiceObjectiveName: to.Ptr("System1"), // }, // }, // { // Name: to.Ptr("620323bf-2879-4807-b30d-c2e6d7b3b3aa"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/620323bf-2879-4807-b30d-c2e6d7b3b3aa"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(false), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(true), // ServiceObjectiveName: to.Ptr("System2"), // }, // }, // { // Name: to.Ptr("33d0db1f-6893-4210-99f9-463fb9b496a4"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/33d0db1f-6893-4210-99f9-463fb9b496a4"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(false), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(true), // ServiceObjectiveName: to.Ptr("System3"), // }, // }, // { // Name: to.Ptr("da24338c-a6c9-46c2-a4bf-4ac95b496ae4"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/da24338c-a6c9-46c2-a4bf-4ac95b496ae4"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(false), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(true), // ServiceObjectiveName: to.Ptr("System4"), // }, // }, // { // Name: to.Ptr("53f7fa1b-b0d0-43d6-bc29-c5f059fb36e9"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/53f7fa1b-b0d0-43d6-bc29-c5f059fb36e9"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(false), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(true), // ServiceObjectiveName: to.Ptr("System2L"), // }, // }, // { // Name: to.Ptr("e79cd55c-689f-48d9-bffa-0dd12c772248"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/e79cd55c-689f-48d9-bffa-0dd12c772248"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(false), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(true), // ServiceObjectiveName: to.Ptr("System3L"), // }, // }, // { // Name: to.Ptr("4b37bb6d-e004-47ac-8f7a-be56ac9fb490"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/4b37bb6d-e004-47ac-8f7a-be56ac9fb490"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(false), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(true), // ServiceObjectiveName: to.Ptr("System4L"), // }, // }, // { // Name: to.Ptr("6aa3bb3e-7f50-40d6-95ef-5497c30d99d8"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/6aa3bb3e-7f50-40d6-95ef-5497c30d99d8"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(true), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("Free"), // }, // }, // { // Name: to.Ptr("dd6d99bb-f193-4ec1-86f2-43d3bccbc49c"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/dd6d99bb-f193-4ec1-86f2-43d3bccbc49c"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(true), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("Basic"), // }, // }, // { // Name: to.Ptr("f1173c43-91bd-4aaa-973c-54e79e15235b"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/f1173c43-91bd-4aaa-973c-54e79e15235b"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(true), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("S0"), // }, // }, // { // Name: to.Ptr("1b1ebd4d-d903-4baa-97f9-4ea675f5e928"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/1b1ebd4d-d903-4baa-97f9-4ea675f5e928"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("S1"), // }, // }, // { // Name: to.Ptr("455330e1-00cd-488b-b5fa-177c226f28b7"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/455330e1-00cd-488b-b5fa-177c226f28b7"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("S2"), // }, // }, // { // Name: to.Ptr("789681b8-ca10-4eb0-bdf2-e0b050601b40"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/789681b8-ca10-4eb0-bdf2-e0b050601b40"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("S3"), // }, // }, // { // Name: to.Ptr("7203483a-c4fb-4304-9e9f-17c71c904f5d"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/7203483a-c4fb-4304-9e9f-17c71c904f5d"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(true), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("P1"), // }, // }, // { // Name: to.Ptr("a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/a7d1b92d-c987-4375-b54d-2b1d0e0f5bb0"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("P2"), // }, // }, // { // Name: to.Ptr("afe1eee1-1f12-4e5f-9ad6-2de9c12cb4dc"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/afe1eee1-1f12-4e5f-9ad6-2de9c12cb4dc"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("P4"), // }, // }, // { // Name: to.Ptr("43940481-9191-475a-9dba-6b505615b9aa"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/43940481-9191-475a-9dba-6b505615b9aa"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("P6"), // }, // }, // { // Name: to.Ptr("dd00d544-bbc0-4f61-ba60-cdce0c410288"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/dd00d544-bbc0-4f61-ba60-cdce0c410288"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("P11"), // }, // }, // { // Name: to.Ptr("5bc86cca-9a96-4a94-90ef-bbdfcfbf2d71"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/5bc86cca-9a96-4a94-90ef-bbdfcfbf2d71"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("P15"), // }, // }, // { // Name: to.Ptr("dfdc102c-ed02-4349-9756-e227f0e43bb8"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/dfdc102c-ed02-4349-9756-e227f0e43bb8"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(true), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("PRS1"), // }, // }, // { // Name: to.Ptr("a089506e-b47a-4f42-8a32-cc19af4c86fb"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/a089506e-b47a-4f42-8a32-cc19af4c86fb"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("PRS2"), // }, // }, // { // Name: to.Ptr("39cb8faf-cba8-4b1b-b580-1e1202f2a024"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/39cb8faf-cba8-4b1b-b580-1e1202f2a024"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("PRS4"), // }, // }, // { // Name: to.Ptr("1e8da92e-efcd-4682-9140-bf6582120d1f"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/1e8da92e-efcd-4682-9140-bf6582120d1f"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("PRS6"), // }, // }, // { // Name: to.Ptr("4e63cb0e-91b9-46fd-b05c-51fdd2367618"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/4e63cb0e-91b9-46fd-b05c-51fdd2367618"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(true), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("DW100"), // }, // }, // { // Name: to.Ptr("99e78a92-d724-4e1b-857b-2be661f3d153"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/99e78a92-d724-4e1b-857b-2be661f3d153"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("DW200"), // }, // }, // { // Name: to.Ptr("284f1aff-fee7-4d3b-a211-5b8ebdd28fea"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/284f1aff-fee7-4d3b-a211-5b8ebdd28fea"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("DW300"), // }, // }, // { // Name: to.Ptr("3bdaeefe-8a9d-41d3-91c4-46ef896b19af"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/3bdaeefe-8a9d-41d3-91c4-46ef896b19af"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("DW400"), // }, // }, // { // Name: to.Ptr("5f759b78-8ec0-4dfb-97cc-c1455a3b5b4d"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/5f759b78-8ec0-4dfb-97cc-c1455a3b5b4d"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("DW500"), // }, // }, // { // Name: to.Ptr("efd65c5b-af7b-4389-9109-f6a69d6a3885"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/efd65c5b-af7b-4389-9109-f6a69d6a3885"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("DW600"), // }, // }, // { // Name: to.Ptr("b89b9c6a-4ec2-4eb8-99db-6d2807e6aabb"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/b89b9c6a-4ec2-4eb8-99db-6d2807e6aabb"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("DW1000"), // }, // }, // { // Name: to.Ptr("9a7a374e-b95c-4fd5-a68e-131d60796c47"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/9a7a374e-b95c-4fd5-a68e-131d60796c47"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("DW1200"), // }, // }, // { // Name: to.Ptr("b930f58e-86b5-43e0-a2da-d8bf8769c557"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/b930f58e-86b5-43e0-a2da-d8bf8769c557"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("DW1500"), // }, // }, // { // Name: to.Ptr("99165ede-a5ab-4b52-b317-e391d92ec370"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/99165ede-a5ab-4b52-b317-e391d92ec370"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("DW2000"), // }, // }, // { // Name: to.Ptr("8e28c923-5cf2-43cb-bd25-28c8c69b30ff"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/8e28c923-5cf2-43cb-bd25-28c8c69b30ff"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("DW3000"), // }, // }, // { // Name: to.Ptr("ee1df062-4f3c-42ad-91bf-58b2a7c351e4"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/ee1df062-4f3c-42ad-91bf-58b2a7c351e4"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("DW6000"), // }, // }, // { // Name: to.Ptr("9cfc850f-d57f-4760-b5a6-bb640d268bf0"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/9cfc850f-d57f-4760-b5a6-bb640d268bf0"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(true), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("DS100"), // }, // }, // { // Name: to.Ptr("053407ef-f01c-46f4-b829-96e01a14f449"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/053407ef-f01c-46f4-b829-96e01a14f449"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("DS200"), // }, // }, // { // Name: to.Ptr("013a9e10-cafc-45a8-8fcf-93095655d2ce"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/013a9e10-cafc-45a8-8fcf-93095655d2ce"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("DS300"), // }, // }, // { // Name: to.Ptr("79f61db4-8c10-46ba-a93a-d7d02dddd61c"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/79f61db4-8c10-46ba-a93a-d7d02dddd61c"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("DS400"), // }, // }, // { // Name: to.Ptr("44eaac33-df00-4ef4-a2bb-f7ff87899eea"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/44eaac33-df00-4ef4-a2bb-f7ff87899eea"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("DS500"), // }, // }, // { // Name: to.Ptr("f8e0f3a6-888b-459c-a9dd-d74d8b2b0e72"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/f8e0f3a6-888b-459c-a9dd-d74d8b2b0e72"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("DS600"), // }, // }, // { // Name: to.Ptr("b9ed8f51-a414-42dc-8348-e4a1de25e12b"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/b9ed8f51-a414-42dc-8348-e4a1de25e12b"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("DS1000"), // }, // }, // { // Name: to.Ptr("07479569-6d70-47a5-8db6-0af55d34f2c1"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/07479569-6d70-47a5-8db6-0af55d34f2c1"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("DS1200"), // }, // }, // { // Name: to.Ptr("2d79baec-2879-46d5-9f5d-fb70eb004c4e"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/2d79baec-2879-46d5-9f5d-fb70eb004c4e"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("DS1500"), // }, // }, // { // Name: to.Ptr("7fb5389f-6d15-4e0b-9540-fe5ecdfdbeee"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/7fb5389f-6d15-4e0b-9540-fe5ecdfdbeee"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("DS2000"), // }, // }, // { // Name: to.Ptr("d1737d22-a8ea-4de7-9bd0-33395d2a7419"), // Type: to.Ptr("Microsoft.Sql/servers/serviceObjectives"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/serviceObjectives/d1737d22-a8ea-4de7-9bd0-33395d2a7419"), // Properties: &armsql.ServiceObjectiveProperties{ // Enabled: to.Ptr(true), // IsDefault: to.Ptr(false), // IsSystem: to.Ptr(false), // ServiceObjectiveName: to.Ptr("ElasticPool"), // }, // }}, // } } }
Output:
type ServiceObjectivesClientGetOptions ¶ added in v0.3.0
type ServiceObjectivesClientGetOptions struct { }
ServiceObjectivesClientGetOptions contains the optional parameters for the ServiceObjectivesClient.Get method.
type ServiceObjectivesClientGetResponse ¶ added in v0.3.0
type ServiceObjectivesClientGetResponse struct { // Represents a database service objective. ServiceObjective }
ServiceObjectivesClientGetResponse contains the response from method ServiceObjectivesClient.Get.
type ServiceObjectivesClientListByServerOptions ¶ added in v0.3.0
type ServiceObjectivesClientListByServerOptions struct { }
ServiceObjectivesClientListByServerOptions contains the optional parameters for the ServiceObjectivesClient.NewListByServerPager method.
type ServiceObjectivesClientListByServerResponse ¶ added in v0.3.0
type ServiceObjectivesClientListByServerResponse struct { // Represents the response to a get database service objectives request. ServiceObjectiveListResult }
ServiceObjectivesClientListByServerResponse contains the response from method ServiceObjectivesClient.NewListByServerPager.
type ServicePrincipal ¶ added in v0.3.0
type ServicePrincipal struct { // Service principal type. Type *ServicePrincipalType // READ-ONLY; The Azure Active Directory application client id. ClientID *string // READ-ONLY; The Azure Active Directory application object id. PrincipalID *string // READ-ONLY; The Azure Active Directory tenant id. TenantID *string }
ServicePrincipal - The managed instance's service principal configuration for a resource.
func (ServicePrincipal) MarshalJSON ¶ added in v1.1.0
func (s ServicePrincipal) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServicePrincipal.
func (*ServicePrincipal) UnmarshalJSON ¶ added in v1.1.0
func (s *ServicePrincipal) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServicePrincipal.
type ServicePrincipalType ¶ added in v0.3.0
type ServicePrincipalType string
ServicePrincipalType - Service principal type.
const ( ServicePrincipalTypeNone ServicePrincipalType = "None" ServicePrincipalTypeSystemAssigned ServicePrincipalType = "SystemAssigned" )
func PossibleServicePrincipalTypeValues ¶ added in v0.3.0
func PossibleServicePrincipalTypeValues() []ServicePrincipalType
PossibleServicePrincipalTypeValues returns the possible values for the ServicePrincipalType const type.
type ShortTermRetentionPolicyName ¶
type ShortTermRetentionPolicyName string
const (
ShortTermRetentionPolicyNameDefault ShortTermRetentionPolicyName = "default"
)
func PossibleShortTermRetentionPolicyNameValues ¶
func PossibleShortTermRetentionPolicyNameValues() []ShortTermRetentionPolicyName
PossibleShortTermRetentionPolicyNameValues returns the possible values for the ShortTermRetentionPolicyName const type.
type SloUsageMetric ¶
type SloUsageMetric struct { // READ-ONLY; Gets or sets inRangeTimeRatio for SLO usage metric. InRangeTimeRatio *float64 // READ-ONLY; The serviceLevelObjective for SLO usage metric. ServiceLevelObjective *ServiceObjectiveName // READ-ONLY; The serviceLevelObjectiveId for SLO usage metric. ServiceLevelObjectiveID *string }
SloUsageMetric - A Slo Usage Metric.
func (SloUsageMetric) MarshalJSON ¶ added in v1.1.0
func (s SloUsageMetric) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SloUsageMetric.
func (*SloUsageMetric) UnmarshalJSON ¶ added in v1.1.0
func (s *SloUsageMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SloUsageMetric.
type StorageCapability ¶
type StorageCapability struct { // The reason for the capability not being available. Reason *string // READ-ONLY; The status of the capability. Status *CapabilityStatus // READ-ONLY; The storage account type for the database's backups. StorageAccountType *StorageCapabilityStorageAccountType }
StorageCapability - The storage account type capability.
func (StorageCapability) MarshalJSON ¶ added in v1.1.0
func (s StorageCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageCapability.
func (*StorageCapability) UnmarshalJSON ¶ added in v1.1.0
func (s *StorageCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StorageCapability.
type StorageCapabilityStorageAccountType ¶
type StorageCapabilityStorageAccountType string
StorageCapabilityStorageAccountType - The storage account type for the database's backups.
const ( StorageCapabilityStorageAccountTypeGRS StorageCapabilityStorageAccountType = "GRS" StorageCapabilityStorageAccountTypeLRS StorageCapabilityStorageAccountType = "LRS" StorageCapabilityStorageAccountTypeZRS StorageCapabilityStorageAccountType = "ZRS" )
func PossibleStorageCapabilityStorageAccountTypeValues ¶
func PossibleStorageCapabilityStorageAccountTypeValues() []StorageCapabilityStorageAccountType
PossibleStorageCapabilityStorageAccountTypeValues returns the possible values for the StorageCapabilityStorageAccountType const type.
type StorageKeyType ¶
type StorageKeyType string
StorageKeyType - Storage key type.
const ( StorageKeyTypeStorageAccessKey StorageKeyType = "StorageAccessKey" )
func PossibleStorageKeyTypeValues ¶
func PossibleStorageKeyTypeValues() []StorageKeyType
PossibleStorageKeyTypeValues returns the possible values for the StorageKeyType const type.
type SubscriptionUsage ¶
type SubscriptionUsage struct { // Resource properties. Properties *SubscriptionUsageProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
SubscriptionUsage - Usage Metric of a Subscription in a Location.
func (SubscriptionUsage) MarshalJSON ¶
func (s SubscriptionUsage) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SubscriptionUsage.
func (*SubscriptionUsage) UnmarshalJSON ¶ added in v1.1.0
func (s *SubscriptionUsage) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionUsage.
type SubscriptionUsageListResult ¶
type SubscriptionUsageListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*SubscriptionUsage }
SubscriptionUsageListResult - A list of subscription usage metrics in a location.
func (SubscriptionUsageListResult) MarshalJSON ¶
func (s SubscriptionUsageListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SubscriptionUsageListResult.
func (*SubscriptionUsageListResult) UnmarshalJSON ¶ added in v1.1.0
func (s *SubscriptionUsageListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionUsageListResult.
type SubscriptionUsageProperties ¶
type SubscriptionUsageProperties struct { // READ-ONLY; Current value of the metric. CurrentValue *float64 // READ-ONLY; User-readable name of the metric. DisplayName *string // READ-ONLY; Boundary value of the metric. Limit *float64 // READ-ONLY; Unit of the metric. Unit *string }
SubscriptionUsageProperties - Properties of a subscription usage.
func (SubscriptionUsageProperties) MarshalJSON ¶ added in v1.1.0
func (s SubscriptionUsageProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SubscriptionUsageProperties.
func (*SubscriptionUsageProperties) UnmarshalJSON ¶ added in v1.1.0
func (s *SubscriptionUsageProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionUsageProperties.
type SubscriptionUsagesClient ¶
type SubscriptionUsagesClient struct {
// contains filtered or unexported fields
}
SubscriptionUsagesClient contains the methods for the SubscriptionUsages group. Don't use this type directly, use NewSubscriptionUsagesClient() instead.
func NewSubscriptionUsagesClient ¶
func NewSubscriptionUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SubscriptionUsagesClient, error)
NewSubscriptionUsagesClient creates a new instance of SubscriptionUsagesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*SubscriptionUsagesClient) Get ¶
func (client *SubscriptionUsagesClient) Get(ctx context.Context, locationName string, usageName string, options *SubscriptionUsagesClientGetOptions) (SubscriptionUsagesClientGetResponse, error)
Get - Gets a subscription usage metric. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- locationName - The name of the region where the resource is located.
- usageName - Name of usage metric to return.
- options - SubscriptionUsagesClientGetOptions contains the optional parameters for the SubscriptionUsagesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SubscriptionUsageGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSubscriptionUsagesClient().Get(ctx, "WestUS", "ServerQuota", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SubscriptionUsage = armsql.SubscriptionUsage{ // Name: to.Ptr("ServerQuota"), // Type: to.Ptr("Microsoft.Sql/locations/usages"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/Onebox/usages/ServerQuota"), // Properties: &armsql.SubscriptionUsageProperties{ // CurrentValue: to.Ptr[float64](1), // DisplayName: to.Ptr("Regional Server Quota for West US"), // Limit: to.Ptr[float64](20), // Unit: to.Ptr("Count"), // }, // } }
Output:
func (*SubscriptionUsagesClient) NewListByLocationPager ¶ added in v0.5.0
func (client *SubscriptionUsagesClient) NewListByLocationPager(locationName string, options *SubscriptionUsagesClientListByLocationOptions) *runtime.Pager[SubscriptionUsagesClientListByLocationResponse]
NewListByLocationPager - Gets all subscription usage metrics in a given location.
Generated from API version 2020-11-01-preview
- locationName - The name of the region where the resource is located.
- options - SubscriptionUsagesClientListByLocationOptions contains the optional parameters for the SubscriptionUsagesClient.NewListByLocationPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SubscriptionUsageListByLocation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSubscriptionUsagesClient().NewListByLocationPager("WestUS", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SubscriptionUsageListResult = armsql.SubscriptionUsageListResult{ // Value: []*armsql.SubscriptionUsage{ // { // Name: to.Ptr("ServerQuota"), // Type: to.Ptr("Microsoft.Sql/locations/usages"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/Onebox/usages/ServerQuota"), // Properties: &armsql.SubscriptionUsageProperties{ // CurrentValue: to.Ptr[float64](1), // DisplayName: to.Ptr("Regional Server Quota for West US"), // Limit: to.Ptr[float64](20), // Unit: to.Ptr("Count"), // }, // }, // { // Name: to.Ptr("SubscriptionFreeDatabaseCount"), // Type: to.Ptr("Microsoft.Sql/locations/usages"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/Onebox/usages/SubscriptionFreeDatabaseCount"), // Properties: &armsql.SubscriptionUsageProperties{ // CurrentValue: to.Ptr[float64](0), // DisplayName: to.Ptr("Free Database Count per Subscription for West US"), // Limit: to.Ptr[float64](1), // Unit: to.Ptr("Count"), // }, // }, // { // Name: to.Ptr("SubscriptionFreeDatabaseDaysLeft"), // Type: to.Ptr("Microsoft.Sql/locations/usages"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/Onebox/usages/SubscriptionFreeDatabaseDaysLeft"), // Properties: &armsql.SubscriptionUsageProperties{ // CurrentValue: to.Ptr[float64](365), // DisplayName: to.Ptr("Free to Basic Database Upgrade count-down in West US"), // Limit: to.Ptr[float64](365), // Unit: to.Ptr("Count"), // }, // }}, // } } }
Output:
type SubscriptionUsagesClientGetOptions ¶ added in v0.3.0
type SubscriptionUsagesClientGetOptions struct { }
SubscriptionUsagesClientGetOptions contains the optional parameters for the SubscriptionUsagesClient.Get method.
type SubscriptionUsagesClientGetResponse ¶ added in v0.3.0
type SubscriptionUsagesClientGetResponse struct { // Usage Metric of a Subscription in a Location. SubscriptionUsage }
SubscriptionUsagesClientGetResponse contains the response from method SubscriptionUsagesClient.Get.
type SubscriptionUsagesClientListByLocationOptions ¶ added in v0.3.0
type SubscriptionUsagesClientListByLocationOptions struct { }
SubscriptionUsagesClientListByLocationOptions contains the optional parameters for the SubscriptionUsagesClient.NewListByLocationPager method.
type SubscriptionUsagesClientListByLocationResponse ¶ added in v0.3.0
type SubscriptionUsagesClientListByLocationResponse struct { // A list of subscription usage metrics in a location. SubscriptionUsageListResult }
SubscriptionUsagesClientListByLocationResponse contains the response from method SubscriptionUsagesClient.NewListByLocationPager.
type SyncAgent ¶
type SyncAgent struct { // Resource properties. Properties *SyncAgentProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
SyncAgent - An Azure SQL Database sync agent.
func (SyncAgent) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type SyncAgent.
func (*SyncAgent) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type SyncAgent.
type SyncAgentKeyProperties ¶
type SyncAgentKeyProperties struct { // READ-ONLY; Key of sync agent. SyncAgentKey *string }
SyncAgentKeyProperties - Properties of an Azure SQL Database sync agent key.
func (SyncAgentKeyProperties) MarshalJSON ¶ added in v1.1.0
func (s SyncAgentKeyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncAgentKeyProperties.
func (*SyncAgentKeyProperties) UnmarshalJSON ¶ added in v1.1.0
func (s *SyncAgentKeyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SyncAgentKeyProperties.
type SyncAgentLinkedDatabase ¶
type SyncAgentLinkedDatabase struct { // Resource properties. Properties *SyncAgentLinkedDatabaseProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
SyncAgentLinkedDatabase - An Azure SQL Database sync agent linked database.
func (SyncAgentLinkedDatabase) MarshalJSON ¶
func (s SyncAgentLinkedDatabase) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncAgentLinkedDatabase.
func (*SyncAgentLinkedDatabase) UnmarshalJSON ¶ added in v1.1.0
func (s *SyncAgentLinkedDatabase) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SyncAgentLinkedDatabase.
type SyncAgentLinkedDatabaseListResult ¶
type SyncAgentLinkedDatabaseListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*SyncAgentLinkedDatabase }
SyncAgentLinkedDatabaseListResult - A list of sync agent linked databases.
func (SyncAgentLinkedDatabaseListResult) MarshalJSON ¶
func (s SyncAgentLinkedDatabaseListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncAgentLinkedDatabaseListResult.
func (*SyncAgentLinkedDatabaseListResult) UnmarshalJSON ¶ added in v1.1.0
func (s *SyncAgentLinkedDatabaseListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SyncAgentLinkedDatabaseListResult.
type SyncAgentLinkedDatabaseProperties ¶
type SyncAgentLinkedDatabaseProperties struct { // READ-ONLY; Id of the sync agent linked database. DatabaseID *string // READ-ONLY; Database name of the sync agent linked database. DatabaseName *string // READ-ONLY; Type of the sync agent linked database. DatabaseType *SyncMemberDbType // READ-ONLY; Description of the sync agent linked database. Description *string // READ-ONLY; Server name of the sync agent linked database. ServerName *string // READ-ONLY; User name of the sync agent linked database. UserName *string }
SyncAgentLinkedDatabaseProperties - Properties of an Azure SQL Database sync agent linked database.
func (SyncAgentLinkedDatabaseProperties) MarshalJSON ¶ added in v1.1.0
func (s SyncAgentLinkedDatabaseProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncAgentLinkedDatabaseProperties.
func (*SyncAgentLinkedDatabaseProperties) UnmarshalJSON ¶ added in v1.1.0
func (s *SyncAgentLinkedDatabaseProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SyncAgentLinkedDatabaseProperties.
type SyncAgentListResult ¶
type SyncAgentListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*SyncAgent }
SyncAgentListResult - A list of sync agents.
func (SyncAgentListResult) MarshalJSON ¶
func (s SyncAgentListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncAgentListResult.
func (*SyncAgentListResult) UnmarshalJSON ¶ added in v1.1.0
func (s *SyncAgentListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SyncAgentListResult.
type SyncAgentProperties ¶
type SyncAgentProperties struct { // ARM resource id of the sync database in the sync agent. SyncDatabaseID *string // READ-ONLY; Expiration time of the sync agent version. ExpiryTime *time.Time // READ-ONLY; If the sync agent version is up to date. IsUpToDate *bool // READ-ONLY; Last alive time of the sync agent. LastAliveTime *time.Time // READ-ONLY; Name of the sync agent. Name *string // READ-ONLY; State of the sync agent. State *SyncAgentState // READ-ONLY; Version of the sync agent. Version *string }
SyncAgentProperties - Properties of an Azure SQL Database sync agent.
func (SyncAgentProperties) MarshalJSON ¶
func (s SyncAgentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncAgentProperties.
func (*SyncAgentProperties) UnmarshalJSON ¶
func (s *SyncAgentProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SyncAgentProperties.
type SyncAgentState ¶
type SyncAgentState string
SyncAgentState - State of the sync agent.
const ( SyncAgentStateNeverConnected SyncAgentState = "NeverConnected" SyncAgentStateOffline SyncAgentState = "Offline" SyncAgentStateOnline SyncAgentState = "Online" )
func PossibleSyncAgentStateValues ¶
func PossibleSyncAgentStateValues() []SyncAgentState
PossibleSyncAgentStateValues returns the possible values for the SyncAgentState const type.
type SyncAgentsClient ¶
type SyncAgentsClient struct {
// contains filtered or unexported fields
}
SyncAgentsClient contains the methods for the SyncAgents group. Don't use this type directly, use NewSyncAgentsClient() instead.
func NewSyncAgentsClient ¶
func NewSyncAgentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SyncAgentsClient, error)
NewSyncAgentsClient creates a new instance of SyncAgentsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*SyncAgentsClient) BeginCreateOrUpdate ¶
func (client *SyncAgentsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string, parameters SyncAgent, options *SyncAgentsClientBeginCreateOrUpdateOptions) (*runtime.Poller[SyncAgentsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a sync agent. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server on which the sync agent is hosted.
- syncAgentName - The name of the sync agent.
- parameters - The requested sync agent resource state.
- options - SyncAgentsClientBeginCreateOrUpdateOptions contains the optional parameters for the SyncAgentsClient.BeginCreateOrUpdate method.
Example (CreateANewSyncAgent) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncAgentCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSyncAgentsClient().BeginCreateOrUpdate(ctx, "syncagentcrud-65440", "syncagentcrud-8475", "syncagentcrud-3187", armsql.SyncAgent{ Properties: &armsql.SyncAgentProperties{ SyncDatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SyncAgent = armsql.SyncAgent{ // Name: to.Ptr("syncagent"), // Type: to.Ptr("Microsoft.Sql/servers/syncAgents"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/syncAgents/syncagentcrud-3187"), // Properties: &armsql.SyncAgentProperties{ // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "9999-12-31T23:59:59.999Z"); return t}()), // IsUpToDate: to.Ptr(true), // State: to.Ptr(armsql.SyncAgentStateNeverConnected), // SyncDatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync"), // Version: to.Ptr("4.2.0.0"), // }, // } }
Output:
Example (UpdateASyncAgent) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncAgentUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSyncAgentsClient().BeginCreateOrUpdate(ctx, "syncagentcrud-65440", "syncagentcrud-8475", "syncagentcrud-3187", armsql.SyncAgent{ Properties: &armsql.SyncAgentProperties{ SyncDatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SyncAgent = armsql.SyncAgent{ // Name: to.Ptr("syncagent"), // Type: to.Ptr("Microsoft.Sql/servers/syncAgents"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/syncAgents/syncagentcrud-3187"), // Properties: &armsql.SyncAgentProperties{ // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "9999-12-31T23:59:59.999Z"); return t}()), // IsUpToDate: to.Ptr(true), // State: to.Ptr(armsql.SyncAgentStateNeverConnected), // SyncDatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync"), // Version: to.Ptr("4.2.0.0"), // }, // } }
Output:
func (*SyncAgentsClient) BeginDelete ¶
func (client *SyncAgentsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string, options *SyncAgentsClientBeginDeleteOptions) (*runtime.Poller[SyncAgentsClientDeleteResponse], error)
BeginDelete - Deletes a sync agent. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server on which the sync agent is hosted.
- syncAgentName - The name of the sync agent.
- options - SyncAgentsClientBeginDeleteOptions contains the optional parameters for the SyncAgentsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncAgentDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSyncAgentsClient().BeginDelete(ctx, "syncagentcrud-65440", "syncagentcrud-8475", "syncagentcrud-3187", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*SyncAgentsClient) GenerateKey ¶
func (client *SyncAgentsClient) GenerateKey(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string, options *SyncAgentsClientGenerateKeyOptions) (SyncAgentsClientGenerateKeyResponse, error)
GenerateKey - Generates a sync agent key. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server on which the sync agent is hosted.
- syncAgentName - The name of the sync agent.
- options - SyncAgentsClientGenerateKeyOptions contains the optional parameters for the SyncAgentsClient.GenerateKey method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncAgentGenerateKey.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSyncAgentsClient().GenerateKey(ctx, "syncagentcrud-65440", "syncagentcrud-8475", "syncagentcrud-3187", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SyncAgentKeyProperties = armsql.SyncAgentKeyProperties{ // SyncAgentKey: to.Ptr("865f9998-6dae-4214-bbb1-4796b7c76ca0:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX=:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX="), // } }
Output:
func (*SyncAgentsClient) Get ¶
func (client *SyncAgentsClient) Get(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string, options *SyncAgentsClientGetOptions) (SyncAgentsClientGetResponse, error)
Get - Gets a sync agent. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server on which the sync agent is hosted.
- syncAgentName - The name of the sync agent.
- options - SyncAgentsClientGetOptions contains the optional parameters for the SyncAgentsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncAgentGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSyncAgentsClient().Get(ctx, "syncagentcrud-65440", "syncagentcrud-8475", "syncagentcrud-3187", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SyncAgent = armsql.SyncAgent{ // Name: to.Ptr("syncagent"), // Type: to.Ptr("Microsoft.Sql/servers/syncAgents"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/syncAgents/syncagentcrud-3187"), // Properties: &armsql.SyncAgentProperties{ // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "9999-12-31T23:59:59.999Z"); return t}()), // IsUpToDate: to.Ptr(true), // State: to.Ptr(armsql.SyncAgentStateNeverConnected), // SyncDatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync"), // Version: to.Ptr("4.2.0.0"), // }, // } }
Output:
func (*SyncAgentsClient) NewListByServerPager ¶ added in v0.5.0
func (client *SyncAgentsClient) NewListByServerPager(resourceGroupName string, serverName string, options *SyncAgentsClientListByServerOptions) *runtime.Pager[SyncAgentsClientListByServerResponse]
NewListByServerPager - Lists sync agents in a server.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server on which the sync agent is hosted.
- options - SyncAgentsClientListByServerOptions contains the optional parameters for the SyncAgentsClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncAgentListByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSyncAgentsClient().NewListByServerPager("syncagentcrud-65440", "syncagentcrud-8475", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SyncAgentListResult = armsql.SyncAgentListResult{ // Value: []*armsql.SyncAgent{ // { // Name: to.Ptr("syncagent"), // Type: to.Ptr("Microsoft.Sql/servers/syncAgents"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/syncAgents/syncagentcrud-3187"), // Properties: &armsql.SyncAgentProperties{ // ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "9999-12-31T23:59:59.999Z"); return t}()), // IsUpToDate: to.Ptr(true), // State: to.Ptr(armsql.SyncAgentStateNeverConnected), // SyncDatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync"), // Version: to.Ptr("4.2.0.0"), // }, // }}, // } } }
Output:
func (*SyncAgentsClient) NewListLinkedDatabasesPager ¶ added in v0.5.0
func (client *SyncAgentsClient) NewListLinkedDatabasesPager(resourceGroupName string, serverName string, syncAgentName string, options *SyncAgentsClientListLinkedDatabasesOptions) *runtime.Pager[SyncAgentsClientListLinkedDatabasesResponse]
NewListLinkedDatabasesPager - Lists databases linked to a sync agent.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server on which the sync agent is hosted.
- syncAgentName - The name of the sync agent.
- options - SyncAgentsClientListLinkedDatabasesOptions contains the optional parameters for the SyncAgentsClient.NewListLinkedDatabasesPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncAgentGetLinkedDatabases.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSyncAgentsClient().NewListLinkedDatabasesPager("syncagentcrud-65440", "syncagentcrud-8475", "syncagentcrud-3187", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SyncAgentLinkedDatabaseListResult = armsql.SyncAgentLinkedDatabaseListResult{ // Value: []*armsql.SyncAgentLinkedDatabase{ // { // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/syncAgents/syncagentcrud-3187/linkedDatabases/55555555-6666-7777-8888-999999999999"), // Properties: &armsql.SyncAgentLinkedDatabaseProperties{ // Description: to.Ptr(""), // DatabaseID: to.Ptr("55555555-6666-7777-8888-999999999999"), // DatabaseName: to.Ptr("DummySqlServerDb"), // DatabaseType: to.Ptr(armsql.SyncMemberDbTypeSQLServerDatabase), // ServerName: to.Ptr("DummySqlServer"), // UserName: to.Ptr("DummyUser"), // }, // }}, // } } }
Output:
type SyncAgentsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type SyncAgentsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncAgentsClientBeginCreateOrUpdateOptions contains the optional parameters for the SyncAgentsClient.BeginCreateOrUpdate method.
type SyncAgentsClientBeginDeleteOptions ¶ added in v0.3.0
type SyncAgentsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncAgentsClientBeginDeleteOptions contains the optional parameters for the SyncAgentsClient.BeginDelete method.
type SyncAgentsClientCreateOrUpdateResponse ¶ added in v0.3.0
type SyncAgentsClientCreateOrUpdateResponse struct { // An Azure SQL Database sync agent. SyncAgent }
SyncAgentsClientCreateOrUpdateResponse contains the response from method SyncAgentsClient.BeginCreateOrUpdate.
type SyncAgentsClientDeleteResponse ¶ added in v0.3.0
type SyncAgentsClientDeleteResponse struct { }
SyncAgentsClientDeleteResponse contains the response from method SyncAgentsClient.BeginDelete.
type SyncAgentsClientGenerateKeyOptions ¶ added in v0.3.0
type SyncAgentsClientGenerateKeyOptions struct { }
SyncAgentsClientGenerateKeyOptions contains the optional parameters for the SyncAgentsClient.GenerateKey method.
type SyncAgentsClientGenerateKeyResponse ¶ added in v0.3.0
type SyncAgentsClientGenerateKeyResponse struct { // Properties of an Azure SQL Database sync agent key. SyncAgentKeyProperties }
SyncAgentsClientGenerateKeyResponse contains the response from method SyncAgentsClient.GenerateKey.
type SyncAgentsClientGetOptions ¶ added in v0.3.0
type SyncAgentsClientGetOptions struct { }
SyncAgentsClientGetOptions contains the optional parameters for the SyncAgentsClient.Get method.
type SyncAgentsClientGetResponse ¶ added in v0.3.0
type SyncAgentsClientGetResponse struct { // An Azure SQL Database sync agent. SyncAgent }
SyncAgentsClientGetResponse contains the response from method SyncAgentsClient.Get.
type SyncAgentsClientListByServerOptions ¶ added in v0.3.0
type SyncAgentsClientListByServerOptions struct { }
SyncAgentsClientListByServerOptions contains the optional parameters for the SyncAgentsClient.NewListByServerPager method.
type SyncAgentsClientListByServerResponse ¶ added in v0.3.0
type SyncAgentsClientListByServerResponse struct { // A list of sync agents. SyncAgentListResult }
SyncAgentsClientListByServerResponse contains the response from method SyncAgentsClient.NewListByServerPager.
type SyncAgentsClientListLinkedDatabasesOptions ¶ added in v0.3.0
type SyncAgentsClientListLinkedDatabasesOptions struct { }
SyncAgentsClientListLinkedDatabasesOptions contains the optional parameters for the SyncAgentsClient.NewListLinkedDatabasesPager method.
type SyncAgentsClientListLinkedDatabasesResponse ¶ added in v0.3.0
type SyncAgentsClientListLinkedDatabasesResponse struct { // A list of sync agent linked databases. SyncAgentLinkedDatabaseListResult }
SyncAgentsClientListLinkedDatabasesResponse contains the response from method SyncAgentsClient.NewListLinkedDatabasesPager.
type SyncConflictResolutionPolicy ¶
type SyncConflictResolutionPolicy string
SyncConflictResolutionPolicy - Conflict resolution policy of the sync group.
const ( SyncConflictResolutionPolicyHubWin SyncConflictResolutionPolicy = "HubWin" SyncConflictResolutionPolicyMemberWin SyncConflictResolutionPolicy = "MemberWin" )
func PossibleSyncConflictResolutionPolicyValues ¶
func PossibleSyncConflictResolutionPolicyValues() []SyncConflictResolutionPolicy
PossibleSyncConflictResolutionPolicyValues returns the possible values for the SyncConflictResolutionPolicy const type.
type SyncDatabaseIDListResult ¶
type SyncDatabaseIDListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*SyncDatabaseIDProperties }
SyncDatabaseIDListResult - A list of sync database ID properties.
func (SyncDatabaseIDListResult) MarshalJSON ¶
func (s SyncDatabaseIDListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncDatabaseIDListResult.
func (*SyncDatabaseIDListResult) UnmarshalJSON ¶ added in v1.1.0
func (s *SyncDatabaseIDListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SyncDatabaseIDListResult.
type SyncDatabaseIDProperties ¶
type SyncDatabaseIDProperties struct { // READ-ONLY; ARM resource id of sync database. ID *string }
SyncDatabaseIDProperties - Properties of the sync database id.
func (SyncDatabaseIDProperties) MarshalJSON ¶ added in v1.1.0
func (s SyncDatabaseIDProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncDatabaseIDProperties.
func (*SyncDatabaseIDProperties) UnmarshalJSON ¶ added in v1.1.0
func (s *SyncDatabaseIDProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SyncDatabaseIDProperties.
type SyncDirection ¶
type SyncDirection string
SyncDirection - Sync direction of the sync member.
const ( SyncDirectionBidirectional SyncDirection = "Bidirectional" SyncDirectionOneWayHubToMember SyncDirection = "OneWayHubToMember" SyncDirectionOneWayMemberToHub SyncDirection = "OneWayMemberToHub" )
func PossibleSyncDirectionValues ¶
func PossibleSyncDirectionValues() []SyncDirection
PossibleSyncDirectionValues returns the possible values for the SyncDirection const type.
type SyncFullSchemaProperties ¶
type SyncFullSchemaProperties struct { // READ-ONLY; Last update time of the database schema. LastUpdateTime *time.Time // READ-ONLY; List of tables in the database full schema. Tables []*SyncFullSchemaTable }
SyncFullSchemaProperties - Properties of the database full schema.
func (SyncFullSchemaProperties) MarshalJSON ¶
func (s SyncFullSchemaProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncFullSchemaProperties.
func (*SyncFullSchemaProperties) UnmarshalJSON ¶
func (s *SyncFullSchemaProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SyncFullSchemaProperties.
type SyncFullSchemaPropertiesListResult ¶
type SyncFullSchemaPropertiesListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*SyncFullSchemaProperties }
SyncFullSchemaPropertiesListResult - A list of sync schema properties.
func (SyncFullSchemaPropertiesListResult) MarshalJSON ¶
func (s SyncFullSchemaPropertiesListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncFullSchemaPropertiesListResult.
func (*SyncFullSchemaPropertiesListResult) UnmarshalJSON ¶ added in v1.1.0
func (s *SyncFullSchemaPropertiesListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SyncFullSchemaPropertiesListResult.
type SyncFullSchemaTable ¶
type SyncFullSchemaTable struct { // READ-ONLY; List of columns in the table of database full schema. Columns []*SyncFullSchemaTableColumn // READ-ONLY; Error id of the table. ErrorID *string // READ-ONLY; If there is error in the table. HasError *bool // READ-ONLY; Name of the table. Name *string // READ-ONLY; Quoted name of the table. QuotedName *string }
SyncFullSchemaTable - Properties of the table in the database full schema.
func (SyncFullSchemaTable) MarshalJSON ¶
func (s SyncFullSchemaTable) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncFullSchemaTable.
func (*SyncFullSchemaTable) UnmarshalJSON ¶ added in v1.1.0
func (s *SyncFullSchemaTable) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SyncFullSchemaTable.
type SyncFullSchemaTableColumn ¶
type SyncFullSchemaTableColumn struct { // READ-ONLY; Data size of the column. DataSize *string // READ-ONLY; Data type of the column. DataType *string // READ-ONLY; Error id of the column. ErrorID *string // READ-ONLY; If there is error in the table. HasError *bool // READ-ONLY; If it is the primary key of the table. IsPrimaryKey *bool // READ-ONLY; Name of the column. Name *string // READ-ONLY; Quoted name of the column. QuotedName *string }
SyncFullSchemaTableColumn - Properties of the column in the table of database full schema.
func (SyncFullSchemaTableColumn) MarshalJSON ¶ added in v1.1.0
func (s SyncFullSchemaTableColumn) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncFullSchemaTableColumn.
func (*SyncFullSchemaTableColumn) UnmarshalJSON ¶ added in v1.1.0
func (s *SyncFullSchemaTableColumn) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SyncFullSchemaTableColumn.
type SyncGroup ¶
type SyncGroup struct { // Resource properties. Properties *SyncGroupProperties // The name and capacity of the SKU. SKU *SKU // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
SyncGroup - An Azure SQL Database sync group.
func (SyncGroup) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type SyncGroup.
func (*SyncGroup) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type SyncGroup.
type SyncGroupListResult ¶
type SyncGroupListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*SyncGroup }
SyncGroupListResult - A list of sync groups.
func (SyncGroupListResult) MarshalJSON ¶
func (s SyncGroupListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncGroupListResult.
func (*SyncGroupListResult) UnmarshalJSON ¶ added in v1.1.0
func (s *SyncGroupListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SyncGroupListResult.
type SyncGroupLogListResult ¶
type SyncGroupLogListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*SyncGroupLogProperties }
SyncGroupLogListResult - A list of sync group log properties.
func (SyncGroupLogListResult) MarshalJSON ¶
func (s SyncGroupLogListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncGroupLogListResult.
func (*SyncGroupLogListResult) UnmarshalJSON ¶ added in v1.1.0
func (s *SyncGroupLogListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SyncGroupLogListResult.
type SyncGroupLogProperties ¶
type SyncGroupLogProperties struct { // READ-ONLY; Details of the sync group log. Details *string // READ-ONLY; OperationStatus of the sync group log. OperationStatus *string // READ-ONLY; Source of the sync group log. Source *string // READ-ONLY; Timestamp of the sync group log. Timestamp *time.Time // READ-ONLY; TracingId of the sync group log. TracingID *string // READ-ONLY; Type of the sync group log. Type *SyncGroupLogType }
SyncGroupLogProperties - Properties of an Azure SQL Database sync group log.
func (SyncGroupLogProperties) MarshalJSON ¶
func (s SyncGroupLogProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncGroupLogProperties.
func (*SyncGroupLogProperties) UnmarshalJSON ¶
func (s *SyncGroupLogProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SyncGroupLogProperties.
type SyncGroupLogType ¶
type SyncGroupLogType string
SyncGroupLogType - Type of the sync group log.
const ( SyncGroupLogTypeAll SyncGroupLogType = "All" SyncGroupLogTypeError SyncGroupLogType = "Error" SyncGroupLogTypeSuccess SyncGroupLogType = "Success" SyncGroupLogTypeWarning SyncGroupLogType = "Warning" )
func PossibleSyncGroupLogTypeValues ¶
func PossibleSyncGroupLogTypeValues() []SyncGroupLogType
PossibleSyncGroupLogTypeValues returns the possible values for the SyncGroupLogType const type.
type SyncGroupProperties ¶
type SyncGroupProperties struct { // Conflict logging retention period. ConflictLoggingRetentionInDays *int32 // Conflict resolution policy of the sync group. ConflictResolutionPolicy *SyncConflictResolutionPolicy // If conflict logging is enabled. EnableConflictLogging *bool // Password for the sync group hub database credential. HubDatabasePassword *string // User name for the sync group hub database credential. HubDatabaseUserName *string // Sync interval of the sync group. Interval *int32 // Sync schema of the sync group. Schema *SyncGroupSchema // ARM resource id of the sync database in the sync group. SyncDatabaseID *string // If use private link connection is enabled. UsePrivateLinkConnection *bool // READ-ONLY; Last sync time of the sync group. LastSyncTime *time.Time // READ-ONLY; Private endpoint name of the sync group if use private link connection is enabled. PrivateEndpointName *string // READ-ONLY; Sync state of the sync group. SyncState *SyncGroupState }
SyncGroupProperties - Properties of a sync group.
func (SyncGroupProperties) MarshalJSON ¶
func (s SyncGroupProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncGroupProperties.
func (*SyncGroupProperties) UnmarshalJSON ¶
func (s *SyncGroupProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SyncGroupProperties.
type SyncGroupSchema ¶
type SyncGroupSchema struct { // Name of master sync member where the schema is from. MasterSyncMemberName *string // List of tables in sync group schema. Tables []*SyncGroupSchemaTable }
SyncGroupSchema - Properties of sync group schema.
func (SyncGroupSchema) MarshalJSON ¶
func (s SyncGroupSchema) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncGroupSchema.
func (*SyncGroupSchema) UnmarshalJSON ¶ added in v1.1.0
func (s *SyncGroupSchema) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SyncGroupSchema.
type SyncGroupSchemaTable ¶
type SyncGroupSchemaTable struct { // List of columns in sync group schema. Columns []*SyncGroupSchemaTableColumn // Quoted name of sync group schema table. QuotedName *string }
SyncGroupSchemaTable - Properties of table in sync group schema.
func (SyncGroupSchemaTable) MarshalJSON ¶
func (s SyncGroupSchemaTable) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncGroupSchemaTable.
func (*SyncGroupSchemaTable) UnmarshalJSON ¶ added in v1.1.0
func (s *SyncGroupSchemaTable) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SyncGroupSchemaTable.
type SyncGroupSchemaTableColumn ¶
type SyncGroupSchemaTableColumn struct { // Data size of the column. DataSize *string // Data type of the column. DataType *string // Quoted name of sync group table column. QuotedName *string }
SyncGroupSchemaTableColumn - Properties of column in sync group table.
func (SyncGroupSchemaTableColumn) MarshalJSON ¶ added in v1.1.0
func (s SyncGroupSchemaTableColumn) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncGroupSchemaTableColumn.
func (*SyncGroupSchemaTableColumn) UnmarshalJSON ¶ added in v1.1.0
func (s *SyncGroupSchemaTableColumn) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SyncGroupSchemaTableColumn.
type SyncGroupState ¶
type SyncGroupState string
SyncGroupState - Sync state of the sync group.
const ( SyncGroupStateError SyncGroupState = "Error" SyncGroupStateGood SyncGroupState = "Good" SyncGroupStateNotReady SyncGroupState = "NotReady" SyncGroupStateProgressing SyncGroupState = "Progressing" SyncGroupStateWarning SyncGroupState = "Warning" )
func PossibleSyncGroupStateValues ¶
func PossibleSyncGroupStateValues() []SyncGroupState
PossibleSyncGroupStateValues returns the possible values for the SyncGroupState const type.
type SyncGroupsClient ¶
type SyncGroupsClient struct {
// contains filtered or unexported fields
}
SyncGroupsClient contains the methods for the SyncGroups group. Don't use this type directly, use NewSyncGroupsClient() instead.
func NewSyncGroupsClient ¶
func NewSyncGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SyncGroupsClient, error)
NewSyncGroupsClient creates a new instance of SyncGroupsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*SyncGroupsClient) BeginCreateOrUpdate ¶
func (client *SyncGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, parameters SyncGroup, options *SyncGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[SyncGroupsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a sync group. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database on which the sync group is hosted.
- syncGroupName - The name of the sync group.
- parameters - The requested sync group resource state.
- options - SyncGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the SyncGroupsClient.BeginCreateOrUpdate method.
Example (CreateASyncGroup) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSyncGroupsClient().BeginCreateOrUpdate(ctx, "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", armsql.SyncGroup{ Properties: &armsql.SyncGroupProperties{ ConflictResolutionPolicy: to.Ptr(armsql.SyncConflictResolutionPolicyHubWin), HubDatabaseUserName: to.Ptr("hubUser"), Interval: to.Ptr[int32](-1), SyncDatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328"), UsePrivateLinkConnection: to.Ptr(true), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SyncGroup = armsql.SyncGroup{ // Name: to.Ptr("syncgroupcrud-3187"), // Type: to.Ptr("Microsoft.Sql/servers/databases/syncGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187"), // Properties: &armsql.SyncGroupProperties{ // ConflictResolutionPolicy: to.Ptr(armsql.SyncConflictResolutionPolicyHubWin), // HubDatabaseUserName: to.Ptr("hubUser"), // Interval: to.Ptr[int32](-1), // LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T08:00:00.000Z"); return t}()), // PrivateEndpointName: to.Ptr("PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncgroupcrud-8475"), // SyncDatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328"), // SyncState: to.Ptr(armsql.SyncGroupStateNotReady), // UsePrivateLinkConnection: to.Ptr(true), // }, // } }
Output:
Example (UpdateASyncGroup) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSyncGroupsClient().BeginCreateOrUpdate(ctx, "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", armsql.SyncGroup{ Properties: &armsql.SyncGroupProperties{ ConflictResolutionPolicy: to.Ptr(armsql.SyncConflictResolutionPolicyHubWin), HubDatabaseUserName: to.Ptr("hubUser"), Interval: to.Ptr[int32](-1), SyncDatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328"), UsePrivateLinkConnection: to.Ptr(true), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SyncGroup = armsql.SyncGroup{ // Name: to.Ptr("syncgroupcrud-3187"), // Type: to.Ptr("Microsoft.Sql/servers/databases/syncGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187"), // Properties: &armsql.SyncGroupProperties{ // ConflictResolutionPolicy: to.Ptr(armsql.SyncConflictResolutionPolicyHubWin), // HubDatabaseUserName: to.Ptr("hubUser"), // Interval: to.Ptr[int32](-1), // LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T08:00:00.000Z"); return t}()), // PrivateEndpointName: to.Ptr("PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncgroupcrud-3187"), // SyncDatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328"), // SyncState: to.Ptr(armsql.SyncGroupStateNotReady), // UsePrivateLinkConnection: to.Ptr(true), // }, // } }
Output:
func (*SyncGroupsClient) BeginDelete ¶
func (client *SyncGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, options *SyncGroupsClientBeginDeleteOptions) (*runtime.Poller[SyncGroupsClientDeleteResponse], error)
BeginDelete - Deletes a sync group. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database on which the sync group is hosted.
- syncGroupName - The name of the sync group.
- options - SyncGroupsClientBeginDeleteOptions contains the optional parameters for the SyncGroupsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSyncGroupsClient().BeginDelete(ctx, "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*SyncGroupsClient) BeginRefreshHubSchema ¶
func (client *SyncGroupsClient) BeginRefreshHubSchema(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, options *SyncGroupsClientBeginRefreshHubSchemaOptions) (*runtime.Poller[SyncGroupsClientRefreshHubSchemaResponse], error)
BeginRefreshHubSchema - Refreshes a hub database schema. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database on which the sync group is hosted.
- syncGroupName - The name of the sync group.
- options - SyncGroupsClientBeginRefreshHubSchemaOptions contains the optional parameters for the SyncGroupsClient.BeginRefreshHubSchema method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupRefreshHubSchema.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSyncGroupsClient().BeginRefreshHubSchema(ctx, "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*SyncGroupsClient) BeginUpdate ¶
func (client *SyncGroupsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, parameters SyncGroup, options *SyncGroupsClientBeginUpdateOptions) (*runtime.Poller[SyncGroupsClientUpdateResponse], error)
BeginUpdate - Updates a sync group. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database on which the sync group is hosted.
- syncGroupName - The name of the sync group.
- parameters - The requested sync group resource state.
- options - SyncGroupsClientBeginUpdateOptions contains the optional parameters for the SyncGroupsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupPatch.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSyncGroupsClient().BeginUpdate(ctx, "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", armsql.SyncGroup{ Properties: &armsql.SyncGroupProperties{ ConflictResolutionPolicy: to.Ptr(armsql.SyncConflictResolutionPolicyHubWin), HubDatabasePassword: to.Ptr("hubPassword"), HubDatabaseUserName: to.Ptr("hubUser"), Interval: to.Ptr[int32](-1), SyncDatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328"), UsePrivateLinkConnection: to.Ptr(true), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SyncGroup = armsql.SyncGroup{ // Name: to.Ptr("syncgroup"), // Type: to.Ptr("Microsoft.Sql/servers/databases/syncGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187"), // Properties: &armsql.SyncGroupProperties{ // ConflictResolutionPolicy: to.Ptr(armsql.SyncConflictResolutionPolicyHubWin), // HubDatabaseUserName: to.Ptr("hubUser"), // Interval: to.Ptr[int32](-1), // LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T08:00:00.000Z"); return t}()), // PrivateEndpointName: to.Ptr("PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncgroupcrud-3187"), // SyncDatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328"), // SyncState: to.Ptr(armsql.SyncGroupStateNotReady), // UsePrivateLinkConnection: to.Ptr(true), // }, // } }
Output:
func (*SyncGroupsClient) CancelSync ¶
func (client *SyncGroupsClient) CancelSync(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, options *SyncGroupsClientCancelSyncOptions) (SyncGroupsClientCancelSyncResponse, error)
CancelSync - Cancels a sync group synchronization. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database on which the sync group is hosted.
- syncGroupName - The name of the sync group.
- options - SyncGroupsClientCancelSyncOptions contains the optional parameters for the SyncGroupsClient.CancelSync method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupCancelSync.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewSyncGroupsClient().CancelSync(ctx, "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*SyncGroupsClient) Get ¶
func (client *SyncGroupsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, options *SyncGroupsClientGetOptions) (SyncGroupsClientGetResponse, error)
Get - Gets a sync group. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database on which the sync group is hosted.
- syncGroupName - The name of the sync group.
- options - SyncGroupsClientGetOptions contains the optional parameters for the SyncGroupsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSyncGroupsClient().Get(ctx, "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SyncGroup = armsql.SyncGroup{ // Name: to.Ptr("syncgroupcrud-3187"), // Type: to.Ptr("Microsoft.Sql/servers/databases/syncGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187"), // Properties: &armsql.SyncGroupProperties{ // ConflictResolutionPolicy: to.Ptr(armsql.SyncConflictResolutionPolicyHubWin), // HubDatabaseUserName: to.Ptr("hubUser"), // Interval: to.Ptr[int32](-1), // LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T08:00:00.000Z"); return t}()), // PrivateEndpointName: to.Ptr("PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncgroupcrud-3187"), // SyncDatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328"), // SyncState: to.Ptr(armsql.SyncGroupStateNotReady), // UsePrivateLinkConnection: to.Ptr(true), // }, // } }
Output:
func (*SyncGroupsClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *SyncGroupsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *SyncGroupsClientListByDatabaseOptions) *runtime.Pager[SyncGroupsClientListByDatabaseResponse]
NewListByDatabasePager - Lists sync groups under a hub database.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database on which the sync group is hosted.
- options - SyncGroupsClientListByDatabaseOptions contains the optional parameters for the SyncGroupsClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSyncGroupsClient().NewListByDatabasePager("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SyncGroupListResult = armsql.SyncGroupListResult{ // Value: []*armsql.SyncGroup{ // { // Name: to.Ptr("syncgroupcrud-3187"), // Type: to.Ptr("Microsoft.Sql/servers/databases/syncGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187"), // Properties: &armsql.SyncGroupProperties{ // ConflictResolutionPolicy: to.Ptr(armsql.SyncConflictResolutionPolicyHubWin), // HubDatabaseUserName: to.Ptr("hubUser"), // Interval: to.Ptr[int32](-1), // LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T08:00:00.000Z"); return t}()), // PrivateEndpointName: to.Ptr("PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncgroupcrud-3187"), // SyncDatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328"), // SyncState: to.Ptr(armsql.SyncGroupStateNotReady), // UsePrivateLinkConnection: to.Ptr(true), // }, // }, // { // Name: to.Ptr("syncgroupcrud-5374"), // Type: to.Ptr("Microsoft.Sql/servers/databases/syncGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-5374"), // Properties: &armsql.SyncGroupProperties{ // ConflictResolutionPolicy: to.Ptr(armsql.SyncConflictResolutionPolicyHubWin), // HubDatabaseUserName: to.Ptr("hubUser"), // Interval: to.Ptr[int32](-1), // LastSyncTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "1-01-01T08:00:00.000Z"); return t}()), // PrivateEndpointName: to.Ptr("PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncgroupcrud-5374"), // SyncDatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328"), // SyncState: to.Ptr(armsql.SyncGroupStateNotReady), // UsePrivateLinkConnection: to.Ptr(true), // }, // }}, // } } }
Output:
func (*SyncGroupsClient) NewListHubSchemasPager ¶ added in v0.5.0
func (client *SyncGroupsClient) NewListHubSchemasPager(resourceGroupName string, serverName string, databaseName string, syncGroupName string, options *SyncGroupsClientListHubSchemasOptions) *runtime.Pager[SyncGroupsClientListHubSchemasResponse]
NewListHubSchemasPager - Gets a collection of hub database schemas.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database on which the sync group is hosted.
- syncGroupName - The name of the sync group.
- options - SyncGroupsClientListHubSchemasOptions contains the optional parameters for the SyncGroupsClient.NewListHubSchemasPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupGetHubSchema.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSyncGroupsClient().NewListHubSchemasPager("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SyncFullSchemaPropertiesListResult = armsql.SyncFullSchemaPropertiesListResult{ // Value: []*armsql.SyncFullSchemaProperties{ // { // LastUpdateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-30T07:16:08.210Z"); return t}()), // Tables: []*armsql.SyncFullSchemaTable{ // { // Name: to.Ptr("dbo.myTable"), // Columns: []*armsql.SyncFullSchemaTableColumn{ // { // Name: to.Ptr("intField"), // DataSize: to.Ptr("4"), // DataType: to.Ptr("int"), // HasError: to.Ptr(false), // IsPrimaryKey: to.Ptr(false), // QuotedName: to.Ptr("[intField]"), // }, // { // Name: to.Ptr("charField"), // DataSize: to.Ptr("100"), // DataType: to.Ptr("nvarchar"), // HasError: to.Ptr(false), // IsPrimaryKey: to.Ptr(false), // QuotedName: to.Ptr("[charField]"), // }}, // ErrorID: to.Ptr("Schema_TableHasNoPrimaryKey"), // HasError: to.Ptr(true), // QuotedName: to.Ptr("[dbo].[myTable]"), // }}, // }}, // } } }
Output:
func (*SyncGroupsClient) NewListLogsPager ¶ added in v0.5.0
func (client *SyncGroupsClient) NewListLogsPager(resourceGroupName string, serverName string, databaseName string, syncGroupName string, startTime string, endTime string, typeParam SyncGroupsType, options *SyncGroupsClientListLogsOptions) *runtime.Pager[SyncGroupsClientListLogsResponse]
NewListLogsPager - Gets a collection of sync group logs.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database on which the sync group is hosted.
- syncGroupName - The name of the sync group.
- startTime - Get logs generated after this time.
- endTime - Get logs generated before this time.
- typeParam - The types of logs to retrieve.
- options - SyncGroupsClientListLogsOptions contains the optional parameters for the SyncGroupsClient.NewListLogsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupGetLog.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSyncGroupsClient().NewListLogsPager("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", "2017-01-01T00:00:00", "2017-12-31T00:00:00", armsql.SyncGroupsTypeAll, &armsql.SyncGroupsClientListLogsOptions{ContinuationToken: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SyncGroupLogListResult = armsql.SyncGroupLogListResult{ // Value: []*armsql.SyncGroupLogProperties{ // { // Type: to.Ptr(armsql.SyncGroupLogTypeSuccess), // OperationStatus: to.Ptr("SchemaRefreshSuccess"), // Source: to.Ptr("syncgroupcrud-8475.database.windows.net/hub"), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-30T07:16:08.250Z"); return t}()), // TracingID: to.Ptr("c0480c8e-6269-424e-9404-b00efce0ebae"), // Details: to.Ptr("Schema information obtained successfully."), // }, // { // Type: to.Ptr(armsql.SyncGroupLogTypeError), // OperationStatus: to.Ptr("SchemaRefreshFailure"), // Source: to.Ptr("syncgroupcrud-8475.database.windows.net/member"), // Timestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-30T07:03:37.573Z"); return t}()), // TracingID: to.Ptr("cd3aa28c-0c31-471f-8a77-f1b21c908cbd"), // Details: to.Ptr("Getting schema information for the database failed with the exception \"Failed to connect to server .\nInner exception: SqlException Error Code: -2146232060 - SqlError Number:53, Message: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) \nInner exception: The network path was not found\n For more information, provide tracing ID ‘cd3aa28c-0c31-471f-8a77-f1b21c908cbd’ to customer support.\""), // }}, // } } }
Output:
func (*SyncGroupsClient) NewListSyncDatabaseIDsPager ¶ added in v0.5.0
func (client *SyncGroupsClient) NewListSyncDatabaseIDsPager(locationName string, options *SyncGroupsClientListSyncDatabaseIDsOptions) *runtime.Pager[SyncGroupsClientListSyncDatabaseIDsResponse]
NewListSyncDatabaseIDsPager - Gets a collection of sync database ids.
Generated from API version 2020-11-01-preview
- locationName - The name of the region where the resource is located.
- options - SyncGroupsClientListSyncDatabaseIDsOptions contains the optional parameters for the SyncGroupsClient.NewListSyncDatabaseIDsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupGetSyncDatabaseId.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSyncGroupsClient().NewListSyncDatabaseIDsPager("westus", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SyncDatabaseIDListResult = armsql.SyncDatabaseIDListResult{ // Value: []*armsql.SyncDatabaseIDProperties{ // { // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328"), // }}, // } } }
Output:
func (*SyncGroupsClient) TriggerSync ¶
func (client *SyncGroupsClient) TriggerSync(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, options *SyncGroupsClientTriggerSyncOptions) (SyncGroupsClientTriggerSyncResponse, error)
TriggerSync - Triggers a sync group synchronization. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database on which the sync group is hosted.
- syncGroupName - The name of the sync group.
- options - SyncGroupsClientTriggerSyncOptions contains the optional parameters for the SyncGroupsClient.TriggerSync method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupTriggerSync.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewSyncGroupsClient().TriggerSync(ctx, "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
type SyncGroupsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type SyncGroupsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the SyncGroupsClient.BeginCreateOrUpdate method.
type SyncGroupsClientBeginDeleteOptions ¶ added in v0.3.0
type SyncGroupsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncGroupsClientBeginDeleteOptions contains the optional parameters for the SyncGroupsClient.BeginDelete method.
type SyncGroupsClientBeginRefreshHubSchemaOptions ¶ added in v0.3.0
type SyncGroupsClientBeginRefreshHubSchemaOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncGroupsClientBeginRefreshHubSchemaOptions contains the optional parameters for the SyncGroupsClient.BeginRefreshHubSchema method.
type SyncGroupsClientBeginUpdateOptions ¶ added in v0.3.0
type SyncGroupsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncGroupsClientBeginUpdateOptions contains the optional parameters for the SyncGroupsClient.BeginUpdate method.
type SyncGroupsClientCancelSyncOptions ¶ added in v0.3.0
type SyncGroupsClientCancelSyncOptions struct { }
SyncGroupsClientCancelSyncOptions contains the optional parameters for the SyncGroupsClient.CancelSync method.
type SyncGroupsClientCancelSyncResponse ¶ added in v0.3.0
type SyncGroupsClientCancelSyncResponse struct { }
SyncGroupsClientCancelSyncResponse contains the response from method SyncGroupsClient.CancelSync.
type SyncGroupsClientCreateOrUpdateResponse ¶ added in v0.3.0
type SyncGroupsClientCreateOrUpdateResponse struct { // An Azure SQL Database sync group. SyncGroup }
SyncGroupsClientCreateOrUpdateResponse contains the response from method SyncGroupsClient.BeginCreateOrUpdate.
type SyncGroupsClientDeleteResponse ¶ added in v0.3.0
type SyncGroupsClientDeleteResponse struct { }
SyncGroupsClientDeleteResponse contains the response from method SyncGroupsClient.BeginDelete.
type SyncGroupsClientGetOptions ¶ added in v0.3.0
type SyncGroupsClientGetOptions struct { }
SyncGroupsClientGetOptions contains the optional parameters for the SyncGroupsClient.Get method.
type SyncGroupsClientGetResponse ¶ added in v0.3.0
type SyncGroupsClientGetResponse struct { // An Azure SQL Database sync group. SyncGroup }
SyncGroupsClientGetResponse contains the response from method SyncGroupsClient.Get.
type SyncGroupsClientListByDatabaseOptions ¶ added in v0.3.0
type SyncGroupsClientListByDatabaseOptions struct { }
SyncGroupsClientListByDatabaseOptions contains the optional parameters for the SyncGroupsClient.NewListByDatabasePager method.
type SyncGroupsClientListByDatabaseResponse ¶ added in v0.3.0
type SyncGroupsClientListByDatabaseResponse struct { // A list of sync groups. SyncGroupListResult }
SyncGroupsClientListByDatabaseResponse contains the response from method SyncGroupsClient.NewListByDatabasePager.
type SyncGroupsClientListHubSchemasOptions ¶ added in v0.3.0
type SyncGroupsClientListHubSchemasOptions struct { }
SyncGroupsClientListHubSchemasOptions contains the optional parameters for the SyncGroupsClient.NewListHubSchemasPager method.
type SyncGroupsClientListHubSchemasResponse ¶ added in v0.3.0
type SyncGroupsClientListHubSchemasResponse struct { // A list of sync schema properties. SyncFullSchemaPropertiesListResult }
SyncGroupsClientListHubSchemasResponse contains the response from method SyncGroupsClient.NewListHubSchemasPager.
type SyncGroupsClientListLogsOptions ¶ added in v0.3.0
type SyncGroupsClientListLogsOptions struct { // The continuation token for this operation. ContinuationToken *string }
SyncGroupsClientListLogsOptions contains the optional parameters for the SyncGroupsClient.NewListLogsPager method.
type SyncGroupsClientListLogsResponse ¶ added in v0.3.0
type SyncGroupsClientListLogsResponse struct { // A list of sync group log properties. SyncGroupLogListResult }
SyncGroupsClientListLogsResponse contains the response from method SyncGroupsClient.NewListLogsPager.
type SyncGroupsClientListSyncDatabaseIDsOptions ¶ added in v0.3.0
type SyncGroupsClientListSyncDatabaseIDsOptions struct { }
SyncGroupsClientListSyncDatabaseIDsOptions contains the optional parameters for the SyncGroupsClient.NewListSyncDatabaseIDsPager method.
type SyncGroupsClientListSyncDatabaseIDsResponse ¶ added in v0.3.0
type SyncGroupsClientListSyncDatabaseIDsResponse struct { // A list of sync database ID properties. SyncDatabaseIDListResult }
SyncGroupsClientListSyncDatabaseIDsResponse contains the response from method SyncGroupsClient.NewListSyncDatabaseIDsPager.
type SyncGroupsClientRefreshHubSchemaResponse ¶ added in v0.3.0
type SyncGroupsClientRefreshHubSchemaResponse struct { }
SyncGroupsClientRefreshHubSchemaResponse contains the response from method SyncGroupsClient.BeginRefreshHubSchema.
type SyncGroupsClientTriggerSyncOptions ¶ added in v0.3.0
type SyncGroupsClientTriggerSyncOptions struct { }
SyncGroupsClientTriggerSyncOptions contains the optional parameters for the SyncGroupsClient.TriggerSync method.
type SyncGroupsClientTriggerSyncResponse ¶ added in v0.3.0
type SyncGroupsClientTriggerSyncResponse struct { }
SyncGroupsClientTriggerSyncResponse contains the response from method SyncGroupsClient.TriggerSync.
type SyncGroupsClientUpdateResponse ¶ added in v0.3.0
type SyncGroupsClientUpdateResponse struct { // An Azure SQL Database sync group. SyncGroup }
SyncGroupsClientUpdateResponse contains the response from method SyncGroupsClient.BeginUpdate.
type SyncGroupsType ¶ added in v0.3.0
type SyncGroupsType string
const ( SyncGroupsTypeAll SyncGroupsType = "All" SyncGroupsTypeError SyncGroupsType = "Error" SyncGroupsTypeSuccess SyncGroupsType = "Success" SyncGroupsTypeWarning SyncGroupsType = "Warning" )
func PossibleSyncGroupsTypeValues ¶ added in v0.3.0
func PossibleSyncGroupsTypeValues() []SyncGroupsType
PossibleSyncGroupsTypeValues returns the possible values for the SyncGroupsType const type.
type SyncMember ¶
type SyncMember struct { // Resource properties. Properties *SyncMemberProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
SyncMember - An Azure SQL Database sync member.
func (SyncMember) MarshalJSON ¶
func (s SyncMember) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncMember.
func (*SyncMember) UnmarshalJSON ¶ added in v1.1.0
func (s *SyncMember) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SyncMember.
type SyncMemberDbType ¶
type SyncMemberDbType string
SyncMemberDbType - Type of the sync agent linked database.
const ( SyncMemberDbTypeAzureSQLDatabase SyncMemberDbType = "AzureSqlDatabase" SyncMemberDbTypeSQLServerDatabase SyncMemberDbType = "SqlServerDatabase" )
func PossibleSyncMemberDbTypeValues ¶
func PossibleSyncMemberDbTypeValues() []SyncMemberDbType
PossibleSyncMemberDbTypeValues returns the possible values for the SyncMemberDbType const type.
type SyncMemberListResult ¶
type SyncMemberListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*SyncMember }
SyncMemberListResult - A list of Azure SQL Database sync members.
func (SyncMemberListResult) MarshalJSON ¶
func (s SyncMemberListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncMemberListResult.
func (*SyncMemberListResult) UnmarshalJSON ¶ added in v1.1.0
func (s *SyncMemberListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SyncMemberListResult.
type SyncMemberProperties ¶
type SyncMemberProperties struct { // Database name of the member database in the sync member. DatabaseName *string // Database type of the sync member. DatabaseType *SyncMemberDbType // Password of the member database in the sync member. Password *string // SQL Server database id of the sync member. SQLServerDatabaseID *string // Server name of the member database in the sync member ServerName *string // ARM resource id of the sync agent in the sync member. SyncAgentID *string // Sync direction of the sync member. SyncDirection *SyncDirection // ARM resource id of the sync member logical database, for sync members in Azure. SyncMemberAzureDatabaseResourceID *string // Whether to use private link connection. UsePrivateLinkConnection *bool // User name of the member database in the sync member. UserName *string // READ-ONLY; Private endpoint name of the sync member if use private link connection is enabled, for sync members in Azure. PrivateEndpointName *string // READ-ONLY; Sync state of the sync member. SyncState *SyncMemberState }
SyncMemberProperties - Properties of a sync member.
func (SyncMemberProperties) MarshalJSON ¶ added in v1.1.0
func (s SyncMemberProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncMemberProperties.
func (*SyncMemberProperties) UnmarshalJSON ¶ added in v1.1.0
func (s *SyncMemberProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SyncMemberProperties.
type SyncMemberState ¶
type SyncMemberState string
SyncMemberState - Sync state of the sync member.
const ( SyncMemberStateDeProvisionFailed SyncMemberState = "DeProvisionFailed" SyncMemberStateDeProvisioned SyncMemberState = "DeProvisioned" SyncMemberStateDeProvisioning SyncMemberState = "DeProvisioning" SyncMemberStateDisabledBackupRestore SyncMemberState = "DisabledBackupRestore" SyncMemberStateDisabledTombstoneCleanup SyncMemberState = "DisabledTombstoneCleanup" SyncMemberStateProvisionFailed SyncMemberState = "ProvisionFailed" SyncMemberStateProvisioned SyncMemberState = "Provisioned" SyncMemberStateProvisioning SyncMemberState = "Provisioning" SyncMemberStateReprovisionFailed SyncMemberState = "ReprovisionFailed" SyncMemberStateReprovisioning SyncMemberState = "Reprovisioning" SyncMemberStateSyncCancelled SyncMemberState = "SyncCancelled" SyncMemberStateSyncCancelling SyncMemberState = "SyncCancelling" SyncMemberStateSyncFailed SyncMemberState = "SyncFailed" SyncMemberStateSyncInProgress SyncMemberState = "SyncInProgress" SyncMemberStateSyncSucceeded SyncMemberState = "SyncSucceeded" SyncMemberStateSyncSucceededWithWarnings SyncMemberState = "SyncSucceededWithWarnings" SyncMemberStateUnProvisioned SyncMemberState = "UnProvisioned" SyncMemberStateUnReprovisioned SyncMemberState = "UnReprovisioned" )
func PossibleSyncMemberStateValues ¶
func PossibleSyncMemberStateValues() []SyncMemberState
PossibleSyncMemberStateValues returns the possible values for the SyncMemberState const type.
type SyncMembersClient ¶
type SyncMembersClient struct {
// contains filtered or unexported fields
}
SyncMembersClient contains the methods for the SyncMembers group. Don't use this type directly, use NewSyncMembersClient() instead.
func NewSyncMembersClient ¶
func NewSyncMembersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SyncMembersClient, error)
NewSyncMembersClient creates a new instance of SyncMembersClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*SyncMembersClient) BeginCreateOrUpdate ¶
func (client *SyncMembersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, parameters SyncMember, options *SyncMembersClientBeginCreateOrUpdateOptions) (*runtime.Poller[SyncMembersClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a sync member. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database on which the sync group is hosted.
- syncGroupName - The name of the sync group on which the sync member is hosted.
- syncMemberName - The name of the sync member.
- parameters - The requested sync member resource state.
- options - SyncMembersClientBeginCreateOrUpdateOptions contains the optional parameters for the SyncMembersClient.BeginCreateOrUpdate method.
Example (CreateANewSyncMember) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSyncMembersClient().BeginCreateOrUpdate(ctx, "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", "syncmembercrud-4879", armsql.SyncMember{ Properties: &armsql.SyncMemberProperties{ DatabaseName: to.Ptr("syncgroupcrud-7421"), DatabaseType: to.Ptr(armsql.SyncMemberDbTypeAzureSQLDatabase), ServerName: to.Ptr("syncgroupcrud-3379.database.windows.net"), SyncDirection: to.Ptr(armsql.SyncDirectionBidirectional), SyncMemberAzureDatabaseResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328"), UsePrivateLinkConnection: to.Ptr(true), UserName: to.Ptr("myUser"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SyncMember = armsql.SyncMember{ // Name: to.Ptr("syncmembercrud-4879"), // Type: to.Ptr("Microsoft.Sql/servers/databases/syncGroups/syncMembers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187/syncMembers/syncmembercrud-4879"), // Properties: &armsql.SyncMemberProperties{ // DatabaseName: to.Ptr("syncgroupcrud-7421"), // DatabaseType: to.Ptr(armsql.SyncMemberDbTypeAzureSQLDatabase), // PrivateEndpointName: to.Ptr("PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncmembercrud-4879"), // ServerName: to.Ptr("syncgroupcrud-3379.database.windows.net"), // SyncDirection: to.Ptr(armsql.SyncDirectionBidirectional), // SyncMemberAzureDatabaseResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328"), // SyncState: to.Ptr(armsql.SyncMemberStateUnProvisioned), // UsePrivateLinkConnection: to.Ptr(true), // UserName: to.Ptr("myUser"), // }, // } }
Output:
Example (UpdateASyncMember) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSyncMembersClient().BeginCreateOrUpdate(ctx, "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", "syncmembercrud-4879", armsql.SyncMember{ Properties: &armsql.SyncMemberProperties{ DatabaseName: to.Ptr("syncgroupcrud-7421"), DatabaseType: to.Ptr(armsql.SyncMemberDbTypeAzureSQLDatabase), ServerName: to.Ptr("syncgroupcrud-3379.database.windows.net"), SyncDirection: to.Ptr(armsql.SyncDirectionBidirectional), SyncMemberAzureDatabaseResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328"), UsePrivateLinkConnection: to.Ptr(true), UserName: to.Ptr("myUser"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SyncMember = armsql.SyncMember{ // Name: to.Ptr("syncmembercrud-4879"), // Type: to.Ptr("Microsoft.Sql/servers/databases/syncGroups/syncMembers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187/syncMembers/syncmembercrud-4879"), // Properties: &armsql.SyncMemberProperties{ // DatabaseName: to.Ptr("syncgroupcrud-7421"), // DatabaseType: to.Ptr(armsql.SyncMemberDbTypeAzureSQLDatabase), // PrivateEndpointName: to.Ptr("PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncmembercrud-4879"), // ServerName: to.Ptr("syncgroupcrud-3379.database.windows.net"), // SyncDirection: to.Ptr(armsql.SyncDirectionBidirectional), // SyncMemberAzureDatabaseResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328"), // SyncState: to.Ptr(armsql.SyncMemberStateUnProvisioned), // UsePrivateLinkConnection: to.Ptr(true), // UserName: to.Ptr("myUser"), // }, // } }
Output:
func (*SyncMembersClient) BeginDelete ¶
func (client *SyncMembersClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, options *SyncMembersClientBeginDeleteOptions) (*runtime.Poller[SyncMembersClientDeleteResponse], error)
BeginDelete - Deletes a sync member. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database on which the sync group is hosted.
- syncGroupName - The name of the sync group on which the sync member is hosted.
- syncMemberName - The name of the sync member.
- options - SyncMembersClientBeginDeleteOptions contains the optional parameters for the SyncMembersClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSyncMembersClient().BeginDelete(ctx, "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", "syncgroupcrud-4879", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*SyncMembersClient) BeginRefreshMemberSchema ¶
func (client *SyncMembersClient) BeginRefreshMemberSchema(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, options *SyncMembersClientBeginRefreshMemberSchemaOptions) (*runtime.Poller[SyncMembersClientRefreshMemberSchemaResponse], error)
BeginRefreshMemberSchema - Refreshes a sync member database schema. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database on which the sync group is hosted.
- syncGroupName - The name of the sync group on which the sync member is hosted.
- syncMemberName - The name of the sync member.
- options - SyncMembersClientBeginRefreshMemberSchemaOptions contains the optional parameters for the SyncMembersClient.BeginRefreshMemberSchema method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberRefreshSchema.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSyncMembersClient().BeginRefreshMemberSchema(ctx, "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", "syncgroupcrud-4879", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*SyncMembersClient) BeginUpdate ¶
func (client *SyncMembersClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, parameters SyncMember, options *SyncMembersClientBeginUpdateOptions) (*runtime.Poller[SyncMembersClientUpdateResponse], error)
BeginUpdate - Updates an existing sync member. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database on which the sync group is hosted.
- syncGroupName - The name of the sync group on which the sync member is hosted.
- syncMemberName - The name of the sync member.
- parameters - The requested sync member resource state.
- options - SyncMembersClientBeginUpdateOptions contains the optional parameters for the SyncMembersClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberPatch.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSyncMembersClient().BeginUpdate(ctx, "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", "syncmembercrud-4879", armsql.SyncMember{ Properties: &armsql.SyncMemberProperties{ DatabaseName: to.Ptr("syncgroupcrud-7421"), DatabaseType: to.Ptr(armsql.SyncMemberDbTypeAzureSQLDatabase), ServerName: to.Ptr("syncgroupcrud-3379.database.windows.net"), SyncDirection: to.Ptr(armsql.SyncDirectionBidirectional), SyncMemberAzureDatabaseResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328"), UsePrivateLinkConnection: to.Ptr(true), UserName: to.Ptr("myUser"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SyncMember = armsql.SyncMember{ // Name: to.Ptr("syncmembercrud-4879"), // Type: to.Ptr("Microsoft.Sql/servers/databases/syncGroups/syncMembers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187/syncMembers/syncmembercrud-4879"), // Properties: &armsql.SyncMemberProperties{ // DatabaseName: to.Ptr("syncgroupcrud-7421"), // DatabaseType: to.Ptr(armsql.SyncMemberDbTypeAzureSQLDatabase), // PrivateEndpointName: to.Ptr("PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncmembercrud-4879"), // ServerName: to.Ptr("syncgroupcrud-3379.database.windows.net"), // SyncDirection: to.Ptr(armsql.SyncDirectionBidirectional), // SyncMemberAzureDatabaseResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328"), // SyncState: to.Ptr(armsql.SyncMemberStateUnProvisioned), // UsePrivateLinkConnection: to.Ptr(true), // UserName: to.Ptr("myUser"), // }, // } }
Output:
func (*SyncMembersClient) Get ¶
func (client *SyncMembersClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, options *SyncMembersClientGetOptions) (SyncMembersClientGetResponse, error)
Get - Gets a sync member. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database on which the sync group is hosted.
- syncGroupName - The name of the sync group on which the sync member is hosted.
- syncMemberName - The name of the sync member.
- options - SyncMembersClientGetOptions contains the optional parameters for the SyncMembersClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSyncMembersClient().Get(ctx, "syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", "syncmembercrud-4879", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SyncMember = armsql.SyncMember{ // Name: to.Ptr("syncmembercrud-4879"), // Type: to.Ptr("Microsoft.Sql/servers/databases/syncGroups/syncMembers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187/syncMembers/syncmembercrud-4879"), // Properties: &armsql.SyncMemberProperties{ // DatabaseName: to.Ptr("syncgroupcrud-7421"), // DatabaseType: to.Ptr(armsql.SyncMemberDbTypeAzureSQLDatabase), // PrivateEndpointName: to.Ptr("PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncmembercrud-4879"), // ServerName: to.Ptr("syncgroupcrud-3379.database.windows.net"), // SyncDirection: to.Ptr(armsql.SyncDirectionBidirectional), // SyncMemberAzureDatabaseResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328"), // SyncState: to.Ptr(armsql.SyncMemberStateUnProvisioned), // UsePrivateLinkConnection: to.Ptr(true), // UserName: to.Ptr("myUser"), // }, // } }
Output:
func (*SyncMembersClient) NewListBySyncGroupPager ¶ added in v0.5.0
func (client *SyncMembersClient) NewListBySyncGroupPager(resourceGroupName string, serverName string, databaseName string, syncGroupName string, options *SyncMembersClientListBySyncGroupOptions) *runtime.Pager[SyncMembersClientListBySyncGroupResponse]
NewListBySyncGroupPager - Lists sync members in the given sync group.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database on which the sync group is hosted.
- syncGroupName - The name of the sync group.
- options - SyncMembersClientListBySyncGroupOptions contains the optional parameters for the SyncMembersClient.NewListBySyncGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberListBySyncGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSyncMembersClient().NewListBySyncGroupPager("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SyncMemberListResult = armsql.SyncMemberListResult{ // Value: []*armsql.SyncMember{ // { // Name: to.Ptr("syncmembercrud-4879"), // Type: to.Ptr("Microsoft.Sql/servers/databases/syncGroups/syncMembers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187/syncMembers/syncmembercrud-4879"), // Properties: &armsql.SyncMemberProperties{ // DatabaseName: to.Ptr("syncgroupcrud-7421"), // DatabaseType: to.Ptr(armsql.SyncMemberDbTypeAzureSQLDatabase), // PrivateEndpointName: to.Ptr("PE_67FDBBD6-B2D8-4014-9CC6-C68ABBCFD481_syncmembercrud-4879"), // ServerName: to.Ptr("syncgroupcrud-3379.database.windows.net"), // SyncDirection: to.Ptr(armsql.SyncDirectionBidirectional), // SyncMemberAzureDatabaseResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328"), // SyncState: to.Ptr(armsql.SyncMemberStateUnProvisioned), // UsePrivateLinkConnection: to.Ptr(true), // UserName: to.Ptr("myUser"), // }, // }}, // } } }
Output:
func (*SyncMembersClient) NewListMemberSchemasPager ¶ added in v0.5.0
func (client *SyncMembersClient) NewListMemberSchemasPager(resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, options *SyncMembersClientListMemberSchemasOptions) *runtime.Pager[SyncMembersClientListMemberSchemasResponse]
NewListMemberSchemasPager - Gets a sync member database schema.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database on which the sync group is hosted.
- syncGroupName - The name of the sync group on which the sync member is hosted.
- syncMemberName - The name of the sync member.
- options - SyncMembersClientListMemberSchemasOptions contains the optional parameters for the SyncMembersClient.NewListMemberSchemasPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberGetSchema.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSyncMembersClient().NewListMemberSchemasPager("syncgroupcrud-65440", "syncgroupcrud-8475", "syncgroupcrud-4328", "syncgroupcrud-3187", "syncgroupcrud-4879", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SyncFullSchemaPropertiesListResult = armsql.SyncFullSchemaPropertiesListResult{ // Value: []*armsql.SyncFullSchemaProperties{ // { // LastUpdateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-05-30T07:16:08.210Z"); return t}()), // Tables: []*armsql.SyncFullSchemaTable{ // { // Name: to.Ptr("dbo.myTable"), // Columns: []*armsql.SyncFullSchemaTableColumn{ // { // Name: to.Ptr("intField"), // DataSize: to.Ptr("4"), // DataType: to.Ptr("int"), // HasError: to.Ptr(false), // IsPrimaryKey: to.Ptr(false), // QuotedName: to.Ptr("[intField]"), // }, // { // Name: to.Ptr("charField"), // DataSize: to.Ptr("100"), // DataType: to.Ptr("nvarchar"), // HasError: to.Ptr(false), // IsPrimaryKey: to.Ptr(false), // QuotedName: to.Ptr("[charField]"), // }}, // ErrorID: to.Ptr("Schema_TableHasNoPrimaryKey"), // HasError: to.Ptr(true), // QuotedName: to.Ptr("[dbo].[myTable]"), // }}, // }}, // } } }
Output:
type SyncMembersClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type SyncMembersClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncMembersClientBeginCreateOrUpdateOptions contains the optional parameters for the SyncMembersClient.BeginCreateOrUpdate method.
type SyncMembersClientBeginDeleteOptions ¶ added in v0.3.0
type SyncMembersClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncMembersClientBeginDeleteOptions contains the optional parameters for the SyncMembersClient.BeginDelete method.
type SyncMembersClientBeginRefreshMemberSchemaOptions ¶ added in v0.3.0
type SyncMembersClientBeginRefreshMemberSchemaOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncMembersClientBeginRefreshMemberSchemaOptions contains the optional parameters for the SyncMembersClient.BeginRefreshMemberSchema method.
type SyncMembersClientBeginUpdateOptions ¶ added in v0.3.0
type SyncMembersClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncMembersClientBeginUpdateOptions contains the optional parameters for the SyncMembersClient.BeginUpdate method.
type SyncMembersClientCreateOrUpdateResponse ¶ added in v0.3.0
type SyncMembersClientCreateOrUpdateResponse struct { // An Azure SQL Database sync member. SyncMember }
SyncMembersClientCreateOrUpdateResponse contains the response from method SyncMembersClient.BeginCreateOrUpdate.
type SyncMembersClientDeleteResponse ¶ added in v0.3.0
type SyncMembersClientDeleteResponse struct { }
SyncMembersClientDeleteResponse contains the response from method SyncMembersClient.BeginDelete.
type SyncMembersClientGetOptions ¶ added in v0.3.0
type SyncMembersClientGetOptions struct { }
SyncMembersClientGetOptions contains the optional parameters for the SyncMembersClient.Get method.
type SyncMembersClientGetResponse ¶ added in v0.3.0
type SyncMembersClientGetResponse struct { // An Azure SQL Database sync member. SyncMember }
SyncMembersClientGetResponse contains the response from method SyncMembersClient.Get.
type SyncMembersClientListBySyncGroupOptions ¶ added in v0.3.0
type SyncMembersClientListBySyncGroupOptions struct { }
SyncMembersClientListBySyncGroupOptions contains the optional parameters for the SyncMembersClient.NewListBySyncGroupPager method.
type SyncMembersClientListBySyncGroupResponse ¶ added in v0.3.0
type SyncMembersClientListBySyncGroupResponse struct { // A list of Azure SQL Database sync members. SyncMemberListResult }
SyncMembersClientListBySyncGroupResponse contains the response from method SyncMembersClient.NewListBySyncGroupPager.
type SyncMembersClientListMemberSchemasOptions ¶ added in v0.3.0
type SyncMembersClientListMemberSchemasOptions struct { }
SyncMembersClientListMemberSchemasOptions contains the optional parameters for the SyncMembersClient.NewListMemberSchemasPager method.
type SyncMembersClientListMemberSchemasResponse ¶ added in v0.3.0
type SyncMembersClientListMemberSchemasResponse struct { // A list of sync schema properties. SyncFullSchemaPropertiesListResult }
SyncMembersClientListMemberSchemasResponse contains the response from method SyncMembersClient.NewListMemberSchemasPager.
type SyncMembersClientRefreshMemberSchemaResponse ¶ added in v0.3.0
type SyncMembersClientRefreshMemberSchemaResponse struct { }
SyncMembersClientRefreshMemberSchemaResponse contains the response from method SyncMembersClient.BeginRefreshMemberSchema.
type SyncMembersClientUpdateResponse ¶ added in v0.3.0
type SyncMembersClientUpdateResponse struct { // An Azure SQL Database sync member. SyncMember }
SyncMembersClientUpdateResponse contains the response from method SyncMembersClient.BeginUpdate.
type SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time // The identity that created the resource. CreatedBy *string // The type of identity that created the resource. CreatedByType *CreatedByType // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time // The identity that last modified the resource. LastModifiedBy *string // The type of identity that last modified the resource. LastModifiedByType *CreatedByType }
SystemData - Metadata pertaining to creation and last modification of the resource.
func (SystemData) MarshalJSON ¶
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶
func (s *SystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.
type TableTemporalType ¶
type TableTemporalType string
TableTemporalType - The table temporal type.
const ( TableTemporalTypeHistoryTable TableTemporalType = "HistoryTable" TableTemporalTypeNonTemporalTable TableTemporalType = "NonTemporalTable" TableTemporalTypeSystemVersionedTemporalTable TableTemporalType = "SystemVersionedTemporalTable" )
func PossibleTableTemporalTypeValues ¶
func PossibleTableTemporalTypeValues() []TableTemporalType
PossibleTableTemporalTypeValues returns the possible values for the TableTemporalType const type.
type TdeCertificate ¶
type TdeCertificate struct { // Resource properties. Properties *TdeCertificateProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
TdeCertificate - A TDE certificate that can be uploaded into a server.
func (TdeCertificate) MarshalJSON ¶
func (t TdeCertificate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TdeCertificate.
func (*TdeCertificate) UnmarshalJSON ¶ added in v1.1.0
func (t *TdeCertificate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TdeCertificate.
type TdeCertificateProperties ¶
type TdeCertificateProperties struct { // REQUIRED; The base64 encoded certificate private blob. PrivateBlob *string // The certificate password. CertPassword *string }
TdeCertificateProperties - Properties of a TDE certificate.
func (TdeCertificateProperties) MarshalJSON ¶ added in v1.1.0
func (t TdeCertificateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TdeCertificateProperties.
func (*TdeCertificateProperties) UnmarshalJSON ¶ added in v1.1.0
func (t *TdeCertificateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TdeCertificateProperties.
type TdeCertificatesClient ¶
type TdeCertificatesClient struct {
// contains filtered or unexported fields
}
TdeCertificatesClient contains the methods for the TdeCertificates group. Don't use this type directly, use NewTdeCertificatesClient() instead.
func NewTdeCertificatesClient ¶
func NewTdeCertificatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TdeCertificatesClient, error)
NewTdeCertificatesClient creates a new instance of TdeCertificatesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*TdeCertificatesClient) BeginCreate ¶
func (client *TdeCertificatesClient) BeginCreate(ctx context.Context, resourceGroupName string, serverName string, parameters TdeCertificate, options *TdeCertificatesClientBeginCreateOptions) (*runtime.Poller[TdeCertificatesClientCreateResponse], error)
BeginCreate - Creates a TDE certificate for a given server. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- parameters - The requested TDE certificate to be created or updated.
- options - TdeCertificatesClientBeginCreateOptions contains the optional parameters for the TdeCertificatesClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SqlTdeCertificateCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewTdeCertificatesClient().BeginCreate(ctx, "testtdecert", "testtdecert", armsql.TdeCertificate{ Properties: &armsql.TdeCertificateProperties{ PrivateBlob: to.Ptr("MIIXXXXXXXX"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
type TdeCertificatesClientBeginCreateOptions ¶ added in v0.3.0
type TdeCertificatesClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
TdeCertificatesClientBeginCreateOptions contains the optional parameters for the TdeCertificatesClient.BeginCreate method.
type TdeCertificatesClientCreateResponse ¶ added in v0.3.0
type TdeCertificatesClientCreateResponse struct { }
TdeCertificatesClientCreateResponse contains the response from method TdeCertificatesClient.BeginCreate.
type TimeZone ¶
type TimeZone struct { // Resource properties. Properties *TimeZoneProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
TimeZone - Time Zone.
func (TimeZone) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type TimeZone.
func (*TimeZone) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type TimeZone.
type TimeZoneListResult ¶
type TimeZoneListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*TimeZone }
TimeZoneListResult - A list of time zones.
func (TimeZoneListResult) MarshalJSON ¶
func (t TimeZoneListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TimeZoneListResult.
func (*TimeZoneListResult) UnmarshalJSON ¶ added in v1.1.0
func (t *TimeZoneListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TimeZoneListResult.
type TimeZoneProperties ¶
type TimeZoneProperties struct { // READ-ONLY; The time zone display name DisplayName *string // READ-ONLY; The time zone id TimeZoneID *string }
TimeZoneProperties - The properties of a time zone.
func (TimeZoneProperties) MarshalJSON ¶ added in v1.1.0
func (t TimeZoneProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TimeZoneProperties.
func (*TimeZoneProperties) UnmarshalJSON ¶ added in v1.1.0
func (t *TimeZoneProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TimeZoneProperties.
type TimeZonesClient ¶
type TimeZonesClient struct {
// contains filtered or unexported fields
}
TimeZonesClient contains the methods for the TimeZones group. Don't use this type directly, use NewTimeZonesClient() instead.
func NewTimeZonesClient ¶
func NewTimeZonesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TimeZonesClient, error)
NewTimeZonesClient creates a new instance of TimeZonesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*TimeZonesClient) Get ¶
func (client *TimeZonesClient) Get(ctx context.Context, locationName string, timeZoneID string, options *TimeZonesClientGetOptions) (TimeZonesClientGetResponse, error)
Get - Gets a managed instance time zone. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- options - TimeZonesClientGetOptions contains the optional parameters for the TimeZonesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceTimeZoneGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewTimeZonesClient().Get(ctx, "canadaeast", "Haiti Standard Time", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.TimeZone = armsql.TimeZone{ // Name: to.Ptr("Haiti Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Haiti Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-05:00) Haiti"), // TimeZoneID: to.Ptr("Haiti Standard Time"), // }, // } }
Output:
func (*TimeZonesClient) NewListByLocationPager ¶ added in v0.5.0
func (client *TimeZonesClient) NewListByLocationPager(locationName string, options *TimeZonesClientListByLocationOptions) *runtime.Pager[TimeZonesClientListByLocationResponse]
NewListByLocationPager - Gets a list of managed instance time zones by location.
Generated from API version 2020-11-01-preview
- options - TimeZonesClientListByLocationOptions contains the optional parameters for the TimeZonesClient.NewListByLocationPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceTimeZoneListByLocation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewTimeZonesClient().NewListByLocationPager("canadaeast", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.TimeZoneListResult = armsql.TimeZoneListResult{ // Value: []*armsql.TimeZone{ // { // Name: to.Ptr("Afghanistan Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Afghanistan Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+04:30) Kabul"), // TimeZoneID: to.Ptr("Afghanistan Standard Time"), // }, // }, // { // Name: to.Ptr("Alaskan Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Alaskan Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-09:00) Alaska"), // TimeZoneID: to.Ptr("Alaskan Standard Time"), // }, // }, // { // Name: to.Ptr("Aleutian Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Aleutian Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-10:00) Aleutian Islands"), // TimeZoneID: to.Ptr("Aleutian Standard Time"), // }, // }, // { // Name: to.Ptr("Altai Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Altai Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+07:00) Barnaul, Gorno-Altaysk"), // TimeZoneID: to.Ptr("Altai Standard Time"), // }, // }, // { // Name: to.Ptr("Arab Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Arab Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+03:00) Kuwait, Riyadh"), // TimeZoneID: to.Ptr("Arab Standard Time"), // }, // }, // { // Name: to.Ptr("Arabian Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Arabian Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+04:00) Abu Dhabi, Muscat"), // TimeZoneID: to.Ptr("Arabian Standard Time"), // }, // }, // { // Name: to.Ptr("Arabic Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Arabic Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+03:00) Baghdad"), // TimeZoneID: to.Ptr("Arabic Standard Time"), // }, // }, // { // Name: to.Ptr("Argentina Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Argentina Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-03:00) City of Buenos Aires"), // TimeZoneID: to.Ptr("Argentina Standard Time"), // }, // }, // { // Name: to.Ptr("Astrakhan Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Astrakhan Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+04:00) Astrakhan, Ulyanovsk"), // TimeZoneID: to.Ptr("Astrakhan Standard Time"), // }, // }, // { // Name: to.Ptr("Atlantic Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Atlantic Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-04:00) Atlantic Time (Canada)"), // TimeZoneID: to.Ptr("Atlantic Standard Time"), // }, // }, // { // Name: to.Ptr("AUS Central Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/AUS Central Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+09:30) Darwin"), // TimeZoneID: to.Ptr("AUS Central Standard Time"), // }, // }, // { // Name: to.Ptr("Aus Central W. Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Aus Central W. Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+08:45) Eucla"), // TimeZoneID: to.Ptr("Aus Central W. Standard Time"), // }, // }, // { // Name: to.Ptr("AUS Eastern Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/AUS Eastern Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+10:00) Canberra, Melbourne, Sydney"), // TimeZoneID: to.Ptr("AUS Eastern Standard Time"), // }, // }, // { // Name: to.Ptr("Azerbaijan Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Azerbaijan Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+04:00) Baku"), // TimeZoneID: to.Ptr("Azerbaijan Standard Time"), // }, // }, // { // Name: to.Ptr("Azores Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Azores Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-01:00) Azores"), // TimeZoneID: to.Ptr("Azores Standard Time"), // }, // }, // { // Name: to.Ptr("Bahia Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Bahia Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-03:00) Salvador"), // TimeZoneID: to.Ptr("Bahia Standard Time"), // }, // }, // { // Name: to.Ptr("Bangladesh Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Bangladesh Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+06:00) Dhaka"), // TimeZoneID: to.Ptr("Bangladesh Standard Time"), // }, // }, // { // Name: to.Ptr("Belarus Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Belarus Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+03:00) Minsk"), // TimeZoneID: to.Ptr("Belarus Standard Time"), // }, // }, // { // Name: to.Ptr("Bougainville Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Bougainville Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+11:00) Bougainville Island"), // TimeZoneID: to.Ptr("Bougainville Standard Time"), // }, // }, // { // Name: to.Ptr("Canada Central Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Canada Central Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-06:00) Saskatchewan"), // TimeZoneID: to.Ptr("Canada Central Standard Time"), // }, // }, // { // Name: to.Ptr("Cape Verde Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Cape Verde Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-01:00) Cabo Verde Is."), // TimeZoneID: to.Ptr("Cape Verde Standard Time"), // }, // }, // { // Name: to.Ptr("Caucasus Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Caucasus Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+04:00) Yerevan"), // TimeZoneID: to.Ptr("Caucasus Standard Time"), // }, // }, // { // Name: to.Ptr("Cen. Australia Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Cen. Australia Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+09:30) Adelaide"), // TimeZoneID: to.Ptr("Cen. Australia Standard Time"), // }, // }, // { // Name: to.Ptr("Central America Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Central America Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-06:00) Central America"), // TimeZoneID: to.Ptr("Central America Standard Time"), // }, // }, // { // Name: to.Ptr("Central Asia Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Central Asia Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+06:00) Astana"), // TimeZoneID: to.Ptr("Central Asia Standard Time"), // }, // }, // { // Name: to.Ptr("Central Brazilian Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Central Brazilian Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-04:00) Cuiaba"), // TimeZoneID: to.Ptr("Central Brazilian Standard Time"), // }, // }, // { // Name: to.Ptr("Central Europe Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Central Europe Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague"), // TimeZoneID: to.Ptr("Central Europe Standard Time"), // }, // }, // { // Name: to.Ptr("Central European Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Central European Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb"), // TimeZoneID: to.Ptr("Central European Standard Time"), // }, // }, // { // Name: to.Ptr("Central Pacific Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Central Pacific Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+11:00) Solomon Is., New Caledonia"), // TimeZoneID: to.Ptr("Central Pacific Standard Time"), // }, // }, // { // Name: to.Ptr("Central Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Central Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-06:00) Central Time (US & Canada)"), // TimeZoneID: to.Ptr("Central Standard Time"), // }, // }, // { // Name: to.Ptr("Central Standard Time (Mexico)"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Central Standard Time (Mexico)"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-06:00) Guadalajara, Mexico City, Monterrey"), // TimeZoneID: to.Ptr("Central Standard Time (Mexico)"), // }, // }, // { // Name: to.Ptr("Chatham Islands Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Chatham Islands Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+12:45) Chatham Islands"), // TimeZoneID: to.Ptr("Chatham Islands Standard Time"), // }, // }, // { // Name: to.Ptr("China Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/China Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi"), // TimeZoneID: to.Ptr("China Standard Time"), // }, // }, // { // Name: to.Ptr("Cuba Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Cuba Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-05:00) Havana"), // TimeZoneID: to.Ptr("Cuba Standard Time"), // }, // }, // { // Name: to.Ptr("Dateline Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Dateline Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-12:00) International Date Line West"), // TimeZoneID: to.Ptr("Dateline Standard Time"), // }, // }, // { // Name: to.Ptr("E. Africa Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/E. Africa Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+03:00) Nairobi"), // TimeZoneID: to.Ptr("E. Africa Standard Time"), // }, // }, // { // Name: to.Ptr("E. Australia Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/E. Australia Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+10:00) Brisbane"), // TimeZoneID: to.Ptr("E. Australia Standard Time"), // }, // }, // { // Name: to.Ptr("E. Europe Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/E. Europe Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+02:00) Chisinau"), // TimeZoneID: to.Ptr("E. Europe Standard Time"), // }, // }, // { // Name: to.Ptr("E. South America Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/E. South America Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-03:00) Brasilia"), // TimeZoneID: to.Ptr("E. South America Standard Time"), // }, // }, // { // Name: to.Ptr("Easter Island Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Easter Island Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-06:00) Easter Island"), // TimeZoneID: to.Ptr("Easter Island Standard Time"), // }, // }, // { // Name: to.Ptr("Eastern Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Eastern Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-05:00) Eastern Time (US & Canada)"), // TimeZoneID: to.Ptr("Eastern Standard Time"), // }, // }, // { // Name: to.Ptr("Eastern Standard Time (Mexico)"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Eastern Standard Time (Mexico)"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-05:00) Chetumal"), // TimeZoneID: to.Ptr("Eastern Standard Time (Mexico)"), // }, // }, // { // Name: to.Ptr("Egypt Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Egypt Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+02:00) Cairo"), // TimeZoneID: to.Ptr("Egypt Standard Time"), // }, // }, // { // Name: to.Ptr("Ekaterinburg Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Ekaterinburg Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+05:00) Ekaterinburg"), // TimeZoneID: to.Ptr("Ekaterinburg Standard Time"), // }, // }, // { // Name: to.Ptr("Fiji Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Fiji Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+12:00) Fiji"), // TimeZoneID: to.Ptr("Fiji Standard Time"), // }, // }, // { // Name: to.Ptr("FLE Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/FLE Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius"), // TimeZoneID: to.Ptr("FLE Standard Time"), // }, // }, // { // Name: to.Ptr("Georgian Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Georgian Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+04:00) Tbilisi"), // TimeZoneID: to.Ptr("Georgian Standard Time"), // }, // }, // { // Name: to.Ptr("GMT Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/GMT Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+00:00) Dublin, Edinburgh, Lisbon, London"), // TimeZoneID: to.Ptr("GMT Standard Time"), // }, // }, // { // Name: to.Ptr("Greenland Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Greenland Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-03:00) Greenland"), // TimeZoneID: to.Ptr("Greenland Standard Time"), // }, // }, // { // Name: to.Ptr("Greenwich Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Greenwich Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+00:00) Monrovia, Reykjavik"), // TimeZoneID: to.Ptr("Greenwich Standard Time"), // }, // }, // { // Name: to.Ptr("GTB Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/GTB Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+02:00) Athens, Bucharest"), // TimeZoneID: to.Ptr("GTB Standard Time"), // }, // }, // { // Name: to.Ptr("Haiti Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Haiti Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-05:00) Haiti"), // TimeZoneID: to.Ptr("Haiti Standard Time"), // }, // }, // { // Name: to.Ptr("Hawaiian Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Hawaiian Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-10:00) Hawaii"), // TimeZoneID: to.Ptr("Hawaiian Standard Time"), // }, // }, // { // Name: to.Ptr("India Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/India Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi"), // TimeZoneID: to.Ptr("India Standard Time"), // }, // }, // { // Name: to.Ptr("Iran Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Iran Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+03:30) Tehran"), // TimeZoneID: to.Ptr("Iran Standard Time"), // }, // }, // { // Name: to.Ptr("Israel Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Israel Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+02:00) Jerusalem"), // TimeZoneID: to.Ptr("Israel Standard Time"), // }, // }, // { // Name: to.Ptr("Jordan Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Jordan Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+02:00) Amman"), // TimeZoneID: to.Ptr("Jordan Standard Time"), // }, // }, // { // Name: to.Ptr("Kaliningrad Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Kaliningrad Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+02:00) Kaliningrad"), // TimeZoneID: to.Ptr("Kaliningrad Standard Time"), // }, // }, // { // Name: to.Ptr("Kamchatka Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Kamchatka Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+12:00) Petropavlovsk-Kamchatsky - Old"), // TimeZoneID: to.Ptr("Kamchatka Standard Time"), // }, // }, // { // Name: to.Ptr("Korea Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Korea Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+09:00) Seoul"), // TimeZoneID: to.Ptr("Korea Standard Time"), // }, // }, // { // Name: to.Ptr("Libya Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Libya Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+02:00) Tripoli"), // TimeZoneID: to.Ptr("Libya Standard Time"), // }, // }, // { // Name: to.Ptr("Line Islands Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Line Islands Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+14:00) Kiritimati Island"), // TimeZoneID: to.Ptr("Line Islands Standard Time"), // }, // }, // { // Name: to.Ptr("Lord Howe Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Lord Howe Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+10:30) Lord Howe Island"), // TimeZoneID: to.Ptr("Lord Howe Standard Time"), // }, // }, // { // Name: to.Ptr("Magadan Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Magadan Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+11:00) Magadan"), // TimeZoneID: to.Ptr("Magadan Standard Time"), // }, // }, // { // Name: to.Ptr("Magallanes Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Magallanes Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-03:00) Punta Arenas"), // TimeZoneID: to.Ptr("Magallanes Standard Time"), // }, // }, // { // Name: to.Ptr("Marquesas Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Marquesas Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-09:30) Marquesas Islands"), // TimeZoneID: to.Ptr("Marquesas Standard Time"), // }, // }, // { // Name: to.Ptr("Mauritius Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Mauritius Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+04:00) Port Louis"), // TimeZoneID: to.Ptr("Mauritius Standard Time"), // }, // }, // { // Name: to.Ptr("Mid-Atlantic Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Mid-Atlantic Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-02:00) Mid-Atlantic - Old"), // TimeZoneID: to.Ptr("Mid-Atlantic Standard Time"), // }, // }, // { // Name: to.Ptr("Middle East Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Middle East Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+02:00) Beirut"), // TimeZoneID: to.Ptr("Middle East Standard Time"), // }, // }, // { // Name: to.Ptr("Montevideo Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Montevideo Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-03:00) Montevideo"), // TimeZoneID: to.Ptr("Montevideo Standard Time"), // }, // }, // { // Name: to.Ptr("Morocco Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Morocco Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+01:00) Casablanca"), // TimeZoneID: to.Ptr("Morocco Standard Time"), // }, // }, // { // Name: to.Ptr("Mountain Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Mountain Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-07:00) Mountain Time (US & Canada)"), // TimeZoneID: to.Ptr("Mountain Standard Time"), // }, // }, // { // Name: to.Ptr("Mountain Standard Time (Mexico)"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Mountain Standard Time (Mexico)"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-07:00) Chihuahua, La Paz, Mazatlan"), // TimeZoneID: to.Ptr("Mountain Standard Time (Mexico)"), // }, // }, // { // Name: to.Ptr("Myanmar Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Myanmar Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+06:30) Yangon (Rangoon)"), // TimeZoneID: to.Ptr("Myanmar Standard Time"), // }, // }, // { // Name: to.Ptr("N. Central Asia Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/N. Central Asia Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+07:00) Novosibirsk"), // TimeZoneID: to.Ptr("N. Central Asia Standard Time"), // }, // }, // { // Name: to.Ptr("Namibia Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Namibia Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+02:00) Windhoek"), // TimeZoneID: to.Ptr("Namibia Standard Time"), // }, // }, // { // Name: to.Ptr("Nepal Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Nepal Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+05:45) Kathmandu"), // TimeZoneID: to.Ptr("Nepal Standard Time"), // }, // }, // { // Name: to.Ptr("New Zealand Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/New Zealand Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+12:00) Auckland, Wellington"), // TimeZoneID: to.Ptr("New Zealand Standard Time"), // }, // }, // { // Name: to.Ptr("Newfoundland Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Newfoundland Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-03:30) Newfoundland"), // TimeZoneID: to.Ptr("Newfoundland Standard Time"), // }, // }, // { // Name: to.Ptr("Norfolk Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Norfolk Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+11:00) Norfolk Island"), // TimeZoneID: to.Ptr("Norfolk Standard Time"), // }, // }, // { // Name: to.Ptr("North Asia East Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/North Asia East Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+08:00) Irkutsk"), // TimeZoneID: to.Ptr("North Asia East Standard Time"), // }, // }, // { // Name: to.Ptr("North Asia Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/North Asia Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+07:00) Krasnoyarsk"), // TimeZoneID: to.Ptr("North Asia Standard Time"), // }, // }, // { // Name: to.Ptr("North Korea Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/North Korea Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+09:00) Pyongyang"), // TimeZoneID: to.Ptr("North Korea Standard Time"), // }, // }, // { // Name: to.Ptr("Omsk Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Omsk Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+06:00) Omsk"), // TimeZoneID: to.Ptr("Omsk Standard Time"), // }, // }, // { // Name: to.Ptr("Pacific SA Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Pacific SA Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-04:00) Santiago"), // TimeZoneID: to.Ptr("Pacific SA Standard Time"), // }, // }, // { // Name: to.Ptr("Pacific Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Pacific Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-08:00) Pacific Time (US & Canada)"), // TimeZoneID: to.Ptr("Pacific Standard Time"), // }, // }, // { // Name: to.Ptr("Pacific Standard Time (Mexico)"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Pacific Standard Time (Mexico)"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-08:00) Baja California"), // TimeZoneID: to.Ptr("Pacific Standard Time (Mexico)"), // }, // }, // { // Name: to.Ptr("Pakistan Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Pakistan Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+05:00) Islamabad, Karachi"), // TimeZoneID: to.Ptr("Pakistan Standard Time"), // }, // }, // { // Name: to.Ptr("Paraguay Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Paraguay Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-04:00) Asuncion"), // TimeZoneID: to.Ptr("Paraguay Standard Time"), // }, // }, // { // Name: to.Ptr("Qyzylorda Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Qyzylorda Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+05:00) Qyzylorda"), // TimeZoneID: to.Ptr("Qyzylorda Standard Time"), // }, // }, // { // Name: to.Ptr("Romance Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Romance Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+01:00) Brussels, Copenhagen, Madrid, Paris"), // TimeZoneID: to.Ptr("Romance Standard Time"), // }, // }, // { // Name: to.Ptr("Russia Time Zone 10"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Russia Time Zone 10"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+11:00) Chokurdakh"), // TimeZoneID: to.Ptr("Russia Time Zone 10"), // }, // }, // { // Name: to.Ptr("Russia Time Zone 11"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Russia Time Zone 11"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+12:00) Anadyr, Petropavlovsk-Kamchatsky"), // TimeZoneID: to.Ptr("Russia Time Zone 11"), // }, // }, // { // Name: to.Ptr("Russia Time Zone 3"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Russia Time Zone 3"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+04:00) Izhevsk, Samara"), // TimeZoneID: to.Ptr("Russia Time Zone 3"), // }, // }, // { // Name: to.Ptr("Russian Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Russian Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+03:00) Moscow, St. Petersburg"), // TimeZoneID: to.Ptr("Russian Standard Time"), // }, // }, // { // Name: to.Ptr("SA Eastern Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/SA Eastern Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-03:00) Cayenne, Fortaleza"), // TimeZoneID: to.Ptr("SA Eastern Standard Time"), // }, // }, // { // Name: to.Ptr("SA Pacific Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/SA Pacific Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-05:00) Bogota, Lima, Quito, Rio Branco"), // TimeZoneID: to.Ptr("SA Pacific Standard Time"), // }, // }, // { // Name: to.Ptr("SA Western Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/SA Western Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-04:00) Georgetown, La Paz, Manaus, San Juan"), // TimeZoneID: to.Ptr("SA Western Standard Time"), // }, // }, // { // Name: to.Ptr("Saint Pierre Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Saint Pierre Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-03:00) Saint Pierre and Miquelon"), // TimeZoneID: to.Ptr("Saint Pierre Standard Time"), // }, // }, // { // Name: to.Ptr("Sakhalin Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Sakhalin Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+11:00) Sakhalin"), // TimeZoneID: to.Ptr("Sakhalin Standard Time"), // }, // }, // { // Name: to.Ptr("Samoa Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Samoa Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+13:00) Samoa"), // TimeZoneID: to.Ptr("Samoa Standard Time"), // }, // }, // { // Name: to.Ptr("Sao Tome Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Sao Tome Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+00:00) Sao Tome"), // TimeZoneID: to.Ptr("Sao Tome Standard Time"), // }, // }, // { // Name: to.Ptr("Saratov Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Saratov Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+04:00) Saratov"), // TimeZoneID: to.Ptr("Saratov Standard Time"), // }, // }, // { // Name: to.Ptr("SE Asia Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/SE Asia Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+07:00) Bangkok, Hanoi, Jakarta"), // TimeZoneID: to.Ptr("SE Asia Standard Time"), // }, // }, // { // Name: to.Ptr("Singapore Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Singapore Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+08:00) Kuala Lumpur, Singapore"), // TimeZoneID: to.Ptr("Singapore Standard Time"), // }, // }, // { // Name: to.Ptr("South Africa Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/South Africa Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+02:00) Harare, Pretoria"), // TimeZoneID: to.Ptr("South Africa Standard Time"), // }, // }, // { // Name: to.Ptr("Sri Lanka Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Sri Lanka Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+05:30) Sri Jayawardenepura"), // TimeZoneID: to.Ptr("Sri Lanka Standard Time"), // }, // }, // { // Name: to.Ptr("Sudan Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Sudan Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+02:00) Khartoum"), // TimeZoneID: to.Ptr("Sudan Standard Time"), // }, // }, // { // Name: to.Ptr("Syria Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Syria Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+02:00) Damascus"), // TimeZoneID: to.Ptr("Syria Standard Time"), // }, // }, // { // Name: to.Ptr("Taipei Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Taipei Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+08:00) Taipei"), // TimeZoneID: to.Ptr("Taipei Standard Time"), // }, // }, // { // Name: to.Ptr("Tasmania Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Tasmania Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+10:00) Hobart"), // TimeZoneID: to.Ptr("Tasmania Standard Time"), // }, // }, // { // Name: to.Ptr("Tocantins Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Tocantins Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-03:00) Araguaina"), // TimeZoneID: to.Ptr("Tocantins Standard Time"), // }, // }, // { // Name: to.Ptr("Tokyo Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Tokyo Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+09:00) Osaka, Sapporo, Tokyo"), // TimeZoneID: to.Ptr("Tokyo Standard Time"), // }, // }, // { // Name: to.Ptr("Tomsk Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Tomsk Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+07:00) Tomsk"), // TimeZoneID: to.Ptr("Tomsk Standard Time"), // }, // }, // { // Name: to.Ptr("Tonga Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Tonga Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+13:00) Nuku'alofa"), // TimeZoneID: to.Ptr("Tonga Standard Time"), // }, // }, // { // Name: to.Ptr("Transbaikal Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Transbaikal Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+09:00) Chita"), // TimeZoneID: to.Ptr("Transbaikal Standard Time"), // }, // }, // { // Name: to.Ptr("Turkey Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Turkey Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+03:00) Istanbul"), // TimeZoneID: to.Ptr("Turkey Standard Time"), // }, // }, // { // Name: to.Ptr("Turks And Caicos Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Turks And Caicos Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-05:00) Turks and Caicos"), // TimeZoneID: to.Ptr("Turks And Caicos Standard Time"), // }, // }, // { // Name: to.Ptr("Ulaanbaatar Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Ulaanbaatar Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+08:00) Ulaanbaatar"), // TimeZoneID: to.Ptr("Ulaanbaatar Standard Time"), // }, // }, // { // Name: to.Ptr("US Eastern Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/US Eastern Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-05:00) Indiana (East)"), // TimeZoneID: to.Ptr("US Eastern Standard Time"), // }, // }, // { // Name: to.Ptr("US Mountain Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/US Mountain Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-07:00) Arizona"), // TimeZoneID: to.Ptr("US Mountain Standard Time"), // }, // }, // { // Name: to.Ptr("UTC"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/UTC"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC) Coordinated Universal Time"), // TimeZoneID: to.Ptr("UTC"), // }, // }, // { // Name: to.Ptr("UTC+12"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/UTC+12"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+12:00) Coordinated Universal Time+12"), // TimeZoneID: to.Ptr("UTC+12"), // }, // }, // { // Name: to.Ptr("UTC+13"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/UTC+13"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+13:00) Coordinated Universal Time+13"), // TimeZoneID: to.Ptr("UTC+13"), // }, // }, // { // Name: to.Ptr("UTC-02"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/UTC-02"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-02:00) Coordinated Universal Time-02"), // TimeZoneID: to.Ptr("UTC-02"), // }, // }, // { // Name: to.Ptr("UTC-08"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/UTC-08"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-08:00) Coordinated Universal Time-08"), // TimeZoneID: to.Ptr("UTC-08"), // }, // }, // { // Name: to.Ptr("UTC-09"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/UTC-09"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-09:00) Coordinated Universal Time-09"), // TimeZoneID: to.Ptr("UTC-09"), // }, // }, // { // Name: to.Ptr("UTC-11"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/UTC-11"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-11:00) Coordinated Universal Time-11"), // TimeZoneID: to.Ptr("UTC-11"), // }, // }, // { // Name: to.Ptr("Venezuela Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Venezuela Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC-04:00) Caracas"), // TimeZoneID: to.Ptr("Venezuela Standard Time"), // }, // }, // { // Name: to.Ptr("Vladivostok Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Vladivostok Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+10:00) Vladivostok"), // TimeZoneID: to.Ptr("Vladivostok Standard Time"), // }, // }, // { // Name: to.Ptr("Volgograd Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Volgograd Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+04:00) Volgograd"), // TimeZoneID: to.Ptr("Volgograd Standard Time"), // }, // }, // { // Name: to.Ptr("W. Australia Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/W. Australia Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+08:00) Perth"), // TimeZoneID: to.Ptr("W. Australia Standard Time"), // }, // }, // { // Name: to.Ptr("W. Central Africa Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/W. Central Africa Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+01:00) West Central Africa"), // TimeZoneID: to.Ptr("W. Central Africa Standard Time"), // }, // }, // { // Name: to.Ptr("W. Europe Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/W. Europe Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna"), // TimeZoneID: to.Ptr("W. Europe Standard Time"), // }, // }, // { // Name: to.Ptr("W. Mongolia Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/W. Mongolia Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+07:00) Hovd"), // TimeZoneID: to.Ptr("W. Mongolia Standard Time"), // }, // }, // { // Name: to.Ptr("West Asia Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/West Asia Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+05:00) Ashgabat, Tashkent"), // TimeZoneID: to.Ptr("West Asia Standard Time"), // }, // }, // { // Name: to.Ptr("West Bank Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/West Bank Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+02:00) Gaza, Hebron"), // TimeZoneID: to.Ptr("West Bank Standard Time"), // }, // }, // { // Name: to.Ptr("West Pacific Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/West Pacific Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+10:00) Guam, Port Moresby"), // TimeZoneID: to.Ptr("West Pacific Standard Time"), // }, // }, // { // Name: to.Ptr("Yakutsk Standard Time"), // Type: to.Ptr("Microsoft.Sql/locations/timeZones"), // ID: to.Ptr("/subscriptions/37d5e605-6142-4d79-b564-28b6dbfeec0f/providers/Microsoft.Sql/locations/onebox/timeZones/Yakutsk Standard Time"), // Properties: &armsql.TimeZoneProperties{ // DisplayName: to.Ptr("(UTC+09:00) Yakutsk"), // TimeZoneID: to.Ptr("Yakutsk Standard Time"), // }, // }}, // } } }
Output:
type TimeZonesClientGetOptions ¶ added in v0.3.0
type TimeZonesClientGetOptions struct { }
TimeZonesClientGetOptions contains the optional parameters for the TimeZonesClient.Get method.
type TimeZonesClientGetResponse ¶ added in v0.3.0
type TimeZonesClientGetResponse struct { // Time Zone. TimeZone }
TimeZonesClientGetResponse contains the response from method TimeZonesClient.Get.
type TimeZonesClientListByLocationOptions ¶ added in v0.3.0
type TimeZonesClientListByLocationOptions struct { }
TimeZonesClientListByLocationOptions contains the optional parameters for the TimeZonesClient.NewListByLocationPager method.
type TimeZonesClientListByLocationResponse ¶ added in v0.3.0
type TimeZonesClientListByLocationResponse struct { // A list of time zones. TimeZoneListResult }
TimeZonesClientListByLocationResponse contains the response from method TimeZonesClient.NewListByLocationPager.
type TopQueries ¶
type TopQueries struct { // List of top resource consuming queries with appropriate metric data Queries []*QueryStatisticsProperties // READ-ONLY; Aggregation function used to calculate query metrics. AggregationFunction *string // READ-ONLY; The end time for the metric (ISO-8601 format). EndTime *string // READ-ONLY; Interval type (length). IntervalType *QueryTimeGrainType // READ-ONLY; Requested number of top queries. NumberOfQueries *int32 // READ-ONLY; Metric used to rank queries. ObservationMetric *string // READ-ONLY; The start time for the metric (ISO-8601 format). StartTime *string }
func (TopQueries) MarshalJSON ¶
func (t TopQueries) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TopQueries.
func (*TopQueries) UnmarshalJSON ¶ added in v1.1.0
func (t *TopQueries) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TopQueries.
type TopQueriesListResult ¶
type TopQueriesListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*TopQueries }
TopQueriesListResult - A list of top resource consuming queries on managed instance
func (TopQueriesListResult) MarshalJSON ¶
func (t TopQueriesListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TopQueriesListResult.
func (*TopQueriesListResult) UnmarshalJSON ¶ added in v1.1.0
func (t *TopQueriesListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TopQueriesListResult.
type TrackedResource ¶
type TrackedResource struct { // REQUIRED; Resource location. Location *string // Resource tags. Tags map[string]*string // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
TrackedResource - ARM tracked top level resource.
func (TrackedResource) MarshalJSON ¶
func (t TrackedResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TrackedResource.
func (*TrackedResource) UnmarshalJSON ¶ added in v1.1.0
func (t *TrackedResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.
type TransparentDataEncryptionName ¶
type TransparentDataEncryptionName string
const (
TransparentDataEncryptionNameCurrent TransparentDataEncryptionName = "current"
)
func PossibleTransparentDataEncryptionNameValues ¶
func PossibleTransparentDataEncryptionNameValues() []TransparentDataEncryptionName
PossibleTransparentDataEncryptionNameValues returns the possible values for the TransparentDataEncryptionName const type.
type TransparentDataEncryptionProperties ¶
type TransparentDataEncryptionProperties struct { // REQUIRED; Specifies the state of the transparent data encryption. State *TransparentDataEncryptionState }
TransparentDataEncryptionProperties - Properties of a transparent data encryption.
func (TransparentDataEncryptionProperties) MarshalJSON ¶ added in v1.1.0
func (t TransparentDataEncryptionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TransparentDataEncryptionProperties.
func (*TransparentDataEncryptionProperties) UnmarshalJSON ¶ added in v1.1.0
func (t *TransparentDataEncryptionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TransparentDataEncryptionProperties.
type TransparentDataEncryptionState ¶
type TransparentDataEncryptionState string
TransparentDataEncryptionState - Specifies the state of the transparent data encryption.
const ( TransparentDataEncryptionStateDisabled TransparentDataEncryptionState = "Disabled" TransparentDataEncryptionStateEnabled TransparentDataEncryptionState = "Enabled" )
func PossibleTransparentDataEncryptionStateValues ¶
func PossibleTransparentDataEncryptionStateValues() []TransparentDataEncryptionState
PossibleTransparentDataEncryptionStateValues returns the possible values for the TransparentDataEncryptionState const type.
type TransparentDataEncryptionsClient ¶
type TransparentDataEncryptionsClient struct {
// contains filtered or unexported fields
}
TransparentDataEncryptionsClient contains the methods for the TransparentDataEncryptions group. Don't use this type directly, use NewTransparentDataEncryptionsClient() instead.
func NewTransparentDataEncryptionsClient ¶
func NewTransparentDataEncryptionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TransparentDataEncryptionsClient, error)
NewTransparentDataEncryptionsClient creates a new instance of TransparentDataEncryptionsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*TransparentDataEncryptionsClient) CreateOrUpdate ¶
func (client *TransparentDataEncryptionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, tdeName TransparentDataEncryptionName, parameters LogicalDatabaseTransparentDataEncryption, options *TransparentDataEncryptionsClientCreateOrUpdateOptions) (TransparentDataEncryptionsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Updates a logical database's transparent data encryption configuration. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-02-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the logical database for which the security alert policy is defined.
- tdeName - The name of the transparent data encryption configuration.
- parameters - The database transparent data encryption.
- options - TransparentDataEncryptionsClientCreateOrUpdateOptions contains the optional parameters for the TransparentDataEncryptionsClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/TransparentDataEncryptionUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewTransparentDataEncryptionsClient().CreateOrUpdate(ctx, "securitytde-42-rg", "securitytde-42", "testdb", armsql.TransparentDataEncryptionNameCurrent, armsql.LogicalDatabaseTransparentDataEncryption{ Properties: &armsql.TransparentDataEncryptionProperties{ State: to.Ptr(armsql.TransparentDataEncryptionStateEnabled), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.LogicalDatabaseTransparentDataEncryption = armsql.LogicalDatabaseTransparentDataEncryption{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/servers/databases/transparentDataEncryption"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securitytde-42-rg/providers/Microsoft.Sql/servers/securitytde-42/databases/testdb/transparentDataEncryption"), // Properties: &armsql.TransparentDataEncryptionProperties{ // State: to.Ptr(armsql.TransparentDataEncryptionStateEnabled), // }, // } }
Output:
func (*TransparentDataEncryptionsClient) Get ¶
func (client *TransparentDataEncryptionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, tdeName TransparentDataEncryptionName, options *TransparentDataEncryptionsClientGetOptions) (TransparentDataEncryptionsClientGetResponse, error)
Get - Gets a logical database's transparent data encryption. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2021-02-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the logical database for which the transparent data encryption is defined.
- tdeName - The name of the transparent data encryption configuration.
- options - TransparentDataEncryptionsClientGetOptions contains the optional parameters for the TransparentDataEncryptionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/TransparentDataEncryptionGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewTransparentDataEncryptionsClient().Get(ctx, "security-tde-resourcegroup", "securitytde", "testdb", armsql.TransparentDataEncryptionNameCurrent, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.LogicalDatabaseTransparentDataEncryption = armsql.LogicalDatabaseTransparentDataEncryption{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/servers/databases/transparentDataEncryption"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/security-tde-resourcegroup/providers/Microsoft.Sql/servers/securitytde/databases/testdb"), // Properties: &armsql.TransparentDataEncryptionProperties{ // State: to.Ptr(armsql.TransparentDataEncryptionStateEnabled), // }, // } }
Output:
func (*TransparentDataEncryptionsClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *TransparentDataEncryptionsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *TransparentDataEncryptionsClientListByDatabaseOptions) *runtime.Pager[TransparentDataEncryptionsClientListByDatabaseResponse]
NewListByDatabasePager - Gets a list of the logical database's transparent data encryption.
Generated from API version 2021-02-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the logical database for which the transparent data encryption is defined.
- options - TransparentDataEncryptionsClientListByDatabaseOptions contains the optional parameters for the TransparentDataEncryptionsClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/TransparentDataEncryptionList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewTransparentDataEncryptionsClient().NewListByDatabasePager("security-tde-resourcegroup", "securitytde", "testdb", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.LogicalDatabaseTransparentDataEncryptionListResult = armsql.LogicalDatabaseTransparentDataEncryptionListResult{ // Value: []*armsql.LogicalDatabaseTransparentDataEncryption{ // { // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/servers/databases/transparentDataEncryption"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/security-tde-resourcegroup/providers/Microsoft.Sql/servers/securitytde/databases/testdb"), // Properties: &armsql.TransparentDataEncryptionProperties{ // State: to.Ptr(armsql.TransparentDataEncryptionStateEnabled), // }, // }}, // } } }
Output:
type TransparentDataEncryptionsClientCreateOrUpdateOptions ¶ added in v0.3.0
type TransparentDataEncryptionsClientCreateOrUpdateOptions struct { }
TransparentDataEncryptionsClientCreateOrUpdateOptions contains the optional parameters for the TransparentDataEncryptionsClient.CreateOrUpdate method.
type TransparentDataEncryptionsClientCreateOrUpdateResponse ¶ added in v0.3.0
type TransparentDataEncryptionsClientCreateOrUpdateResponse struct { // A logical database transparent data encryption state. LogicalDatabaseTransparentDataEncryption }
TransparentDataEncryptionsClientCreateOrUpdateResponse contains the response from method TransparentDataEncryptionsClient.CreateOrUpdate.
type TransparentDataEncryptionsClientGetOptions ¶ added in v0.3.0
type TransparentDataEncryptionsClientGetOptions struct { }
TransparentDataEncryptionsClientGetOptions contains the optional parameters for the TransparentDataEncryptionsClient.Get method.
type TransparentDataEncryptionsClientGetResponse ¶ added in v0.3.0
type TransparentDataEncryptionsClientGetResponse struct { // A logical database transparent data encryption state. LogicalDatabaseTransparentDataEncryption }
TransparentDataEncryptionsClientGetResponse contains the response from method TransparentDataEncryptionsClient.Get.
type TransparentDataEncryptionsClientListByDatabaseOptions ¶ added in v0.3.0
type TransparentDataEncryptionsClientListByDatabaseOptions struct { }
TransparentDataEncryptionsClientListByDatabaseOptions contains the optional parameters for the TransparentDataEncryptionsClient.NewListByDatabasePager method.
type TransparentDataEncryptionsClientListByDatabaseResponse ¶ added in v0.3.0
type TransparentDataEncryptionsClientListByDatabaseResponse struct { // A list of transparent data encryptions LogicalDatabaseTransparentDataEncryptionListResult }
TransparentDataEncryptionsClientListByDatabaseResponse contains the response from method TransparentDataEncryptionsClient.NewListByDatabasePager.
type UnitDefinitionType ¶
type UnitDefinitionType string
UnitDefinitionType - The unit of the metric.
const ( UnitDefinitionTypeBytes UnitDefinitionType = "Bytes" UnitDefinitionTypeBytesPerSecond UnitDefinitionType = "BytesPerSecond" UnitDefinitionTypeCount UnitDefinitionType = "Count" UnitDefinitionTypeCountPerSecond UnitDefinitionType = "CountPerSecond" UnitDefinitionTypePercent UnitDefinitionType = "Percent" UnitDefinitionTypeSeconds UnitDefinitionType = "Seconds" )
func PossibleUnitDefinitionTypeValues ¶
func PossibleUnitDefinitionTypeValues() []UnitDefinitionType
PossibleUnitDefinitionTypeValues returns the possible values for the UnitDefinitionType const type.
type UnitType ¶
type UnitType string
UnitType - The unit of the metric.
func PossibleUnitTypeValues ¶
func PossibleUnitTypeValues() []UnitType
PossibleUnitTypeValues returns the possible values for the UnitType const type.
type UpdateLongTermRetentionBackupParameters ¶
type UpdateLongTermRetentionBackupParameters struct { // Resource properties. Properties *UpdateLongTermRetentionBackupParametersProperties }
UpdateLongTermRetentionBackupParameters - Contains the information necessary to perform long term retention backup update operation.
func (UpdateLongTermRetentionBackupParameters) MarshalJSON ¶ added in v1.1.0
func (u UpdateLongTermRetentionBackupParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateLongTermRetentionBackupParameters.
func (*UpdateLongTermRetentionBackupParameters) UnmarshalJSON ¶ added in v1.1.0
func (u *UpdateLongTermRetentionBackupParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateLongTermRetentionBackupParameters.
type UpdateLongTermRetentionBackupParametersProperties ¶
type UpdateLongTermRetentionBackupParametersProperties struct { // The storage redundancy type of the copied backup RequestedBackupStorageRedundancy *BackupStorageRedundancy }
UpdateLongTermRetentionBackupParametersProperties - Contains the properties to perform long term retention backup copy operation.
func (UpdateLongTermRetentionBackupParametersProperties) MarshalJSON ¶ added in v1.1.0
func (u UpdateLongTermRetentionBackupParametersProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateLongTermRetentionBackupParametersProperties.
func (*UpdateLongTermRetentionBackupParametersProperties) UnmarshalJSON ¶ added in v1.1.0
func (u *UpdateLongTermRetentionBackupParametersProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateLongTermRetentionBackupParametersProperties.
type UpdateManagedInstanceDNSServersOperation ¶
type UpdateManagedInstanceDNSServersOperation struct { // Resource properties. Properties *DNSRefreshConfigurationProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
UpdateManagedInstanceDNSServersOperation - A recoverable managed database resource.
func (UpdateManagedInstanceDNSServersOperation) MarshalJSON ¶
func (u UpdateManagedInstanceDNSServersOperation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateManagedInstanceDNSServersOperation.
func (*UpdateManagedInstanceDNSServersOperation) UnmarshalJSON ¶ added in v1.1.0
func (u *UpdateManagedInstanceDNSServersOperation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateManagedInstanceDNSServersOperation.
type UpsertManagedServerOperationParameters ¶
type UpsertManagedServerOperationParameters struct { Family *string StorageSizeInGB *int32 Tier *string VCores *int32 }
func (UpsertManagedServerOperationParameters) MarshalJSON ¶ added in v1.1.0
func (u UpsertManagedServerOperationParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpsertManagedServerOperationParameters.
func (*UpsertManagedServerOperationParameters) UnmarshalJSON ¶ added in v1.1.0
func (u *UpsertManagedServerOperationParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpsertManagedServerOperationParameters.
type UpsertManagedServerOperationStep ¶
type UpsertManagedServerOperationStep struct { Name *string Order *int32 Status *UpsertManagedServerOperationStepStatus }
func (UpsertManagedServerOperationStep) MarshalJSON ¶ added in v1.1.0
func (u UpsertManagedServerOperationStep) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpsertManagedServerOperationStep.
func (*UpsertManagedServerOperationStep) UnmarshalJSON ¶ added in v1.1.0
func (u *UpsertManagedServerOperationStep) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpsertManagedServerOperationStep.
type UpsertManagedServerOperationStepStatus ¶
type UpsertManagedServerOperationStepStatus string
const ( UpsertManagedServerOperationStepStatusCanceled UpsertManagedServerOperationStepStatus = "Canceled" UpsertManagedServerOperationStepStatusCompleted UpsertManagedServerOperationStepStatus = "Completed" UpsertManagedServerOperationStepStatusFailed UpsertManagedServerOperationStepStatus = "Failed" UpsertManagedServerOperationStepStatusInProgress UpsertManagedServerOperationStepStatus = "InProgress" UpsertManagedServerOperationStepStatusNotStarted UpsertManagedServerOperationStepStatus = "NotStarted" UpsertManagedServerOperationStepStatusSlowedDown UpsertManagedServerOperationStepStatus = "SlowedDown" )
func PossibleUpsertManagedServerOperationStepStatusValues ¶
func PossibleUpsertManagedServerOperationStepStatusValues() []UpsertManagedServerOperationStepStatus
PossibleUpsertManagedServerOperationStepStatusValues returns the possible values for the UpsertManagedServerOperationStepStatus const type.
type Usage ¶
type Usage struct { // READ-ONLY; Usage current value. CurrentValue *int32 // READ-ONLY; Resource ID. ID *string // READ-ONLY; Usage limit. Limit *int32 // READ-ONLY; Resource name. Name *Name // READ-ONLY; Usage requested limit. RequestedLimit *int32 // READ-ONLY; Resource type. Type *string // READ-ONLY; Usage unit. Unit *string }
Usage - ARM usage.
func (Usage) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type Usage.
func (*Usage) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Usage.
type UsageListResult ¶
type UsageListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*Usage }
UsageListResult - A list of usages.
func (UsageListResult) MarshalJSON ¶
func (u UsageListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UsageListResult.
func (*UsageListResult) UnmarshalJSON ¶ added in v1.1.0
func (u *UsageListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UsageListResult.
type UsagesClient ¶
type UsagesClient struct {
// contains filtered or unexported fields
}
UsagesClient contains the methods for the Usages group. Don't use this type directly, use NewUsagesClient() instead.
func NewUsagesClient ¶
func NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UsagesClient, error)
NewUsagesClient creates a new instance of UsagesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*UsagesClient) NewListByInstancePoolPager ¶ added in v0.5.0
func (client *UsagesClient) NewListByInstancePoolPager(resourceGroupName string, instancePoolName string, options *UsagesClientListByInstancePoolOptions) *runtime.Pager[UsagesClientListByInstancePoolResponse]
NewListByInstancePoolPager - Gets all instance pool usage metrics
Generated from API version 2021-02-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- instancePoolName - The name of the instance pool to be retrieved.
- options - UsagesClientListByInstancePoolOptions contains the optional parameters for the UsagesClient.NewListByInstancePoolPager method.
Example (ListInstancePoolUsages) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListInstancePoolUsage.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewUsagesClient().NewListByInstancePoolPager("group1", "testIP", &armsql.UsagesClientListByInstancePoolOptions{ExpandChildren: nil}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.UsageListResult = armsql.UsageListResult{ // Value: []*armsql.Usage{ // { // Name: &armsql.Name{ // LocalizedValue: to.Ptr("VCore utilization"), // Value: to.Ptr("VCore utilization"), // }, // Type: to.Ptr("Microsoft.Sql/instancePools/usages"), // CurrentValue: to.Ptr[int32](12), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/usages/vcore_utilization"), // Limit: to.Ptr[int32](16), // RequestedLimit: to.Ptr[int32](40), // Unit: to.Ptr("VCores"), // }, // { // Name: &armsql.Name{ // LocalizedValue: to.Ptr("Storage utilization"), // Value: to.Ptr("Storage utilization"), // }, // Type: to.Ptr("Microsoft.Sql/instancePools/usages"), // CurrentValue: to.Ptr[int32](384), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/usages/storage_utilization"), // Limit: to.Ptr[int32](8196), // Unit: to.Ptr("VCores"), // }, // { // Name: &armsql.Name{ // LocalizedValue: to.Ptr("Database utilization"), // Value: to.Ptr("Database utilization"), // }, // Type: to.Ptr("Microsoft.Sql/instancePools/usages"), // CurrentValue: to.Ptr[int32](5), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/usages/database_utilization"), // Limit: to.Ptr[int32](100), // Unit: to.Ptr("Number Of Databases"), // }}, // } } }
Output:
Example (ListInstancePoolUsagesExpandedWithChildren) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListInstancePoolUsageExpanded.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewUsagesClient().NewListByInstancePoolPager("group1", "testIP", &armsql.UsagesClientListByInstancePoolOptions{ExpandChildren: to.Ptr(true)}) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.UsageListResult = armsql.UsageListResult{ // Value: []*armsql.Usage{ // { // Name: &armsql.Name{ // LocalizedValue: to.Ptr("VCore utilization"), // Value: to.Ptr("VCore utilization"), // }, // Type: to.Ptr("Microsoft.Sql/instancePools/usages"), // CurrentValue: to.Ptr[int32](12), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/usages/vcore_utilization"), // Limit: to.Ptr[int32](16), // RequestedLimit: to.Ptr[int32](40), // Unit: to.Ptr("VCores"), // }, // { // Name: &armsql.Name{ // LocalizedValue: to.Ptr("Storage utilization"), // Value: to.Ptr("Storage utilization"), // }, // Type: to.Ptr("Microsoft.Sql/instancePools/usages"), // CurrentValue: to.Ptr[int32](384), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/usages/storage_utilization"), // Limit: to.Ptr[int32](8196), // Unit: to.Ptr("VCores"), // }, // { // Name: &armsql.Name{ // LocalizedValue: to.Ptr("Database utilization"), // Value: to.Ptr("Database utilization"), // }, // Type: to.Ptr("Microsoft.Sql/instancePools/usages"), // CurrentValue: to.Ptr[int32](5), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/usages/database_utilization"), // Limit: to.Ptr[int32](100), // Unit: to.Ptr("Number Of Databases"), // }, // { // Name: &armsql.Name{ // LocalizedValue: to.Ptr("VCore utilization"), // Value: to.Ptr("VCore utilization"), // }, // Type: to.Ptr("Microsoft.Sql/instancePools/managedInstances/usages"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/managedInstances/managedInstance1/usages/vcore_utilization"), // Limit: to.Ptr[int32](4), // Unit: to.Ptr("VCores"), // }, // { // Name: &armsql.Name{ // LocalizedValue: to.Ptr("VCore utilization"), // Value: to.Ptr("VCore utilization"), // }, // Type: to.Ptr("Microsoft.Sql/instancePools/managedInstances/usages"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/managedInstances/managedInstance2/usages/vcore_utilization"), // Limit: to.Ptr[int32](4), // RequestedLimit: to.Ptr[int32](8), // Unit: to.Ptr("VCores"), // }, // { // Name: &armsql.Name{ // LocalizedValue: to.Ptr("Storage utilization"), // Value: to.Ptr("Storage utilization"), // }, // Type: to.Ptr("Microsoft.Sql/instancePools/managedInstances/usages"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/managedInstances/managedInstance1/usages/storage_utilization"), // Limit: to.Ptr[int32](128), // Unit: to.Ptr("Gigabytes"), // }, // { // Name: &armsql.Name{ // LocalizedValue: to.Ptr("VCore utilization"), // Value: to.Ptr("VCore utilization"), // }, // Type: to.Ptr("Microsoft.Sql/instancePools/managedInstances/usages"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/managedInstances/managedInstance2/usages/storage_utilization"), // Limit: to.Ptr[int32](128), // RequestedLimit: to.Ptr[int32](256), // Unit: to.Ptr("Gigabytes"), // }, // { // Name: &armsql.Name{ // LocalizedValue: to.Ptr("Database utilization"), // Value: to.Ptr("Database utilization"), // }, // Type: to.Ptr("Microsoft.Sql/instancePools/managedInstances/usages"), // CurrentValue: to.Ptr[int32](2), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/managedInstances/managedInstance1/usages/database_utilization"), // Limit: to.Ptr[int32](100), // Unit: to.Ptr("Number Of Databases"), // }, // { // Name: &armsql.Name{ // LocalizedValue: to.Ptr("Database utilization"), // Value: to.Ptr("Database utilization"), // }, // Type: to.Ptr("Microsoft.Sql/instancePools/managedInstances/usages"), // CurrentValue: to.Ptr[int32](3), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/instancePools/testIP/managedInstances/managedInstance2/usages/database_utilization"), // Limit: to.Ptr[int32](100), // Unit: to.Ptr("Number Of Databases"), // }}, // } } }
Output:
type UsagesClientListByInstancePoolOptions ¶ added in v0.3.0
type UsagesClientListByInstancePoolOptions struct { // Optional request parameter to include managed instance usages within the instance pool. ExpandChildren *bool }
UsagesClientListByInstancePoolOptions contains the optional parameters for the UsagesClient.NewListByInstancePoolPager method.
type UsagesClientListByInstancePoolResponse ¶ added in v0.3.0
type UsagesClientListByInstancePoolResponse struct { // A list of usages. UsageListResult }
UsagesClientListByInstancePoolResponse contains the response from method UsagesClient.NewListByInstancePoolPager.
type UserIdentity ¶
type UserIdentity struct { // READ-ONLY; The Azure Active Directory client id. ClientID *string // READ-ONLY; The Azure Active Directory principal id. PrincipalID *string }
UserIdentity - Azure Active Directory identity configuration for a resource.
func (UserIdentity) MarshalJSON ¶ added in v1.1.0
func (u UserIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UserIdentity.
func (*UserIdentity) UnmarshalJSON ¶ added in v1.1.0
func (u *UserIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UserIdentity.
type VirtualCluster ¶
type VirtualCluster struct { // REQUIRED; Resource location. Location *string // Resource properties. Properties *VirtualClusterProperties // Resource tags. Tags map[string]*string // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
VirtualCluster - An Azure SQL virtual cluster.
func (VirtualCluster) MarshalJSON ¶
func (v VirtualCluster) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualCluster.
func (*VirtualCluster) UnmarshalJSON ¶ added in v1.1.0
func (v *VirtualCluster) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualCluster.
type VirtualClusterListResult ¶
type VirtualClusterListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*VirtualCluster }
VirtualClusterListResult - A list of virtual clusters.
func (VirtualClusterListResult) MarshalJSON ¶
func (v VirtualClusterListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualClusterListResult.
func (*VirtualClusterListResult) UnmarshalJSON ¶ added in v1.1.0
func (v *VirtualClusterListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualClusterListResult.
type VirtualClusterProperties ¶
type VirtualClusterProperties struct { // If the service has different generations of hardware, for the same SKU, then that can be captured here. Family *string // Specifies maintenance configuration id to apply to this virtual cluster. MaintenanceConfigurationID *string // READ-ONLY; List of resources in this virtual cluster. ChildResources []*string // READ-ONLY; Subnet resource ID for the virtual cluster. SubnetID *string }
VirtualClusterProperties - The properties of a virtual cluster.
func (VirtualClusterProperties) MarshalJSON ¶
func (v VirtualClusterProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualClusterProperties.
func (*VirtualClusterProperties) UnmarshalJSON ¶ added in v1.1.0
func (v *VirtualClusterProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualClusterProperties.
type VirtualClusterUpdate ¶
type VirtualClusterUpdate struct { // Resource properties. Properties *VirtualClusterProperties // Resource tags. Tags map[string]*string }
VirtualClusterUpdate - An update request for an Azure SQL Database virtual cluster.
func (VirtualClusterUpdate) MarshalJSON ¶
func (v VirtualClusterUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualClusterUpdate.
func (*VirtualClusterUpdate) UnmarshalJSON ¶ added in v1.1.0
func (v *VirtualClusterUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualClusterUpdate.
type VirtualClustersClient ¶
type VirtualClustersClient struct {
// contains filtered or unexported fields
}
VirtualClustersClient contains the methods for the VirtualClusters group. Don't use this type directly, use NewVirtualClustersClient() instead.
func NewVirtualClustersClient ¶
func NewVirtualClustersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualClustersClient, error)
NewVirtualClustersClient creates a new instance of VirtualClustersClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*VirtualClustersClient) BeginDelete ¶
func (client *VirtualClustersClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualClusterName string, options *VirtualClustersClientBeginDeleteOptions) (*runtime.Poller[VirtualClustersClientDeleteResponse], error)
BeginDelete - Deletes a virtual cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- virtualClusterName - The name of the virtual cluster.
- options - VirtualClustersClientBeginDeleteOptions contains the optional parameters for the VirtualClustersClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualClusterDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualClustersClient().BeginDelete(ctx, "testrg", "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*VirtualClustersClient) BeginUpdate ¶
func (client *VirtualClustersClient) BeginUpdate(ctx context.Context, resourceGroupName string, virtualClusterName string, parameters VirtualClusterUpdate, options *VirtualClustersClientBeginUpdateOptions) (*runtime.Poller[VirtualClustersClientUpdateResponse], error)
BeginUpdate - Updates a virtual cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- virtualClusterName - The name of the virtual cluster.
- parameters - The requested virtual cluster resource state.
- options - VirtualClustersClientBeginUpdateOptions contains the optional parameters for the VirtualClustersClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualClusterUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualClustersClient().BeginUpdate(ctx, "testrg", "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", armsql.VirtualClusterUpdate{ Properties: &armsql.VirtualClusterProperties{ MaintenanceConfigurationID: to.Ptr("/subscriptions/ab0e51c0-83c0-4380-8ae9-025516df392f/resourceGroups/Federation/providers/Microsoft.Maintenance/maintenanceConfigurations/MiPolicy1"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.VirtualCluster = armsql.VirtualCluster{ // Name: to.Ptr("vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2"), // Type: to.Ptr("Microsoft.Sql/virtualClusters"), // ID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2"), // Location: to.Ptr("onebox"), // Properties: &armsql.VirtualClusterProperties{ // ChildResources: []*string{ // to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance1"), // to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance2")}, // MaintenanceConfigurationID: to.Ptr("/subscriptions/ab0e51c0-83c0-4380-8ae9-025516df392f/resourceGroups/Federation/providers/Microsoft.Maintenance/maintenanceConfigurations/MiPolicy1"), // SubnetID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // }, // } }
Output:
func (*VirtualClustersClient) Get ¶
func (client *VirtualClustersClient) Get(ctx context.Context, resourceGroupName string, virtualClusterName string, options *VirtualClustersClientGetOptions) (VirtualClustersClientGetResponse, error)
Get - Gets a virtual cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- virtualClusterName - The name of the virtual cluster.
- options - VirtualClustersClientGetOptions contains the optional parameters for the VirtualClustersClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualClusterGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewVirtualClustersClient().Get(ctx, "testrg", "vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.VirtualCluster = armsql.VirtualCluster{ // Name: to.Ptr("vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2"), // Type: to.Ptr("Microsoft.Sql/virtualClusters"), // ID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2"), // Location: to.Ptr("onebox"), // Properties: &armsql.VirtualClusterProperties{ // ChildResources: []*string{ // to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance1"), // to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance2")}, // Family: to.Ptr("Gen4"), // MaintenanceConfigurationID: to.Ptr("/subscriptions/ab0e51c0-83c0-4380-8ae9-025516df392f/resourceGroups/Federation/providers/Microsoft.Maintenance/maintenanceConfigurations/MiPolicy1"), // SubnetID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // }, // } }
Output:
func (*VirtualClustersClient) NewListByResourceGroupPager ¶ added in v0.5.0
func (client *VirtualClustersClient) NewListByResourceGroupPager(resourceGroupName string, options *VirtualClustersClientListByResourceGroupOptions) *runtime.Pager[VirtualClustersClientListByResourceGroupResponse]
NewListByResourceGroupPager - Gets a list of virtual clusters in a resource group.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- options - VirtualClustersClientListByResourceGroupOptions contains the optional parameters for the VirtualClustersClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualClusterListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewVirtualClustersClient().NewListByResourceGroupPager("testrg", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.VirtualClusterListResult = armsql.VirtualClusterListResult{ // Value: []*armsql.VirtualCluster{ // { // Name: to.Ptr("vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2"), // Type: to.Ptr("Microsoft.Sql/virtualClusters"), // ID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2"), // Location: to.Ptr("onebox"), // Properties: &armsql.VirtualClusterProperties{ // ChildResources: []*string{ // to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance1"), // to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance2")}, // Family: to.Ptr("Gen4"), // MaintenanceConfigurationID: to.Ptr("/subscriptions/ab0e51c0-83c0-4380-8ae9-025516df392f/resourceGroups/Federation/providers/Microsoft.Maintenance/maintenanceConfigurations/MiPolicy1"), // SubnetID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // }, // }, // { // Name: to.Ptr("vc-subnet1-14b795bd-9c8f-46ec-adb8-2b8eff56ac16"), // Type: to.Ptr("Microsoft.Sql/virtualClusters"), // ID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-subnet2-14b795bd-9c8f-46ec-adb8-2b8eff56ac16"), // Location: to.Ptr("onebox"), // Properties: &armsql.VirtualClusterProperties{ // ChildResources: []*string{ // to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance3"), // to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance4")}, // Family: to.Ptr("Gen4"), // MaintenanceConfigurationID: to.Ptr("/subscriptions/ab0e51c0-83c0-4380-8ae9-025516df392f/resourceGroups/Federation/providers/Microsoft.Maintenance/maintenanceConfigurations/MiPolicy1"), // SubnetID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/subnet2"), // }, // }}, // } } }
Output:
func (*VirtualClustersClient) NewListPager ¶ added in v0.5.0
func (client *VirtualClustersClient) NewListPager(options *VirtualClustersClientListOptions) *runtime.Pager[VirtualClustersClientListResponse]
NewListPager - Gets a list of all virtualClusters in the subscription.
Generated from API version 2020-11-01-preview
- options - VirtualClustersClientListOptions contains the optional parameters for the VirtualClustersClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualClusterList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewVirtualClustersClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.VirtualClusterListResult = armsql.VirtualClusterListResult{ // Value: []*armsql.VirtualCluster{ // { // Name: to.Ptr("vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2"), // Type: to.Ptr("Microsoft.Sql/virtualClusters"), // ID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-subnet1-f769ed71-b3ad-491a-a9d5-26eeceaa6be2"), // Location: to.Ptr("onebox"), // Properties: &armsql.VirtualClusterProperties{ // ChildResources: []*string{ // to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance1"), // to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance2")}, // Family: to.Ptr("Gen4"), // MaintenanceConfigurationID: to.Ptr("/subscriptions/ab0e51c0-83c0-4380-8ae9-025516df392f/resourceGroups/Federation/providers/Microsoft.Maintenance/maintenanceConfigurations/MiPolicy1"), // SubnetID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), // }, // }, // { // Name: to.Ptr("vc-subnet1-14b795bd-9c8f-46ec-adb8-2b8eff56ac16"), // Type: to.Ptr("Microsoft.Sql/virtualClusters"), // ID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc-subnet2-14b795bd-9c8f-46ec-adb8-2b8eff56ac16"), // Location: to.Ptr("onebox"), // Properties: &armsql.VirtualClusterProperties{ // ChildResources: []*string{ // to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance3"), // to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance4")}, // Family: to.Ptr("Gen5"), // MaintenanceConfigurationID: to.Ptr("/subscriptions/ab0e51c0-83c0-4380-8ae9-025516df392f/resourceGroups/Federation/providers/Microsoft.Maintenance/maintenanceConfigurations/MiPolicy1"), // SubnetID: to.Ptr("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet2/subnets/subnet2"), // }, // }}, // } } }
Output:
func (*VirtualClustersClient) UpdateDNSServers ¶
func (client *VirtualClustersClient) UpdateDNSServers(ctx context.Context, resourceGroupName string, virtualClusterName string, options *VirtualClustersClientUpdateDNSServersOptions) (VirtualClustersClientUpdateDNSServersResponse, error)
UpdateDNSServers - Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- virtualClusterName - The name of the virtual cluster.
- options - VirtualClustersClientUpdateDNSServersOptions contains the optional parameters for the VirtualClustersClient.UpdateDNSServers method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/UpdateManagedInstanceDnsServers.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewVirtualClustersClient().UpdateDNSServers(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.UpdateManagedInstanceDNSServersOperation = armsql.UpdateManagedInstanceDNSServersOperation{ // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/test-rg/providers/Microsoft.Sql/virtualClusters/test-virtualcluster/updateManagedInstanceDnsServers"), // Properties: &armsql.DNSRefreshConfigurationProperties{ // Status: to.Ptr(armsql.DNSRefreshConfigurationPropertiesStatusSucceeded), // }, // } }
Output:
type VirtualClustersClientBeginDeleteOptions ¶ added in v0.3.0
type VirtualClustersClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualClustersClientBeginDeleteOptions contains the optional parameters for the VirtualClustersClient.BeginDelete method.
type VirtualClustersClientBeginUpdateOptions ¶ added in v0.3.0
type VirtualClustersClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualClustersClientBeginUpdateOptions contains the optional parameters for the VirtualClustersClient.BeginUpdate method.
type VirtualClustersClientDeleteResponse ¶ added in v0.3.0
type VirtualClustersClientDeleteResponse struct { }
VirtualClustersClientDeleteResponse contains the response from method VirtualClustersClient.BeginDelete.
type VirtualClustersClientGetOptions ¶ added in v0.3.0
type VirtualClustersClientGetOptions struct { }
VirtualClustersClientGetOptions contains the optional parameters for the VirtualClustersClient.Get method.
type VirtualClustersClientGetResponse ¶ added in v0.3.0
type VirtualClustersClientGetResponse struct { // An Azure SQL virtual cluster. VirtualCluster }
VirtualClustersClientGetResponse contains the response from method VirtualClustersClient.Get.
type VirtualClustersClientListByResourceGroupOptions ¶ added in v0.3.0
type VirtualClustersClientListByResourceGroupOptions struct { }
VirtualClustersClientListByResourceGroupOptions contains the optional parameters for the VirtualClustersClient.NewListByResourceGroupPager method.
type VirtualClustersClientListByResourceGroupResponse ¶ added in v0.3.0
type VirtualClustersClientListByResourceGroupResponse struct { // A list of virtual clusters. VirtualClusterListResult }
VirtualClustersClientListByResourceGroupResponse contains the response from method VirtualClustersClient.NewListByResourceGroupPager.
type VirtualClustersClientListOptions ¶ added in v0.3.0
type VirtualClustersClientListOptions struct { }
VirtualClustersClientListOptions contains the optional parameters for the VirtualClustersClient.NewListPager method.
type VirtualClustersClientListResponse ¶ added in v0.3.0
type VirtualClustersClientListResponse struct { // A list of virtual clusters. VirtualClusterListResult }
VirtualClustersClientListResponse contains the response from method VirtualClustersClient.NewListPager.
type VirtualClustersClientUpdateDNSServersOptions ¶ added in v0.3.0
type VirtualClustersClientUpdateDNSServersOptions struct { }
VirtualClustersClientUpdateDNSServersOptions contains the optional parameters for the VirtualClustersClient.UpdateDNSServers method.
type VirtualClustersClientUpdateDNSServersResponse ¶ added in v0.3.0
type VirtualClustersClientUpdateDNSServersResponse struct { // A recoverable managed database resource. UpdateManagedInstanceDNSServersOperation }
VirtualClustersClientUpdateDNSServersResponse contains the response from method VirtualClustersClient.UpdateDNSServers.
type VirtualClustersClientUpdateResponse ¶ added in v0.3.0
type VirtualClustersClientUpdateResponse struct { // An Azure SQL virtual cluster. VirtualCluster }
VirtualClustersClientUpdateResponse contains the response from method VirtualClustersClient.BeginUpdate.
type VirtualNetworkRule ¶
type VirtualNetworkRule struct { // Resource properties. Properties *VirtualNetworkRuleProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
VirtualNetworkRule - A virtual network rule.
func (VirtualNetworkRule) MarshalJSON ¶
func (v VirtualNetworkRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualNetworkRule.
func (*VirtualNetworkRule) UnmarshalJSON ¶ added in v1.1.0
func (v *VirtualNetworkRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkRule.
type VirtualNetworkRuleListResult ¶
type VirtualNetworkRuleListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*VirtualNetworkRule }
VirtualNetworkRuleListResult - A list of virtual network rules.
func (VirtualNetworkRuleListResult) MarshalJSON ¶
func (v VirtualNetworkRuleListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualNetworkRuleListResult.
func (*VirtualNetworkRuleListResult) UnmarshalJSON ¶ added in v1.1.0
func (v *VirtualNetworkRuleListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkRuleListResult.
type VirtualNetworkRuleProperties ¶
type VirtualNetworkRuleProperties struct { // REQUIRED; The ARM resource id of the virtual network subnet. VirtualNetworkSubnetID *string // Create firewall rule before the virtual network has vnet service endpoint enabled. IgnoreMissingVnetServiceEndpoint *bool // READ-ONLY; Virtual Network Rule State State *VirtualNetworkRuleState }
VirtualNetworkRuleProperties - Properties of a virtual network rule.
func (VirtualNetworkRuleProperties) MarshalJSON ¶ added in v1.1.0
func (v VirtualNetworkRuleProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualNetworkRuleProperties.
func (*VirtualNetworkRuleProperties) UnmarshalJSON ¶ added in v1.1.0
func (v *VirtualNetworkRuleProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkRuleProperties.
type VirtualNetworkRuleState ¶
type VirtualNetworkRuleState string
VirtualNetworkRuleState - Virtual Network Rule State
const ( VirtualNetworkRuleStateDeleting VirtualNetworkRuleState = "Deleting" VirtualNetworkRuleStateFailed VirtualNetworkRuleState = "Failed" VirtualNetworkRuleStateInProgress VirtualNetworkRuleState = "InProgress" VirtualNetworkRuleStateInitializing VirtualNetworkRuleState = "Initializing" VirtualNetworkRuleStateReady VirtualNetworkRuleState = "Ready" VirtualNetworkRuleStateUnknown VirtualNetworkRuleState = "Unknown" )
func PossibleVirtualNetworkRuleStateValues ¶
func PossibleVirtualNetworkRuleStateValues() []VirtualNetworkRuleState
PossibleVirtualNetworkRuleStateValues returns the possible values for the VirtualNetworkRuleState const type.
type VirtualNetworkRulesClient ¶
type VirtualNetworkRulesClient struct {
// contains filtered or unexported fields
}
VirtualNetworkRulesClient contains the methods for the VirtualNetworkRules group. Don't use this type directly, use NewVirtualNetworkRulesClient() instead.
func NewVirtualNetworkRulesClient ¶
func NewVirtualNetworkRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkRulesClient, error)
NewVirtualNetworkRulesClient creates a new instance of VirtualNetworkRulesClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*VirtualNetworkRulesClient) BeginCreateOrUpdate ¶
func (client *VirtualNetworkRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, parameters VirtualNetworkRule, options *VirtualNetworkRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualNetworkRulesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates an existing virtual network rule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- virtualNetworkRuleName - The name of the virtual network rule.
- parameters - The requested virtual Network Rule Resource state.
- options - VirtualNetworkRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkRulesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualNetworkRulesCreateOrUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualNetworkRulesClient().BeginCreateOrUpdate(ctx, "Default", "vnet-test-svr", "vnet-firewall-rule", armsql.VirtualNetworkRule{ Properties: &armsql.VirtualNetworkRuleProperties{ IgnoreMissingVnetServiceEndpoint: to.Ptr(false), VirtualNetworkSubnetID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.VirtualNetworkRule = armsql.VirtualNetworkRule{ // Name: to.Ptr("vnet-firewall-rule"), // Type: to.Ptr("Microsoft.Sql/servers/virtualNetworkRules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/vnet-test-svr/virtualNetworkRules/vnet-firewall-rule"), // Properties: &armsql.VirtualNetworkRuleProperties{ // IgnoreMissingVnetServiceEndpoint: to.Ptr(false), // VirtualNetworkSubnetID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet"), // }, // } }
Output:
func (*VirtualNetworkRulesClient) BeginDelete ¶
func (client *VirtualNetworkRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, options *VirtualNetworkRulesClientBeginDeleteOptions) (*runtime.Poller[VirtualNetworkRulesClientDeleteResponse], error)
BeginDelete - Deletes the virtual network rule with the given name. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- virtualNetworkRuleName - The name of the virtual network rule.
- options - VirtualNetworkRulesClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkRulesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualNetworkRulesDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewVirtualNetworkRulesClient().BeginDelete(ctx, "Default", "vnet-test-svr", "vnet-firewall-rule", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*VirtualNetworkRulesClient) Get ¶
func (client *VirtualNetworkRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, options *VirtualNetworkRulesClientGetOptions) (VirtualNetworkRulesClientGetResponse, error)
Get - Gets a virtual network rule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- virtualNetworkRuleName - The name of the virtual network rule.
- options - VirtualNetworkRulesClientGetOptions contains the optional parameters for the VirtualNetworkRulesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualNetworkRulesGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewVirtualNetworkRulesClient().Get(ctx, "Default", "vnet-test-svr", "vnet-firewall-rule", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.VirtualNetworkRule = armsql.VirtualNetworkRule{ // Name: to.Ptr("vnet-firewall-rule"), // Type: to.Ptr("Microsoft.Sql/servers/virtualNetworkRules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/vnet-test-svr/virtualNetworkRules/vnet-firewall-rule"), // Properties: &armsql.VirtualNetworkRuleProperties{ // IgnoreMissingVnetServiceEndpoint: to.Ptr(false), // State: to.Ptr(armsql.VirtualNetworkRuleStateReady), // VirtualNetworkSubnetID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet"), // }, // } }
Output:
func (*VirtualNetworkRulesClient) NewListByServerPager ¶ added in v0.5.0
func (client *VirtualNetworkRulesClient) NewListByServerPager(resourceGroupName string, serverName string, options *VirtualNetworkRulesClientListByServerOptions) *runtime.Pager[VirtualNetworkRulesClientListByServerResponse]
NewListByServerPager - Gets a list of virtual network rules in a server.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- options - VirtualNetworkRulesClientListByServerOptions contains the optional parameters for the VirtualNetworkRulesClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualNetworkRulesList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewVirtualNetworkRulesClient().NewListByServerPager("Default", "vnet-test-svr", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.VirtualNetworkRuleListResult = armsql.VirtualNetworkRuleListResult{ // Value: []*armsql.VirtualNetworkRule{ // { // Name: to.Ptr("vnet-firewall-rule"), // Type: to.Ptr("Microsoft.Sql/servers/virtualNetworkRules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/vnet-test-svr/virtualNetworkRules/vnet-firewall-rule"), // Properties: &armsql.VirtualNetworkRuleProperties{ // IgnoreMissingVnetServiceEndpoint: to.Ptr(false), // State: to.Ptr(armsql.VirtualNetworkRuleStateReady), // VirtualNetworkSubnetID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet"), // }, // }, // { // Name: to.Ptr("vnet-firewall-rule"), // Type: to.Ptr("Microsoft.Sql/servers/virtualNetworkRules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/vnet-test-svr/virtualNetworkRules/vnet-firewall-rule"), // Properties: &armsql.VirtualNetworkRuleProperties{ // IgnoreMissingVnetServiceEndpoint: to.Ptr(false), // State: to.Ptr(armsql.VirtualNetworkRuleStateReady), // VirtualNetworkSubnetID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet"), // }, // }}, // } } }
Output:
type VirtualNetworkRulesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type VirtualNetworkRulesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualNetworkRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkRulesClient.BeginCreateOrUpdate method.
type VirtualNetworkRulesClientBeginDeleteOptions ¶ added in v0.3.0
type VirtualNetworkRulesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualNetworkRulesClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkRulesClient.BeginDelete method.
type VirtualNetworkRulesClientCreateOrUpdateResponse ¶ added in v0.3.0
type VirtualNetworkRulesClientCreateOrUpdateResponse struct { // A virtual network rule. VirtualNetworkRule }
VirtualNetworkRulesClientCreateOrUpdateResponse contains the response from method VirtualNetworkRulesClient.BeginCreateOrUpdate.
type VirtualNetworkRulesClientDeleteResponse ¶ added in v0.3.0
type VirtualNetworkRulesClientDeleteResponse struct { }
VirtualNetworkRulesClientDeleteResponse contains the response from method VirtualNetworkRulesClient.BeginDelete.
type VirtualNetworkRulesClientGetOptions ¶ added in v0.3.0
type VirtualNetworkRulesClientGetOptions struct { }
VirtualNetworkRulesClientGetOptions contains the optional parameters for the VirtualNetworkRulesClient.Get method.
type VirtualNetworkRulesClientGetResponse ¶ added in v0.3.0
type VirtualNetworkRulesClientGetResponse struct { // A virtual network rule. VirtualNetworkRule }
VirtualNetworkRulesClientGetResponse contains the response from method VirtualNetworkRulesClient.Get.
type VirtualNetworkRulesClientListByServerOptions ¶ added in v0.3.0
type VirtualNetworkRulesClientListByServerOptions struct { }
VirtualNetworkRulesClientListByServerOptions contains the optional parameters for the VirtualNetworkRulesClient.NewListByServerPager method.
type VirtualNetworkRulesClientListByServerResponse ¶ added in v0.3.0
type VirtualNetworkRulesClientListByServerResponse struct { // A list of virtual network rules. VirtualNetworkRuleListResult }
VirtualNetworkRulesClientListByServerResponse contains the response from method VirtualNetworkRulesClient.NewListByServerPager.
type VulnerabilityAssessmentName ¶
type VulnerabilityAssessmentName string
const (
VulnerabilityAssessmentNameDefault VulnerabilityAssessmentName = "default"
)
func PossibleVulnerabilityAssessmentNameValues ¶
func PossibleVulnerabilityAssessmentNameValues() []VulnerabilityAssessmentName
PossibleVulnerabilityAssessmentNameValues returns the possible values for the VulnerabilityAssessmentName const type.
type VulnerabilityAssessmentPolicyBaselineName ¶
type VulnerabilityAssessmentPolicyBaselineName string
const ( VulnerabilityAssessmentPolicyBaselineNameDefault VulnerabilityAssessmentPolicyBaselineName = "default" VulnerabilityAssessmentPolicyBaselineNameMaster VulnerabilityAssessmentPolicyBaselineName = "master" )
func PossibleVulnerabilityAssessmentPolicyBaselineNameValues ¶
func PossibleVulnerabilityAssessmentPolicyBaselineNameValues() []VulnerabilityAssessmentPolicyBaselineName
PossibleVulnerabilityAssessmentPolicyBaselineNameValues returns the possible values for the VulnerabilityAssessmentPolicyBaselineName const type.
type VulnerabilityAssessmentRecurringScansProperties ¶
type VulnerabilityAssessmentRecurringScansProperties struct { // Specifies that the schedule scan notification will be is sent to the subscription administrators. EmailSubscriptionAdmins *bool // Specifies an array of e-mail addresses to which the scan notification is sent. Emails []*string // Recurring scans state. IsEnabled *bool }
VulnerabilityAssessmentRecurringScansProperties - Properties of a Vulnerability Assessment recurring scans.
func (VulnerabilityAssessmentRecurringScansProperties) MarshalJSON ¶
func (v VulnerabilityAssessmentRecurringScansProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentRecurringScansProperties.
func (*VulnerabilityAssessmentRecurringScansProperties) UnmarshalJSON ¶ added in v1.1.0
func (v *VulnerabilityAssessmentRecurringScansProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentRecurringScansProperties.
type VulnerabilityAssessmentScanError ¶
type VulnerabilityAssessmentScanError struct { // READ-ONLY; The error code. Code *string // READ-ONLY; The error message. Message *string }
VulnerabilityAssessmentScanError - Properties of a vulnerability assessment scan error.
func (VulnerabilityAssessmentScanError) MarshalJSON ¶ added in v1.1.0
func (v VulnerabilityAssessmentScanError) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentScanError.
func (*VulnerabilityAssessmentScanError) UnmarshalJSON ¶ added in v1.1.0
func (v *VulnerabilityAssessmentScanError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentScanError.
type VulnerabilityAssessmentScanRecord ¶
type VulnerabilityAssessmentScanRecord struct { // Resource properties. Properties *VulnerabilityAssessmentScanRecordProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
VulnerabilityAssessmentScanRecord - A vulnerability assessment scan record.
func (VulnerabilityAssessmentScanRecord) MarshalJSON ¶
func (v VulnerabilityAssessmentScanRecord) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentScanRecord.
func (*VulnerabilityAssessmentScanRecord) UnmarshalJSON ¶ added in v1.1.0
func (v *VulnerabilityAssessmentScanRecord) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentScanRecord.
type VulnerabilityAssessmentScanRecordListResult ¶
type VulnerabilityAssessmentScanRecordListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*VulnerabilityAssessmentScanRecord }
VulnerabilityAssessmentScanRecordListResult - A list of vulnerability assessment scan records.
func (VulnerabilityAssessmentScanRecordListResult) MarshalJSON ¶
func (v VulnerabilityAssessmentScanRecordListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentScanRecordListResult.
func (*VulnerabilityAssessmentScanRecordListResult) UnmarshalJSON ¶ added in v1.1.0
func (v *VulnerabilityAssessmentScanRecordListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentScanRecordListResult.
type VulnerabilityAssessmentScanRecordProperties ¶
type VulnerabilityAssessmentScanRecordProperties struct { // READ-ONLY; The scan end time (UTC). EndTime *time.Time // READ-ONLY; The scan errors. Errors []*VulnerabilityAssessmentScanError // READ-ONLY; The number of failed security checks. NumberOfFailedSecurityChecks *int32 // READ-ONLY; The scan ID. ScanID *string // READ-ONLY; The scan start time (UTC). StartTime *time.Time // READ-ONLY; The scan status. State *VulnerabilityAssessmentScanState // READ-ONLY; The scan results storage container path. StorageContainerPath *string // READ-ONLY; The scan trigger type. TriggerType *VulnerabilityAssessmentScanTriggerType }
VulnerabilityAssessmentScanRecordProperties - Properties of a vulnerability assessment scan record.
func (VulnerabilityAssessmentScanRecordProperties) MarshalJSON ¶
func (v VulnerabilityAssessmentScanRecordProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentScanRecordProperties.
func (*VulnerabilityAssessmentScanRecordProperties) UnmarshalJSON ¶
func (v *VulnerabilityAssessmentScanRecordProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentScanRecordProperties.
type VulnerabilityAssessmentScanState ¶
type VulnerabilityAssessmentScanState string
VulnerabilityAssessmentScanState - The scan status.
const ( VulnerabilityAssessmentScanStateFailed VulnerabilityAssessmentScanState = "Failed" VulnerabilityAssessmentScanStateFailedToRun VulnerabilityAssessmentScanState = "FailedToRun" VulnerabilityAssessmentScanStateInProgress VulnerabilityAssessmentScanState = "InProgress" VulnerabilityAssessmentScanStatePassed VulnerabilityAssessmentScanState = "Passed" )
func PossibleVulnerabilityAssessmentScanStateValues ¶
func PossibleVulnerabilityAssessmentScanStateValues() []VulnerabilityAssessmentScanState
PossibleVulnerabilityAssessmentScanStateValues returns the possible values for the VulnerabilityAssessmentScanState const type.
type VulnerabilityAssessmentScanTriggerType ¶
type VulnerabilityAssessmentScanTriggerType string
VulnerabilityAssessmentScanTriggerType - The scan trigger type.
const ( VulnerabilityAssessmentScanTriggerTypeOnDemand VulnerabilityAssessmentScanTriggerType = "OnDemand" VulnerabilityAssessmentScanTriggerTypeRecurring VulnerabilityAssessmentScanTriggerType = "Recurring" )
func PossibleVulnerabilityAssessmentScanTriggerTypeValues ¶
func PossibleVulnerabilityAssessmentScanTriggerTypeValues() []VulnerabilityAssessmentScanTriggerType
PossibleVulnerabilityAssessmentScanTriggerTypeValues returns the possible values for the VulnerabilityAssessmentScanTriggerType const type.
type WorkloadClassifier ¶
type WorkloadClassifier struct { // Resource properties. Properties *WorkloadClassifierProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
WorkloadClassifier - Workload classifier operations for a data warehouse
func (WorkloadClassifier) MarshalJSON ¶
func (w WorkloadClassifier) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WorkloadClassifier.
func (*WorkloadClassifier) UnmarshalJSON ¶ added in v1.1.0
func (w *WorkloadClassifier) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadClassifier.
type WorkloadClassifierListResult ¶
type WorkloadClassifierListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*WorkloadClassifier }
WorkloadClassifierListResult - A list of workload classifiers for a workload group.
func (WorkloadClassifierListResult) MarshalJSON ¶
func (w WorkloadClassifierListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WorkloadClassifierListResult.
func (*WorkloadClassifierListResult) UnmarshalJSON ¶ added in v1.1.0
func (w *WorkloadClassifierListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadClassifierListResult.
type WorkloadClassifierProperties ¶
type WorkloadClassifierProperties struct { // REQUIRED; The workload classifier member name. MemberName *string // The workload classifier context. Context *string // The workload classifier end time for classification. EndTime *string // The workload classifier importance. Importance *string // The workload classifier label. Label *string // The workload classifier start time for classification. StartTime *string }
WorkloadClassifierProperties - Workload classifier definition. For more information look at sys.workloadmanagementworkload_classifiers (DMV).
func (WorkloadClassifierProperties) MarshalJSON ¶ added in v1.1.0
func (w WorkloadClassifierProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WorkloadClassifierProperties.
func (*WorkloadClassifierProperties) UnmarshalJSON ¶ added in v1.1.0
func (w *WorkloadClassifierProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadClassifierProperties.
type WorkloadClassifiersClient ¶
type WorkloadClassifiersClient struct {
// contains filtered or unexported fields
}
WorkloadClassifiersClient contains the methods for the WorkloadClassifiers group. Don't use this type directly, use NewWorkloadClassifiersClient() instead.
func NewWorkloadClassifiersClient ¶
func NewWorkloadClassifiersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkloadClassifiersClient, error)
NewWorkloadClassifiersClient creates a new instance of WorkloadClassifiersClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*WorkloadClassifiersClient) BeginCreateOrUpdate ¶
func (client *WorkloadClassifiersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, workloadClassifierName string, parameters WorkloadClassifier, options *WorkloadClassifiersClientBeginCreateOrUpdateOptions) (*runtime.Poller[WorkloadClassifiersClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a workload classifier. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- workloadGroupName - The name of the workload group from which to receive the classifier from.
- workloadClassifierName - The name of the workload classifier to create/update.
- parameters - The properties of the workload classifier.
- options - WorkloadClassifiersClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkloadClassifiersClient.BeginCreateOrUpdate method.
Example (CreateAWorkloadGroupWithAllPropertiesSpecified) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateWorkloadClassifierMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewWorkloadClassifiersClient().BeginCreateOrUpdate(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", "wlm_workloadgroup", "wlm_workloadclassifier", armsql.WorkloadClassifier{ Properties: &armsql.WorkloadClassifierProperties{ Context: to.Ptr("test_context"), EndTime: to.Ptr("14:00"), Importance: to.Ptr("high"), Label: to.Ptr("test_label"), MemberName: to.Ptr("dbo"), StartTime: to.Ptr("12:00"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.WorkloadClassifier = armsql.WorkloadClassifier{ // Name: to.Ptr("wlm_workloadclassifier"), // Type: to.Ptr("Microsoft.Sql/servers/databases/workloadGroups/workloadClassifiers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/wlm_workloadgroup/workloadClassifiers/wlm_workloadclassifier"), // Properties: &armsql.WorkloadClassifierProperties{ // Context: to.Ptr("test_context"), // EndTime: to.Ptr("14:00"), // Importance: to.Ptr("high"), // Label: to.Ptr("test_label"), // MemberName: to.Ptr("dbo"), // StartTime: to.Ptr("12:00"), // }, // } }
Output:
Example (CreateAWorkloadGroupWithTheRequiredPropertiesSpecified) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateWorkloadClassifierMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewWorkloadClassifiersClient().BeginCreateOrUpdate(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", "wlm_workloadgroup", "wlm_workloadclassifier", armsql.WorkloadClassifier{ Properties: &armsql.WorkloadClassifierProperties{ MemberName: to.Ptr("dbo"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.WorkloadClassifier = armsql.WorkloadClassifier{ // Name: to.Ptr("wlm_workloadclassifier"), // Type: to.Ptr("Microsoft.Sql/servers/databases/workloadGroups/workloadClassifiers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/wlm_workloadgroup/workloadClassifiers/wlm_workloadclassifier"), // Properties: &armsql.WorkloadClassifierProperties{ // Context: to.Ptr(""), // EndTime: to.Ptr(""), // Importance: to.Ptr(""), // Label: to.Ptr(""), // MemberName: to.Ptr("dbo"), // StartTime: to.Ptr(""), // }, // } }
Output:
func (*WorkloadClassifiersClient) BeginDelete ¶
func (client *WorkloadClassifiersClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, workloadClassifierName string, options *WorkloadClassifiersClientBeginDeleteOptions) (*runtime.Poller[WorkloadClassifiersClientDeleteResponse], error)
BeginDelete - Deletes a workload classifier. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- workloadGroupName - The name of the workload group from which to receive the classifier from.
- workloadClassifierName - The name of the workload classifier to delete.
- options - WorkloadClassifiersClientBeginDeleteOptions contains the optional parameters for the WorkloadClassifiersClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteWorkloadClassifier.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewWorkloadClassifiersClient().BeginDelete(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", "wlm_workloadgroup", "wlm_workloadclassifier", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*WorkloadClassifiersClient) Get ¶
func (client *WorkloadClassifiersClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, workloadClassifierName string, options *WorkloadClassifiersClientGetOptions) (WorkloadClassifiersClientGetResponse, error)
Get - Gets a workload classifier If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- workloadGroupName - The name of the workload group from which to receive the classifier from.
- workloadClassifierName - The name of the workload classifier.
- options - WorkloadClassifiersClientGetOptions contains the optional parameters for the WorkloadClassifiersClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetWorkloadClassifier.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewWorkloadClassifiersClient().Get(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", "wlm_workloadgroup", "wlm_classifier", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.WorkloadClassifier = armsql.WorkloadClassifier{ // Name: to.Ptr("wlm_classifier"), // Type: to.Ptr("Microsoft.Sql/servers/databases/workloadGroups/workloadClassifiers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/wlm_workloadgroup/workloadClassifiers/wlm_classifier"), // Properties: &armsql.WorkloadClassifierProperties{ // Context: to.Ptr("test_context"), // EndTime: to.Ptr("14:00"), // Importance: to.Ptr("high"), // Label: to.Ptr("test_label"), // MemberName: to.Ptr("dbo"), // StartTime: to.Ptr("12:00"), // }, // } }
Output:
func (*WorkloadClassifiersClient) NewListByWorkloadGroupPager ¶ added in v0.5.0
func (client *WorkloadClassifiersClient) NewListByWorkloadGroupPager(resourceGroupName string, serverName string, databaseName string, workloadGroupName string, options *WorkloadClassifiersClientListByWorkloadGroupOptions) *runtime.Pager[WorkloadClassifiersClientListByWorkloadGroupResponse]
NewListByWorkloadGroupPager - Gets the list of workload classifiers for a workload group
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- workloadGroupName - The name of the workload group from which to receive the classifiers from.
- options - WorkloadClassifiersClientListByWorkloadGroupOptions contains the optional parameters for the WorkloadClassifiersClient.NewListByWorkloadGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetWorkloadClassifierList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewWorkloadClassifiersClient().NewListByWorkloadGroupPager("Default-SQL-SouthEastAsia", "testsvr", "testdb", "wlm_workloadgroup", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.WorkloadClassifierListResult = armsql.WorkloadClassifierListResult{ // Value: []*armsql.WorkloadClassifier{ // { // Name: to.Ptr("classifier3"), // Type: to.Ptr("Microsoft.Sql/servers/databases/workloadGroups/workloadClassifiers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/wlm_workloadgroup/workloadClassifiers/classifier3"), // Properties: &armsql.WorkloadClassifierProperties{ // Context: to.Ptr(""), // EndTime: to.Ptr(""), // Importance: to.Ptr("high"), // Label: to.Ptr(""), // MemberName: to.Ptr("dbo"), // StartTime: to.Ptr(""), // }, // }, // { // Name: to.Ptr("classifier1"), // Type: to.Ptr("Microsoft.Sql/servers/databases/workloadGroups/workloadClassifiers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/wlm_workloadgroup/workloadClassifiers/classifier1"), // Properties: &armsql.WorkloadClassifierProperties{ // Context: to.Ptr("test_context"), // EndTime: to.Ptr("14:00"), // Importance: to.Ptr("high"), // Label: to.Ptr("test_label"), // MemberName: to.Ptr("dbo"), // StartTime: to.Ptr("12:00"), // }, // }, // { // Name: to.Ptr("classifier2"), // Type: to.Ptr("Microsoft.Sql/servers/databases/workloadGroups/workloadClassifiers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/wlm_workloadgroup/workloadClassifiers/classifier2"), // Properties: &armsql.WorkloadClassifierProperties{ // Context: to.Ptr(""), // EndTime: to.Ptr("17:00"), // Importance: to.Ptr("high"), // Label: to.Ptr(""), // MemberName: to.Ptr("dbo"), // StartTime: to.Ptr("11:00"), // }, // }}, // } } }
Output:
type WorkloadClassifiersClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type WorkloadClassifiersClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
WorkloadClassifiersClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkloadClassifiersClient.BeginCreateOrUpdate method.
type WorkloadClassifiersClientBeginDeleteOptions ¶ added in v0.3.0
type WorkloadClassifiersClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
WorkloadClassifiersClientBeginDeleteOptions contains the optional parameters for the WorkloadClassifiersClient.BeginDelete method.
type WorkloadClassifiersClientCreateOrUpdateResponse ¶ added in v0.3.0
type WorkloadClassifiersClientCreateOrUpdateResponse struct { // Workload classifier operations for a data warehouse WorkloadClassifier }
WorkloadClassifiersClientCreateOrUpdateResponse contains the response from method WorkloadClassifiersClient.BeginCreateOrUpdate.
type WorkloadClassifiersClientDeleteResponse ¶ added in v0.3.0
type WorkloadClassifiersClientDeleteResponse struct { }
WorkloadClassifiersClientDeleteResponse contains the response from method WorkloadClassifiersClient.BeginDelete.
type WorkloadClassifiersClientGetOptions ¶ added in v0.3.0
type WorkloadClassifiersClientGetOptions struct { }
WorkloadClassifiersClientGetOptions contains the optional parameters for the WorkloadClassifiersClient.Get method.
type WorkloadClassifiersClientGetResponse ¶ added in v0.3.0
type WorkloadClassifiersClientGetResponse struct { // Workload classifier operations for a data warehouse WorkloadClassifier }
WorkloadClassifiersClientGetResponse contains the response from method WorkloadClassifiersClient.Get.
type WorkloadClassifiersClientListByWorkloadGroupOptions ¶ added in v0.3.0
type WorkloadClassifiersClientListByWorkloadGroupOptions struct { }
WorkloadClassifiersClientListByWorkloadGroupOptions contains the optional parameters for the WorkloadClassifiersClient.NewListByWorkloadGroupPager method.
type WorkloadClassifiersClientListByWorkloadGroupResponse ¶ added in v0.3.0
type WorkloadClassifiersClientListByWorkloadGroupResponse struct { // A list of workload classifiers for a workload group. WorkloadClassifierListResult }
WorkloadClassifiersClientListByWorkloadGroupResponse contains the response from method WorkloadClassifiersClient.NewListByWorkloadGroupPager.
type WorkloadGroup ¶
type WorkloadGroup struct { // Resource properties. Properties *WorkloadGroupProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
WorkloadGroup - Workload group operations for a data warehouse
func (WorkloadGroup) MarshalJSON ¶
func (w WorkloadGroup) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WorkloadGroup.
func (*WorkloadGroup) UnmarshalJSON ¶ added in v1.1.0
func (w *WorkloadGroup) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadGroup.
type WorkloadGroupListResult ¶
type WorkloadGroupListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*WorkloadGroup }
WorkloadGroupListResult - A list of workload groups.
func (WorkloadGroupListResult) MarshalJSON ¶
func (w WorkloadGroupListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WorkloadGroupListResult.
func (*WorkloadGroupListResult) UnmarshalJSON ¶ added in v1.1.0
func (w *WorkloadGroupListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadGroupListResult.
type WorkloadGroupProperties ¶
type WorkloadGroupProperties struct { // REQUIRED; The workload group cap percentage resource. MaxResourcePercent *int32 // REQUIRED; The workload group minimum percentage resource. MinResourcePercent *int32 // REQUIRED; The workload group request minimum grant percentage. MinResourcePercentPerRequest *float64 // The workload group importance level. Importance *string // The workload group request maximum grant percentage. MaxResourcePercentPerRequest *float64 // The workload group query execution timeout. QueryExecutionTimeout *int32 }
WorkloadGroupProperties - Workload group definition. For more information look at sys.workloadmanagementworkload_groups (DMV).
func (WorkloadGroupProperties) MarshalJSON ¶ added in v1.1.0
func (w WorkloadGroupProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WorkloadGroupProperties.
func (*WorkloadGroupProperties) UnmarshalJSON ¶ added in v1.1.0
func (w *WorkloadGroupProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type WorkloadGroupProperties.
type WorkloadGroupsClient ¶
type WorkloadGroupsClient struct {
// contains filtered or unexported fields
}
WorkloadGroupsClient contains the methods for the WorkloadGroups group. Don't use this type directly, use NewWorkloadGroupsClient() instead.
func NewWorkloadGroupsClient ¶
func NewWorkloadGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkloadGroupsClient, error)
NewWorkloadGroupsClient creates a new instance of WorkloadGroupsClient with the specified values.
- subscriptionID - The subscription ID that identifies an Azure subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*WorkloadGroupsClient) BeginCreateOrUpdate ¶
func (client *WorkloadGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, parameters WorkloadGroup, options *WorkloadGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[WorkloadGroupsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a workload group. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- workloadGroupName - The name of the workload group.
- parameters - The requested workload group state.
- options - WorkloadGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkloadGroupsClient.BeginCreateOrUpdate method.
Example (CreateAWorkloadGroupWithAllPropertiesSpecified) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateWorkloadGroupMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewWorkloadGroupsClient().BeginCreateOrUpdate(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", "smallrc", armsql.WorkloadGroup{ Properties: &armsql.WorkloadGroupProperties{ Importance: to.Ptr("normal"), MaxResourcePercent: to.Ptr[int32](100), MaxResourcePercentPerRequest: to.Ptr[float64](3), MinResourcePercent: to.Ptr[int32](0), MinResourcePercentPerRequest: to.Ptr[float64](3), QueryExecutionTimeout: to.Ptr[int32](0), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.WorkloadGroup = armsql.WorkloadGroup{ // Name: to.Ptr("smallrc"), // Type: to.Ptr("Microsoft.Sql/servers/databases/workloadGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/smallrc"), // Properties: &armsql.WorkloadGroupProperties{ // Importance: to.Ptr("normal"), // MaxResourcePercent: to.Ptr[int32](100), // MaxResourcePercentPerRequest: to.Ptr[float64](3), // MinResourcePercent: to.Ptr[int32](0), // MinResourcePercentPerRequest: to.Ptr[float64](3), // QueryExecutionTimeout: to.Ptr[int32](0), // }, // } }
Output:
Example (CreateAWorkloadGroupWithTheRequiredPropertiesSpecified) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateWorkloadGroupMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewWorkloadGroupsClient().BeginCreateOrUpdate(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", "smallrc", armsql.WorkloadGroup{ Properties: &armsql.WorkloadGroupProperties{ MaxResourcePercent: to.Ptr[int32](100), MinResourcePercent: to.Ptr[int32](0), MinResourcePercentPerRequest: to.Ptr[float64](3), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.WorkloadGroup = armsql.WorkloadGroup{ // Name: to.Ptr("smallrc"), // Type: to.Ptr("Microsoft.Sql/servers/databases/workloadGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/smallrc"), // Properties: &armsql.WorkloadGroupProperties{ // Importance: to.Ptr("normal"), // MaxResourcePercent: to.Ptr[int32](100), // MaxResourcePercentPerRequest: to.Ptr[float64](3), // MinResourcePercent: to.Ptr[int32](0), // MinResourcePercentPerRequest: to.Ptr[float64](3), // QueryExecutionTimeout: to.Ptr[int32](0), // }, // } }
Output:
func (*WorkloadGroupsClient) BeginDelete ¶
func (client *WorkloadGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, options *WorkloadGroupsClientBeginDeleteOptions) (*runtime.Poller[WorkloadGroupsClientDeleteResponse], error)
BeginDelete - Deletes a workload group. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- workloadGroupName - The name of the workload group to delete.
- options - WorkloadGroupsClientBeginDeleteOptions contains the optional parameters for the WorkloadGroupsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteWorkloadGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewWorkloadGroupsClient().BeginDelete(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", "wlm_workloadgroup", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*WorkloadGroupsClient) Get ¶
func (client *WorkloadGroupsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, options *WorkloadGroupsClientGetOptions) (WorkloadGroupsClientGetResponse, error)
Get - Gets a workload group If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- workloadGroupName - The name of the workload group.
- options - WorkloadGroupsClientGetOptions contains the optional parameters for the WorkloadGroupsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetWorkloadGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewWorkloadGroupsClient().Get(ctx, "Default-SQL-SouthEastAsia", "testsvr", "testdb", "smallrc", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.WorkloadGroup = armsql.WorkloadGroup{ // Name: to.Ptr("smallrc"), // Type: to.Ptr("Microsoft.Sql/servers/databases/workloadGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/smallrc"), // Properties: &armsql.WorkloadGroupProperties{ // Importance: to.Ptr("normal"), // MaxResourcePercent: to.Ptr[int32](100), // MaxResourcePercentPerRequest: to.Ptr[float64](3), // MinResourcePercent: to.Ptr[int32](0), // MinResourcePercentPerRequest: to.Ptr[float64](3), // QueryExecutionTimeout: to.Ptr[int32](0), // }, // } }
Output:
func (*WorkloadGroupsClient) NewListByDatabasePager ¶ added in v0.5.0
func (client *WorkloadGroupsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *WorkloadGroupsClientListByDatabaseOptions) *runtime.Pager[WorkloadGroupsClientListByDatabaseResponse]
NewListByDatabasePager - Gets the list of workload groups
Generated from API version 2020-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- databaseName - The name of the database.
- options - WorkloadGroupsClientListByDatabaseOptions contains the optional parameters for the WorkloadGroupsClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/08894fa8d66cb44dc62a73f7a09530f905985fa3/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetWorkloadGroupList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armsql.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewWorkloadGroupsClient().NewListByDatabasePager("Default-SQL-SouthEastAsia", "testsvr", "testdb", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.WorkloadGroupListResult = armsql.WorkloadGroupListResult{ // Value: []*armsql.WorkloadGroup{ // { // Name: to.Ptr("smallrc"), // Type: to.Ptr("Microsoft.Sql/servers/databases/workloadGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/smallrc"), // Properties: &armsql.WorkloadGroupProperties{ // Importance: to.Ptr("normal"), // MaxResourcePercent: to.Ptr[int32](100), // MaxResourcePercentPerRequest: to.Ptr[float64](5), // MinResourcePercent: to.Ptr[int32](0), // MinResourcePercentPerRequest: to.Ptr[float64](5), // QueryExecutionTimeout: to.Ptr[int32](0), // }, // }, // { // Name: to.Ptr("mediumrc"), // Type: to.Ptr("Microsoft.Sql/servers/databases/workloadGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/mediumrc"), // Properties: &armsql.WorkloadGroupProperties{ // Importance: to.Ptr("normal"), // MaxResourcePercent: to.Ptr[int32](100), // MaxResourcePercentPerRequest: to.Ptr[float64](10), // MinResourcePercent: to.Ptr[int32](0), // MinResourcePercentPerRequest: to.Ptr[float64](10), // QueryExecutionTimeout: to.Ptr[int32](0), // }, // }, // { // Name: to.Ptr("largerc"), // Type: to.Ptr("Microsoft.Sql/servers/databases/workloadGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/workloadGroups/largerc"), // Properties: &armsql.WorkloadGroupProperties{ // Importance: to.Ptr("high"), // MaxResourcePercent: to.Ptr[int32](100), // MaxResourcePercentPerRequest: to.Ptr[float64](20), // MinResourcePercent: to.Ptr[int32](0), // MinResourcePercentPerRequest: to.Ptr[float64](20), // QueryExecutionTimeout: to.Ptr[int32](0), // }, // }}, // } } }
Output:
type WorkloadGroupsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type WorkloadGroupsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
WorkloadGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkloadGroupsClient.BeginCreateOrUpdate method.
type WorkloadGroupsClientBeginDeleteOptions ¶ added in v0.3.0
type WorkloadGroupsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
WorkloadGroupsClientBeginDeleteOptions contains the optional parameters for the WorkloadGroupsClient.BeginDelete method.
type WorkloadGroupsClientCreateOrUpdateResponse ¶ added in v0.3.0
type WorkloadGroupsClientCreateOrUpdateResponse struct { // Workload group operations for a data warehouse WorkloadGroup }
WorkloadGroupsClientCreateOrUpdateResponse contains the response from method WorkloadGroupsClient.BeginCreateOrUpdate.
type WorkloadGroupsClientDeleteResponse ¶ added in v0.3.0
type WorkloadGroupsClientDeleteResponse struct { }
WorkloadGroupsClientDeleteResponse contains the response from method WorkloadGroupsClient.BeginDelete.
type WorkloadGroupsClientGetOptions ¶ added in v0.3.0
type WorkloadGroupsClientGetOptions struct { }
WorkloadGroupsClientGetOptions contains the optional parameters for the WorkloadGroupsClient.Get method.
type WorkloadGroupsClientGetResponse ¶ added in v0.3.0
type WorkloadGroupsClientGetResponse struct { // Workload group operations for a data warehouse WorkloadGroup }
WorkloadGroupsClientGetResponse contains the response from method WorkloadGroupsClient.Get.
type WorkloadGroupsClientListByDatabaseOptions ¶ added in v0.3.0
type WorkloadGroupsClientListByDatabaseOptions struct { }
WorkloadGroupsClientListByDatabaseOptions contains the optional parameters for the WorkloadGroupsClient.NewListByDatabasePager method.
type WorkloadGroupsClientListByDatabaseResponse ¶ added in v0.3.0
type WorkloadGroupsClientListByDatabaseResponse struct { // A list of workload groups. WorkloadGroupListResult }
WorkloadGroupsClientListByDatabaseResponse contains the response from method WorkloadGroupsClient.NewListByDatabasePager.
Source Files ¶
- agent_client.go
- backupshorttermretentionpolicies_client.go
- build.go
- capabilities_client.go
- client_factory.go
- constants.go
- databaseadvancedthreatprotectionsettings_client.go
- databaseadvisors_client.go
- databaseautomatictuning_client.go
- databaseblobauditingpolicies_client.go
- databasecolumns_client.go
- databaseextensions_client.go
- databaseoperations_client.go
- databaserecommendedactions_client.go
- databases_client.go
- databaseschemas_client.go
- databasesecurityalertpolicies_client.go
- databasetables_client.go
- databaseusages_client.go
- databasevulnerabilityassessmentrulebaselines_client.go
- databasevulnerabilityassessments_client.go
- databasevulnerabilityassessmentscans_client.go
- datamaskingpolicies_client.go
- datamaskingrules_client.go
- datawarehouseuseractivities_client.go
- deletedservers_client.go
- distributedavailabilitygroups_client.go
- elasticpoolactivities_client.go
- elasticpooldatabaseactivities_client.go
- elasticpooloperations_client.go
- elasticpools_client.go
- encryptionprotectors_client.go
- endpointcertificates_client.go
- extendeddatabaseblobauditingpolicies_client.go
- extendedserverblobauditingpolicies_client.go
- failovergroups_client.go
- firewallrules_client.go
- geobackuppolicies_client.go
- instancefailovergroups_client.go
- instancepools_client.go
- ipv6firewallrules_client.go
- jobagents_client.go
- jobcredentials_client.go
- jobexecutions_client.go
- jobs_client.go
- jobstepexecutions_client.go
- jobsteps_client.go
- jobtargetexecutions_client.go
- jobtargetgroups_client.go
- jobversions_client.go
- ledgerdigestuploads_client.go
- longtermretentionbackups_client.go
- longtermretentionmanagedinstancebackups_client.go
- longtermretentionpolicies_client.go
- maintenancewindowoptions_client.go
- maintenancewindows_client.go
- managedbackupshorttermretentionpolicies_client.go
- manageddatabasecolumns_client.go
- manageddatabasequeries_client.go
- manageddatabaserecommendedsensitivitylabels_client.go
- manageddatabaserestoredetails_client.go
- manageddatabases_client.go
- manageddatabaseschemas_client.go
- manageddatabasesecurityalertpolicies_client.go
- manageddatabasesecurityevents_client.go
- manageddatabasesensitivitylabels_client.go
- manageddatabasetables_client.go
- manageddatabasetransparentdataencryption_client.go
- manageddatabasevulnerabilityassessmentrulebaselines_client.go
- manageddatabasevulnerabilityassessments_client.go
- manageddatabasevulnerabilityassessmentscans_client.go
- managedinstanceadministrators_client.go
- managedinstanceazureadonlyauthentications_client.go
- managedinstanceencryptionprotectors_client.go
- managedinstancekeys_client.go
- managedinstancelongtermretentionpolicies_client.go
- managedinstanceoperations_client.go
- managedinstanceprivateendpointconnections_client.go
- managedinstanceprivatelinkresources_client.go
- managedinstances_client.go
- managedinstancetdecertificates_client.go
- managedinstancevulnerabilityassessments_client.go
- managedrestorabledroppeddatabasebackupshorttermretentionpolicies_client.go
- managedserversecurityalertpolicies_client.go
- models.go
- models_serde.go
- operations_client.go
- options.go
- outboundfirewallrules_client.go
- privateendpointconnections_client.go
- privatelinkresources_client.go
- recommendedsensitivitylabels_client.go
- recoverabledatabases_client.go
- recoverablemanageddatabases_client.go
- replicationlinks_client.go
- response_types.go
- restorabledroppeddatabases_client.go
- restorabledroppedmanageddatabases_client.go
- restorepoints_client.go
- sensitivitylabels_client.go
- serveradvancedthreatprotectionsettings_client.go
- serveradvisors_client.go
- serverautomatictuning_client.go
- serverazureadadministrators_client.go
- serverazureadonlyauthentications_client.go
- serverblobauditingpolicies_client.go
- servercommunicationlinks_client.go
- serverconnectionpolicies_client.go
- serverdevopsauditsettings_client.go
- serverdnsaliases_client.go
- serverkeys_client.go
- serveroperations_client.go
- servers_client.go
- serversecurityalertpolicies_client.go
- servertrustcertificates_client.go
- servertrustgroups_client.go
- serverusages_client.go
- servervulnerabilityassessments_client.go
- serviceobjectives_client.go
- subscriptionusages_client.go
- syncagents_client.go
- syncgroups_client.go
- syncmembers_client.go
- tdecertificates_client.go
- time_rfc3339.go
- timezones_client.go
- transparentdataencryptions_client.go
- usages_client.go
- virtualclusters_client.go
- virtualnetworkrules_client.go
- workloadclassifiers_client.go
- workloadgroups_client.go