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 AlwaysEncryptedEnclaveType
- 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 AvailabilityZoneType
- 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 BackupStorageAccessTier
- type BackupStorageRedundancy
- type BaseLongTermRetentionPolicyProperties
- type Baseline
- type BaselineAdjustedResult
- type BaselineName
- type BenchmarkReference
- type BlobAuditingPolicyState
- type CapabilitiesClient
- type CapabilitiesClientListByLocationOptions
- type CapabilitiesClientListByLocationResponse
- type CapabilityGroup
- type CapabilityStatus
- type CatalogCollationType
- type ChangeLongTermRetentionBackupAccessTierParameters
- 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) NewDatabaseEncryptionProtectorsClient() *DatabaseEncryptionProtectorsClient
- func (c *ClientFactory) NewDatabaseExtensionsClient() *DatabaseExtensionsClient
- func (c *ClientFactory) NewDatabaseOperationsClient() *DatabaseOperationsClient
- func (c *ClientFactory) NewDatabaseRecommendedActionsClient() *DatabaseRecommendedActionsClient
- func (c *ClientFactory) NewDatabaseSQLVulnerabilityAssessmentBaselinesClient() *DatabaseSQLVulnerabilityAssessmentBaselinesClient
- func (c *ClientFactory) NewDatabaseSQLVulnerabilityAssessmentExecuteScanClient() *DatabaseSQLVulnerabilityAssessmentExecuteScanClient
- func (c *ClientFactory) NewDatabaseSQLVulnerabilityAssessmentRuleBaselinesClient() *DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient
- func (c *ClientFactory) NewDatabaseSQLVulnerabilityAssessmentScanResultClient() *DatabaseSQLVulnerabilityAssessmentScanResultClient
- func (c *ClientFactory) NewDatabaseSQLVulnerabilityAssessmentScansClient() *DatabaseSQLVulnerabilityAssessmentScansClient
- func (c *ClientFactory) NewDatabaseSQLVulnerabilityAssessmentsSettingsClient() *DatabaseSQLVulnerabilityAssessmentsSettingsClient
- 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) NewJobPrivateEndpointsClient() *JobPrivateEndpointsClient
- 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) NewManagedDatabaseAdvancedThreatProtectionSettingsClient() *ManagedDatabaseAdvancedThreatProtectionSettingsClient
- func (c *ClientFactory) NewManagedDatabaseColumnsClient() *ManagedDatabaseColumnsClient
- func (c *ClientFactory) NewManagedDatabaseMoveOperationsClient() *ManagedDatabaseMoveOperationsClient
- 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) NewManagedInstanceAdvancedThreatProtectionSettingsClient() *ManagedInstanceAdvancedThreatProtectionSettingsClient
- func (c *ClientFactory) NewManagedInstanceAzureADOnlyAuthenticationsClient() *ManagedInstanceAzureADOnlyAuthenticationsClient
- func (c *ClientFactory) NewManagedInstanceDtcsClient() *ManagedInstanceDtcsClient
- 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) NewManagedLedgerDigestUploadsClient() *ManagedLedgerDigestUploadsClient
- func (c *ClientFactory) NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient() *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient
- func (c *ClientFactory) NewManagedServerDNSAliasesClient() *ManagedServerDNSAliasesClient
- 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) NewServerConfigurationOptionsClient() *ServerConfigurationOptionsClient
- 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) NewStartStopManagedInstanceSchedulesClient() *StartStopManagedInstanceSchedulesClient
- func (c *ClientFactory) NewSubscriptionUsagesClient() *SubscriptionUsagesClient
- func (c *ClientFactory) NewSynapseLinkWorkspacesClient() *SynapseLinkWorkspacesClient
- 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) NewVulnerabilityAssessmentBaselineClient() *VulnerabilityAssessmentBaselineClient
- func (c *ClientFactory) NewVulnerabilityAssessmentBaselinesClient() *VulnerabilityAssessmentBaselinesClient
- func (c *ClientFactory) NewVulnerabilityAssessmentExecuteScanClient() *VulnerabilityAssessmentExecuteScanClient
- func (c *ClientFactory) NewVulnerabilityAssessmentRuleBaselineClient() *VulnerabilityAssessmentRuleBaselineClient
- func (c *ClientFactory) NewVulnerabilityAssessmentRuleBaselinesClient() *VulnerabilityAssessmentRuleBaselinesClient
- func (c *ClientFactory) NewVulnerabilityAssessmentScanResultClient() *VulnerabilityAssessmentScanResultClient
- func (c *ClientFactory) NewVulnerabilityAssessmentScansClient() *VulnerabilityAssessmentScansClient
- func (c *ClientFactory) NewVulnerabilityAssessmentsClient() *VulnerabilityAssessmentsClient
- func (c *ClientFactory) NewVulnerabilityAssessmentsSettingsClient() *VulnerabilityAssessmentsSettingsClient
- 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 DNSRefreshOperationStatus
- 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 DatabaseEncryptionProtectorsClient
- func (client *DatabaseEncryptionProtectorsClient) BeginRevalidate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[DatabaseEncryptionProtectorsClientRevalidateResponse], error)
- func (client *DatabaseEncryptionProtectorsClient) BeginRevert(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[DatabaseEncryptionProtectorsClientRevertResponse], error)
- type DatabaseEncryptionProtectorsClientBeginRevalidateOptions
- type DatabaseEncryptionProtectorsClientBeginRevertOptions
- type DatabaseEncryptionProtectorsClientRevalidateResponse
- type DatabaseEncryptionProtectorsClientRevertResponse
- 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 DatabaseKey
- type DatabaseKeyType
- 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 DatabaseSQLVulnerabilityAssessmentBaselineSet
- type DatabaseSQLVulnerabilityAssessmentBaselineSetListResult
- type DatabaseSQLVulnerabilityAssessmentBaselineSetProperties
- type DatabaseSQLVulnerabilityAssessmentBaselinesClient
- func (client *DatabaseSQLVulnerabilityAssessmentBaselinesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseSQLVulnerabilityAssessmentBaselinesClientCreateOrUpdateResponse, error)
- func (client *DatabaseSQLVulnerabilityAssessmentBaselinesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseSQLVulnerabilityAssessmentBaselinesClientGetResponse, error)
- func (client *DatabaseSQLVulnerabilityAssessmentBaselinesClient) NewListBySQLVulnerabilityAssessmentPager(resourceGroupName string, serverName string, databaseName string, ...) ...
- type DatabaseSQLVulnerabilityAssessmentBaselinesClientCreateOrUpdateOptions
- type DatabaseSQLVulnerabilityAssessmentBaselinesClientCreateOrUpdateResponse
- type DatabaseSQLVulnerabilityAssessmentBaselinesClientGetOptions
- type DatabaseSQLVulnerabilityAssessmentBaselinesClientGetResponse
- type DatabaseSQLVulnerabilityAssessmentBaselinesClientListBySQLVulnerabilityAssessmentOptions
- type DatabaseSQLVulnerabilityAssessmentBaselinesClientListBySQLVulnerabilityAssessmentResponse
- type DatabaseSQLVulnerabilityAssessmentExecuteScanClient
- type DatabaseSQLVulnerabilityAssessmentExecuteScanClientBeginExecuteOptions
- type DatabaseSQLVulnerabilityAssessmentExecuteScanClientExecuteResponse
- type DatabaseSQLVulnerabilityAssessmentRuleBaseline
- type DatabaseSQLVulnerabilityAssessmentRuleBaselineInput
- type DatabaseSQLVulnerabilityAssessmentRuleBaselineInputProperties
- type DatabaseSQLVulnerabilityAssessmentRuleBaselineListInput
- type DatabaseSQLVulnerabilityAssessmentRuleBaselineListInputProperties
- type DatabaseSQLVulnerabilityAssessmentRuleBaselineListResult
- type DatabaseSQLVulnerabilityAssessmentRuleBaselineProperties
- type DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient
- func (client *DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse, ...)
- func (client *DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientDeleteResponse, error)
- func (client *DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientGetResponse, error)
- func (client *DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient) NewListByBaselinePager(resourceGroupName string, serverName string, databaseName string, ...) ...
- type DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions
- type DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse
- type DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientDeleteOptions
- type DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientDeleteResponse
- type DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientGetOptions
- type DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientGetResponse
- type DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientListByBaselineOptions
- type DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientListByBaselineResponse
- type DatabaseSQLVulnerabilityAssessmentScanResultClient
- func (client *DatabaseSQLVulnerabilityAssessmentScanResultClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseSQLVulnerabilityAssessmentScanResultClientGetResponse, error)
- func (client *DatabaseSQLVulnerabilityAssessmentScanResultClient) NewListByScanPager(resourceGroupName string, serverName string, databaseName string, ...) ...
- type DatabaseSQLVulnerabilityAssessmentScanResultClientGetOptions
- type DatabaseSQLVulnerabilityAssessmentScanResultClientGetResponse
- type DatabaseSQLVulnerabilityAssessmentScanResultClientListByScanOptions
- type DatabaseSQLVulnerabilityAssessmentScanResultClientListByScanResponse
- type DatabaseSQLVulnerabilityAssessmentScansClient
- func (client *DatabaseSQLVulnerabilityAssessmentScansClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseSQLVulnerabilityAssessmentScansClientGetResponse, error)
- func (client *DatabaseSQLVulnerabilityAssessmentScansClient) NewListBySQLVulnerabilityAssessmentsPager(resourceGroupName string, serverName string, databaseName string, ...) ...
- type DatabaseSQLVulnerabilityAssessmentScansClientGetOptions
- type DatabaseSQLVulnerabilityAssessmentScansClientGetResponse
- type DatabaseSQLVulnerabilityAssessmentScansClientListBySQLVulnerabilityAssessmentsOptions
- type DatabaseSQLVulnerabilityAssessmentScansClientListBySQLVulnerabilityAssessmentsResponse
- type DatabaseSQLVulnerabilityAssessmentsSettingsClient
- func (client *DatabaseSQLVulnerabilityAssessmentsSettingsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseSQLVulnerabilityAssessmentsSettingsClientGetResponse, error)
- func (client *DatabaseSQLVulnerabilityAssessmentsSettingsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, ...) ...
- type DatabaseSQLVulnerabilityAssessmentsSettingsClientGetOptions
- type DatabaseSQLVulnerabilityAssessmentsSettingsClientGetResponse
- type DatabaseSQLVulnerabilityAssessmentsSettingsClientListByDatabaseOptions
- type DatabaseSQLVulnerabilityAssessmentsSettingsClientListByDatabaseResponse
- 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 DevOpsAuditingSettingsName
- 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 DtcName
- 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 EndpointDependency
- type EndpointDetail
- type ErrorAdditionalInfo
- type ErrorDetail
- type ErrorResponse
- 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 ExternalGovernanceStatus
- 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) BeginTryPlannedBeforeForcedFailover(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[FailoverGroupsClientTryPlannedBeforeForcedFailoverResponse], ...)
- 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 FailoverGroupsClientBeginTryPlannedBeforeForcedFailoverOptions
- type FailoverGroupsClientBeginUpdateOptions
- type FailoverGroupsClientCreateOrUpdateResponse
- type FailoverGroupsClientDeleteResponse
- type FailoverGroupsClientFailoverResponse
- type FailoverGroupsClientForceFailoverAllowDataLossResponse
- type FailoverGroupsClientGetOptions
- type FailoverGroupsClientGetResponse
- type FailoverGroupsClientListByServerOptions
- type FailoverGroupsClientListByServerResponse
- type FailoverGroupsClientTryPlannedBeforeForcedFailoverResponse
- 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 FreeLimitExhaustionBehavior
- 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 JobPrivateEndpoint
- type JobPrivateEndpointListResult
- type JobPrivateEndpointProperties
- type JobPrivateEndpointsClient
- func (client *JobPrivateEndpointsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[JobPrivateEndpointsClientCreateOrUpdateResponse], error)
- func (client *JobPrivateEndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[JobPrivateEndpointsClientDeleteResponse], error)
- func (client *JobPrivateEndpointsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (JobPrivateEndpointsClientGetResponse, error)
- func (client *JobPrivateEndpointsClient) NewListByAgentPager(resourceGroupName string, serverName string, jobAgentName string, ...) *runtime.Pager[JobPrivateEndpointsClientListByAgentResponse]
- type JobPrivateEndpointsClientBeginCreateOrUpdateOptions
- type JobPrivateEndpointsClientBeginDeleteOptions
- type JobPrivateEndpointsClientCreateOrUpdateResponse
- type JobPrivateEndpointsClientDeleteResponse
- type JobPrivateEndpointsClientGetOptions
- type JobPrivateEndpointsClientGetResponse
- type JobPrivateEndpointsClientListByAgentOptions
- type JobPrivateEndpointsClientListByAgentResponse
- 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) BeginChangeAccessTier(ctx context.Context, locationName string, longTermRetentionServerName string, ...) (*runtime.Poller[LongTermRetentionBackupsClientChangeAccessTierResponse], error)
- func (client *LongTermRetentionBackupsClient) BeginChangeAccessTierByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, ...) (...)
- 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 LongTermRetentionBackupsClientBeginChangeAccessTierByResourceGroupOptions
- type LongTermRetentionBackupsClientBeginChangeAccessTierOptions
- type LongTermRetentionBackupsClientBeginCopyByResourceGroupOptions
- type LongTermRetentionBackupsClientBeginCopyOptions
- type LongTermRetentionBackupsClientBeginDeleteByResourceGroupOptions
- type LongTermRetentionBackupsClientBeginDeleteOptions
- type LongTermRetentionBackupsClientBeginUpdateByResourceGroupOptions
- type LongTermRetentionBackupsClientBeginUpdateOptions
- type LongTermRetentionBackupsClientChangeAccessTierByResourceGroupResponse
- type LongTermRetentionBackupsClientChangeAccessTierResponse
- 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 LongTermRetentionPolicyProperties
- 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 ManagedDatabaseAdvancedThreatProtection
- type ManagedDatabaseAdvancedThreatProtectionListResult
- type ManagedDatabaseAdvancedThreatProtectionSettingsClient
- func (client *ManagedDatabaseAdvancedThreatProtectionSettingsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedDatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse, ...)
- func (client *ManagedDatabaseAdvancedThreatProtectionSettingsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedDatabaseAdvancedThreatProtectionSettingsClientGetResponse, error)
- func (client *ManagedDatabaseAdvancedThreatProtectionSettingsClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, ...) ...
- type ManagedDatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateOptions
- type ManagedDatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse
- type ManagedDatabaseAdvancedThreatProtectionSettingsClientGetOptions
- type ManagedDatabaseAdvancedThreatProtectionSettingsClientGetResponse
- type ManagedDatabaseAdvancedThreatProtectionSettingsClientListByDatabaseOptions
- type ManagedDatabaseAdvancedThreatProtectionSettingsClientListByDatabaseResponse
- 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 ManagedDatabaseMoveDefinition
- type ManagedDatabaseMoveOperationListResult
- type ManagedDatabaseMoveOperationResult
- type ManagedDatabaseMoveOperationResultProperties
- type ManagedDatabaseMoveOperationsClient
- func (client *ManagedDatabaseMoveOperationsClient) Get(ctx context.Context, resourceGroupName string, locationName string, ...) (ManagedDatabaseMoveOperationsClientGetResponse, error)
- func (client *ManagedDatabaseMoveOperationsClient) NewListByLocationPager(resourceGroupName string, locationName string, ...) *runtime.Pager[ManagedDatabaseMoveOperationsClientListByLocationResponse]
- type ManagedDatabaseMoveOperationsClientGetOptions
- type ManagedDatabaseMoveOperationsClientGetResponse
- type ManagedDatabaseMoveOperationsClientListByLocationOptions
- type ManagedDatabaseMoveOperationsClientListByLocationResponse
- 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 ManagedDatabaseRestoreDetailsBackupSetProperties
- type ManagedDatabaseRestoreDetailsClient
- type ManagedDatabaseRestoreDetailsClientGetOptions
- type ManagedDatabaseRestoreDetailsClientGetResponse
- type ManagedDatabaseRestoreDetailsProperties
- type ManagedDatabaseRestoreDetailsResult
- type ManagedDatabaseRestoreDetailsUnrestorableFileProperties
- 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 ManagedDatabaseStartMoveDefinition
- 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) BeginCancelMove(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ManagedDatabasesClientCancelMoveResponse], error)
- func (client *ManagedDatabasesClient) BeginCompleteMove(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ManagedDatabasesClientCompleteMoveResponse], error)
- 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) BeginStartMove(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ManagedDatabasesClientStartMoveResponse], 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 ManagedDatabasesClientBeginCancelMoveOptions
- type ManagedDatabasesClientBeginCompleteMoveOptions
- type ManagedDatabasesClientBeginCompleteRestoreOptions
- type ManagedDatabasesClientBeginCreateOrUpdateOptions
- type ManagedDatabasesClientBeginDeleteOptions
- type ManagedDatabasesClientBeginStartMoveOptions
- type ManagedDatabasesClientBeginUpdateOptions
- type ManagedDatabasesClientCancelMoveResponse
- type ManagedDatabasesClientCompleteMoveResponse
- type ManagedDatabasesClientCompleteRestoreResponse
- type ManagedDatabasesClientCreateOrUpdateResponse
- type ManagedDatabasesClientDeleteResponse
- type ManagedDatabasesClientGetOptions
- type ManagedDatabasesClientGetResponse
- type ManagedDatabasesClientListByInstanceOptions
- type ManagedDatabasesClientListByInstanceResponse
- type ManagedDatabasesClientListInaccessibleByInstanceOptions
- type ManagedDatabasesClientListInaccessibleByInstanceResponse
- type ManagedDatabasesClientStartMoveResponse
- 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 ManagedInstanceAdvancedThreatProtection
- type ManagedInstanceAdvancedThreatProtectionListResult
- type ManagedInstanceAdvancedThreatProtectionSettingsClient
- func (client *ManagedInstanceAdvancedThreatProtectionSettingsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (...)
- func (client *ManagedInstanceAdvancedThreatProtectionSettingsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedInstanceAdvancedThreatProtectionSettingsClientGetResponse, error)
- func (client *ManagedInstanceAdvancedThreatProtectionSettingsClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, ...) ...
- type ManagedInstanceAdvancedThreatProtectionSettingsClientBeginCreateOrUpdateOptions
- type ManagedInstanceAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse
- type ManagedInstanceAdvancedThreatProtectionSettingsClientGetOptions
- type ManagedInstanceAdvancedThreatProtectionSettingsClientGetResponse
- type ManagedInstanceAdvancedThreatProtectionSettingsClientListByInstanceOptions
- type ManagedInstanceAdvancedThreatProtectionSettingsClientListByInstanceResponse
- 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 ManagedInstanceDtc
- type ManagedInstanceDtcListResult
- type ManagedInstanceDtcProperties
- type ManagedInstanceDtcSecuritySettings
- type ManagedInstanceDtcTransactionManagerCommunicationSettings
- type ManagedInstanceDtcsClient
- func (client *ManagedInstanceDtcsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ManagedInstanceDtcsClientCreateOrUpdateResponse], error)
- func (client *ManagedInstanceDtcsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedInstanceDtcsClientGetResponse, error)
- func (client *ManagedInstanceDtcsClient) NewListByManagedInstancePager(resourceGroupName string, managedInstanceName string, ...) *runtime.Pager[ManagedInstanceDtcsClientListByManagedInstanceResponse]
- type ManagedInstanceDtcsClientBeginCreateOrUpdateOptions
- type ManagedInstanceDtcsClientCreateOrUpdateResponse
- type ManagedInstanceDtcsClientGetOptions
- type ManagedInstanceDtcsClientGetResponse
- type ManagedInstanceDtcsClientListByManagedInstanceOptions
- type ManagedInstanceDtcsClientListByManagedInstanceResponse
- 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) BeginStart(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ManagedInstancesClientStartResponse], error)
- func (client *ManagedInstancesClient) BeginStop(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ManagedInstancesClientStopResponse], 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) NewListOutboundNetworkDependenciesByManagedInstancePager(resourceGroupName string, managedInstanceName string, ...) ...
- func (client *ManagedInstancesClient) NewListPager(options *ManagedInstancesClientListOptions) *runtime.Pager[ManagedInstancesClientListResponse]
- type ManagedInstancesClientBeginCreateOrUpdateOptions
- type ManagedInstancesClientBeginDeleteOptions
- type ManagedInstancesClientBeginFailoverOptions
- type ManagedInstancesClientBeginStartOptions
- type ManagedInstancesClientBeginStopOptions
- 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 ManagedInstancesClientListOutboundNetworkDependenciesByManagedInstanceOptions
- type ManagedInstancesClientListOutboundNetworkDependenciesByManagedInstanceResponse
- type ManagedInstancesClientListResponse
- type ManagedInstancesClientStartResponse
- type ManagedInstancesClientStopResponse
- type ManagedInstancesClientUpdateResponse
- type ManagedLedgerDigestUploads
- type ManagedLedgerDigestUploadsClient
- func (client *ManagedLedgerDigestUploadsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ManagedLedgerDigestUploadsClientCreateOrUpdateResponse], error)
- func (client *ManagedLedgerDigestUploadsClient) BeginDisable(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ManagedLedgerDigestUploadsClientDisableResponse], error)
- func (client *ManagedLedgerDigestUploadsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedLedgerDigestUploadsClientGetResponse, error)
- func (client *ManagedLedgerDigestUploadsClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, ...) *runtime.Pager[ManagedLedgerDigestUploadsClientListByDatabaseResponse]
- type ManagedLedgerDigestUploadsClientBeginCreateOrUpdateOptions
- type ManagedLedgerDigestUploadsClientBeginDisableOptions
- type ManagedLedgerDigestUploadsClientCreateOrUpdateResponse
- type ManagedLedgerDigestUploadsClientDisableResponse
- type ManagedLedgerDigestUploadsClientGetOptions
- type ManagedLedgerDigestUploadsClientGetResponse
- type ManagedLedgerDigestUploadsClientListByDatabaseOptions
- type ManagedLedgerDigestUploadsClientListByDatabaseResponse
- type ManagedLedgerDigestUploadsListResult
- type ManagedLedgerDigestUploadsName
- type ManagedLedgerDigestUploadsProperties
- type ManagedLedgerDigestUploadsState
- 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 ManagedServerDNSAlias
- type ManagedServerDNSAliasAcquisition
- type ManagedServerDNSAliasCreation
- type ManagedServerDNSAliasListResult
- type ManagedServerDNSAliasProperties
- type ManagedServerDNSAliasesClient
- func (client *ManagedServerDNSAliasesClient) BeginAcquire(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ManagedServerDNSAliasesClientAcquireResponse], error)
- func (client *ManagedServerDNSAliasesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ManagedServerDNSAliasesClientCreateOrUpdateResponse], error)
- func (client *ManagedServerDNSAliasesClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ManagedServerDNSAliasesClientDeleteResponse], error)
- func (client *ManagedServerDNSAliasesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedServerDNSAliasesClientGetResponse, error)
- func (client *ManagedServerDNSAliasesClient) NewListByManagedInstancePager(resourceGroupName string, managedInstanceName string, ...) *runtime.Pager[ManagedServerDNSAliasesClientListByManagedInstanceResponse]
- type ManagedServerDNSAliasesClientAcquireResponse
- type ManagedServerDNSAliasesClientBeginAcquireOptions
- type ManagedServerDNSAliasesClientBeginCreateOrUpdateOptions
- type ManagedServerDNSAliasesClientBeginDeleteOptions
- type ManagedServerDNSAliasesClientCreateOrUpdateResponse
- type ManagedServerDNSAliasesClientDeleteResponse
- type ManagedServerDNSAliasesClientGetOptions
- type ManagedServerDNSAliasesClientGetResponse
- type ManagedServerDNSAliasesClientListByManagedInstanceOptions
- type ManagedServerDNSAliasesClientListByManagedInstanceResponse
- 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 MinimalTLSVersion
- type MoveOperationMode
- type Name
- type NetworkIsolationSettings
- type Operation
- type OperationDisplay
- type OperationImpact
- type OperationListResult
- type OperationMode
- type OperationOrigin
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type OutboundEnvironmentEndpoint
- type OutboundEnvironmentEndpointCollection
- 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 QueryCheck
- 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 RefreshExternalGovernanceStatusOperationResult
- type RefreshExternalGovernanceStatusOperationResultProperties
- type Remediation
- type ReplicaType
- type ReplicationLink
- type ReplicationLinkListResult
- type ReplicationLinkProperties
- type ReplicationLinkType
- type ReplicationLinksClient
- func (client *ReplicationLinksClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ReplicationLinksClientDeleteResponse], error)
- 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) 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 ReplicationLinksClientBeginDeleteOptions
- type ReplicationLinksClientBeginFailoverAllowDataLossOptions
- type ReplicationLinksClientBeginFailoverOptions
- 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 RuleSeverity
- type RuleStatus
- type RuleType
- type SKU
- type SQLAgentConfigurationPropertiesState
- type SQLVulnerabilityAssessmentName
- type SQLVulnerabilityAssessmentState
- type SampleName
- type ScheduleItem
- type SecondaryInstanceType
- 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 ServerConfigurationOption
- type ServerConfigurationOptionListResult
- type ServerConfigurationOptionName
- type ServerConfigurationOptionProperties
- type ServerConfigurationOptionsClient
- func (client *ServerConfigurationOptionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*runtime.Poller[ServerConfigurationOptionsClientCreateOrUpdateResponse], error)
- func (client *ServerConfigurationOptionsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ServerConfigurationOptionsClientGetResponse, error)
- func (client *ServerConfigurationOptionsClient) NewListByManagedInstancePager(resourceGroupName string, managedInstanceName string, ...) *runtime.Pager[ServerConfigurationOptionsClientListByManagedInstanceResponse]
- type ServerConfigurationOptionsClientBeginCreateOrUpdateOptions
- type ServerConfigurationOptionsClientCreateOrUpdateResponse
- type ServerConfigurationOptionsClientGetOptions
- type ServerConfigurationOptionsClientGetResponse
- type ServerConfigurationOptionsClientListByManagedInstanceOptions
- type ServerConfigurationOptionsClientListByManagedInstanceResponse
- 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 ServerPublicNetworkAccessFlag
- 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) BeginRefreshStatus(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[ServersClientRefreshStatusResponse], 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 ServersClientBeginRefreshStatusOptions
- 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 ServersClientRefreshStatusResponse
- 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 StartStopManagedInstanceSchedule
- type StartStopManagedInstanceScheduleListResult
- type StartStopManagedInstanceScheduleProperties
- type StartStopManagedInstanceSchedulesClient
- func (client *StartStopManagedInstanceSchedulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (StartStopManagedInstanceSchedulesClientCreateOrUpdateResponse, error)
- func (client *StartStopManagedInstanceSchedulesClient) Delete(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (StartStopManagedInstanceSchedulesClientDeleteResponse, error)
- func (client *StartStopManagedInstanceSchedulesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (StartStopManagedInstanceSchedulesClientGetResponse, error)
- func (client *StartStopManagedInstanceSchedulesClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, ...) *runtime.Pager[StartStopManagedInstanceSchedulesClientListByInstanceResponse]
- type StartStopManagedInstanceSchedulesClientCreateOrUpdateOptions
- type StartStopManagedInstanceSchedulesClientCreateOrUpdateResponse
- type StartStopManagedInstanceSchedulesClientDeleteOptions
- type StartStopManagedInstanceSchedulesClientDeleteResponse
- type StartStopManagedInstanceSchedulesClientGetOptions
- type StartStopManagedInstanceSchedulesClientGetResponse
- type StartStopManagedInstanceSchedulesClientListByInstanceOptions
- type StartStopManagedInstanceSchedulesClientListByInstanceResponse
- type StartStopScheduleName
- 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 SynapseLinkWorkspace
- type SynapseLinkWorkspaceInfoProperties
- type SynapseLinkWorkspaceListResult
- type SynapseLinkWorkspaceProperties
- type SynapseLinkWorkspacesClient
- type SynapseLinkWorkspacesClientListByDatabaseOptions
- type SynapseLinkWorkspacesClientListByDatabaseResponse
- 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) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*runtime.Poller[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 TransparentDataEncryptionsClientBeginCreateOrUpdateOptions
- type TransparentDataEncryptionsClientCreateOrUpdateResponse
- type TransparentDataEncryptionsClientGetOptions
- type TransparentDataEncryptionsClientGetResponse
- type TransparentDataEncryptionsClientListByDatabaseOptions
- type TransparentDataEncryptionsClientListByDatabaseResponse
- type UnitDefinitionType
- type UnitType
- type UpdateLongTermRetentionBackupParameters
- type UpdateLongTermRetentionBackupParametersProperties
- type UpdateVirtualClusterDNSServersOperation
- type UpsertManagedServerOperationParameters
- type UpsertManagedServerOperationStep
- type UpsertManagedServerOperationStepStatus
- type Usage
- type UsageListResult
- type UsagesClient
- type UsagesClientListByInstancePoolOptions
- type UsagesClientListByInstancePoolResponse
- type UserIdentity
- type VaRule
- type VirtualCluster
- type VirtualClusterDNSServersProperties
- 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) BeginUpdateDNSServers(ctx context.Context, resourceGroupName string, virtualClusterName string, ...) (*runtime.Poller[VirtualClustersClientUpdateDNSServersResponse], 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]
- type VirtualClustersClientBeginDeleteOptions
- type VirtualClustersClientBeginUpdateDNSServersOptions
- type VirtualClustersClientBeginUpdateOptions
- type VirtualClustersClientDeleteResponse
- type VirtualClustersClientGetOptions
- type VirtualClustersClientGetResponse
- type VirtualClustersClientListByResourceGroupOptions
- type VirtualClustersClientListByResourceGroupResponse
- type VirtualClustersClientListOptions
- type VirtualClustersClientListResponse
- 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 VulnerabilityAssessment
- type VulnerabilityAssessmentBaselineClient
- func (client *VulnerabilityAssessmentBaselineClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (VulnerabilityAssessmentBaselineClientGetResponse, error)
- func (client *VulnerabilityAssessmentBaselineClient) NewListBySQLVulnerabilityAssessmentPager(resourceGroupName string, serverName string, ...) ...
- type VulnerabilityAssessmentBaselineClientGetOptions
- type VulnerabilityAssessmentBaselineClientGetResponse
- type VulnerabilityAssessmentBaselineClientListBySQLVulnerabilityAssessmentOptions
- type VulnerabilityAssessmentBaselineClientListBySQLVulnerabilityAssessmentResponse
- type VulnerabilityAssessmentBaselinesClient
- type VulnerabilityAssessmentBaselinesClientCreateOrUpdateOptions
- type VulnerabilityAssessmentBaselinesClientCreateOrUpdateResponse
- type VulnerabilityAssessmentExecuteScanClient
- type VulnerabilityAssessmentExecuteScanClientBeginExecuteOptions
- type VulnerabilityAssessmentExecuteScanClientExecuteResponse
- type VulnerabilityAssessmentListResult
- type VulnerabilityAssessmentName
- type VulnerabilityAssessmentPolicyBaselineName
- type VulnerabilityAssessmentPolicyProperties
- type VulnerabilityAssessmentRecurringScansProperties
- type VulnerabilityAssessmentRuleBaselineClient
- func (client *VulnerabilityAssessmentRuleBaselineClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (VulnerabilityAssessmentRuleBaselineClientCreateOrUpdateResponse, error)
- func (client *VulnerabilityAssessmentRuleBaselineClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (VulnerabilityAssessmentRuleBaselineClientGetResponse, error)
- func (client *VulnerabilityAssessmentRuleBaselineClient) NewListByBaselinePager(resourceGroupName string, serverName string, ...) ...
- type VulnerabilityAssessmentRuleBaselineClientCreateOrUpdateOptions
- type VulnerabilityAssessmentRuleBaselineClientCreateOrUpdateResponse
- type VulnerabilityAssessmentRuleBaselineClientGetOptions
- type VulnerabilityAssessmentRuleBaselineClientGetResponse
- type VulnerabilityAssessmentRuleBaselineClientListByBaselineOptions
- type VulnerabilityAssessmentRuleBaselineClientListByBaselineResponse
- type VulnerabilityAssessmentRuleBaselinesClient
- type VulnerabilityAssessmentRuleBaselinesClientDeleteOptions
- type VulnerabilityAssessmentRuleBaselinesClientDeleteResponse
- type VulnerabilityAssessmentScanError
- type VulnerabilityAssessmentScanForSQLError
- type VulnerabilityAssessmentScanListResult
- type VulnerabilityAssessmentScanRecord
- type VulnerabilityAssessmentScanRecordForSQL
- type VulnerabilityAssessmentScanRecordForSQLListResult
- type VulnerabilityAssessmentScanRecordForSQLProperties
- type VulnerabilityAssessmentScanRecordListResult
- type VulnerabilityAssessmentScanRecordProperties
- type VulnerabilityAssessmentScanResultClient
- func (client *VulnerabilityAssessmentScanResultClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (VulnerabilityAssessmentScanResultClientGetResponse, error)
- func (client *VulnerabilityAssessmentScanResultClient) NewListByScanPager(resourceGroupName string, serverName string, ...) *runtime.Pager[VulnerabilityAssessmentScanResultClientListByScanResponse]
- type VulnerabilityAssessmentScanResultClientGetOptions
- type VulnerabilityAssessmentScanResultClientGetResponse
- type VulnerabilityAssessmentScanResultClientListByScanOptions
- type VulnerabilityAssessmentScanResultClientListByScanResponse
- type VulnerabilityAssessmentScanResultProperties
- type VulnerabilityAssessmentScanResults
- type VulnerabilityAssessmentScanState
- type VulnerabilityAssessmentScanTriggerType
- type VulnerabilityAssessmentScansClient
- func (client *VulnerabilityAssessmentScansClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (VulnerabilityAssessmentScansClientGetResponse, error)
- func (client *VulnerabilityAssessmentScansClient) NewListBySQLVulnerabilityAssessmentsPager(resourceGroupName string, serverName string, ...) ...
- type VulnerabilityAssessmentScansClientGetOptions
- type VulnerabilityAssessmentScansClientGetResponse
- type VulnerabilityAssessmentScansClientListBySQLVulnerabilityAssessmentsOptions
- type VulnerabilityAssessmentScansClientListBySQLVulnerabilityAssessmentsResponse
- type VulnerabilityAssessmentsClient
- type VulnerabilityAssessmentsClientDeleteOptions
- type VulnerabilityAssessmentsClientDeleteResponse
- type VulnerabilityAssessmentsSettingsClient
- func (client *VulnerabilityAssessmentsSettingsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (VulnerabilityAssessmentsSettingsClientCreateOrUpdateResponse, error)
- func (client *VulnerabilityAssessmentsSettingsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (VulnerabilityAssessmentsSettingsClientGetResponse, error)
- func (client *VulnerabilityAssessmentsSettingsClient) NewListByServerPager(resourceGroupName string, serverName string, ...) *runtime.Pager[VulnerabilityAssessmentsSettingsClientListByServerResponse]
- type VulnerabilityAssessmentsSettingsClientCreateOrUpdateOptions
- type VulnerabilityAssessmentsSettingsClientCreateOrUpdateResponse
- type VulnerabilityAssessmentsSettingsClientGetOptions
- type VulnerabilityAssessmentsSettingsClientGetResponse
- type VulnerabilityAssessmentsSettingsClientListByServerOptions
- type VulnerabilityAssessmentsSettingsClientListByServerResponse
- 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
- DatabaseEncryptionProtectorsClient.BeginRevalidate
- DatabaseEncryptionProtectorsClient.BeginRevert
- DatabaseExtensionsClient.BeginCreateOrUpdate
- DatabaseExtensionsClient.Get
- DatabaseExtensionsClient.NewListByDatabasePager
- DatabaseOperationsClient.Cancel
- DatabaseOperationsClient.NewListByDatabasePager
- DatabaseRecommendedActionsClient.Get
- DatabaseRecommendedActionsClient.ListByDatabaseAdvisor
- DatabaseRecommendedActionsClient.Update
- DatabaseSQLVulnerabilityAssessmentBaselinesClient.CreateOrUpdate (AddADatabasesVulnerabilityAssessmentRuleBaselineFromTheLatestScanResult)
- DatabaseSQLVulnerabilityAssessmentBaselinesClient.CreateOrUpdate (AddADatabasesVulnerabilityAssessmentRuleBaselineList)
- DatabaseSQLVulnerabilityAssessmentBaselinesClient.Get
- DatabaseSQLVulnerabilityAssessmentBaselinesClient.NewListBySQLVulnerabilityAssessmentPager
- DatabaseSQLVulnerabilityAssessmentExecuteScanClient.BeginExecute
- DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate
- DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient.Delete
- DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient.Get
- DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient.NewListByBaselinePager
- DatabaseSQLVulnerabilityAssessmentScanResultClient.Get
- DatabaseSQLVulnerabilityAssessmentScanResultClient.NewListByScanPager
- DatabaseSQLVulnerabilityAssessmentScansClient.Get
- DatabaseSQLVulnerabilityAssessmentScansClient.NewListBySQLVulnerabilityAssessmentsPager
- DatabaseSQLVulnerabilityAssessmentsSettingsClient.Get
- DatabaseSQLVulnerabilityAssessmentsSettingsClient.NewListByDatabasePager
- 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 (CreatesADatabaseAsAStandbySecondary)
- DatabasesClient.BeginCreateOrUpdate (CreatesADatabaseAsAnOnLineSecondary)
- DatabasesClient.BeginCreateOrUpdate (CreatesADatabaseAsNamedReplicaSecondary)
- DatabasesClient.BeginCreateOrUpdate (CreatesADatabaseFromPointInTimeRestore)
- DatabasesClient.BeginCreateOrUpdate (CreatesADatabaseWithAvailabilityZoneSpecified)
- DatabasesClient.BeginCreateOrUpdate (CreatesADatabaseWithDatabaseLevelCustomerManagedKeys)
- DatabasesClient.BeginCreateOrUpdate (CreatesADatabaseWithDefaultEnclaveType)
- DatabasesClient.BeginCreateOrUpdate (CreatesADatabaseWithDefaultMode)
- DatabasesClient.BeginCreateOrUpdate (CreatesADatabaseWithLedgerOn)
- DatabasesClient.BeginCreateOrUpdate (CreatesADatabaseWithMinimumNumberOfParameters)
- DatabasesClient.BeginCreateOrUpdate (CreatesADatabaseWithPreferredMaintenanceWindow)
- DatabasesClient.BeginCreateOrUpdate (CreatesADatabaseWithSpecifiedBackupStorageRedundancy)
- DatabasesClient.BeginCreateOrUpdate (CreatesADatabaseWithVbsEnclaveType)
- DatabasesClient.BeginCreateOrUpdate (CreatesAVCoreDatabaseBySpecifyingServiceObjectiveName)
- DatabasesClient.BeginCreateOrUpdate (CreatesAVCoreDatabaseBySpecifyingSkuNameAndCapacity)
- DatabasesClient.BeginCreateOrUpdate (UpdatesADatabaseToHyperscaleSloWithManualCutover)
- DatabasesClient.BeginCreateOrUpdate (UpdatesADatabaseToHyperscaleTierByTriggeringManualCutoverDuringMigrationWorkflow)
- 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 (CreatesADatabaseWithVbsEnclaveType)
- DatabasesClient.BeginUpdate (PatchADatabaseWithDatabaseLevelCustomerManagedKeys)
- DatabasesClient.BeginUpdate (ResetsMaintenanceWindowOfADatabaseToDefault)
- DatabasesClient.BeginUpdate (UpdatesADatabase)
- DatabasesClient.BeginUpdate (UpdatesADatabaseWithDefaultEnclaveType)
- DatabasesClient.BeginUpgradeDataWarehouse
- DatabasesClient.Get (GetsADatabase)
- DatabasesClient.Get (GetsADatabaseConfiguredWithDefaultEnclaveType)
- DatabasesClient.Get (GetsADatabaseConfiguredWithVbsEnclaveType)
- DatabasesClient.Get (GetsADatabaseWithAvailabilityZoneSpecified)
- DatabasesClient.Get (GetsADatabaseWithDatabaseLevelKeysExpanded)
- DatabasesClient.NewListByElasticPoolPager
- DatabasesClient.NewListByServerPager (GetsAListOfDatabases)
- DatabasesClient.NewListByServerPager (GetsAListOfDatabasesConfiguredWithEnclaveType)
- 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 (CreateOrUpdateAnElasticPoolWithAvailabilityZone)
- ElasticPoolsClient.BeginCreateOrUpdate (CreateOrUpdateElasticPoolWithAllParameter)
- ElasticPoolsClient.BeginCreateOrUpdate (CreateOrUpdateElasticPoolWithMaintenanceConfigurationParameter)
- ElasticPoolsClient.BeginCreateOrUpdate (CreateOrUpdateElasticPoolWithMinimumParameters)
- ElasticPoolsClient.BeginCreateOrUpdate (CreateOrUpdateElasticPoolWithPreferredEnclaveTypeParameterAsDefault)
- ElasticPoolsClient.BeginCreateOrUpdate (CreateOrUpdateElasticPoolWithPreferredEnclaveTypeParameterAsVbs)
- ElasticPoolsClient.BeginCreateOrUpdate (CreateOrUpdateHyperscaleElasticPoolWithHighAvailabilityReplicaCountParameter)
- ElasticPoolsClient.BeginDelete
- ElasticPoolsClient.BeginFailover
- ElasticPoolsClient.BeginUpdate (AssignsMaintenanceConfigurationToAnElasticPool)
- ElasticPoolsClient.BeginUpdate (CreateOrUpdateElasticPoolWithPreferredEnclaveTypeParameterAsDefault)
- ElasticPoolsClient.BeginUpdate (CreateOrUpdateElasticPoolWithPreferredEnclaveTypeParameterAsVbs)
- ElasticPoolsClient.BeginUpdate (ResetsMaintenanceConfigurationOfAnElasticPoolToDefault)
- ElasticPoolsClient.BeginUpdate (UpdateAnElasticPoolWithAllParameter)
- ElasticPoolsClient.BeginUpdate (UpdateAnElasticPoolWithMinimumParameters)
- ElasticPoolsClient.BeginUpdate (UpdateHighAvailabilityReplicaCountOfAHyperscaleElasticPool)
- ElasticPoolsClient.Get (GetAHyperscaleElasticPool)
- ElasticPoolsClient.Get (GetAnElasticPool)
- ElasticPoolsClient.Get (GetAnElasticPoolWithAvailabilityZone)
- ElasticPoolsClient.Get (GetAnElasticPoolWithPreferredEnclaveTypeParameter)
- 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.BeginTryPlannedBeforeForcedFailover
- 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
- JobPrivateEndpointsClient.BeginCreateOrUpdate
- JobPrivateEndpointsClient.BeginDelete
- JobPrivateEndpointsClient.Get
- JobPrivateEndpointsClient.NewListByAgentPager
- 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.BeginChangeAccessTier
- LongTermRetentionBackupsClient.BeginChangeAccessTierByResourceGroup
- 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
- ManagedDatabaseAdvancedThreatProtectionSettingsClient.CreateOrUpdate (UpdateAManagedDatabasesAdvancedThreatProtectionSettingsWithAllParameters)
- ManagedDatabaseAdvancedThreatProtectionSettingsClient.CreateOrUpdate (UpdateAManagedDatabasesAdvancedThreatProtectionSettingsWithMinimalParameters)
- ManagedDatabaseAdvancedThreatProtectionSettingsClient.Get
- ManagedDatabaseAdvancedThreatProtectionSettingsClient.NewListByDatabasePager
- ManagedDatabaseColumnsClient.Get
- ManagedDatabaseColumnsClient.NewListByDatabasePager (FilterManagedDatabaseColumns)
- ManagedDatabaseColumnsClient.NewListByDatabasePager (ListManagedDatabaseColumns)
- ManagedDatabaseColumnsClient.NewListByTablePager
- ManagedDatabaseMoveOperationsClient.Get
- ManagedDatabaseMoveOperationsClient.NewListByLocationPager (GetsAllManagedDatabaseMoveOperationsForSpecifiedSubscriptionResourceGroupAndLocation)
- ManagedDatabaseMoveOperationsClient.NewListByLocationPager (GetsTheLatestManagedDatabaseMoveOperationsForEachDatabaseUnderSpecifiedSubscriptionResourceGroupAndLocation)
- ManagedDatabaseMoveOperationsClient.NewListByLocationPager (GetsTheLatestManagedDatabaseMoveOperationsForEachDatabaseUnderSpecifiedSubscriptionResourceGroupAndLocationFilteredByOperationType)
- 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.BeginCancelMove
- ManagedDatabasesClient.BeginCompleteMove
- ManagedDatabasesClient.BeginCompleteRestore
- ManagedDatabasesClient.BeginCreateOrUpdate (CreatesANewManagedDatabaseByRestoringFromAnExternalBackup)
- ManagedDatabasesClient.BeginCreateOrUpdate (CreatesANewManagedDatabaseByRestoringFromAnExternalBackupUsingManagedIdentity)
- ManagedDatabasesClient.BeginCreateOrUpdate (CreatesANewManagedDatabaseFromRestoringAGeoReplicatedBackup)
- ManagedDatabasesClient.BeginCreateOrUpdate (CreatesANewManagedDatabaseFromRestoringALongTermRetentionBackup)
- ManagedDatabasesClient.BeginCreateOrUpdate (CreatesANewManagedDatabaseUsingCrossSubscriptionPointInTimeRestore)
- ManagedDatabasesClient.BeginCreateOrUpdate (CreatesANewManagedDatabaseUsingPointInTimeRestore)
- ManagedDatabasesClient.BeginCreateOrUpdate (CreatesANewManagedDatabaseWithLedgerOn)
- ManagedDatabasesClient.BeginCreateOrUpdate (CreatesANewManagedDatabaseWithMaximalProperties)
- ManagedDatabasesClient.BeginCreateOrUpdate (CreatesANewManagedDatabaseWithMinimalProperties)
- ManagedDatabasesClient.BeginDelete
- ManagedDatabasesClient.BeginStartMove (StartsAManagedDatabaseMoveWithAllOptionalParametersSpecified)
- ManagedDatabasesClient.BeginStartMove (StartsAManagedDatabaseMoveWithNoOptionalParametersSpecified)
- ManagedDatabasesClient.BeginUpdate (UpdatesAManagedDatabaseWithMaximalProperties)
- ManagedDatabasesClient.BeginUpdate (UpdatesAManagedDatabaseWithMinimalProperties)
- ManagedDatabasesClient.Get
- ManagedDatabasesClient.NewListByInstancePager
- ManagedDatabasesClient.NewListInaccessibleByInstancePager
- ManagedInstanceAdministratorsClient.BeginCreateOrUpdate (CreateAdministratorOfManagedInstance)
- ManagedInstanceAdministratorsClient.BeginCreateOrUpdate (UpdateAdministratorOfManagedInstance)
- ManagedInstanceAdministratorsClient.BeginDelete
- ManagedInstanceAdministratorsClient.Get
- ManagedInstanceAdministratorsClient.NewListByInstancePager
- ManagedInstanceAdvancedThreatProtectionSettingsClient.BeginCreateOrUpdate (UpdateAManagedInstancesAdvancedThreatProtectionSettingsWithAllParameters)
- ManagedInstanceAdvancedThreatProtectionSettingsClient.BeginCreateOrUpdate (UpdateAManagedInstancesAdvancedThreatProtectionSettingsWithMinimalParameters)
- ManagedInstanceAdvancedThreatProtectionSettingsClient.Get
- ManagedInstanceAdvancedThreatProtectionSettingsClient.NewListByInstancePager
- ManagedInstanceAzureADOnlyAuthenticationsClient.BeginCreateOrUpdate
- ManagedInstanceAzureADOnlyAuthenticationsClient.BeginDelete
- ManagedInstanceAzureADOnlyAuthenticationsClient.Get
- ManagedInstanceAzureADOnlyAuthenticationsClient.NewListByInstancePager
- ManagedInstanceDtcsClient.BeginCreateOrUpdate (UpdatesManagedInstanceDtcSettingsByEnablingDtc)
- ManagedInstanceDtcsClient.BeginCreateOrUpdate (UpdatesManagedInstanceDtcSettingsWithAllOptionalParametersSpecified)
- ManagedInstanceDtcsClient.Get
- ManagedInstanceDtcsClient.NewListByManagedInstancePager
- 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.BeginStart
- ManagedInstancesClient.BeginStop
- 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.NewListOutboundNetworkDependenciesByManagedInstancePager
- ManagedInstancesClient.NewListPager (ListManagedInstances)
- ManagedInstancesClient.NewListPager (ListManagedInstancesWithExpandAdministratorsActivedirectory)
- ManagedLedgerDigestUploadsClient.BeginCreateOrUpdate
- ManagedLedgerDigestUploadsClient.BeginDisable
- ManagedLedgerDigestUploadsClient.Get
- ManagedLedgerDigestUploadsClient.NewListByDatabasePager
- ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate
- ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.Get
- ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.NewListByRestorableDroppedDatabasePager
- ManagedServerDNSAliasesClient.BeginAcquire
- ManagedServerDNSAliasesClient.BeginCreateOrUpdate
- ManagedServerDNSAliasesClient.BeginDelete
- ManagedServerDNSAliasesClient.Get
- ManagedServerDNSAliasesClient.NewListByManagedInstancePager
- 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 (GetARecoverableDatabase)
- RecoverableDatabasesClient.Get (GetsARecoverableDatabaseWithExpandEqualsKeys)
- RecoverableDatabasesClient.NewListByServerPager
- RecoverableManagedDatabasesClient.Get
- RecoverableManagedDatabasesClient.NewListByInstancePager
- ReplicationLinksClient.BeginDelete
- ReplicationLinksClient.BeginFailover
- ReplicationLinksClient.BeginFailoverAllowDataLoss
- ReplicationLinksClient.Get
- ReplicationLinksClient.NewListByDatabasePager
- ReplicationLinksClient.NewListByServerPager
- RestorableDroppedDatabasesClient.Get (GetsARestorableDroppedDatabase)
- RestorableDroppedDatabasesClient.Get (GetsARestorableDroppedDatabaseWithExpandEqualsKeys)
- 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
- ServerConfigurationOptionsClient.BeginCreateOrUpdate
- ServerConfigurationOptionsClient.Get
- ServerConfigurationOptionsClient.NewListByManagedInstancePager
- 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.BeginRefreshStatus
- ServersClient.BeginUpdate
- ServersClient.CheckNameAvailability (CheckForAServerNameThatAlreadyExists)
- ServersClient.CheckNameAvailability (CheckForAServerNameThatIsAvailable)
- ServersClient.CheckNameAvailability (CheckForAServerNameThatIsInvalid)
- ServersClient.Get (GetServer)
- ServersClient.Get (GetServerWithExpandAdministratorsActivedirectory)
- ServersClient.NewListByResourceGroupPager (ListServersByResourceGroup)
- ServersClient.NewListByResourceGroupPager (ListServersByResourceGroupWithExpandAdministratorsActivedirectory)
- ServersClient.NewListPager (ListServers)
- ServersClient.NewListPager (ListServersWithExpandAdministratorsActivedirectory)
- ServiceObjectivesClient.Get
- ServiceObjectivesClient.NewListByServerPager
- StartStopManagedInstanceSchedulesClient.CreateOrUpdate (CreatesOrUpdatesTheManagedInstancesStartStopScheduleWithAllOptionalParametersSpecified)
- StartStopManagedInstanceSchedulesClient.CreateOrUpdate (CreatesOrUpdatesTheManagedInstancesStartStopScheduleWithNoOptionalParametersSpecified)
- StartStopManagedInstanceSchedulesClient.Delete
- StartStopManagedInstanceSchedulesClient.Get
- StartStopManagedInstanceSchedulesClient.NewListByInstancePager
- SubscriptionUsagesClient.Get
- SubscriptionUsagesClient.NewListByLocationPager
- SynapseLinkWorkspacesClient.NewListByDatabasePager
- 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.BeginCreateOrUpdate
- TransparentDataEncryptionsClient.Get
- TransparentDataEncryptionsClient.NewListByDatabasePager
- UsagesClient.NewListByInstancePoolPager (ListInstancePoolUsages)
- UsagesClient.NewListByInstancePoolPager (ListInstancePoolUsagesExpandedWithChildren)
- VirtualClustersClient.BeginDelete
- VirtualClustersClient.BeginUpdate
- VirtualClustersClient.BeginUpdateDNSServers
- VirtualClustersClient.Get
- VirtualClustersClient.NewListByResourceGroupPager
- VirtualClustersClient.NewListPager
- VirtualNetworkRulesClient.BeginCreateOrUpdate
- VirtualNetworkRulesClient.BeginDelete
- VirtualNetworkRulesClient.Get
- VirtualNetworkRulesClient.NewListByServerPager
- VulnerabilityAssessmentBaselineClient.Get
- VulnerabilityAssessmentBaselineClient.NewListBySQLVulnerabilityAssessmentPager
- VulnerabilityAssessmentBaselinesClient.CreateOrUpdate (AddADatabasesVulnerabilityAssessmentRuleBaselineFromTheLatestScanResult)
- VulnerabilityAssessmentBaselinesClient.CreateOrUpdate (AddADatabasesVulnerabilityAssessmentRuleBaselineList)
- VulnerabilityAssessmentExecuteScanClient.BeginExecute
- VulnerabilityAssessmentRuleBaselineClient.CreateOrUpdate
- VulnerabilityAssessmentRuleBaselineClient.Get
- VulnerabilityAssessmentRuleBaselineClient.NewListByBaselinePager
- VulnerabilityAssessmentRuleBaselinesClient.Delete
- VulnerabilityAssessmentScanResultClient.Get
- VulnerabilityAssessmentScanResultClient.NewListByScanPager
- VulnerabilityAssessmentScansClient.Get
- VulnerabilityAssessmentScansClient.NewListBySQLVulnerabilityAssessmentsPager
- VulnerabilityAssessmentsClient.Delete
- VulnerabilityAssessmentsSettingsClient.CreateOrUpdate
- VulnerabilityAssessmentsSettingsClient.Get
- VulnerabilityAssessmentsSettingsClient.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 ¶
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 ¶
func (a AdministratorProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AdministratorProperties.
func (*AdministratorProperties) UnmarshalJSON ¶
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 ¶
type AdvancedThreatProtectionName string
const (
AdvancedThreatProtectionNameDefault AdvancedThreatProtectionName = "Default"
)
func PossibleAdvancedThreatProtectionNameValues ¶
func PossibleAdvancedThreatProtectionNameValues() []AdvancedThreatProtectionName
PossibleAdvancedThreatProtectionNameValues returns the possible values for the AdvancedThreatProtectionName const type.
type AdvancedThreatProtectionProperties ¶
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 ¶
func (a AdvancedThreatProtectionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AdvancedThreatProtectionProperties.
func (*AdvancedThreatProtectionProperties) UnmarshalJSON ¶
func (a *AdvancedThreatProtectionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AdvancedThreatProtectionProperties.
type AdvancedThreatProtectionState ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SqlAgentConfigurationPut.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SqlAgentConfigurationGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type AgentClientCreateOrUpdateOptions struct { }
AgentClientCreateOrUpdateOptions contains the optional parameters for the AgentClient.CreateOrUpdate method.
type AgentClientCreateOrUpdateResponse ¶
type AgentClientCreateOrUpdateResponse struct { // A recoverable managed database resource. AgentConfiguration }
AgentClientCreateOrUpdateResponse contains the response from method AgentClient.CreateOrUpdate.
type AgentClientGetOptions ¶
type AgentClientGetOptions struct { }
AgentClientGetOptions contains the optional parameters for the AgentClient.Get method.
type AgentClientGetResponse ¶
type AgentClientGetResponse struct { // A recoverable managed database resource. AgentConfiguration }
AgentClientGetResponse contains the response from method AgentClient.Get.
type AgentConfiguration ¶
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 ¶
func (a AgentConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AgentConfiguration.
func (*AgentConfiguration) UnmarshalJSON ¶
func (a *AgentConfiguration) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type AgentConfiguration.
type AgentConfigurationProperties ¶
type AgentConfigurationProperties struct { // The state of Sql Agent. State *SQLAgentConfigurationPropertiesState }
AgentConfigurationProperties - Sql agent configuration properties.
func (AgentConfigurationProperties) MarshalJSON ¶
func (a AgentConfigurationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AgentConfigurationProperties.
func (*AgentConfigurationProperties) UnmarshalJSON ¶
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 AlwaysEncryptedEnclaveType ¶
type AlwaysEncryptedEnclaveType string
AlwaysEncryptedEnclaveType - Type of enclave requested on the elastic pool.
const ( AlwaysEncryptedEnclaveTypeDefault AlwaysEncryptedEnclaveType = "Default" AlwaysEncryptedEnclaveTypeVBS AlwaysEncryptedEnclaveType = "VBS" )
func PossibleAlwaysEncryptedEnclaveTypeValues ¶
func PossibleAlwaysEncryptedEnclaveTypeValues() []AlwaysEncryptedEnclaveType
PossibleAlwaysEncryptedEnclaveTypeValues returns the possible values for the AlwaysEncryptedEnclaveType 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 ¶
func (a AutoPauseDelayTimeRange) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AutoPauseDelayTimeRange.
func (*AutoPauseDelayTimeRange) UnmarshalJSON ¶
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 ¶
func (a AutomaticTuningOptions) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AutomaticTuningOptions.
func (*AutomaticTuningOptions) UnmarshalJSON ¶
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 ¶
func (a AutomaticTuningServerOptions) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AutomaticTuningServerOptions.
func (*AutomaticTuningServerOptions) UnmarshalJSON ¶
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 ¶
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 AvailabilityZoneType ¶
type AvailabilityZoneType string
AvailabilityZoneType - Specifies the availability zone the pool's primary replica is pinned to.
const ( AvailabilityZoneTypeNoPreference AvailabilityZoneType = "NoPreference" AvailabilityZoneTypeOne AvailabilityZoneType = "1" AvailabilityZoneTypeThree AvailabilityZoneType = "3" AvailabilityZoneTypeTwo AvailabilityZoneType = "2" )
func PossibleAvailabilityZoneTypeValues ¶
func PossibleAvailabilityZoneTypeValues() []AvailabilityZoneType
PossibleAvailabilityZoneTypeValues returns the possible values for the AvailabilityZoneType 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 ¶
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 ¶
func (a AzureADOnlyAuthProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AzureADOnlyAuthProperties.
func (*AzureADOnlyAuthProperties) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpdateShortTermRetentionPolicy.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetShortTermRetentionPolicy.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListShortTermRetentionPoliciesByDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type BackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
BackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the BackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate method.
type BackupShortTermRetentionPoliciesClientBeginUpdateOptions ¶
type BackupShortTermRetentionPoliciesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
BackupShortTermRetentionPoliciesClientBeginUpdateOptions contains the optional parameters for the BackupShortTermRetentionPoliciesClient.BeginUpdate method.
type BackupShortTermRetentionPoliciesClientCreateOrUpdateResponse ¶
type BackupShortTermRetentionPoliciesClientCreateOrUpdateResponse struct { // A short term retention policy. BackupShortTermRetentionPolicy }
BackupShortTermRetentionPoliciesClientCreateOrUpdateResponse contains the response from method BackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate.
type BackupShortTermRetentionPoliciesClientGetOptions ¶
type BackupShortTermRetentionPoliciesClientGetOptions struct { }
BackupShortTermRetentionPoliciesClientGetOptions contains the optional parameters for the BackupShortTermRetentionPoliciesClient.Get method.
type BackupShortTermRetentionPoliciesClientGetResponse ¶
type BackupShortTermRetentionPoliciesClientGetResponse struct { // A short term retention policy. BackupShortTermRetentionPolicy }
BackupShortTermRetentionPoliciesClientGetResponse contains the response from method BackupShortTermRetentionPoliciesClient.Get.
type BackupShortTermRetentionPoliciesClientListByDatabaseOptions ¶
type BackupShortTermRetentionPoliciesClientListByDatabaseOptions struct { }
BackupShortTermRetentionPoliciesClientListByDatabaseOptions contains the optional parameters for the BackupShortTermRetentionPoliciesClient.NewListByDatabasePager method.
type BackupShortTermRetentionPoliciesClientListByDatabaseResponse ¶
type BackupShortTermRetentionPoliciesClientListByDatabaseResponse struct { // A list of short term retention policies. BackupShortTermRetentionPolicyListResult }
BackupShortTermRetentionPoliciesClientListByDatabaseResponse contains the response from method BackupShortTermRetentionPoliciesClient.NewListByDatabasePager.
type BackupShortTermRetentionPoliciesClientUpdateResponse ¶
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 ¶
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 ¶
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 ¶
func (b BackupShortTermRetentionPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BackupShortTermRetentionPolicyProperties.
func (*BackupShortTermRetentionPolicyProperties) UnmarshalJSON ¶
func (b *BackupShortTermRetentionPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BackupShortTermRetentionPolicyProperties.
type BackupStorageAccessTier ¶
type BackupStorageAccessTier string
BackupStorageAccessTier - The BackupStorageAccessTier for the LTR backup
const ( BackupStorageAccessTierArchive BackupStorageAccessTier = "Archive" BackupStorageAccessTierHot BackupStorageAccessTier = "Hot" )
func PossibleBackupStorageAccessTierValues ¶
func PossibleBackupStorageAccessTierValues() []BackupStorageAccessTier
PossibleBackupStorageAccessTierValues returns the possible values for the BackupStorageAccessTier const type.
type BackupStorageRedundancy ¶
type BackupStorageRedundancy string
BackupStorageRedundancy - The storage redundancy type of the backup
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 ¶
func (b BaseLongTermRetentionPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BaseLongTermRetentionPolicyProperties.
func (*BaseLongTermRetentionPolicyProperties) UnmarshalJSON ¶
func (b *BaseLongTermRetentionPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BaseLongTermRetentionPolicyProperties.
type Baseline ¶
type Baseline struct { // READ-ONLY; SQL Vulnerability Assessment baseline expected results ExpectedResults [][]*string // READ-ONLY; SQL Vulnerability Assessment baseline update time (UTC) UpdatedTime *time.Time }
Baseline - SQL Vulnerability Assessment baseline Details
func (Baseline) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Baseline.
func (*Baseline) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Baseline.
type BaselineAdjustedResult ¶
type BaselineAdjustedResult struct { // READ-ONLY; SQL Vulnerability Assessment baseline details Baseline *Baseline // READ-ONLY; SQL Vulnerability Assessment results that are not in baseline ResultsNotInBaseline [][]*string // READ-ONLY; SQL Vulnerability Assessment results that are in baseline. ResultsOnlyInBaseline [][]*string // READ-ONLY; SQL Vulnerability Assessment baseline status Status *RuleStatus }
BaselineAdjustedResult - SQL Vulnerability Assessment baseline adjusted results
func (BaselineAdjustedResult) MarshalJSON ¶
func (b BaselineAdjustedResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BaselineAdjustedResult.
func (*BaselineAdjustedResult) UnmarshalJSON ¶
func (b *BaselineAdjustedResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BaselineAdjustedResult.
type BaselineName ¶
type BaselineName string
const (
BaselineNameDefault BaselineName = "default"
)
func PossibleBaselineNameValues ¶
func PossibleBaselineNameValues() []BaselineName
PossibleBaselineNameValues returns the possible values for the BaselineName const type.
type BenchmarkReference ¶
type BenchmarkReference struct { // READ-ONLY; SQL Vulnerability Assessment benchmark name Benchmark *string // READ-ONLY; SQL Vulnerability Assessment benchmark reference. Reference *string }
BenchmarkReference - SQL Vulnerability Assessment benchmark reference
func (BenchmarkReference) MarshalJSON ¶
func (b BenchmarkReference) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BenchmarkReference.
func (*BenchmarkReference) UnmarshalJSON ¶
func (b *BenchmarkReference) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BenchmarkReference.
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/LocationCapabilityListByLocation.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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 ¶
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 ChangeLongTermRetentionBackupAccessTierParameters ¶
type ChangeLongTermRetentionBackupAccessTierParameters struct { // REQUIRED; The long term retention backup storage access tier BackupStorageAccessTier *string // REQUIRED; The operation mode when updating ltr backup storage access tier OperationMode *string }
ChangeLongTermRetentionBackupAccessTierParameters - Contains the information necessary to change long term retention backup access tier and related operation mode.
func (ChangeLongTermRetentionBackupAccessTierParameters) MarshalJSON ¶
func (c ChangeLongTermRetentionBackupAccessTierParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ChangeLongTermRetentionBackupAccessTierParameters.
func (*ChangeLongTermRetentionBackupAccessTierParameters) UnmarshalJSON ¶
func (c *ChangeLongTermRetentionBackupAccessTierParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ChangeLongTermRetentionBackupAccessTierParameters.
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 ¶
func (c CheckNameAvailabilityRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityRequest.
func (*CheckNameAvailabilityRequest) UnmarshalJSON ¶
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 ¶
func (c CheckNameAvailabilityResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CheckNameAvailabilityResponse.
func (*CheckNameAvailabilityResponse) UnmarshalJSON ¶
func (c *CheckNameAvailabilityResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CheckNameAvailabilityResponse.
type ClientFactory ¶
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 ¶
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 ¶
func (c *ClientFactory) NewAgentClient() *AgentClient
NewAgentClient creates a new instance of AgentClient.
func (*ClientFactory) NewBackupShortTermRetentionPoliciesClient ¶
func (c *ClientFactory) NewBackupShortTermRetentionPoliciesClient() *BackupShortTermRetentionPoliciesClient
NewBackupShortTermRetentionPoliciesClient creates a new instance of BackupShortTermRetentionPoliciesClient.
func (*ClientFactory) NewCapabilitiesClient ¶
func (c *ClientFactory) NewCapabilitiesClient() *CapabilitiesClient
NewCapabilitiesClient creates a new instance of CapabilitiesClient.
func (*ClientFactory) NewDataMaskingPoliciesClient ¶
func (c *ClientFactory) NewDataMaskingPoliciesClient() *DataMaskingPoliciesClient
NewDataMaskingPoliciesClient creates a new instance of DataMaskingPoliciesClient.
func (*ClientFactory) NewDataMaskingRulesClient ¶
func (c *ClientFactory) NewDataMaskingRulesClient() *DataMaskingRulesClient
NewDataMaskingRulesClient creates a new instance of DataMaskingRulesClient.
func (*ClientFactory) NewDataWarehouseUserActivitiesClient ¶
func (c *ClientFactory) NewDataWarehouseUserActivitiesClient() *DataWarehouseUserActivitiesClient
NewDataWarehouseUserActivitiesClient creates a new instance of DataWarehouseUserActivitiesClient.
func (*ClientFactory) NewDatabaseAdvancedThreatProtectionSettingsClient ¶
func (c *ClientFactory) NewDatabaseAdvancedThreatProtectionSettingsClient() *DatabaseAdvancedThreatProtectionSettingsClient
NewDatabaseAdvancedThreatProtectionSettingsClient creates a new instance of DatabaseAdvancedThreatProtectionSettingsClient.
func (*ClientFactory) NewDatabaseAdvisorsClient ¶
func (c *ClientFactory) NewDatabaseAdvisorsClient() *DatabaseAdvisorsClient
NewDatabaseAdvisorsClient creates a new instance of DatabaseAdvisorsClient.
func (*ClientFactory) NewDatabaseAutomaticTuningClient ¶
func (c *ClientFactory) NewDatabaseAutomaticTuningClient() *DatabaseAutomaticTuningClient
NewDatabaseAutomaticTuningClient creates a new instance of DatabaseAutomaticTuningClient.
func (*ClientFactory) NewDatabaseBlobAuditingPoliciesClient ¶
func (c *ClientFactory) NewDatabaseBlobAuditingPoliciesClient() *DatabaseBlobAuditingPoliciesClient
NewDatabaseBlobAuditingPoliciesClient creates a new instance of DatabaseBlobAuditingPoliciesClient.
func (*ClientFactory) NewDatabaseColumnsClient ¶
func (c *ClientFactory) NewDatabaseColumnsClient() *DatabaseColumnsClient
NewDatabaseColumnsClient creates a new instance of DatabaseColumnsClient.
func (*ClientFactory) NewDatabaseEncryptionProtectorsClient ¶
func (c *ClientFactory) NewDatabaseEncryptionProtectorsClient() *DatabaseEncryptionProtectorsClient
NewDatabaseEncryptionProtectorsClient creates a new instance of DatabaseEncryptionProtectorsClient.
func (*ClientFactory) NewDatabaseExtensionsClient ¶
func (c *ClientFactory) NewDatabaseExtensionsClient() *DatabaseExtensionsClient
NewDatabaseExtensionsClient creates a new instance of DatabaseExtensionsClient.
func (*ClientFactory) NewDatabaseOperationsClient ¶
func (c *ClientFactory) NewDatabaseOperationsClient() *DatabaseOperationsClient
NewDatabaseOperationsClient creates a new instance of DatabaseOperationsClient.
func (*ClientFactory) NewDatabaseRecommendedActionsClient ¶
func (c *ClientFactory) NewDatabaseRecommendedActionsClient() *DatabaseRecommendedActionsClient
NewDatabaseRecommendedActionsClient creates a new instance of DatabaseRecommendedActionsClient.
func (*ClientFactory) NewDatabaseSQLVulnerabilityAssessmentBaselinesClient ¶
func (c *ClientFactory) NewDatabaseSQLVulnerabilityAssessmentBaselinesClient() *DatabaseSQLVulnerabilityAssessmentBaselinesClient
NewDatabaseSQLVulnerabilityAssessmentBaselinesClient creates a new instance of DatabaseSQLVulnerabilityAssessmentBaselinesClient.
func (*ClientFactory) NewDatabaseSQLVulnerabilityAssessmentExecuteScanClient ¶
func (c *ClientFactory) NewDatabaseSQLVulnerabilityAssessmentExecuteScanClient() *DatabaseSQLVulnerabilityAssessmentExecuteScanClient
NewDatabaseSQLVulnerabilityAssessmentExecuteScanClient creates a new instance of DatabaseSQLVulnerabilityAssessmentExecuteScanClient.
func (*ClientFactory) NewDatabaseSQLVulnerabilityAssessmentRuleBaselinesClient ¶
func (c *ClientFactory) NewDatabaseSQLVulnerabilityAssessmentRuleBaselinesClient() *DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient
NewDatabaseSQLVulnerabilityAssessmentRuleBaselinesClient creates a new instance of DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient.
func (*ClientFactory) NewDatabaseSQLVulnerabilityAssessmentScanResultClient ¶
func (c *ClientFactory) NewDatabaseSQLVulnerabilityAssessmentScanResultClient() *DatabaseSQLVulnerabilityAssessmentScanResultClient
NewDatabaseSQLVulnerabilityAssessmentScanResultClient creates a new instance of DatabaseSQLVulnerabilityAssessmentScanResultClient.
func (*ClientFactory) NewDatabaseSQLVulnerabilityAssessmentScansClient ¶
func (c *ClientFactory) NewDatabaseSQLVulnerabilityAssessmentScansClient() *DatabaseSQLVulnerabilityAssessmentScansClient
NewDatabaseSQLVulnerabilityAssessmentScansClient creates a new instance of DatabaseSQLVulnerabilityAssessmentScansClient.
func (*ClientFactory) NewDatabaseSQLVulnerabilityAssessmentsSettingsClient ¶
func (c *ClientFactory) NewDatabaseSQLVulnerabilityAssessmentsSettingsClient() *DatabaseSQLVulnerabilityAssessmentsSettingsClient
NewDatabaseSQLVulnerabilityAssessmentsSettingsClient creates a new instance of DatabaseSQLVulnerabilityAssessmentsSettingsClient.
func (*ClientFactory) NewDatabaseSchemasClient ¶
func (c *ClientFactory) NewDatabaseSchemasClient() *DatabaseSchemasClient
NewDatabaseSchemasClient creates a new instance of DatabaseSchemasClient.
func (*ClientFactory) NewDatabaseSecurityAlertPoliciesClient ¶
func (c *ClientFactory) NewDatabaseSecurityAlertPoliciesClient() *DatabaseSecurityAlertPoliciesClient
NewDatabaseSecurityAlertPoliciesClient creates a new instance of DatabaseSecurityAlertPoliciesClient.
func (*ClientFactory) NewDatabaseTablesClient ¶
func (c *ClientFactory) NewDatabaseTablesClient() *DatabaseTablesClient
NewDatabaseTablesClient creates a new instance of DatabaseTablesClient.
func (*ClientFactory) NewDatabaseUsagesClient ¶
func (c *ClientFactory) NewDatabaseUsagesClient() *DatabaseUsagesClient
NewDatabaseUsagesClient creates a new instance of DatabaseUsagesClient.
func (*ClientFactory) NewDatabaseVulnerabilityAssessmentRuleBaselinesClient ¶
func (c *ClientFactory) NewDatabaseVulnerabilityAssessmentRuleBaselinesClient() *DatabaseVulnerabilityAssessmentRuleBaselinesClient
NewDatabaseVulnerabilityAssessmentRuleBaselinesClient creates a new instance of DatabaseVulnerabilityAssessmentRuleBaselinesClient.
func (*ClientFactory) NewDatabaseVulnerabilityAssessmentScansClient ¶
func (c *ClientFactory) NewDatabaseVulnerabilityAssessmentScansClient() *DatabaseVulnerabilityAssessmentScansClient
NewDatabaseVulnerabilityAssessmentScansClient creates a new instance of DatabaseVulnerabilityAssessmentScansClient.
func (*ClientFactory) NewDatabaseVulnerabilityAssessmentsClient ¶
func (c *ClientFactory) NewDatabaseVulnerabilityAssessmentsClient() *DatabaseVulnerabilityAssessmentsClient
NewDatabaseVulnerabilityAssessmentsClient creates a new instance of DatabaseVulnerabilityAssessmentsClient.
func (*ClientFactory) NewDatabasesClient ¶
func (c *ClientFactory) NewDatabasesClient() *DatabasesClient
NewDatabasesClient creates a new instance of DatabasesClient.
func (*ClientFactory) NewDeletedServersClient ¶
func (c *ClientFactory) NewDeletedServersClient() *DeletedServersClient
NewDeletedServersClient creates a new instance of DeletedServersClient.
func (*ClientFactory) NewDistributedAvailabilityGroupsClient ¶
func (c *ClientFactory) NewDistributedAvailabilityGroupsClient() *DistributedAvailabilityGroupsClient
NewDistributedAvailabilityGroupsClient creates a new instance of DistributedAvailabilityGroupsClient.
func (*ClientFactory) NewElasticPoolActivitiesClient ¶
func (c *ClientFactory) NewElasticPoolActivitiesClient() *ElasticPoolActivitiesClient
NewElasticPoolActivitiesClient creates a new instance of ElasticPoolActivitiesClient.
func (*ClientFactory) NewElasticPoolDatabaseActivitiesClient ¶
func (c *ClientFactory) NewElasticPoolDatabaseActivitiesClient() *ElasticPoolDatabaseActivitiesClient
NewElasticPoolDatabaseActivitiesClient creates a new instance of ElasticPoolDatabaseActivitiesClient.
func (*ClientFactory) NewElasticPoolOperationsClient ¶
func (c *ClientFactory) NewElasticPoolOperationsClient() *ElasticPoolOperationsClient
NewElasticPoolOperationsClient creates a new instance of ElasticPoolOperationsClient.
func (*ClientFactory) NewElasticPoolsClient ¶
func (c *ClientFactory) NewElasticPoolsClient() *ElasticPoolsClient
NewElasticPoolsClient creates a new instance of ElasticPoolsClient.
func (*ClientFactory) NewEncryptionProtectorsClient ¶
func (c *ClientFactory) NewEncryptionProtectorsClient() *EncryptionProtectorsClient
NewEncryptionProtectorsClient creates a new instance of EncryptionProtectorsClient.
func (*ClientFactory) NewEndpointCertificatesClient ¶
func (c *ClientFactory) NewEndpointCertificatesClient() *EndpointCertificatesClient
NewEndpointCertificatesClient creates a new instance of EndpointCertificatesClient.
func (*ClientFactory) NewExtendedDatabaseBlobAuditingPoliciesClient ¶
func (c *ClientFactory) NewExtendedDatabaseBlobAuditingPoliciesClient() *ExtendedDatabaseBlobAuditingPoliciesClient
NewExtendedDatabaseBlobAuditingPoliciesClient creates a new instance of ExtendedDatabaseBlobAuditingPoliciesClient.
func (*ClientFactory) NewExtendedServerBlobAuditingPoliciesClient ¶
func (c *ClientFactory) NewExtendedServerBlobAuditingPoliciesClient() *ExtendedServerBlobAuditingPoliciesClient
NewExtendedServerBlobAuditingPoliciesClient creates a new instance of ExtendedServerBlobAuditingPoliciesClient.
func (*ClientFactory) NewFailoverGroupsClient ¶
func (c *ClientFactory) NewFailoverGroupsClient() *FailoverGroupsClient
NewFailoverGroupsClient creates a new instance of FailoverGroupsClient.
func (*ClientFactory) NewFirewallRulesClient ¶
func (c *ClientFactory) NewFirewallRulesClient() *FirewallRulesClient
NewFirewallRulesClient creates a new instance of FirewallRulesClient.
func (*ClientFactory) NewGeoBackupPoliciesClient ¶
func (c *ClientFactory) NewGeoBackupPoliciesClient() *GeoBackupPoliciesClient
NewGeoBackupPoliciesClient creates a new instance of GeoBackupPoliciesClient.
func (*ClientFactory) NewIPv6FirewallRulesClient ¶
func (c *ClientFactory) NewIPv6FirewallRulesClient() *IPv6FirewallRulesClient
NewIPv6FirewallRulesClient creates a new instance of IPv6FirewallRulesClient.
func (*ClientFactory) NewInstanceFailoverGroupsClient ¶
func (c *ClientFactory) NewInstanceFailoverGroupsClient() *InstanceFailoverGroupsClient
NewInstanceFailoverGroupsClient creates a new instance of InstanceFailoverGroupsClient.
func (*ClientFactory) NewInstancePoolsClient ¶
func (c *ClientFactory) NewInstancePoolsClient() *InstancePoolsClient
NewInstancePoolsClient creates a new instance of InstancePoolsClient.
func (*ClientFactory) NewJobAgentsClient ¶
func (c *ClientFactory) NewJobAgentsClient() *JobAgentsClient
NewJobAgentsClient creates a new instance of JobAgentsClient.
func (*ClientFactory) NewJobCredentialsClient ¶
func (c *ClientFactory) NewJobCredentialsClient() *JobCredentialsClient
NewJobCredentialsClient creates a new instance of JobCredentialsClient.
func (*ClientFactory) NewJobExecutionsClient ¶
func (c *ClientFactory) NewJobExecutionsClient() *JobExecutionsClient
NewJobExecutionsClient creates a new instance of JobExecutionsClient.
func (*ClientFactory) NewJobPrivateEndpointsClient ¶
func (c *ClientFactory) NewJobPrivateEndpointsClient() *JobPrivateEndpointsClient
NewJobPrivateEndpointsClient creates a new instance of JobPrivateEndpointsClient.
func (*ClientFactory) NewJobStepExecutionsClient ¶
func (c *ClientFactory) NewJobStepExecutionsClient() *JobStepExecutionsClient
NewJobStepExecutionsClient creates a new instance of JobStepExecutionsClient.
func (*ClientFactory) NewJobStepsClient ¶
func (c *ClientFactory) NewJobStepsClient() *JobStepsClient
NewJobStepsClient creates a new instance of JobStepsClient.
func (*ClientFactory) NewJobTargetExecutionsClient ¶
func (c *ClientFactory) NewJobTargetExecutionsClient() *JobTargetExecutionsClient
NewJobTargetExecutionsClient creates a new instance of JobTargetExecutionsClient.
func (*ClientFactory) NewJobTargetGroupsClient ¶
func (c *ClientFactory) NewJobTargetGroupsClient() *JobTargetGroupsClient
NewJobTargetGroupsClient creates a new instance of JobTargetGroupsClient.
func (*ClientFactory) NewJobVersionsClient ¶
func (c *ClientFactory) NewJobVersionsClient() *JobVersionsClient
NewJobVersionsClient creates a new instance of JobVersionsClient.
func (*ClientFactory) NewJobsClient ¶
func (c *ClientFactory) NewJobsClient() *JobsClient
NewJobsClient creates a new instance of JobsClient.
func (*ClientFactory) NewLedgerDigestUploadsClient ¶
func (c *ClientFactory) NewLedgerDigestUploadsClient() *LedgerDigestUploadsClient
NewLedgerDigestUploadsClient creates a new instance of LedgerDigestUploadsClient.
func (*ClientFactory) NewLongTermRetentionBackupsClient ¶
func (c *ClientFactory) NewLongTermRetentionBackupsClient() *LongTermRetentionBackupsClient
NewLongTermRetentionBackupsClient creates a new instance of LongTermRetentionBackupsClient.
func (*ClientFactory) NewLongTermRetentionManagedInstanceBackupsClient ¶
func (c *ClientFactory) NewLongTermRetentionManagedInstanceBackupsClient() *LongTermRetentionManagedInstanceBackupsClient
NewLongTermRetentionManagedInstanceBackupsClient creates a new instance of LongTermRetentionManagedInstanceBackupsClient.
func (*ClientFactory) NewLongTermRetentionPoliciesClient ¶
func (c *ClientFactory) NewLongTermRetentionPoliciesClient() *LongTermRetentionPoliciesClient
NewLongTermRetentionPoliciesClient creates a new instance of LongTermRetentionPoliciesClient.
func (*ClientFactory) NewMaintenanceWindowOptionsClient ¶
func (c *ClientFactory) NewMaintenanceWindowOptionsClient() *MaintenanceWindowOptionsClient
NewMaintenanceWindowOptionsClient creates a new instance of MaintenanceWindowOptionsClient.
func (*ClientFactory) NewMaintenanceWindowsClient ¶
func (c *ClientFactory) NewMaintenanceWindowsClient() *MaintenanceWindowsClient
NewMaintenanceWindowsClient creates a new instance of MaintenanceWindowsClient.
func (*ClientFactory) NewManagedBackupShortTermRetentionPoliciesClient ¶
func (c *ClientFactory) NewManagedBackupShortTermRetentionPoliciesClient() *ManagedBackupShortTermRetentionPoliciesClient
NewManagedBackupShortTermRetentionPoliciesClient creates a new instance of ManagedBackupShortTermRetentionPoliciesClient.
func (*ClientFactory) NewManagedDatabaseAdvancedThreatProtectionSettingsClient ¶
func (c *ClientFactory) NewManagedDatabaseAdvancedThreatProtectionSettingsClient() *ManagedDatabaseAdvancedThreatProtectionSettingsClient
NewManagedDatabaseAdvancedThreatProtectionSettingsClient creates a new instance of ManagedDatabaseAdvancedThreatProtectionSettingsClient.
func (*ClientFactory) NewManagedDatabaseColumnsClient ¶
func (c *ClientFactory) NewManagedDatabaseColumnsClient() *ManagedDatabaseColumnsClient
NewManagedDatabaseColumnsClient creates a new instance of ManagedDatabaseColumnsClient.
func (*ClientFactory) NewManagedDatabaseMoveOperationsClient ¶
func (c *ClientFactory) NewManagedDatabaseMoveOperationsClient() *ManagedDatabaseMoveOperationsClient
NewManagedDatabaseMoveOperationsClient creates a new instance of ManagedDatabaseMoveOperationsClient.
func (*ClientFactory) NewManagedDatabaseQueriesClient ¶
func (c *ClientFactory) NewManagedDatabaseQueriesClient() *ManagedDatabaseQueriesClient
NewManagedDatabaseQueriesClient creates a new instance of ManagedDatabaseQueriesClient.
func (*ClientFactory) NewManagedDatabaseRecommendedSensitivityLabelsClient ¶
func (c *ClientFactory) NewManagedDatabaseRecommendedSensitivityLabelsClient() *ManagedDatabaseRecommendedSensitivityLabelsClient
NewManagedDatabaseRecommendedSensitivityLabelsClient creates a new instance of ManagedDatabaseRecommendedSensitivityLabelsClient.
func (*ClientFactory) NewManagedDatabaseRestoreDetailsClient ¶
func (c *ClientFactory) NewManagedDatabaseRestoreDetailsClient() *ManagedDatabaseRestoreDetailsClient
NewManagedDatabaseRestoreDetailsClient creates a new instance of ManagedDatabaseRestoreDetailsClient.
func (*ClientFactory) NewManagedDatabaseSchemasClient ¶
func (c *ClientFactory) NewManagedDatabaseSchemasClient() *ManagedDatabaseSchemasClient
NewManagedDatabaseSchemasClient creates a new instance of ManagedDatabaseSchemasClient.
func (*ClientFactory) NewManagedDatabaseSecurityAlertPoliciesClient ¶
func (c *ClientFactory) NewManagedDatabaseSecurityAlertPoliciesClient() *ManagedDatabaseSecurityAlertPoliciesClient
NewManagedDatabaseSecurityAlertPoliciesClient creates a new instance of ManagedDatabaseSecurityAlertPoliciesClient.
func (*ClientFactory) NewManagedDatabaseSecurityEventsClient ¶
func (c *ClientFactory) NewManagedDatabaseSecurityEventsClient() *ManagedDatabaseSecurityEventsClient
NewManagedDatabaseSecurityEventsClient creates a new instance of ManagedDatabaseSecurityEventsClient.
func (*ClientFactory) NewManagedDatabaseSensitivityLabelsClient ¶
func (c *ClientFactory) NewManagedDatabaseSensitivityLabelsClient() *ManagedDatabaseSensitivityLabelsClient
NewManagedDatabaseSensitivityLabelsClient creates a new instance of ManagedDatabaseSensitivityLabelsClient.
func (*ClientFactory) NewManagedDatabaseTablesClient ¶
func (c *ClientFactory) NewManagedDatabaseTablesClient() *ManagedDatabaseTablesClient
NewManagedDatabaseTablesClient creates a new instance of ManagedDatabaseTablesClient.
func (*ClientFactory) NewManagedDatabaseTransparentDataEncryptionClient ¶
func (c *ClientFactory) NewManagedDatabaseTransparentDataEncryptionClient() *ManagedDatabaseTransparentDataEncryptionClient
NewManagedDatabaseTransparentDataEncryptionClient creates a new instance of ManagedDatabaseTransparentDataEncryptionClient.
func (*ClientFactory) NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient ¶
func (c *ClientFactory) NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient() *ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient
NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient creates a new instance of ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.
func (*ClientFactory) NewManagedDatabaseVulnerabilityAssessmentScansClient ¶
func (c *ClientFactory) NewManagedDatabaseVulnerabilityAssessmentScansClient() *ManagedDatabaseVulnerabilityAssessmentScansClient
NewManagedDatabaseVulnerabilityAssessmentScansClient creates a new instance of ManagedDatabaseVulnerabilityAssessmentScansClient.
func (*ClientFactory) NewManagedDatabaseVulnerabilityAssessmentsClient ¶
func (c *ClientFactory) NewManagedDatabaseVulnerabilityAssessmentsClient() *ManagedDatabaseVulnerabilityAssessmentsClient
NewManagedDatabaseVulnerabilityAssessmentsClient creates a new instance of ManagedDatabaseVulnerabilityAssessmentsClient.
func (*ClientFactory) NewManagedDatabasesClient ¶
func (c *ClientFactory) NewManagedDatabasesClient() *ManagedDatabasesClient
NewManagedDatabasesClient creates a new instance of ManagedDatabasesClient.
func (*ClientFactory) NewManagedInstanceAdministratorsClient ¶
func (c *ClientFactory) NewManagedInstanceAdministratorsClient() *ManagedInstanceAdministratorsClient
NewManagedInstanceAdministratorsClient creates a new instance of ManagedInstanceAdministratorsClient.
func (*ClientFactory) NewManagedInstanceAdvancedThreatProtectionSettingsClient ¶
func (c *ClientFactory) NewManagedInstanceAdvancedThreatProtectionSettingsClient() *ManagedInstanceAdvancedThreatProtectionSettingsClient
NewManagedInstanceAdvancedThreatProtectionSettingsClient creates a new instance of ManagedInstanceAdvancedThreatProtectionSettingsClient.
func (*ClientFactory) NewManagedInstanceAzureADOnlyAuthenticationsClient ¶
func (c *ClientFactory) NewManagedInstanceAzureADOnlyAuthenticationsClient() *ManagedInstanceAzureADOnlyAuthenticationsClient
NewManagedInstanceAzureADOnlyAuthenticationsClient creates a new instance of ManagedInstanceAzureADOnlyAuthenticationsClient.
func (*ClientFactory) NewManagedInstanceDtcsClient ¶
func (c *ClientFactory) NewManagedInstanceDtcsClient() *ManagedInstanceDtcsClient
NewManagedInstanceDtcsClient creates a new instance of ManagedInstanceDtcsClient.
func (*ClientFactory) NewManagedInstanceEncryptionProtectorsClient ¶
func (c *ClientFactory) NewManagedInstanceEncryptionProtectorsClient() *ManagedInstanceEncryptionProtectorsClient
NewManagedInstanceEncryptionProtectorsClient creates a new instance of ManagedInstanceEncryptionProtectorsClient.
func (*ClientFactory) NewManagedInstanceKeysClient ¶
func (c *ClientFactory) NewManagedInstanceKeysClient() *ManagedInstanceKeysClient
NewManagedInstanceKeysClient creates a new instance of ManagedInstanceKeysClient.
func (*ClientFactory) NewManagedInstanceLongTermRetentionPoliciesClient ¶
func (c *ClientFactory) NewManagedInstanceLongTermRetentionPoliciesClient() *ManagedInstanceLongTermRetentionPoliciesClient
NewManagedInstanceLongTermRetentionPoliciesClient creates a new instance of ManagedInstanceLongTermRetentionPoliciesClient.
func (*ClientFactory) NewManagedInstanceOperationsClient ¶
func (c *ClientFactory) NewManagedInstanceOperationsClient() *ManagedInstanceOperationsClient
NewManagedInstanceOperationsClient creates a new instance of ManagedInstanceOperationsClient.
func (*ClientFactory) NewManagedInstancePrivateEndpointConnectionsClient ¶
func (c *ClientFactory) NewManagedInstancePrivateEndpointConnectionsClient() *ManagedInstancePrivateEndpointConnectionsClient
NewManagedInstancePrivateEndpointConnectionsClient creates a new instance of ManagedInstancePrivateEndpointConnectionsClient.
func (*ClientFactory) NewManagedInstancePrivateLinkResourcesClient ¶
func (c *ClientFactory) NewManagedInstancePrivateLinkResourcesClient() *ManagedInstancePrivateLinkResourcesClient
NewManagedInstancePrivateLinkResourcesClient creates a new instance of ManagedInstancePrivateLinkResourcesClient.
func (*ClientFactory) NewManagedInstanceTdeCertificatesClient ¶
func (c *ClientFactory) NewManagedInstanceTdeCertificatesClient() *ManagedInstanceTdeCertificatesClient
NewManagedInstanceTdeCertificatesClient creates a new instance of ManagedInstanceTdeCertificatesClient.
func (*ClientFactory) NewManagedInstanceVulnerabilityAssessmentsClient ¶
func (c *ClientFactory) NewManagedInstanceVulnerabilityAssessmentsClient() *ManagedInstanceVulnerabilityAssessmentsClient
NewManagedInstanceVulnerabilityAssessmentsClient creates a new instance of ManagedInstanceVulnerabilityAssessmentsClient.
func (*ClientFactory) NewManagedInstancesClient ¶
func (c *ClientFactory) NewManagedInstancesClient() *ManagedInstancesClient
NewManagedInstancesClient creates a new instance of ManagedInstancesClient.
func (*ClientFactory) NewManagedLedgerDigestUploadsClient ¶
func (c *ClientFactory) NewManagedLedgerDigestUploadsClient() *ManagedLedgerDigestUploadsClient
NewManagedLedgerDigestUploadsClient creates a new instance of ManagedLedgerDigestUploadsClient.
func (*ClientFactory) NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient ¶
func (c *ClientFactory) NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient() *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient
NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient creates a new instance of ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.
func (*ClientFactory) NewManagedServerDNSAliasesClient ¶
func (c *ClientFactory) NewManagedServerDNSAliasesClient() *ManagedServerDNSAliasesClient
NewManagedServerDNSAliasesClient creates a new instance of ManagedServerDNSAliasesClient.
func (*ClientFactory) NewManagedServerSecurityAlertPoliciesClient ¶
func (c *ClientFactory) NewManagedServerSecurityAlertPoliciesClient() *ManagedServerSecurityAlertPoliciesClient
NewManagedServerSecurityAlertPoliciesClient creates a new instance of ManagedServerSecurityAlertPoliciesClient.
func (*ClientFactory) NewOperationsClient ¶
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewOutboundFirewallRulesClient ¶
func (c *ClientFactory) NewOutboundFirewallRulesClient() *OutboundFirewallRulesClient
NewOutboundFirewallRulesClient creates a new instance of OutboundFirewallRulesClient.
func (*ClientFactory) NewPrivateEndpointConnectionsClient ¶
func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient
NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient.
func (*ClientFactory) NewPrivateLinkResourcesClient ¶
func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient
NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient.
func (*ClientFactory) NewRecommendedSensitivityLabelsClient ¶
func (c *ClientFactory) NewRecommendedSensitivityLabelsClient() *RecommendedSensitivityLabelsClient
NewRecommendedSensitivityLabelsClient creates a new instance of RecommendedSensitivityLabelsClient.
func (*ClientFactory) NewRecoverableDatabasesClient ¶
func (c *ClientFactory) NewRecoverableDatabasesClient() *RecoverableDatabasesClient
NewRecoverableDatabasesClient creates a new instance of RecoverableDatabasesClient.
func (*ClientFactory) NewRecoverableManagedDatabasesClient ¶
func (c *ClientFactory) NewRecoverableManagedDatabasesClient() *RecoverableManagedDatabasesClient
NewRecoverableManagedDatabasesClient creates a new instance of RecoverableManagedDatabasesClient.
func (*ClientFactory) NewReplicationLinksClient ¶
func (c *ClientFactory) NewReplicationLinksClient() *ReplicationLinksClient
NewReplicationLinksClient creates a new instance of ReplicationLinksClient.
func (*ClientFactory) NewRestorableDroppedDatabasesClient ¶
func (c *ClientFactory) NewRestorableDroppedDatabasesClient() *RestorableDroppedDatabasesClient
NewRestorableDroppedDatabasesClient creates a new instance of RestorableDroppedDatabasesClient.
func (*ClientFactory) NewRestorableDroppedManagedDatabasesClient ¶
func (c *ClientFactory) NewRestorableDroppedManagedDatabasesClient() *RestorableDroppedManagedDatabasesClient
NewRestorableDroppedManagedDatabasesClient creates a new instance of RestorableDroppedManagedDatabasesClient.
func (*ClientFactory) NewRestorePointsClient ¶
func (c *ClientFactory) NewRestorePointsClient() *RestorePointsClient
NewRestorePointsClient creates a new instance of RestorePointsClient.
func (*ClientFactory) NewSensitivityLabelsClient ¶
func (c *ClientFactory) NewSensitivityLabelsClient() *SensitivityLabelsClient
NewSensitivityLabelsClient creates a new instance of SensitivityLabelsClient.
func (*ClientFactory) NewServerAdvancedThreatProtectionSettingsClient ¶
func (c *ClientFactory) NewServerAdvancedThreatProtectionSettingsClient() *ServerAdvancedThreatProtectionSettingsClient
NewServerAdvancedThreatProtectionSettingsClient creates a new instance of ServerAdvancedThreatProtectionSettingsClient.
func (*ClientFactory) NewServerAdvisorsClient ¶
func (c *ClientFactory) NewServerAdvisorsClient() *ServerAdvisorsClient
NewServerAdvisorsClient creates a new instance of ServerAdvisorsClient.
func (*ClientFactory) NewServerAutomaticTuningClient ¶
func (c *ClientFactory) NewServerAutomaticTuningClient() *ServerAutomaticTuningClient
NewServerAutomaticTuningClient creates a new instance of ServerAutomaticTuningClient.
func (*ClientFactory) NewServerAzureADAdministratorsClient ¶
func (c *ClientFactory) NewServerAzureADAdministratorsClient() *ServerAzureADAdministratorsClient
NewServerAzureADAdministratorsClient creates a new instance of ServerAzureADAdministratorsClient.
func (*ClientFactory) NewServerAzureADOnlyAuthenticationsClient ¶
func (c *ClientFactory) NewServerAzureADOnlyAuthenticationsClient() *ServerAzureADOnlyAuthenticationsClient
NewServerAzureADOnlyAuthenticationsClient creates a new instance of ServerAzureADOnlyAuthenticationsClient.
func (*ClientFactory) NewServerBlobAuditingPoliciesClient ¶
func (c *ClientFactory) NewServerBlobAuditingPoliciesClient() *ServerBlobAuditingPoliciesClient
NewServerBlobAuditingPoliciesClient creates a new instance of ServerBlobAuditingPoliciesClient.
func (*ClientFactory) NewServerCommunicationLinksClient ¶
func (c *ClientFactory) NewServerCommunicationLinksClient() *ServerCommunicationLinksClient
NewServerCommunicationLinksClient creates a new instance of ServerCommunicationLinksClient.
func (*ClientFactory) NewServerConfigurationOptionsClient ¶
func (c *ClientFactory) NewServerConfigurationOptionsClient() *ServerConfigurationOptionsClient
NewServerConfigurationOptionsClient creates a new instance of ServerConfigurationOptionsClient.
func (*ClientFactory) NewServerConnectionPoliciesClient ¶
func (c *ClientFactory) NewServerConnectionPoliciesClient() *ServerConnectionPoliciesClient
NewServerConnectionPoliciesClient creates a new instance of ServerConnectionPoliciesClient.
func (*ClientFactory) NewServerDNSAliasesClient ¶
func (c *ClientFactory) NewServerDNSAliasesClient() *ServerDNSAliasesClient
NewServerDNSAliasesClient creates a new instance of ServerDNSAliasesClient.
func (*ClientFactory) NewServerDevOpsAuditSettingsClient ¶
func (c *ClientFactory) NewServerDevOpsAuditSettingsClient() *ServerDevOpsAuditSettingsClient
NewServerDevOpsAuditSettingsClient creates a new instance of ServerDevOpsAuditSettingsClient.
func (*ClientFactory) NewServerKeysClient ¶
func (c *ClientFactory) NewServerKeysClient() *ServerKeysClient
NewServerKeysClient creates a new instance of ServerKeysClient.
func (*ClientFactory) NewServerOperationsClient ¶
func (c *ClientFactory) NewServerOperationsClient() *ServerOperationsClient
NewServerOperationsClient creates a new instance of ServerOperationsClient.
func (*ClientFactory) NewServerSecurityAlertPoliciesClient ¶
func (c *ClientFactory) NewServerSecurityAlertPoliciesClient() *ServerSecurityAlertPoliciesClient
NewServerSecurityAlertPoliciesClient creates a new instance of ServerSecurityAlertPoliciesClient.
func (*ClientFactory) NewServerTrustCertificatesClient ¶
func (c *ClientFactory) NewServerTrustCertificatesClient() *ServerTrustCertificatesClient
NewServerTrustCertificatesClient creates a new instance of ServerTrustCertificatesClient.
func (*ClientFactory) NewServerTrustGroupsClient ¶
func (c *ClientFactory) NewServerTrustGroupsClient() *ServerTrustGroupsClient
NewServerTrustGroupsClient creates a new instance of ServerTrustGroupsClient.
func (*ClientFactory) NewServerUsagesClient ¶
func (c *ClientFactory) NewServerUsagesClient() *ServerUsagesClient
NewServerUsagesClient creates a new instance of ServerUsagesClient.
func (*ClientFactory) NewServerVulnerabilityAssessmentsClient ¶
func (c *ClientFactory) NewServerVulnerabilityAssessmentsClient() *ServerVulnerabilityAssessmentsClient
NewServerVulnerabilityAssessmentsClient creates a new instance of ServerVulnerabilityAssessmentsClient.
func (*ClientFactory) NewServersClient ¶
func (c *ClientFactory) NewServersClient() *ServersClient
NewServersClient creates a new instance of ServersClient.
func (*ClientFactory) NewServiceObjectivesClient ¶
func (c *ClientFactory) NewServiceObjectivesClient() *ServiceObjectivesClient
NewServiceObjectivesClient creates a new instance of ServiceObjectivesClient.
func (*ClientFactory) NewStartStopManagedInstanceSchedulesClient ¶
func (c *ClientFactory) NewStartStopManagedInstanceSchedulesClient() *StartStopManagedInstanceSchedulesClient
NewStartStopManagedInstanceSchedulesClient creates a new instance of StartStopManagedInstanceSchedulesClient.
func (*ClientFactory) NewSubscriptionUsagesClient ¶
func (c *ClientFactory) NewSubscriptionUsagesClient() *SubscriptionUsagesClient
NewSubscriptionUsagesClient creates a new instance of SubscriptionUsagesClient.
func (*ClientFactory) NewSynapseLinkWorkspacesClient ¶
func (c *ClientFactory) NewSynapseLinkWorkspacesClient() *SynapseLinkWorkspacesClient
NewSynapseLinkWorkspacesClient creates a new instance of SynapseLinkWorkspacesClient.
func (*ClientFactory) NewSyncAgentsClient ¶
func (c *ClientFactory) NewSyncAgentsClient() *SyncAgentsClient
NewSyncAgentsClient creates a new instance of SyncAgentsClient.
func (*ClientFactory) NewSyncGroupsClient ¶
func (c *ClientFactory) NewSyncGroupsClient() *SyncGroupsClient
NewSyncGroupsClient creates a new instance of SyncGroupsClient.
func (*ClientFactory) NewSyncMembersClient ¶
func (c *ClientFactory) NewSyncMembersClient() *SyncMembersClient
NewSyncMembersClient creates a new instance of SyncMembersClient.
func (*ClientFactory) NewTdeCertificatesClient ¶
func (c *ClientFactory) NewTdeCertificatesClient() *TdeCertificatesClient
NewTdeCertificatesClient creates a new instance of TdeCertificatesClient.
func (*ClientFactory) NewTimeZonesClient ¶
func (c *ClientFactory) NewTimeZonesClient() *TimeZonesClient
NewTimeZonesClient creates a new instance of TimeZonesClient.
func (*ClientFactory) NewTransparentDataEncryptionsClient ¶
func (c *ClientFactory) NewTransparentDataEncryptionsClient() *TransparentDataEncryptionsClient
NewTransparentDataEncryptionsClient creates a new instance of TransparentDataEncryptionsClient.
func (*ClientFactory) NewUsagesClient ¶
func (c *ClientFactory) NewUsagesClient() *UsagesClient
NewUsagesClient creates a new instance of UsagesClient.
func (*ClientFactory) NewVirtualClustersClient ¶
func (c *ClientFactory) NewVirtualClustersClient() *VirtualClustersClient
NewVirtualClustersClient creates a new instance of VirtualClustersClient.
func (*ClientFactory) NewVirtualNetworkRulesClient ¶
func (c *ClientFactory) NewVirtualNetworkRulesClient() *VirtualNetworkRulesClient
NewVirtualNetworkRulesClient creates a new instance of VirtualNetworkRulesClient.
func (*ClientFactory) NewVulnerabilityAssessmentBaselineClient ¶
func (c *ClientFactory) NewVulnerabilityAssessmentBaselineClient() *VulnerabilityAssessmentBaselineClient
NewVulnerabilityAssessmentBaselineClient creates a new instance of VulnerabilityAssessmentBaselineClient.
func (*ClientFactory) NewVulnerabilityAssessmentBaselinesClient ¶
func (c *ClientFactory) NewVulnerabilityAssessmentBaselinesClient() *VulnerabilityAssessmentBaselinesClient
NewVulnerabilityAssessmentBaselinesClient creates a new instance of VulnerabilityAssessmentBaselinesClient.
func (*ClientFactory) NewVulnerabilityAssessmentExecuteScanClient ¶
func (c *ClientFactory) NewVulnerabilityAssessmentExecuteScanClient() *VulnerabilityAssessmentExecuteScanClient
NewVulnerabilityAssessmentExecuteScanClient creates a new instance of VulnerabilityAssessmentExecuteScanClient.
func (*ClientFactory) NewVulnerabilityAssessmentRuleBaselineClient ¶
func (c *ClientFactory) NewVulnerabilityAssessmentRuleBaselineClient() *VulnerabilityAssessmentRuleBaselineClient
NewVulnerabilityAssessmentRuleBaselineClient creates a new instance of VulnerabilityAssessmentRuleBaselineClient.
func (*ClientFactory) NewVulnerabilityAssessmentRuleBaselinesClient ¶
func (c *ClientFactory) NewVulnerabilityAssessmentRuleBaselinesClient() *VulnerabilityAssessmentRuleBaselinesClient
NewVulnerabilityAssessmentRuleBaselinesClient creates a new instance of VulnerabilityAssessmentRuleBaselinesClient.
func (*ClientFactory) NewVulnerabilityAssessmentScanResultClient ¶
func (c *ClientFactory) NewVulnerabilityAssessmentScanResultClient() *VulnerabilityAssessmentScanResultClient
NewVulnerabilityAssessmentScanResultClient creates a new instance of VulnerabilityAssessmentScanResultClient.
func (*ClientFactory) NewVulnerabilityAssessmentScansClient ¶
func (c *ClientFactory) NewVulnerabilityAssessmentScansClient() *VulnerabilityAssessmentScansClient
NewVulnerabilityAssessmentScansClient creates a new instance of VulnerabilityAssessmentScansClient.
func (*ClientFactory) NewVulnerabilityAssessmentsClient ¶
func (c *ClientFactory) NewVulnerabilityAssessmentsClient() *VulnerabilityAssessmentsClient
NewVulnerabilityAssessmentsClient creates a new instance of VulnerabilityAssessmentsClient.
func (*ClientFactory) NewVulnerabilityAssessmentsSettingsClient ¶
func (c *ClientFactory) NewVulnerabilityAssessmentsSettingsClient() *VulnerabilityAssessmentsSettingsClient
NewVulnerabilityAssessmentsSettingsClient creates a new instance of VulnerabilityAssessmentsSettingsClient.
func (*ClientFactory) NewWorkloadClassifiersClient ¶
func (c *ClientFactory) NewWorkloadClassifiersClient() *WorkloadClassifiersClient
NewWorkloadClassifiersClient creates a new instance of WorkloadClassifiersClient.
func (*ClientFactory) NewWorkloadGroupsClient ¶
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 ¶
func (c CompleteDatabaseRestoreDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CompleteDatabaseRestoreDefinition.
func (*CompleteDatabaseRestoreDefinition) UnmarshalJSON ¶
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 ¶
func (c CopyLongTermRetentionBackupParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CopyLongTermRetentionBackupParameters.
func (*CopyLongTermRetentionBackupParameters) UnmarshalJSON ¶
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 ¶
func (c CopyLongTermRetentionBackupParametersProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CopyLongTermRetentionBackupParametersProperties.
func (*CopyLongTermRetentionBackupParametersProperties) UnmarshalJSON ¶
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 ¶
func (c CreateDatabaseRestorePointDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CreateDatabaseRestorePointDefinition.
func (*CreateDatabaseRestorePointDefinition) UnmarshalJSON ¶
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 DNSRefreshOperationStatus ¶
type DNSRefreshOperationStatus string
DNSRefreshOperationStatus - The status of the DNS refresh operation.
const ( DNSRefreshOperationStatusFailed DNSRefreshOperationStatus = "Failed" DNSRefreshOperationStatusInProgress DNSRefreshOperationStatus = "InProgress" DNSRefreshOperationStatusSucceeded DNSRefreshOperationStatus = "Succeeded" )
func PossibleDNSRefreshOperationStatusValues ¶
func PossibleDNSRefreshOperationStatusValues() []DNSRefreshOperationStatus
PossibleDNSRefreshOperationStatusValues returns the possible values for the DNSRefreshOperationStatus 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingPolicyCreateOrUpdateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingPolicyCreateOrUpdateMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingPolicyGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type DataMaskingPoliciesClientCreateOrUpdateOptions struct { }
DataMaskingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the DataMaskingPoliciesClient.CreateOrUpdate method.
type DataMaskingPoliciesClientCreateOrUpdateResponse ¶
type DataMaskingPoliciesClientCreateOrUpdateResponse struct { // Represents a database data masking policy. DataMaskingPolicy }
DataMaskingPoliciesClientCreateOrUpdateResponse contains the response from method DataMaskingPoliciesClient.CreateOrUpdate.
type DataMaskingPoliciesClientGetOptions ¶
type DataMaskingPoliciesClientGetOptions struct { }
DataMaskingPoliciesClientGetOptions contains the optional parameters for the DataMaskingPoliciesClient.Get method.
type DataMaskingPoliciesClientGetResponse ¶
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 ¶
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 ¶
func (d DataMaskingPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DataMaskingPolicyProperties.
func (*DataMaskingPolicyProperties) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
func (d DataMaskingRuleProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DataMaskingRuleProperties.
func (*DataMaskingRuleProperties) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateDefaultMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateDefaultMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateNumber.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateText.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type DataMaskingRulesClientCreateOrUpdateOptions struct { }
DataMaskingRulesClientCreateOrUpdateOptions contains the optional parameters for the DataMaskingRulesClient.CreateOrUpdate method.
type DataMaskingRulesClientCreateOrUpdateResponse ¶
type DataMaskingRulesClientCreateOrUpdateResponse struct { // Represents a database data masking rule. DataMaskingRule }
DataMaskingRulesClientCreateOrUpdateResponse contains the response from method DataMaskingRulesClient.CreateOrUpdate.
type DataMaskingRulesClientListByDatabaseOptions ¶
type DataMaskingRulesClientListByDatabaseOptions struct { }
DataMaskingRulesClientListByDatabaseOptions contains the optional parameters for the DataMaskingRulesClient.NewListByDatabasePager method.
type DataMaskingRulesClientListByDatabaseResponse ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetDataWarehouseUserActivities.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListDataWarehouseUserActivities.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type DataWarehouseUserActivitiesClientGetOptions struct { }
DataWarehouseUserActivitiesClientGetOptions contains the optional parameters for the DataWarehouseUserActivitiesClient.Get method.
type DataWarehouseUserActivitiesClientGetResponse ¶
type DataWarehouseUserActivitiesClientGetResponse struct { // User activities of a data warehouse DataWarehouseUserActivities }
DataWarehouseUserActivitiesClientGetResponse contains the response from method DataWarehouseUserActivitiesClient.Get.
type DataWarehouseUserActivitiesClientListByDatabaseOptions ¶
type DataWarehouseUserActivitiesClientListByDatabaseOptions struct { }
DataWarehouseUserActivitiesClientListByDatabaseOptions contains the optional parameters for the DataWarehouseUserActivitiesClient.NewListByDatabasePager method.
type DataWarehouseUserActivitiesClientListByDatabaseResponse ¶
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 ¶
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 ¶
func (d DataWarehouseUserActivitiesProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DataWarehouseUserActivitiesProperties.
func (*DataWarehouseUserActivitiesProperties) UnmarshalJSON ¶
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 ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Database.
type DatabaseAdvancedThreatProtection ¶
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 ¶
func (d DatabaseAdvancedThreatProtection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseAdvancedThreatProtection.
func (*DatabaseAdvancedThreatProtection) UnmarshalJSON ¶
func (d *DatabaseAdvancedThreatProtection) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAdvancedThreatProtection.
type DatabaseAdvancedThreatProtectionListResult ¶
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 ¶
func (d DatabaseAdvancedThreatProtectionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseAdvancedThreatProtectionListResult.
func (*DatabaseAdvancedThreatProtectionListResult) UnmarshalJSON ¶
func (d *DatabaseAdvancedThreatProtectionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseAdvancedThreatProtectionListResult.
type DatabaseAdvancedThreatProtectionSettingsClient ¶
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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DatabaseAdvancedThreatProtectionSettingsCreateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DatabaseAdvancedThreatProtectionSettingsCreateMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DatabaseAdvancedThreatProtectionSettingsGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DatabaseAdvancedThreatProtectionSettingsListByDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateOptions struct { }
DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateOptions contains the optional parameters for the DatabaseAdvancedThreatProtectionSettingsClient.CreateOrUpdate method.
type DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse ¶
type DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse struct { // A database Advanced Threat Protection. DatabaseAdvancedThreatProtection }
DatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse contains the response from method DatabaseAdvancedThreatProtectionSettingsClient.CreateOrUpdate.
type DatabaseAdvancedThreatProtectionSettingsClientGetOptions ¶
type DatabaseAdvancedThreatProtectionSettingsClientGetOptions struct { }
DatabaseAdvancedThreatProtectionSettingsClientGetOptions contains the optional parameters for the DatabaseAdvancedThreatProtectionSettingsClient.Get method.
type DatabaseAdvancedThreatProtectionSettingsClientGetResponse ¶
type DatabaseAdvancedThreatProtectionSettingsClientGetResponse struct { // A database Advanced Threat Protection. DatabaseAdvancedThreatProtection }
DatabaseAdvancedThreatProtectionSettingsClientGetResponse contains the response from method DatabaseAdvancedThreatProtectionSettingsClient.Get.
type DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseOptions ¶
type DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseOptions struct { }
DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseOptions contains the optional parameters for the DatabaseAdvancedThreatProtectionSettingsClient.NewListByDatabasePager method.
type DatabaseAdvancedThreatProtectionSettingsClientListByDatabaseResponse ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseAdvisorGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseAdvisorList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRecommendedActionListExpand.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseAdvisorUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type DatabaseAdvisorsClientGetOptions struct { }
DatabaseAdvisorsClientGetOptions contains the optional parameters for the DatabaseAdvisorsClient.Get method.
type DatabaseAdvisorsClientGetResponse ¶
type DatabaseAdvisorsClientGetResponse struct { // Database, Server or Elastic Pool Advisor. Advisor }
DatabaseAdvisorsClientGetResponse contains the response from method DatabaseAdvisorsClient.Get.
type DatabaseAdvisorsClientListByDatabaseOptions ¶
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 ¶
type DatabaseAdvisorsClientListByDatabaseResponse struct { // Array of Advisor AdvisorArray []*Advisor }
DatabaseAdvisorsClientListByDatabaseResponse contains the response from method DatabaseAdvisorsClient.ListByDatabase.
type DatabaseAdvisorsClientUpdateOptions ¶
type DatabaseAdvisorsClientUpdateOptions struct { }
DatabaseAdvisorsClientUpdateOptions contains the optional parameters for the DatabaseAdvisorsClient.Update method.
type DatabaseAdvisorsClientUpdateResponse ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseAutomaticTuningGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseAutomaticTuningUpdateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseAutomaticTuningUpdateMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type DatabaseAutomaticTuningClientGetOptions struct { }
DatabaseAutomaticTuningClientGetOptions contains the optional parameters for the DatabaseAutomaticTuningClient.Get method.
type DatabaseAutomaticTuningClientGetResponse ¶
type DatabaseAutomaticTuningClientGetResponse struct { // Database-level Automatic Tuning. DatabaseAutomaticTuning }
DatabaseAutomaticTuningClientGetResponse contains the response from method DatabaseAutomaticTuningClient.Get.
type DatabaseAutomaticTuningClientUpdateOptions ¶
type DatabaseAutomaticTuningClientUpdateOptions struct { }
DatabaseAutomaticTuningClientUpdateOptions contains the optional parameters for the DatabaseAutomaticTuningClient.Update method.
type DatabaseAutomaticTuningClientUpdateResponse ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DatabaseAzureMonitorAuditingCreateMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DatabaseBlobAuditingCreateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DatabaseBlobAuditingCreateMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DatabaseBlobAuditingGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DatabaseAuditingSettingsList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type DatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions struct { }
DatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the DatabaseBlobAuditingPoliciesClient.CreateOrUpdate method.
type DatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse ¶
type DatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse struct { // A database blob auditing policy. DatabaseBlobAuditingPolicy }
DatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse contains the response from method DatabaseBlobAuditingPoliciesClient.CreateOrUpdate.
type DatabaseBlobAuditingPoliciesClientGetOptions ¶
type DatabaseBlobAuditingPoliciesClientGetOptions struct { }
DatabaseBlobAuditingPoliciesClientGetOptions contains the optional parameters for the DatabaseBlobAuditingPoliciesClient.Get method.
type DatabaseBlobAuditingPoliciesClientGetResponse ¶
type DatabaseBlobAuditingPoliciesClientGetResponse struct { // A database blob auditing policy. DatabaseBlobAuditingPolicy }
DatabaseBlobAuditingPoliciesClientGetResponse contains the response from method DatabaseBlobAuditingPoliciesClient.Get.
type DatabaseBlobAuditingPoliciesClientListByDatabaseOptions ¶
type DatabaseBlobAuditingPoliciesClientListByDatabaseOptions struct { }
DatabaseBlobAuditingPoliciesClientListByDatabaseOptions contains the optional parameters for the DatabaseBlobAuditingPoliciesClient.NewListByDatabasePager method.
type DatabaseBlobAuditingPoliciesClientListByDatabaseResponse ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
func (d DatabaseColumnProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseColumnProperties.
func (*DatabaseColumnProperties) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseColumnGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ColumnsListByDatabaseMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ColumnsListByDatabaseMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseColumnListByTable.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type DatabaseColumnsClientGetOptions struct { }
DatabaseColumnsClientGetOptions contains the optional parameters for the DatabaseColumnsClient.Get method.
type DatabaseColumnsClientGetResponse ¶
type DatabaseColumnsClientGetResponse struct { // A database column resource. DatabaseColumn }
DatabaseColumnsClientGetResponse contains the response from method DatabaseColumnsClient.Get.
type DatabaseColumnsClientListByDatabaseOptions ¶
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 ¶
type DatabaseColumnsClientListByDatabaseResponse struct { // A list of database columns. DatabaseColumnListResult }
DatabaseColumnsClientListByDatabaseResponse contains the response from method DatabaseColumnsClient.NewListByDatabasePager.
type DatabaseColumnsClientListByTableOptions ¶
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 ¶
type DatabaseColumnsClientListByTableResponse struct { // A list of database columns. DatabaseColumnListResult }
DatabaseColumnsClientListByTableResponse contains the response from method DatabaseColumnsClient.NewListByTablePager.
type DatabaseEncryptionProtectorsClient ¶
type DatabaseEncryptionProtectorsClient struct {
// contains filtered or unexported fields
}
DatabaseEncryptionProtectorsClient contains the methods for the DatabaseEncryptionProtectors group. Don't use this type directly, use NewDatabaseEncryptionProtectorsClient() instead.
func NewDatabaseEncryptionProtectorsClient ¶
func NewDatabaseEncryptionProtectorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseEncryptionProtectorsClient, error)
NewDatabaseEncryptionProtectorsClient creates a new instance of DatabaseEncryptionProtectorsClient 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 (*DatabaseEncryptionProtectorsClient) BeginRevalidate ¶
func (client *DatabaseEncryptionProtectorsClient) BeginRevalidate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, encryptionProtectorName EncryptionProtectorName, options *DatabaseEncryptionProtectorsClientBeginRevalidateOptions) (*runtime.Poller[DatabaseEncryptionProtectorsClientRevalidateResponse], error)
BeginRevalidate - Revalidates an existing encryption protector for a particular database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-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.
- databaseName - The name of the database.
- encryptionProtectorName - The name of the encryption protector to be updated.
- options - DatabaseEncryptionProtectorsClientBeginRevalidateOptions contains the optional parameters for the DatabaseEncryptionProtectorsClient.BeginRevalidate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/DatabaseEncryptionProtectorRevalidate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewDatabaseEncryptionProtectorsClient().BeginRevalidate(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", "sqlcrudtestdb-2342", 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 (*DatabaseEncryptionProtectorsClient) BeginRevert ¶
func (client *DatabaseEncryptionProtectorsClient) BeginRevert(ctx context.Context, resourceGroupName string, serverName string, databaseName string, encryptionProtectorName EncryptionProtectorName, options *DatabaseEncryptionProtectorsClientBeginRevertOptions) (*runtime.Poller[DatabaseEncryptionProtectorsClientRevertResponse], error)
BeginRevert - Reverts an existing encryption protector for a particular database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-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.
- databaseName - The name of the database.
- encryptionProtectorName - The name of the encryption protector to be updated.
- options - DatabaseEncryptionProtectorsClientBeginRevertOptions contains the optional parameters for the DatabaseEncryptionProtectorsClient.BeginRevert method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/DatabaseEncryptionProtectorRevert.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewDatabaseEncryptionProtectorsClient().BeginRevert(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", "sqlcrudtestdb-2342", 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:
type DatabaseEncryptionProtectorsClientBeginRevalidateOptions ¶
type DatabaseEncryptionProtectorsClientBeginRevalidateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabaseEncryptionProtectorsClientBeginRevalidateOptions contains the optional parameters for the DatabaseEncryptionProtectorsClient.BeginRevalidate method.
type DatabaseEncryptionProtectorsClientBeginRevertOptions ¶
type DatabaseEncryptionProtectorsClientBeginRevertOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabaseEncryptionProtectorsClientBeginRevertOptions contains the optional parameters for the DatabaseEncryptionProtectorsClient.BeginRevert method.
type DatabaseEncryptionProtectorsClientRevalidateResponse ¶
type DatabaseEncryptionProtectorsClientRevalidateResponse struct { }
DatabaseEncryptionProtectorsClientRevalidateResponse contains the response from method DatabaseEncryptionProtectorsClient.BeginRevalidate.
type DatabaseEncryptionProtectorsClientRevertResponse ¶
type DatabaseEncryptionProtectorsClientRevertResponse struct { }
DatabaseEncryptionProtectorsClientRevertResponse contains the response from method DatabaseEncryptionProtectorsClient.BeginRevert.
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateDatabaseExtensions.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetDatabaseExtensions.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListDatabaseExtensions.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type DatabaseExtensionsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabaseExtensionsClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabaseExtensionsClient.BeginCreateOrUpdate method.
type DatabaseExtensionsClientCreateOrUpdateResponse ¶
type DatabaseExtensionsClientCreateOrUpdateResponse struct { // An Extension operation result resource. ImportExportExtensionsOperationResult }
DatabaseExtensionsClientCreateOrUpdateResponse contains the response from method DatabaseExtensionsClient.BeginCreateOrUpdate.
type DatabaseExtensionsClientGetOptions ¶
type DatabaseExtensionsClientGetOptions struct { }
DatabaseExtensionsClientGetOptions contains the optional parameters for the DatabaseExtensionsClient.Get method.
type DatabaseExtensionsClientGetResponse ¶
type DatabaseExtensionsClientGetResponse struct { }
DatabaseExtensionsClientGetResponse contains the response from method DatabaseExtensionsClient.Get.
type DatabaseExtensionsClientListByDatabaseOptions ¶
type DatabaseExtensionsClientListByDatabaseOptions struct { }
DatabaseExtensionsClientListByDatabaseOptions contains the optional parameters for the DatabaseExtensionsClient.NewListByDatabasePager method.
type DatabaseExtensionsClientListByDatabaseResponse ¶
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 ¶
func (d DatabaseExtensionsProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseExtensionsProperties.
func (*DatabaseExtensionsProperties) UnmarshalJSON ¶
func (d *DatabaseExtensionsProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseExtensionsProperties.
type DatabaseIdentity ¶
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 ¶
func (d DatabaseIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseIdentity.
func (*DatabaseIdentity) UnmarshalJSON ¶
func (d *DatabaseIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseIdentity.
type DatabaseIdentityType ¶
type DatabaseIdentityType string
DatabaseIdentityType - The identity type
const ( DatabaseIdentityTypeNone DatabaseIdentityType = "None" DatabaseIdentityTypeUserAssigned DatabaseIdentityType = "UserAssigned" )
func PossibleDatabaseIdentityTypeValues ¶
func PossibleDatabaseIdentityTypeValues() []DatabaseIdentityType
PossibleDatabaseIdentityTypeValues returns the possible values for the DatabaseIdentityType const type.
type DatabaseKey ¶
type DatabaseKey struct { // READ-ONLY; The database key creation date. CreationDate *time.Time // READ-ONLY; Subregion of the server key. Subregion *string // READ-ONLY; Thumbprint of the database key. Thumbprint *string // READ-ONLY; The database key type. Only supported value is 'AzureKeyVault'. Type *DatabaseKeyType }
DatabaseKey - Database level key used for encryption at rest.
func (DatabaseKey) MarshalJSON ¶
func (d DatabaseKey) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseKey.
func (*DatabaseKey) UnmarshalJSON ¶
func (d *DatabaseKey) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseKey.
type DatabaseKeyType ¶
type DatabaseKeyType string
DatabaseKeyType - The database key type. Only supported value is 'AzureKeyVault'.
const (
DatabaseKeyTypeAzureKeyVault DatabaseKeyType = "AzureKeyVault"
)
func PossibleDatabaseKeyTypeValues ¶
func PossibleDatabaseKeyTypeValues() []DatabaseKeyType
PossibleDatabaseKeyTypeValues returns the possible values for the DatabaseKeyType 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 ¶
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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CancelDatabaseOperation.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListDatabaseOperations.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type DatabaseOperationsClientCancelOptions struct { }
DatabaseOperationsClientCancelOptions contains the optional parameters for the DatabaseOperationsClient.Cancel method.
type DatabaseOperationsClientCancelResponse ¶
type DatabaseOperationsClientCancelResponse struct { }
DatabaseOperationsClientCancelResponse contains the response from method DatabaseOperationsClient.Cancel.
type DatabaseOperationsClientListByDatabaseOptions ¶
type DatabaseOperationsClientListByDatabaseOptions struct { }
DatabaseOperationsClientListByDatabaseOptions contains the optional parameters for the DatabaseOperationsClient.NewListByDatabasePager method.
type DatabaseOperationsClientListByDatabaseResponse ¶
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 // Specifies the availability zone the database is pinned to. AvailabilityZone *AvailabilityZoneType // 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 azure key vault URI of the database if it's configured with per Database Customer Managed Keys. EncryptionProtector *string // The flag to enable or disable auto rotation of database encryption protector AKV key. EncryptionProtectorAutoRotation *bool // The Client id used for cross tenant per database CMK scenario FederatedClientID *string // Specifies the behavior when monthly free limits are exhausted for the free database. // AutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month. // BillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be billed. FreeLimitExhaustionBehavior *FreeLimitExhaustionBehavior // 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 resource ids of the user assigned identities to use Keys map[string]*DatabaseKey // 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 // Whether or not customer controlled manual cutover needs to be done during Update Database operation to Hyperscale tier. // This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to // Hyperscale tier. // When manualCutover is specified, the scaling operation will wait for user input to trigger cutover to Hyperscale database. // To trigger cutover, please provide 'performCutover' parameter when the Scaling operation is in Waiting state. ManualCutover *bool // The max size of the database expressed in bytes. MaxSizeBytes *int64 // Minimal capacity that database will always have allocated, if not paused MinCapacity *float64 // To trigger customer controlled manual cutover during the wait state while Scaling operation is in progress. // This property parameter is only applicable for scaling operations that are initiated along with 'manualCutover' parameter. // This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to // Hyperscale tier is already in progress. // When performCutover is specified, the scaling operation will trigger cutover and perform role-change to Hyperscale database. PerformCutover *bool // Type of enclave requested on the database i.e. Default or VBS enclaves. PreferredEnclaveType *AlwaysEncryptedEnclaveType // 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, Named and Standby. 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. // This property is only supported for DataWarehouse edition and allows to restore across subscriptions. // 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 the 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. // 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 the database uses free monthly limits. Allowed on one database in a subscription. UseFreeLimit *bool // 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRecommendedActionGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRecommendedActionList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRecommendedActionUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type DatabaseRecommendedActionsClientGetOptions struct { }
DatabaseRecommendedActionsClientGetOptions contains the optional parameters for the DatabaseRecommendedActionsClient.Get method.
type DatabaseRecommendedActionsClientGetResponse ¶
type DatabaseRecommendedActionsClientGetResponse struct { // Database, Server or Elastic Pool Recommended Action. RecommendedAction }
DatabaseRecommendedActionsClientGetResponse contains the response from method DatabaseRecommendedActionsClient.Get.
type DatabaseRecommendedActionsClientListByDatabaseAdvisorOptions ¶
type DatabaseRecommendedActionsClientListByDatabaseAdvisorOptions struct { }
DatabaseRecommendedActionsClientListByDatabaseAdvisorOptions contains the optional parameters for the DatabaseRecommendedActionsClient.ListByDatabaseAdvisor method.
type DatabaseRecommendedActionsClientListByDatabaseAdvisorResponse ¶
type DatabaseRecommendedActionsClientListByDatabaseAdvisorResponse struct { // Array of RecommendedAction RecommendedActionArray []*RecommendedAction }
DatabaseRecommendedActionsClientListByDatabaseAdvisorResponse contains the response from method DatabaseRecommendedActionsClient.ListByDatabaseAdvisor.
type DatabaseRecommendedActionsClientUpdateOptions ¶
type DatabaseRecommendedActionsClientUpdateOptions struct { }
DatabaseRecommendedActionsClientUpdateOptions contains the optional parameters for the DatabaseRecommendedActionsClient.Update method.
type DatabaseRecommendedActionsClientUpdateResponse ¶
type DatabaseRecommendedActionsClientUpdateResponse struct { // Database, Server or Elastic Pool Recommended Action. RecommendedAction }
DatabaseRecommendedActionsClientUpdateResponse contains the response from method DatabaseRecommendedActionsClient.Update.
type DatabaseSQLVulnerabilityAssessmentBaselineSet ¶
type DatabaseSQLVulnerabilityAssessmentBaselineSet struct { // Resource properties. Properties *DatabaseSQLVulnerabilityAssessmentBaselineSetProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; SystemData of DatabaseSqlVulnerabilityAssessmentBaselineSetResource. SystemData *SystemData // READ-ONLY; Resource type. Type *string }
DatabaseSQLVulnerabilityAssessmentBaselineSet - A database sql vulnerability assessment baseline set.
func (DatabaseSQLVulnerabilityAssessmentBaselineSet) MarshalJSON ¶
func (d DatabaseSQLVulnerabilityAssessmentBaselineSet) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseSQLVulnerabilityAssessmentBaselineSet.
func (*DatabaseSQLVulnerabilityAssessmentBaselineSet) UnmarshalJSON ¶
func (d *DatabaseSQLVulnerabilityAssessmentBaselineSet) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseSQLVulnerabilityAssessmentBaselineSet.
type DatabaseSQLVulnerabilityAssessmentBaselineSetListResult ¶
type DatabaseSQLVulnerabilityAssessmentBaselineSetListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*DatabaseSQLVulnerabilityAssessmentBaselineSet }
DatabaseSQLVulnerabilityAssessmentBaselineSetListResult - A list of SQL Vulnerability Assessments baseline set.
func (DatabaseSQLVulnerabilityAssessmentBaselineSetListResult) MarshalJSON ¶
func (d DatabaseSQLVulnerabilityAssessmentBaselineSetListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseSQLVulnerabilityAssessmentBaselineSetListResult.
func (*DatabaseSQLVulnerabilityAssessmentBaselineSetListResult) UnmarshalJSON ¶
func (d *DatabaseSQLVulnerabilityAssessmentBaselineSetListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseSQLVulnerabilityAssessmentBaselineSetListResult.
type DatabaseSQLVulnerabilityAssessmentBaselineSetProperties ¶
type DatabaseSQLVulnerabilityAssessmentBaselineSetProperties struct { // REQUIRED; The baseline set result Results map[string][][]*string }
DatabaseSQLVulnerabilityAssessmentBaselineSetProperties - Properties of a database Sql Vulnerability Assessment baseline set.
func (DatabaseSQLVulnerabilityAssessmentBaselineSetProperties) MarshalJSON ¶
func (d DatabaseSQLVulnerabilityAssessmentBaselineSetProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseSQLVulnerabilityAssessmentBaselineSetProperties.
func (*DatabaseSQLVulnerabilityAssessmentBaselineSetProperties) UnmarshalJSON ¶
func (d *DatabaseSQLVulnerabilityAssessmentBaselineSetProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseSQLVulnerabilityAssessmentBaselineSetProperties.
type DatabaseSQLVulnerabilityAssessmentBaselinesClient ¶
type DatabaseSQLVulnerabilityAssessmentBaselinesClient struct {
// contains filtered or unexported fields
}
DatabaseSQLVulnerabilityAssessmentBaselinesClient contains the methods for the DatabaseSQLVulnerabilityAssessmentBaselines group. Don't use this type directly, use NewDatabaseSQLVulnerabilityAssessmentBaselinesClient() instead.
func NewDatabaseSQLVulnerabilityAssessmentBaselinesClient ¶
func NewDatabaseSQLVulnerabilityAssessmentBaselinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseSQLVulnerabilityAssessmentBaselinesClient, error)
NewDatabaseSQLVulnerabilityAssessmentBaselinesClient creates a new instance of DatabaseSQLVulnerabilityAssessmentBaselinesClient 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 (*DatabaseSQLVulnerabilityAssessmentBaselinesClient) CreateOrUpdate ¶
func (client *DatabaseSQLVulnerabilityAssessmentBaselinesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, baselineName BaselineName, parameters DatabaseSQLVulnerabilityAssessmentRuleBaselineListInput, options *DatabaseSQLVulnerabilityAssessmentBaselinesClientCreateOrUpdateOptions) (DatabaseSQLVulnerabilityAssessmentBaselinesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Add a database's vulnerability assessment rule baseline list. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-11-01-preview
- resourceGroupName - The name of the resource group 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.
- parameters - The requested rule baseline resource.
- options - DatabaseSQLVulnerabilityAssessmentBaselinesClientCreateOrUpdateOptions contains the optional parameters for the DatabaseSQLVulnerabilityAssessmentBaselinesClient.CreateOrUpdate method.
Example (AddADatabasesVulnerabilityAssessmentRuleBaselineFromTheLatestScanResult) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAddLatest.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewDatabaseSQLVulnerabilityAssessmentBaselinesClient().CreateOrUpdate(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", armsql.VulnerabilityAssessmentNameDefault, armsql.BaselineNameDefault, armsql.DatabaseSQLVulnerabilityAssessmentRuleBaselineListInput{ Properties: &armsql.DatabaseSQLVulnerabilityAssessmentRuleBaselineListInputProperties{ LatestScan: to.Ptr(true), Results: map[string][][]*string{}, }, }, 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.DatabaseSQLVulnerabilityAssessmentBaselineSet = armsql.DatabaseSQLVulnerabilityAssessmentBaselineSet{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/Default/baselines/Default"), // Properties: &armsql.DatabaseSQLVulnerabilityAssessmentBaselineSetProperties{ // Results: map[string][][]*string{ // "VA1020": [][]*string{ // }, // "VA1054": [][]*string{ // }, // "VA1095": [][]*string{ // }, // "VA1096": [][]*string{ // }, // "VA1097": [][]*string{ // }, // "VA1099": [][]*string{ // }, // "VA1143": [][]*string{ // []*string{ // to.Ptr("True")}}, // "VA1219": [][]*string{ // []*string{ // to.Ptr("False")}}, // "VA1221": [][]*string{ // }, // "VA1223": [][]*string{ // }, // "VA1224": [][]*string{ // }, // "VA1246": [][]*string{ // }, // "VA1248": [][]*string{ // }, // "VA1258": [][]*string{ // }, // "VA1281": [][]*string{ // }, // "VA1282": [][]*string{ // }, // "VA2020": [][]*string{ // }, // "VA2033": [][]*string{ // }, // "VA2062": [][]*string{ // }, // "VA2064": [][]*string{ // }, // "VA2108": [][]*string{ // }, // "VA2109": [][]*string{ // }, // "VA2129": [][]*string{ // }, // "VA2130": [][]*string{ // }, // }, // }, // }
Output:
Example (AddADatabasesVulnerabilityAssessmentRuleBaselineList) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAdd.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewDatabaseSQLVulnerabilityAssessmentBaselinesClient().CreateOrUpdate(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", armsql.VulnerabilityAssessmentNameDefault, armsql.BaselineNameDefault, armsql.DatabaseSQLVulnerabilityAssessmentRuleBaselineListInput{ Properties: &armsql.DatabaseSQLVulnerabilityAssessmentRuleBaselineListInputProperties{ LatestScan: to.Ptr(false), Results: map[string][][]*string{ "VA2063": { { to.Ptr("AllowAll"), to.Ptr("0.0.0.0"), to.Ptr("255.255.255.255")}}, "VA2065": { { to.Ptr("AllowAll"), to.Ptr("0.0.0.0"), to.Ptr("255.255.255.255")}}, }, }, }, 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.DatabaseSQLVulnerabilityAssessmentBaselineSet = armsql.DatabaseSQLVulnerabilityAssessmentBaselineSet{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselines"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/Default/baselines/Default"), // Properties: &armsql.DatabaseSQLVulnerabilityAssessmentBaselineSetProperties{ // Results: map[string][][]*string{ // "VA2063": [][]*string{ // []*string{ // to.Ptr("AllowAll"), // to.Ptr("0.0.0.0"), // to.Ptr("255.255.255.255")}}, // "VA2065": [][]*string{ // []*string{ // to.Ptr("AllowAll"), // to.Ptr("0.0.0.0"), // to.Ptr("255.255.255.255")}}, // }, // }, // }
Output:
func (*DatabaseSQLVulnerabilityAssessmentBaselinesClient) Get ¶
func (client *DatabaseSQLVulnerabilityAssessmentBaselinesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, baselineName BaselineName, options *DatabaseSQLVulnerabilityAssessmentBaselinesClientGetOptions) (DatabaseSQLVulnerabilityAssessmentBaselinesClientGetResponse, error)
Get - Gets a list of database's sql vulnerability assessment rule baselines. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-11-01-preview
- resourceGroupName - The name of the resource group 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 - DatabaseSQLVulnerabilityAssessmentBaselinesClientGetOptions contains the optional parameters for the DatabaseSQLVulnerabilityAssessmentBaselinesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewDatabaseSQLVulnerabilityAssessmentBaselinesClient().Get(ctx, "vulnerabilityaseessmenttest-4711", "vulnerabilityaseessmenttest-6411", "testdb", armsql.VulnerabilityAssessmentNameDefault, armsql.BaselineNameDefault, 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.DatabaseSQLVulnerabilityAssessmentBaselineSet = armsql.DatabaseSQLVulnerabilityAssessmentBaselineSet{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/Default/baselines/Default"), // Properties: &armsql.DatabaseSQLVulnerabilityAssessmentBaselineSetProperties{ // Results: map[string][][]*string{ // "VA1020": [][]*string{ // }, // "VA1054": [][]*string{ // }, // "VA1095": [][]*string{ // }, // "VA1096": [][]*string{ // }, // "VA1097": [][]*string{ // }, // "VA1099": [][]*string{ // }, // "VA1143": [][]*string{ // []*string{ // to.Ptr("True")}}, // "VA1219": [][]*string{ // []*string{ // to.Ptr("False")}}, // "VA1221": [][]*string{ // }, // "VA1223": [][]*string{ // }, // "VA1224": [][]*string{ // }, // "VA1246": [][]*string{ // }, // "VA1248": [][]*string{ // }, // "VA1258": [][]*string{ // }, // "VA1281": [][]*string{ // }, // "VA1282": [][]*string{ // }, // "VA2020": [][]*string{ // }, // "VA2033": [][]*string{ // }, // "VA2062": [][]*string{ // }, // "VA2064": [][]*string{ // }, // "VA2108": [][]*string{ // }, // "VA2109": [][]*string{ // }, // "VA2129": [][]*string{ // }, // "VA2130": [][]*string{ // }, // }, // }, // }
Output:
func (*DatabaseSQLVulnerabilityAssessmentBaselinesClient) NewListBySQLVulnerabilityAssessmentPager ¶
func (client *DatabaseSQLVulnerabilityAssessmentBaselinesClient) NewListBySQLVulnerabilityAssessmentPager(resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *DatabaseSQLVulnerabilityAssessmentBaselinesClientListBySQLVulnerabilityAssessmentOptions) *runtime.Pager[DatabaseSQLVulnerabilityAssessmentBaselinesClientListBySQLVulnerabilityAssessmentResponse]
NewListBySQLVulnerabilityAssessmentPager - Gets a list of database's sql vulnerability assessment rule baselines.
Generated from API version 2022-11-01-preview
- resourceGroupName - The name of the resource group 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 - DatabaseSQLVulnerabilityAssessmentBaselinesClientListBySQLVulnerabilityAssessmentOptions contains the optional parameters for the DatabaseSQLVulnerabilityAssessmentBaselinesClient.NewListBySQLVulnerabilityAssessmentPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewDatabaseSQLVulnerabilityAssessmentBaselinesClient().NewListBySQLVulnerabilityAssessmentPager("vulnerabilityaseessmenttest-4711", "vulnerabilityaseessmenttest-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.DatabaseSQLVulnerabilityAssessmentBaselineSetListResult = armsql.DatabaseSQLVulnerabilityAssessmentBaselineSetListResult{ // Value: []*armsql.DatabaseSQLVulnerabilityAssessmentBaselineSet{ // { // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/Default/baselines/Default"), // Properties: &armsql.DatabaseSQLVulnerabilityAssessmentBaselineSetProperties{ // Results: map[string][][]*string{ // "VA1020": [][]*string{ // }, // "VA1054": [][]*string{ // }, // "VA1095": [][]*string{ // }, // "VA1096": [][]*string{ // }, // "VA1097": [][]*string{ // }, // "VA1099": [][]*string{ // }, // "VA1143": [][]*string{ // []*string{ // to.Ptr("True")}}, // "VA1219": [][]*string{ // []*string{ // to.Ptr("False")}}, // "VA1221": [][]*string{ // }, // "VA1223": [][]*string{ // }, // "VA1224": [][]*string{ // }, // "VA1246": [][]*string{ // }, // "VA1248": [][]*string{ // }, // "VA1258": [][]*string{ // }, // "VA1281": [][]*string{ // }, // "VA1282": [][]*string{ // }, // "VA2020": [][]*string{ // }, // "VA2033": [][]*string{ // }, // "VA2062": [][]*string{ // }, // "VA2064": [][]*string{ // }, // "VA2108": [][]*string{ // }, // "VA2109": [][]*string{ // }, // "VA2129": [][]*string{ // }, // "VA2130": [][]*string{ // }, // }, // }, // }}, // } }
Output:
type DatabaseSQLVulnerabilityAssessmentBaselinesClientCreateOrUpdateOptions ¶
type DatabaseSQLVulnerabilityAssessmentBaselinesClientCreateOrUpdateOptions struct { }
DatabaseSQLVulnerabilityAssessmentBaselinesClientCreateOrUpdateOptions contains the optional parameters for the DatabaseSQLVulnerabilityAssessmentBaselinesClient.CreateOrUpdate method.
type DatabaseSQLVulnerabilityAssessmentBaselinesClientCreateOrUpdateResponse ¶
type DatabaseSQLVulnerabilityAssessmentBaselinesClientCreateOrUpdateResponse struct { // A database sql vulnerability assessment baseline set. DatabaseSQLVulnerabilityAssessmentBaselineSet }
DatabaseSQLVulnerabilityAssessmentBaselinesClientCreateOrUpdateResponse contains the response from method DatabaseSQLVulnerabilityAssessmentBaselinesClient.CreateOrUpdate.
type DatabaseSQLVulnerabilityAssessmentBaselinesClientGetOptions ¶
type DatabaseSQLVulnerabilityAssessmentBaselinesClientGetOptions struct { }
DatabaseSQLVulnerabilityAssessmentBaselinesClientGetOptions contains the optional parameters for the DatabaseSQLVulnerabilityAssessmentBaselinesClient.Get method.
type DatabaseSQLVulnerabilityAssessmentBaselinesClientGetResponse ¶
type DatabaseSQLVulnerabilityAssessmentBaselinesClientGetResponse struct { // A database sql vulnerability assessment baseline set. DatabaseSQLVulnerabilityAssessmentBaselineSet }
DatabaseSQLVulnerabilityAssessmentBaselinesClientGetResponse contains the response from method DatabaseSQLVulnerabilityAssessmentBaselinesClient.Get.
type DatabaseSQLVulnerabilityAssessmentBaselinesClientListBySQLVulnerabilityAssessmentOptions ¶
type DatabaseSQLVulnerabilityAssessmentBaselinesClientListBySQLVulnerabilityAssessmentOptions struct { }
DatabaseSQLVulnerabilityAssessmentBaselinesClientListBySQLVulnerabilityAssessmentOptions contains the optional parameters for the DatabaseSQLVulnerabilityAssessmentBaselinesClient.NewListBySQLVulnerabilityAssessmentPager method.
type DatabaseSQLVulnerabilityAssessmentBaselinesClientListBySQLVulnerabilityAssessmentResponse ¶
type DatabaseSQLVulnerabilityAssessmentBaselinesClientListBySQLVulnerabilityAssessmentResponse struct { // A list of SQL Vulnerability Assessments baseline set. DatabaseSQLVulnerabilityAssessmentBaselineSetListResult }
DatabaseSQLVulnerabilityAssessmentBaselinesClientListBySQLVulnerabilityAssessmentResponse contains the response from method DatabaseSQLVulnerabilityAssessmentBaselinesClient.NewListBySQLVulnerabilityAssessmentPager.
type DatabaseSQLVulnerabilityAssessmentExecuteScanClient ¶
type DatabaseSQLVulnerabilityAssessmentExecuteScanClient struct {
// contains filtered or unexported fields
}
DatabaseSQLVulnerabilityAssessmentExecuteScanClient contains the methods for the DatabaseSQLVulnerabilityAssessmentExecuteScan group. Don't use this type directly, use NewDatabaseSQLVulnerabilityAssessmentExecuteScanClient() instead.
func NewDatabaseSQLVulnerabilityAssessmentExecuteScanClient ¶
func NewDatabaseSQLVulnerabilityAssessmentExecuteScanClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseSQLVulnerabilityAssessmentExecuteScanClient, error)
NewDatabaseSQLVulnerabilityAssessmentExecuteScanClient creates a new instance of DatabaseSQLVulnerabilityAssessmentExecuteScanClient 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 (*DatabaseSQLVulnerabilityAssessmentExecuteScanClient) BeginExecute ¶
func (client *DatabaseSQLVulnerabilityAssessmentExecuteScanClient) BeginExecute(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *DatabaseSQLVulnerabilityAssessmentExecuteScanClientBeginExecuteOptions) (*runtime.Poller[DatabaseSQLVulnerabilityAssessmentExecuteScanClientExecuteResponse], error)
BeginExecute - Executes a Vulnerability Assessment database scan. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-11-01-preview
- resourceGroupName - The name of the resource group 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 - DatabaseSQLVulnerabilityAssessmentExecuteScanClientBeginExecuteOptions contains the optional parameters for the DatabaseSQLVulnerabilityAssessmentExecuteScanClient.BeginExecute method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScansExecute.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewDatabaseSQLVulnerabilityAssessmentExecuteScanClient().BeginExecute(ctx, "vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", "testdb", armsql.VulnerabilityAssessmentNameDefault, 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 DatabaseSQLVulnerabilityAssessmentExecuteScanClientBeginExecuteOptions ¶
type DatabaseSQLVulnerabilityAssessmentExecuteScanClientBeginExecuteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabaseSQLVulnerabilityAssessmentExecuteScanClientBeginExecuteOptions contains the optional parameters for the DatabaseSQLVulnerabilityAssessmentExecuteScanClient.BeginExecute method.
type DatabaseSQLVulnerabilityAssessmentExecuteScanClientExecuteResponse ¶
type DatabaseSQLVulnerabilityAssessmentExecuteScanClientExecuteResponse struct { }
DatabaseSQLVulnerabilityAssessmentExecuteScanClientExecuteResponse contains the response from method DatabaseSQLVulnerabilityAssessmentExecuteScanClient.BeginExecute.
type DatabaseSQLVulnerabilityAssessmentRuleBaseline ¶
type DatabaseSQLVulnerabilityAssessmentRuleBaseline struct { // Resource properties. Properties *DatabaseSQLVulnerabilityAssessmentRuleBaselineProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineResource. SystemData *SystemData // READ-ONLY; Resource type. Type *string }
DatabaseSQLVulnerabilityAssessmentRuleBaseline - A database sql vulnerability assessment rule baseline.
func (DatabaseSQLVulnerabilityAssessmentRuleBaseline) MarshalJSON ¶
func (d DatabaseSQLVulnerabilityAssessmentRuleBaseline) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseSQLVulnerabilityAssessmentRuleBaseline.
func (*DatabaseSQLVulnerabilityAssessmentRuleBaseline) UnmarshalJSON ¶
func (d *DatabaseSQLVulnerabilityAssessmentRuleBaseline) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseSQLVulnerabilityAssessmentRuleBaseline.
type DatabaseSQLVulnerabilityAssessmentRuleBaselineInput ¶
type DatabaseSQLVulnerabilityAssessmentRuleBaselineInput struct { // Resource properties. Properties *DatabaseSQLVulnerabilityAssessmentRuleBaselineInputProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineInputResource. SystemData *SystemData // READ-ONLY; Resource type. Type *string }
DatabaseSQLVulnerabilityAssessmentRuleBaselineInput - A database sql vulnerability assessment rule baseline input.
func (DatabaseSQLVulnerabilityAssessmentRuleBaselineInput) MarshalJSON ¶
func (d DatabaseSQLVulnerabilityAssessmentRuleBaselineInput) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseSQLVulnerabilityAssessmentRuleBaselineInput.
func (*DatabaseSQLVulnerabilityAssessmentRuleBaselineInput) UnmarshalJSON ¶
func (d *DatabaseSQLVulnerabilityAssessmentRuleBaselineInput) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseSQLVulnerabilityAssessmentRuleBaselineInput.
type DatabaseSQLVulnerabilityAssessmentRuleBaselineInputProperties ¶
type DatabaseSQLVulnerabilityAssessmentRuleBaselineInputProperties struct { // REQUIRED; The latest scan flag LatestScan *bool // REQUIRED; The rule baseline result Results [][]*string }
DatabaseSQLVulnerabilityAssessmentRuleBaselineInputProperties - Properties of a database Sql Vulnerability Assessment rule baseline.
func (DatabaseSQLVulnerabilityAssessmentRuleBaselineInputProperties) MarshalJSON ¶
func (d DatabaseSQLVulnerabilityAssessmentRuleBaselineInputProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseSQLVulnerabilityAssessmentRuleBaselineInputProperties.
func (*DatabaseSQLVulnerabilityAssessmentRuleBaselineInputProperties) UnmarshalJSON ¶
func (d *DatabaseSQLVulnerabilityAssessmentRuleBaselineInputProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseSQLVulnerabilityAssessmentRuleBaselineInputProperties.
type DatabaseSQLVulnerabilityAssessmentRuleBaselineListInput ¶
type DatabaseSQLVulnerabilityAssessmentRuleBaselineListInput struct { // Resource properties. Properties *DatabaseSQLVulnerabilityAssessmentRuleBaselineListInputProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputResource. SystemData *SystemData // READ-ONLY; Resource type. Type *string }
DatabaseSQLVulnerabilityAssessmentRuleBaselineListInput - A database sql vulnerability assessment rule baseline list input.
func (DatabaseSQLVulnerabilityAssessmentRuleBaselineListInput) MarshalJSON ¶
func (d DatabaseSQLVulnerabilityAssessmentRuleBaselineListInput) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseSQLVulnerabilityAssessmentRuleBaselineListInput.
func (*DatabaseSQLVulnerabilityAssessmentRuleBaselineListInput) UnmarshalJSON ¶
func (d *DatabaseSQLVulnerabilityAssessmentRuleBaselineListInput) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseSQLVulnerabilityAssessmentRuleBaselineListInput.
type DatabaseSQLVulnerabilityAssessmentRuleBaselineListInputProperties ¶
type DatabaseSQLVulnerabilityAssessmentRuleBaselineListInputProperties struct { // REQUIRED; The latest scan flag LatestScan *bool // REQUIRED; The rule baseline result list Results map[string][][]*string }
DatabaseSQLVulnerabilityAssessmentRuleBaselineListInputProperties - Properties of a database Sql Vulnerability Assessment rule baseline.
func (DatabaseSQLVulnerabilityAssessmentRuleBaselineListInputProperties) MarshalJSON ¶
func (d DatabaseSQLVulnerabilityAssessmentRuleBaselineListInputProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseSQLVulnerabilityAssessmentRuleBaselineListInputProperties.
func (*DatabaseSQLVulnerabilityAssessmentRuleBaselineListInputProperties) UnmarshalJSON ¶
func (d *DatabaseSQLVulnerabilityAssessmentRuleBaselineListInputProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseSQLVulnerabilityAssessmentRuleBaselineListInputProperties.
type DatabaseSQLVulnerabilityAssessmentRuleBaselineListResult ¶
type DatabaseSQLVulnerabilityAssessmentRuleBaselineListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*DatabaseSQLVulnerabilityAssessmentRuleBaseline }
DatabaseSQLVulnerabilityAssessmentRuleBaselineListResult - A list of SQL Vulnerability Assessments rule baseline.
func (DatabaseSQLVulnerabilityAssessmentRuleBaselineListResult) MarshalJSON ¶
func (d DatabaseSQLVulnerabilityAssessmentRuleBaselineListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseSQLVulnerabilityAssessmentRuleBaselineListResult.
func (*DatabaseSQLVulnerabilityAssessmentRuleBaselineListResult) UnmarshalJSON ¶
func (d *DatabaseSQLVulnerabilityAssessmentRuleBaselineListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseSQLVulnerabilityAssessmentRuleBaselineListResult.
type DatabaseSQLVulnerabilityAssessmentRuleBaselineProperties ¶
type DatabaseSQLVulnerabilityAssessmentRuleBaselineProperties struct { // REQUIRED; The rule baseline result Results [][]*string }
DatabaseSQLVulnerabilityAssessmentRuleBaselineProperties - Properties of a database Sql Vulnerability Assessment rule baseline.
func (DatabaseSQLVulnerabilityAssessmentRuleBaselineProperties) MarshalJSON ¶
func (d DatabaseSQLVulnerabilityAssessmentRuleBaselineProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseSQLVulnerabilityAssessmentRuleBaselineProperties.
func (*DatabaseSQLVulnerabilityAssessmentRuleBaselineProperties) UnmarshalJSON ¶
func (d *DatabaseSQLVulnerabilityAssessmentRuleBaselineProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseSQLVulnerabilityAssessmentRuleBaselineProperties.
type DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient ¶
type DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient struct {
// contains filtered or unexported fields
}
DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient contains the methods for the DatabaseSQLVulnerabilityAssessmentRuleBaselines group. Don't use this type directly, use NewDatabaseSQLVulnerabilityAssessmentRuleBaselinesClient() instead.
func NewDatabaseSQLVulnerabilityAssessmentRuleBaselinesClient ¶
func NewDatabaseSQLVulnerabilityAssessmentRuleBaselinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient, error)
NewDatabaseSQLVulnerabilityAssessmentRuleBaselinesClient creates a new instance of DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient 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 (*DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdate ¶
func (client *DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, baselineName BaselineName, ruleID string, parameters DatabaseSQLVulnerabilityAssessmentRuleBaselineInput, options *DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions) (DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse, 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 2022-11-01-preview
- resourceGroupName - The name of the resource group 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.
- ruleID - The vulnerability assessment rule ID.
- parameters - The requested rule baseline resource.
- options - DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions contains the optional parameters for the DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineCreate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewDatabaseSQLVulnerabilityAssessmentRuleBaselinesClient().CreateOrUpdate(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", armsql.VulnerabilityAssessmentNameDefault, armsql.BaselineNameDefault, "VA1001", armsql.DatabaseSQLVulnerabilityAssessmentRuleBaselineInput{ Properties: &armsql.DatabaseSQLVulnerabilityAssessmentRuleBaselineInputProperties{ LatestScan: to.Ptr(false), Results: [][]*string{ { to.Ptr("userA"), to.Ptr("SELECT")}, { to.Ptr("userB"), to.Ptr("SELECT")}, { to.Ptr("userC"), to.Ptr("SELECT")}}, }, }, 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.DatabaseSQLVulnerabilityAssessmentRuleBaseline = armsql.DatabaseSQLVulnerabilityAssessmentRuleBaseline{ // Name: to.Ptr("Scan123"), // 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/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1001"), // Properties: &armsql.DatabaseSQLVulnerabilityAssessmentRuleBaselineProperties{ // Results: [][]*string{ // []*string{ // to.Ptr("userA"), // to.Ptr("SELECT")}, // []*string{ // to.Ptr("userB"), // to.Ptr("SELECT")}, // []*string{ // to.Ptr("userC"), // to.Ptr("SELECT")}}, // }, // }
Output:
func (*DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient) Delete ¶
func (client *DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, baselineName BaselineName, ruleID string, options *DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientDeleteOptions) (DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientDeleteResponse, error)
Delete - Removes the database's vulnerability assessment rule baseline. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-11-01-preview
- resourceGroupName - The name of the resource group 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.
- ruleID - The vulnerability assessment rule ID.
- options - DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientDeleteOptions contains the optional parameters for the DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewDatabaseSQLVulnerabilityAssessmentRuleBaselinesClient().Delete(ctx, "vulnerabilityaseessmenttest-4711", "vulnerabilityaseessmenttest-6411", "testdb", armsql.VulnerabilityAssessmentNameDefault, armsql.BaselineNameDefault, "VA1001", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient) Get ¶
func (client *DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, baselineName BaselineName, ruleID string, options *DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientGetOptions) (DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientGetResponse, error)
Get - Gets a database's sql vulnerability assessment rule baseline. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-11-01-preview
- resourceGroupName - The name of the resource group 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.
- ruleID - The vulnerability assessment rule ID.
- options - DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientGetOptions contains the optional parameters for the DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewDatabaseSQLVulnerabilityAssessmentRuleBaselinesClient().Get(ctx, "vulnerabilityaseessmenttest-4711", "vulnerabilityaseessmenttest-6411", "testdb", armsql.VulnerabilityAssessmentNameDefault, armsql.BaselineNameDefault, "VA1001", 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.DatabaseSQLVulnerabilityAssessmentRuleBaseline = armsql.DatabaseSQLVulnerabilityAssessmentRuleBaseline{ // Name: to.Ptr("VA1001"), // Type: to.Ptr("Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselineRules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1001"), // Properties: &armsql.DatabaseSQLVulnerabilityAssessmentRuleBaselineProperties{ // Results: [][]*string{ // []*string{ // to.Ptr("userA"), // to.Ptr("SELECT")}, // []*string{ // to.Ptr("userB"), // to.Ptr("SELECT")}, // []*string{ // to.Ptr("userC"), // to.Ptr("SELECT")}}, // }, // }
Output:
func (*DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient) NewListByBaselinePager ¶
func (client *DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient) NewListByBaselinePager(resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, baselineName BaselineName, options *DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientListByBaselineOptions) *runtime.Pager[DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientListByBaselineResponse]
NewListByBaselinePager - Gets a list of database's sql vulnerability assessment rule baselines.
Generated from API version 2022-11-01-preview
- resourceGroupName - The name of the resource group 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 - DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientListByBaselineOptions contains the optional parameters for the DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient.NewListByBaselinePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByBaseline.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewDatabaseSQLVulnerabilityAssessmentRuleBaselinesClient().NewListByBaselinePager("vulnerabilityaseessmenttest-4711", "vulnerabilityaseessmenttest-6411", "testdb", armsql.VulnerabilityAssessmentNameDefault, armsql.BaselineNameDefault, 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.DatabaseSQLVulnerabilityAssessmentRuleBaselineListResult = armsql.DatabaseSQLVulnerabilityAssessmentRuleBaselineListResult{ // Value: []*armsql.DatabaseSQLVulnerabilityAssessmentRuleBaseline{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1001"), // Properties: &armsql.DatabaseSQLVulnerabilityAssessmentRuleBaselineProperties{ // Results: [][]*string{ // []*string{ // to.Ptr("userA"), // to.Ptr("SELECT")}, // []*string{ // to.Ptr("userB"), // to.Ptr("SELECT")}, // []*string{ // to.Ptr("userC"), // to.Ptr("SELECT")}}, // }, // }, // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1002"), // Properties: &armsql.DatabaseSQLVulnerabilityAssessmentRuleBaselineProperties{ // Results: [][]*string{ // []*string{ // to.Ptr("userA"), // to.Ptr("SELECT")}, // []*string{ // to.Ptr("userB"), // to.Ptr("SELECT")}, // []*string{ // to.Ptr("userC"), // to.Ptr("SELECT")}}, // }, // }}, // } }
Output:
type DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions ¶
type DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions struct { }
DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions contains the optional parameters for the DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate method.
type DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse ¶
type DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse struct { // A database sql vulnerability assessment rule baseline. DatabaseSQLVulnerabilityAssessmentRuleBaseline }
DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse contains the response from method DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate.
type DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientDeleteOptions ¶
type DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientDeleteOptions struct { }
DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientDeleteOptions contains the optional parameters for the DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient.Delete method.
type DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientDeleteResponse ¶
type DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientDeleteResponse struct { }
DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientDeleteResponse contains the response from method DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient.Delete.
type DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientGetOptions ¶
type DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientGetOptions struct { }
DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientGetOptions contains the optional parameters for the DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient.Get method.
type DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientGetResponse ¶
type DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientGetResponse struct { // A database sql vulnerability assessment rule baseline. DatabaseSQLVulnerabilityAssessmentRuleBaseline }
DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientGetResponse contains the response from method DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient.Get.
type DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientListByBaselineOptions ¶
type DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientListByBaselineOptions struct { }
DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientListByBaselineOptions contains the optional parameters for the DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient.NewListByBaselinePager method.
type DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientListByBaselineResponse ¶
type DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientListByBaselineResponse struct { // A list of SQL Vulnerability Assessments rule baseline. DatabaseSQLVulnerabilityAssessmentRuleBaselineListResult }
DatabaseSQLVulnerabilityAssessmentRuleBaselinesClientListByBaselineResponse contains the response from method DatabaseSQLVulnerabilityAssessmentRuleBaselinesClient.NewListByBaselinePager.
type DatabaseSQLVulnerabilityAssessmentScanResultClient ¶
type DatabaseSQLVulnerabilityAssessmentScanResultClient struct {
// contains filtered or unexported fields
}
DatabaseSQLVulnerabilityAssessmentScanResultClient contains the methods for the DatabaseSQLVulnerabilityAssessmentScanResult group. Don't use this type directly, use NewDatabaseSQLVulnerabilityAssessmentScanResultClient() instead.
func NewDatabaseSQLVulnerabilityAssessmentScanResultClient ¶
func NewDatabaseSQLVulnerabilityAssessmentScanResultClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseSQLVulnerabilityAssessmentScanResultClient, error)
NewDatabaseSQLVulnerabilityAssessmentScanResultClient creates a new instance of DatabaseSQLVulnerabilityAssessmentScanResultClient 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 (*DatabaseSQLVulnerabilityAssessmentScanResultClient) Get ¶
func (client *DatabaseSQLVulnerabilityAssessmentScanResultClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName SQLVulnerabilityAssessmentName, scanID string, scanResultID string, options *DatabaseSQLVulnerabilityAssessmentScanResultClientGetOptions) (DatabaseSQLVulnerabilityAssessmentScanResultClientGetResponse, 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 2022-11-01-preview
- resourceGroupName - The name of the resource group 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 SQL Vulnerability Assessment.
- scanID - The scan id of the SQL Vulnerability Assessment scan to retrieve result from.
- scanResultID - The scan result id of the specific result to retrieve.
- options - DatabaseSQLVulnerabilityAssessmentScanResultClientGetOptions contains the optional parameters for the DatabaseSQLVulnerabilityAssessmentScanResultClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScansResults.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewDatabaseSQLVulnerabilityAssessmentScanResultClient().Get(ctx, "vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", "master", armsql.SQLVulnerabilityAssessmentNameDefault, "scanId1", "VA1234", 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.VulnerabilityAssessmentScanResults = armsql.VulnerabilityAssessmentScanResults{ // Name: to.Ptr("VA1234"), // Type: to.Ptr("Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans/scanResults"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/Default/scans/scanId1/scanResults/VA1234"), // Properties: &armsql.VulnerabilityAssessmentScanResultProperties{ // IsTrimmed: to.Ptr(false), // QueryResults: [][]*string{ // []*string{ // to.Ptr("a1"), // to.Ptr("a2"), // to.Ptr("a3")}, // []*string{ // to.Ptr("b1"), // to.Ptr("b2"), // to.Ptr("b3")}}, // Remediation: &armsql.Remediation{ // Description: to.Ptr("Remove users"), // Automated: to.Ptr(false), // Scripts: []*string{ // to.Ptr("drop user a"), // to.Ptr("drop user b")}, // }, // RuleID: to.Ptr("VA1234"), // RuleMetadata: &armsql.VaRule{ // Description: to.Ptr("This is an example check"), // BenchmarkReferences: []*armsql.BenchmarkReference{ // { // Benchmark: to.Ptr("fedramp"), // Reference: to.Ptr("v1"), // }}, // Category: to.Ptr("information"), // QueryCheck: &armsql.QueryCheck{ // ColumnNames: []*string{ // to.Ptr("col1"), // to.Ptr("col2"), // to.Ptr("col3")}, // ExpectedResult: [][]*string{ // }, // Query: to.Ptr("Select a1,a2, a3"), // }, // Rationale: to.Ptr("This is important"), // RuleID: to.Ptr("VA1234"), // RuleType: to.Ptr(armsql.RuleTypeNegativeList), // Severity: to.Ptr(armsql.RuleSeverityInformational), // Title: to.Ptr("This is the title"), // }, // Status: to.Ptr(armsql.RuleStatusNonFinding), // }, // }
Output:
func (*DatabaseSQLVulnerabilityAssessmentScanResultClient) NewListByScanPager ¶
func (client *DatabaseSQLVulnerabilityAssessmentScanResultClient) NewListByScanPager(resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName SQLVulnerabilityAssessmentName, scanID string, options *DatabaseSQLVulnerabilityAssessmentScanResultClientListByScanOptions) *runtime.Pager[DatabaseSQLVulnerabilityAssessmentScanResultClientListByScanResponse]
NewListByScanPager - Gets a vulnerability assessment scan record of a database.
Generated from API version 2022-11-01-preview
- resourceGroupName - The name of the resource group 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 SQL Vulnerability Assessment.
- scanID - The scan id of the SQL Vulnerability Assessment scan to retrieve result from.
- options - DatabaseSQLVulnerabilityAssessmentScanResultClientListByScanOptions contains the optional parameters for the DatabaseSQLVulnerabilityAssessmentScanResultClient.NewListByScanPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentListScansResults.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewDatabaseSQLVulnerabilityAssessmentScanResultClient().NewListByScanPager("vulnerabilityassessmenttest-4711", "testsvr", "master", armsql.SQLVulnerabilityAssessmentNameDefault, "scanId1", 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.VulnerabilityAssessmentScanListResult = armsql.VulnerabilityAssessmentScanListResult{ // Value: []*armsql.VulnerabilityAssessmentScanResults{ // { // Name: to.Ptr("VA1234"), // Type: to.Ptr("Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/scans/scanResults"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/testsvr/databases/master/sqlVulnerabilityAssessments/Default/scans/scanId1/scanResults/VA1234"), // Properties: &armsql.VulnerabilityAssessmentScanResultProperties{ // IsTrimmed: to.Ptr(false), // QueryResults: [][]*string{ // []*string{ // to.Ptr("a1"), // to.Ptr("a2"), // to.Ptr("a3")}, // []*string{ // to.Ptr("b1"), // to.Ptr("b2"), // to.Ptr("b3")}}, // Remediation: &armsql.Remediation{ // Description: to.Ptr("Remove users"), // Automated: to.Ptr(false), // Scripts: []*string{ // to.Ptr("drop user a"), // to.Ptr("drop user b")}, // }, // RuleID: to.Ptr("VA1234"), // RuleMetadata: &armsql.VaRule{ // Description: to.Ptr("This is an example check"), // BenchmarkReferences: []*armsql.BenchmarkReference{ // { // Benchmark: to.Ptr("fedramp"), // Reference: to.Ptr("v1"), // }}, // Category: to.Ptr("information"), // QueryCheck: &armsql.QueryCheck{ // ColumnNames: []*string{ // to.Ptr("col1"), // to.Ptr("col2"), // to.Ptr("col3")}, // ExpectedResult: [][]*string{ // }, // Query: to.Ptr("Select a1,a2, a3"), // }, // Rationale: to.Ptr("This is important"), // RuleID: to.Ptr("VA1234"), // RuleType: to.Ptr(armsql.RuleTypeNegativeList), // Severity: to.Ptr(armsql.RuleSeverityInformational), // Title: to.Ptr("This is the title"), // }, // Status: to.Ptr(armsql.RuleStatusNonFinding), // }, // }, // { // Name: to.Ptr("VA2341"), // Type: to.Ptr("Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/scans/scanResults"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/testsvr/databases/master/sqlVulnerabilityAssessments/Default/scans/scanId1/scanResults/VA2341"), // Properties: &armsql.VulnerabilityAssessmentScanResultProperties{ // IsTrimmed: to.Ptr(false), // QueryResults: [][]*string{ // []*string{ // to.Ptr("a1"), // to.Ptr("a2"), // to.Ptr("a3")}, // []*string{ // to.Ptr("b1"), // to.Ptr("b2"), // to.Ptr("b3")}}, // Remediation: &armsql.Remediation{ // Description: to.Ptr("Remove users"), // Automated: to.Ptr(false), // Scripts: []*string{ // to.Ptr("drop user a"), // to.Ptr("drop user b")}, // }, // RuleID: to.Ptr("VA2341"), // RuleMetadata: &armsql.VaRule{ // Description: to.Ptr("This is an example check"), // BenchmarkReferences: []*armsql.BenchmarkReference{ // { // Benchmark: to.Ptr("fedramp"), // Reference: to.Ptr("v1"), // }}, // Category: to.Ptr("information"), // QueryCheck: &armsql.QueryCheck{ // ColumnNames: []*string{ // to.Ptr("col1"), // to.Ptr("col2"), // to.Ptr("col3")}, // ExpectedResult: [][]*string{ // }, // Query: to.Ptr("Select a1,a2, a3"), // }, // Rationale: to.Ptr("This is important"), // RuleID: to.Ptr("VA1234"), // RuleType: to.Ptr(armsql.RuleTypeNegativeList), // Severity: to.Ptr(armsql.RuleSeverityInformational), // Title: to.Ptr("This is the title"), // }, // Status: to.Ptr(armsql.RuleStatusNonFinding), // }, // }}, // } }
Output:
type DatabaseSQLVulnerabilityAssessmentScanResultClientGetOptions ¶
type DatabaseSQLVulnerabilityAssessmentScanResultClientGetOptions struct { }
DatabaseSQLVulnerabilityAssessmentScanResultClientGetOptions contains the optional parameters for the DatabaseSQLVulnerabilityAssessmentScanResultClient.Get method.
type DatabaseSQLVulnerabilityAssessmentScanResultClientGetResponse ¶
type DatabaseSQLVulnerabilityAssessmentScanResultClientGetResponse struct {
VulnerabilityAssessmentScanResults
}
DatabaseSQLVulnerabilityAssessmentScanResultClientGetResponse contains the response from method DatabaseSQLVulnerabilityAssessmentScanResultClient.Get.
type DatabaseSQLVulnerabilityAssessmentScanResultClientListByScanOptions ¶
type DatabaseSQLVulnerabilityAssessmentScanResultClientListByScanOptions struct { }
DatabaseSQLVulnerabilityAssessmentScanResultClientListByScanOptions contains the optional parameters for the DatabaseSQLVulnerabilityAssessmentScanResultClient.NewListByScanPager method.
type DatabaseSQLVulnerabilityAssessmentScanResultClientListByScanResponse ¶
type DatabaseSQLVulnerabilityAssessmentScanResultClientListByScanResponse struct { // A list of vulnerability assessment scan results. VulnerabilityAssessmentScanListResult }
DatabaseSQLVulnerabilityAssessmentScanResultClientListByScanResponse contains the response from method DatabaseSQLVulnerabilityAssessmentScanResultClient.NewListByScanPager.
type DatabaseSQLVulnerabilityAssessmentScansClient ¶
type DatabaseSQLVulnerabilityAssessmentScansClient struct {
// contains filtered or unexported fields
}
DatabaseSQLVulnerabilityAssessmentScansClient contains the methods for the DatabaseSQLVulnerabilityAssessmentScans group. Don't use this type directly, use NewDatabaseSQLVulnerabilityAssessmentScansClient() instead.
func NewDatabaseSQLVulnerabilityAssessmentScansClient ¶
func NewDatabaseSQLVulnerabilityAssessmentScansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseSQLVulnerabilityAssessmentScansClient, error)
NewDatabaseSQLVulnerabilityAssessmentScansClient creates a new instance of DatabaseSQLVulnerabilityAssessmentScansClient 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 (*DatabaseSQLVulnerabilityAssessmentScansClient) Get ¶
func (client *DatabaseSQLVulnerabilityAssessmentScansClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, scanID string, options *DatabaseSQLVulnerabilityAssessmentScansClientGetOptions) (DatabaseSQLVulnerabilityAssessmentScansClientGetResponse, error)
Get - Get a database vulnerability assessment scan result. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-11-01-preview
- resourceGroupName - The name of the resource group 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 - DatabaseSQLVulnerabilityAssessmentScansClientGetOptions contains the optional parameters for the DatabaseSQLVulnerabilityAssessmentScansClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScan.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewDatabaseSQLVulnerabilityAssessmentScansClient().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.VulnerabilityAssessmentScanRecordForSQL = armsql.VulnerabilityAssessmentScanRecordForSQL{ // Name: to.Ptr("scan001"), // Type: to.Ptr("Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/scans"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/databases/testdb/sqlVulnerabilityAssessments/default/scans/scan001"), // Properties: &armsql.VulnerabilityAssessmentScanRecordForSQLProperties{ // Database: to.Ptr("testdb"), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.723Z"); return t}()), // HighSeverityFailedRulesCount: to.Ptr[int32](3), // IsBaselineApplied: to.Ptr(false), // LastScanTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.645Z"); return t}()), // LowSeverityFailedRulesCount: to.Ptr[int32](1), // MediumSeverityFailedRulesCount: to.Ptr[int32](2), // ScanID: to.Ptr("scan001"), // Server: to.Ptr("vulnerabilityassessmenttest-6411"), // SQLVersion: to.Ptr("15.0.2000"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.645Z"); return t}()), // State: to.Ptr(armsql.VulnerabilityAssessmentScanStateFailed), // TotalFailedRulesCount: to.Ptr[int32](6), // TotalPassedRulesCount: to.Ptr[int32](20), // TotalRulesCount: to.Ptr[int32](26), // TriggerType: to.Ptr(armsql.VulnerabilityAssessmentScanTriggerTypeRecurring), // }, // }
Output:
func (*DatabaseSQLVulnerabilityAssessmentScansClient) NewListBySQLVulnerabilityAssessmentsPager ¶
func (client *DatabaseSQLVulnerabilityAssessmentScansClient) NewListBySQLVulnerabilityAssessmentsPager(resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *DatabaseSQLVulnerabilityAssessmentScansClientListBySQLVulnerabilityAssessmentsOptions) *runtime.Pager[DatabaseSQLVulnerabilityAssessmentScansClientListBySQLVulnerabilityAssessmentsResponse]
NewListBySQLVulnerabilityAssessmentsPager - Lists the vulnerability assessment scans of a database.
Generated from API version 2022-11-01-preview
- resourceGroupName - The name of the resource group 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 - DatabaseSQLVulnerabilityAssessmentScansClientListBySQLVulnerabilityAssessmentsOptions contains the optional parameters for the DatabaseSQLVulnerabilityAssessmentScansClient.NewListBySQLVulnerabilityAssessmentsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScanRecordsListByDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewDatabaseSQLVulnerabilityAssessmentScansClient().NewListBySQLVulnerabilityAssessmentsPager("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.VulnerabilityAssessmentScanRecordForSQLListResult = armsql.VulnerabilityAssessmentScanRecordForSQLListResult{ // Value: []*armsql.VulnerabilityAssessmentScanRecordForSQL{ // { // Name: to.Ptr("scan001"), // Type: to.Ptr("Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/scans"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/databases/testdb/sqlVulnerabilityAssessments/default/scans/scan001"), // Properties: &armsql.VulnerabilityAssessmentScanRecordForSQLProperties{ // Database: to.Ptr("testdb"), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.723Z"); return t}()), // HighSeverityFailedRulesCount: to.Ptr[int32](3), // IsBaselineApplied: to.Ptr(false), // LastScanTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.645Z"); return t}()), // LowSeverityFailedRulesCount: to.Ptr[int32](1), // MediumSeverityFailedRulesCount: to.Ptr[int32](2), // ScanID: to.Ptr("scan001"), // Server: to.Ptr("vulnerabilityassessmenttest-6411"), // SQLVersion: to.Ptr("15.0.2000"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.645Z"); return t}()), // State: to.Ptr(armsql.VulnerabilityAssessmentScanStateFailed), // TotalFailedRulesCount: to.Ptr[int32](6), // TotalPassedRulesCount: to.Ptr[int32](20), // TotalRulesCount: to.Ptr[int32](26), // TriggerType: to.Ptr(armsql.VulnerabilityAssessmentScanTriggerTypeRecurring), // }, // }, // { // Name: to.Ptr("scan001"), // Type: to.Ptr("Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/scans"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/databases/testdb/sqlVulnerabilityAssessments/default/scans/scan002"), // Properties: &armsql.VulnerabilityAssessmentScanRecordForSQLProperties{ // Database: to.Ptr("testdb"), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.723Z"); return t}()), // HighSeverityFailedRulesCount: to.Ptr[int32](3), // IsBaselineApplied: to.Ptr(false), // LastScanTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.645Z"); return t}()), // LowSeverityFailedRulesCount: to.Ptr[int32](1), // MediumSeverityFailedRulesCount: to.Ptr[int32](2), // ScanID: to.Ptr("scan002"), // Server: to.Ptr("vulnerabilityassessmenttest-6411"), // SQLVersion: to.Ptr("15.0.2000"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.645Z"); return t}()), // State: to.Ptr(armsql.VulnerabilityAssessmentScanStateFailed), // TotalFailedRulesCount: to.Ptr[int32](6), // TotalPassedRulesCount: to.Ptr[int32](20), // TotalRulesCount: to.Ptr[int32](26), // TriggerType: to.Ptr(armsql.VulnerabilityAssessmentScanTriggerTypeRecurring), // }, // }, // { // Name: to.Ptr("scan001"), // Type: to.Ptr("Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/scans"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/databases/testdb/sqlVulnerabilityAssessments/default/scans/scan003"), // Properties: &armsql.VulnerabilityAssessmentScanRecordForSQLProperties{ // Database: to.Ptr("testdb"), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.723Z"); return t}()), // HighSeverityFailedRulesCount: to.Ptr[int32](3), // IsBaselineApplied: to.Ptr(false), // LastScanTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.645Z"); return t}()), // LowSeverityFailedRulesCount: to.Ptr[int32](1), // MediumSeverityFailedRulesCount: to.Ptr[int32](2), // ScanID: to.Ptr("scan003"), // Server: to.Ptr("vulnerabilityassessmenttest-6411"), // SQLVersion: to.Ptr("15.0.2000"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.645Z"); return t}()), // State: to.Ptr(armsql.VulnerabilityAssessmentScanStateFailed), // TotalFailedRulesCount: to.Ptr[int32](6), // TotalPassedRulesCount: to.Ptr[int32](20), // TotalRulesCount: to.Ptr[int32](26), // TriggerType: to.Ptr(armsql.VulnerabilityAssessmentScanTriggerTypeRecurring), // }, // }}, // } }
Output:
type DatabaseSQLVulnerabilityAssessmentScansClientGetOptions ¶
type DatabaseSQLVulnerabilityAssessmentScansClientGetOptions struct { }
DatabaseSQLVulnerabilityAssessmentScansClientGetOptions contains the optional parameters for the DatabaseSQLVulnerabilityAssessmentScansClient.Get method.
type DatabaseSQLVulnerabilityAssessmentScansClientGetResponse ¶
type DatabaseSQLVulnerabilityAssessmentScansClientGetResponse struct { // A vulnerability assessment scan record. VulnerabilityAssessmentScanRecordForSQL }
DatabaseSQLVulnerabilityAssessmentScansClientGetResponse contains the response from method DatabaseSQLVulnerabilityAssessmentScansClient.Get.
type DatabaseSQLVulnerabilityAssessmentScansClientListBySQLVulnerabilityAssessmentsOptions ¶
type DatabaseSQLVulnerabilityAssessmentScansClientListBySQLVulnerabilityAssessmentsOptions struct { }
DatabaseSQLVulnerabilityAssessmentScansClientListBySQLVulnerabilityAssessmentsOptions contains the optional parameters for the DatabaseSQLVulnerabilityAssessmentScansClient.NewListBySQLVulnerabilityAssessmentsPager method.
type DatabaseSQLVulnerabilityAssessmentScansClientListBySQLVulnerabilityAssessmentsResponse ¶
type DatabaseSQLVulnerabilityAssessmentScansClientListBySQLVulnerabilityAssessmentsResponse struct { // A list of vulnerability assessment scan records. VulnerabilityAssessmentScanRecordForSQLListResult }
DatabaseSQLVulnerabilityAssessmentScansClientListBySQLVulnerabilityAssessmentsResponse contains the response from method DatabaseSQLVulnerabilityAssessmentScansClient.NewListBySQLVulnerabilityAssessmentsPager.
type DatabaseSQLVulnerabilityAssessmentsSettingsClient ¶
type DatabaseSQLVulnerabilityAssessmentsSettingsClient struct {
// contains filtered or unexported fields
}
DatabaseSQLVulnerabilityAssessmentsSettingsClient contains the methods for the DatabaseSQLVulnerabilityAssessmentsSettings group. Don't use this type directly, use NewDatabaseSQLVulnerabilityAssessmentsSettingsClient() instead.
func NewDatabaseSQLVulnerabilityAssessmentsSettingsClient ¶
func NewDatabaseSQLVulnerabilityAssessmentsSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatabaseSQLVulnerabilityAssessmentsSettingsClient, error)
NewDatabaseSQLVulnerabilityAssessmentsSettingsClient creates a new instance of DatabaseSQLVulnerabilityAssessmentsSettingsClient 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 (*DatabaseSQLVulnerabilityAssessmentsSettingsClient) Get ¶
func (client *DatabaseSQLVulnerabilityAssessmentsSettingsClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName SQLVulnerabilityAssessmentName, options *DatabaseSQLVulnerabilityAssessmentsSettingsClientGetOptions) (DatabaseSQLVulnerabilityAssessmentsSettingsClientGetResponse, error)
Get - Gets SQL Vulnerability Assessment policy for database. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-11-01-preview
- resourceGroupName - The name of the resource group 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 SQL Vulnerability Assessment.
- options - DatabaseSQLVulnerabilityAssessmentsSettingsClientGetOptions contains the optional parameters for the DatabaseSQLVulnerabilityAssessmentsSettingsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewDatabaseSQLVulnerabilityAssessmentsSettingsClient().Get(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", armsql.SQLVulnerabilityAssessmentNameDefault, 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.VulnerabilityAssessment = armsql.VulnerabilityAssessment{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default"), // Properties: &armsql.VulnerabilityAssessmentPolicyProperties{ // State: to.Ptr(armsql.SQLVulnerabilityAssessmentStateEnabled), // }, // }
Output:
func (*DatabaseSQLVulnerabilityAssessmentsSettingsClient) NewListByDatabasePager ¶
func (client *DatabaseSQLVulnerabilityAssessmentsSettingsClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *DatabaseSQLVulnerabilityAssessmentsSettingsClientListByDatabaseOptions) *runtime.Pager[DatabaseSQLVulnerabilityAssessmentsSettingsClientListByDatabaseResponse]
NewListByDatabasePager - Lists SQL Vulnerability Assessment policies associated with a database.
Generated from API version 2022-11-01-preview
- resourceGroupName - The name of the resource group 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 - DatabaseSQLVulnerabilityAssessmentsSettingsClientListByDatabaseOptions contains the optional parameters for the DatabaseSQLVulnerabilityAssessmentsSettingsClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/DatabaseSqlVulnerabilityAssessmentListByDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewDatabaseSQLVulnerabilityAssessmentsSettingsClient().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.VulnerabilityAssessmentListResult = armsql.VulnerabilityAssessmentListResult{ // Value: []*armsql.VulnerabilityAssessment{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/databases/testdb/sqlVulnerabilityAssessments/default"), // Properties: &armsql.VulnerabilityAssessmentPolicyProperties{ // State: to.Ptr(armsql.SQLVulnerabilityAssessmentStateEnabled), // }, // }}, // } }
Output:
type DatabaseSQLVulnerabilityAssessmentsSettingsClientGetOptions ¶
type DatabaseSQLVulnerabilityAssessmentsSettingsClientGetOptions struct { }
DatabaseSQLVulnerabilityAssessmentsSettingsClientGetOptions contains the optional parameters for the DatabaseSQLVulnerabilityAssessmentsSettingsClient.Get method.
type DatabaseSQLVulnerabilityAssessmentsSettingsClientGetResponse ¶
type DatabaseSQLVulnerabilityAssessmentsSettingsClientGetResponse struct { // A SQL Vulnerability Assessment. VulnerabilityAssessment }
DatabaseSQLVulnerabilityAssessmentsSettingsClientGetResponse contains the response from method DatabaseSQLVulnerabilityAssessmentsSettingsClient.Get.
type DatabaseSQLVulnerabilityAssessmentsSettingsClientListByDatabaseOptions ¶
type DatabaseSQLVulnerabilityAssessmentsSettingsClientListByDatabaseOptions struct { }
DatabaseSQLVulnerabilityAssessmentsSettingsClientListByDatabaseOptions contains the optional parameters for the DatabaseSQLVulnerabilityAssessmentsSettingsClient.NewListByDatabasePager method.
type DatabaseSQLVulnerabilityAssessmentsSettingsClientListByDatabaseResponse ¶
type DatabaseSQLVulnerabilityAssessmentsSettingsClientListByDatabaseResponse struct { // A list of SQL Vulnerability Assessments. VulnerabilityAssessmentListResult }
DatabaseSQLVulnerabilityAssessmentsSettingsClientListByDatabaseResponse contains the response from method DatabaseSQLVulnerabilityAssessmentsSettingsClient.NewListByDatabasePager.
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 ¶
func (d DatabaseSchema) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseSchema.
func (*DatabaseSchema) UnmarshalJSON ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseSchemaGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseSchemaListByDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type DatabaseSchemasClientGetOptions struct { }
DatabaseSchemasClientGetOptions contains the optional parameters for the DatabaseSchemasClient.Get method.
type DatabaseSchemasClientGetResponse ¶
type DatabaseSchemasClientGetResponse struct { // A database schema resource. DatabaseSchema }
DatabaseSchemasClientGetResponse contains the response from method DatabaseSchemasClient.Get.
type DatabaseSchemasClientListByDatabaseOptions ¶
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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseSecurityAlertCreateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseSecurityAlertCreateMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseSecurityAlertGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseSecurityAlertListByDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type DatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions struct { }
DatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions contains the optional parameters for the DatabaseSecurityAlertPoliciesClient.CreateOrUpdate method.
type DatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse ¶
type DatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse struct { // A database security alert policy. DatabaseSecurityAlertPolicy }
DatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse contains the response from method DatabaseSecurityAlertPoliciesClient.CreateOrUpdate.
type DatabaseSecurityAlertPoliciesClientGetOptions ¶
type DatabaseSecurityAlertPoliciesClientGetOptions struct { }
DatabaseSecurityAlertPoliciesClientGetOptions contains the optional parameters for the DatabaseSecurityAlertPoliciesClient.Get method.
type DatabaseSecurityAlertPoliciesClientGetResponse ¶
type DatabaseSecurityAlertPoliciesClientGetResponse struct { // A database security alert policy. DatabaseSecurityAlertPolicy }
DatabaseSecurityAlertPoliciesClientGetResponse contains the response from method DatabaseSecurityAlertPoliciesClient.Get.
type DatabaseSecurityAlertPoliciesClientListByDatabaseOptions ¶
type DatabaseSecurityAlertPoliciesClientListByDatabaseOptions struct { }
DatabaseSecurityAlertPoliciesClientListByDatabaseOptions contains the optional parameters for the DatabaseSecurityAlertPoliciesClient.NewListByDatabasePager method.
type DatabaseSecurityAlertPoliciesClientListByDatabaseResponse ¶
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 ¶
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 ¶
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 ¶
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 ¶
func (d DatabaseTableProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseTableProperties.
func (*DatabaseTableProperties) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseTableGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseTableListBySchema.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type DatabaseTablesClientGetOptions struct { }
DatabaseTablesClientGetOptions contains the optional parameters for the DatabaseTablesClient.Get method.
type DatabaseTablesClientGetResponse ¶
type DatabaseTablesClientGetResponse struct { // A database table resource. DatabaseTable }
DatabaseTablesClientGetResponse contains the response from method DatabaseTablesClient.Get.
type DatabaseTablesClientListBySchemaOptions ¶
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 ¶
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 ¶
func (d *DatabaseUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseUpdate.
type DatabaseUpdateProperties ¶
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 azure key vault URI of the database if it's configured with per Database Customer Managed Keys. EncryptionProtector *string // The flag to enable or disable auto rotation of database encryption protector AKV key. EncryptionProtectorAutoRotation *bool // The Client id used for cross tenant per database CMK scenario FederatedClientID *string // Specifies the behavior when monthly free limits are exhausted for the free database. // AutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month. // BillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be billed. FreeLimitExhaustionBehavior *FreeLimitExhaustionBehavior // 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 resource ids of the user assigned identities to use Keys map[string]*DatabaseKey // 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 // Whether or not customer controlled manual cutover needs to be done during Update Database operation to Hyperscale tier. // This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to // Hyperscale tier. // When manualCutover is specified, the scaling operation will wait for user input to trigger cutover to Hyperscale database. // To trigger cutover, please provide 'performCutover' parameter when the Scaling operation is in Waiting state. ManualCutover *bool // The max size of the database expressed in bytes. MaxSizeBytes *int64 // Minimal capacity that database will always have allocated, if not paused MinCapacity *float64 // To trigger customer controlled manual cutover during the wait state while Scaling operation is in progress. // This property parameter is only applicable for scaling operations that are initiated along with 'manualCutover' parameter. // This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to // Hyperscale tier is already in progress. // When performCutover is specified, the scaling operation will trigger cutover and perform role-change to Hyperscale database. PerformCutover *bool // Type of enclave requested on the database i.e. Default or VBS enclaves. PreferredEnclaveType *AlwaysEncryptedEnclaveType // 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, Named and Standby. 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 the database uses free monthly limits. Allowed on one database in a subscription. UseFreeLimit *bool // 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 ¶
func (d DatabaseUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseUpdateProperties.
func (*DatabaseUpdateProperties) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
func (d DatabaseUsageProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseUsageProperties.
func (*DatabaseUsageProperties) UnmarshalJSON ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetDatabaseUsages.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type DatabaseUsagesClientListByDatabaseOptions struct { }
DatabaseUsagesClientListByDatabaseOptions contains the optional parameters for the DatabaseUsagesClient.NewListByDatabasePager method.
type DatabaseUsagesClientListByDatabaseResponse ¶
type DatabaseUsagesClientListByDatabaseResponse struct { // A list of database usage metrics. DatabaseUsageListResult }
DatabaseUsagesClientListByDatabaseResponse contains the response from method DatabaseUsagesClient.NewListByDatabasePager.
type DatabaseUserIdentity ¶
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 ¶
func (d DatabaseUserIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseUserIdentity.
func (*DatabaseUserIdentity) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
func (d DatabaseVulnerabilityAssessmentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseVulnerabilityAssessmentProperties.
func (*DatabaseVulnerabilityAssessmentProperties) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineCreate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions struct { }
DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate method.
type DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse ¶
type DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse struct { // A database vulnerability assessment rule baseline. DatabaseVulnerabilityAssessmentRuleBaseline }
DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse contains the response from method DatabaseVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate.
type DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions ¶
type DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions struct { }
DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentRuleBaselinesClient.Delete method.
type DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse ¶
type DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse struct { }
DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse contains the response from method DatabaseVulnerabilityAssessmentRuleBaselinesClient.Delete.
type DatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions ¶
type DatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions struct { }
DatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentRuleBaselinesClient.Get method.
type DatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse ¶
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 ¶
func (d DatabaseVulnerabilityAssessmentScanExportProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseVulnerabilityAssessmentScanExportProperties.
func (*DatabaseVulnerabilityAssessmentScanExportProperties) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentScansExecute.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentScanExport.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type DatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentScansClient.BeginInitiateScan method.
type DatabaseVulnerabilityAssessmentScansClientExportOptions ¶
type DatabaseVulnerabilityAssessmentScansClientExportOptions struct { }
DatabaseVulnerabilityAssessmentScansClientExportOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentScansClient.Export method.
type DatabaseVulnerabilityAssessmentScansClientExportResponse ¶
type DatabaseVulnerabilityAssessmentScansClientExportResponse struct { // A database Vulnerability Assessment scan export resource. DatabaseVulnerabilityAssessmentScansExport }
DatabaseVulnerabilityAssessmentScansClientExportResponse contains the response from method DatabaseVulnerabilityAssessmentScansClient.Export.
type DatabaseVulnerabilityAssessmentScansClientGetOptions ¶
type DatabaseVulnerabilityAssessmentScansClientGetOptions struct { }
DatabaseVulnerabilityAssessmentScansClientGetOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentScansClient.Get method.
type DatabaseVulnerabilityAssessmentScansClientGetResponse ¶
type DatabaseVulnerabilityAssessmentScansClientGetResponse struct { // A vulnerability assessment scan record. VulnerabilityAssessmentScanRecord }
DatabaseVulnerabilityAssessmentScansClientGetResponse contains the response from method DatabaseVulnerabilityAssessmentScansClient.Get.
type DatabaseVulnerabilityAssessmentScansClientInitiateScanResponse ¶
type DatabaseVulnerabilityAssessmentScansClientInitiateScanResponse struct { }
DatabaseVulnerabilityAssessmentScansClientInitiateScanResponse contains the response from method DatabaseVulnerabilityAssessmentScansClient.BeginInitiateScan.
type DatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions ¶
type DatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions struct { }
DatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentScansClient.NewListByDatabasePager method.
type DatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentCreateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentCreateStorageAccessKeyMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentCreateContainerSasKeyMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentListByDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type DatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions struct { }
DatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentsClient.CreateOrUpdate method.
type DatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse ¶
type DatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse struct { // A database vulnerability assessment. DatabaseVulnerabilityAssessment }
DatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse contains the response from method DatabaseVulnerabilityAssessmentsClient.CreateOrUpdate.
type DatabaseVulnerabilityAssessmentsClientDeleteOptions ¶
type DatabaseVulnerabilityAssessmentsClientDeleteOptions struct { }
DatabaseVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentsClient.Delete method.
type DatabaseVulnerabilityAssessmentsClientDeleteResponse ¶
type DatabaseVulnerabilityAssessmentsClientDeleteResponse struct { }
DatabaseVulnerabilityAssessmentsClientDeleteResponse contains the response from method DatabaseVulnerabilityAssessmentsClient.Delete.
type DatabaseVulnerabilityAssessmentsClientGetOptions ¶
type DatabaseVulnerabilityAssessmentsClientGetOptions struct { }
DatabaseVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentsClient.Get method.
type DatabaseVulnerabilityAssessmentsClientGetResponse ¶
type DatabaseVulnerabilityAssessmentsClientGetResponse struct { // A database vulnerability assessment. DatabaseVulnerabilityAssessment }
DatabaseVulnerabilityAssessmentsClientGetResponse contains the response from method DatabaseVulnerabilityAssessmentsClient.Get.
type DatabaseVulnerabilityAssessmentsClientListByDatabaseOptions ¶
type DatabaseVulnerabilityAssessmentsClientListByDatabaseOptions struct { }
DatabaseVulnerabilityAssessmentsClientListByDatabaseOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentsClient.NewListByDatabasePager method.
type DatabaseVulnerabilityAssessmentsClientListByDatabaseResponse ¶
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 2023-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 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/CreateDwDatabaseCrossSubscriptionRestore.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/CreateDwDatabaseCrossSubscriptionRecovery.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/CreateDwDatabaseCrossSubscriptionPITR.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/CreateDatabaseCopyMode.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 (CreatesADatabaseAsAStandbySecondary) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/CreateDatabaseStandbyMode.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.SecondaryTypeStandby), 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.SecondaryTypeStandby), // 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/CreateDatabaseSecondaryMode.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/CreateDatabaseNamedReplica.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/CreateDatabasePITRMode.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 (CreatesADatabaseWithAvailabilityZoneSpecified) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/CreateDatabaseWithAvailabilityZone.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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{ AvailabilityZone: to.Ptr(armsql.AvailabilityZoneTypeOne), 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{ // AvailabilityZone: to.Ptr(armsql.AvailabilityZoneTypeOne), // 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 (CreatesADatabaseWithDatabaseLevelCustomerManagedKeys) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/CreateDatabaseDefaultModeWithKeysAndEncryptionProtector.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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"), Identity: &armsql.DatabaseIdentity{ Type: to.Ptr(armsql.DatabaseIdentityTypeUserAssigned), UserAssignedIdentities: map[string]*armsql.DatabaseUserIdentity{ "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.ManagedIdentity/userAssignedIdentities/umi": {}, }, }, Properties: &armsql.DatabaseProperties{ Collation: to.Ptr("SQL_Latin1_General_CP1_CI_AS"), CreateMode: to.Ptr(armsql.CreateModeDefault), EncryptionProtector: to.Ptr("https://your-key-vault-name.vault.azure.net/yourKey/yourKeyVersion"), Keys: map[string]*armsql.DatabaseKey{ "https://your-key-vault-name.vault.azure.net/yourKey/yourKeyVersion": {}, "https://your-key-vault-name.vault.azure.net/yourKey2/yourKey2Version": {}, }, 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 (CreatesADatabaseWithDefaultEnclaveType) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/CreateDatabaseDefaultEnclave.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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{ PreferredEnclaveType: to.Ptr(armsql.AlwaysEncryptedEnclaveTypeDefault), }, }, 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}()), // MaxSizeBytes: to.Ptr[int64](268435456000), // PreferredEnclaveType: to.Ptr(armsql.AlwaysEncryptedEnclaveTypeDefault), // 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/CreateDatabaseDefaultMode.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/CreateDatabaseLedger.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/CreateDatabaseMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/CreateDatabaseMaintenanceConfiguration.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/CreateDatabaseConfiguredBackupStorageRedundancy.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 (CreatesADatabaseWithVbsEnclaveType) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/CreateDatabaseVBSEnclave.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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{ PreferredEnclaveType: to.Ptr(armsql.AlwaysEncryptedEnclaveTypeVBS), }, }, 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}()), // MaxSizeBytes: to.Ptr[int64](268435456000), // PreferredEnclaveType: to.Ptr(armsql.AlwaysEncryptedEnclaveTypeVBS), // 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 (CreatesAVCoreDatabaseBySpecifyingServiceObjectiveName) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/CreateVCoreDatabaseByServiceObjective.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/CreateVCoreDatabaseBySkuNameCapacity.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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:
Example (UpdatesADatabaseToHyperscaleSloWithManualCutover) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/UpdateDatabaseHyperscaleMigrationWithManualCutover.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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"), Identity: &armsql.DatabaseIdentity{ Type: to.Ptr(armsql.DatabaseIdentityTypeUserAssigned), UserAssignedIdentities: map[string]*armsql.DatabaseUserIdentity{ "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/userAssignedIdentities/umi": {}, "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/userAssignedIdentities/umiToDelete": nil, }, }, Properties: &armsql.DatabaseProperties{ ManualCutover: to.Ptr(true), }, SKU: &armsql.SKU{ Name: to.Ptr("HS_Gen5_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"), // 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-12-08T12:41:23.953Z"); return t}()), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // CurrentServiceObjectiveName: to.Ptr("GP_Gen5_2"), // CurrentSKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen5"), // Capacity: to.Ptr[int32](2), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("GeneralPurpose"), // }, // DatabaseID: to.Ptr("dad50ee1-9fbb-4fb9-bd2b-5786d175ce3c"), // DefaultSecondaryLocation: to.Ptr("North Europe"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-08T12:42:00.000Z"); 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_Default"), // MaxLogSizeBytes: to.Ptr[int64](193273528320), // MaxSizeBytes: to.Ptr[int64](34359738368), // ReadScale: to.Ptr(armsql.DatabaseReadScaleEnabled), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // RequestedServiceObjectiveName: to.Ptr("HS_Gen5_2"), // Status: to.Ptr(armsql.DatabaseStatusOnline), // ZoneRedundant: to.Ptr(false), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen5"), // Capacity: to.Ptr[int32](2), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("Hyperscale"), // }, // }
Output:
Example (UpdatesADatabaseToHyperscaleTierByTriggeringManualCutoverDuringMigrationWorkflow) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/UpdateDatabaseHyperscaleMigrationPerformCutover.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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"), Identity: &armsql.DatabaseIdentity{ Type: to.Ptr(armsql.DatabaseIdentityTypeUserAssigned), UserAssignedIdentities: map[string]*armsql.DatabaseUserIdentity{ "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/userAssignedIdentities/umi": {}, "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/userAssignedIdentities/umiToDelete": nil, }, }, Properties: &armsql.DatabaseProperties{ PerformCutover: 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,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, "2022-12-08T12:41:23.953Z"); return t}()), // CurrentBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // CurrentServiceObjectiveName: to.Ptr("GP_Gen5_2"), // CurrentSKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen5"), // Capacity: to.Ptr[int32](2), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("GeneralPurpose"), // }, // DatabaseID: to.Ptr("dad50ee1-9fbb-4fb9-bd2b-5786d175ce3c"), // DefaultSecondaryLocation: to.Ptr("North Europe"), // EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-12-08T12:42:00.000Z"); 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_Default"), // MaxLogSizeBytes: to.Ptr[int64](193273528320), // MaxSizeBytes: to.Ptr[int64](34359738368), // ReadScale: to.Ptr(armsql.DatabaseReadScaleEnabled), // RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // RequestedServiceObjectiveName: to.Ptr("HS_Gen5_2"), // Status: to.Ptr(armsql.DatabaseStatusOnline), // ZoneRedundant: to.Ptr(false), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("HS_Gen5"), // Capacity: to.Ptr[int32](2), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("Hyperscale"), // }, // }
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 2023-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 - DatabasesClientBeginDeleteOptions contains the optional parameters for the DatabasesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/DeleteDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2023-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 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ExportDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ExportDatabaseWithNetworkIsolation.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2023-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 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/FailoverDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2023-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 - 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ImportDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ImportDatabaseWithNetworkIsolation.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2023-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 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/PauseDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2023-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 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ResumeDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2023-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 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/PatchVCoreDatabaseAssignMaintenanceConfiguration.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 (CreatesADatabaseWithVbsEnclaveType) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/PatchDatabaseVBSEnclave.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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{ PreferredEnclaveType: to.Ptr(armsql.AlwaysEncryptedEnclaveTypeVBS), }, }, 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}()), // MaxSizeBytes: to.Ptr[int64](268435456000), // PreferredEnclaveType: to.Ptr(armsql.AlwaysEncryptedEnclaveTypeVBS), // 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 (PatchADatabaseWithDatabaseLevelCustomerManagedKeys) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/PatchVCoreDatabaseWithKeysAndEncryptionProtector.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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{ Identity: &armsql.DatabaseIdentity{ Type: to.Ptr(armsql.DatabaseIdentityTypeUserAssigned), UserAssignedIdentities: map[string]*armsql.DatabaseUserIdentity{ "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.ManagedIdentity/userAssignedIdentities/umi": {}, "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.ManagedIdentity/userAssignedIdentities/umiToDelete": nil, }, }, Properties: &armsql.DatabaseUpdateProperties{ EncryptionProtector: to.Ptr("https://your-key-vault-name.vault.azure.net/yourKey/yourKeyVersion"), Keys: map[string]*armsql.DatabaseKey{ "https://your-key-vault-name.vault.azure.net/yourKey/yourKeyVersion": {}, "https://your-key-vault-name.vault.azure.net/yourKey2/yourKey2VersionToDelete": nil, }, }, 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,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:
Example (ResetsMaintenanceWindowOfADatabaseToDefault) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/PatchVCoreDatabaseResetMaintenanceConfiguration.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/PatchVCoreDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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:
Example (UpdatesADatabaseWithDefaultEnclaveType) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/PatchDatabaseDefaultEnclave.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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{ PreferredEnclaveType: to.Ptr(armsql.AlwaysEncryptedEnclaveTypeDefault), }, }, 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}()), // MaxSizeBytes: to.Ptr[int64](268435456000), // PreferredEnclaveType: to.Ptr(armsql.AlwaysEncryptedEnclaveTypeDefault), // 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:
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 2023-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 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/UpgradeDataWarehouse.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2023-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 - DatabasesClientGetOptions contains the optional parameters for the DatabasesClient.Get method.
Example (GetsADatabase) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/GetVCoreDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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", &armsql.DatabasesClientGetOptions{Expand: nil, Filter: 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:
Example (GetsADatabaseConfiguredWithDefaultEnclaveType) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/GetVCoreDatabaseDefaultEnclave.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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", &armsql.DatabasesClientGetOptions{Expand: nil, Filter: 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), // PreferredEnclaveType: to.Ptr(armsql.AlwaysEncryptedEnclaveTypeDefault), // 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:
Example (GetsADatabaseConfiguredWithVbsEnclaveType) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/GetVCoreDatabaseVBSEnclave.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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", &armsql.DatabasesClientGetOptions{Expand: nil, Filter: 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), // PreferredEnclaveType: to.Ptr(armsql.AlwaysEncryptedEnclaveTypeVBS), // 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:
Example (GetsADatabaseWithAvailabilityZoneSpecified) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/GetDatabaseWithAvailabilityZone.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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", &armsql.DatabasesClientGetOptions{Expand: nil, Filter: 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"), // Properties: &armsql.DatabaseProperties{ // AvailabilityZone: to.Ptr(armsql.AvailabilityZoneTypeOne), // 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 (GetsADatabaseWithDatabaseLevelKeysExpanded) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/GetVCoreDatabaseWithExpandEqualsKeys.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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", &armsql.DatabasesClientGetOptions{Expand: to.Ptr("keys"), Filter: 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}()), // EncryptionProtector: to.Ptr("https://your-key-vault-name.vault.azure.net/yourKey/yourKeyVersion"), // IsInfraEncryptionEnabled: to.Ptr(false), // IsLedgerOn: to.Ptr(false), // Keys: map[string]*armsql.DatabaseKey{ // "https://your-key-vault-name.vault.azure.net/yourKey/yourKeyVersion": &armsql.DatabaseKey{ // }, // "https://your-key-vault-name.vault.azure.net/yourKey2/yourKey2Version": &armsql.DatabaseKey{ // }, // }, // 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 ¶
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 2023-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ListDatabasesByElasticPool.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
func (client *DatabasesClient) NewListByServerPager(resourceGroupName string, serverName string, options *DatabasesClientListByServerOptions) *runtime.Pager[DatabasesClientListByServerResponse]
NewListByServerPager - Gets a list of databases.
Generated from API version 2023-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 - DatabasesClientListByServerOptions contains the optional parameters for the DatabasesClient.NewListByServerPager method.
Example (GetsAListOfDatabases) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ListVCoreDatabasesByServer.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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:
Example (GetsAListOfDatabasesConfiguredWithEnclaveType) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ListVCoreDatabasesEnclaveTypeByServer.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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), // PreferredEnclaveType: to.Ptr(armsql.AlwaysEncryptedEnclaveTypeDefault), // 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), // PreferredEnclaveType: to.Ptr(armsql.AlwaysEncryptedEnclaveTypeVBS), // 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 ¶
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 2023-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 - DatabasesClientListInaccessibleByServerOptions contains the optional parameters for the DatabasesClient.NewListInaccessibleByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/ListVCoreInaccessibleDatabasesByServer.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DatabaseMetricsDefinitionsList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DatabaseMetricsListWithFilter.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2023-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 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/RenameDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type DatabasesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabasesClient.BeginCreateOrUpdate method.
type DatabasesClientBeginDeleteOptions ¶
type DatabasesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginDeleteOptions contains the optional parameters for the DatabasesClient.BeginDelete method.
type DatabasesClientBeginExportOptions ¶
type DatabasesClientBeginExportOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginExportOptions contains the optional parameters for the DatabasesClient.BeginExport method.
type DatabasesClientBeginFailoverOptions ¶
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 ¶
type DatabasesClientBeginImportOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginImportOptions contains the optional parameters for the DatabasesClient.BeginImport method.
type DatabasesClientBeginPauseOptions ¶
type DatabasesClientBeginPauseOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginPauseOptions contains the optional parameters for the DatabasesClient.BeginPause method.
type DatabasesClientBeginResumeOptions ¶
type DatabasesClientBeginResumeOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginResumeOptions contains the optional parameters for the DatabasesClient.BeginResume method.
type DatabasesClientBeginUpdateOptions ¶
type DatabasesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginUpdateOptions contains the optional parameters for the DatabasesClient.BeginUpdate method.
type DatabasesClientBeginUpgradeDataWarehouseOptions ¶
type DatabasesClientBeginUpgradeDataWarehouseOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginUpgradeDataWarehouseOptions contains the optional parameters for the DatabasesClient.BeginUpgradeDataWarehouse method.
type DatabasesClientCreateOrUpdateResponse ¶
type DatabasesClientCreateOrUpdateResponse struct { // A database resource. Database }
DatabasesClientCreateOrUpdateResponse contains the response from method DatabasesClient.BeginCreateOrUpdate.
type DatabasesClientDeleteResponse ¶
type DatabasesClientDeleteResponse struct { }
DatabasesClientDeleteResponse contains the response from method DatabasesClient.BeginDelete.
type DatabasesClientExportResponse ¶
type DatabasesClientExportResponse struct { // An ImportExport operation result resource. ImportExportOperationResult }
DatabasesClientExportResponse contains the response from method DatabasesClient.BeginExport.
type DatabasesClientFailoverResponse ¶
type DatabasesClientFailoverResponse struct { }
DatabasesClientFailoverResponse contains the response from method DatabasesClient.BeginFailover.
type DatabasesClientGetOptions ¶
type DatabasesClientGetOptions struct { // The child resources to include in the response. Expand *string // An OData filter expression that filters elements in the collection. Filter *string }
DatabasesClientGetOptions contains the optional parameters for the DatabasesClient.Get method.
type DatabasesClientGetResponse ¶
type DatabasesClientGetResponse struct { // A database resource. Database }
DatabasesClientGetResponse contains the response from method DatabasesClient.Get.
type DatabasesClientImportResponse ¶
type DatabasesClientImportResponse struct { // An ImportExport operation result resource. ImportExportOperationResult }
DatabasesClientImportResponse contains the response from method DatabasesClient.BeginImport.
type DatabasesClientListByElasticPoolOptions ¶
type DatabasesClientListByElasticPoolOptions struct { }
DatabasesClientListByElasticPoolOptions contains the optional parameters for the DatabasesClient.NewListByElasticPoolPager method.
type DatabasesClientListByElasticPoolResponse ¶
type DatabasesClientListByElasticPoolResponse struct { // A list of databases. DatabaseListResult }
DatabasesClientListByElasticPoolResponse contains the response from method DatabasesClient.NewListByElasticPoolPager.
type DatabasesClientListByServerOptions ¶
type DatabasesClientListByServerOptions struct {
SkipToken *string
}
DatabasesClientListByServerOptions contains the optional parameters for the DatabasesClient.NewListByServerPager method.
type DatabasesClientListByServerResponse ¶
type DatabasesClientListByServerResponse struct { // A list of databases. DatabaseListResult }
DatabasesClientListByServerResponse contains the response from method DatabasesClient.NewListByServerPager.
type DatabasesClientListInaccessibleByServerOptions ¶
type DatabasesClientListInaccessibleByServerOptions struct { }
DatabasesClientListInaccessibleByServerOptions contains the optional parameters for the DatabasesClient.NewListInaccessibleByServerPager method.
type DatabasesClientListInaccessibleByServerResponse ¶
type DatabasesClientListInaccessibleByServerResponse struct { // A list of databases. DatabaseListResult }
DatabasesClientListInaccessibleByServerResponse contains the response from method DatabasesClient.NewListInaccessibleByServerPager.
type DatabasesClientListMetricDefinitionsOptions ¶
type DatabasesClientListMetricDefinitionsOptions struct { }
DatabasesClientListMetricDefinitionsOptions contains the optional parameters for the DatabasesClient.NewListMetricDefinitionsPager method.
type DatabasesClientListMetricDefinitionsResponse ¶
type DatabasesClientListMetricDefinitionsResponse struct { // The response to a list database metric definitions request. MetricDefinitionListResult }
DatabasesClientListMetricDefinitionsResponse contains the response from method DatabasesClient.NewListMetricDefinitionsPager.
type DatabasesClientListMetricsOptions ¶
type DatabasesClientListMetricsOptions struct { }
DatabasesClientListMetricsOptions contains the optional parameters for the DatabasesClient.NewListMetricsPager method.
type DatabasesClientListMetricsResponse ¶
type DatabasesClientListMetricsResponse struct { // The response to a list database metrics request. MetricListResult }
DatabasesClientListMetricsResponse contains the response from method DatabasesClient.NewListMetricsPager.
type DatabasesClientPauseResponse ¶
type DatabasesClientPauseResponse struct { // A database resource. Database }
DatabasesClientPauseResponse contains the response from method DatabasesClient.BeginPause.
type DatabasesClientRenameOptions ¶
type DatabasesClientRenameOptions struct { }
DatabasesClientRenameOptions contains the optional parameters for the DatabasesClient.Rename method.
type DatabasesClientRenameResponse ¶
type DatabasesClientRenameResponse struct { }
DatabasesClientRenameResponse contains the response from method DatabasesClient.Rename.
type DatabasesClientResumeResponse ¶
type DatabasesClientResumeResponse struct { // A database resource. Database }
DatabasesClientResumeResponse contains the response from method DatabasesClient.BeginResume.
type DatabasesClientUpdateResponse ¶
type DatabasesClientUpdateResponse struct { // A database resource. Database }
DatabasesClientUpdateResponse contains the response from method DatabasesClient.BeginUpdate.
type DatabasesClientUpgradeDataWarehouseResponse ¶
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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeletedServerRecover.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeletedServerGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeletedServerList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeletedServerListBySubscription.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type DeletedServersClientBeginRecoverOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DeletedServersClientBeginRecoverOptions contains the optional parameters for the DeletedServersClient.BeginRecover method.
type DeletedServersClientGetOptions ¶
type DeletedServersClientGetOptions struct { }
DeletedServersClientGetOptions contains the optional parameters for the DeletedServersClient.Get method.
type DeletedServersClientGetResponse ¶
type DeletedServersClientGetResponse struct { // A deleted server. DeletedServer }
DeletedServersClientGetResponse contains the response from method DeletedServersClient.Get.
type DeletedServersClientListByLocationOptions ¶
type DeletedServersClientListByLocationOptions struct { }
DeletedServersClientListByLocationOptions contains the optional parameters for the DeletedServersClient.NewListByLocationPager method.
type DeletedServersClientListByLocationResponse ¶
type DeletedServersClientListByLocationResponse struct { // A list of deleted servers. DeletedServerListResult }
DeletedServersClientListByLocationResponse contains the response from method DeletedServersClient.NewListByLocationPager.
type DeletedServersClientListOptions ¶
type DeletedServersClientListOptions struct { }
DeletedServersClientListOptions contains the optional parameters for the DeletedServersClient.NewListPager method.
type DeletedServersClientListResponse ¶
type DeletedServersClientListResponse struct { // A list of deleted servers. DeletedServerListResult }
DeletedServersClientListResponse contains the response from method DeletedServersClient.NewListPager.
type DeletedServersClientRecoverResponse ¶
type DeletedServersClientRecoverResponse struct { // A deleted server. DeletedServer }
DeletedServersClientRecoverResponse contains the response from method DeletedServersClient.BeginRecover.
type DevOpsAuditingSettingsName ¶
type DevOpsAuditingSettingsName string
const (
DevOpsAuditingSettingsNameDefault DevOpsAuditingSettingsName = "Default"
)
func PossibleDevOpsAuditingSettingsNameValues ¶
func PossibleDevOpsAuditingSettingsNameValues() []DevOpsAuditingSettingsName
PossibleDevOpsAuditingSettingsNameValues returns the possible values for the DevOpsAuditingSettingsName const type.
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 ¶
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 ¶
func (d DistributedAvailabilityGroup) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DistributedAvailabilityGroup.
func (*DistributedAvailabilityGroup) UnmarshalJSON ¶
func (d *DistributedAvailabilityGroup) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DistributedAvailabilityGroup.
type DistributedAvailabilityGroupProperties ¶
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 ¶
func (d DistributedAvailabilityGroupProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DistributedAvailabilityGroupProperties.
func (*DistributedAvailabilityGroupProperties) UnmarshalJSON ¶
func (d *DistributedAvailabilityGroupProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DistributedAvailabilityGroupProperties.
type DistributedAvailabilityGroupsClient ¶
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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DistributedAvailabilityGroupsCreate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DistributedAvailabilityGroupsDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DistributedAvailabilityGroupsUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DistributedAvailabilityGroupsGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DistributedAvailabilityGroupsListByInstance.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type DistributedAvailabilityGroupsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DistributedAvailabilityGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.BeginCreateOrUpdate method.
type DistributedAvailabilityGroupsClientBeginDeleteOptions ¶
type DistributedAvailabilityGroupsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DistributedAvailabilityGroupsClientBeginDeleteOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.BeginDelete method.
type DistributedAvailabilityGroupsClientBeginUpdateOptions ¶
type DistributedAvailabilityGroupsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DistributedAvailabilityGroupsClientBeginUpdateOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.BeginUpdate method.
type DistributedAvailabilityGroupsClientCreateOrUpdateResponse ¶
type DistributedAvailabilityGroupsClientCreateOrUpdateResponse struct { // Distributed availability group between box and Sql Managed Instance. DistributedAvailabilityGroup }
DistributedAvailabilityGroupsClientCreateOrUpdateResponse contains the response from method DistributedAvailabilityGroupsClient.BeginCreateOrUpdate.
type DistributedAvailabilityGroupsClientDeleteResponse ¶
type DistributedAvailabilityGroupsClientDeleteResponse struct { }
DistributedAvailabilityGroupsClientDeleteResponse contains the response from method DistributedAvailabilityGroupsClient.BeginDelete.
type DistributedAvailabilityGroupsClientGetOptions ¶
type DistributedAvailabilityGroupsClientGetOptions struct { }
DistributedAvailabilityGroupsClientGetOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.Get method.
type DistributedAvailabilityGroupsClientGetResponse ¶
type DistributedAvailabilityGroupsClientGetResponse struct { // Distributed availability group between box and Sql Managed Instance. DistributedAvailabilityGroup }
DistributedAvailabilityGroupsClientGetResponse contains the response from method DistributedAvailabilityGroupsClient.Get.
type DistributedAvailabilityGroupsClientListByInstanceOptions ¶
type DistributedAvailabilityGroupsClientListByInstanceOptions struct { }
DistributedAvailabilityGroupsClientListByInstanceOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.NewListByInstancePager method.
type DistributedAvailabilityGroupsClientListByInstanceResponse ¶
type DistributedAvailabilityGroupsClientListByInstanceResponse struct { // A list of distributed availability groups in instance. DistributedAvailabilityGroupsListResult }
DistributedAvailabilityGroupsClientListByInstanceResponse contains the response from method DistributedAvailabilityGroupsClient.NewListByInstancePager.
type DistributedAvailabilityGroupsClientUpdateResponse ¶
type DistributedAvailabilityGroupsClientUpdateResponse struct { // Distributed availability group between box and Sql Managed Instance. DistributedAvailabilityGroup }
DistributedAvailabilityGroupsClientUpdateResponse contains the response from method DistributedAvailabilityGroupsClient.BeginUpdate.
type DistributedAvailabilityGroupsListResult ¶
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 ¶
func (d DistributedAvailabilityGroupsListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DistributedAvailabilityGroupsListResult.
func (*DistributedAvailabilityGroupsListResult) UnmarshalJSON ¶
func (d *DistributedAvailabilityGroupsListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DistributedAvailabilityGroupsListResult.
type DtcName ¶
type DtcName string
const (
DtcNameCurrent DtcName = "current"
)
func PossibleDtcNameValues ¶
func PossibleDtcNameValues() []DtcName
PossibleDtcNameValues returns the possible values for the DtcName const type.
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 ¶
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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ElasticPoolActivityList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ElasticPoolActivitiesClientListByElasticPoolOptions struct { }
ElasticPoolActivitiesClientListByElasticPoolOptions contains the optional parameters for the ElasticPoolActivitiesClient.NewListByElasticPoolPager method.
type ElasticPoolActivitiesClientListByElasticPoolResponse ¶
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 ¶
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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ElasticPoolDatabaseActivityList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ElasticPoolDatabaseActivitiesClientListByElasticPoolOptions struct { }
ElasticPoolDatabaseActivitiesClientListByElasticPoolOptions contains the optional parameters for the ElasticPoolDatabaseActivitiesClient.NewListByElasticPoolPager method.
type ElasticPoolDatabaseActivitiesClientListByElasticPoolResponse ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CancelElasticPoolOperation.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListElasticPoolOperations.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ElasticPoolOperationsClientCancelOptions struct { }
ElasticPoolOperationsClientCancelOptions contains the optional parameters for the ElasticPoolOperationsClient.Cancel method.
type ElasticPoolOperationsClientCancelResponse ¶
type ElasticPoolOperationsClientCancelResponse struct { }
ElasticPoolOperationsClientCancelResponse contains the response from method ElasticPoolOperationsClient.Cancel.
type ElasticPoolOperationsClientListByElasticPoolOptions ¶
type ElasticPoolOperationsClientListByElasticPoolOptions struct { }
ElasticPoolOperationsClientListByElasticPoolOptions contains the optional parameters for the ElasticPoolOperationsClient.NewListByElasticPoolPager method.
type ElasticPoolOperationsClientListByElasticPoolResponse ¶
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 ¶
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 ¶
func (e ElasticPoolPerDatabaseMinPerformanceLevelCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ElasticPoolPerDatabaseMinPerformanceLevelCapability.
func (*ElasticPoolPerDatabaseMinPerformanceLevelCapability) UnmarshalJSON ¶
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 ¶
func (e ElasticPoolPerDatabaseSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ElasticPoolPerDatabaseSettings.
func (*ElasticPoolPerDatabaseSettings) UnmarshalJSON ¶
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 ¶
func (e *ElasticPoolPerformanceLevelCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolPerformanceLevelCapability.
type ElasticPoolProperties ¶
type ElasticPoolProperties struct { // Specifies the availability zone the pool's primary replica is pinned to. AvailabilityZone *AvailabilityZoneType // 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 // Minimal capacity that serverless pool will not shrink below, if not paused MinCapacity *float64 // The per database settings for the elastic pool. PerDatabaseSettings *ElasticPoolPerDatabaseSettings // Type of enclave requested on the elastic pool. PreferredEnclaveType *AlwaysEncryptedEnclaveType // 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 ¶
func (e *ElasticPoolUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ElasticPoolUpdate.
type ElasticPoolUpdateProperties ¶
type ElasticPoolUpdateProperties struct { // Specifies the availability zone the pool's primary replica is pinned to. AvailabilityZone *AvailabilityZoneType // 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 // Minimal capacity that serverless pool will not shrink below, if not paused MinCapacity *float64 // The per database settings for the elastic pool. PerDatabaseSettings *ElasticPoolPerDatabaseSettings // Type of enclave requested on the elastic pool. PreferredEnclaveType *AlwaysEncryptedEnclaveType // 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 ¶
func (e ElasticPoolUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ElasticPoolUpdateProperties.
func (*ElasticPoolUpdateProperties) UnmarshalJSON ¶
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 2022-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 (CreateOrUpdateAnElasticPoolWithAvailabilityZone) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/CreateElasticPoolWithAvailabilityZone.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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{ AvailabilityZone: to.Ptr(armsql.AvailabilityZoneTypeOne), PerDatabaseSettings: &armsql.ElasticPoolPerDatabaseSettings{ MaxCapacity: to.Ptr[float64](2), MinCapacity: to.Ptr[float64](0.25), }, ZoneRedundant: to.Ptr(true), }, 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"), // Properties: &armsql.ElasticPoolProperties{ // AvailabilityZone: to.Ptr(armsql.AvailabilityZoneTypeOne), // 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](2), // MinCapacity: to.Ptr[float64](0.25), // }, // State: to.Ptr(armsql.ElasticPoolStateReady), // ZoneRedundant: to.Ptr(true), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("StandardPool"), // Capacity: to.Ptr[int32](100), // Tier: to.Ptr("Standard"), // }, // }
Output:
Example (CreateOrUpdateElasticPoolWithAllParameter) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolCreateOrUpdateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolCreateOrUpdateSetMaintenanceConfiguration.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolCreateOrUpdateMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 (CreateOrUpdateElasticPoolWithPreferredEnclaveTypeParameterAsDefault) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolCreateWithDefaultPreferredEnclaveType.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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{ PreferredEnclaveType: to.Ptr(armsql.AlwaysEncryptedEnclaveTypeDefault), }, SKU: &armsql.SKU{ Name: to.Ptr("GP_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, "2022-08-26T03:46:20.570Z"); return t}()), // 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), // }, // PreferredEnclaveType: to.Ptr(armsql.AlwaysEncryptedEnclaveTypeDefault), // State: to.Ptr(armsql.ElasticPoolStateReady), // ZoneRedundant: to.Ptr(false), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen5"), // Capacity: to.Ptr[int32](4), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("GeneralPurpose"), // }, // }
Output:
Example (CreateOrUpdateElasticPoolWithPreferredEnclaveTypeParameterAsVbs) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolCreateWithVBSPreferredEnclaveType.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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{ PreferredEnclaveType: to.Ptr(armsql.AlwaysEncryptedEnclaveTypeVBS), }, SKU: &armsql.SKU{ Name: to.Ptr("GP_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, "2022-08-26T03:46:20.570Z"); return t}()), // 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), // }, // PreferredEnclaveType: to.Ptr(armsql.AlwaysEncryptedEnclaveTypeVBS), // State: to.Ptr(armsql.ElasticPoolStateReady), // ZoneRedundant: to.Ptr(false), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen5"), // Capacity: to.Ptr[int32](4), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("GeneralPurpose"), // }, // }
Output:
Example (CreateOrUpdateHyperscaleElasticPoolWithHighAvailabilityReplicaCountParameter) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/HyperscaleElasticPoolCreateOrUpdateSetHighAvailabilityReplicaCount.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2022-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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2022-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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/FailoverElasticPool.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2022-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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolUpdateAssignMaintenanceConfiguration.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 (CreateOrUpdateElasticPoolWithPreferredEnclaveTypeParameterAsDefault) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolUpdateWithDefaultPreferredEnclaveType.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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{ PreferredEnclaveType: to.Ptr(armsql.AlwaysEncryptedEnclaveTypeDefault), }, SKU: &armsql.SKU{ Name: to.Ptr("GP_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, "2022-08-26T03:46:20.570Z"); return t}()), // 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), // }, // PreferredEnclaveType: to.Ptr(armsql.AlwaysEncryptedEnclaveTypeDefault), // State: to.Ptr(armsql.ElasticPoolStateReady), // ZoneRedundant: to.Ptr(false), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen5"), // Capacity: to.Ptr[int32](4), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("GeneralPurpose"), // }, // }
Output:
Example (CreateOrUpdateElasticPoolWithPreferredEnclaveTypeParameterAsVbs) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolUpdateWithVBSPreferredEnclaveType.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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{ PreferredEnclaveType: to.Ptr(armsql.AlwaysEncryptedEnclaveTypeVBS), }, SKU: &armsql.SKU{ Name: to.Ptr("GP_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, "2022-08-26T03:46:20.570Z"); return t}()), // 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), // }, // PreferredEnclaveType: to.Ptr(armsql.AlwaysEncryptedEnclaveTypeVBS), // State: to.Ptr(armsql.ElasticPoolStateReady), // ZoneRedundant: to.Ptr(false), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen5"), // Capacity: to.Ptr[int32](4), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("GeneralPurpose"), // }, // }
Output:
Example (ResetsMaintenanceConfigurationOfAnElasticPoolToDefault) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolUpdateResetMaintenanceConfiguration.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolUpdateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolUpdateMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/HyperscaleElasticPoolUpdateSetHighAvailabilityReplicaCount.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2022-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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/HyperscaleElasticPoolGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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:
Example (GetAnElasticPoolWithAvailabilityZone) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/GetElasticPoolWithAvailabilityZone.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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{ // AvailabilityZone: to.Ptr(armsql.AvailabilityZoneTypeOne), // 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:
Example (GetAnElasticPoolWithPreferredEnclaveTypeParameter) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolGetWithPreferredEnclaveType.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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, "2022-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), // }, // PreferredEnclaveType: to.Ptr(armsql.AlwaysEncryptedEnclaveTypeVBS), // State: to.Ptr(armsql.ElasticPoolStateReady), // ZoneRedundant: to.Ptr(false), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("GP_Gen5"), // Capacity: to.Ptr[int32](4), // Family: to.Ptr("Gen5"), // Tier: to.Ptr("GeneralPurpose"), // }, // }
Output:
func (*ElasticPoolsClient) NewListByServerPager ¶
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 2022-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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ElasticPoolListByServer.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ElasticPoolMetricsDefinitionsList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ElasticPoolMetricsListWithFilter.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ElasticPoolsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ElasticPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the ElasticPoolsClient.BeginCreateOrUpdate method.
type ElasticPoolsClientBeginDeleteOptions ¶
type ElasticPoolsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ElasticPoolsClientBeginDeleteOptions contains the optional parameters for the ElasticPoolsClient.BeginDelete method.
type ElasticPoolsClientBeginFailoverOptions ¶
type ElasticPoolsClientBeginFailoverOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ElasticPoolsClientBeginFailoverOptions contains the optional parameters for the ElasticPoolsClient.BeginFailover method.
type ElasticPoolsClientBeginUpdateOptions ¶
type ElasticPoolsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ElasticPoolsClientBeginUpdateOptions contains the optional parameters for the ElasticPoolsClient.BeginUpdate method.
type ElasticPoolsClientCreateOrUpdateResponse ¶
type ElasticPoolsClientCreateOrUpdateResponse struct { // An elastic pool. ElasticPool }
ElasticPoolsClientCreateOrUpdateResponse contains the response from method ElasticPoolsClient.BeginCreateOrUpdate.
type ElasticPoolsClientDeleteResponse ¶
type ElasticPoolsClientDeleteResponse struct { }
ElasticPoolsClientDeleteResponse contains the response from method ElasticPoolsClient.BeginDelete.
type ElasticPoolsClientFailoverResponse ¶
type ElasticPoolsClientFailoverResponse struct { }
ElasticPoolsClientFailoverResponse contains the response from method ElasticPoolsClient.BeginFailover.
type ElasticPoolsClientGetOptions ¶
type ElasticPoolsClientGetOptions struct { }
ElasticPoolsClientGetOptions contains the optional parameters for the ElasticPoolsClient.Get method.
type ElasticPoolsClientGetResponse ¶
type ElasticPoolsClientGetResponse struct { // An elastic pool. ElasticPool }
ElasticPoolsClientGetResponse contains the response from method ElasticPoolsClient.Get.
type ElasticPoolsClientListByServerOptions ¶
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 ¶
type ElasticPoolsClientListByServerResponse struct { // The result of an elastic pool list request. ElasticPoolListResult }
ElasticPoolsClientListByServerResponse contains the response from method ElasticPoolsClient.NewListByServerPager.
type ElasticPoolsClientListMetricDefinitionsOptions ¶
type ElasticPoolsClientListMetricDefinitionsOptions struct { }
ElasticPoolsClientListMetricDefinitionsOptions contains the optional parameters for the ElasticPoolsClient.NewListMetricDefinitionsPager method.
type ElasticPoolsClientListMetricDefinitionsResponse ¶
type ElasticPoolsClientListMetricDefinitionsResponse struct { // The response to a list database metric definitions request. MetricDefinitionListResult }
ElasticPoolsClientListMetricDefinitionsResponse contains the response from method ElasticPoolsClient.NewListMetricDefinitionsPager.
type ElasticPoolsClientListMetricsOptions ¶
type ElasticPoolsClientListMetricsOptions struct { }
ElasticPoolsClientListMetricsOptions contains the optional parameters for the ElasticPoolsClient.NewListMetricsPager method.
type ElasticPoolsClientListMetricsResponse ¶
type ElasticPoolsClientListMetricsResponse struct { // The response to a list database metrics request. MetricListResult }
ElasticPoolsClientListMetricsResponse contains the response from method ElasticPoolsClient.NewListMetricsPager.
type ElasticPoolsClientUpdateResponse ¶
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 ¶
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 ¶
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 ¶
func (e EncryptionProtectorProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EncryptionProtectorProperties.
func (*EncryptionProtectorProperties) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/EncryptionProtectorCreateOrUpdateKeyVault.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/EncryptionProtectorCreateOrUpdateServiceManaged.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/EncryptionProtectorRevalidate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/EncryptionProtectorGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/EncryptionProtectorList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type EncryptionProtectorsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
EncryptionProtectorsClientBeginCreateOrUpdateOptions contains the optional parameters for the EncryptionProtectorsClient.BeginCreateOrUpdate method.
type EncryptionProtectorsClientBeginRevalidateOptions ¶
type EncryptionProtectorsClientBeginRevalidateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
EncryptionProtectorsClientBeginRevalidateOptions contains the optional parameters for the EncryptionProtectorsClient.BeginRevalidate method.
type EncryptionProtectorsClientCreateOrUpdateResponse ¶
type EncryptionProtectorsClientCreateOrUpdateResponse struct { // The server encryption protector. EncryptionProtector }
EncryptionProtectorsClientCreateOrUpdateResponse contains the response from method EncryptionProtectorsClient.BeginCreateOrUpdate.
type EncryptionProtectorsClientGetOptions ¶
type EncryptionProtectorsClientGetOptions struct { }
EncryptionProtectorsClientGetOptions contains the optional parameters for the EncryptionProtectorsClient.Get method.
type EncryptionProtectorsClientGetResponse ¶
type EncryptionProtectorsClientGetResponse struct { // The server encryption protector. EncryptionProtector }
EncryptionProtectorsClientGetResponse contains the response from method EncryptionProtectorsClient.Get.
type EncryptionProtectorsClientListByServerOptions ¶
type EncryptionProtectorsClientListByServerOptions struct { }
EncryptionProtectorsClientListByServerOptions contains the optional parameters for the EncryptionProtectorsClient.NewListByServerPager method.
type EncryptionProtectorsClientListByServerResponse ¶
type EncryptionProtectorsClientListByServerResponse struct { // A list of server encryption protectors. EncryptionProtectorListResult }
EncryptionProtectorsClientListByServerResponse contains the response from method EncryptionProtectorsClient.NewListByServerPager.
type EncryptionProtectorsClientRevalidateResponse ¶
type EncryptionProtectorsClientRevalidateResponse struct { }
EncryptionProtectorsClientRevalidateResponse contains the response from method EncryptionProtectorsClient.BeginRevalidate.
type EndpointCertificate ¶
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 ¶
func (e EndpointCertificate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EndpointCertificate.
func (*EndpointCertificate) UnmarshalJSON ¶
func (e *EndpointCertificate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EndpointCertificate.
type EndpointCertificateListResult ¶
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 ¶
func (e EndpointCertificateListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EndpointCertificateListResult.
func (*EndpointCertificateListResult) UnmarshalJSON ¶
func (e *EndpointCertificateListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EndpointCertificateListResult.
type EndpointCertificateProperties ¶
type EndpointCertificateProperties struct { // The certificate public blob PublicBlob *string }
EndpointCertificateProperties - The properties of an endpoint certificate.
func (EndpointCertificateProperties) MarshalJSON ¶
func (e EndpointCertificateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EndpointCertificateProperties.
func (*EndpointCertificateProperties) UnmarshalJSON ¶
func (e *EndpointCertificateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EndpointCertificateProperties.
type EndpointCertificatesClient ¶
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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/EndpointCertificatesGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/EndpointCertificatesListByInstance.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type EndpointCertificatesClientGetOptions struct { }
EndpointCertificatesClientGetOptions contains the optional parameters for the EndpointCertificatesClient.Get method.
type EndpointCertificatesClientGetResponse ¶
type EndpointCertificatesClientGetResponse struct { // Certificate used on an endpoint on the Managed Instance. EndpointCertificate }
EndpointCertificatesClientGetResponse contains the response from method EndpointCertificatesClient.Get.
type EndpointCertificatesClientListByInstanceOptions ¶
type EndpointCertificatesClientListByInstanceOptions struct { }
EndpointCertificatesClientListByInstanceOptions contains the optional parameters for the EndpointCertificatesClient.NewListByInstancePager method.
type EndpointCertificatesClientListByInstanceResponse ¶
type EndpointCertificatesClientListByInstanceResponse struct { // A list of endpoint certificates on the target instance. EndpointCertificateListResult }
EndpointCertificatesClientListByInstanceResponse contains the response from method EndpointCertificatesClient.NewListByInstancePager.
type EndpointDependency ¶
type EndpointDependency struct { // READ-ONLY; The domain name of the dependency. DomainName *string // READ-ONLY; The IP Addresses and Ports used when connecting to DomainName. EndpointDetails []*EndpointDetail }
EndpointDependency - A domain name that the managed instance service needs to communicate with, along with additional details.
func (EndpointDependency) MarshalJSON ¶
func (e EndpointDependency) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EndpointDependency.
func (*EndpointDependency) UnmarshalJSON ¶
func (e *EndpointDependency) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EndpointDependency.
type EndpointDetail ¶
type EndpointDetail struct { // READ-ONLY; The port an endpoint is connected to. Port *int32 }
EndpointDetail - A domain name that the managed instance service needs to communicate with, along with additional details.
func (EndpointDetail) MarshalJSON ¶
func (e EndpointDetail) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EndpointDetail.
func (*EndpointDetail) UnmarshalJSON ¶
func (e *EndpointDetail) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type EndpointDetail.
type ErrorAdditionalInfo ¶
type ErrorAdditionalInfo struct { // READ-ONLY; The additional info. Info any // READ-ONLY; The additional info type. Type *string }
ErrorAdditionalInfo - The resource management error additional info.
func (ErrorAdditionalInfo) MarshalJSON ¶
func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.
func (*ErrorAdditionalInfo) UnmarshalJSON ¶
func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.
type ErrorDetail ¶
type ErrorDetail struct { // READ-ONLY; The error additional info. AdditionalInfo []*ErrorAdditionalInfo // READ-ONLY; The error code. Code *string // READ-ONLY; The error details. Details []*ErrorDetail // READ-ONLY; The error message. Message *string // READ-ONLY; The error target. Target *string }
ErrorDetail - The error detail.
func (ErrorDetail) MarshalJSON ¶
func (e ErrorDetail) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorDetail.
func (*ErrorDetail) UnmarshalJSON ¶
func (e *ErrorDetail) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.
type ErrorResponse ¶
type ErrorResponse struct { // The error object. Error *ErrorDetail }
ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).
func (ErrorResponse) MarshalJSON ¶
func (e ErrorResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorResponse.
func (*ErrorResponse) UnmarshalJSON ¶
func (e *ErrorResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.
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 ¶
func (e ExportDatabaseDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExportDatabaseDefinition.
func (*ExportDatabaseDefinition) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ExtendedDatabaseAzureMonitorAuditingCreateMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ExtendedDatabaseBlobAuditingGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DatabaseExtendedAuditingSettingsList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions struct { }
ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ExtendedDatabaseBlobAuditingPoliciesClient.CreateOrUpdate method.
type ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse ¶
type ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse struct { // An extended database blob auditing policy. ExtendedDatabaseBlobAuditingPolicy }
ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse contains the response from method ExtendedDatabaseBlobAuditingPoliciesClient.CreateOrUpdate.
type ExtendedDatabaseBlobAuditingPoliciesClientGetOptions ¶
type ExtendedDatabaseBlobAuditingPoliciesClientGetOptions struct { }
ExtendedDatabaseBlobAuditingPoliciesClientGetOptions contains the optional parameters for the ExtendedDatabaseBlobAuditingPoliciesClient.Get method.
type ExtendedDatabaseBlobAuditingPoliciesClientGetResponse ¶
type ExtendedDatabaseBlobAuditingPoliciesClientGetResponse struct { // An extended database blob auditing policy. ExtendedDatabaseBlobAuditingPolicy }
ExtendedDatabaseBlobAuditingPoliciesClientGetResponse contains the response from method ExtendedDatabaseBlobAuditingPoliciesClient.Get.
type ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseOptions ¶
type ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseOptions struct { }
ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseOptions contains the optional parameters for the ExtendedDatabaseBlobAuditingPoliciesClient.NewListByDatabasePager method.
type ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseResponse ¶
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 ¶
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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ExtendedServerBlobAuditingCreateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ExtendedServerBlobAuditingCreateMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ExtendedServerBlobAuditingGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerExtendedAuditingSettingsList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ExtendedServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ExtendedServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ExtendedServerBlobAuditingPoliciesClient.BeginCreateOrUpdate method.
type ExtendedServerBlobAuditingPoliciesClientCreateOrUpdateResponse ¶
type ExtendedServerBlobAuditingPoliciesClientCreateOrUpdateResponse struct { // An extended server blob auditing policy. ExtendedServerBlobAuditingPolicy }
ExtendedServerBlobAuditingPoliciesClientCreateOrUpdateResponse contains the response from method ExtendedServerBlobAuditingPoliciesClient.BeginCreateOrUpdate.
type ExtendedServerBlobAuditingPoliciesClientGetOptions ¶
type ExtendedServerBlobAuditingPoliciesClientGetOptions struct { }
ExtendedServerBlobAuditingPoliciesClientGetOptions contains the optional parameters for the ExtendedServerBlobAuditingPoliciesClient.Get method.
type ExtendedServerBlobAuditingPoliciesClientGetResponse ¶
type ExtendedServerBlobAuditingPoliciesClientGetResponse struct { // An extended server blob auditing policy. ExtendedServerBlobAuditingPolicy }
ExtendedServerBlobAuditingPoliciesClientGetResponse contains the response from method ExtendedServerBlobAuditingPoliciesClient.Get.
type ExtendedServerBlobAuditingPoliciesClientListByServerOptions ¶
type ExtendedServerBlobAuditingPoliciesClientListByServerOptions struct { }
ExtendedServerBlobAuditingPoliciesClientListByServerOptions contains the optional parameters for the ExtendedServerBlobAuditingPoliciesClient.NewListByServerPager method.
type ExtendedServerBlobAuditingPoliciesClientListByServerResponse ¶
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 ¶
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 ¶
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 ¶
func (e *ExtendedServerBlobAuditingPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedServerBlobAuditingPolicyProperties.
type ExternalGovernanceStatus ¶
type ExternalGovernanceStatus string
ExternalGovernanceStatus - Status of external governance.
const ( ExternalGovernanceStatusDisabled ExternalGovernanceStatus = "Disabled" ExternalGovernanceStatusEnabled ExternalGovernanceStatus = "Enabled" )
func PossibleExternalGovernanceStatusValues ¶
func PossibleExternalGovernanceStatusValues() []ExternalGovernanceStatus
PossibleExternalGovernanceStatusValues returns the possible values for the ExternalGovernanceStatus const type.
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 ¶
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 ¶
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 ¶
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 // The target partner server where the read-only endpoint points to. TargetServer *string }
FailoverGroupReadOnlyEndpoint - Read-only endpoint of the failover group instance.
func (FailoverGroupReadOnlyEndpoint) MarshalJSON ¶
func (f FailoverGroupReadOnlyEndpoint) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FailoverGroupReadOnlyEndpoint.
func (*FailoverGroupReadOnlyEndpoint) UnmarshalJSON ¶
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 ¶
func (f FailoverGroupReadWriteEndpoint) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FailoverGroupReadWriteEndpoint.
func (*FailoverGroupReadWriteEndpoint) UnmarshalJSON ¶
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 ¶
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 // List of partner server information for the failover group. PartnerServers []*PartnerInfo // 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 ¶
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 2023-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 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/FailoverGroupCreateOrUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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), // TargetServer: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server"), // }, // 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 2023-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 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/FailoverGroupDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2023-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 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/FailoverGroupFailover.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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), // TargetServer: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server"), // }, // 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 2023-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 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/FailoverGroupForceFailoverAllowDataLoss.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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), // TargetServer: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server"), // }, // 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) BeginTryPlannedBeforeForcedFailover ¶
func (client *FailoverGroupsClient) BeginTryPlannedBeforeForcedFailover(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, options *FailoverGroupsClientBeginTryPlannedBeforeForcedFailoverOptions) (*runtime.Poller[FailoverGroupsClientTryPlannedBeforeForcedFailoverResponse], error)
BeginTryPlannedBeforeForcedFailover - Fails over from the current primary server to this server. This operation tries planned before forced failover but might still result in data loss. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-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.
- failoverGroupName - The name of the failover group.
- options - FailoverGroupsClientBeginTryPlannedBeforeForcedFailoverOptions contains the optional parameters for the FailoverGroupsClient.BeginTryPlannedBeforeForcedFailover method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/FailoverGroupTryPlannedBeforeForcedFailover.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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().BeginTryPlannedBeforeForcedFailover(ctx, "Default", "failovergroupsecondaryserver", "failovergrouptest3", 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("failovergrouptest3"), // Type: to.Ptr("Microsoft.Sql/servers/failoverGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failovergroupsecondaryserver/failoverGroups/failovergrouptest3"), // Location: to.Ptr("Japan West"), // Properties: &armsql.FailoverGroupProperties{ // Databases: []*string{ // to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failovergroupsecondaryserver/databases/testdb1"), // to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failovergroupsecondaryserver/databases/testdb2")}, // PartnerServers: []*armsql.PartnerInfo{ // { // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failovergroupprimaryserver"), // Location: to.Ptr("Japan East"), // ReplicationRole: to.Ptr(armsql.FailoverGroupReplicationRoleSecondary), // }}, // ReadOnlyEndpoint: &armsql.FailoverGroupReadOnlyEndpoint{ // FailoverPolicy: to.Ptr(armsql.ReadOnlyEndpointFailoverPolicyDisabled), // TargetServer: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failovergroupprimaryserver"), // }, // 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 2023-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 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/FailoverGroupUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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), // TargetServer: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server"), // }, // 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 2023-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 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/FailoverGroupGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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", "failovergroupprimaryserver", "failovergrouptest3", 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("failovergrouptest3"), // Type: to.Ptr("Microsoft.Sql/servers/failoverGroups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failovergroupprimaryserver/failoverGroups/failovergrouptest3"), // Location: to.Ptr("Japan West"), // Properties: &armsql.FailoverGroupProperties{ // Databases: []*string{ // to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failovergroupprimaryserver/databases/testdb1"), // to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failovergroupprimaryserver/databases/testdb2")}, // PartnerServers: []*armsql.PartnerInfo{ // { // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failovergroupsecondaryserver"), // Location: to.Ptr("Japan East"), // ReplicationRole: to.Ptr(armsql.FailoverGroupReplicationRoleSecondary), // }}, // ReadOnlyEndpoint: &armsql.FailoverGroupReadOnlyEndpoint{ // FailoverPolicy: to.Ptr(armsql.ReadOnlyEndpointFailoverPolicyEnabled), // TargetServer: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failovergroupsecondaryserver"), // }, // 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) NewListByServerPager ¶
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 2023-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 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/FailoverGroupList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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), // TargetServer: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server"), // }, // 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), // TargetServer: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server"), // }, // 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 ¶
type FailoverGroupsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
FailoverGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the FailoverGroupsClient.BeginCreateOrUpdate method.
type FailoverGroupsClientBeginDeleteOptions ¶
type FailoverGroupsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
FailoverGroupsClientBeginDeleteOptions contains the optional parameters for the FailoverGroupsClient.BeginDelete method.
type FailoverGroupsClientBeginFailoverOptions ¶
type FailoverGroupsClientBeginFailoverOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
FailoverGroupsClientBeginFailoverOptions contains the optional parameters for the FailoverGroupsClient.BeginFailover method.
type FailoverGroupsClientBeginForceFailoverAllowDataLossOptions ¶
type FailoverGroupsClientBeginForceFailoverAllowDataLossOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
FailoverGroupsClientBeginForceFailoverAllowDataLossOptions contains the optional parameters for the FailoverGroupsClient.BeginForceFailoverAllowDataLoss method.
type FailoverGroupsClientBeginTryPlannedBeforeForcedFailoverOptions ¶
type FailoverGroupsClientBeginTryPlannedBeforeForcedFailoverOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
FailoverGroupsClientBeginTryPlannedBeforeForcedFailoverOptions contains the optional parameters for the FailoverGroupsClient.BeginTryPlannedBeforeForcedFailover method.
type FailoverGroupsClientBeginUpdateOptions ¶
type FailoverGroupsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
FailoverGroupsClientBeginUpdateOptions contains the optional parameters for the FailoverGroupsClient.BeginUpdate method.
type FailoverGroupsClientCreateOrUpdateResponse ¶
type FailoverGroupsClientCreateOrUpdateResponse struct { // A failover group. FailoverGroup }
FailoverGroupsClientCreateOrUpdateResponse contains the response from method FailoverGroupsClient.BeginCreateOrUpdate.
type FailoverGroupsClientDeleteResponse ¶
type FailoverGroupsClientDeleteResponse struct { }
FailoverGroupsClientDeleteResponse contains the response from method FailoverGroupsClient.BeginDelete.
type FailoverGroupsClientFailoverResponse ¶
type FailoverGroupsClientFailoverResponse struct { // A failover group. FailoverGroup }
FailoverGroupsClientFailoverResponse contains the response from method FailoverGroupsClient.BeginFailover.
type FailoverGroupsClientForceFailoverAllowDataLossResponse ¶
type FailoverGroupsClientForceFailoverAllowDataLossResponse struct { // A failover group. FailoverGroup }
FailoverGroupsClientForceFailoverAllowDataLossResponse contains the response from method FailoverGroupsClient.BeginForceFailoverAllowDataLoss.
type FailoverGroupsClientGetOptions ¶
type FailoverGroupsClientGetOptions struct { }
FailoverGroupsClientGetOptions contains the optional parameters for the FailoverGroupsClient.Get method.
type FailoverGroupsClientGetResponse ¶
type FailoverGroupsClientGetResponse struct { // A failover group. FailoverGroup }
FailoverGroupsClientGetResponse contains the response from method FailoverGroupsClient.Get.
type FailoverGroupsClientListByServerOptions ¶
type FailoverGroupsClientListByServerOptions struct { }
FailoverGroupsClientListByServerOptions contains the optional parameters for the FailoverGroupsClient.NewListByServerPager method.
type FailoverGroupsClientListByServerResponse ¶
type FailoverGroupsClientListByServerResponse struct { // A list of failover groups. FailoverGroupListResult }
FailoverGroupsClientListByServerResponse contains the response from method FailoverGroupsClient.NewListByServerPager.
type FailoverGroupsClientTryPlannedBeforeForcedFailoverResponse ¶
type FailoverGroupsClientTryPlannedBeforeForcedFailoverResponse struct { // A failover group. FailoverGroup }
FailoverGroupsClientTryPlannedBeforeForcedFailoverResponse contains the response from method FailoverGroupsClient.BeginTryPlannedBeforeForcedFailover.
type FailoverGroupsClientUpdateResponse ¶
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 ¶
func (f FirewallRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FirewallRule.
func (*FirewallRule) UnmarshalJSON ¶
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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FirewallRuleCreate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FirewallRuleUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FirewallRuleDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FirewallRuleGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FirewallRuleList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FirewallRuleReplace.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type FirewallRulesClientCreateOrUpdateOptions struct { }
FirewallRulesClientCreateOrUpdateOptions contains the optional parameters for the FirewallRulesClient.CreateOrUpdate method.
type FirewallRulesClientCreateOrUpdateResponse ¶
type FirewallRulesClientCreateOrUpdateResponse struct { // A server firewall rule. FirewallRule }
FirewallRulesClientCreateOrUpdateResponse contains the response from method FirewallRulesClient.CreateOrUpdate.
type FirewallRulesClientDeleteOptions ¶
type FirewallRulesClientDeleteOptions struct { }
FirewallRulesClientDeleteOptions contains the optional parameters for the FirewallRulesClient.Delete method.
type FirewallRulesClientDeleteResponse ¶
type FirewallRulesClientDeleteResponse struct { }
FirewallRulesClientDeleteResponse contains the response from method FirewallRulesClient.Delete.
type FirewallRulesClientGetOptions ¶
type FirewallRulesClientGetOptions struct { }
FirewallRulesClientGetOptions contains the optional parameters for the FirewallRulesClient.Get method.
type FirewallRulesClientGetResponse ¶
type FirewallRulesClientGetResponse struct { // A server firewall rule. FirewallRule }
FirewallRulesClientGetResponse contains the response from method FirewallRulesClient.Get.
type FirewallRulesClientListByServerOptions ¶
type FirewallRulesClientListByServerOptions struct { }
FirewallRulesClientListByServerOptions contains the optional parameters for the FirewallRulesClient.NewListByServerPager method.
type FirewallRulesClientListByServerResponse ¶
type FirewallRulesClientListByServerResponse struct { // The response to a list firewall rules request FirewallRuleListResult }
FirewallRulesClientListByServerResponse contains the response from method FirewallRulesClient.NewListByServerPager.
type FirewallRulesClientReplaceOptions ¶
type FirewallRulesClientReplaceOptions struct { }
FirewallRulesClientReplaceOptions contains the optional parameters for the FirewallRulesClient.Replace method.
type FirewallRulesClientReplaceResponse ¶
type FirewallRulesClientReplaceResponse struct { // A server firewall rule. FirewallRule }
FirewallRulesClientReplaceResponse contains the response from method FirewallRulesClient.Replace.
type FreeLimitExhaustionBehavior ¶
type FreeLimitExhaustionBehavior string
FreeLimitExhaustionBehavior - Specifies the behavior when monthly free limits are exhausted for the free database. AutoPause: The database will be auto paused upon exhaustion of free limits for remainder of the month. BillForUsage: The database will continue to be online upon exhaustion of free limits and any overage will be billed.
const ( FreeLimitExhaustionBehaviorAutoPause FreeLimitExhaustionBehavior = "AutoPause" FreeLimitExhaustionBehaviorBillOverUsage FreeLimitExhaustionBehavior = "BillOverUsage" )
func PossibleFreeLimitExhaustionBehaviorValues ¶
func PossibleFreeLimitExhaustionBehaviorValues() []FreeLimitExhaustionBehavior
PossibleFreeLimitExhaustionBehaviorValues returns the possible values for the FreeLimitExhaustionBehavior const type.
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/GeoBackupPoliciesCreateOrUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/GeoBackupPoliciesGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/GeoBackupPoliciesList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type GeoBackupPoliciesClientCreateOrUpdateOptions struct { }
GeoBackupPoliciesClientCreateOrUpdateOptions contains the optional parameters for the GeoBackupPoliciesClient.CreateOrUpdate method.
type GeoBackupPoliciesClientCreateOrUpdateResponse ¶
type GeoBackupPoliciesClientCreateOrUpdateResponse struct { // A database geo backup policy. GeoBackupPolicy }
GeoBackupPoliciesClientCreateOrUpdateResponse contains the response from method GeoBackupPoliciesClient.CreateOrUpdate.
type GeoBackupPoliciesClientGetOptions ¶
type GeoBackupPoliciesClientGetOptions struct { }
GeoBackupPoliciesClientGetOptions contains the optional parameters for the GeoBackupPoliciesClient.Get method.
type GeoBackupPoliciesClientGetResponse ¶
type GeoBackupPoliciesClientGetResponse struct { // A database geo backup policy. GeoBackupPolicy }
GeoBackupPoliciesClientGetResponse contains the response from method GeoBackupPoliciesClient.Get.
type GeoBackupPoliciesClientListByDatabaseOptions ¶
type GeoBackupPoliciesClientListByDatabaseOptions struct { }
GeoBackupPoliciesClientListByDatabaseOptions contains the optional parameters for the GeoBackupPoliciesClient.NewListByDatabasePager method.
type GeoBackupPoliciesClientListByDatabaseResponse ¶
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 ¶
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 ¶
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 ¶
func (g GeoBackupPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GeoBackupPolicyProperties.
func (*GeoBackupPolicyProperties) UnmarshalJSON ¶
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 ¶
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 ¶
func (i IPv6FirewallRule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type IPv6FirewallRule.
func (*IPv6FirewallRule) UnmarshalJSON ¶
func (i *IPv6FirewallRule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type IPv6FirewallRule.
type IPv6FirewallRuleListResult ¶
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 ¶
func (i IPv6FirewallRuleListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type IPv6FirewallRuleListResult.
func (*IPv6FirewallRuleListResult) UnmarshalJSON ¶
func (i *IPv6FirewallRuleListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type IPv6FirewallRuleListResult.
type IPv6FirewallRulesClient ¶
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 ¶
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 ¶
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 2022-11-01-preview
- resourceGroupName - The name of the resource group 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/IPv6FirewallRuleCreate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/IPv6FirewallRuleUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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 2022-11-01-preview
- resourceGroupName - The name of the resource group 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/IPv6FirewallRuleDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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 2022-11-01-preview
- resourceGroupName - The name of the resource group 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/IPv6FirewallRuleGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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 2022-11-01-preview
- resourceGroupName - The name of the resource group 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/IPv6FirewallRuleList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type IPv6FirewallRulesClientCreateOrUpdateOptions struct { }
IPv6FirewallRulesClientCreateOrUpdateOptions contains the optional parameters for the IPv6FirewallRulesClient.CreateOrUpdate method.
type IPv6FirewallRulesClientCreateOrUpdateResponse ¶
type IPv6FirewallRulesClientCreateOrUpdateResponse struct { // An IPv6 server firewall rule. IPv6FirewallRule }
IPv6FirewallRulesClientCreateOrUpdateResponse contains the response from method IPv6FirewallRulesClient.CreateOrUpdate.
type IPv6FirewallRulesClientDeleteOptions ¶
type IPv6FirewallRulesClientDeleteOptions struct { }
IPv6FirewallRulesClientDeleteOptions contains the optional parameters for the IPv6FirewallRulesClient.Delete method.
type IPv6FirewallRulesClientDeleteResponse ¶
type IPv6FirewallRulesClientDeleteResponse struct { }
IPv6FirewallRulesClientDeleteResponse contains the response from method IPv6FirewallRulesClient.Delete.
type IPv6FirewallRulesClientGetOptions ¶
type IPv6FirewallRulesClientGetOptions struct { }
IPv6FirewallRulesClientGetOptions contains the optional parameters for the IPv6FirewallRulesClient.Get method.
type IPv6FirewallRulesClientGetResponse ¶
type IPv6FirewallRulesClientGetResponse struct { // An IPv6 server firewall rule. IPv6FirewallRule }
IPv6FirewallRulesClientGetResponse contains the response from method IPv6FirewallRulesClient.Get.
type IPv6FirewallRulesClientListByServerOptions ¶
type IPv6FirewallRulesClientListByServerOptions struct { }
IPv6FirewallRulesClientListByServerOptions contains the optional parameters for the IPv6FirewallRulesClient.NewListByServerPager method.
type IPv6FirewallRulesClientListByServerResponse ¶
type IPv6FirewallRulesClientListByServerResponse struct { // The response to a list IPv6 firewall rules request IPv6FirewallRuleListResult }
IPv6FirewallRulesClientListByServerResponse contains the response from method IPv6FirewallRulesClient.NewListByServerPager.
type IPv6ServerFirewallRuleProperties ¶
type IPv6ServerFirewallRuleProperties struct { // The end IP address of the firewall rule. Must be IPv6 format. Must be greater than or equal to startIpv6Address. 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 ¶
func (i IPv6ServerFirewallRuleProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type IPv6ServerFirewallRuleProperties.
func (*IPv6ServerFirewallRuleProperties) UnmarshalJSON ¶
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 ¶
func (i ImportExistingDatabaseDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImportExistingDatabaseDefinition.
func (*ImportExistingDatabaseDefinition) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
func (i ImportExportExtensionsOperationResultProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImportExportExtensionsOperationResultProperties.
func (*ImportExportExtensionsOperationResultProperties) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
func (i ImportNewDatabaseDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImportNewDatabaseDefinition.
func (*ImportNewDatabaseDefinition) UnmarshalJSON ¶
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 ¶
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 ¶
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 // Type of the geo-secondary instance. Set 'Standby' if the instance is used as a DR option only. SecondaryType *SecondaryInstanceType // 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 ¶
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 ¶
func (i InstanceFailoverGroupReadOnlyEndpoint) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InstanceFailoverGroupReadOnlyEndpoint.
func (*InstanceFailoverGroupReadOnlyEndpoint) UnmarshalJSON ¶
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 ¶
func (i InstanceFailoverGroupReadWriteEndpoint) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InstanceFailoverGroupReadWriteEndpoint.
func (*InstanceFailoverGroupReadWriteEndpoint) UnmarshalJSON ¶
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 2022-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 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/InstanceFailoverGroupCreateOrUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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), }, SecondaryType: to.Ptr(armsql.SecondaryInstanceTypeGeo), }, }, 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/instanceFailoverGroups"), // 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"), // SecondaryType: to.Ptr(armsql.SecondaryInstanceTypeGeo), // }, // }
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 2022-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 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/InstanceFailoverGroupDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2022-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 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/InstanceFailoverGroupFailover.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/instanceFailoverGroups"), // 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"), // SecondaryType: to.Ptr(armsql.SecondaryInstanceTypeGeo), // }, // }
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 2022-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 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/InstanceFailoverGroupForceFailoverAllowDataLoss.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/instanceFailoverGroups"), // 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"), // SecondaryType: to.Ptr(armsql.SecondaryInstanceTypeGeo), // }, // }
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 2022-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 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/InstanceFailoverGroupGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/instanceFailoverGroups"), // 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"), // SecondaryType: to.Ptr(armsql.SecondaryInstanceTypeGeo), // }, // }
Output:
func (*InstanceFailoverGroupsClient) NewListByLocationPager ¶
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 2022-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 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/InstanceFailoverGroupList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/instanceFailoverGroups"), // 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"), // SecondaryType: to.Ptr(armsql.SecondaryInstanceTypeGeo), // }, // }, // { // Name: to.Ptr("failover-group-test-1"), // Type: to.Ptr("Microsoft.Sql/locations/instanceFailoverGroups"), // 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"), // SecondaryType: to.Ptr(armsql.SecondaryInstanceTypeGeo), // }, // }}, // } }
Output:
type InstanceFailoverGroupsClientBeginCreateOrUpdateOptions ¶
type InstanceFailoverGroupsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
InstanceFailoverGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the InstanceFailoverGroupsClient.BeginCreateOrUpdate method.
type InstanceFailoverGroupsClientBeginDeleteOptions ¶
type InstanceFailoverGroupsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
InstanceFailoverGroupsClientBeginDeleteOptions contains the optional parameters for the InstanceFailoverGroupsClient.BeginDelete method.
type InstanceFailoverGroupsClientBeginFailoverOptions ¶
type InstanceFailoverGroupsClientBeginFailoverOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
InstanceFailoverGroupsClientBeginFailoverOptions contains the optional parameters for the InstanceFailoverGroupsClient.BeginFailover method.
type InstanceFailoverGroupsClientBeginForceFailoverAllowDataLossOptions ¶
type InstanceFailoverGroupsClientBeginForceFailoverAllowDataLossOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
InstanceFailoverGroupsClientBeginForceFailoverAllowDataLossOptions contains the optional parameters for the InstanceFailoverGroupsClient.BeginForceFailoverAllowDataLoss method.
type InstanceFailoverGroupsClientCreateOrUpdateResponse ¶
type InstanceFailoverGroupsClientCreateOrUpdateResponse struct { // An instance failover group. InstanceFailoverGroup }
InstanceFailoverGroupsClientCreateOrUpdateResponse contains the response from method InstanceFailoverGroupsClient.BeginCreateOrUpdate.
type InstanceFailoverGroupsClientDeleteResponse ¶
type InstanceFailoverGroupsClientDeleteResponse struct { }
InstanceFailoverGroupsClientDeleteResponse contains the response from method InstanceFailoverGroupsClient.BeginDelete.
type InstanceFailoverGroupsClientFailoverResponse ¶
type InstanceFailoverGroupsClientFailoverResponse struct { // An instance failover group. InstanceFailoverGroup }
InstanceFailoverGroupsClientFailoverResponse contains the response from method InstanceFailoverGroupsClient.BeginFailover.
type InstanceFailoverGroupsClientForceFailoverAllowDataLossResponse ¶
type InstanceFailoverGroupsClientForceFailoverAllowDataLossResponse struct { // An instance failover group. InstanceFailoverGroup }
InstanceFailoverGroupsClientForceFailoverAllowDataLossResponse contains the response from method InstanceFailoverGroupsClient.BeginForceFailoverAllowDataLoss.
type InstanceFailoverGroupsClientGetOptions ¶
type InstanceFailoverGroupsClientGetOptions struct { }
InstanceFailoverGroupsClientGetOptions contains the optional parameters for the InstanceFailoverGroupsClient.Get method.
type InstanceFailoverGroupsClientGetResponse ¶
type InstanceFailoverGroupsClientGetResponse struct { // An instance failover group. InstanceFailoverGroup }
InstanceFailoverGroupsClientGetResponse contains the response from method InstanceFailoverGroupsClient.Get.
type InstanceFailoverGroupsClientListByLocationOptions ¶
type InstanceFailoverGroupsClientListByLocationOptions struct { }
InstanceFailoverGroupsClientListByLocationOptions contains the optional parameters for the InstanceFailoverGroupsClient.NewListByLocationPager method.
type InstanceFailoverGroupsClientListByLocationResponse ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 // Specifies maintenance configuration id to apply to this managed instance. MaintenanceConfigurationID *string // READ-ONLY; The Dns Zone that the managed instance pool is in. DNSZone *string }
InstancePoolProperties - Properties of an instance pool.
func (InstancePoolProperties) MarshalJSON ¶
func (i InstancePoolProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InstancePoolProperties.
func (*InstancePoolProperties) UnmarshalJSON ¶
func (i *InstancePoolProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type InstancePoolProperties.
type InstancePoolUpdate ¶
type InstancePoolUpdate struct { // Resource properties. Properties *InstancePoolProperties // The name and tier of the SKU. SKU *SKU // Resource tags. Tags map[string]*string }
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 ¶
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 ¶
func (i InstancePoolVcoresCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InstancePoolVcoresCapability.
func (*InstancePoolVcoresCapability) UnmarshalJSON ¶
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 2023-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 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateInstancePoolMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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), MaintenanceConfigurationID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1"), 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{ // DNSZone: to.Ptr("1234567890"), // LicenseType: to.Ptr(armsql.InstancePoolLicenseTypeLicenseIncluded), // MaintenanceConfigurationID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1"), // 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateInstancePoolMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2023-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 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteInstancePool.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2023-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 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/PatchInstancePool.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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), // MaintenanceConfigurationID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1"), // 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 2023-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 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetInstancePool.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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{ // DNSZone: to.Ptr("1234567890"), // LicenseType: to.Ptr(armsql.InstancePoolLicenseTypeLicenseIncluded), // MaintenanceConfigurationID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1"), // 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 ¶
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 2023-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 - InstancePoolsClientListByResourceGroupOptions contains the optional parameters for the InstancePoolsClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListInstancePoolsByResourceGroup.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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{ // DNSZone: to.Ptr("1234567890"), // LicenseType: to.Ptr(armsql.InstancePoolLicenseTypeLicenseIncluded), // MaintenanceConfigurationID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1"), // 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{ // DNSZone: to.Ptr("1234567890"), // LicenseType: to.Ptr(armsql.InstancePoolLicenseTypeLicenseIncluded), // MaintenanceConfigurationID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1"), // 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 ¶
func (client *InstancePoolsClient) NewListPager(options *InstancePoolsClientListOptions) *runtime.Pager[InstancePoolsClientListResponse]
NewListPager - Gets a list of all instance pools in the subscription.
Generated from API version 2023-05-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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListInstancePoolsBySubscriptionId.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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{ // DNSZone: to.Ptr("1234567890"), // LicenseType: to.Ptr(armsql.InstancePoolLicenseTypeLicenseIncluded), // MaintenanceConfigurationID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1"), // 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{ // DNSZone: to.Ptr("1234567890"), // LicenseType: to.Ptr(armsql.InstancePoolLicenseTypeLicenseIncluded), // MaintenanceConfigurationID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1"), // 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 ¶
type InstancePoolsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
InstancePoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the InstancePoolsClient.BeginCreateOrUpdate method.
type InstancePoolsClientBeginDeleteOptions ¶
type InstancePoolsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
InstancePoolsClientBeginDeleteOptions contains the optional parameters for the InstancePoolsClient.BeginDelete method.
type InstancePoolsClientBeginUpdateOptions ¶
type InstancePoolsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
InstancePoolsClientBeginUpdateOptions contains the optional parameters for the InstancePoolsClient.BeginUpdate method.
type InstancePoolsClientCreateOrUpdateResponse ¶
type InstancePoolsClientCreateOrUpdateResponse struct { // An Azure SQL instance pool. InstancePool }
InstancePoolsClientCreateOrUpdateResponse contains the response from method InstancePoolsClient.BeginCreateOrUpdate.
type InstancePoolsClientDeleteResponse ¶
type InstancePoolsClientDeleteResponse struct { }
InstancePoolsClientDeleteResponse contains the response from method InstancePoolsClient.BeginDelete.
type InstancePoolsClientGetOptions ¶
type InstancePoolsClientGetOptions struct { }
InstancePoolsClientGetOptions contains the optional parameters for the InstancePoolsClient.Get method.
type InstancePoolsClientGetResponse ¶
type InstancePoolsClientGetResponse struct { // An Azure SQL instance pool. InstancePool }
InstancePoolsClientGetResponse contains the response from method InstancePoolsClient.Get.
type InstancePoolsClientListByResourceGroupOptions ¶
type InstancePoolsClientListByResourceGroupOptions struct { }
InstancePoolsClientListByResourceGroupOptions contains the optional parameters for the InstancePoolsClient.NewListByResourceGroupPager method.
type InstancePoolsClientListByResourceGroupResponse ¶
type InstancePoolsClientListByResourceGroupResponse struct { // A list of Azure SQL instance pools. InstancePoolListResult }
InstancePoolsClientListByResourceGroupResponse contains the response from method InstancePoolsClient.NewListByResourceGroupPager.
type InstancePoolsClientListOptions ¶
type InstancePoolsClientListOptions struct { }
InstancePoolsClientListOptions contains the optional parameters for the InstancePoolsClient.NewListPager method.
type InstancePoolsClientListResponse ¶
type InstancePoolsClientListResponse struct { // A list of Azure SQL instance pools. InstancePoolListResult }
InstancePoolsClientListResponse contains the response from method InstancePoolsClient.NewListPager.
type InstancePoolsClientUpdateResponse ¶
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 ¶
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 ¶
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 ¶
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 ¶
func (j JobAgentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobAgentProperties.
func (*JobAgentProperties) UnmarshalJSON ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobAgent.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteJobAgent.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/UpdateJobAgent.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobAgent.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobAgentsByServer.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type JobAgentsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
JobAgentsClientBeginCreateOrUpdateOptions contains the optional parameters for the JobAgentsClient.BeginCreateOrUpdate method.
type JobAgentsClientBeginDeleteOptions ¶
type JobAgentsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
JobAgentsClientBeginDeleteOptions contains the optional parameters for the JobAgentsClient.BeginDelete method.
type JobAgentsClientBeginUpdateOptions ¶
type JobAgentsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
JobAgentsClientBeginUpdateOptions contains the optional parameters for the JobAgentsClient.BeginUpdate method.
type JobAgentsClientCreateOrUpdateResponse ¶
type JobAgentsClientCreateOrUpdateResponse struct { // An Azure SQL job agent. JobAgent }
JobAgentsClientCreateOrUpdateResponse contains the response from method JobAgentsClient.BeginCreateOrUpdate.
type JobAgentsClientDeleteResponse ¶
type JobAgentsClientDeleteResponse struct { }
JobAgentsClientDeleteResponse contains the response from method JobAgentsClient.BeginDelete.
type JobAgentsClientGetOptions ¶
type JobAgentsClientGetOptions struct { }
JobAgentsClientGetOptions contains the optional parameters for the JobAgentsClient.Get method.
type JobAgentsClientGetResponse ¶
type JobAgentsClientGetResponse struct { // An Azure SQL job agent. JobAgent }
JobAgentsClientGetResponse contains the response from method JobAgentsClient.Get.
type JobAgentsClientListByServerOptions ¶
type JobAgentsClientListByServerOptions struct { }
JobAgentsClientListByServerOptions contains the optional parameters for the JobAgentsClient.NewListByServerPager method.
type JobAgentsClientListByServerResponse ¶
type JobAgentsClientListByServerResponse struct { // A list of Azure SQL job agents. JobAgentListResult }
JobAgentsClientListByServerResponse contains the response from method JobAgentsClient.NewListByServerPager.
type JobAgentsClientUpdateResponse ¶
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 ¶
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 ¶
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 ¶
func (j JobCredentialProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobCredentialProperties.
func (*JobCredentialProperties) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobCredential.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteJobCredential.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobCredential.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobCredentialsByAgent.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type JobCredentialsClientCreateOrUpdateOptions struct { }
JobCredentialsClientCreateOrUpdateOptions contains the optional parameters for the JobCredentialsClient.CreateOrUpdate method.
type JobCredentialsClientCreateOrUpdateResponse ¶
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 ¶
type JobCredentialsClientDeleteOptions struct { }
JobCredentialsClientDeleteOptions contains the optional parameters for the JobCredentialsClient.Delete method.
type JobCredentialsClientDeleteResponse ¶
type JobCredentialsClientDeleteResponse struct { }
JobCredentialsClientDeleteResponse contains the response from method JobCredentialsClient.Delete.
type JobCredentialsClientGetOptions ¶
type JobCredentialsClientGetOptions struct { }
JobCredentialsClientGetOptions contains the optional parameters for the JobCredentialsClient.Get method.
type JobCredentialsClientGetResponse ¶
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 ¶
type JobCredentialsClientListByAgentOptions struct { }
JobCredentialsClientListByAgentOptions contains the optional parameters for the JobCredentialsClient.NewListByAgentPager method.
type JobCredentialsClientListByAgentResponse ¶
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 ¶
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 ¶
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 ¶
func (j JobExecutionTarget) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobExecutionTarget.
func (*JobExecutionTarget) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateJobExecution.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobExecution.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CancelJobExecution.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobExecution.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobExecutionsByAgent.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobExecutionsByAgentWithFilter.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobExecutionsByJob.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type JobExecutionsClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
JobExecutionsClientBeginCreateOptions contains the optional parameters for the JobExecutionsClient.BeginCreate method.
type JobExecutionsClientBeginCreateOrUpdateOptions ¶
type JobExecutionsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
JobExecutionsClientBeginCreateOrUpdateOptions contains the optional parameters for the JobExecutionsClient.BeginCreateOrUpdate method.
type JobExecutionsClientCancelOptions ¶
type JobExecutionsClientCancelOptions struct { }
JobExecutionsClientCancelOptions contains the optional parameters for the JobExecutionsClient.Cancel method.
type JobExecutionsClientCancelResponse ¶
type JobExecutionsClientCancelResponse struct { }
JobExecutionsClientCancelResponse contains the response from method JobExecutionsClient.Cancel.
type JobExecutionsClientCreateOrUpdateResponse ¶
type JobExecutionsClientCreateOrUpdateResponse struct { // An execution of a job JobExecution }
JobExecutionsClientCreateOrUpdateResponse contains the response from method JobExecutionsClient.BeginCreateOrUpdate.
type JobExecutionsClientCreateResponse ¶
type JobExecutionsClientCreateResponse struct { // An execution of a job JobExecution }
JobExecutionsClientCreateResponse contains the response from method JobExecutionsClient.BeginCreate.
type JobExecutionsClientGetOptions ¶
type JobExecutionsClientGetOptions struct { }
JobExecutionsClientGetOptions contains the optional parameters for the JobExecutionsClient.Get method.
type JobExecutionsClientGetResponse ¶
type JobExecutionsClientGetResponse struct { // An execution of a job JobExecution }
JobExecutionsClientGetResponse contains the response from method JobExecutionsClient.Get.
type JobExecutionsClientListByAgentOptions ¶
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 ¶
type JobExecutionsClientListByAgentResponse struct { // A list of job executions. JobExecutionListResult }
JobExecutionsClientListByAgentResponse contains the response from method JobExecutionsClient.NewListByAgentPager.
type JobExecutionsClientListByJobOptions ¶
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 ¶
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 ¶
func (j *JobListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type JobListResult.
type JobPrivateEndpoint ¶
type JobPrivateEndpoint struct { // Resource properties. Properties *JobPrivateEndpointProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
JobPrivateEndpoint - A job agent private endpoint.
func (JobPrivateEndpoint) MarshalJSON ¶
func (j JobPrivateEndpoint) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobPrivateEndpoint.
func (*JobPrivateEndpoint) UnmarshalJSON ¶
func (j *JobPrivateEndpoint) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type JobPrivateEndpoint.
type JobPrivateEndpointListResult ¶
type JobPrivateEndpointListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*JobPrivateEndpoint }
JobPrivateEndpointListResult - A list of job agent private endpoints.
func (JobPrivateEndpointListResult) MarshalJSON ¶
func (j JobPrivateEndpointListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobPrivateEndpointListResult.
func (*JobPrivateEndpointListResult) UnmarshalJSON ¶
func (j *JobPrivateEndpointListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type JobPrivateEndpointListResult.
type JobPrivateEndpointProperties ¶
type JobPrivateEndpointProperties struct { // REQUIRED; ARM resource id of the server the private endpoint will target. TargetServerAzureResourceID *string // READ-ONLY; Private endpoint id of the private endpoint. PrivateEndpointID *string }
JobPrivateEndpointProperties - Properties of job agent private endpoint.
func (JobPrivateEndpointProperties) MarshalJSON ¶
func (j JobPrivateEndpointProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobPrivateEndpointProperties.
func (*JobPrivateEndpointProperties) UnmarshalJSON ¶
func (j *JobPrivateEndpointProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type JobPrivateEndpointProperties.
type JobPrivateEndpointsClient ¶
type JobPrivateEndpointsClient struct {
// contains filtered or unexported fields
}
JobPrivateEndpointsClient contains the methods for the JobPrivateEndpoints group. Don't use this type directly, use NewJobPrivateEndpointsClient() instead.
func NewJobPrivateEndpointsClient ¶
func NewJobPrivateEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobPrivateEndpointsClient, error)
NewJobPrivateEndpointsClient creates a new instance of JobPrivateEndpointsClient 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 (*JobPrivateEndpointsClient) BeginCreateOrUpdate ¶
func (client *JobPrivateEndpointsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, privateEndpointName string, parameters JobPrivateEndpoint, options *JobPrivateEndpointsClientBeginCreateOrUpdateOptions) (*runtime.Poller[JobPrivateEndpointsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a private endpoint. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-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.
- jobAgentName - The name of the job agent.
- privateEndpointName - The name of the private endpoint.
- parameters - The requested private endpoint state.
- options - JobPrivateEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the JobPrivateEndpointsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobPrivateEndpoint.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewJobPrivateEndpointsClient().BeginCreateOrUpdate(ctx, "group1", "server1", "agent1", "endpoint1", armsql.JobPrivateEndpoint{ Properties: &armsql.JobPrivateEndpointProperties{ TargetServerAzureResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/targetserver1"), }, }, 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.JobPrivateEndpoint = armsql.JobPrivateEndpoint{ // Name: to.Ptr("endpoint1"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/privateEndpoints"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/privateEndpoints/endpoint1"), // Properties: &armsql.JobPrivateEndpointProperties{ // PrivateEndpointID: to.Ptr("EJ_47e33188-85ff-4705-8d78-444444444444_endpoint1"), // TargetServerAzureResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/targetserver1"), // }, // }
Output:
func (*JobPrivateEndpointsClient) BeginDelete ¶
func (client *JobPrivateEndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, privateEndpointName string, options *JobPrivateEndpointsClientBeginDeleteOptions) (*runtime.Poller[JobPrivateEndpointsClientDeleteResponse], error)
BeginDelete - Deletes a private endpoint. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-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.
- jobAgentName - The name of the job agent.
- privateEndpointName - The name of the private endpoint to delete.
- options - JobPrivateEndpointsClientBeginDeleteOptions contains the optional parameters for the JobPrivateEndpointsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteJobPrivateEndpoint.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewJobPrivateEndpointsClient().BeginDelete(ctx, "group1", "server1", "agent1", "endpoint1", 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 (*JobPrivateEndpointsClient) Get ¶
func (client *JobPrivateEndpointsClient) Get(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, privateEndpointName string, options *JobPrivateEndpointsClientGetOptions) (JobPrivateEndpointsClientGetResponse, error)
Get - Gets a private endpoint. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-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.
- jobAgentName - The name of the job agent.
- privateEndpointName - The name of the private endpoint to get.
- options - JobPrivateEndpointsClientGetOptions contains the optional parameters for the JobPrivateEndpointsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobPrivateEndpoint.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewJobPrivateEndpointsClient().Get(ctx, "group1", "server1", "agent1", "endpoint1", 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.JobPrivateEndpoint = armsql.JobPrivateEndpoint{ // Name: to.Ptr("endpoint1"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/privateEndpoints"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/privateEndpoints/endpoint1"), // Properties: &armsql.JobPrivateEndpointProperties{ // PrivateEndpointID: to.Ptr("EJ_47e33188-85ff-4705-8d78-444444444444_endpoint1"), // TargetServerAzureResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/targetserver1"), // }, // }
Output:
func (*JobPrivateEndpointsClient) NewListByAgentPager ¶
func (client *JobPrivateEndpointsClient) NewListByAgentPager(resourceGroupName string, serverName string, jobAgentName string, options *JobPrivateEndpointsClientListByAgentOptions) *runtime.Pager[JobPrivateEndpointsClientListByAgentResponse]
NewListByAgentPager - Gets a list of job agent private endpoints.
Generated from API version 2023-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.
- jobAgentName - The name of the job agent.
- options - JobPrivateEndpointsClientListByAgentOptions contains the optional parameters for the JobPrivateEndpointsClient.NewListByAgentPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobPrivateEndpointsByAgent.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewJobPrivateEndpointsClient().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.JobPrivateEndpointListResult = armsql.JobPrivateEndpointListResult{ // Value: []*armsql.JobPrivateEndpoint{ // { // Name: to.Ptr("endpoint1"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/privateEndpoints"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/privateEndpoints/endpoint1"), // Properties: &armsql.JobPrivateEndpointProperties{ // PrivateEndpointID: to.Ptr("EJ_47e33188-85ff-4705-8d78-444444444444_endpoint1"), // TargetServerAzureResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/targetserver1"), // }, // }, // { // Name: to.Ptr("endpoint2"), // Type: to.Ptr("Microsoft.Sql/servers/jobAgents/privateEndpoints"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/privateEndpoints/endpoint2"), // Properties: &armsql.JobPrivateEndpointProperties{ // PrivateEndpointID: to.Ptr("EJ_00000000-85ff-222-8d78-444444444444_endpoint2"), // TargetServerAzureResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/targetserver2"), // }, // }}, // } }
Output:
type JobPrivateEndpointsClientBeginCreateOrUpdateOptions ¶
type JobPrivateEndpointsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
JobPrivateEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the JobPrivateEndpointsClient.BeginCreateOrUpdate method.
type JobPrivateEndpointsClientBeginDeleteOptions ¶
type JobPrivateEndpointsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
JobPrivateEndpointsClientBeginDeleteOptions contains the optional parameters for the JobPrivateEndpointsClient.BeginDelete method.
type JobPrivateEndpointsClientCreateOrUpdateResponse ¶
type JobPrivateEndpointsClientCreateOrUpdateResponse struct { // A job agent private endpoint. JobPrivateEndpoint }
JobPrivateEndpointsClientCreateOrUpdateResponse contains the response from method JobPrivateEndpointsClient.BeginCreateOrUpdate.
type JobPrivateEndpointsClientDeleteResponse ¶
type JobPrivateEndpointsClientDeleteResponse struct { }
JobPrivateEndpointsClientDeleteResponse contains the response from method JobPrivateEndpointsClient.BeginDelete.
type JobPrivateEndpointsClientGetOptions ¶
type JobPrivateEndpointsClientGetOptions struct { }
JobPrivateEndpointsClientGetOptions contains the optional parameters for the JobPrivateEndpointsClient.Get method.
type JobPrivateEndpointsClientGetResponse ¶
type JobPrivateEndpointsClientGetResponse struct { // A job agent private endpoint. JobPrivateEndpoint }
JobPrivateEndpointsClientGetResponse contains the response from method JobPrivateEndpointsClient.Get.
type JobPrivateEndpointsClientListByAgentOptions ¶
type JobPrivateEndpointsClientListByAgentOptions struct { }
JobPrivateEndpointsClientListByAgentOptions contains the optional parameters for the JobPrivateEndpointsClient.NewListByAgentPager method.
type JobPrivateEndpointsClientListByAgentResponse ¶
type JobPrivateEndpointsClientListByAgentResponse struct { // A list of job agent private endpoints. JobPrivateEndpointListResult }
JobPrivateEndpointsClientListByAgentResponse contains the response from method JobPrivateEndpointsClient.NewListByAgentPager.
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 ¶
func (j JobProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobProperties.
func (*JobProperties) UnmarshalJSON ¶
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 ¶
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 ¶
func (j JobStepAction) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobStepAction.
func (*JobStepAction) UnmarshalJSON ¶
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 ¶
func (j JobStepExecutionOptions) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobStepExecutionOptions.
func (*JobStepExecutionOptions) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobExecutionStep.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobExecutionSteps.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type JobStepExecutionsClientGetOptions struct { }
JobStepExecutionsClientGetOptions contains the optional parameters for the JobStepExecutionsClient.Get method.
type JobStepExecutionsClientGetResponse ¶
type JobStepExecutionsClientGetResponse struct { // An execution of a job JobExecution }
JobStepExecutionsClientGetResponse contains the response from method JobStepExecutionsClient.Get.
type JobStepExecutionsClientListByJobExecutionOptions ¶
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 ¶
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 ¶
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 ¶
func (j JobStepOutput) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobStepOutput.
func (*JobStepOutput) UnmarshalJSON ¶
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 ¶
func (j JobStepProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobStepProperties.
func (*JobStepProperties) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobStepMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobStepMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteJobStep.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobStepByJob.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobStepByVersion.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobStepsByJob.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobStepsByVersion.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type JobStepsClientCreateOrUpdateOptions struct { }
JobStepsClientCreateOrUpdateOptions contains the optional parameters for the JobStepsClient.CreateOrUpdate method.
type JobStepsClientCreateOrUpdateResponse ¶
type JobStepsClientCreateOrUpdateResponse struct { // A job step. JobStep }
JobStepsClientCreateOrUpdateResponse contains the response from method JobStepsClient.CreateOrUpdate.
type JobStepsClientDeleteOptions ¶
type JobStepsClientDeleteOptions struct { }
JobStepsClientDeleteOptions contains the optional parameters for the JobStepsClient.Delete method.
type JobStepsClientDeleteResponse ¶
type JobStepsClientDeleteResponse struct { }
JobStepsClientDeleteResponse contains the response from method JobStepsClient.Delete.
type JobStepsClientGetByVersionOptions ¶
type JobStepsClientGetByVersionOptions struct { }
JobStepsClientGetByVersionOptions contains the optional parameters for the JobStepsClient.GetByVersion method.
type JobStepsClientGetByVersionResponse ¶
type JobStepsClientGetByVersionResponse struct { // A job step. JobStep }
JobStepsClientGetByVersionResponse contains the response from method JobStepsClient.GetByVersion.
type JobStepsClientGetOptions ¶
type JobStepsClientGetOptions struct { }
JobStepsClientGetOptions contains the optional parameters for the JobStepsClient.Get method.
type JobStepsClientGetResponse ¶
type JobStepsClientGetResponse struct { // A job step. JobStep }
JobStepsClientGetResponse contains the response from method JobStepsClient.Get.
type JobStepsClientListByJobOptions ¶
type JobStepsClientListByJobOptions struct { }
JobStepsClientListByJobOptions contains the optional parameters for the JobStepsClient.NewListByJobPager method.
type JobStepsClientListByJobResponse ¶
type JobStepsClientListByJobResponse struct { // A list of job steps. JobStepListResult }
JobStepsClientListByJobResponse contains the response from method JobStepsClient.NewListByJobPager.
type JobStepsClientListByVersionOptions ¶
type JobStepsClientListByVersionOptions struct { }
JobStepsClientListByVersionOptions contains the optional parameters for the JobStepsClient.NewListByVersionPager method.
type JobStepsClientListByVersionResponse ¶
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 ¶
MarshalJSON implements the json.Marshaller interface for type JobTarget.
func (*JobTarget) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobExecutionTarget.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobExecutionTargetsByExecution.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobExecutionTargetsByStep.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type JobTargetExecutionsClientGetOptions struct { }
JobTargetExecutionsClientGetOptions contains the optional parameters for the JobTargetExecutionsClient.Get method.
type JobTargetExecutionsClientGetResponse ¶
type JobTargetExecutionsClientGetResponse struct { // An execution of a job JobExecution }
JobTargetExecutionsClientGetResponse contains the response from method JobTargetExecutionsClient.Get.
type JobTargetExecutionsClientListByJobExecutionOptions ¶
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 ¶
type JobTargetExecutionsClientListByJobExecutionResponse struct { // A list of job executions. JobExecutionListResult }
JobTargetExecutionsClientListByJobExecutionResponse contains the response from method JobTargetExecutionsClient.NewListByJobExecutionPager.
type JobTargetExecutionsClientListByStepOptions ¶
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 ¶
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 ¶
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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobTargetGroupMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobTargetGroupMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteJobTargetGroup.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobTargetGroup.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobTargetGroups.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type JobTargetGroupsClientCreateOrUpdateOptions struct { }
JobTargetGroupsClientCreateOrUpdateOptions contains the optional parameters for the JobTargetGroupsClient.CreateOrUpdate method.
type JobTargetGroupsClientCreateOrUpdateResponse ¶
type JobTargetGroupsClientCreateOrUpdateResponse struct { // A group of job targets. JobTargetGroup }
JobTargetGroupsClientCreateOrUpdateResponse contains the response from method JobTargetGroupsClient.CreateOrUpdate.
type JobTargetGroupsClientDeleteOptions ¶
type JobTargetGroupsClientDeleteOptions struct { }
JobTargetGroupsClientDeleteOptions contains the optional parameters for the JobTargetGroupsClient.Delete method.
type JobTargetGroupsClientDeleteResponse ¶
type JobTargetGroupsClientDeleteResponse struct { }
JobTargetGroupsClientDeleteResponse contains the response from method JobTargetGroupsClient.Delete.
type JobTargetGroupsClientGetOptions ¶
type JobTargetGroupsClientGetOptions struct { }
JobTargetGroupsClientGetOptions contains the optional parameters for the JobTargetGroupsClient.Get method.
type JobTargetGroupsClientGetResponse ¶
type JobTargetGroupsClientGetResponse struct { // A group of job targets. JobTargetGroup }
JobTargetGroupsClientGetResponse contains the response from method JobTargetGroupsClient.Get.
type JobTargetGroupsClientListByAgentOptions ¶
type JobTargetGroupsClientListByAgentOptions struct { }
JobTargetGroupsClientListByAgentOptions contains the optional parameters for the JobTargetGroupsClient.NewListByAgentPager method.
type JobTargetGroupsClientListByAgentResponse ¶
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 ¶
func (j JobVersion) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobVersion.
func (*JobVersion) UnmarshalJSON ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobVersion.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobVersions.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type JobVersionsClientGetOptions struct { }
JobVersionsClientGetOptions contains the optional parameters for the JobVersionsClient.Get method.
type JobVersionsClientGetResponse ¶
type JobVersionsClientGetResponse struct { // A job version. JobVersion }
JobVersionsClientGetResponse contains the response from method JobVersionsClient.Get.
type JobVersionsClientListByJobOptions ¶
type JobVersionsClientListByJobOptions struct { }
JobVersionsClientListByJobOptions contains the optional parameters for the JobVersionsClient.NewListByJobPager method.
type JobVersionsClientListByJobResponse ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteJob.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJob.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobsByAgent.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type JobsClientCreateOrUpdateOptions struct { }
JobsClientCreateOrUpdateOptions contains the optional parameters for the JobsClient.CreateOrUpdate method.
type JobsClientCreateOrUpdateResponse ¶
type JobsClientCreateOrUpdateResponse struct { // A job. Job }
JobsClientCreateOrUpdateResponse contains the response from method JobsClient.CreateOrUpdate.
type JobsClientDeleteOptions ¶
type JobsClientDeleteOptions struct { }
JobsClientDeleteOptions contains the optional parameters for the JobsClient.Delete method.
type JobsClientDeleteResponse ¶
type JobsClientDeleteResponse struct { }
JobsClientDeleteResponse contains the response from method JobsClient.Delete.
type JobsClientGetOptions ¶
type JobsClientGetOptions struct { }
JobsClientGetOptions contains the optional parameters for the JobsClient.Get method.
type JobsClientGetResponse ¶
type JobsClientGetResponse struct { // A job. Job }
JobsClientGetResponse contains the response from method JobsClient.Get.
type JobsClientListByAgentOptions ¶
type JobsClientListByAgentOptions struct { }
JobsClientListByAgentOptions contains the optional parameters for the JobsClient.NewListByAgentPager method.
type JobsClientListByAgentResponse ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsEnable.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsDisable.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type LedgerDigestUploadsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LedgerDigestUploadsClientBeginCreateOrUpdateOptions contains the optional parameters for the LedgerDigestUploadsClient.BeginCreateOrUpdate method.
type LedgerDigestUploadsClientBeginDisableOptions ¶
type LedgerDigestUploadsClientBeginDisableOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LedgerDigestUploadsClientBeginDisableOptions contains the optional parameters for the LedgerDigestUploadsClient.BeginDisable method.
type LedgerDigestUploadsClientCreateOrUpdateResponse ¶
type LedgerDigestUploadsClientCreateOrUpdateResponse struct { // Azure SQL Database ledger digest upload settings. LedgerDigestUploads }
LedgerDigestUploadsClientCreateOrUpdateResponse contains the response from method LedgerDigestUploadsClient.BeginCreateOrUpdate.
type LedgerDigestUploadsClientDisableResponse ¶
type LedgerDigestUploadsClientDisableResponse struct { // Azure SQL Database ledger digest upload settings. LedgerDigestUploads }
LedgerDigestUploadsClientDisableResponse contains the response from method LedgerDigestUploadsClient.BeginDisable.
type LedgerDigestUploadsClientGetOptions ¶
type LedgerDigestUploadsClientGetOptions struct { }
LedgerDigestUploadsClientGetOptions contains the optional parameters for the LedgerDigestUploadsClient.Get method.
type LedgerDigestUploadsClientGetResponse ¶
type LedgerDigestUploadsClientGetResponse struct { // Azure SQL Database ledger digest upload settings. LedgerDigestUploads }
LedgerDigestUploadsClientGetResponse contains the response from method LedgerDigestUploadsClient.Get.
type LedgerDigestUploadsClientListByDatabaseOptions ¶
type LedgerDigestUploadsClientListByDatabaseOptions struct { }
LedgerDigestUploadsClientListByDatabaseOptions contains the optional parameters for the LedgerDigestUploadsClient.NewListByDatabasePager method.
type LedgerDigestUploadsClientListByDatabaseResponse ¶
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 ¶
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 ¶
func (l LedgerDigestUploadsProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LedgerDigestUploadsProperties.
func (*LedgerDigestUploadsProperties) UnmarshalJSON ¶
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 ¶
func (l LicenseTypeCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LicenseTypeCapability.
func (*LicenseTypeCapability) UnmarshalJSON ¶
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 ¶
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 ¶
func (l LogSizeCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LogSizeCapability.
func (*LogSizeCapability) UnmarshalJSON ¶
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 ¶
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 ¶
func (l *LogicalDatabaseTransparentDataEncryptionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LogicalDatabaseTransparentDataEncryptionListResult.
type LogicalServerAdvancedThreatProtectionListResult ¶
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 ¶
func (l LogicalServerAdvancedThreatProtectionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LogicalServerAdvancedThreatProtectionListResult.
func (*LogicalServerAdvancedThreatProtectionListResult) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
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 ¶
func (l *LongTermRetentionBackupOperationResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LongTermRetentionBackupOperationResult.
type LongTermRetentionBackupProperties ¶
type LongTermRetentionBackupProperties struct { // The setting whether the LTR backup is immutable IsBackupImmutable *bool // 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 BackupStorageAccessTier for the LTR backup BackupStorageAccessTier *BackupStorageAccessTier // 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) BeginChangeAccessTier ¶
func (client *LongTermRetentionBackupsClient) BeginChangeAccessTier(ctx context.Context, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, parameters ChangeLongTermRetentionBackupAccessTierParameters, options *LongTermRetentionBackupsClientBeginChangeAccessTierOptions) (*runtime.Poller[LongTermRetentionBackupsClientChangeAccessTierResponse], error)
BeginChangeAccessTier - Change a long term retention backup access tier. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-05-01-preview
- options - LongTermRetentionBackupsClientBeginChangeAccessTierOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginChangeAccessTier method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ChangeLongTermRetentionBackupAccessTier.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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().BeginChangeAccessTier(ctx, "japaneast", "serverName", "databaseName", "55555555-6666-7777-8888-999999999999;131637960820000000;Archive", armsql.ChangeLongTermRetentionBackupAccessTierParameters{ BackupStorageAccessTier: to.Ptr("Hot"), OperationMode: to.Ptr("Copy"), }, 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.LongTermRetentionBackup = armsql.LongTermRetentionBackup{ // Name: to.Ptr("55555555-6666-7777-8888-999999999999;131637960820000000;Archive"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/serverName/longTermRetentionDatabases/databaseName/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000;Archive"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), // BackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-09-06T08:00:00.000Z"); return t}()), // DatabaseDeletionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-06T08:00:00.000Z"); return t}()), // DatabaseName: to.Ptr("databaseName"), // ServerCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-09-06T08:00:00.000Z"); return t}()), // ServerName: to.Ptr("serverName"), // }, // }
Output:
func (*LongTermRetentionBackupsClient) BeginChangeAccessTierByResourceGroup ¶
func (client *LongTermRetentionBackupsClient) BeginChangeAccessTierByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, parameters ChangeLongTermRetentionBackupAccessTierParameters, options *LongTermRetentionBackupsClientBeginChangeAccessTierByResourceGroupOptions) (*runtime.Poller[LongTermRetentionBackupsClientChangeAccessTierByResourceGroupResponse], error)
BeginChangeAccessTierByResourceGroup - Change a long term retention backup access tier. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-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 - LongTermRetentionBackupsClientBeginChangeAccessTierByResourceGroupOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginChangeAccessTierByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedChangeLongTermRetentionBackupAccessTier.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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().BeginChangeAccessTierByResourceGroup(ctx, "resourceGroupName", "japaneast", "serverName", "databaseName", "55555555-6666-7777-8888-999999999999;131637960820000000;Archive", armsql.ChangeLongTermRetentionBackupAccessTierParameters{ BackupStorageAccessTier: to.Ptr("Hot"), OperationMode: to.Ptr("Copy"), }, 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.LongTermRetentionBackup = armsql.LongTermRetentionBackup{ // Name: to.Ptr("55555555-6666-7777-8888-999999999999;131637960820000000;Archive"), // Type: to.Ptr("Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroupName/providers/Microsoft.Sql/locations/japaneast/longTermRetentionServers/serverName/longTermRetentionDatabases/databaseName/longTermRetentionBackups/55555555-6666-7777-8888-999999999999;131637960820000000;Archive"), // 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("databaseName"), // ServerCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-09-06T08:00:00.000Z"); return t}()), // ServerName: to.Ptr("serverName"), // }, // }
Output:
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 2023-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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupCopy.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2023-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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupCopy.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2023-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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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;Hot", 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 2023-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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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;Archive", 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 2023-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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2023-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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2023-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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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;Archive", 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("55555555-6666-7777-8888-999999999999;131637960820000000;Archive"), // 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;Archive"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageAccessTier: to.Ptr(armsql.BackupStorageAccessTierArchive), // 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"), // IsBackupImmutable: to.Ptr(false), // 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 2023-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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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;Archive", 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("55555555-6666-7777-8888-999999999999;131637960820000000;Archive"), // 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;Archive"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageAccessTier: to.Ptr(armsql.BackupStorageAccessTierArchive), // 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"), // IsBackupImmutable: to.Ptr(false), // 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 ¶
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 2023-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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupListByDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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;Archive"), // 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;Archive"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageAccessTier: to.Ptr(armsql.BackupStorageAccessTierArchive), // 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"), // IsBackupImmutable: to.Ptr(false), // 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;131637960820000000;Hot"), // 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;Hot"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageAccessTier: to.Ptr(armsql.BackupStorageAccessTierHot), // 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"), // IsBackupImmutable: to.Ptr(false), // 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;Archive"), // 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;Hot"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageAccessTier: to.Ptr(armsql.BackupStorageAccessTierHot), // 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"), // IsBackupImmutable: to.Ptr(false), // 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 ¶
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 2023-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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupListByLocation.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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;131637960820000000;Archive"), // 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;Archive"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageAccessTier: to.Ptr(armsql.BackupStorageAccessTierArchive), // 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"), // IsBackupImmutable: to.Ptr(false), // 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("55555555-6666-7777-8888-999999999999;131637960820000000;Hot"), // 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;Hot"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageAccessTier: to.Ptr(armsql.BackupStorageAccessTierHot), // 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"), // IsBackupImmutable: to.Ptr(false), // 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;131657960820000000;Archive"), // 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;Archive"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageAccessTier: to.Ptr(armsql.BackupStorageAccessTierArchive), // 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"), // IsBackupImmutable: to.Ptr(false), // ServerCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-10T08:00:00.000Z"); return t}()), // ServerName: to.Ptr("testserver2"), // }, // }}, // } }
Output:
func (*LongTermRetentionBackupsClient) NewListByResourceGroupDatabasePager ¶
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 based on a particular resource group.
Generated from API version 2023-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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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;Archive"), // 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;Archive"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageAccessTier: to.Ptr(armsql.BackupStorageAccessTierArchive), // 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"), // IsBackupImmutable: to.Ptr(false), // 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;131637960820000000;Hot"), // 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;Hot"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageAccessTier: to.Ptr(armsql.BackupStorageAccessTierHot), // 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"), // IsBackupImmutable: to.Ptr(false), // 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;Archive"), // 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;Archive"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageAccessTier: to.Ptr(armsql.BackupStorageAccessTierArchive), // 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"), // IsBackupImmutable: to.Ptr(false), // 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 ¶
func (client *LongTermRetentionBackupsClient) NewListByResourceGroupLocationPager(resourceGroupName string, locationName string, options *LongTermRetentionBackupsClientListByResourceGroupLocationOptions) *runtime.Pager[LongTermRetentionBackupsClientListByResourceGroupLocationResponse]
NewListByResourceGroupLocationPager - Lists the long term retention backups for a given location based on resource group.
Generated from API version 2023-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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByLocation.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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;131637960820000000;Archive"), // 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;Archive"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageAccessTier: to.Ptr(armsql.BackupStorageAccessTierArchive), // 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"), // IsBackupImmutable: to.Ptr(false), // 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("55555555-6666-7777-8888-999999999999;131637960820000000;Hot"), // 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;Hot"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageAccessTier: to.Ptr(armsql.BackupStorageAccessTierHot), // 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"), // IsBackupImmutable: to.Ptr(false), // 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;131657960820000000;Archive"), // 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;Archive"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageAccessTier: to.Ptr(armsql.BackupStorageAccessTierArchive), // 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"), // IsBackupImmutable: to.Ptr(false), // ServerCreateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-04-10T08:00:00.000Z"); return t}()), // ServerName: to.Ptr("testserver2"), // }, // }}, // } }
Output:
func (*LongTermRetentionBackupsClient) NewListByResourceGroupServerPager ¶
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 based on resource groups.
Generated from API version 2023-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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByServer.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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;Archive"), // 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;Archive"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageAccessTier: to.Ptr(armsql.BackupStorageAccessTierArchive), // 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"), // IsBackupImmutable: to.Ptr(false), // 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;131637960820000000;Hot"), // 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;Hot"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageAccessTier: to.Ptr(armsql.BackupStorageAccessTierHot), // 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"), // IsBackupImmutable: to.Ptr(false), // 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;Archive"), // 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;Archive"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageAccessTier: to.Ptr(armsql.BackupStorageAccessTierArchive), // 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"), // IsBackupImmutable: to.Ptr(false), // 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 ¶
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 2023-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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionBackupListByServer.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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;Archive"), // 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;Archive"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageAccessTier: to.Ptr(armsql.BackupStorageAccessTierArchive), // 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"), // IsBackupImmutable: to.Ptr(false), // 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;131637960820000000;Hot"), // 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;Hot"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageAccessTier: to.Ptr(armsql.BackupStorageAccessTierHot), // 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"), // IsBackupImmutable: to.Ptr(false), // 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;Archive"), // 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;Archive"), // Properties: &armsql.LongTermRetentionBackupProperties{ // BackupStorageAccessTier: to.Ptr(armsql.BackupStorageAccessTierArchive), // 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"), // IsBackupImmutable: to.Ptr(false), // 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 LongTermRetentionBackupsClientBeginChangeAccessTierByResourceGroupOptions ¶
type LongTermRetentionBackupsClientBeginChangeAccessTierByResourceGroupOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LongTermRetentionBackupsClientBeginChangeAccessTierByResourceGroupOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginChangeAccessTierByResourceGroup method.
type LongTermRetentionBackupsClientBeginChangeAccessTierOptions ¶
type LongTermRetentionBackupsClientBeginChangeAccessTierOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LongTermRetentionBackupsClientBeginChangeAccessTierOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginChangeAccessTier method.
type LongTermRetentionBackupsClientBeginCopyByResourceGroupOptions ¶
type LongTermRetentionBackupsClientBeginCopyByResourceGroupOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LongTermRetentionBackupsClientBeginCopyByResourceGroupOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginCopyByResourceGroup method.
type LongTermRetentionBackupsClientBeginCopyOptions ¶
type LongTermRetentionBackupsClientBeginCopyOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LongTermRetentionBackupsClientBeginCopyOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginCopy method.
type LongTermRetentionBackupsClientBeginDeleteByResourceGroupOptions ¶
type LongTermRetentionBackupsClientBeginDeleteByResourceGroupOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LongTermRetentionBackupsClientBeginDeleteByResourceGroupOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginDeleteByResourceGroup method.
type LongTermRetentionBackupsClientBeginDeleteOptions ¶
type LongTermRetentionBackupsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LongTermRetentionBackupsClientBeginDeleteOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginDelete method.
type LongTermRetentionBackupsClientBeginUpdateByResourceGroupOptions ¶
type LongTermRetentionBackupsClientBeginUpdateByResourceGroupOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LongTermRetentionBackupsClientBeginUpdateByResourceGroupOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginUpdateByResourceGroup method.
type LongTermRetentionBackupsClientBeginUpdateOptions ¶
type LongTermRetentionBackupsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LongTermRetentionBackupsClientBeginUpdateOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginUpdate method.
type LongTermRetentionBackupsClientChangeAccessTierByResourceGroupResponse ¶
type LongTermRetentionBackupsClientChangeAccessTierByResourceGroupResponse struct { // A long term retention backup. LongTermRetentionBackup }
LongTermRetentionBackupsClientChangeAccessTierByResourceGroupResponse contains the response from method LongTermRetentionBackupsClient.BeginChangeAccessTierByResourceGroup.
type LongTermRetentionBackupsClientChangeAccessTierResponse ¶
type LongTermRetentionBackupsClientChangeAccessTierResponse struct { // A long term retention backup. LongTermRetentionBackup }
LongTermRetentionBackupsClientChangeAccessTierResponse contains the response from method LongTermRetentionBackupsClient.BeginChangeAccessTier.
type LongTermRetentionBackupsClientCopyByResourceGroupResponse ¶
type LongTermRetentionBackupsClientCopyByResourceGroupResponse struct { // A LongTermRetentionBackup operation result resource. LongTermRetentionBackupOperationResult }
LongTermRetentionBackupsClientCopyByResourceGroupResponse contains the response from method LongTermRetentionBackupsClient.BeginCopyByResourceGroup.
type LongTermRetentionBackupsClientCopyResponse ¶
type LongTermRetentionBackupsClientCopyResponse struct { // A LongTermRetentionBackup operation result resource. LongTermRetentionBackupOperationResult }
LongTermRetentionBackupsClientCopyResponse contains the response from method LongTermRetentionBackupsClient.BeginCopy.
type LongTermRetentionBackupsClientDeleteByResourceGroupResponse ¶
type LongTermRetentionBackupsClientDeleteByResourceGroupResponse struct { }
LongTermRetentionBackupsClientDeleteByResourceGroupResponse contains the response from method LongTermRetentionBackupsClient.BeginDeleteByResourceGroup.
type LongTermRetentionBackupsClientDeleteResponse ¶
type LongTermRetentionBackupsClientDeleteResponse struct { }
LongTermRetentionBackupsClientDeleteResponse contains the response from method LongTermRetentionBackupsClient.BeginDelete.
type LongTermRetentionBackupsClientGetByResourceGroupOptions ¶
type LongTermRetentionBackupsClientGetByResourceGroupOptions struct { }
LongTermRetentionBackupsClientGetByResourceGroupOptions contains the optional parameters for the LongTermRetentionBackupsClient.GetByResourceGroup method.
type LongTermRetentionBackupsClientGetByResourceGroupResponse ¶
type LongTermRetentionBackupsClientGetByResourceGroupResponse struct { // A long term retention backup. LongTermRetentionBackup }
LongTermRetentionBackupsClientGetByResourceGroupResponse contains the response from method LongTermRetentionBackupsClient.GetByResourceGroup.
type LongTermRetentionBackupsClientGetOptions ¶
type LongTermRetentionBackupsClientGetOptions struct { }
LongTermRetentionBackupsClientGetOptions contains the optional parameters for the LongTermRetentionBackupsClient.Get method.
type LongTermRetentionBackupsClientGetResponse ¶
type LongTermRetentionBackupsClientGetResponse struct { // A long term retention backup. LongTermRetentionBackup }
LongTermRetentionBackupsClientGetResponse contains the response from method LongTermRetentionBackupsClient.Get.
type LongTermRetentionBackupsClientListByDatabaseOptions ¶
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 ¶
type LongTermRetentionBackupsClientListByDatabaseResponse struct { // A list of long term retention backups. LongTermRetentionBackupListResult }
LongTermRetentionBackupsClientListByDatabaseResponse contains the response from method LongTermRetentionBackupsClient.NewListByDatabasePager.
type LongTermRetentionBackupsClientListByLocationOptions ¶
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 ¶
type LongTermRetentionBackupsClientListByLocationResponse struct { // A list of long term retention backups. LongTermRetentionBackupListResult }
LongTermRetentionBackupsClientListByLocationResponse contains the response from method LongTermRetentionBackupsClient.NewListByLocationPager.
type LongTermRetentionBackupsClientListByResourceGroupDatabaseOptions ¶
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 ¶
type LongTermRetentionBackupsClientListByResourceGroupDatabaseResponse struct { // A list of long term retention backups. LongTermRetentionBackupListResult }
LongTermRetentionBackupsClientListByResourceGroupDatabaseResponse contains the response from method LongTermRetentionBackupsClient.NewListByResourceGroupDatabasePager.
type LongTermRetentionBackupsClientListByResourceGroupLocationOptions ¶
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 ¶
type LongTermRetentionBackupsClientListByResourceGroupLocationResponse struct { // A list of long term retention backups. LongTermRetentionBackupListResult }
LongTermRetentionBackupsClientListByResourceGroupLocationResponse contains the response from method LongTermRetentionBackupsClient.NewListByResourceGroupLocationPager.
type LongTermRetentionBackupsClientListByResourceGroupServerOptions ¶
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 ¶
type LongTermRetentionBackupsClientListByResourceGroupServerResponse struct { // A list of long term retention backups. LongTermRetentionBackupListResult }
LongTermRetentionBackupsClientListByResourceGroupServerResponse contains the response from method LongTermRetentionBackupsClient.NewListByResourceGroupServerPager.
type LongTermRetentionBackupsClientListByServerOptions ¶
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 ¶
type LongTermRetentionBackupsClientListByServerResponse struct { // A list of long term retention backups. LongTermRetentionBackupListResult }
LongTermRetentionBackupsClientListByServerResponse contains the response from method LongTermRetentionBackupsClient.NewListByServerPager.
type LongTermRetentionBackupsClientUpdateByResourceGroupResponse ¶
type LongTermRetentionBackupsClientUpdateByResourceGroupResponse struct { // A LongTermRetentionBackup operation result resource. LongTermRetentionBackupOperationResult }
LongTermRetentionBackupsClientUpdateByResourceGroupResponse contains the response from method LongTermRetentionBackupsClient.BeginUpdateByResourceGroup.
type LongTermRetentionBackupsClientUpdateResponse ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByInstance.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByLocation.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByInstance.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByLocation.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type LongTermRetentionManagedInstanceBackupsClientBeginDeleteByResourceGroupOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LongTermRetentionManagedInstanceBackupsClientBeginDeleteByResourceGroupOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.BeginDeleteByResourceGroup method.
type LongTermRetentionManagedInstanceBackupsClientBeginDeleteOptions ¶
type LongTermRetentionManagedInstanceBackupsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LongTermRetentionManagedInstanceBackupsClientBeginDeleteOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.BeginDelete method.
type LongTermRetentionManagedInstanceBackupsClientDeleteByResourceGroupResponse ¶
type LongTermRetentionManagedInstanceBackupsClientDeleteByResourceGroupResponse struct { }
LongTermRetentionManagedInstanceBackupsClientDeleteByResourceGroupResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.BeginDeleteByResourceGroup.
type LongTermRetentionManagedInstanceBackupsClientDeleteResponse ¶
type LongTermRetentionManagedInstanceBackupsClientDeleteResponse struct { }
LongTermRetentionManagedInstanceBackupsClientDeleteResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.BeginDelete.
type LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupOptions ¶
type LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupOptions struct { }
LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.GetByResourceGroup method.
type LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupResponse ¶
type LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupResponse struct { // A long term retention backup for a managed database. ManagedInstanceLongTermRetentionBackup }
LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.GetByResourceGroup.
type LongTermRetentionManagedInstanceBackupsClientGetOptions ¶
type LongTermRetentionManagedInstanceBackupsClientGetOptions struct { }
LongTermRetentionManagedInstanceBackupsClientGetOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.Get method.
type LongTermRetentionManagedInstanceBackupsClientGetResponse ¶
type LongTermRetentionManagedInstanceBackupsClientGetResponse struct { // A long term retention backup for a managed database. ManagedInstanceLongTermRetentionBackup }
LongTermRetentionManagedInstanceBackupsClientGetResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.Get.
type LongTermRetentionManagedInstanceBackupsClientListByDatabaseOptions ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
func (l LongTermRetentionOperationResultProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LongTermRetentionOperationResultProperties.
func (*LongTermRetentionOperationResultProperties) UnmarshalJSON ¶
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 - Set or update a database's long term retention policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionPolicyCreateOrUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.LongTermRetentionPolicyProperties{ BackupStorageAccessTier: to.Ptr(armsql.BackupStorageAccessTierHot), MakeBackupsImmutable: to.Ptr(true), 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.LongTermRetentionPolicyProperties{ // BackupStorageAccessTier: to.Ptr(armsql.BackupStorageAccessTierHot), // MakeBackupsImmutable: to.Ptr(true), // 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 2023-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionPolicyGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.LongTermRetentionPolicyProperties{ // BackupStorageAccessTier: to.Ptr(armsql.BackupStorageAccessTierArchive), // MakeBackupsImmutable: to.Ptr(true), // MonthlyRetention: to.Ptr("P1Y"), // WeekOfYear: to.Ptr[int32](5), // WeeklyRetention: to.Ptr("P1M"), // YearlyRetention: to.Ptr("P5Y"), // }, // }
Output:
func (*LongTermRetentionPoliciesClient) NewListByDatabasePager ¶
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 2023-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 - LongTermRetentionPoliciesClientListByDatabaseOptions contains the optional parameters for the LongTermRetentionPoliciesClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/LongTermRetentionPolicyListByDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.LongTermRetentionPolicyProperties{ // BackupStorageAccessTier: to.Ptr(armsql.BackupStorageAccessTierArchive), // MakeBackupsImmutable: to.Ptr(true), // MonthlyRetention: to.Ptr("P1Y"), // WeekOfYear: to.Ptr[int32](5), // WeeklyRetention: to.Ptr("P1M"), // YearlyRetention: to.Ptr("P5Y"), // }, // }}, // } }
Output:
type LongTermRetentionPoliciesClientBeginCreateOrUpdateOptions ¶
type LongTermRetentionPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LongTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the LongTermRetentionPoliciesClient.BeginCreateOrUpdate method.
type LongTermRetentionPoliciesClientCreateOrUpdateResponse ¶
type LongTermRetentionPoliciesClientCreateOrUpdateResponse struct { // A long term retention policy. LongTermRetentionPolicy }
LongTermRetentionPoliciesClientCreateOrUpdateResponse contains the response from method LongTermRetentionPoliciesClient.BeginCreateOrUpdate.
type LongTermRetentionPoliciesClientGetOptions ¶
type LongTermRetentionPoliciesClientGetOptions struct { }
LongTermRetentionPoliciesClientGetOptions contains the optional parameters for the LongTermRetentionPoliciesClient.Get method.
type LongTermRetentionPoliciesClientGetResponse ¶
type LongTermRetentionPoliciesClientGetResponse struct { // A long term retention policy. LongTermRetentionPolicy }
LongTermRetentionPoliciesClientGetResponse contains the response from method LongTermRetentionPoliciesClient.Get.
type LongTermRetentionPoliciesClientListByDatabaseOptions ¶
type LongTermRetentionPoliciesClientListByDatabaseOptions struct { }
LongTermRetentionPoliciesClientListByDatabaseOptions contains the optional parameters for the LongTermRetentionPoliciesClient.NewListByDatabasePager method.
type LongTermRetentionPoliciesClientListByDatabaseResponse ¶
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 *LongTermRetentionPolicyProperties // 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 ¶
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 ¶
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 LongTermRetentionPolicyProperties ¶
type LongTermRetentionPolicyProperties struct { // The BackupStorageAccessTier for the LTR backups BackupStorageAccessTier *BackupStorageAccessTier // The setting whether to make LTR backups immutable MakeBackupsImmutable *bool // 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 }
LongTermRetentionPolicyProperties - Properties of a long term retention policy
func (LongTermRetentionPolicyProperties) MarshalJSON ¶
func (l LongTermRetentionPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LongTermRetentionPolicyProperties.
func (*LongTermRetentionPolicyProperties) UnmarshalJSON ¶
func (l *LongTermRetentionPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LongTermRetentionPolicyProperties.
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 ¶
func (m MaintenanceConfigurationCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MaintenanceConfigurationCapability.
func (*MaintenanceConfigurationCapability) UnmarshalJSON ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetMaintenanceWindowOptions.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type MaintenanceWindowOptionsClientGetOptions struct { }
MaintenanceWindowOptionsClientGetOptions contains the optional parameters for the MaintenanceWindowOptionsClient.Get method.
type MaintenanceWindowOptionsClientGetResponse ¶
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 ¶
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 ¶
func (m MaintenanceWindowTimeRange) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MaintenanceWindowTimeRange.
func (*MaintenanceWindowTimeRange) UnmarshalJSON ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateMaintenanceWindows.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetMaintenanceWindows.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type MaintenanceWindowsClientCreateOrUpdateOptions struct { }
MaintenanceWindowsClientCreateOrUpdateOptions contains the optional parameters for the MaintenanceWindowsClient.CreateOrUpdate method.
type MaintenanceWindowsClientCreateOrUpdateResponse ¶
type MaintenanceWindowsClientCreateOrUpdateResponse struct { }
MaintenanceWindowsClientCreateOrUpdateResponse contains the response from method MaintenanceWindowsClient.CreateOrUpdate.
type MaintenanceWindowsClientGetOptions ¶
type MaintenanceWindowsClientGetOptions struct { }
MaintenanceWindowsClientGetOptions contains the optional parameters for the MaintenanceWindowsClient.Get method.
type MaintenanceWindowsClientGetResponse ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/UpdateManagedShortTermRetentionPolicy.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetManagedShortTermRetentionPolicy.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetListManagedShortTermRetentionPolicy.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ManagedBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedBackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate method.
type ManagedBackupShortTermRetentionPoliciesClientBeginUpdateOptions ¶
type ManagedBackupShortTermRetentionPoliciesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedBackupShortTermRetentionPoliciesClientBeginUpdateOptions contains the optional parameters for the ManagedBackupShortTermRetentionPoliciesClient.BeginUpdate method.
type ManagedBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse ¶
type ManagedBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse struct { // A short term retention policy. ManagedBackupShortTermRetentionPolicy }
ManagedBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse contains the response from method ManagedBackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate.
type ManagedBackupShortTermRetentionPoliciesClientGetOptions ¶
type ManagedBackupShortTermRetentionPoliciesClientGetOptions struct { }
ManagedBackupShortTermRetentionPoliciesClientGetOptions contains the optional parameters for the ManagedBackupShortTermRetentionPoliciesClient.Get method.
type ManagedBackupShortTermRetentionPoliciesClientGetResponse ¶
type ManagedBackupShortTermRetentionPoliciesClientGetResponse struct { // A short term retention policy. ManagedBackupShortTermRetentionPolicy }
ManagedBackupShortTermRetentionPoliciesClientGetResponse contains the response from method ManagedBackupShortTermRetentionPoliciesClient.Get.
type ManagedBackupShortTermRetentionPoliciesClientListByDatabaseOptions ¶
type ManagedBackupShortTermRetentionPoliciesClientListByDatabaseOptions struct { }
ManagedBackupShortTermRetentionPoliciesClientListByDatabaseOptions contains the optional parameters for the ManagedBackupShortTermRetentionPoliciesClient.NewListByDatabasePager method.
type ManagedBackupShortTermRetentionPoliciesClientListByDatabaseResponse ¶
type ManagedBackupShortTermRetentionPoliciesClientListByDatabaseResponse struct { // A list of short term retention policies. ManagedBackupShortTermRetentionPolicyListResult }
ManagedBackupShortTermRetentionPoliciesClientListByDatabaseResponse contains the response from method ManagedBackupShortTermRetentionPoliciesClient.NewListByDatabasePager.
type ManagedBackupShortTermRetentionPoliciesClientUpdateResponse ¶
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 ¶
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 ¶
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 ¶
func (m ManagedBackupShortTermRetentionPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedBackupShortTermRetentionPolicyProperties.
func (*ManagedBackupShortTermRetentionPolicyProperties) UnmarshalJSON ¶
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 ¶
func (m *ManagedDatabase) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDatabase.
type ManagedDatabaseAdvancedThreatProtection ¶
type ManagedDatabaseAdvancedThreatProtection 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 }
ManagedDatabaseAdvancedThreatProtection - A managed database Advanced Threat Protection.
func (ManagedDatabaseAdvancedThreatProtection) MarshalJSON ¶
func (m ManagedDatabaseAdvancedThreatProtection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedDatabaseAdvancedThreatProtection.
func (*ManagedDatabaseAdvancedThreatProtection) UnmarshalJSON ¶
func (m *ManagedDatabaseAdvancedThreatProtection) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDatabaseAdvancedThreatProtection.
type ManagedDatabaseAdvancedThreatProtectionListResult ¶
type ManagedDatabaseAdvancedThreatProtectionListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ManagedDatabaseAdvancedThreatProtection }
ManagedDatabaseAdvancedThreatProtectionListResult - A list of the managed database's Advanced Threat Protection settings.
func (ManagedDatabaseAdvancedThreatProtectionListResult) MarshalJSON ¶
func (m ManagedDatabaseAdvancedThreatProtectionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedDatabaseAdvancedThreatProtectionListResult.
func (*ManagedDatabaseAdvancedThreatProtectionListResult) UnmarshalJSON ¶
func (m *ManagedDatabaseAdvancedThreatProtectionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDatabaseAdvancedThreatProtectionListResult.
type ManagedDatabaseAdvancedThreatProtectionSettingsClient ¶
type ManagedDatabaseAdvancedThreatProtectionSettingsClient struct {
// contains filtered or unexported fields
}
ManagedDatabaseAdvancedThreatProtectionSettingsClient contains the methods for the ManagedDatabaseAdvancedThreatProtectionSettings group. Don't use this type directly, use NewManagedDatabaseAdvancedThreatProtectionSettingsClient() instead.
func NewManagedDatabaseAdvancedThreatProtectionSettingsClient ¶
func NewManagedDatabaseAdvancedThreatProtectionSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseAdvancedThreatProtectionSettingsClient, error)
NewManagedDatabaseAdvancedThreatProtectionSettingsClient creates a new instance of ManagedDatabaseAdvancedThreatProtectionSettingsClient 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 (*ManagedDatabaseAdvancedThreatProtectionSettingsClient) CreateOrUpdate ¶
func (client *ManagedDatabaseAdvancedThreatProtectionSettingsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, advancedThreatProtectionName AdvancedThreatProtectionName, parameters ManagedDatabaseAdvancedThreatProtection, options *ManagedDatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateOptions) (ManagedDatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates a managed database's Advanced Threat Protection state. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-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.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- advancedThreatProtectionName - The name of the Advanced Threat Protection state.
- parameters - The managed database Advanced Threat Protection state.
- options - ManagedDatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateOptions contains the optional parameters for the ManagedDatabaseAdvancedThreatProtectionSettingsClient.CreateOrUpdate method.
Example (UpdateAManagedDatabasesAdvancedThreatProtectionSettingsWithAllParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/ManagedDatabaseAdvancedThreatProtectionSettingsCreateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewManagedDatabaseAdvancedThreatProtectionSettingsClient().CreateOrUpdate(ctx, "threatprotection-4799", "threatprotection-6440", "testdb", armsql.AdvancedThreatProtectionNameDefault, armsql.ManagedDatabaseAdvancedThreatProtection{ 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.ManagedDatabaseAdvancedThreatProtection = armsql.ManagedDatabaseAdvancedThreatProtection{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/advancedThreatProtectionSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/managedInstances/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 (UpdateAManagedDatabasesAdvancedThreatProtectionSettingsWithMinimalParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/ManagedDatabaseAdvancedThreatProtectionSettingsCreateMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewManagedDatabaseAdvancedThreatProtectionSettingsClient().CreateOrUpdate(ctx, "threatprotection-4799", "threatprotection-6440", "testdb", armsql.AdvancedThreatProtectionNameDefault, armsql.ManagedDatabaseAdvancedThreatProtection{ 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.ManagedDatabaseAdvancedThreatProtection = armsql.ManagedDatabaseAdvancedThreatProtection{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/advancedThreatProtectionSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/managedInstances/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 (*ManagedDatabaseAdvancedThreatProtectionSettingsClient) Get ¶
func (client *ManagedDatabaseAdvancedThreatProtectionSettingsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, advancedThreatProtectionName AdvancedThreatProtectionName, options *ManagedDatabaseAdvancedThreatProtectionSettingsClientGetOptions) (ManagedDatabaseAdvancedThreatProtectionSettingsClientGetResponse, error)
Get - Gets a managed database's Advanced Threat Protection state. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-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.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- advancedThreatProtectionName - The name of the Advanced Threat Protection state.
- options - ManagedDatabaseAdvancedThreatProtectionSettingsClientGetOptions contains the optional parameters for the ManagedDatabaseAdvancedThreatProtectionSettingsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/ManagedDatabaseAdvancedThreatProtectionSettingsGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewManagedDatabaseAdvancedThreatProtectionSettingsClient().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.ManagedDatabaseAdvancedThreatProtection = armsql.ManagedDatabaseAdvancedThreatProtection{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/advancedThreatProtectionSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/managedInstances/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 (*ManagedDatabaseAdvancedThreatProtectionSettingsClient) NewListByDatabasePager ¶
func (client *ManagedDatabaseAdvancedThreatProtectionSettingsClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseAdvancedThreatProtectionSettingsClientListByDatabaseOptions) *runtime.Pager[ManagedDatabaseAdvancedThreatProtectionSettingsClientListByDatabaseResponse]
NewListByDatabasePager - Gets a list of managed database's Advanced Threat Protection states.
Generated from API version 2022-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.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- options - ManagedDatabaseAdvancedThreatProtectionSettingsClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseAdvancedThreatProtectionSettingsClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewManagedDatabaseAdvancedThreatProtectionSettingsClient().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.ManagedDatabaseAdvancedThreatProtectionListResult = armsql.ManagedDatabaseAdvancedThreatProtectionListResult{ // Value: []*armsql.ManagedDatabaseAdvancedThreatProtection{ // { // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/advancedThreatProtectionSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-6852/providers/Microsoft.Sql/managedInstances/threatprotection-2080/databases/testdb/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.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 ManagedDatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateOptions ¶
type ManagedDatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateOptions struct { }
ManagedDatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateOptions contains the optional parameters for the ManagedDatabaseAdvancedThreatProtectionSettingsClient.CreateOrUpdate method.
type ManagedDatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse ¶
type ManagedDatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse struct { // A managed database Advanced Threat Protection. ManagedDatabaseAdvancedThreatProtection }
ManagedDatabaseAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse contains the response from method ManagedDatabaseAdvancedThreatProtectionSettingsClient.CreateOrUpdate.
type ManagedDatabaseAdvancedThreatProtectionSettingsClientGetOptions ¶
type ManagedDatabaseAdvancedThreatProtectionSettingsClientGetOptions struct { }
ManagedDatabaseAdvancedThreatProtectionSettingsClientGetOptions contains the optional parameters for the ManagedDatabaseAdvancedThreatProtectionSettingsClient.Get method.
type ManagedDatabaseAdvancedThreatProtectionSettingsClientGetResponse ¶
type ManagedDatabaseAdvancedThreatProtectionSettingsClientGetResponse struct { // A managed database Advanced Threat Protection. ManagedDatabaseAdvancedThreatProtection }
ManagedDatabaseAdvancedThreatProtectionSettingsClientGetResponse contains the response from method ManagedDatabaseAdvancedThreatProtectionSettingsClient.Get.
type ManagedDatabaseAdvancedThreatProtectionSettingsClientListByDatabaseOptions ¶
type ManagedDatabaseAdvancedThreatProtectionSettingsClientListByDatabaseOptions struct { }
ManagedDatabaseAdvancedThreatProtectionSettingsClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseAdvancedThreatProtectionSettingsClient.NewListByDatabasePager method.
type ManagedDatabaseAdvancedThreatProtectionSettingsClientListByDatabaseResponse ¶
type ManagedDatabaseAdvancedThreatProtectionSettingsClientListByDatabaseResponse struct { // A list of the managed database's Advanced Threat Protection settings. ManagedDatabaseAdvancedThreatProtectionListResult }
ManagedDatabaseAdvancedThreatProtectionSettingsClientListByDatabaseResponse contains the response from method ManagedDatabaseAdvancedThreatProtectionSettingsClient.NewListByDatabasePager.
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseColumnGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedColumnsListByDatabaseMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedColumnsListByDatabaseMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseColumnListByTable.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ManagedDatabaseColumnsClientGetOptions struct { }
ManagedDatabaseColumnsClientGetOptions contains the optional parameters for the ManagedDatabaseColumnsClient.Get method.
type ManagedDatabaseColumnsClientGetResponse ¶
type ManagedDatabaseColumnsClientGetResponse struct { // A database column resource. DatabaseColumn }
ManagedDatabaseColumnsClientGetResponse contains the response from method ManagedDatabaseColumnsClient.Get.
type ManagedDatabaseColumnsClientListByDatabaseOptions ¶
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 ¶
type ManagedDatabaseColumnsClientListByDatabaseResponse struct { // A list of database columns. DatabaseColumnListResult }
ManagedDatabaseColumnsClientListByDatabaseResponse contains the response from method ManagedDatabaseColumnsClient.NewListByDatabasePager.
type ManagedDatabaseColumnsClientListByTableOptions ¶
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 ¶
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 ¶
func (m *ManagedDatabaseListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDatabaseListResult.
type ManagedDatabaseMoveDefinition ¶
type ManagedDatabaseMoveDefinition struct { // REQUIRED; The destination managed database ID DestinationManagedDatabaseID *string }
ManagedDatabaseMoveDefinition - Contains the information necessary to perform a managed database move.
func (ManagedDatabaseMoveDefinition) MarshalJSON ¶
func (m ManagedDatabaseMoveDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedDatabaseMoveDefinition.
func (*ManagedDatabaseMoveDefinition) UnmarshalJSON ¶
func (m *ManagedDatabaseMoveDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDatabaseMoveDefinition.
type ManagedDatabaseMoveOperationListResult ¶
type ManagedDatabaseMoveOperationListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ManagedDatabaseMoveOperationResult }
ManagedDatabaseMoveOperationListResult - List of managed database move operations.
func (ManagedDatabaseMoveOperationListResult) MarshalJSON ¶
func (m ManagedDatabaseMoveOperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedDatabaseMoveOperationListResult.
func (*ManagedDatabaseMoveOperationListResult) UnmarshalJSON ¶
func (m *ManagedDatabaseMoveOperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDatabaseMoveOperationListResult.
type ManagedDatabaseMoveOperationResult ¶
type ManagedDatabaseMoveOperationResult struct { // Resource properties. Properties *ManagedDatabaseMoveOperationResultProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ManagedDatabaseMoveOperationResult - A managed database move operation.
func (ManagedDatabaseMoveOperationResult) MarshalJSON ¶
func (m ManagedDatabaseMoveOperationResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedDatabaseMoveOperationResult.
func (*ManagedDatabaseMoveOperationResult) UnmarshalJSON ¶
func (m *ManagedDatabaseMoveOperationResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDatabaseMoveOperationResult.
type ManagedDatabaseMoveOperationResultProperties ¶
type ManagedDatabaseMoveOperationResultProperties struct { // 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; Is move operation cancellable. 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; Operation mode. OperationMode *MoveOperationMode // READ-ONLY; Source database name. SourceDatabaseName *string // READ-ONLY; Source Managed Instance resource id. SourceManagedInstanceID *string // READ-ONLY; Source Managed Instance name. SourceManagedInstanceName *string // READ-ONLY; The operation start time. StartTime *time.Time // READ-ONLY; The operation state. State *ManagementOperationState // READ-ONLY; Target database name. TargetDatabaseName *string // READ-ONLY; Target Managed instance resource id. TargetManagedInstanceID *string // READ-ONLY; Target Managed Instance name. TargetManagedInstanceName *string }
ManagedDatabaseMoveOperationResultProperties - Contains the operation result properties for managed database move operation.
func (ManagedDatabaseMoveOperationResultProperties) MarshalJSON ¶
func (m ManagedDatabaseMoveOperationResultProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedDatabaseMoveOperationResultProperties.
func (*ManagedDatabaseMoveOperationResultProperties) UnmarshalJSON ¶
func (m *ManagedDatabaseMoveOperationResultProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDatabaseMoveOperationResultProperties.
type ManagedDatabaseMoveOperationsClient ¶
type ManagedDatabaseMoveOperationsClient struct {
// contains filtered or unexported fields
}
ManagedDatabaseMoveOperationsClient contains the methods for the ManagedDatabaseMoveOperations group. Don't use this type directly, use NewManagedDatabaseMoveOperationsClient() instead.
func NewManagedDatabaseMoveOperationsClient ¶
func NewManagedDatabaseMoveOperationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseMoveOperationsClient, error)
NewManagedDatabaseMoveOperationsClient creates a new instance of ManagedDatabaseMoveOperationsClient 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 (*ManagedDatabaseMoveOperationsClient) Get ¶
func (client *ManagedDatabaseMoveOperationsClient) Get(ctx context.Context, resourceGroupName string, locationName string, operationID string, options *ManagedDatabaseMoveOperationsClientGetOptions) (ManagedDatabaseMoveOperationsClientGetResponse, error)
Get - Gets a managed database move operation. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-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 - ManagedDatabaseMoveOperationsClientGetOptions contains the optional parameters for the ManagedDatabaseMoveOperationsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/ManagedDatabaseMoveOperationResultGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewManagedDatabaseMoveOperationsClient().Get(ctx, "rg1", "westeurope", "15961324-d809-46ed-86b9-d786953140e2", 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.ManagedDatabaseMoveOperationResult = armsql.ManagedDatabaseMoveOperationResult{ // Name: to.Ptr("15961324-d809-46ed-86b9-d786953140e2"), // Type: to.Ptr("Microsoft.Sql/locations/managedDatabaseMoveOperationResults"), // ID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Sql/locations/westeurope/managedDatabaseMoveOperationResults/15961324-d809-46ed-86b9-d786953140e2"), // Properties: &armsql.ManagedDatabaseMoveOperationResultProperties{ // IsCancellable: to.Ptr(true), // Operation: to.Ptr("StartManagedInstanceDatabaseMove"), // OperationFriendlyName: to.Ptr("Start Azure SQL Managed Instance database move"), // OperationMode: to.Ptr(armsql.MoveOperationModeMove), // SourceDatabaseName: to.Ptr("db1"), // SourceManagedInstanceID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Sql/managedInstances/mi1"), // SourceManagedInstanceName: to.Ptr("mi1"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-24T12:54:29.720Z"); return t}()), // State: to.Ptr(armsql.ManagementOperationStateInProgress), // TargetDatabaseName: to.Ptr("db1"), // TargetManagedInstanceID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg2/providers/Microsoft.Sql/managedInstances/mi2"), // TargetManagedInstanceName: to.Ptr("mi2"), // }, // }
Output:
func (*ManagedDatabaseMoveOperationsClient) NewListByLocationPager ¶
func (client *ManagedDatabaseMoveOperationsClient) NewListByLocationPager(resourceGroupName string, locationName string, options *ManagedDatabaseMoveOperationsClientListByLocationOptions) *runtime.Pager[ManagedDatabaseMoveOperationsClientListByLocationResponse]
NewListByLocationPager - Lists managed database move operations.
Generated from API version 2022-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 - ManagedDatabaseMoveOperationsClientListByLocationOptions contains the optional parameters for the ManagedDatabaseMoveOperationsClient.NewListByLocationPager method.
Example (GetsAllManagedDatabaseMoveOperationsForSpecifiedSubscriptionResourceGroupAndLocation) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/ManagedDatabaseMoveOperationResultList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewManagedDatabaseMoveOperationsClient().NewListByLocationPager("rg1", "westeurope", &armsql.ManagedDatabaseMoveOperationsClientListByLocationOptions{OnlyLatestPerDatabase: 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.ManagedDatabaseMoveOperationListResult = armsql.ManagedDatabaseMoveOperationListResult{ // Value: []*armsql.ManagedDatabaseMoveOperationResult{ // { // Name: to.Ptr("15961324-d809-46ed-86b9-d786953140e2"), // Type: to.Ptr("Microsoft.Sql/locations/managedDatabaseMoveOperationResults"), // ID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Sql/locations/westeurope/managedDatabaseMoveOperationResults/15961324-d809-46ed-86b9-d786953140e2"), // Properties: &armsql.ManagedDatabaseMoveOperationResultProperties{ // IsCancellable: to.Ptr(false), // Operation: to.Ptr("startManagedInstanceDatabaseMove"), // OperationFriendlyName: to.Ptr("Start Azure SQL Managed Instance database move"), // OperationMode: to.Ptr(armsql.MoveOperationModeMove), // SourceDatabaseName: to.Ptr("db1"), // SourceManagedInstanceID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Sql/managedInstances/mi1"), // SourceManagedInstanceName: to.Ptr("mi1"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-24T12:54:29.720Z"); return t}()), // State: to.Ptr(armsql.ManagementOperationStateSucceeded), // TargetDatabaseName: to.Ptr("db1"), // TargetManagedInstanceID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg2/providers/Microsoft.Sql/managedInstances/mi2"), // TargetManagedInstanceName: to.Ptr("mi2"), // }, // }, // { // Name: to.Ptr("12341324-e123-45cd-86b9-d786953131a5"), // Type: to.Ptr("Microsoft.Sql/locations/managedDatabaseMoveOperationResults"), // ID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Sql/locations/westeurope/managedDatabaseMoveOperationResults/12341324-e123-45cd-86b9-d786953131a5"), // Properties: &armsql.ManagedDatabaseMoveOperationResultProperties{ // IsCancellable: to.Ptr(true), // Operation: to.Ptr("ContinueManagedInstanceDatabaseMove"), // OperationFriendlyName: to.Ptr("Complete Azure SQL Managed Instance database move"), // OperationMode: to.Ptr(armsql.MoveOperationModeMove), // SourceDatabaseName: to.Ptr("db1"), // SourceManagedInstanceID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Sql/managedInstances/mi1"), // SourceManagedInstanceName: to.Ptr("mi1"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-24T12:54:29.720Z"); return t}()), // State: to.Ptr(armsql.ManagementOperationStateInProgress), // TargetDatabaseName: to.Ptr("db1"), // TargetManagedInstanceID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg2/providers/Microsoft.Sql/managedInstances/mi2"), // TargetManagedInstanceName: to.Ptr("mi2"), // }, // }, // { // Name: to.Ptr("87654321-30a2-f39a-z171-b78695fg32a8"), // Type: to.Ptr("Microsoft.Sql/locations/managedDatabaseMoveOperationResults"), // ID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Sql/locations/westeurope/managedDatabaseMoveOperationResults/87654321-30a2-f39a-z171-b78695fg32a8"), // Properties: &armsql.ManagedDatabaseMoveOperationResultProperties{ // IsCancellable: to.Ptr(true), // Operation: to.Ptr("StartManagedInstanceDatabaseMove"), // OperationFriendlyName: to.Ptr("Start Azure SQL Managed Instance database move"), // OperationMode: to.Ptr(armsql.MoveOperationModeCopy), // SourceDatabaseName: to.Ptr("db2"), // SourceManagedInstanceID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Sql/managedInstances/mi1"), // SourceManagedInstanceName: to.Ptr("mi1"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-24T13:37:19.710Z"); return t}()), // State: to.Ptr(armsql.ManagementOperationStateInProgress), // TargetDatabaseName: to.Ptr("db2"), // TargetManagedInstanceID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg2/providers/Microsoft.Sql/managedInstances/mi2"), // TargetManagedInstanceName: to.Ptr("mi2"), // }, // }}, // } }
Output:
Example (GetsTheLatestManagedDatabaseMoveOperationsForEachDatabaseUnderSpecifiedSubscriptionResourceGroupAndLocation) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/ManagedDatabaseMoveOperationResultListLastOperations.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewManagedDatabaseMoveOperationsClient().NewListByLocationPager("rg1", "westeurope", &armsql.ManagedDatabaseMoveOperationsClientListByLocationOptions{OnlyLatestPerDatabase: 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.ManagedDatabaseMoveOperationListResult = armsql.ManagedDatabaseMoveOperationListResult{ // Value: []*armsql.ManagedDatabaseMoveOperationResult{ // { // Name: to.Ptr("12341324-e123-45cd-86b9-d786953131a5"), // Type: to.Ptr("Microsoft.Sql/locations/managedDatabaseMoveOperationResults"), // ID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Sql/locations/westeurope/managedDatabaseMoveOperationResults/12341324-e123-45cd-86b9-d786953131a5"), // Properties: &armsql.ManagedDatabaseMoveOperationResultProperties{ // IsCancellable: to.Ptr(true), // Operation: to.Ptr("ContinueManagedInstanceDatabaseMove"), // OperationFriendlyName: to.Ptr("Complete Azure SQL Managed Instance database move"), // OperationMode: to.Ptr(armsql.MoveOperationModeMove), // SourceDatabaseName: to.Ptr("db1"), // SourceManagedInstanceID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Sql/managedInstances/mi1"), // SourceManagedInstanceName: to.Ptr("mi1"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-24T12:54:29.720Z"); return t}()), // State: to.Ptr(armsql.ManagementOperationStateInProgress), // TargetDatabaseName: to.Ptr("db1"), // TargetManagedInstanceID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg2/providers/Microsoft.Sql/managedInstances/mi2"), // TargetManagedInstanceName: to.Ptr("mi2"), // }, // }, // { // Name: to.Ptr("87654321-30a2-f39a-z171-b78695fg32a8"), // Type: to.Ptr("Microsoft.Sql/locations/managedDatabaseMoveOperationResults"), // ID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Sql/locations/westeurope/managedDatabaseMoveOperationResults/87654321-30a2-f39a-z171-b78695fg32a8"), // Properties: &armsql.ManagedDatabaseMoveOperationResultProperties{ // IsCancellable: to.Ptr(true), // Operation: to.Ptr("StartManagedInstanceDatabaseMove"), // OperationFriendlyName: to.Ptr("Start Azure SQL Managed Instance database move"), // OperationMode: to.Ptr(armsql.MoveOperationModeCopy), // SourceDatabaseName: to.Ptr("db2"), // SourceManagedInstanceID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Sql/managedInstances/mi1"), // SourceManagedInstanceName: to.Ptr("mi1"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-24T13:37:19.710Z"); return t}()), // State: to.Ptr(armsql.ManagementOperationStateInProgress), // TargetDatabaseName: to.Ptr("db2"), // TargetManagedInstanceID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg2/providers/Microsoft.Sql/managedInstances/mi2"), // TargetManagedInstanceName: to.Ptr("mi2"), // }, // }}, // } }
Output:
Example (GetsTheLatestManagedDatabaseMoveOperationsForEachDatabaseUnderSpecifiedSubscriptionResourceGroupAndLocationFilteredByOperationType) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/ManagedDatabaseMoveOperationResultListMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewManagedDatabaseMoveOperationsClient().NewListByLocationPager("rg1", "westeurope", &armsql.ManagedDatabaseMoveOperationsClientListByLocationOptions{OnlyLatestPerDatabase: nil, Filter: to.Ptr("Properties/Operation eq 'StartManagedInstanceDatabaseMove'"), }) 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.ManagedDatabaseMoveOperationListResult = armsql.ManagedDatabaseMoveOperationListResult{ // Value: []*armsql.ManagedDatabaseMoveOperationResult{ // { // Name: to.Ptr("87654321-30a2-f39a-z171-b78695fg32a8"), // Type: to.Ptr("Microsoft.Sql/locations/managedDatabaseMoveOperationResults"), // ID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Sql/locations/westeurope/managedDatabaseMoveOperationResults/87654321-30a2-f39a-z171-b78695fg32a8"), // Properties: &armsql.ManagedDatabaseMoveOperationResultProperties{ // IsCancellable: to.Ptr(true), // Operation: to.Ptr("StartManagedInstanceDatabaseMove"), // OperationFriendlyName: to.Ptr("Start Azure SQL Managed Instance database move"), // OperationMode: to.Ptr(armsql.MoveOperationModeCopy), // SourceDatabaseName: to.Ptr("db1"), // SourceManagedInstanceID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.Sql/managedInstances/mi1"), // SourceManagedInstanceName: to.Ptr("mi1"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-24T12:54:29.720Z"); return t}()), // State: to.Ptr(armsql.ManagementOperationStateInProgress), // TargetDatabaseName: to.Ptr("db1"), // TargetManagedInstanceID: to.Ptr("subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg2/providers/Microsoft.Sql/managedInstances/mi2"), // TargetManagedInstanceName: to.Ptr("mi2"), // }, // }}, // } }
Output:
type ManagedDatabaseMoveOperationsClientGetOptions ¶
type ManagedDatabaseMoveOperationsClientGetOptions struct { }
ManagedDatabaseMoveOperationsClientGetOptions contains the optional parameters for the ManagedDatabaseMoveOperationsClient.Get method.
type ManagedDatabaseMoveOperationsClientGetResponse ¶
type ManagedDatabaseMoveOperationsClientGetResponse struct { // A managed database move operation. ManagedDatabaseMoveOperationResult }
ManagedDatabaseMoveOperationsClientGetResponse contains the response from method ManagedDatabaseMoveOperationsClient.Get.
type ManagedDatabaseMoveOperationsClientListByLocationOptions ¶
type ManagedDatabaseMoveOperationsClientListByLocationOptions struct { // An OData filter expression that filters elements in the collection. Filter *string // Whether or not to only get the latest operation for each database. Has higher priority than $filter. OnlyLatestPerDatabase *bool }
ManagedDatabaseMoveOperationsClientListByLocationOptions contains the optional parameters for the ManagedDatabaseMoveOperationsClient.NewListByLocationPager method.
type ManagedDatabaseMoveOperationsClientListByLocationResponse ¶
type ManagedDatabaseMoveOperationsClientListByLocationResponse struct { // List of managed database move operations. ManagedDatabaseMoveOperationListResult }
ManagedDatabaseMoveOperationsClientListByLocationResponse contains the response from method ManagedDatabaseMoveOperationsClient.NewListByLocationPager.
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 // The restorable cross-subscription dropped database resource id to restore when creating this database. CrossSubscriptionRestorableDroppedDatabaseID *string // The resource identifier of the cross-subscription source database associated with create operation of this database. CrossSubscriptionSourceDatabaseID *string // Target managed instance id used in cross-subscription restore. CrossSubscriptionTargetManagedInstanceID *string // 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 // 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 used. Specifies the identity used for storage container // authentication. Can be 'SharedAccessSignature' or 'ManagedIdentity'; if not // specified 'SharedAccessSignature' is assumed. StorageContainerIdentity *string // Conditional. If createMode is RestoreExternalBackup and storageContainerIdentity is not ManagedIdentity, 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceQueryGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceQueryStatisticsList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceQueryStatisticsListMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceQueryStatisticsListMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ManagedDatabaseQueriesClientGetOptions struct { }
ManagedDatabaseQueriesClientGetOptions contains the optional parameters for the ManagedDatabaseQueriesClient.Get method.
type ManagedDatabaseQueriesClientGetResponse ¶
type ManagedDatabaseQueriesClientGetResponse struct { // Database query. ManagedInstanceQuery }
ManagedDatabaseQueriesClientGetResponse contains the response from method ManagedDatabaseQueriesClient.Get.
type ManagedDatabaseQueriesClientListByQueryOptions ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSensitivityLabelsRecommendedUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ManagedDatabaseRecommendedSensitivityLabelsClientUpdateOptions struct { }
ManagedDatabaseRecommendedSensitivityLabelsClientUpdateOptions contains the optional parameters for the ManagedDatabaseRecommendedSensitivityLabelsClient.Update method.
type ManagedDatabaseRecommendedSensitivityLabelsClientUpdateResponse ¶
type ManagedDatabaseRecommendedSensitivityLabelsClientUpdateResponse struct { }
ManagedDatabaseRecommendedSensitivityLabelsClientUpdateResponse contains the response from method ManagedDatabaseRecommendedSensitivityLabelsClient.Update.
type ManagedDatabaseRestoreDetailsBackupSetProperties ¶
type ManagedDatabaseRestoreDetailsBackupSetProperties struct { // READ-ONLY; Backup size. BackupSizeMB *int32 // READ-ONLY; First stripe name. FirstStripeName *string // READ-ONLY; Number of stripes. NumberOfStripes *int32 // READ-ONLY; Last restored file time. RestoreFinishedTimestampUTC *time.Time // READ-ONLY; Last restored file time. RestoreStartedTimestampUTC *time.Time // READ-ONLY; Backup set status. Status *string }
ManagedDatabaseRestoreDetailsBackupSetProperties - The managed database's restore details backup set properties.
func (ManagedDatabaseRestoreDetailsBackupSetProperties) MarshalJSON ¶
func (m ManagedDatabaseRestoreDetailsBackupSetProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedDatabaseRestoreDetailsBackupSetProperties.
func (*ManagedDatabaseRestoreDetailsBackupSetProperties) UnmarshalJSON ¶
func (m *ManagedDatabaseRestoreDetailsBackupSetProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDatabaseRestoreDetailsBackupSetProperties.
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 2022-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/ManagedDatabaseRestoreDetails.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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{ // Type: to.Ptr("LRSRestore"), // CurrentBackupType: to.Ptr("Log"), // CurrentRestorePlanSizeMB: to.Ptr[int32](47), // CurrentRestoredSizeMB: to.Ptr[int32](25), // CurrentRestoringFileName: to.Ptr("RestoreDetailsFullBlownExampleLog10.bak"), // DiffBackupSets: []*armsql.ManagedDatabaseRestoreDetailsBackupSetProperties{ // { // BackupSizeMB: to.Ptr[int32](0), // FirstStripeName: to.Ptr("RestoreDetailsFullBlownExampleDiff2.bak"), // NumberOfStripes: to.Ptr[int32](1), // Status: to.Ptr("Skipped"), // }, // { // BackupSizeMB: to.Ptr[int32](1), // FirstStripeName: to.Ptr("RestoreDetailsFullBlownExampleDiff3_1.bak"), // NumberOfStripes: to.Ptr[int32](3), // RestoreFinishedTimestampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-09T12:20:21.366Z"); return t}()), // RestoreStartedTimestampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-09T12:19:40.545Z"); return t}()), // Status: to.Ptr("Restored"), // }}, // FullBackupSets: []*armsql.ManagedDatabaseRestoreDetailsBackupSetProperties{ // { // BackupSizeMB: to.Ptr[int32](2), // FirstStripeName: to.Ptr("RestoreDetailsFullBlownExampleFull2.bak"), // NumberOfStripes: to.Ptr[int32](1), // Status: to.Ptr("Skipped"), // }, // { // BackupSizeMB: to.Ptr[int32](3), // FirstStripeName: to.Ptr("RestoreDetailsFullBlownExampleFull3_1.bak"), // NumberOfStripes: to.Ptr[int32](3), // RestoreFinishedTimestampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-09T12:18:41.378Z"); return t}()), // RestoreStartedTimestampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-09T12:15:40.314Z"); return t}()), // Status: to.Ptr("Restored"), // }}, // LastRestoredFileName: to.Ptr("RestoreDetailsFullBlownExampleLog9_1.bak"), // LastRestoredFileTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-09T12:27:20.493Z"); return t}()), // LastUploadedFileName: to.Ptr("RestoreDetailsFullBlownExampleLog11.bak"), // LastUploadedFileTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-03-01T07:54:21.000Z"); return t}()), // LogBackupSets: []*armsql.ManagedDatabaseRestoreDetailsBackupSetProperties{ // { // BackupSizeMB: to.Ptr[int32](0), // FirstStripeName: to.Ptr("RestoreDetailsFullBlownExampleLog2.bak"), // NumberOfStripes: to.Ptr[int32](1), // Status: to.Ptr("Skipped"), // }, // { // BackupSizeMB: to.Ptr[int32](8), // FirstStripeName: to.Ptr("RestoreDetailsFullBlownExampleLog3.bak"), // NumberOfStripes: to.Ptr[int32](1), // Status: to.Ptr("Skipped"), // }, // { // BackupSizeMB: to.Ptr[int32](11), // FirstStripeName: to.Ptr("RestoreDetailsFullBlownExampleLog4.bak"), // NumberOfStripes: to.Ptr[int32](1), // Status: to.Ptr("Skipped"), // }, // { // BackupSizeMB: to.Ptr[int32](7), // FirstStripeName: to.Ptr("RestoreDetailsFullBlownExampleLog5.bak"), // NumberOfStripes: to.Ptr[int32](1), // RestoreFinishedTimestampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-09T12:21:54.755Z"); return t}()), // RestoreStartedTimestampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-09T12:21:01.771Z"); return t}()), // Status: to.Ptr("Restored"), // }, // { // BackupSizeMB: to.Ptr[int32](3), // FirstStripeName: to.Ptr("RestoreDetailsFullBlownExampleLog6.bak"), // NumberOfStripes: to.Ptr[int32](1), // RestoreFinishedTimestampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-09T12:23:03.709Z"); return t}()), // RestoreStartedTimestampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-09T12:22:41.878Z"); return t}()), // Status: to.Ptr("Restored"), // }, // { // BackupSizeMB: to.Ptr[int32](4), // FirstStripeName: to.Ptr("RestoreDetailsFullBlownExampleLog7.bak"), // NumberOfStripes: to.Ptr[int32](1), // RestoreFinishedTimestampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-09T12:23:52.927Z"); return t}()), // RestoreStartedTimestampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-09T12:23:36.626Z"); return t}()), // Status: to.Ptr("Restored"), // }, // { // BackupSizeMB: to.Ptr[int32](3), // FirstStripeName: to.Ptr("RestoreDetailsFullBlownExampleLog8.bak"), // NumberOfStripes: to.Ptr[int32](1), // RestoreFinishedTimestampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-09T12:24:37.995Z"); return t}()), // RestoreStartedTimestampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-09T12:24:25.899Z"); return t}()), // Status: to.Ptr("Restored"), // }, // { // BackupSizeMB: to.Ptr[int32](4), // FirstStripeName: to.Ptr("RestoreDetailsFullBlownExampleLog9_1.bak"), // NumberOfStripes: to.Ptr[int32](4), // RestoreFinishedTimestampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-09T12:25:27.808Z"); return t}()), // RestoreStartedTimestampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-09T12:25:10.880Z"); return t}()), // Status: to.Ptr("Restored"), // }, // { // BackupSizeMB: to.Ptr[int32](15), // FirstStripeName: to.Ptr("RestoreDetailsFullBlownExampleLog10.bak"), // NumberOfStripes: to.Ptr[int32](1), // RestoreStartedTimestampUTC: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-05-09T12:26:00.781Z"); return t}()), // Status: to.Ptr("Restoring"), // }, // { // BackupSizeMB: to.Ptr[int32](7), // FirstStripeName: to.Ptr("RestoreDetailsFullBlownExampleLog11.bak"), // NumberOfStripes: to.Ptr[int32](1), // Status: to.Ptr("Queued"), // }}, // NumberOfFilesDetected: to.Ptr[int32](25), // NumberOfFilesQueued: to.Ptr[int32](1), // NumberOfFilesRestored: to.Ptr[int32](14), // NumberOfFilesRestoring: to.Ptr[int32](1), // NumberOfFilesSkipped: to.Ptr[int32](8), // NumberOfFilesUnrestorable: to.Ptr[int32](1), // PercentCompleted: to.Ptr[int32](53), // Status: to.Ptr("Restoring"), // UnrestorableFiles: []*armsql.ManagedDatabaseRestoreDetailsUnrestorableFileProperties{ // { // Name: to.Ptr("ImageFile.JPG"), // }}, // }, // }
Output:
type ManagedDatabaseRestoreDetailsClientGetOptions ¶
type ManagedDatabaseRestoreDetailsClientGetOptions struct { }
ManagedDatabaseRestoreDetailsClientGetOptions contains the optional parameters for the ManagedDatabaseRestoreDetailsClient.Get method.
type ManagedDatabaseRestoreDetailsClientGetResponse ¶
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 backup type. CurrentBackupType *string // READ-ONLY; Current restore plan size MB. CurrentRestorePlanSizeMB *int32 // READ-ONLY; Current restored size MB. CurrentRestoredSizeMB *int32 // READ-ONLY; Current restoring file name. CurrentRestoringFileName *string // READ-ONLY; Diff backup sets. DiffBackupSets []*ManagedDatabaseRestoreDetailsBackupSetProperties // READ-ONLY; Full backup sets. FullBackupSets []*ManagedDatabaseRestoreDetailsBackupSetProperties // 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; Log backup sets. LogBackupSets []*ManagedDatabaseRestoreDetailsBackupSetProperties // READ-ONLY; Number of files detected. NumberOfFilesDetected *int32 // READ-ONLY; Number of files queued. NumberOfFilesQueued *int32 // READ-ONLY; Number of files restored. NumberOfFilesRestored *int32 // READ-ONLY; Number of files restoring. NumberOfFilesRestoring *int32 // READ-ONLY; Number of files skipped. NumberOfFilesSkipped *int32 // READ-ONLY; Number of files unrestorable. NumberOfFilesUnrestorable *int32 // READ-ONLY; Percent completed. PercentCompleted *int32 // READ-ONLY; Restore status. Status *string // READ-ONLY; Restore type. Type *string // READ-ONLY; Unrestorable files. UnrestorableFiles []*ManagedDatabaseRestoreDetailsUnrestorableFileProperties }
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 ¶
func (m *ManagedDatabaseRestoreDetailsResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDatabaseRestoreDetailsResult.
type ManagedDatabaseRestoreDetailsUnrestorableFileProperties ¶
type ManagedDatabaseRestoreDetailsUnrestorableFileProperties struct { // READ-ONLY; File name. Name *string }
ManagedDatabaseRestoreDetailsUnrestorableFileProperties - The managed database's restore details unrestorable file properties.
func (ManagedDatabaseRestoreDetailsUnrestorableFileProperties) MarshalJSON ¶
func (m ManagedDatabaseRestoreDetailsUnrestorableFileProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedDatabaseRestoreDetailsUnrestorableFileProperties.
func (*ManagedDatabaseRestoreDetailsUnrestorableFileProperties) UnmarshalJSON ¶
func (m *ManagedDatabaseRestoreDetailsUnrestorableFileProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDatabaseRestoreDetailsUnrestorableFileProperties.
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSchemaGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSchemaListByDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ManagedDatabaseSchemasClientGetOptions struct { }
ManagedDatabaseSchemasClientGetOptions contains the optional parameters for the ManagedDatabaseSchemasClient.Get method.
type ManagedDatabaseSchemasClientGetResponse ¶
type ManagedDatabaseSchemasClientGetResponse struct { // A database schema resource. DatabaseSchema }
ManagedDatabaseSchemasClientGetResponse contains the response from method ManagedDatabaseSchemasClient.Get.
type ManagedDatabaseSchemasClientListByDatabaseOptions ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSecurityAlertCreateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSecurityAlertCreateMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSecurityAlertGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSecurityAlertListByDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions struct { }
ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ManagedDatabaseSecurityAlertPoliciesClient.CreateOrUpdate method.
type ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse ¶
type ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse struct { // A managed database security alert policy. ManagedDatabaseSecurityAlertPolicy }
ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse contains the response from method ManagedDatabaseSecurityAlertPoliciesClient.CreateOrUpdate.
type ManagedDatabaseSecurityAlertPoliciesClientGetOptions ¶
type ManagedDatabaseSecurityAlertPoliciesClientGetOptions struct { }
ManagedDatabaseSecurityAlertPoliciesClientGetOptions contains the optional parameters for the ManagedDatabaseSecurityAlertPoliciesClient.Get method.
type ManagedDatabaseSecurityAlertPoliciesClientGetResponse ¶
type ManagedDatabaseSecurityAlertPoliciesClientGetResponse struct { // A managed database security alert policy. ManagedDatabaseSecurityAlertPolicy }
ManagedDatabaseSecurityAlertPoliciesClientGetResponse contains the response from method ManagedDatabaseSecurityAlertPoliciesClient.Get.
type ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseOptions ¶
type ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseOptions struct { }
ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseSecurityAlertPoliciesClient.NewListByDatabasePager method.
type ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseResponse ¶
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 ¶
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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSecurityEventsGetMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSecurityEventsGetMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseColumnSensitivityLabelCreate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseColumnSensitivityLabelDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelDisable.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelEnable.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseColumnSensitivityLabelGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSensitivityLabelsListByDatabaseCurrent.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSensitivityLabelsListByDatabaseRecommended.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSensitivityLabelsCurrentUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ManagedDatabaseSensitivityLabelsClientCreateOrUpdateOptions struct { }
ManagedDatabaseSensitivityLabelsClientCreateOrUpdateOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.CreateOrUpdate method.
type ManagedDatabaseSensitivityLabelsClientCreateOrUpdateResponse ¶
type ManagedDatabaseSensitivityLabelsClientCreateOrUpdateResponse struct { // A sensitivity label. SensitivityLabel }
ManagedDatabaseSensitivityLabelsClientCreateOrUpdateResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.CreateOrUpdate.
type ManagedDatabaseSensitivityLabelsClientDeleteOptions ¶
type ManagedDatabaseSensitivityLabelsClientDeleteOptions struct { }
ManagedDatabaseSensitivityLabelsClientDeleteOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.Delete method.
type ManagedDatabaseSensitivityLabelsClientDeleteResponse ¶
type ManagedDatabaseSensitivityLabelsClientDeleteResponse struct { }
ManagedDatabaseSensitivityLabelsClientDeleteResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.Delete.
type ManagedDatabaseSensitivityLabelsClientDisableRecommendationOptions ¶
type ManagedDatabaseSensitivityLabelsClientDisableRecommendationOptions struct { }
ManagedDatabaseSensitivityLabelsClientDisableRecommendationOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.DisableRecommendation method.
type ManagedDatabaseSensitivityLabelsClientDisableRecommendationResponse ¶
type ManagedDatabaseSensitivityLabelsClientDisableRecommendationResponse struct { }
ManagedDatabaseSensitivityLabelsClientDisableRecommendationResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.DisableRecommendation.
type ManagedDatabaseSensitivityLabelsClientEnableRecommendationOptions ¶
type ManagedDatabaseSensitivityLabelsClientEnableRecommendationOptions struct { }
ManagedDatabaseSensitivityLabelsClientEnableRecommendationOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.EnableRecommendation method.
type ManagedDatabaseSensitivityLabelsClientEnableRecommendationResponse ¶
type ManagedDatabaseSensitivityLabelsClientEnableRecommendationResponse struct { }
ManagedDatabaseSensitivityLabelsClientEnableRecommendationResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.EnableRecommendation.
type ManagedDatabaseSensitivityLabelsClientGetOptions ¶
type ManagedDatabaseSensitivityLabelsClientGetOptions struct { }
ManagedDatabaseSensitivityLabelsClientGetOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.Get method.
type ManagedDatabaseSensitivityLabelsClientGetResponse ¶
type ManagedDatabaseSensitivityLabelsClientGetResponse struct { // A sensitivity label. SensitivityLabel }
ManagedDatabaseSensitivityLabelsClientGetResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.Get.
type ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseOptions ¶
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 ¶
type ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseResponse struct { // A list of sensitivity labels. SensitivityLabelListResult }
ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.NewListCurrentByDatabasePager.
type ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseOptions ¶
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 ¶
type ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseResponse struct { // A list of sensitivity labels. SensitivityLabelListResult }
ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.NewListRecommendedByDatabasePager.
type ManagedDatabaseSensitivityLabelsClientUpdateOptions ¶
type ManagedDatabaseSensitivityLabelsClientUpdateOptions struct { }
ManagedDatabaseSensitivityLabelsClientUpdateOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.Update method.
type ManagedDatabaseSensitivityLabelsClientUpdateResponse ¶
type ManagedDatabaseSensitivityLabelsClientUpdateResponse struct { }
ManagedDatabaseSensitivityLabelsClientUpdateResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.Update.
type ManagedDatabaseStartMoveDefinition ¶
type ManagedDatabaseStartMoveDefinition struct { // REQUIRED; The destination managed database ID DestinationManagedDatabaseID *string // The move operation mode. OperationMode *MoveOperationMode }
ManagedDatabaseStartMoveDefinition - Contains the information necessary to start a managed database move.
func (ManagedDatabaseStartMoveDefinition) MarshalJSON ¶
func (m ManagedDatabaseStartMoveDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedDatabaseStartMoveDefinition.
func (*ManagedDatabaseStartMoveDefinition) UnmarshalJSON ¶
func (m *ManagedDatabaseStartMoveDefinition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedDatabaseStartMoveDefinition.
type ManagedDatabaseStatus ¶
type ManagedDatabaseStatus string
ManagedDatabaseStatus - Status of the database.
const ( ManagedDatabaseStatusCreating ManagedDatabaseStatus = "Creating" ManagedDatabaseStatusDbCopying ManagedDatabaseStatus = "DbCopying" ManagedDatabaseStatusDbMoving ManagedDatabaseStatus = "DbMoving" ManagedDatabaseStatusInaccessible ManagedDatabaseStatus = "Inaccessible" ManagedDatabaseStatusOffline ManagedDatabaseStatus = "Offline" ManagedDatabaseStatusOnline ManagedDatabaseStatus = "Online" ManagedDatabaseStatusRestoring ManagedDatabaseStatus = "Restoring" ManagedDatabaseStatusShutdown ManagedDatabaseStatus = "Shutdown" ManagedDatabaseStatusStarting ManagedDatabaseStatus = "Starting" ManagedDatabaseStatusStopped ManagedDatabaseStatus = "Stopped" ManagedDatabaseStatusStopping ManagedDatabaseStatus = "Stopping" 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseTableGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseTableListBySchema.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ManagedDatabaseTablesClientGetOptions struct { }
ManagedDatabaseTablesClientGetOptions contains the optional parameters for the ManagedDatabaseTablesClient.Get method.
type ManagedDatabaseTablesClientGetResponse ¶
type ManagedDatabaseTablesClientGetResponse struct { // A database table resource. DatabaseTable }
ManagedDatabaseTablesClientGetResponse contains the response from method ManagedDatabaseTablesClient.Get.
type ManagedDatabaseTablesClientListBySchemaOptions ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedTransparentDataEncryptionUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedTransparentDataEncryptionGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedTransparentDataEncryptionList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateOptions struct { }
ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateOptions contains the optional parameters for the ManagedDatabaseTransparentDataEncryptionClient.CreateOrUpdate method.
type ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateResponse ¶
type ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateResponse struct { // A managed database transparent data encryption state. ManagedTransparentDataEncryption }
ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateResponse contains the response from method ManagedDatabaseTransparentDataEncryptionClient.CreateOrUpdate.
type ManagedDatabaseTransparentDataEncryptionClientGetOptions ¶
type ManagedDatabaseTransparentDataEncryptionClientGetOptions struct { }
ManagedDatabaseTransparentDataEncryptionClientGetOptions contains the optional parameters for the ManagedDatabaseTransparentDataEncryptionClient.Get method.
type ManagedDatabaseTransparentDataEncryptionClientGetResponse ¶
type ManagedDatabaseTransparentDataEncryptionClientGetResponse struct { // A managed database transparent data encryption state. ManagedTransparentDataEncryption }
ManagedDatabaseTransparentDataEncryptionClientGetResponse contains the response from method ManagedDatabaseTransparentDataEncryptionClient.Get.
type ManagedDatabaseTransparentDataEncryptionClientListByDatabaseOptions ¶
type ManagedDatabaseTransparentDataEncryptionClientListByDatabaseOptions struct { }
ManagedDatabaseTransparentDataEncryptionClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseTransparentDataEncryptionClient.NewListByDatabasePager method.
type ManagedDatabaseTransparentDataEncryptionClientListByDatabaseResponse ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions struct { }
ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate method.
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse ¶
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse struct { // A database vulnerability assessment rule baseline. DatabaseVulnerabilityAssessmentRuleBaseline }
ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate.
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions ¶
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions struct { }
ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.Delete method.
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse ¶
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse struct { }
ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.Delete.
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions ¶
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions struct { }
ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.Get method.
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScansExecute.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanExport.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ManagedDatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedDatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentScansClient.BeginInitiateScan method.
type ManagedDatabaseVulnerabilityAssessmentScansClientExportOptions ¶
type ManagedDatabaseVulnerabilityAssessmentScansClientExportOptions struct { }
ManagedDatabaseVulnerabilityAssessmentScansClientExportOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentScansClient.Export method.
type ManagedDatabaseVulnerabilityAssessmentScansClientExportResponse ¶
type ManagedDatabaseVulnerabilityAssessmentScansClientExportResponse struct { // A database Vulnerability Assessment scan export resource. DatabaseVulnerabilityAssessmentScansExport }
ManagedDatabaseVulnerabilityAssessmentScansClientExportResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentScansClient.Export.
type ManagedDatabaseVulnerabilityAssessmentScansClientGetOptions ¶
type ManagedDatabaseVulnerabilityAssessmentScansClientGetOptions struct { }
ManagedDatabaseVulnerabilityAssessmentScansClientGetOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentScansClient.Get method.
type ManagedDatabaseVulnerabilityAssessmentScansClientGetResponse ¶
type ManagedDatabaseVulnerabilityAssessmentScansClientGetResponse struct { // A vulnerability assessment scan record. VulnerabilityAssessmentScanRecord }
ManagedDatabaseVulnerabilityAssessmentScansClientGetResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentScansClient.Get.
type ManagedDatabaseVulnerabilityAssessmentScansClientInitiateScanResponse ¶
type ManagedDatabaseVulnerabilityAssessmentScansClientInitiateScanResponse struct { }
ManagedDatabaseVulnerabilityAssessmentScansClientInitiateScanResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentScansClient.BeginInitiateScan.
type ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions ¶
type ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions struct { }
ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentScansClient.NewListByDatabasePager method.
type ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentListByDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions struct { }
ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentsClient.CreateOrUpdate method.
type ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse ¶
type ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse struct { // A database vulnerability assessment. DatabaseVulnerabilityAssessment }
ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentsClient.CreateOrUpdate.
type ManagedDatabaseVulnerabilityAssessmentsClientDeleteOptions ¶
type ManagedDatabaseVulnerabilityAssessmentsClientDeleteOptions struct { }
ManagedDatabaseVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentsClient.Delete method.
type ManagedDatabaseVulnerabilityAssessmentsClientDeleteResponse ¶
type ManagedDatabaseVulnerabilityAssessmentsClientDeleteResponse struct { }
ManagedDatabaseVulnerabilityAssessmentsClientDeleteResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentsClient.Delete.
type ManagedDatabaseVulnerabilityAssessmentsClientGetOptions ¶
type ManagedDatabaseVulnerabilityAssessmentsClientGetOptions struct { }
ManagedDatabaseVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentsClient.Get method.
type ManagedDatabaseVulnerabilityAssessmentsClientGetResponse ¶
type ManagedDatabaseVulnerabilityAssessmentsClientGetResponse struct { // A database vulnerability assessment. DatabaseVulnerabilityAssessment }
ManagedDatabaseVulnerabilityAssessmentsClientGetResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentsClient.Get.
type ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseOptions ¶
type ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseOptions struct { }
ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentsClient.NewListByDatabasePager method.
type ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseResponse ¶
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) BeginCancelMove ¶
func (client *ManagedDatabasesClient) BeginCancelMove(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters ManagedDatabaseMoveDefinition, options *ManagedDatabasesClientBeginCancelMoveOptions) (*runtime.Poller[ManagedDatabasesClientCancelMoveResponse], error)
BeginCancelMove - Cancels a managed database move operation. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-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.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- parameters - Parameters of the cancel managed database move operation.
- options - ManagedDatabasesClientBeginCancelMoveOptions contains the optional parameters for the ManagedDatabasesClient.BeginCancelMove method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseCancelMove.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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().BeginCancelMove(ctx, "group1", "testInstanceSrc", "testDatabase", armsql.ManagedDatabaseMoveDefinition{ DestinationManagedDatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/testInstanceTgt/databases/testDatabase"), }, 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) BeginCompleteMove ¶
func (client *ManagedDatabasesClient) BeginCompleteMove(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters ManagedDatabaseMoveDefinition, options *ManagedDatabasesClientBeginCompleteMoveOptions) (*runtime.Poller[ManagedDatabasesClientCompleteMoveResponse], error)
BeginCompleteMove - Completes a managed database move operation. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-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.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- parameters - Parameters of the complete managed database move operation.
- options - ManagedDatabasesClientBeginCompleteMoveOptions contains the optional parameters for the ManagedDatabasesClient.BeginCompleteMove method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseCompleteMove.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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().BeginCompleteMove(ctx, "group1", "testInstanceSrc", "testDatabase", armsql.ManagedDatabaseMoveDefinition{ DestinationManagedDatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/testInstanceTgt/databases/testDatabase"), }, 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) 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 2022-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseCompleteExternalRestore.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2022-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseCreateRestoreExternalBackup.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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"), // IsLedgerOn: to.Ptr(false), // Status: to.Ptr(armsql.ManagedDatabaseStatusOnline), // }, // }
Output:
Example (CreatesANewManagedDatabaseByRestoringFromAnExternalBackupUsingManagedIdentity) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseCreateRestoreExternalBackupManagedIdentity.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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"), StorageContainerIdentity: to.Ptr("ManagedIdentity"), 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"), // IsLedgerOn: to.Ptr(false), // Status: to.Ptr(armsql.ManagedDatabaseStatusOnline), // }, // }
Output:
Example (CreatesANewManagedDatabaseFromRestoringAGeoReplicatedBackup) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseCreateRecovery.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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}()), // IsLedgerOn: to.Ptr(false), // Status: to.Ptr(armsql.ManagedDatabaseStatusOnline), // }, // }
Output:
Example (CreatesANewManagedDatabaseFromRestoringALongTermRetentionBackup) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseCreateRestoreLtrBackup.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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"), // IsLedgerOn: to.Ptr(false), // Status: to.Ptr(armsql.ManagedDatabaseStatusOnline), // }, // }
Output:
Example (CreatesANewManagedDatabaseUsingCrossSubscriptionPointInTimeRestore) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseCreateCrossSubscriptionPointInTimeRestore.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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), CrossSubscriptionSourceDatabaseID: to.Ptr("/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr2/databases/testdb"), CrossSubscriptionTargetManagedInstanceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr"), RestorePointInTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-07-14T05:35:31.503Z"); return t }()), }, }, 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"), // IsLedgerOn: to.Ptr(false), // Status: to.Ptr(armsql.ManagedDatabaseStatusOnline), // }, // }
Output:
Example (CreatesANewManagedDatabaseUsingPointInTimeRestore) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseCreatePointInTimeRestore.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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"), // IsLedgerOn: to.Ptr(false), // Status: to.Ptr(armsql.ManagedDatabaseStatusOnline), // }, // }
Output:
Example (CreatesANewManagedDatabaseWithLedgerOn) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/CreateManagedDatabaseLedger.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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{ 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.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/testcl/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"), // IsLedgerOn: to.Ptr(true), // Status: to.Ptr(armsql.ManagedDatabaseStatusOnline), // }, // }
Output:
Example (CreatesANewManagedDatabaseWithMaximalProperties) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseCreateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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"), // IsLedgerOn: to.Ptr(false), // Status: to.Ptr(armsql.ManagedDatabaseStatusOnline), // }, // }
Output:
Example (CreatesANewManagedDatabaseWithMinimalProperties) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseCreateMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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"), // IsLedgerOn: to.Ptr(false), // 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 2022-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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) BeginStartMove ¶
func (client *ManagedDatabasesClient) BeginStartMove(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters ManagedDatabaseStartMoveDefinition, options *ManagedDatabasesClientBeginStartMoveOptions) (*runtime.Poller[ManagedDatabasesClientStartMoveResponse], error)
BeginStartMove - Starts a managed database move operation. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-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.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- parameters - Parameters of the start managed database move operation.
- options - ManagedDatabasesClientBeginStartMoveOptions contains the optional parameters for the ManagedDatabasesClient.BeginStartMove method.
Example (StartsAManagedDatabaseMoveWithAllOptionalParametersSpecified) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseStartMoveMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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().BeginStartMove(ctx, "group1", "testInstanceSrc", "testDatabase", armsql.ManagedDatabaseStartMoveDefinition{ DestinationManagedDatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/testInstanceTgt/databases/testDatabase"), OperationMode: to.Ptr(armsql.MoveOperationModeCopy), }, 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:
Example (StartsAManagedDatabaseMoveWithNoOptionalParametersSpecified) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseStartMoveMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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().BeginStartMove(ctx, "group1", "testInstanceSrc", "testDatabase", armsql.ManagedDatabaseStartMoveDefinition{ DestinationManagedDatabaseID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/managedInstances/testInstanceTgt/databases/testDatabase"), }, 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 2022-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseUpdateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseUpdateMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2022-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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"), // IsLedgerOn: to.Ptr(false), // Status: to.Ptr(armsql.ManagedDatabaseStatusOnline), // }, // }
Output:
func (*ManagedDatabasesClient) NewListByInstancePager ¶
func (client *ManagedDatabasesClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedDatabasesClientListByInstanceOptions) *runtime.Pager[ManagedDatabasesClientListByInstanceResponse]
NewListByInstancePager - Gets a list of managed databases.
Generated from API version 2022-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedDatabaseListByManagedInstance.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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"), // IsLedgerOn: to.Ptr(false), // 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"), // IsLedgerOn: to.Ptr(false), // Status: to.Ptr(armsql.ManagedDatabaseStatusOnline), // }, // }}, // } }
Output:
func (*ManagedDatabasesClient) NewListInaccessibleByInstancePager ¶
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 2022-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/InaccessibleManagedDatabaseListByManagedInstance.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ManagedDatabasesClientBeginCancelMoveOptions ¶
type ManagedDatabasesClientBeginCancelMoveOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedDatabasesClientBeginCancelMoveOptions contains the optional parameters for the ManagedDatabasesClient.BeginCancelMove method.
type ManagedDatabasesClientBeginCompleteMoveOptions ¶
type ManagedDatabasesClientBeginCompleteMoveOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedDatabasesClientBeginCompleteMoveOptions contains the optional parameters for the ManagedDatabasesClient.BeginCompleteMove method.
type ManagedDatabasesClientBeginCompleteRestoreOptions ¶
type ManagedDatabasesClientBeginCompleteRestoreOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedDatabasesClientBeginCompleteRestoreOptions contains the optional parameters for the ManagedDatabasesClient.BeginCompleteRestore method.
type ManagedDatabasesClientBeginCreateOrUpdateOptions ¶
type ManagedDatabasesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedDatabasesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedDatabasesClient.BeginCreateOrUpdate method.
type ManagedDatabasesClientBeginDeleteOptions ¶
type ManagedDatabasesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedDatabasesClientBeginDeleteOptions contains the optional parameters for the ManagedDatabasesClient.BeginDelete method.
type ManagedDatabasesClientBeginStartMoveOptions ¶
type ManagedDatabasesClientBeginStartMoveOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedDatabasesClientBeginStartMoveOptions contains the optional parameters for the ManagedDatabasesClient.BeginStartMove method.
type ManagedDatabasesClientBeginUpdateOptions ¶
type ManagedDatabasesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedDatabasesClientBeginUpdateOptions contains the optional parameters for the ManagedDatabasesClient.BeginUpdate method.
type ManagedDatabasesClientCancelMoveResponse ¶
type ManagedDatabasesClientCancelMoveResponse struct { }
ManagedDatabasesClientCancelMoveResponse contains the response from method ManagedDatabasesClient.BeginCancelMove.
type ManagedDatabasesClientCompleteMoveResponse ¶
type ManagedDatabasesClientCompleteMoveResponse struct { }
ManagedDatabasesClientCompleteMoveResponse contains the response from method ManagedDatabasesClient.BeginCompleteMove.
type ManagedDatabasesClientCompleteRestoreResponse ¶
type ManagedDatabasesClientCompleteRestoreResponse struct { }
ManagedDatabasesClientCompleteRestoreResponse contains the response from method ManagedDatabasesClient.BeginCompleteRestore.
type ManagedDatabasesClientCreateOrUpdateResponse ¶
type ManagedDatabasesClientCreateOrUpdateResponse struct { // A managed database resource. ManagedDatabase }
ManagedDatabasesClientCreateOrUpdateResponse contains the response from method ManagedDatabasesClient.BeginCreateOrUpdate.
type ManagedDatabasesClientDeleteResponse ¶
type ManagedDatabasesClientDeleteResponse struct { }
ManagedDatabasesClientDeleteResponse contains the response from method ManagedDatabasesClient.BeginDelete.
type ManagedDatabasesClientGetOptions ¶
type ManagedDatabasesClientGetOptions struct { }
ManagedDatabasesClientGetOptions contains the optional parameters for the ManagedDatabasesClient.Get method.
type ManagedDatabasesClientGetResponse ¶
type ManagedDatabasesClientGetResponse struct { // A managed database resource. ManagedDatabase }
ManagedDatabasesClientGetResponse contains the response from method ManagedDatabasesClient.Get.
type ManagedDatabasesClientListByInstanceOptions ¶
type ManagedDatabasesClientListByInstanceOptions struct { }
ManagedDatabasesClientListByInstanceOptions contains the optional parameters for the ManagedDatabasesClient.NewListByInstancePager method.
type ManagedDatabasesClientListByInstanceResponse ¶
type ManagedDatabasesClientListByInstanceResponse struct { // A list of managed databases. ManagedDatabaseListResult }
ManagedDatabasesClientListByInstanceResponse contains the response from method ManagedDatabasesClient.NewListByInstancePager.
type ManagedDatabasesClientListInaccessibleByInstanceOptions ¶
type ManagedDatabasesClientListInaccessibleByInstanceOptions struct { }
ManagedDatabasesClientListInaccessibleByInstanceOptions contains the optional parameters for the ManagedDatabasesClient.NewListInaccessibleByInstancePager method.
type ManagedDatabasesClientListInaccessibleByInstanceResponse ¶
type ManagedDatabasesClientListInaccessibleByInstanceResponse struct { // A list of managed databases. ManagedDatabaseListResult }
ManagedDatabasesClientListInaccessibleByInstanceResponse contains the response from method ManagedDatabasesClient.NewListInaccessibleByInstancePager.
type ManagedDatabasesClientStartMoveResponse ¶
type ManagedDatabasesClientStartMoveResponse struct { }
ManagedDatabasesClientStartMoveResponse contains the response from method ManagedDatabasesClient.BeginStartMove.
type ManagedDatabasesClientUpdateResponse ¶
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: GPGen5, GPG8IM, GPG8IH, BCGen5, BCG8IM, BCG8IH 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 ¶
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 ¶
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 ¶
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 ¶
func (m ManagedInstanceAdministratorProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceAdministratorProperties.
func (*ManagedInstanceAdministratorProperties) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAdministratorCreate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAdministratorUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAdministratorDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAdministratorGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAdministratorListByInstance.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ManagedInstanceAdministratorsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceAdministratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceAdministratorsClient.BeginCreateOrUpdate method.
type ManagedInstanceAdministratorsClientBeginDeleteOptions ¶
type ManagedInstanceAdministratorsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceAdministratorsClientBeginDeleteOptions contains the optional parameters for the ManagedInstanceAdministratorsClient.BeginDelete method.
type ManagedInstanceAdministratorsClientCreateOrUpdateResponse ¶
type ManagedInstanceAdministratorsClientCreateOrUpdateResponse struct { // An Azure SQL managed instance administrator. ManagedInstanceAdministrator }
ManagedInstanceAdministratorsClientCreateOrUpdateResponse contains the response from method ManagedInstanceAdministratorsClient.BeginCreateOrUpdate.
type ManagedInstanceAdministratorsClientDeleteResponse ¶
type ManagedInstanceAdministratorsClientDeleteResponse struct { }
ManagedInstanceAdministratorsClientDeleteResponse contains the response from method ManagedInstanceAdministratorsClient.BeginDelete.
type ManagedInstanceAdministratorsClientGetOptions ¶
type ManagedInstanceAdministratorsClientGetOptions struct { }
ManagedInstanceAdministratorsClientGetOptions contains the optional parameters for the ManagedInstanceAdministratorsClient.Get method.
type ManagedInstanceAdministratorsClientGetResponse ¶
type ManagedInstanceAdministratorsClientGetResponse struct { // An Azure SQL managed instance administrator. ManagedInstanceAdministrator }
ManagedInstanceAdministratorsClientGetResponse contains the response from method ManagedInstanceAdministratorsClient.Get.
type ManagedInstanceAdministratorsClientListByInstanceOptions ¶
type ManagedInstanceAdministratorsClientListByInstanceOptions struct { }
ManagedInstanceAdministratorsClientListByInstanceOptions contains the optional parameters for the ManagedInstanceAdministratorsClient.NewListByInstancePager method.
type ManagedInstanceAdministratorsClientListByInstanceResponse ¶
type ManagedInstanceAdministratorsClientListByInstanceResponse struct { // A list of managed instance administrators. ManagedInstanceAdministratorListResult }
ManagedInstanceAdministratorsClientListByInstanceResponse contains the response from method ManagedInstanceAdministratorsClient.NewListByInstancePager.
type ManagedInstanceAdvancedThreatProtection ¶
type ManagedInstanceAdvancedThreatProtection 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 }
ManagedInstanceAdvancedThreatProtection - A managed instance Advanced Threat Protection.
func (ManagedInstanceAdvancedThreatProtection) MarshalJSON ¶
func (m ManagedInstanceAdvancedThreatProtection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceAdvancedThreatProtection.
func (*ManagedInstanceAdvancedThreatProtection) UnmarshalJSON ¶
func (m *ManagedInstanceAdvancedThreatProtection) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceAdvancedThreatProtection.
type ManagedInstanceAdvancedThreatProtectionListResult ¶
type ManagedInstanceAdvancedThreatProtectionListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ManagedInstanceAdvancedThreatProtection }
ManagedInstanceAdvancedThreatProtectionListResult - A list of the managed instance's Advanced Threat Protection settings.
func (ManagedInstanceAdvancedThreatProtectionListResult) MarshalJSON ¶
func (m ManagedInstanceAdvancedThreatProtectionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceAdvancedThreatProtectionListResult.
func (*ManagedInstanceAdvancedThreatProtectionListResult) UnmarshalJSON ¶
func (m *ManagedInstanceAdvancedThreatProtectionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceAdvancedThreatProtectionListResult.
type ManagedInstanceAdvancedThreatProtectionSettingsClient ¶
type ManagedInstanceAdvancedThreatProtectionSettingsClient struct {
// contains filtered or unexported fields
}
ManagedInstanceAdvancedThreatProtectionSettingsClient contains the methods for the ManagedInstanceAdvancedThreatProtectionSettings group. Don't use this type directly, use NewManagedInstanceAdvancedThreatProtectionSettingsClient() instead.
func NewManagedInstanceAdvancedThreatProtectionSettingsClient ¶
func NewManagedInstanceAdvancedThreatProtectionSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedInstanceAdvancedThreatProtectionSettingsClient, error)
NewManagedInstanceAdvancedThreatProtectionSettingsClient creates a new instance of ManagedInstanceAdvancedThreatProtectionSettingsClient 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 (*ManagedInstanceAdvancedThreatProtectionSettingsClient) BeginCreateOrUpdate ¶
func (client *ManagedInstanceAdvancedThreatProtectionSettingsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, advancedThreatProtectionName AdvancedThreatProtectionName, parameters ManagedInstanceAdvancedThreatProtection, options *ManagedInstanceAdvancedThreatProtectionSettingsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedInstanceAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates Advanced Threat Protection settings. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-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.
- managedInstanceName - The name of the managed instance.
- advancedThreatProtectionName - The name of the Advanced Threat Protection state.
- parameters - The managed instance Advanced Threat Protection state.
- options - ManagedInstanceAdvancedThreatProtectionSettingsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceAdvancedThreatProtectionSettingsClient.BeginCreateOrUpdate method.
Example (UpdateAManagedInstancesAdvancedThreatProtectionSettingsWithAllParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/ManagedInstanceAdvancedThreatProtectionSettingsCreateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewManagedInstanceAdvancedThreatProtectionSettingsClient().BeginCreateOrUpdate(ctx, "threatprotection-4799", "threatprotection-6440", armsql.AdvancedThreatProtectionNameDefault, armsql.ManagedInstanceAdvancedThreatProtection{ 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.ManagedInstanceAdvancedThreatProtection = armsql.ManagedInstanceAdvancedThreatProtection{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/advancedThreatProtectionSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/managedInstances/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 (UpdateAManagedInstancesAdvancedThreatProtectionSettingsWithMinimalParameters) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/ManagedInstanceAdvancedThreatProtectionSettingsCreateMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewManagedInstanceAdvancedThreatProtectionSettingsClient().BeginCreateOrUpdate(ctx, "threatprotection-4799", "threatprotection-6440", armsql.AdvancedThreatProtectionNameDefault, armsql.ManagedInstanceAdvancedThreatProtection{ 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.ManagedInstanceAdvancedThreatProtection = armsql.ManagedInstanceAdvancedThreatProtection{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/advancedThreatProtectionSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/managedInstances/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 (*ManagedInstanceAdvancedThreatProtectionSettingsClient) Get ¶
func (client *ManagedInstanceAdvancedThreatProtectionSettingsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, advancedThreatProtectionName AdvancedThreatProtectionName, options *ManagedInstanceAdvancedThreatProtectionSettingsClientGetOptions) (ManagedInstanceAdvancedThreatProtectionSettingsClientGetResponse, error)
Get - Get a managed instance's Advanced Threat Protection state. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-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.
- managedInstanceName - The name of the managed instance.
- advancedThreatProtectionName - The name of the Advanced Threat Protection state.
- options - ManagedInstanceAdvancedThreatProtectionSettingsClientGetOptions contains the optional parameters for the ManagedInstanceAdvancedThreatProtectionSettingsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/ManagedInstanceAdvancedThreatProtectionSettingsGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewManagedInstanceAdvancedThreatProtectionSettingsClient().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.ManagedInstanceAdvancedThreatProtection = armsql.ManagedInstanceAdvancedThreatProtection{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/advancedThreatProtectionSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/managedInstances/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 (*ManagedInstanceAdvancedThreatProtectionSettingsClient) NewListByInstancePager ¶
func (client *ManagedInstanceAdvancedThreatProtectionSettingsClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedInstanceAdvancedThreatProtectionSettingsClientListByInstanceOptions) *runtime.Pager[ManagedInstanceAdvancedThreatProtectionSettingsClientListByInstanceResponse]
NewListByInstancePager - Get the managed instance's Advanced Threat Protection settings.
Generated from API version 2022-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.
- managedInstanceName - The name of the managed instance.
- options - ManagedInstanceAdvancedThreatProtectionSettingsClientListByInstanceOptions contains the optional parameters for the ManagedInstanceAdvancedThreatProtectionSettingsClient.NewListByInstancePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/ManagedInstanceAdvancedThreatProtectionSettingsListByInstance.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewManagedInstanceAdvancedThreatProtectionSettingsClient().NewListByInstancePager("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.ManagedInstanceAdvancedThreatProtectionListResult = armsql.ManagedInstanceAdvancedThreatProtectionListResult{ // Value: []*armsql.ManagedInstanceAdvancedThreatProtection{ // { // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/advancedThreatProtectionSettings"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-4799/providers/Microsoft.Sql/managedInstances/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 ManagedInstanceAdvancedThreatProtectionSettingsClientBeginCreateOrUpdateOptions ¶
type ManagedInstanceAdvancedThreatProtectionSettingsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceAdvancedThreatProtectionSettingsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceAdvancedThreatProtectionSettingsClient.BeginCreateOrUpdate method.
type ManagedInstanceAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse ¶
type ManagedInstanceAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse struct { // A managed instance Advanced Threat Protection. ManagedInstanceAdvancedThreatProtection }
ManagedInstanceAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse contains the response from method ManagedInstanceAdvancedThreatProtectionSettingsClient.BeginCreateOrUpdate.
type ManagedInstanceAdvancedThreatProtectionSettingsClientGetOptions ¶
type ManagedInstanceAdvancedThreatProtectionSettingsClientGetOptions struct { }
ManagedInstanceAdvancedThreatProtectionSettingsClientGetOptions contains the optional parameters for the ManagedInstanceAdvancedThreatProtectionSettingsClient.Get method.
type ManagedInstanceAdvancedThreatProtectionSettingsClientGetResponse ¶
type ManagedInstanceAdvancedThreatProtectionSettingsClientGetResponse struct { // A managed instance Advanced Threat Protection. ManagedInstanceAdvancedThreatProtection }
ManagedInstanceAdvancedThreatProtectionSettingsClientGetResponse contains the response from method ManagedInstanceAdvancedThreatProtectionSettingsClient.Get.
type ManagedInstanceAdvancedThreatProtectionSettingsClientListByInstanceOptions ¶
type ManagedInstanceAdvancedThreatProtectionSettingsClientListByInstanceOptions struct { }
ManagedInstanceAdvancedThreatProtectionSettingsClientListByInstanceOptions contains the optional parameters for the ManagedInstanceAdvancedThreatProtectionSettingsClient.NewListByInstancePager method.
type ManagedInstanceAdvancedThreatProtectionSettingsClientListByInstanceResponse ¶
type ManagedInstanceAdvancedThreatProtectionSettingsClientListByInstanceResponse struct { // A list of the managed instance's Advanced Threat Protection settings. ManagedInstanceAdvancedThreatProtectionListResult }
ManagedInstanceAdvancedThreatProtectionSettingsClientListByInstanceResponse contains the response from method ManagedInstanceAdvancedThreatProtectionSettingsClient.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 ¶
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 ¶
func (m ManagedInstanceAzureADOnlyAuthProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceAzureADOnlyAuthProperties.
func (*ManagedInstanceAzureADOnlyAuthProperties) UnmarshalJSON ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAzureADOnlyAuthCreateOrUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAzureADOnlyAuthDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAzureADOnlyAuthGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAzureADOnlyAuthListByInstance.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ManagedInstanceAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceAzureADOnlyAuthenticationsClient.BeginCreateOrUpdate method.
type ManagedInstanceAzureADOnlyAuthenticationsClientBeginDeleteOptions ¶
type ManagedInstanceAzureADOnlyAuthenticationsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceAzureADOnlyAuthenticationsClientBeginDeleteOptions contains the optional parameters for the ManagedInstanceAzureADOnlyAuthenticationsClient.BeginDelete method.
type ManagedInstanceAzureADOnlyAuthenticationsClientCreateOrUpdateResponse ¶
type ManagedInstanceAzureADOnlyAuthenticationsClientCreateOrUpdateResponse struct { // Azure Active Directory only authentication. ManagedInstanceAzureADOnlyAuthentication }
ManagedInstanceAzureADOnlyAuthenticationsClientCreateOrUpdateResponse contains the response from method ManagedInstanceAzureADOnlyAuthenticationsClient.BeginCreateOrUpdate.
type ManagedInstanceAzureADOnlyAuthenticationsClientDeleteResponse ¶
type ManagedInstanceAzureADOnlyAuthenticationsClientDeleteResponse struct { }
ManagedInstanceAzureADOnlyAuthenticationsClientDeleteResponse contains the response from method ManagedInstanceAzureADOnlyAuthenticationsClient.BeginDelete.
type ManagedInstanceAzureADOnlyAuthenticationsClientGetOptions ¶
type ManagedInstanceAzureADOnlyAuthenticationsClientGetOptions struct { }
ManagedInstanceAzureADOnlyAuthenticationsClientGetOptions contains the optional parameters for the ManagedInstanceAzureADOnlyAuthenticationsClient.Get method.
type ManagedInstanceAzureADOnlyAuthenticationsClientGetResponse ¶
type ManagedInstanceAzureADOnlyAuthenticationsClientGetResponse struct { // Azure Active Directory only authentication. ManagedInstanceAzureADOnlyAuthentication }
ManagedInstanceAzureADOnlyAuthenticationsClientGetResponse contains the response from method ManagedInstanceAzureADOnlyAuthenticationsClient.Get.
type ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceOptions ¶
type ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceOptions struct { }
ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceOptions contains the optional parameters for the ManagedInstanceAzureADOnlyAuthenticationsClient.NewListByInstancePager method.
type ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceResponse ¶
type ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceResponse struct { // A list of active directory only authentications. ManagedInstanceAzureADOnlyAuthListResult }
ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceResponse contains the response from method ManagedInstanceAzureADOnlyAuthenticationsClient.NewListByInstancePager.
type ManagedInstanceDtc ¶
type ManagedInstanceDtc struct { // Resource properties. Properties *ManagedInstanceDtcProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ManagedInstanceDtc - SQL Managed Instance DTC
func (ManagedInstanceDtc) MarshalJSON ¶
func (m ManagedInstanceDtc) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceDtc.
func (*ManagedInstanceDtc) UnmarshalJSON ¶
func (m *ManagedInstanceDtc) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceDtc.
type ManagedInstanceDtcListResult ¶
type ManagedInstanceDtcListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ManagedInstanceDtc }
ManagedInstanceDtcListResult - A list of managed instance's DTCs.
func (ManagedInstanceDtcListResult) MarshalJSON ¶
func (m ManagedInstanceDtcListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceDtcListResult.
func (*ManagedInstanceDtcListResult) UnmarshalJSON ¶
func (m *ManagedInstanceDtcListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceDtcListResult.
type ManagedInstanceDtcProperties ¶
type ManagedInstanceDtcProperties struct { // Active status of managed instance DTC. DtcEnabled *bool // External dns suffix search list of managed instance DTC. ExternalDNSSuffixSearchList []*string // Security settings of managed instance DTC. SecuritySettings *ManagedInstanceDtcSecuritySettings // READ-ONLY; Host name dns suffix of managed instance DTC. DtcHostNameDNSSuffix *string // READ-ONLY; Provisioning state of managed instance DTC. ProvisioningState *ProvisioningState }
ManagedInstanceDtcProperties - The properties of managed instance DTC.
func (ManagedInstanceDtcProperties) MarshalJSON ¶
func (m ManagedInstanceDtcProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceDtcProperties.
func (*ManagedInstanceDtcProperties) UnmarshalJSON ¶
func (m *ManagedInstanceDtcProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceDtcProperties.
type ManagedInstanceDtcSecuritySettings ¶
type ManagedInstanceDtcSecuritySettings struct { // Allow SNA LU 6.2 Transactions to managed instance DTC. SnaLu6Point2TransactionsEnabled *bool // Transaction Manager communication settings of managed instance DTC. TransactionManagerCommunicationSettings *ManagedInstanceDtcTransactionManagerCommunicationSettings // Default timeout for XA Transactions (in seconds). XaTransactionsDefaultTimeout *int32 // Allow XA Transactions to managed instance DTC. XaTransactionsEnabled *bool // Maximum timeout for XA Transactions (in seconds). XaTransactionsMaximumTimeout *int32 }
ManagedInstanceDtcSecuritySettings - The Security Settings of managed instance DTC.
func (ManagedInstanceDtcSecuritySettings) MarshalJSON ¶
func (m ManagedInstanceDtcSecuritySettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceDtcSecuritySettings.
func (*ManagedInstanceDtcSecuritySettings) UnmarshalJSON ¶
func (m *ManagedInstanceDtcSecuritySettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceDtcSecuritySettings.
type ManagedInstanceDtcTransactionManagerCommunicationSettings ¶
type ManagedInstanceDtcTransactionManagerCommunicationSettings struct { // Allow Inbound traffic to managed instance DTC. AllowInboundEnabled *bool // Allow Outbound traffic of managed instance DTC. AllowOutboundEnabled *bool // Authentication type of managed instance DTC. Authentication *string }
ManagedInstanceDtcTransactionManagerCommunicationSettings - The Transaction Manager Communication Settings of managed instance DTC.
func (ManagedInstanceDtcTransactionManagerCommunicationSettings) MarshalJSON ¶
func (m ManagedInstanceDtcTransactionManagerCommunicationSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceDtcTransactionManagerCommunicationSettings.
func (*ManagedInstanceDtcTransactionManagerCommunicationSettings) UnmarshalJSON ¶
func (m *ManagedInstanceDtcTransactionManagerCommunicationSettings) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedInstanceDtcTransactionManagerCommunicationSettings.
type ManagedInstanceDtcsClient ¶
type ManagedInstanceDtcsClient struct {
// contains filtered or unexported fields
}
ManagedInstanceDtcsClient contains the methods for the ManagedInstanceDtcs group. Don't use this type directly, use NewManagedInstanceDtcsClient() instead.
func NewManagedInstanceDtcsClient ¶
func NewManagedInstanceDtcsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedInstanceDtcsClient, error)
NewManagedInstanceDtcsClient creates a new instance of ManagedInstanceDtcsClient 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 (*ManagedInstanceDtcsClient) BeginCreateOrUpdate ¶
func (client *ManagedInstanceDtcsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, dtcName DtcName, parameters ManagedInstanceDtc, options *ManagedInstanceDtcsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedInstanceDtcsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Updates managed instance DTC settings. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-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.
- dtcName - The name of the managed instance DTC.
- parameters - Managed instance DTC settings.
- options - ManagedInstanceDtcsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceDtcsClient.BeginCreateOrUpdate method.
Example (UpdatesManagedInstanceDtcSettingsByEnablingDtc) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/ManagedInstanceDtcUpdateEnableDtc.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewManagedInstanceDtcsClient().BeginCreateOrUpdate(ctx, "testrg", "testinstance", armsql.DtcNameCurrent, armsql.ManagedInstanceDtc{ Properties: &armsql.ManagedInstanceDtcProperties{ DtcEnabled: 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.ManagedInstanceDtc = armsql.ManagedInstanceDtc{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/managedInstances/dtc"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance/dtc/current"), // Properties: &armsql.ManagedInstanceDtcProperties{ // DtcEnabled: to.Ptr(true), // DtcHostNameDNSSuffix: to.Ptr("dtcHostNameSuffixExample.com"), // ExternalDNSSuffixSearchList: []*string{ // to.Ptr("dns.example1.com"), // to.Ptr("dns.example2.com")}, // ProvisioningState: to.Ptr(armsql.ProvisioningStateSucceeded), // SecuritySettings: &armsql.ManagedInstanceDtcSecuritySettings{ // SnaLu6Point2TransactionsEnabled: to.Ptr(false), // TransactionManagerCommunicationSettings: &armsql.ManagedInstanceDtcTransactionManagerCommunicationSettings{ // AllowInboundEnabled: to.Ptr(false), // AllowOutboundEnabled: to.Ptr(true), // Authentication: to.Ptr("NoAuth"), // }, // XaTransactionsDefaultTimeout: to.Ptr[int32](1000), // XaTransactionsEnabled: to.Ptr(false), // XaTransactionsMaximumTimeout: to.Ptr[int32](3000), // }, // }, // }
Output:
Example (UpdatesManagedInstanceDtcSettingsWithAllOptionalParametersSpecified) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/ManagedInstanceDtcUpdateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewManagedInstanceDtcsClient().BeginCreateOrUpdate(ctx, "testrg", "testinstance", armsql.DtcNameCurrent, armsql.ManagedInstanceDtc{ Properties: &armsql.ManagedInstanceDtcProperties{ DtcEnabled: to.Ptr(true), ExternalDNSSuffixSearchList: []*string{ to.Ptr("dns.example1.com"), to.Ptr("dns.example2.com")}, SecuritySettings: &armsql.ManagedInstanceDtcSecuritySettings{ SnaLu6Point2TransactionsEnabled: to.Ptr(false), TransactionManagerCommunicationSettings: &armsql.ManagedInstanceDtcTransactionManagerCommunicationSettings{ AllowInboundEnabled: to.Ptr(false), AllowOutboundEnabled: to.Ptr(true), Authentication: to.Ptr("NoAuth"), }, XaTransactionsDefaultTimeout: to.Ptr[int32](1000), XaTransactionsEnabled: to.Ptr(false), XaTransactionsMaximumTimeout: to.Ptr[int32](3000), }, }, }, 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.ManagedInstanceDtc = armsql.ManagedInstanceDtc{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/managedInstances/dtc"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance/dtc/current"), // Properties: &armsql.ManagedInstanceDtcProperties{ // DtcEnabled: to.Ptr(true), // DtcHostNameDNSSuffix: to.Ptr("dtcHostNameSuffixExample.com"), // ExternalDNSSuffixSearchList: []*string{ // to.Ptr("dns.example1.com"), // to.Ptr("dns.example2.com")}, // ProvisioningState: to.Ptr(armsql.ProvisioningStateSucceeded), // SecuritySettings: &armsql.ManagedInstanceDtcSecuritySettings{ // SnaLu6Point2TransactionsEnabled: to.Ptr(false), // TransactionManagerCommunicationSettings: &armsql.ManagedInstanceDtcTransactionManagerCommunicationSettings{ // AllowInboundEnabled: to.Ptr(false), // AllowOutboundEnabled: to.Ptr(true), // Authentication: to.Ptr("NoAuth"), // }, // XaTransactionsDefaultTimeout: to.Ptr[int32](1000), // XaTransactionsEnabled: to.Ptr(false), // XaTransactionsMaximumTimeout: to.Ptr[int32](3000), // }, // }, // }
Output:
func (*ManagedInstanceDtcsClient) Get ¶
func (client *ManagedInstanceDtcsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, dtcName DtcName, options *ManagedInstanceDtcsClientGetOptions) (ManagedInstanceDtcsClientGetResponse, error)
Get - Gets managed instance DTC settings. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-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.
- dtcName - The name of the managed instance DTC.
- options - ManagedInstanceDtcsClientGetOptions contains the optional parameters for the ManagedInstanceDtcsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/ManagedInstanceDtcGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewManagedInstanceDtcsClient().Get(ctx, "testrg", "testinstance", armsql.DtcNameCurrent, 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.ManagedInstanceDtc = armsql.ManagedInstanceDtc{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/managedInstances/dtc"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance/dtc/current"), // Properties: &armsql.ManagedInstanceDtcProperties{ // DtcEnabled: to.Ptr(true), // DtcHostNameDNSSuffix: to.Ptr("dtcHostNameSuffixExample.com"), // ExternalDNSSuffixSearchList: []*string{ // to.Ptr("dns.example1.com"), // to.Ptr("dns.example2.com")}, // ProvisioningState: to.Ptr(armsql.ProvisioningStateSucceeded), // SecuritySettings: &armsql.ManagedInstanceDtcSecuritySettings{ // SnaLu6Point2TransactionsEnabled: to.Ptr(false), // TransactionManagerCommunicationSettings: &armsql.ManagedInstanceDtcTransactionManagerCommunicationSettings{ // AllowInboundEnabled: to.Ptr(false), // AllowOutboundEnabled: to.Ptr(true), // Authentication: to.Ptr("NoAuth"), // }, // XaTransactionsDefaultTimeout: to.Ptr[int32](1000), // XaTransactionsEnabled: to.Ptr(false), // XaTransactionsMaximumTimeout: to.Ptr[int32](3000), // }, // }, // }
Output:
func (*ManagedInstanceDtcsClient) NewListByManagedInstancePager ¶
func (client *ManagedInstanceDtcsClient) NewListByManagedInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedInstanceDtcsClientListByManagedInstanceOptions) *runtime.Pager[ManagedInstanceDtcsClientListByManagedInstanceResponse]
NewListByManagedInstancePager - Gets a list of managed instance DTC settings.
Generated from API version 2022-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 - ManagedInstanceDtcsClientListByManagedInstanceOptions contains the optional parameters for the ManagedInstanceDtcsClient.NewListByManagedInstancePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/ManagedInstanceDtcList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewManagedInstanceDtcsClient().NewListByManagedInstancePager("testrg", "testinstance", 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.ManagedInstanceDtcListResult = armsql.ManagedInstanceDtcListResult{ // Value: []*armsql.ManagedInstanceDtc{ // { // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/managedInstances/dtc"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance/dtc/current"), // Properties: &armsql.ManagedInstanceDtcProperties{ // DtcEnabled: to.Ptr(true), // DtcHostNameDNSSuffix: to.Ptr("dtcHostNameSuffixExample.com"), // ExternalDNSSuffixSearchList: []*string{ // to.Ptr("dns.example1.com"), // to.Ptr("dns.example2.com")}, // ProvisioningState: to.Ptr(armsql.ProvisioningStateSucceeded), // SecuritySettings: &armsql.ManagedInstanceDtcSecuritySettings{ // SnaLu6Point2TransactionsEnabled: to.Ptr(false), // TransactionManagerCommunicationSettings: &armsql.ManagedInstanceDtcTransactionManagerCommunicationSettings{ // AllowInboundEnabled: to.Ptr(false), // AllowOutboundEnabled: to.Ptr(true), // Authentication: to.Ptr("NoAuth"), // }, // XaTransactionsDefaultTimeout: to.Ptr[int32](1000), // XaTransactionsEnabled: to.Ptr(false), // XaTransactionsMaximumTimeout: to.Ptr[int32](3000), // }, // }, // }}, // } }
Output:
type ManagedInstanceDtcsClientBeginCreateOrUpdateOptions ¶
type ManagedInstanceDtcsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceDtcsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceDtcsClient.BeginCreateOrUpdate method.
type ManagedInstanceDtcsClientCreateOrUpdateResponse ¶
type ManagedInstanceDtcsClientCreateOrUpdateResponse struct { // SQL Managed Instance DTC ManagedInstanceDtc }
ManagedInstanceDtcsClientCreateOrUpdateResponse contains the response from method ManagedInstanceDtcsClient.BeginCreateOrUpdate.
type ManagedInstanceDtcsClientGetOptions ¶
type ManagedInstanceDtcsClientGetOptions struct { }
ManagedInstanceDtcsClientGetOptions contains the optional parameters for the ManagedInstanceDtcsClient.Get method.
type ManagedInstanceDtcsClientGetResponse ¶
type ManagedInstanceDtcsClientGetResponse struct { // SQL Managed Instance DTC ManagedInstanceDtc }
ManagedInstanceDtcsClientGetResponse contains the response from method ManagedInstanceDtcsClient.Get.
type ManagedInstanceDtcsClientListByManagedInstanceOptions ¶
type ManagedInstanceDtcsClientListByManagedInstanceOptions struct { }
ManagedInstanceDtcsClientListByManagedInstanceOptions contains the optional parameters for the ManagedInstanceDtcsClient.NewListByManagedInstancePager method.
type ManagedInstanceDtcsClientListByManagedInstanceResponse ¶
type ManagedInstanceDtcsClientListByManagedInstanceResponse struct { // A list of managed instance's DTCs. ManagedInstanceDtcListResult }
ManagedInstanceDtcsClientListByManagedInstanceResponse contains the response from method ManagedInstanceDtcsClient.NewListByManagedInstancePager.
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 ¶
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 ¶
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 ¶
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 ¶
func (m ManagedInstanceEncryptionProtectorProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceEncryptionProtectorProperties.
func (*ManagedInstanceEncryptionProtectorProperties) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateKeyVault.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateServiceManaged.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceEncryptionProtectorRevalidate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceEncryptionProtectorGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceEncryptionProtectorList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ManagedInstanceEncryptionProtectorsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceEncryptionProtectorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceEncryptionProtectorsClient.BeginCreateOrUpdate method.
type ManagedInstanceEncryptionProtectorsClientBeginRevalidateOptions ¶
type ManagedInstanceEncryptionProtectorsClientBeginRevalidateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceEncryptionProtectorsClientBeginRevalidateOptions contains the optional parameters for the ManagedInstanceEncryptionProtectorsClient.BeginRevalidate method.
type ManagedInstanceEncryptionProtectorsClientCreateOrUpdateResponse ¶
type ManagedInstanceEncryptionProtectorsClientCreateOrUpdateResponse struct { // The managed instance encryption protector. ManagedInstanceEncryptionProtector }
ManagedInstanceEncryptionProtectorsClientCreateOrUpdateResponse contains the response from method ManagedInstanceEncryptionProtectorsClient.BeginCreateOrUpdate.
type ManagedInstanceEncryptionProtectorsClientGetOptions ¶
type ManagedInstanceEncryptionProtectorsClientGetOptions struct { }
ManagedInstanceEncryptionProtectorsClientGetOptions contains the optional parameters for the ManagedInstanceEncryptionProtectorsClient.Get method.
type ManagedInstanceEncryptionProtectorsClientGetResponse ¶
type ManagedInstanceEncryptionProtectorsClientGetResponse struct { // The managed instance encryption protector. ManagedInstanceEncryptionProtector }
ManagedInstanceEncryptionProtectorsClientGetResponse contains the response from method ManagedInstanceEncryptionProtectorsClient.Get.
type ManagedInstanceEncryptionProtectorsClientListByInstanceOptions ¶
type ManagedInstanceEncryptionProtectorsClientListByInstanceOptions struct { }
ManagedInstanceEncryptionProtectorsClientListByInstanceOptions contains the optional parameters for the ManagedInstanceEncryptionProtectorsClient.NewListByInstancePager method.
type ManagedInstanceEncryptionProtectorsClientListByInstanceResponse ¶
type ManagedInstanceEncryptionProtectorsClientListByInstanceResponse struct { // A list of managed instance encryption protectors. ManagedInstanceEncryptionProtectorListResult }
ManagedInstanceEncryptionProtectorsClientListByInstanceResponse contains the response from method ManagedInstanceEncryptionProtectorsClient.NewListByInstancePager.
type ManagedInstanceEncryptionProtectorsClientRevalidateResponse ¶
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 ¶
func (m ManagedInstanceExternalAdministrator) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceExternalAdministrator.
func (*ManagedInstanceExternalAdministrator) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceKeyCreateOrUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceKeyDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceKeyGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceKeyList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ManagedInstanceKeysClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceKeysClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceKeysClient.BeginCreateOrUpdate method.
type ManagedInstanceKeysClientBeginDeleteOptions ¶
type ManagedInstanceKeysClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceKeysClientBeginDeleteOptions contains the optional parameters for the ManagedInstanceKeysClient.BeginDelete method.
type ManagedInstanceKeysClientCreateOrUpdateResponse ¶
type ManagedInstanceKeysClientCreateOrUpdateResponse struct { // A managed instance key. ManagedInstanceKey }
ManagedInstanceKeysClientCreateOrUpdateResponse contains the response from method ManagedInstanceKeysClient.BeginCreateOrUpdate.
type ManagedInstanceKeysClientDeleteResponse ¶
type ManagedInstanceKeysClientDeleteResponse struct { }
ManagedInstanceKeysClientDeleteResponse contains the response from method ManagedInstanceKeysClient.BeginDelete.
type ManagedInstanceKeysClientGetOptions ¶
type ManagedInstanceKeysClientGetOptions struct { }
ManagedInstanceKeysClientGetOptions contains the optional parameters for the ManagedInstanceKeysClient.Get method.
type ManagedInstanceKeysClientGetResponse ¶
type ManagedInstanceKeysClientGetResponse struct { // A managed instance key. ManagedInstanceKey }
ManagedInstanceKeysClientGetResponse contains the response from method ManagedInstanceKeysClient.Get.
type ManagedInstanceKeysClientListByInstanceOptions ¶
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 ¶
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 ¶
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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceLongTermRetentionPolicyCreateOrUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceLongTermRetentionPolicyGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceLongTermRetentionPolicyListByDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ManagedInstanceLongTermRetentionPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceLongTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceLongTermRetentionPoliciesClient.BeginCreateOrUpdate method.
type ManagedInstanceLongTermRetentionPoliciesClientCreateOrUpdateResponse ¶
type ManagedInstanceLongTermRetentionPoliciesClientCreateOrUpdateResponse struct { // A long term retention policy. ManagedInstanceLongTermRetentionPolicy }
ManagedInstanceLongTermRetentionPoliciesClientCreateOrUpdateResponse contains the response from method ManagedInstanceLongTermRetentionPoliciesClient.BeginCreateOrUpdate.
type ManagedInstanceLongTermRetentionPoliciesClientGetOptions ¶
type ManagedInstanceLongTermRetentionPoliciesClientGetOptions struct { }
ManagedInstanceLongTermRetentionPoliciesClientGetOptions contains the optional parameters for the ManagedInstanceLongTermRetentionPoliciesClient.Get method.
type ManagedInstanceLongTermRetentionPoliciesClientGetResponse ¶
type ManagedInstanceLongTermRetentionPoliciesClientGetResponse struct { // A long term retention policy. ManagedInstanceLongTermRetentionPolicy }
ManagedInstanceLongTermRetentionPoliciesClientGetResponse contains the response from method ManagedInstanceLongTermRetentionPoliciesClient.Get.
type ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseOptions ¶
type ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseOptions struct { }
ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseOptions contains the optional parameters for the ManagedInstanceLongTermRetentionPoliciesClient.NewListByDatabasePager method.
type ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseResponse ¶
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 ¶
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 ¶
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 ¶
func (m ManagedInstanceMaintenanceConfigurationCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceMaintenanceConfigurationCapability.
func (*ManagedInstanceMaintenanceConfigurationCapability) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
func (m ManagedInstanceOperationParametersPair) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceOperationParametersPair.
func (*ManagedInstanceOperationParametersPair) UnmarshalJSON ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CancelManagedInstanceOperation.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetManagedInstanceOperation.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListManagedInstanceOperations.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ManagedInstanceOperationsClientCancelOptions struct { }
ManagedInstanceOperationsClientCancelOptions contains the optional parameters for the ManagedInstanceOperationsClient.Cancel method.
type ManagedInstanceOperationsClientCancelResponse ¶
type ManagedInstanceOperationsClientCancelResponse struct { }
ManagedInstanceOperationsClientCancelResponse contains the response from method ManagedInstanceOperationsClient.Cancel.
type ManagedInstanceOperationsClientGetOptions ¶
type ManagedInstanceOperationsClientGetOptions struct { }
ManagedInstanceOperationsClientGetOptions contains the optional parameters for the ManagedInstanceOperationsClient.Get method.
type ManagedInstanceOperationsClientGetResponse ¶
type ManagedInstanceOperationsClientGetResponse struct { // A managed instance operation. ManagedInstanceOperation }
ManagedInstanceOperationsClientGetResponse contains the response from method ManagedInstanceOperationsClient.Get.
type ManagedInstanceOperationsClientListByManagedInstanceOptions ¶
type ManagedInstanceOperationsClientListByManagedInstanceOptions struct { }
ManagedInstanceOperationsClientListByManagedInstanceOptions contains the optional parameters for the ManagedInstanceOperationsClient.NewListByManagedInstancePager method.
type ManagedInstanceOperationsClientListByManagedInstanceResponse ¶
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 ¶
func (m ManagedInstancePairInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstancePairInfo.
func (*ManagedInstancePairInfo) UnmarshalJSON ¶
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 ¶
func (m ManagedInstancePecProperty) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstancePecProperty.
func (*ManagedInstancePecProperty) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
func (m ManagedInstancePrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstancePrivateEndpointConnectionProperties.
func (*ManagedInstancePrivateEndpointConnectionProperties) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstancePrivateEndpointConnectionUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstancePrivateEndpointConnectionDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstancePrivateEndpointConnectionGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstancePrivateEndpointConnectionList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ManagedInstancePrivateEndpointConnectionsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstancePrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstancePrivateEndpointConnectionsClient.BeginCreateOrUpdate method.
type ManagedInstancePrivateEndpointConnectionsClientBeginDeleteOptions ¶
type ManagedInstancePrivateEndpointConnectionsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstancePrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the ManagedInstancePrivateEndpointConnectionsClient.BeginDelete method.
type ManagedInstancePrivateEndpointConnectionsClientCreateOrUpdateResponse ¶
type ManagedInstancePrivateEndpointConnectionsClientCreateOrUpdateResponse struct { // A private endpoint connection ManagedInstancePrivateEndpointConnection }
ManagedInstancePrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method ManagedInstancePrivateEndpointConnectionsClient.BeginCreateOrUpdate.
type ManagedInstancePrivateEndpointConnectionsClientDeleteResponse ¶
type ManagedInstancePrivateEndpointConnectionsClientDeleteResponse struct { }
ManagedInstancePrivateEndpointConnectionsClientDeleteResponse contains the response from method ManagedInstancePrivateEndpointConnectionsClient.BeginDelete.
type ManagedInstancePrivateEndpointConnectionsClientGetOptions ¶
type ManagedInstancePrivateEndpointConnectionsClientGetOptions struct { }
ManagedInstancePrivateEndpointConnectionsClientGetOptions contains the optional parameters for the ManagedInstancePrivateEndpointConnectionsClient.Get method.
type ManagedInstancePrivateEndpointConnectionsClientGetResponse ¶
type ManagedInstancePrivateEndpointConnectionsClientGetResponse struct { // A private endpoint connection ManagedInstancePrivateEndpointConnection }
ManagedInstancePrivateEndpointConnectionsClientGetResponse contains the response from method ManagedInstancePrivateEndpointConnectionsClient.Get.
type ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceOptions ¶
type ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceOptions struct { }
ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceOptions contains the optional parameters for the ManagedInstancePrivateEndpointConnectionsClient.NewListByManagedInstancePager method.
type ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceResponse ¶
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 ¶
func (m ManagedInstancePrivateEndpointProperty) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstancePrivateEndpointProperty.
func (*ManagedInstancePrivateEndpointProperty) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstancePrivateLinkResourcesGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstancePrivateLinkResourcesList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ManagedInstancePrivateLinkResourcesClientGetOptions struct { }
ManagedInstancePrivateLinkResourcesClientGetOptions contains the optional parameters for the ManagedInstancePrivateLinkResourcesClient.Get method.
type ManagedInstancePrivateLinkResourcesClientGetResponse ¶
type ManagedInstancePrivateLinkResourcesClientGetResponse struct { // A private link resource ManagedInstancePrivateLink }
ManagedInstancePrivateLinkResourcesClientGetResponse contains the response from method ManagedInstancePrivateLinkResourcesClient.Get.
type ManagedInstancePrivateLinkResourcesClientListByManagedInstanceOptions ¶
type ManagedInstancePrivateLinkResourcesClientListByManagedInstanceOptions struct { }
ManagedInstancePrivateLinkResourcesClientListByManagedInstanceOptions contains the optional parameters for the ManagedInstancePrivateLinkResourcesClient.NewListByManagedInstancePager method.
type ManagedInstancePrivateLinkResourcesClientListByManagedInstanceResponse ¶
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 ¶
func (m ManagedInstancePrivateLinkServiceConnectionStateProperty) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstancePrivateLinkServiceConnectionStateProperty.
func (*ManagedInstancePrivateLinkServiceConnectionStateProperty) UnmarshalJSON ¶
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 instance. This can only be used at instance create time. If used for instance // update, it will be ignored or it will result in an error. For updates // individual APIs will need to be used. 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: 16384. Increments of 32 GB allowed only. Maximum value depends on // the selected hardware family and number of vCores. 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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceTdeCertificate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ManagedInstanceTdeCertificatesClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceTdeCertificatesClientBeginCreateOptions contains the optional parameters for the ManagedInstanceTdeCertificatesClient.BeginCreate method.
type ManagedInstanceTdeCertificatesClientCreateResponse ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
func (m ManagedInstanceVulnerabilityAssessmentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceVulnerabilityAssessmentProperties.
func (*ManagedInstanceVulnerabilityAssessmentProperties) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateStorageAccessKeyMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateContainerSasKeyMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceVulnerabilityAssessmentDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceVulnerabilityAssessmentGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceVulnerabilityAssessmentListByInstance.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateOptions struct { }
ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceVulnerabilityAssessmentsClient.CreateOrUpdate method.
type ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateResponse ¶
type ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateResponse struct { // A managed instance vulnerability assessment. ManagedInstanceVulnerabilityAssessment }
ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateResponse contains the response from method ManagedInstanceVulnerabilityAssessmentsClient.CreateOrUpdate.
type ManagedInstanceVulnerabilityAssessmentsClientDeleteOptions ¶
type ManagedInstanceVulnerabilityAssessmentsClientDeleteOptions struct { }
ManagedInstanceVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the ManagedInstanceVulnerabilityAssessmentsClient.Delete method.
type ManagedInstanceVulnerabilityAssessmentsClientDeleteResponse ¶
type ManagedInstanceVulnerabilityAssessmentsClientDeleteResponse struct { }
ManagedInstanceVulnerabilityAssessmentsClientDeleteResponse contains the response from method ManagedInstanceVulnerabilityAssessmentsClient.Delete.
type ManagedInstanceVulnerabilityAssessmentsClientGetOptions ¶
type ManagedInstanceVulnerabilityAssessmentsClientGetOptions struct { }
ManagedInstanceVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the ManagedInstanceVulnerabilityAssessmentsClient.Get method.
type ManagedInstanceVulnerabilityAssessmentsClientGetResponse ¶
type ManagedInstanceVulnerabilityAssessmentsClientGetResponse struct { // A managed instance vulnerability assessment. ManagedInstanceVulnerabilityAssessment }
ManagedInstanceVulnerabilityAssessmentsClientGetResponse contains the response from method ManagedInstanceVulnerabilityAssessmentsClient.Get.
type ManagedInstanceVulnerabilityAssessmentsClientListByInstanceOptions ¶
type ManagedInstanceVulnerabilityAssessmentsClientListByInstanceOptions struct { }
ManagedInstanceVulnerabilityAssessmentsClientListByInstanceOptions contains the optional parameters for the ManagedInstanceVulnerabilityAssessmentsClient.NewListByInstancePager method.
type ManagedInstanceVulnerabilityAssessmentsClientListByInstanceResponse ¶
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 2022-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceCreateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceCreateMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2022-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2022-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/FailoverManagedInstance.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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) BeginStart ¶
func (client *ManagedInstancesClient) BeginStart(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstancesClientBeginStartOptions) (*runtime.Poller[ManagedInstancesClientStartResponse], error)
BeginStart - Starts the managed instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-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.
- managedInstanceName - The name of the managed instance.
- options - ManagedInstancesClientBeginStartOptions contains the optional parameters for the ManagedInstancesClient.BeginStart method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/StartManagedInstance.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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().BeginStart(ctx, "startrg", "mitostart", 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) BeginStop ¶
func (client *ManagedInstancesClient) BeginStop(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstancesClientBeginStopOptions) (*runtime.Poller[ManagedInstancesClientStopResponse], error)
BeginStop - Stops the managed instance. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-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.
- managedInstanceName - The name of the managed instance.
- options - ManagedInstancesClientBeginStopOptions contains the optional parameters for the ManagedInstancesClient.BeginStop method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/StopManagedInstance.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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().BeginStop(ctx, "stoprg", "mitostop", 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) 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 2022-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceRemoveMaintenanceConfiguration.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceUpdateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceUpdateMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2022-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceGetWithExpandEqualsAdministrators.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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 2022-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceListByInstancePool.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceListByInstancePoolWithExpandEqualsAdministrators.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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 2022-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceTopQueriesList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceTopQueriesListMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceTopQueriesListMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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 2022-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceListByResourceGroup.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceListByResourceGroupWithExpandEqualsAdministrators.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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) NewListOutboundNetworkDependenciesByManagedInstancePager ¶
func (client *ManagedInstancesClient) NewListOutboundNetworkDependenciesByManagedInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedInstancesClientListOutboundNetworkDependenciesByManagedInstanceOptions) *runtime.Pager[ManagedInstancesClientListOutboundNetworkDependenciesByManagedInstanceResponse]
NewListOutboundNetworkDependenciesByManagedInstancePager - Gets the collection of outbound network dependencies for the given managed instance.
Generated from API version 2022-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.
- managedInstanceName - The name of the managed instance.
- options - ManagedInstancesClientListOutboundNetworkDependenciesByManagedInstanceOptions contains the optional parameters for the ManagedInstancesClient.NewListOutboundNetworkDependenciesByManagedInstancePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ListOutboundNetworkDependenciesByManagedInstance.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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().NewListOutboundNetworkDependenciesByManagedInstancePager("sqlcrudtest-7398", "testinstance", 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.OutboundEnvironmentEndpointCollection = armsql.OutboundEnvironmentEndpointCollection{ // Value: []*armsql.OutboundEnvironmentEndpoint{ // { // Category: to.Ptr("Azure SQL Database"), // Endpoints: []*armsql.EndpointDependency{ // { // DomainName: to.Ptr("control.database.windows.net"), // EndpointDetails: []*armsql.EndpointDetail{ // { // Port: to.Ptr[int32](443), // }}, // }, // { // DomainName: to.Ptr("worker.database.windows.net"), // EndpointDetails: []*armsql.EndpointDetail{ // { // Port: to.Ptr[int32](443), // }}, // }}, // }, // { // Category: to.Ptr("Azure Storage"), // Endpoints: []*armsql.EndpointDependency{ // { // DomainName: to.Ptr("blob.core.windows.net"), // EndpointDetails: []*armsql.EndpointDetail{ // { // Port: to.Ptr[int32](443), // }}, // }, // { // DomainName: to.Ptr("table.core.windows.net"), // EndpointDetails: []*armsql.EndpointDetail{ // { // Port: to.Ptr[int32](443), // }}, // }}, // }, // { // Category: to.Ptr("Service Bus"), // Endpoints: []*armsql.EndpointDependency{ // { // DomainName: to.Ptr("servicebus.windows.net"), // EndpointDetails: []*armsql.EndpointDetail{ // { // Port: to.Ptr[int32](443), // }}, // }}, // }, // { // Category: to.Ptr("Certificate Verification"), // Endpoints: []*armsql.EndpointDependency{ // { // DomainName: to.Ptr("dsms.core.windows.net"), // EndpointDetails: []*armsql.EndpointDetail{ // { // Port: to.Ptr[int32](443), // }}, // }, // { // DomainName: to.Ptr("dsts.core.windows.net"), // EndpointDetails: []*armsql.EndpointDetail{ // { // Port: to.Ptr[int32](443), // }}, // }, // { // DomainName: to.Ptr("login.windows.net"), // EndpointDetails: []*armsql.EndpointDetail{ // { // Port: to.Ptr[int32](443), // }}, // }}, // }, // { // Category: to.Ptr("Telemetry"), // Endpoints: []*armsql.EndpointDependency{ // { // DomainName: to.Ptr("azurewatsonanalysis-prod.core.windows.net"), // EndpointDetails: []*armsql.EndpointDetail{ // { // Port: to.Ptr[int32](443), // }}, // }, // { // DomainName: to.Ptr("global.metrics.nsatc.net"), // EndpointDetails: []*armsql.EndpointDetail{ // { // Port: to.Ptr[int32](443), // }}, // }, // { // DomainName: to.Ptr("production.diagnostics.monitoring.core.windows.net"), // EndpointDetails: []*armsql.EndpointDetail{ // { // Port: to.Ptr[int32](443), // }}, // }}, // }}, // } }
Output:
func (*ManagedInstancesClient) NewListPager ¶
func (client *ManagedInstancesClient) NewListPager(options *ManagedInstancesClientListOptions) *runtime.Pager[ManagedInstancesClientListResponse]
NewListPager - Gets a list of all managed instances in the subscription.
Generated from API version 2022-08-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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedInstanceListWithExpandEqualsAdministrators.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ManagedInstancesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstancesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstancesClient.BeginCreateOrUpdate method.
type ManagedInstancesClientBeginDeleteOptions ¶
type ManagedInstancesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstancesClientBeginDeleteOptions contains the optional parameters for the ManagedInstancesClient.BeginDelete method.
type ManagedInstancesClientBeginFailoverOptions ¶
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 ManagedInstancesClientBeginStartOptions ¶
type ManagedInstancesClientBeginStartOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstancesClientBeginStartOptions contains the optional parameters for the ManagedInstancesClient.BeginStart method.
type ManagedInstancesClientBeginStopOptions ¶
type ManagedInstancesClientBeginStopOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstancesClientBeginStopOptions contains the optional parameters for the ManagedInstancesClient.BeginStop method.
type ManagedInstancesClientBeginUpdateOptions ¶
type ManagedInstancesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstancesClientBeginUpdateOptions contains the optional parameters for the ManagedInstancesClient.BeginUpdate method.
type ManagedInstancesClientCreateOrUpdateResponse ¶
type ManagedInstancesClientCreateOrUpdateResponse struct { // An Azure SQL managed instance. ManagedInstance }
ManagedInstancesClientCreateOrUpdateResponse contains the response from method ManagedInstancesClient.BeginCreateOrUpdate.
type ManagedInstancesClientDeleteResponse ¶
type ManagedInstancesClientDeleteResponse struct { }
ManagedInstancesClientDeleteResponse contains the response from method ManagedInstancesClient.BeginDelete.
type ManagedInstancesClientFailoverResponse ¶
type ManagedInstancesClientFailoverResponse struct { }
ManagedInstancesClientFailoverResponse contains the response from method ManagedInstancesClient.BeginFailover.
type ManagedInstancesClientGetOptions ¶
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 ¶
type ManagedInstancesClientGetResponse struct { // An Azure SQL managed instance. ManagedInstance }
ManagedInstancesClientGetResponse contains the response from method ManagedInstancesClient.Get.
type ManagedInstancesClientListByInstancePoolOptions ¶
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 ¶
type ManagedInstancesClientListByInstancePoolResponse struct { // A list of managed instances. ManagedInstanceListResult }
ManagedInstancesClientListByInstancePoolResponse contains the response from method ManagedInstancesClient.NewListByInstancePoolPager.
type ManagedInstancesClientListByManagedInstanceOptions ¶
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 ¶
type ManagedInstancesClientListByManagedInstanceResponse struct { // A list of top resource consuming queries on managed instance TopQueriesListResult }
ManagedInstancesClientListByManagedInstanceResponse contains the response from method ManagedInstancesClient.NewListByManagedInstancePager.
type ManagedInstancesClientListByResourceGroupOptions ¶
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 ¶
type ManagedInstancesClientListByResourceGroupResponse struct { // A list of managed instances. ManagedInstanceListResult }
ManagedInstancesClientListByResourceGroupResponse contains the response from method ManagedInstancesClient.NewListByResourceGroupPager.
type ManagedInstancesClientListOptions ¶
type ManagedInstancesClientListOptions struct { // The child resources to include in the response. Expand *string }
ManagedInstancesClientListOptions contains the optional parameters for the ManagedInstancesClient.NewListPager method.
type ManagedInstancesClientListOutboundNetworkDependenciesByManagedInstanceOptions ¶
type ManagedInstancesClientListOutboundNetworkDependenciesByManagedInstanceOptions struct { }
ManagedInstancesClientListOutboundNetworkDependenciesByManagedInstanceOptions contains the optional parameters for the ManagedInstancesClient.NewListOutboundNetworkDependenciesByManagedInstancePager method.
type ManagedInstancesClientListOutboundNetworkDependenciesByManagedInstanceResponse ¶
type ManagedInstancesClientListOutboundNetworkDependenciesByManagedInstanceResponse struct { // A collection of endpoints that the managed instance service requires outbound network access to. OutboundEnvironmentEndpointCollection }
ManagedInstancesClientListOutboundNetworkDependenciesByManagedInstanceResponse contains the response from method ManagedInstancesClient.NewListOutboundNetworkDependenciesByManagedInstancePager.
type ManagedInstancesClientListResponse ¶
type ManagedInstancesClientListResponse struct { // A list of managed instances. ManagedInstanceListResult }
ManagedInstancesClientListResponse contains the response from method ManagedInstancesClient.NewListPager.
type ManagedInstancesClientStartResponse ¶
type ManagedInstancesClientStartResponse struct { }
ManagedInstancesClientStartResponse contains the response from method ManagedInstancesClient.BeginStart.
type ManagedInstancesClientStopResponse ¶
type ManagedInstancesClientStopResponse struct { }
ManagedInstancesClientStopResponse contains the response from method ManagedInstancesClient.BeginStop.
type ManagedInstancesClientUpdateResponse ¶
type ManagedInstancesClientUpdateResponse struct { // An Azure SQL managed instance. ManagedInstance }
ManagedInstancesClientUpdateResponse contains the response from method ManagedInstancesClient.BeginUpdate.
type ManagedLedgerDigestUploads ¶
type ManagedLedgerDigestUploads struct { // Resource properties. Properties *ManagedLedgerDigestUploadsProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ManagedLedgerDigestUploads - Azure SQL Database ledger digest upload settings.
func (ManagedLedgerDigestUploads) MarshalJSON ¶
func (m ManagedLedgerDigestUploads) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedLedgerDigestUploads.
func (*ManagedLedgerDigestUploads) UnmarshalJSON ¶
func (m *ManagedLedgerDigestUploads) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedLedgerDigestUploads.
type ManagedLedgerDigestUploadsClient ¶
type ManagedLedgerDigestUploadsClient struct {
// contains filtered or unexported fields
}
ManagedLedgerDigestUploadsClient contains the methods for the ManagedLedgerDigestUploads group. Don't use this type directly, use NewManagedLedgerDigestUploadsClient() instead.
func NewManagedLedgerDigestUploadsClient ¶
func NewManagedLedgerDigestUploadsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedLedgerDigestUploadsClient, error)
NewManagedLedgerDigestUploadsClient creates a new instance of ManagedLedgerDigestUploadsClient 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 (*ManagedLedgerDigestUploadsClient) BeginCreateOrUpdate ¶
func (client *ManagedLedgerDigestUploadsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, ledgerDigestUploads ManagedLedgerDigestUploadsName, parameters ManagedLedgerDigestUploads, options *ManagedLedgerDigestUploadsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedLedgerDigestUploadsClientCreateOrUpdateResponse], 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 2022-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.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- ledgerDigestUploads - The name of the Ledger Digest Upload Configurations.
- parameters - The Ledger Digest Storage Endpoint.
- options - ManagedLedgerDigestUploadsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedLedgerDigestUploadsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedLedgerDigestUploadsEnable.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewManagedLedgerDigestUploadsClient().BeginCreateOrUpdate(ctx, "ledgertestrg", "ledgertestserver", "testdb", armsql.ManagedLedgerDigestUploadsNameCurrent, armsql.ManagedLedgerDigestUploads{ Properties: &armsql.ManagedLedgerDigestUploadsProperties{ 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.ManagedLedgerDigestUploads = armsql.ManagedLedgerDigestUploads{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/ledgerDigestUploads"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/managedInstances/ledgertestserver/databases/testdb/ledgerDigestUploads/current"), // Properties: &armsql.ManagedLedgerDigestUploadsProperties{ // DigestStorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), // State: to.Ptr(armsql.ManagedLedgerDigestUploadsStateEnabled), // }, // }
Output:
func (*ManagedLedgerDigestUploadsClient) BeginDisable ¶
func (client *ManagedLedgerDigestUploadsClient) BeginDisable(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, ledgerDigestUploads ManagedLedgerDigestUploadsName, options *ManagedLedgerDigestUploadsClientBeginDisableOptions) (*runtime.Poller[ManagedLedgerDigestUploadsClientDisableResponse], 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 2022-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.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- options - ManagedLedgerDigestUploadsClientBeginDisableOptions contains the optional parameters for the ManagedLedgerDigestUploadsClient.BeginDisable method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedLedgerDigestUploadsDisable.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewManagedLedgerDigestUploadsClient().BeginDisable(ctx, "ledgertestrg", "ledgertestserver", "testdb", armsql.ManagedLedgerDigestUploadsNameCurrent, 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.ManagedLedgerDigestUploads = armsql.ManagedLedgerDigestUploads{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/ledgerDigestUploads"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/managedInstances/ledgertestserver/databases/testdb/ledgerDigestUploads/current/disable"), // Properties: &armsql.ManagedLedgerDigestUploadsProperties{ // State: to.Ptr(armsql.ManagedLedgerDigestUploadsStateDisabled), // }, // }
Output:
func (*ManagedLedgerDigestUploadsClient) Get ¶
func (client *ManagedLedgerDigestUploadsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, ledgerDigestUploads ManagedLedgerDigestUploadsName, options *ManagedLedgerDigestUploadsClientGetOptions) (ManagedLedgerDigestUploadsClientGetResponse, 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 2022-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.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- options - ManagedLedgerDigestUploadsClientGetOptions contains the optional parameters for the ManagedLedgerDigestUploadsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedLedgerDigestUploadsGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewManagedLedgerDigestUploadsClient().Get(ctx, "ledgertestrg", "ledgertestserver", "testdb", armsql.ManagedLedgerDigestUploadsNameCurrent, 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.ManagedLedgerDigestUploads = armsql.ManagedLedgerDigestUploads{ // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/ledgerDigestUploads"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/managedInstances/ledgertestserver/databases/testdb/current"), // Properties: &armsql.ManagedLedgerDigestUploadsProperties{ // DigestStorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), // State: to.Ptr(armsql.ManagedLedgerDigestUploadsStateEnabled), // }, // }
Output:
func (*ManagedLedgerDigestUploadsClient) NewListByDatabasePager ¶
func (client *ManagedLedgerDigestUploadsClient) NewListByDatabasePager(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedLedgerDigestUploadsClientListByDatabaseOptions) *runtime.Pager[ManagedLedgerDigestUploadsClientListByDatabaseResponse]
NewListByDatabasePager - Gets all ledger digest upload settings on a database.
Generated from API version 2022-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.
- managedInstanceName - The name of the managed instance.
- databaseName - The name of the database.
- options - ManagedLedgerDigestUploadsClientListByDatabaseOptions contains the optional parameters for the ManagedLedgerDigestUploadsClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ManagedLedgerDigestUploadsList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewManagedLedgerDigestUploadsClient().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.ManagedLedgerDigestUploadsListResult = armsql.ManagedLedgerDigestUploadsListResult{ // Value: []*armsql.ManagedLedgerDigestUploads{ // { // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/managedInstances/databases/ledgerDigestUploads"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/ledgertestrg/providers/Microsoft.Sql/managedInstances/ledgertestserver/databases/testdb/current"), // Properties: &armsql.ManagedLedgerDigestUploadsProperties{ // DigestStorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), // State: to.Ptr(armsql.ManagedLedgerDigestUploadsStateEnabled), // }, // }}, // } }
Output:
type ManagedLedgerDigestUploadsClientBeginCreateOrUpdateOptions ¶
type ManagedLedgerDigestUploadsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedLedgerDigestUploadsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedLedgerDigestUploadsClient.BeginCreateOrUpdate method.
type ManagedLedgerDigestUploadsClientBeginDisableOptions ¶
type ManagedLedgerDigestUploadsClientBeginDisableOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedLedgerDigestUploadsClientBeginDisableOptions contains the optional parameters for the ManagedLedgerDigestUploadsClient.BeginDisable method.
type ManagedLedgerDigestUploadsClientCreateOrUpdateResponse ¶
type ManagedLedgerDigestUploadsClientCreateOrUpdateResponse struct { // Azure SQL Database ledger digest upload settings. ManagedLedgerDigestUploads }
ManagedLedgerDigestUploadsClientCreateOrUpdateResponse contains the response from method ManagedLedgerDigestUploadsClient.BeginCreateOrUpdate.
type ManagedLedgerDigestUploadsClientDisableResponse ¶
type ManagedLedgerDigestUploadsClientDisableResponse struct { // Azure SQL Database ledger digest upload settings. ManagedLedgerDigestUploads }
ManagedLedgerDigestUploadsClientDisableResponse contains the response from method ManagedLedgerDigestUploadsClient.BeginDisable.
type ManagedLedgerDigestUploadsClientGetOptions ¶
type ManagedLedgerDigestUploadsClientGetOptions struct { }
ManagedLedgerDigestUploadsClientGetOptions contains the optional parameters for the ManagedLedgerDigestUploadsClient.Get method.
type ManagedLedgerDigestUploadsClientGetResponse ¶
type ManagedLedgerDigestUploadsClientGetResponse struct { // Azure SQL Database ledger digest upload settings. ManagedLedgerDigestUploads }
ManagedLedgerDigestUploadsClientGetResponse contains the response from method ManagedLedgerDigestUploadsClient.Get.
type ManagedLedgerDigestUploadsClientListByDatabaseOptions ¶
type ManagedLedgerDigestUploadsClientListByDatabaseOptions struct { }
ManagedLedgerDigestUploadsClientListByDatabaseOptions contains the optional parameters for the ManagedLedgerDigestUploadsClient.NewListByDatabasePager method.
type ManagedLedgerDigestUploadsClientListByDatabaseResponse ¶
type ManagedLedgerDigestUploadsClientListByDatabaseResponse struct { // A list of ledger digest upload settings. ManagedLedgerDigestUploadsListResult }
ManagedLedgerDigestUploadsClientListByDatabaseResponse contains the response from method ManagedLedgerDigestUploadsClient.NewListByDatabasePager.
type ManagedLedgerDigestUploadsListResult ¶
type ManagedLedgerDigestUploadsListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ManagedLedgerDigestUploads }
ManagedLedgerDigestUploadsListResult - A list of ledger digest upload settings.
func (ManagedLedgerDigestUploadsListResult) MarshalJSON ¶
func (m ManagedLedgerDigestUploadsListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedLedgerDigestUploadsListResult.
func (*ManagedLedgerDigestUploadsListResult) UnmarshalJSON ¶
func (m *ManagedLedgerDigestUploadsListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedLedgerDigestUploadsListResult.
type ManagedLedgerDigestUploadsName ¶
type ManagedLedgerDigestUploadsName string
const (
ManagedLedgerDigestUploadsNameCurrent ManagedLedgerDigestUploadsName = "current"
)
func PossibleManagedLedgerDigestUploadsNameValues ¶
func PossibleManagedLedgerDigestUploadsNameValues() []ManagedLedgerDigestUploadsName
PossibleManagedLedgerDigestUploadsNameValues returns the possible values for the ManagedLedgerDigestUploadsName const type.
type ManagedLedgerDigestUploadsProperties ¶
type ManagedLedgerDigestUploadsProperties 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 *ManagedLedgerDigestUploadsState }
ManagedLedgerDigestUploadsProperties - The properties of a database ledger digest upload settings.
func (ManagedLedgerDigestUploadsProperties) MarshalJSON ¶
func (m ManagedLedgerDigestUploadsProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedLedgerDigestUploadsProperties.
func (*ManagedLedgerDigestUploadsProperties) UnmarshalJSON ¶
func (m *ManagedLedgerDigestUploadsProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedLedgerDigestUploadsProperties.
type ManagedLedgerDigestUploadsState ¶
type ManagedLedgerDigestUploadsState string
ManagedLedgerDigestUploadsState - Specifies the state of ledger digest upload.
const ( ManagedLedgerDigestUploadsStateDisabled ManagedLedgerDigestUploadsState = "Disabled" ManagedLedgerDigestUploadsStateEnabled ManagedLedgerDigestUploadsState = "Enabled" )
func PossibleManagedLedgerDigestUploadsStateValues ¶
func PossibleManagedLedgerDigestUploadsStateValues() []ManagedLedgerDigestUploadsState
PossibleManagedLedgerDigestUploadsStateValues returns the possible values for the ManagedLedgerDigestUploadsState const type.
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/UpdateManagedShortTermRetentionPolicyRestorableDropped.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetManagedShortTermRetentionPolicyRestorableDropped.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetListManagedShortTermRetentionPolicyRestorableDropped.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate method.
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginUpdateOptions ¶
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginUpdateOptions contains the optional parameters for the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.BeginUpdate method.
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse ¶
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse struct { // A short term retention policy. ManagedBackupShortTermRetentionPolicy }
ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse contains the response from method ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate.
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetOptions ¶
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetOptions struct { }
ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetOptions contains the optional parameters for the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.Get method.
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetResponse ¶
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetResponse struct { // A short term retention policy. ManagedBackupShortTermRetentionPolicy }
ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetResponse contains the response from method ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.Get.
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseOptions ¶
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseOptions struct { }
ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseOptions contains the optional parameters for the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.NewListByRestorableDroppedDatabasePager method.
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseResponse ¶
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseResponse struct { // A list of short term retention policies. ManagedBackupShortTermRetentionPolicyListResult }
ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseResponse contains the response from method ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.NewListByRestorableDroppedDatabasePager.
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientUpdateResponse ¶
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 ManagedServerDNSAlias ¶
type ManagedServerDNSAlias struct { // Resource properties. Properties *ManagedServerDNSAliasProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ManagedServerDNSAlias - A managed server DNS alias.
func (ManagedServerDNSAlias) MarshalJSON ¶
func (m ManagedServerDNSAlias) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedServerDNSAlias.
func (*ManagedServerDNSAlias) UnmarshalJSON ¶
func (m *ManagedServerDNSAlias) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServerDNSAlias.
type ManagedServerDNSAliasAcquisition ¶
type ManagedServerDNSAliasAcquisition struct { // REQUIRED; The resource ID of the managed server DNS alias that will be acquired to point to this managed server instead. OldManagedServerDNSAliasResourceID *string }
ManagedServerDNSAliasAcquisition - A managed server DNS alias acquisition request.
func (ManagedServerDNSAliasAcquisition) MarshalJSON ¶
func (m ManagedServerDNSAliasAcquisition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedServerDNSAliasAcquisition.
func (*ManagedServerDNSAliasAcquisition) UnmarshalJSON ¶
func (m *ManagedServerDNSAliasAcquisition) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServerDNSAliasAcquisition.
type ManagedServerDNSAliasCreation ¶
type ManagedServerDNSAliasCreation struct { // Whether or not DNS record should be created for this alias. CreateDNSRecord *bool }
ManagedServerDNSAliasCreation - A managed server dns alias creation request.
func (ManagedServerDNSAliasCreation) MarshalJSON ¶
func (m ManagedServerDNSAliasCreation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedServerDNSAliasCreation.
func (*ManagedServerDNSAliasCreation) UnmarshalJSON ¶
func (m *ManagedServerDNSAliasCreation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServerDNSAliasCreation.
type ManagedServerDNSAliasListResult ¶
type ManagedServerDNSAliasListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ManagedServerDNSAlias }
ManagedServerDNSAliasListResult - A list of managed server DNS aliases.
func (ManagedServerDNSAliasListResult) MarshalJSON ¶
func (m ManagedServerDNSAliasListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedServerDNSAliasListResult.
func (*ManagedServerDNSAliasListResult) UnmarshalJSON ¶
func (m *ManagedServerDNSAliasListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServerDNSAliasListResult.
type ManagedServerDNSAliasProperties ¶
type ManagedServerDNSAliasProperties struct { // READ-ONLY; The fully qualified DNS record for managed server alias AzureDNSRecord *string // READ-ONLY; The fully qualified public DNS record for managed server alias PublicAzureDNSRecord *string }
ManagedServerDNSAliasProperties - Properties of a managed server DNS alias.
func (ManagedServerDNSAliasProperties) MarshalJSON ¶
func (m ManagedServerDNSAliasProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedServerDNSAliasProperties.
func (*ManagedServerDNSAliasProperties) UnmarshalJSON ¶
func (m *ManagedServerDNSAliasProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServerDNSAliasProperties.
type ManagedServerDNSAliasesClient ¶
type ManagedServerDNSAliasesClient struct {
// contains filtered or unexported fields
}
ManagedServerDNSAliasesClient contains the methods for the ManagedServerDNSAliases group. Don't use this type directly, use NewManagedServerDNSAliasesClient() instead.
func NewManagedServerDNSAliasesClient ¶
func NewManagedServerDNSAliasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedServerDNSAliasesClient, error)
NewManagedServerDNSAliasesClient creates a new instance of ManagedServerDNSAliasesClient 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 (*ManagedServerDNSAliasesClient) BeginAcquire ¶
func (client *ManagedServerDNSAliasesClient) BeginAcquire(ctx context.Context, resourceGroupName string, managedInstanceName string, dnsAliasName string, parameters ManagedServerDNSAliasAcquisition, options *ManagedServerDNSAliasesClientBeginAcquireOptions) (*runtime.Poller[ManagedServerDNSAliasesClientAcquireResponse], error)
BeginAcquire - Acquires managed server DNS alias from another managed 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.
- managedInstanceName - The name of the managed instance.
- options - ManagedServerDNSAliasesClientBeginAcquireOptions contains the optional parameters for the ManagedServerDNSAliasesClient.BeginAcquire method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ManagedServerDnsAliasAcquire.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewManagedServerDNSAliasesClient().BeginAcquire(ctx, "Default", "new-mi", "dns-alias-mi", armsql.ManagedServerDNSAliasAcquisition{ OldManagedServerDNSAliasResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/old-mi/dnsAliases/alias1"), }, 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.ManagedServerDNSAlias = armsql.ManagedServerDNSAlias{ // Name: to.Ptr("alias1"), // Type: to.Ptr("Microsoft.Sql/managedInstances/dnsAliases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/new-mi/dnsAliases/alias1"), // Properties: &armsql.ManagedServerDNSAliasProperties{ // AzureDNSRecord: to.Ptr("alias1.abcd1234.database.windows.net"), // }, // }
Output:
func (*ManagedServerDNSAliasesClient) BeginCreateOrUpdate ¶
func (client *ManagedServerDNSAliasesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, dnsAliasName string, parameters ManagedServerDNSAliasCreation, options *ManagedServerDNSAliasesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ManagedServerDNSAliasesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates a managed server DNS alias. 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.
- options - ManagedServerDNSAliasesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedServerDNSAliasesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ManagedServerDnsAliasCreateOrUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewManagedServerDNSAliasesClient().BeginCreateOrUpdate(ctx, "Default", "dns-mi", "dns-alias-mi", armsql.ManagedServerDNSAliasCreation{}, 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.ManagedServerDNSAlias = armsql.ManagedServerDNSAlias{ // Name: to.Ptr("dns-alias-mi"), // Type: to.Ptr("Microsoft.Sql/managedInstances/dnsAliases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/dns-mi/dnsAliases/dns-alias-mi"), // Properties: &armsql.ManagedServerDNSAliasProperties{ // AzureDNSRecord: to.Ptr("dns-alias-mi.abcd1234.database.windows.net"), // }, // }
Output:
func (*ManagedServerDNSAliasesClient) BeginDelete ¶
func (client *ManagedServerDNSAliasesClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, dnsAliasName string, options *ManagedServerDNSAliasesClientBeginDeleteOptions) (*runtime.Poller[ManagedServerDNSAliasesClientDeleteResponse], error)
BeginDelete - Deletes the managed server DNS alias with the given name. 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.
- options - ManagedServerDNSAliasesClientBeginDeleteOptions contains the optional parameters for the ManagedServerDNSAliasesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ManagedServerDnsAliasDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewManagedServerDNSAliasesClient().BeginDelete(ctx, "Default", "dns-mi", "dns-alias-mi", 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 (*ManagedServerDNSAliasesClient) Get ¶
func (client *ManagedServerDNSAliasesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, dnsAliasName string, options *ManagedServerDNSAliasesClientGetOptions) (ManagedServerDNSAliasesClientGetResponse, error)
Get - Gets a server DNS alias. 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.
- options - ManagedServerDNSAliasesClientGetOptions contains the optional parameters for the ManagedServerDNSAliasesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ManagedServerDnsAliasGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewManagedServerDNSAliasesClient().Get(ctx, "Default", "dns-mi", "dns-alias-mi", 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.ManagedServerDNSAlias = armsql.ManagedServerDNSAlias{ // Name: to.Ptr("dns-alias-mi"), // Type: to.Ptr("Microsoft.Sql/managedInstances/dnsAliases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/dns-mi/dnsAliases/dns-alias-mi"), // Properties: &armsql.ManagedServerDNSAliasProperties{ // AzureDNSRecord: to.Ptr("dns-alias-mi.abcd1234.database.windows.net"), // PublicAzureDNSRecord: to.Ptr("dns-alias-mi.public.abcd1234.database.windows.net"), // }, // }
Output:
func (*ManagedServerDNSAliasesClient) NewListByManagedInstancePager ¶
func (client *ManagedServerDNSAliasesClient) NewListByManagedInstancePager(resourceGroupName string, managedInstanceName string, options *ManagedServerDNSAliasesClientListByManagedInstanceOptions) *runtime.Pager[ManagedServerDNSAliasesClientListByManagedInstanceResponse]
NewListByManagedInstancePager - Gets a list of managed server DNS aliases for a managed 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.
- managedInstanceName - The name of the managed instance.
- options - ManagedServerDNSAliasesClientListByManagedInstanceOptions contains the optional parameters for the ManagedServerDNSAliasesClient.NewListByManagedInstancePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ManagedServerDnsAliasList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewManagedServerDNSAliasesClient().NewListByManagedInstancePager("Default", "dns-mi", 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.ManagedServerDNSAliasListResult = armsql.ManagedServerDNSAliasListResult{ // Value: []*armsql.ManagedServerDNSAlias{ // { // Name: to.Ptr("dns-alias-mi"), // Type: to.Ptr("Microsoft.Sql/managedInstances/dnsAliases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/dns-mi/dnsAliases/dns-alias-mi"), // Properties: &armsql.ManagedServerDNSAliasProperties{ // AzureDNSRecord: to.Ptr("dns-alias-mi.abcd1234.database.windows.net"), // PublicAzureDNSRecord: to.Ptr("dns-alias-mi.public.abcd1234.database.windows.net"), // }, // }, // { // Name: to.Ptr("dns-alias-mi-2"), // Type: to.Ptr("Microsoft.Sql/managedInstances/dnsAliases"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/managedInstances/dns-mi/dnsAliases/dns-alias-mi-2"), // Properties: &armsql.ManagedServerDNSAliasProperties{ // AzureDNSRecord: to.Ptr("dns-alias-mi-2.abcd1234.database.windows.net"), // PublicAzureDNSRecord: to.Ptr("dns-alias-mi-2.public.abcd1234.database.windows.net"), // }, // }}, // } }
Output:
type ManagedServerDNSAliasesClientAcquireResponse ¶
type ManagedServerDNSAliasesClientAcquireResponse struct { // A managed server DNS alias. ManagedServerDNSAlias }
ManagedServerDNSAliasesClientAcquireResponse contains the response from method ManagedServerDNSAliasesClient.BeginAcquire.
type ManagedServerDNSAliasesClientBeginAcquireOptions ¶
type ManagedServerDNSAliasesClientBeginAcquireOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedServerDNSAliasesClientBeginAcquireOptions contains the optional parameters for the ManagedServerDNSAliasesClient.BeginAcquire method.
type ManagedServerDNSAliasesClientBeginCreateOrUpdateOptions ¶
type ManagedServerDNSAliasesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedServerDNSAliasesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedServerDNSAliasesClient.BeginCreateOrUpdate method.
type ManagedServerDNSAliasesClientBeginDeleteOptions ¶
type ManagedServerDNSAliasesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedServerDNSAliasesClientBeginDeleteOptions contains the optional parameters for the ManagedServerDNSAliasesClient.BeginDelete method.
type ManagedServerDNSAliasesClientCreateOrUpdateResponse ¶
type ManagedServerDNSAliasesClientCreateOrUpdateResponse struct { // A managed server DNS alias. ManagedServerDNSAlias }
ManagedServerDNSAliasesClientCreateOrUpdateResponse contains the response from method ManagedServerDNSAliasesClient.BeginCreateOrUpdate.
type ManagedServerDNSAliasesClientDeleteResponse ¶
type ManagedServerDNSAliasesClientDeleteResponse struct { }
ManagedServerDNSAliasesClientDeleteResponse contains the response from method ManagedServerDNSAliasesClient.BeginDelete.
type ManagedServerDNSAliasesClientGetOptions ¶
type ManagedServerDNSAliasesClientGetOptions struct { }
ManagedServerDNSAliasesClientGetOptions contains the optional parameters for the ManagedServerDNSAliasesClient.Get method.
type ManagedServerDNSAliasesClientGetResponse ¶
type ManagedServerDNSAliasesClientGetResponse struct { // A managed server DNS alias. ManagedServerDNSAlias }
ManagedServerDNSAliasesClientGetResponse contains the response from method ManagedServerDNSAliasesClient.Get.
type ManagedServerDNSAliasesClientListByManagedInstanceOptions ¶
type ManagedServerDNSAliasesClientListByManagedInstanceOptions struct { }
ManagedServerDNSAliasesClientListByManagedInstanceOptions contains the optional parameters for the ManagedServerDNSAliasesClient.NewListByManagedInstancePager method.
type ManagedServerDNSAliasesClientListByManagedInstanceResponse ¶
type ManagedServerDNSAliasesClientListByManagedInstanceResponse struct { // A list of managed server DNS aliases. ManagedServerDNSAliasListResult }
ManagedServerDNSAliasesClientListByManagedInstanceResponse contains the response from method ManagedServerDNSAliasesClient.NewListByManagedInstancePager.
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedServerSecurityAlertCreateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedServerSecurityAlertCreateMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedServerSecurityAlertGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedServerSecurityAlertListByInstance.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ManagedServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedServerSecurityAlertPoliciesClient.BeginCreateOrUpdate method.
type ManagedServerSecurityAlertPoliciesClientCreateOrUpdateResponse ¶
type ManagedServerSecurityAlertPoliciesClientCreateOrUpdateResponse struct { // A managed server security alert policy. ManagedServerSecurityAlertPolicy }
ManagedServerSecurityAlertPoliciesClientCreateOrUpdateResponse contains the response from method ManagedServerSecurityAlertPoliciesClient.BeginCreateOrUpdate.
type ManagedServerSecurityAlertPoliciesClientGetOptions ¶
type ManagedServerSecurityAlertPoliciesClientGetOptions struct { }
ManagedServerSecurityAlertPoliciesClientGetOptions contains the optional parameters for the ManagedServerSecurityAlertPoliciesClient.Get method.
type ManagedServerSecurityAlertPoliciesClientGetResponse ¶
type ManagedServerSecurityAlertPoliciesClientGetResponse struct { // A managed server security alert policy. ManagedServerSecurityAlertPolicy }
ManagedServerSecurityAlertPoliciesClientGetResponse contains the response from method ManagedServerSecurityAlertPoliciesClient.Get.
type ManagedServerSecurityAlertPoliciesClientListByInstanceOptions ¶
type ManagedServerSecurityAlertPoliciesClientListByInstanceOptions struct { }
ManagedServerSecurityAlertPoliciesClientListByInstanceOptions contains the optional parameters for the ManagedServerSecurityAlertPoliciesClient.NewListByInstancePager method.
type ManagedServerSecurityAlertPoliciesClientListByInstanceResponse ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
func (m ManagedTransparentDataEncryptionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedTransparentDataEncryptionProperties.
func (*ManagedTransparentDataEncryptionProperties) UnmarshalJSON ¶
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 ¶
func (m MaxSizeCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MaxSizeCapability.
func (*MaxSizeCapability) UnmarshalJSON ¶
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 ¶
func (m MaxSizeRangeCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MaxSizeRangeCapability.
func (*MaxSizeRangeCapability) UnmarshalJSON ¶
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 ¶
func (m MetricAvailability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MetricAvailability.
func (*MetricAvailability) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
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 ¶
func (m MetricName) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MetricName.
func (*MetricName) UnmarshalJSON ¶
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 ¶
func (m MinCapacityCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MinCapacityCapability.
func (*MinCapacityCapability) UnmarshalJSON ¶
func (m *MinCapacityCapability) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MinCapacityCapability.
type MinimalTLSVersion ¶
type MinimalTLSVersion string
MinimalTLSVersion - Minimal TLS version. Allowed values: 'None', 1.0', '1.1', '1.2', '1.3'
const ( MinimalTLSVersionNone MinimalTLSVersion = "None" MinimalTLSVersionOne0 MinimalTLSVersion = "1.0" MinimalTLSVersionOne1 MinimalTLSVersion = "1.1" MinimalTLSVersionOne2 MinimalTLSVersion = "1.2" MinimalTLSVersionOne3 MinimalTLSVersion = "1.3" )
func PossibleMinimalTLSVersionValues ¶
func PossibleMinimalTLSVersionValues() []MinimalTLSVersion
PossibleMinimalTLSVersionValues returns the possible values for the MinimalTLSVersion const type.
type MoveOperationMode ¶
type MoveOperationMode string
MoveOperationMode - Operation mode.
const ( MoveOperationModeCopy MoveOperationMode = "Copy" MoveOperationModeMove MoveOperationMode = "Move" )
func PossibleMoveOperationModeValues ¶
func PossibleMoveOperationModeValues() []MoveOperationMode
PossibleMoveOperationModeValues returns the possible values for the MoveOperationMode const type.
type Name ¶
type Name struct { // Usage name localized value. LocalizedValue *string // Usage name value Value *string }
Name - ARM Usage Name
func (Name) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Name.
func (*Name) UnmarshalJSON ¶
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 ¶
func (n NetworkIsolationSettings) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkIsolationSettings.
func (*NetworkIsolationSettings) UnmarshalJSON ¶
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 ¶
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 ¶
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶
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 ¶
func (o OperationImpact) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationImpact.
func (*OperationImpact) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶
type OperationsClientListResponse struct { // Result of the request to list SQL operations. OperationListResult }
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type OutboundEnvironmentEndpoint ¶
type OutboundEnvironmentEndpoint struct { // READ-ONLY; The type of service accessed by the managed instance service, e.g., Azure Storage, Azure Active Directory, etc. Category *string // READ-ONLY; The endpoints that the managed instance service communicates with in order to function correctly. Endpoints []*EndpointDependency }
OutboundEnvironmentEndpoint - An endpoint that the managed instance service requires outbound network access to.
func (OutboundEnvironmentEndpoint) MarshalJSON ¶
func (o OutboundEnvironmentEndpoint) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OutboundEnvironmentEndpoint.
func (*OutboundEnvironmentEndpoint) UnmarshalJSON ¶
func (o *OutboundEnvironmentEndpoint) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OutboundEnvironmentEndpoint.
type OutboundEnvironmentEndpointCollection ¶
type OutboundEnvironmentEndpointCollection struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*OutboundEnvironmentEndpoint }
OutboundEnvironmentEndpointCollection - A collection of endpoints that the managed instance service requires outbound network access to.
func (OutboundEnvironmentEndpointCollection) MarshalJSON ¶
func (o OutboundEnvironmentEndpointCollection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OutboundEnvironmentEndpointCollection.
func (*OutboundEnvironmentEndpointCollection) UnmarshalJSON ¶
func (o *OutboundEnvironmentEndpointCollection) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OutboundEnvironmentEndpointCollection.
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 ¶
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 ¶
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 ¶
func (o OutboundFirewallRuleProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OutboundFirewallRuleProperties.
func (*OutboundFirewallRuleProperties) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleCreate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type OutboundFirewallRulesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
OutboundFirewallRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the OutboundFirewallRulesClient.BeginCreateOrUpdate method.
type OutboundFirewallRulesClientBeginDeleteOptions ¶
type OutboundFirewallRulesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
OutboundFirewallRulesClientBeginDeleteOptions contains the optional parameters for the OutboundFirewallRulesClient.BeginDelete method.
type OutboundFirewallRulesClientCreateOrUpdateResponse ¶
type OutboundFirewallRulesClientCreateOrUpdateResponse struct { // An Azure SQL DB Server Outbound Firewall Rule. OutboundFirewallRule }
OutboundFirewallRulesClientCreateOrUpdateResponse contains the response from method OutboundFirewallRulesClient.BeginCreateOrUpdate.
type OutboundFirewallRulesClientDeleteResponse ¶
type OutboundFirewallRulesClientDeleteResponse struct { }
OutboundFirewallRulesClientDeleteResponse contains the response from method OutboundFirewallRulesClient.BeginDelete.
type OutboundFirewallRulesClientGetOptions ¶
type OutboundFirewallRulesClientGetOptions struct { }
OutboundFirewallRulesClientGetOptions contains the optional parameters for the OutboundFirewallRulesClient.Get method.
type OutboundFirewallRulesClientGetResponse ¶
type OutboundFirewallRulesClientGetResponse struct { // An Azure SQL DB Server Outbound Firewall Rule. OutboundFirewallRule }
OutboundFirewallRulesClientGetResponse contains the response from method OutboundFirewallRulesClient.Get.
type OutboundFirewallRulesClientListByServerOptions ¶
type OutboundFirewallRulesClientListByServerOptions struct { }
OutboundFirewallRulesClientListByServerOptions contains the optional parameters for the OutboundFirewallRulesClient.NewListByServerPager method.
type OutboundFirewallRulesClientListByServerResponse ¶
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 ¶
func (p PartnerInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PartnerInfo.
func (*PartnerInfo) UnmarshalJSON ¶
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 ¶
func (p PartnerRegionInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PartnerRegionInfo.
func (*PartnerRegionInfo) UnmarshalJSON ¶
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 ¶
func (p PerformanceLevelCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PerformanceLevelCapability.
func (*PerformanceLevelCapability) UnmarshalJSON ¶
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 ¶
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 ¶
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; Group IDs. GroupIDs []*string // READ-ONLY; State of the private endpoint connection. ProvisioningState *PrivateEndpointProvisioningState }
PrivateEndpointConnectionProperties - Properties of a private endpoint connection.
func (PrivateEndpointConnectionProperties) MarshalJSON ¶
func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties.
func (*PrivateEndpointConnectionProperties) UnmarshalJSON ¶
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 ¶
func (p PrivateEndpointConnectionRequestStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionRequestStatus.
func (*PrivateEndpointConnectionRequestStatus) UnmarshalJSON ¶
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 2022-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 - PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/PrivateEndpointConnectionUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2022-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 - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/PrivateEndpointConnectionDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2022-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/PrivateEndpointConnectionGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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 2022-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 - PrivateEndpointConnectionsClientListByServerOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/PrivateEndpointConnectionList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate method.
type PrivateEndpointConnectionsClientBeginDeleteOptions ¶
type PrivateEndpointConnectionsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
type PrivateEndpointConnectionsClientCreateOrUpdateResponse ¶
type PrivateEndpointConnectionsClientCreateOrUpdateResponse struct { // A private endpoint connection PrivateEndpointConnection }
PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.BeginCreateOrUpdate.
type PrivateEndpointConnectionsClientDeleteResponse ¶
type PrivateEndpointConnectionsClientDeleteResponse struct { }
PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete.
type PrivateEndpointConnectionsClientGetOptions ¶
type PrivateEndpointConnectionsClientGetOptions struct { }
PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
type PrivateEndpointConnectionsClientGetResponse ¶
type PrivateEndpointConnectionsClientGetResponse struct { // A private endpoint connection PrivateEndpointConnection }
PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.
type PrivateEndpointConnectionsClientListByServerOptions ¶
type PrivateEndpointConnectionsClientListByServerOptions struct { }
PrivateEndpointConnectionsClientListByServerOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByServerPager method.
type PrivateEndpointConnectionsClientListByServerResponse ¶
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 ¶
func (p PrivateEndpointProperty) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateEndpointProperty.
func (*PrivateEndpointProperty) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/PrivateLinkResourcesGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/PrivateLinkResourcesList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type PrivateLinkResourcesClientGetOptions struct { }
PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.
type PrivateLinkResourcesClientGetResponse ¶
type PrivateLinkResourcesClientGetResponse struct { // A private link resource PrivateLinkResource }
PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get.
type PrivateLinkResourcesClientListByServerOptions ¶
type PrivateLinkResourcesClientListByServerOptions struct { }
PrivateLinkResourcesClientListByServerOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListByServerPager method.
type PrivateLinkResourcesClientListByServerResponse ¶
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 ¶
func (p PrivateLinkServiceConnectionStateProperty) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionStateProperty.
func (*PrivateLinkServiceConnectionStateProperty) UnmarshalJSON ¶
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 ¶
func (p ProxyResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProxyResource.
func (*ProxyResource) UnmarshalJSON ¶
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 ¶
func (p ProxyResourceWithWritableName) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProxyResourceWithWritableName.
func (*ProxyResourceWithWritableName) UnmarshalJSON ¶
func (p *ProxyResourceWithWritableName) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResourceWithWritableName.
type QueryCheck ¶
type QueryCheck struct { // READ-ONLY; SQL Vulnerability Assessment column names of query expected result. ColumnNames []*string // READ-ONLY; SQL Vulnerability Assessment query expected result. ExpectedResult [][]*string // READ-ONLY; SQL Vulnerability Assessment rule query. Query *string }
QueryCheck - SQL Vulnerability Assessment query check object.
func (QueryCheck) MarshalJSON ¶
func (q QueryCheck) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type QueryCheck.
func (*QueryCheck) UnmarshalJSON ¶
func (q *QueryCheck) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type QueryCheck.
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 ¶
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 ¶
func (q QueryMetricProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type QueryMetricProperties.
func (*QueryMetricProperties) UnmarshalJSON ¶
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 ¶
func (q QueryProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type QueryProperties.
func (*QueryProperties) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
func (r ReadScaleCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ReadScaleCapability.
func (*ReadScaleCapability) UnmarshalJSON ¶
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 ¶
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 ¶
func (r RecommendedActionErrorInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecommendedActionErrorInfo.
func (*RecommendedActionErrorInfo) UnmarshalJSON ¶
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 ¶
func (r RecommendedActionImpactRecord) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecommendedActionImpactRecord.
func (*RecommendedActionImpactRecord) UnmarshalJSON ¶
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 ¶
func (r RecommendedActionImplementationInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecommendedActionImplementationInfo.
func (*RecommendedActionImplementationInfo) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
func (r RecommendedSensitivityLabelUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecommendedSensitivityLabelUpdateProperties.
func (*RecommendedSensitivityLabelUpdateProperties) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SensitivityLabelsRecommendedUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type RecommendedSensitivityLabelsClientUpdateOptions struct { }
RecommendedSensitivityLabelsClientUpdateOptions contains the optional parameters for the RecommendedSensitivityLabelsClient.Update method.
type RecommendedSensitivityLabelsClientUpdateResponse ¶
type RecommendedSensitivityLabelsClientUpdateResponse struct { }
RecommendedSensitivityLabelsClientUpdateResponse contains the response from method RecommendedSensitivityLabelsClient.Update.
type RecoverableDatabase ¶
type RecoverableDatabase struct { // Resource properties. Properties *RecoverableDatabaseProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
RecoverableDatabase - A recoverable database resource.
func (RecoverableDatabase) MarshalJSON ¶
func (r RecoverableDatabase) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecoverableDatabase.
func (*RecoverableDatabase) UnmarshalJSON ¶
func (r *RecoverableDatabase) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RecoverableDatabase.
type RecoverableDatabaseListResult ¶
type RecoverableDatabaseListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*RecoverableDatabase }
RecoverableDatabaseListResult - A list of recoverable databases.
func (RecoverableDatabaseListResult) MarshalJSON ¶
func (r RecoverableDatabaseListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecoverableDatabaseListResult.
func (*RecoverableDatabaseListResult) UnmarshalJSON ¶
func (r *RecoverableDatabaseListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RecoverableDatabaseListResult.
type RecoverableDatabaseProperties ¶
type RecoverableDatabaseProperties struct { // The resource ids of the user assigned identities to use Keys map[string]*DatabaseKey // 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. LastAvailableBackupDate *time.Time // READ-ONLY; The service level objective name of the database. ServiceLevelObjective *string }
RecoverableDatabaseProperties - The recoverable database's properties.
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. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-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.
- databaseName - The name of the database.
- options - RecoverableDatabasesClientGetOptions contains the optional parameters for the RecoverableDatabasesClient.Get method.
Example (GetARecoverableDatabase) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/RecoverableDatabaseGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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", &armsql.RecoverableDatabasesClientGetOptions{Expand: nil, Filter: 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:
Example (GetsARecoverableDatabaseWithExpandEqualsKeys) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/RecoverableDatabaseGetWithExpandEqualsKeys.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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", &armsql.RecoverableDatabasesClientGetOptions{Expand: to.Ptr("keys"), Filter: 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"), // Keys: map[string]*armsql.DatabaseKey{ // "https://your-key-vault-name.vault.azure.net/yourKey/yourKeyVersion": &armsql.DatabaseKey{ // }, // "https://your-key-vault-name.vault.azure.net/yourKey2/yourKey2Version": &armsql.DatabaseKey{ // }, // }, // 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 ¶
func (client *RecoverableDatabasesClient) NewListByServerPager(resourceGroupName string, serverName string, options *RecoverableDatabasesClientListByServerOptions) *runtime.Pager[RecoverableDatabasesClientListByServerResponse]
NewListByServerPager - Gets a list of recoverable databases.
Generated from API version 2022-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 - RecoverableDatabasesClientListByServerOptions contains the optional parameters for the RecoverableDatabasesClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/RecoverableDatabaseList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type RecoverableDatabasesClientGetOptions struct { // The child resources to include in the response. Expand *string // An OData filter expression that filters elements in the collection. Filter *string }
RecoverableDatabasesClientGetOptions contains the optional parameters for the RecoverableDatabasesClient.Get method.
type RecoverableDatabasesClientGetResponse ¶
type RecoverableDatabasesClientGetResponse struct { // A recoverable database resource. RecoverableDatabase }
RecoverableDatabasesClientGetResponse contains the response from method RecoverableDatabasesClient.Get.
type RecoverableDatabasesClientListByServerOptions ¶
type RecoverableDatabasesClientListByServerOptions struct { }
RecoverableDatabasesClientListByServerOptions contains the optional parameters for the RecoverableDatabasesClient.NewListByServerPager method.
type RecoverableDatabasesClientListByServerResponse ¶
type RecoverableDatabasesClientListByServerResponse struct { // A list of recoverable databases. 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 ¶
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 ¶
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 ¶
func (r RecoverableManagedDatabaseProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecoverableManagedDatabaseProperties.
func (*RecoverableManagedDatabaseProperties) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetRecoverableManagedDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListRecoverableManagedDatabasesByServer.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type RecoverableManagedDatabasesClientGetOptions struct { }
RecoverableManagedDatabasesClientGetOptions contains the optional parameters for the RecoverableManagedDatabasesClient.Get method.
type RecoverableManagedDatabasesClientGetResponse ¶
type RecoverableManagedDatabasesClientGetResponse struct { // A recoverable managed database resource. RecoverableManagedDatabase }
RecoverableManagedDatabasesClientGetResponse contains the response from method RecoverableManagedDatabasesClient.Get.
type RecoverableManagedDatabasesClientListByInstanceOptions ¶
type RecoverableManagedDatabasesClientListByInstanceOptions struct { }
RecoverableManagedDatabasesClientListByInstanceOptions contains the optional parameters for the RecoverableManagedDatabasesClient.NewListByInstancePager method.
type RecoverableManagedDatabasesClientListByInstanceResponse ¶
type RecoverableManagedDatabasesClientListByInstanceResponse struct { // A list of recoverable managed databases. RecoverableManagedDatabaseListResult }
RecoverableManagedDatabasesClientListByInstanceResponse contains the response from method RecoverableManagedDatabasesClient.NewListByInstancePager.
type RefreshExternalGovernanceStatusOperationResult ¶
type RefreshExternalGovernanceStatusOperationResult struct { // Resource properties. Properties *RefreshExternalGovernanceStatusOperationResultProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
RefreshExternalGovernanceStatusOperationResult - An RefreshExternalGovernanceStatus operation result resource.
func (RefreshExternalGovernanceStatusOperationResult) MarshalJSON ¶
func (r RefreshExternalGovernanceStatusOperationResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RefreshExternalGovernanceStatusOperationResult.
func (*RefreshExternalGovernanceStatusOperationResult) UnmarshalJSON ¶
func (r *RefreshExternalGovernanceStatusOperationResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RefreshExternalGovernanceStatusOperationResult.
type RefreshExternalGovernanceStatusOperationResultProperties ¶
type RefreshExternalGovernanceStatusOperationResultProperties struct { // READ-ONLY; Error message. ErrorMessage *string // 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 }
RefreshExternalGovernanceStatusOperationResultProperties - Contains the operation result properties for refresh external governance status operation.
func (RefreshExternalGovernanceStatusOperationResultProperties) MarshalJSON ¶
func (r RefreshExternalGovernanceStatusOperationResultProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RefreshExternalGovernanceStatusOperationResultProperties.
func (*RefreshExternalGovernanceStatusOperationResultProperties) UnmarshalJSON ¶
func (r *RefreshExternalGovernanceStatusOperationResultProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RefreshExternalGovernanceStatusOperationResultProperties.
type Remediation ¶
type Remediation struct { // READ-ONLY; SQL Vulnerability Assessment is remediation automated. Automated *bool // READ-ONLY; SQL Vulnerability Assessment remediation description. Description *string // READ-ONLY; SQL Vulnerability Assessment optional link to remediate in Azure Portal. PortalLink *string // READ-ONLY; SQL Vulnerability Assessment remediation script. Scripts []*string }
Remediation - SQL Vulnerability Assessment remediation Details.
func (Remediation) MarshalJSON ¶
func (r Remediation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Remediation.
func (*Remediation) UnmarshalJSON ¶
func (r *Remediation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Remediation.
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 ¶
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 ¶
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, STANDBY). 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, STANDBY).
const ( ReplicationLinkTypeGEO ReplicationLinkType = "GEO" ReplicationLinkTypeNAMED ReplicationLinkType = "NAMED" ReplicationLinkTypeSTANDBY ReplicationLinkType = "STANDBY" )
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) BeginDelete ¶
func (client *ReplicationLinksClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string, options *ReplicationLinksClientBeginDeleteOptions) (*runtime.Poller[ReplicationLinksClientDeleteResponse], error)
BeginDelete - Deletes the replication link. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-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 - ReplicationLinksClientBeginDeleteOptions contains the optional parameters for the ReplicationLinksClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/ReplicationLinkDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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().BeginDelete(ctx, "Default", "sourcesvr", "gamma-db", "4891ca10-ebd0-47d7-9182-c722651780fb", 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 (*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 2022-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/ReplicationLinkFailover.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2022-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/ReplicationLinkFailoverAllowDataLoss.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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) 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 2022-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/ReplicationLinkGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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 2022-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 - ReplicationLinksClientListByDatabaseOptions contains the optional parameters for the ReplicationLinksClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/ReplicationLinkListByDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
func (client *ReplicationLinksClient) NewListByServerPager(resourceGroupName string, serverName string, options *ReplicationLinksClientListByServerOptions) *runtime.Pager[ReplicationLinksClientListByServerResponse]
NewListByServerPager - Gets a list of replication links.
Generated from API version 2022-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 - ReplicationLinksClientListByServerOptions contains the optional parameters for the ReplicationLinksClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/ReplicationLinkListByServer.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ReplicationLinksClientBeginDeleteOptions ¶
type ReplicationLinksClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ReplicationLinksClientBeginDeleteOptions contains the optional parameters for the ReplicationLinksClient.BeginDelete method.
type ReplicationLinksClientBeginFailoverAllowDataLossOptions ¶
type ReplicationLinksClientBeginFailoverAllowDataLossOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ReplicationLinksClientBeginFailoverAllowDataLossOptions contains the optional parameters for the ReplicationLinksClient.BeginFailoverAllowDataLoss method.
type ReplicationLinksClientBeginFailoverOptions ¶
type ReplicationLinksClientBeginFailoverOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ReplicationLinksClientBeginFailoverOptions contains the optional parameters for the ReplicationLinksClient.BeginFailover method.
type ReplicationLinksClientDeleteResponse ¶
type ReplicationLinksClientDeleteResponse struct { }
ReplicationLinksClientDeleteResponse contains the response from method ReplicationLinksClient.BeginDelete.
type ReplicationLinksClientFailoverAllowDataLossResponse ¶
type ReplicationLinksClientFailoverAllowDataLossResponse struct { // A replication link. ReplicationLink }
ReplicationLinksClientFailoverAllowDataLossResponse contains the response from method ReplicationLinksClient.BeginFailoverAllowDataLoss.
type ReplicationLinksClientFailoverResponse ¶
type ReplicationLinksClientFailoverResponse struct { // A replication link. ReplicationLink }
ReplicationLinksClientFailoverResponse contains the response from method ReplicationLinksClient.BeginFailover.
type ReplicationLinksClientGetOptions ¶
type ReplicationLinksClientGetOptions struct { }
ReplicationLinksClientGetOptions contains the optional parameters for the ReplicationLinksClient.Get method.
type ReplicationLinksClientGetResponse ¶
type ReplicationLinksClientGetResponse struct { // A replication link. ReplicationLink }
ReplicationLinksClientGetResponse contains the response from method ReplicationLinksClient.Get.
type ReplicationLinksClientListByDatabaseOptions ¶
type ReplicationLinksClientListByDatabaseOptions struct { }
ReplicationLinksClientListByDatabaseOptions contains the optional parameters for the ReplicationLinksClient.NewListByDatabasePager method.
type ReplicationLinksClientListByDatabaseResponse ¶
type ReplicationLinksClientListByDatabaseResponse struct { // A list of replication links. ReplicationLinkListResult }
ReplicationLinksClientListByDatabaseResponse contains the response from method ReplicationLinksClient.NewListByDatabasePager.
type ReplicationLinksClientListByServerOptions ¶
type ReplicationLinksClientListByServerOptions struct { }
ReplicationLinksClientListByServerOptions contains the optional parameters for the ReplicationLinksClient.NewListByServerPager method.
type ReplicationLinksClientListByServerResponse ¶
type ReplicationLinksClientListByServerResponse struct { // A list of replication links. ReplicationLinkListResult }
ReplicationLinksClientListByServerResponse contains the response from method ReplicationLinksClient.NewListByServerPager.
type ReplicationMode ¶
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 ¶
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 ¶
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 ¶
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 ¶
func (r ResourceMoveDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceMoveDefinition.
func (*ResourceMoveDefinition) UnmarshalJSON ¶
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 ¶
func (r ResourceWithWritableName) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceWithWritableName.
func (*ResourceWithWritableName) UnmarshalJSON ¶
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 ¶
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 ¶
func (r *RestorableDroppedDatabaseListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RestorableDroppedDatabaseListResult.
type RestorableDroppedDatabaseProperties ¶
type RestorableDroppedDatabaseProperties struct { // The resource ids of the user assigned identities to use Keys map[string]*DatabaseKey // 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 2022-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 - RestorableDroppedDatabasesClientGetOptions contains the optional parameters for the RestorableDroppedDatabasesClient.Get method.
Example (GetsARestorableDroppedDatabase) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/GetRestorableDroppedDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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", &armsql.RestorableDroppedDatabasesClientGetOptions{Expand: nil, Filter: 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:
Example (GetsARestorableDroppedDatabaseWithExpandEqualsKeys) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/GetRestorableDroppedDatabaseWithExpandEqualsKeys.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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", &armsql.RestorableDroppedDatabasesClientGetOptions{Expand: to.Ptr("keys"), Filter: 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}()), // Keys: map[string]*armsql.DatabaseKey{ // "https://your-key-vault-name.vault.azure.net/yourKey/yourKeyVersion": &armsql.DatabaseKey{ // }, // "https://your-key-vault-name.vault.azure.net/yourKey2/yourKey2Version": &armsql.DatabaseKey{ // }, // }, // MaxSizeBytes: to.Ptr[int64](268435456000), // }, // SKU: &armsql.SKU{ // Name: to.Ptr("BC_Gen4_2"), // Tier: to.Ptr("BusinessCritical"), // }, // }
Output:
func (*RestorableDroppedDatabasesClient) NewListByServerPager ¶
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 2022-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 - RestorableDroppedDatabasesClientListByServerOptions contains the optional parameters for the RestorableDroppedDatabasesClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ListRestorableDroppedDatabasesByServer.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type RestorableDroppedDatabasesClientGetOptions struct { // The child resources to include in the response. Expand *string // An OData filter expression that filters elements in the collection. Filter *string }
RestorableDroppedDatabasesClientGetOptions contains the optional parameters for the RestorableDroppedDatabasesClient.Get method.
type RestorableDroppedDatabasesClientGetResponse ¶
type RestorableDroppedDatabasesClientGetResponse struct { // A restorable dropped database resource. RestorableDroppedDatabase }
RestorableDroppedDatabasesClientGetResponse contains the response from method RestorableDroppedDatabasesClient.Get.
type RestorableDroppedDatabasesClientListByServerOptions ¶
type RestorableDroppedDatabasesClientListByServerOptions struct { }
RestorableDroppedDatabasesClientListByServerOptions contains the optional parameters for the RestorableDroppedDatabasesClient.NewListByServerPager method.
type RestorableDroppedDatabasesClientListByServerResponse ¶
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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/GetRestorableDroppedManagedDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/RestorableDroppedManagedDatabaseListByManagedInstance.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type RestorableDroppedManagedDatabasesClientGetOptions struct { }
RestorableDroppedManagedDatabasesClientGetOptions contains the optional parameters for the RestorableDroppedManagedDatabasesClient.Get method.
type RestorableDroppedManagedDatabasesClientGetResponse ¶
type RestorableDroppedManagedDatabasesClientGetResponse struct { // A restorable dropped managed database resource. RestorableDroppedManagedDatabase }
RestorableDroppedManagedDatabasesClientGetResponse contains the response from method RestorableDroppedManagedDatabasesClient.Get.
type RestorableDroppedManagedDatabasesClientListByInstanceOptions ¶
type RestorableDroppedManagedDatabasesClientListByInstanceOptions struct { }
RestorableDroppedManagedDatabasesClientListByInstanceOptions contains the optional parameters for the RestorableDroppedManagedDatabasesClient.NewListByInstancePager method.
type RestorableDroppedManagedDatabasesClientListByInstanceResponse ¶
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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRestorePointsPost.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRestorePointsDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRestorePointsGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DataWarehouseRestorePointsGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRestorePointsListByDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DataWarehouseRestorePointsListByDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type RestorePointsClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
RestorePointsClientBeginCreateOptions contains the optional parameters for the RestorePointsClient.BeginCreate method.
type RestorePointsClientCreateResponse ¶
type RestorePointsClientCreateResponse struct { // Database restore points. RestorePoint }
RestorePointsClientCreateResponse contains the response from method RestorePointsClient.BeginCreate.
type RestorePointsClientDeleteOptions ¶
type RestorePointsClientDeleteOptions struct { }
RestorePointsClientDeleteOptions contains the optional parameters for the RestorePointsClient.Delete method.
type RestorePointsClientDeleteResponse ¶
type RestorePointsClientDeleteResponse struct { }
RestorePointsClientDeleteResponse contains the response from method RestorePointsClient.Delete.
type RestorePointsClientGetOptions ¶
type RestorePointsClientGetOptions struct { }
RestorePointsClientGetOptions contains the optional parameters for the RestorePointsClient.Get method.
type RestorePointsClientGetResponse ¶
type RestorePointsClientGetResponse struct { // Database restore points. RestorePoint }
RestorePointsClientGetResponse contains the response from method RestorePointsClient.Get.
type RestorePointsClientListByDatabaseOptions ¶
type RestorePointsClientListByDatabaseOptions struct { }
RestorePointsClientListByDatabaseOptions contains the optional parameters for the RestorePointsClient.NewListByDatabasePager method.
type RestorePointsClientListByDatabaseResponse ¶
type RestorePointsClientListByDatabaseResponse struct { // A list of long term retention backups. RestorePointListResult }
RestorePointsClientListByDatabaseResponse contains the response from method RestorePointsClient.NewListByDatabasePager.
type RuleSeverity ¶
type RuleSeverity string
RuleSeverity - SQL Vulnerability Assessment rule severity.
const ( RuleSeverityHigh RuleSeverity = "High" RuleSeverityInformational RuleSeverity = "Informational" RuleSeverityLow RuleSeverity = "Low" RuleSeverityMedium RuleSeverity = "Medium" RuleSeverityObsolete RuleSeverity = "Obsolete" )
func PossibleRuleSeverityValues ¶
func PossibleRuleSeverityValues() []RuleSeverity
PossibleRuleSeverityValues returns the possible values for the RuleSeverity const type.
type RuleStatus ¶
type RuleStatus string
RuleStatus - SQL Vulnerability Assessment baseline status
const ( RuleStatusFinding RuleStatus = "Finding" RuleStatusInternalError RuleStatus = "InternalError" RuleStatusNonFinding RuleStatus = "NonFinding" )
func PossibleRuleStatusValues ¶
func PossibleRuleStatusValues() []RuleStatus
PossibleRuleStatusValues returns the possible values for the RuleStatus const type.
type RuleType ¶
type RuleType string
RuleType - SQL Vulnerability Assessment rule type.
func PossibleRuleTypeValues ¶
func PossibleRuleTypeValues() []RuleType
PossibleRuleTypeValues returns the possible values for the RuleType const type.
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 ¶
MarshalJSON implements the json.Marshaller interface for type SKU.
func (*SKU) UnmarshalJSON ¶
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 SQLVulnerabilityAssessmentName ¶
type SQLVulnerabilityAssessmentName string
const (
SQLVulnerabilityAssessmentNameDefault SQLVulnerabilityAssessmentName = "default"
)
func PossibleSQLVulnerabilityAssessmentNameValues ¶
func PossibleSQLVulnerabilityAssessmentNameValues() []SQLVulnerabilityAssessmentName
PossibleSQLVulnerabilityAssessmentNameValues returns the possible values for the SQLVulnerabilityAssessmentName const type.
type SQLVulnerabilityAssessmentState ¶
type SQLVulnerabilityAssessmentState string
SQLVulnerabilityAssessmentState - Specifies the state of the SQL Vulnerability Assessment, whether it is enabled or disabled or a state has not been applied yet on the specific database or server.
const ( SQLVulnerabilityAssessmentStateDisabled SQLVulnerabilityAssessmentState = "Disabled" SQLVulnerabilityAssessmentStateEnabled SQLVulnerabilityAssessmentState = "Enabled" )
func PossibleSQLVulnerabilityAssessmentStateValues ¶
func PossibleSQLVulnerabilityAssessmentStateValues() []SQLVulnerabilityAssessmentState
PossibleSQLVulnerabilityAssessmentStateValues returns the possible values for the SQLVulnerabilityAssessmentState 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 ScheduleItem ¶
type ScheduleItem struct { // REQUIRED; Start day. StartDay *DayOfWeek // REQUIRED; Start time. StartTime *string // REQUIRED; Stop day. StopDay *DayOfWeek // REQUIRED; Stop time. StopTime *string }
ScheduleItem - Schedule info describing when the server should be started or stopped.
func (ScheduleItem) MarshalJSON ¶
func (s ScheduleItem) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScheduleItem.
func (*ScheduleItem) UnmarshalJSON ¶
func (s *ScheduleItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScheduleItem.
type SecondaryInstanceType ¶
type SecondaryInstanceType string
SecondaryInstanceType - Type of the geo-secondary instance. Set 'Standby' if the instance is used as a DR option only.
const ( SecondaryInstanceTypeGeo SecondaryInstanceType = "Geo" SecondaryInstanceTypeStandby SecondaryInstanceType = "Standby" )
func PossibleSecondaryInstanceTypeValues ¶
func PossibleSecondaryInstanceTypeValues() []SecondaryInstanceType
PossibleSecondaryInstanceTypeValues returns the possible values for the SecondaryInstanceType const type.
type SecondaryType ¶
type SecondaryType string
SecondaryType - The secondary type of the database if it is a secondary. Valid values are Geo, Named and Standby.
const ( SecondaryTypeGeo SecondaryType = "Geo" SecondaryTypeNamed SecondaryType = "Named" SecondaryTypeStandby SecondaryType = "Standby" )
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 ¶
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 ¶
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 ¶
func (s SecurityEventSQLInjectionAdditionalProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SecurityEventSQLInjectionAdditionalProperties.
func (*SecurityEventSQLInjectionAdditionalProperties) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
func (s SensitivityLabelProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SensitivityLabelProperties.
func (*SensitivityLabelProperties) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
func (s SensitivityLabelUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SensitivityLabelUpdateProperties.
func (*SensitivityLabelUpdateProperties) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ColumnSensitivityLabelCreateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ColumnSensitivityLabelDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/RecommendedColumnSensitivityLabelDisable.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/RecommendedColumnSensitivityLabelEnable.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ColumnSensitivityLabelGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SensitivityLabelsListByDatabaseWithSourceCurrent.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SensitivityLabelsListByDatabaseWithSourceRecommended.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SensitivityLabelsCurrentUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type SensitivityLabelsClientCreateOrUpdateOptions struct { }
SensitivityLabelsClientCreateOrUpdateOptions contains the optional parameters for the SensitivityLabelsClient.CreateOrUpdate method.
type SensitivityLabelsClientCreateOrUpdateResponse ¶
type SensitivityLabelsClientCreateOrUpdateResponse struct { // A sensitivity label. SensitivityLabel }
SensitivityLabelsClientCreateOrUpdateResponse contains the response from method SensitivityLabelsClient.CreateOrUpdate.
type SensitivityLabelsClientDeleteOptions ¶
type SensitivityLabelsClientDeleteOptions struct { }
SensitivityLabelsClientDeleteOptions contains the optional parameters for the SensitivityLabelsClient.Delete method.
type SensitivityLabelsClientDeleteResponse ¶
type SensitivityLabelsClientDeleteResponse struct { }
SensitivityLabelsClientDeleteResponse contains the response from method SensitivityLabelsClient.Delete.
type SensitivityLabelsClientDisableRecommendationOptions ¶
type SensitivityLabelsClientDisableRecommendationOptions struct { }
SensitivityLabelsClientDisableRecommendationOptions contains the optional parameters for the SensitivityLabelsClient.DisableRecommendation method.
type SensitivityLabelsClientDisableRecommendationResponse ¶
type SensitivityLabelsClientDisableRecommendationResponse struct { }
SensitivityLabelsClientDisableRecommendationResponse contains the response from method SensitivityLabelsClient.DisableRecommendation.
type SensitivityLabelsClientEnableRecommendationOptions ¶
type SensitivityLabelsClientEnableRecommendationOptions struct { }
SensitivityLabelsClientEnableRecommendationOptions contains the optional parameters for the SensitivityLabelsClient.EnableRecommendation method.
type SensitivityLabelsClientEnableRecommendationResponse ¶
type SensitivityLabelsClientEnableRecommendationResponse struct { }
SensitivityLabelsClientEnableRecommendationResponse contains the response from method SensitivityLabelsClient.EnableRecommendation.
type SensitivityLabelsClientGetOptions ¶
type SensitivityLabelsClientGetOptions struct { }
SensitivityLabelsClientGetOptions contains the optional parameters for the SensitivityLabelsClient.Get method.
type SensitivityLabelsClientGetResponse ¶
type SensitivityLabelsClientGetResponse struct { // A sensitivity label. SensitivityLabel }
SensitivityLabelsClientGetResponse contains the response from method SensitivityLabelsClient.Get.
type SensitivityLabelsClientListCurrentByDatabaseOptions ¶
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 ¶
type SensitivityLabelsClientListCurrentByDatabaseResponse struct { // A list of sensitivity labels. SensitivityLabelListResult }
SensitivityLabelsClientListCurrentByDatabaseResponse contains the response from method SensitivityLabelsClient.NewListCurrentByDatabasePager.
type SensitivityLabelsClientListRecommendedByDatabaseOptions ¶
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 ¶
type SensitivityLabelsClientListRecommendedByDatabaseResponse struct { // A list of sensitivity labels. SensitivityLabelListResult }
SensitivityLabelsClientListRecommendedByDatabaseResponse contains the response from method SensitivityLabelsClient.NewListRecommendedByDatabasePager.
type SensitivityLabelsClientUpdateOptions ¶
type SensitivityLabelsClientUpdateOptions struct { }
SensitivityLabelsClientUpdateOptions contains the optional parameters for the SensitivityLabelsClient.Update method.
type SensitivityLabelsClientUpdateResponse ¶
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 ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Server.
type ServerAdvancedThreatProtection ¶
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 ¶
func (s ServerAdvancedThreatProtection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerAdvancedThreatProtection.
func (*ServerAdvancedThreatProtection) UnmarshalJSON ¶
func (s *ServerAdvancedThreatProtection) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerAdvancedThreatProtection.
type ServerAdvancedThreatProtectionSettingsClient ¶
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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerAdvancedThreatProtectionSettingsCreateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerAdvancedThreatProtectionSettingsCreateMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerAdvancedThreatProtectionSettingsGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerAdvancedThreatProtectionSettingsListByServer.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ServerAdvancedThreatProtectionSettingsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerAdvancedThreatProtectionSettingsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerAdvancedThreatProtectionSettingsClient.BeginCreateOrUpdate method.
type ServerAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse ¶
type ServerAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse struct { // A server Advanced Threat Protection. ServerAdvancedThreatProtection }
ServerAdvancedThreatProtectionSettingsClientCreateOrUpdateResponse contains the response from method ServerAdvancedThreatProtectionSettingsClient.BeginCreateOrUpdate.
type ServerAdvancedThreatProtectionSettingsClientGetOptions ¶
type ServerAdvancedThreatProtectionSettingsClientGetOptions struct { }
ServerAdvancedThreatProtectionSettingsClientGetOptions contains the optional parameters for the ServerAdvancedThreatProtectionSettingsClient.Get method.
type ServerAdvancedThreatProtectionSettingsClientGetResponse ¶
type ServerAdvancedThreatProtectionSettingsClientGetResponse struct { // A server Advanced Threat Protection. ServerAdvancedThreatProtection }
ServerAdvancedThreatProtectionSettingsClientGetResponse contains the response from method ServerAdvancedThreatProtectionSettingsClient.Get.
type ServerAdvancedThreatProtectionSettingsClientListByServerOptions ¶
type ServerAdvancedThreatProtectionSettingsClientListByServerOptions struct { }
ServerAdvancedThreatProtectionSettingsClientListByServerOptions contains the optional parameters for the ServerAdvancedThreatProtectionSettingsClient.NewListByServerPager method.
type ServerAdvancedThreatProtectionSettingsClientListByServerResponse ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerAdvisorGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerAdvisorList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerRecommendedActionListExpand.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerAdvisorUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ServerAdvisorsClientGetOptions struct { }
ServerAdvisorsClientGetOptions contains the optional parameters for the ServerAdvisorsClient.Get method.
type ServerAdvisorsClientGetResponse ¶
type ServerAdvisorsClientGetResponse struct { // Database, Server or Elastic Pool Advisor. Advisor }
ServerAdvisorsClientGetResponse contains the response from method ServerAdvisorsClient.Get.
type ServerAdvisorsClientListByServerOptions ¶
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 ¶
type ServerAdvisorsClientListByServerResponse struct { // Array of Advisor AdvisorArray []*Advisor }
ServerAdvisorsClientListByServerResponse contains the response from method ServerAdvisorsClient.ListByServer.
type ServerAdvisorsClientUpdateOptions ¶
type ServerAdvisorsClientUpdateOptions struct { }
ServerAdvisorsClientUpdateOptions contains the optional parameters for the ServerAdvisorsClient.Update method.
type ServerAdvisorsClientUpdateResponse ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerAutomaticTuningGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerAutomaticTuningUpdateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerAutomaticTuningUpdateMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ServerAutomaticTuningClientGetOptions struct { }
ServerAutomaticTuningClientGetOptions contains the optional parameters for the ServerAutomaticTuningClient.Get method.
type ServerAutomaticTuningClientGetResponse ¶
type ServerAutomaticTuningClientGetResponse struct { // Server-level Automatic Tuning. ServerAutomaticTuning }
ServerAutomaticTuningClientGetResponse contains the response from method ServerAutomaticTuningClient.Get.
type ServerAutomaticTuningClientUpdateOptions ¶
type ServerAutomaticTuningClientUpdateOptions struct { }
ServerAutomaticTuningClientUpdateOptions contains the optional parameters for the ServerAutomaticTuningClient.Update method.
type ServerAutomaticTuningClientUpdateResponse ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AdministratorCreateOrUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AdministratorDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AdministratorGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AdministratorList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ServerAzureADAdministratorsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerAzureADAdministratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerAzureADAdministratorsClient.BeginCreateOrUpdate method.
type ServerAzureADAdministratorsClientBeginDeleteOptions ¶
type ServerAzureADAdministratorsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerAzureADAdministratorsClientBeginDeleteOptions contains the optional parameters for the ServerAzureADAdministratorsClient.BeginDelete method.
type ServerAzureADAdministratorsClientCreateOrUpdateResponse ¶
type ServerAzureADAdministratorsClientCreateOrUpdateResponse struct { // Azure Active Directory administrator. ServerAzureADAdministrator }
ServerAzureADAdministratorsClientCreateOrUpdateResponse contains the response from method ServerAzureADAdministratorsClient.BeginCreateOrUpdate.
type ServerAzureADAdministratorsClientDeleteResponse ¶
type ServerAzureADAdministratorsClientDeleteResponse struct { }
ServerAzureADAdministratorsClientDeleteResponse contains the response from method ServerAzureADAdministratorsClient.BeginDelete.
type ServerAzureADAdministratorsClientGetOptions ¶
type ServerAzureADAdministratorsClientGetOptions struct { }
ServerAzureADAdministratorsClientGetOptions contains the optional parameters for the ServerAzureADAdministratorsClient.Get method.
type ServerAzureADAdministratorsClientGetResponse ¶
type ServerAzureADAdministratorsClientGetResponse struct { // Azure Active Directory administrator. ServerAzureADAdministrator }
ServerAzureADAdministratorsClientGetResponse contains the response from method ServerAzureADAdministratorsClient.Get.
type ServerAzureADAdministratorsClientListByServerOptions ¶
type ServerAzureADAdministratorsClientListByServerOptions struct { }
ServerAzureADAdministratorsClientListByServerOptions contains the optional parameters for the ServerAzureADAdministratorsClient.NewListByServerPager method.
type ServerAzureADAdministratorsClientListByServerResponse ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AzureADOnlyAuthCreateOrUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AzureADOnlyAuthDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AzureADOnlyAuthGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AzureADOnlyAuthList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ServerAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerAzureADOnlyAuthenticationsClient.BeginCreateOrUpdate method.
type ServerAzureADOnlyAuthenticationsClientBeginDeleteOptions ¶
type ServerAzureADOnlyAuthenticationsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerAzureADOnlyAuthenticationsClientBeginDeleteOptions contains the optional parameters for the ServerAzureADOnlyAuthenticationsClient.BeginDelete method.
type ServerAzureADOnlyAuthenticationsClientCreateOrUpdateResponse ¶
type ServerAzureADOnlyAuthenticationsClientCreateOrUpdateResponse struct { // Azure Active Directory only authentication. ServerAzureADOnlyAuthentication }
ServerAzureADOnlyAuthenticationsClientCreateOrUpdateResponse contains the response from method ServerAzureADOnlyAuthenticationsClient.BeginCreateOrUpdate.
type ServerAzureADOnlyAuthenticationsClientDeleteResponse ¶
type ServerAzureADOnlyAuthenticationsClientDeleteResponse struct { }
ServerAzureADOnlyAuthenticationsClientDeleteResponse contains the response from method ServerAzureADOnlyAuthenticationsClient.BeginDelete.
type ServerAzureADOnlyAuthenticationsClientGetOptions ¶
type ServerAzureADOnlyAuthenticationsClientGetOptions struct { }
ServerAzureADOnlyAuthenticationsClientGetOptions contains the optional parameters for the ServerAzureADOnlyAuthenticationsClient.Get method.
type ServerAzureADOnlyAuthenticationsClientGetResponse ¶
type ServerAzureADOnlyAuthenticationsClientGetResponse struct { // Azure Active Directory only authentication. ServerAzureADOnlyAuthentication }
ServerAzureADOnlyAuthenticationsClientGetResponse contains the response from method ServerAzureADOnlyAuthenticationsClient.Get.
type ServerAzureADOnlyAuthenticationsClientListByServerOptions ¶
type ServerAzureADOnlyAuthenticationsClientListByServerOptions struct { }
ServerAzureADOnlyAuthenticationsClientListByServerOptions contains the optional parameters for the ServerAzureADOnlyAuthenticationsClient.NewListByServerPager method.
type ServerAzureADOnlyAuthenticationsClientListByServerResponse ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerBlobAuditingCreateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerBlobAuditingCreateMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerBlobAuditingGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerAuditingSettingsList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerBlobAuditingPoliciesClient.BeginCreateOrUpdate method.
type ServerBlobAuditingPoliciesClientCreateOrUpdateResponse ¶
type ServerBlobAuditingPoliciesClientCreateOrUpdateResponse struct { // A server blob auditing policy. ServerBlobAuditingPolicy }
ServerBlobAuditingPoliciesClientCreateOrUpdateResponse contains the response from method ServerBlobAuditingPoliciesClient.BeginCreateOrUpdate.
type ServerBlobAuditingPoliciesClientGetOptions ¶
type ServerBlobAuditingPoliciesClientGetOptions struct { }
ServerBlobAuditingPoliciesClientGetOptions contains the optional parameters for the ServerBlobAuditingPoliciesClient.Get method.
type ServerBlobAuditingPoliciesClientGetResponse ¶
type ServerBlobAuditingPoliciesClientGetResponse struct { // A server blob auditing policy. ServerBlobAuditingPolicy }
ServerBlobAuditingPoliciesClientGetResponse contains the response from method ServerBlobAuditingPoliciesClient.Get.
type ServerBlobAuditingPoliciesClientListByServerOptions ¶
type ServerBlobAuditingPoliciesClientListByServerOptions struct { }
ServerBlobAuditingPoliciesClientListByServerOptions contains the optional parameters for the ServerBlobAuditingPoliciesClient.NewListByServerPager method.
type ServerBlobAuditingPoliciesClientListByServerResponse ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
func (s ServerCommunicationLinkProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerCommunicationLinkProperties.
func (*ServerCommunicationLinkProperties) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ServerCommunicationLinkCreateOrUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ServerCommunicationLinkDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ServerCommunicationLinkGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ServerCommunicationLinkList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ServerCommunicationLinksClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerCommunicationLinksClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerCommunicationLinksClient.BeginCreateOrUpdate method.
type ServerCommunicationLinksClientCreateOrUpdateResponse ¶
type ServerCommunicationLinksClientCreateOrUpdateResponse struct { // Server communication link. ServerCommunicationLink }
ServerCommunicationLinksClientCreateOrUpdateResponse contains the response from method ServerCommunicationLinksClient.BeginCreateOrUpdate.
type ServerCommunicationLinksClientDeleteOptions ¶
type ServerCommunicationLinksClientDeleteOptions struct { }
ServerCommunicationLinksClientDeleteOptions contains the optional parameters for the ServerCommunicationLinksClient.Delete method.
type ServerCommunicationLinksClientDeleteResponse ¶
type ServerCommunicationLinksClientDeleteResponse struct { }
ServerCommunicationLinksClientDeleteResponse contains the response from method ServerCommunicationLinksClient.Delete.
type ServerCommunicationLinksClientGetOptions ¶
type ServerCommunicationLinksClientGetOptions struct { }
ServerCommunicationLinksClientGetOptions contains the optional parameters for the ServerCommunicationLinksClient.Get method.
type ServerCommunicationLinksClientGetResponse ¶
type ServerCommunicationLinksClientGetResponse struct { // Server communication link. ServerCommunicationLink }
ServerCommunicationLinksClientGetResponse contains the response from method ServerCommunicationLinksClient.Get.
type ServerCommunicationLinksClientListByServerOptions ¶
type ServerCommunicationLinksClientListByServerOptions struct { }
ServerCommunicationLinksClientListByServerOptions contains the optional parameters for the ServerCommunicationLinksClient.NewListByServerPager method.
type ServerCommunicationLinksClientListByServerResponse ¶
type ServerCommunicationLinksClientListByServerResponse struct { // A list of server communication links. ServerCommunicationLinkListResult }
ServerCommunicationLinksClientListByServerResponse contains the response from method ServerCommunicationLinksClient.NewListByServerPager.
type ServerConfigurationOption ¶
type ServerConfigurationOption struct { // Resource properties. Properties *ServerConfigurationOptionProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
ServerConfigurationOption - A server configuration option
func (ServerConfigurationOption) MarshalJSON ¶
func (s ServerConfigurationOption) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerConfigurationOption.
func (*ServerConfigurationOption) UnmarshalJSON ¶
func (s *ServerConfigurationOption) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerConfigurationOption.
type ServerConfigurationOptionListResult ¶
type ServerConfigurationOptionListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ServerConfigurationOption }
ServerConfigurationOptionListResult - A list of server configuration options.
func (ServerConfigurationOptionListResult) MarshalJSON ¶
func (s ServerConfigurationOptionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerConfigurationOptionListResult.
func (*ServerConfigurationOptionListResult) UnmarshalJSON ¶
func (s *ServerConfigurationOptionListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerConfigurationOptionListResult.
type ServerConfigurationOptionName ¶
type ServerConfigurationOptionName string
const (
ServerConfigurationOptionNameAllowPolybaseExport ServerConfigurationOptionName = "allowPolybaseExport"
)
func PossibleServerConfigurationOptionNameValues ¶
func PossibleServerConfigurationOptionNameValues() []ServerConfigurationOptionName
PossibleServerConfigurationOptionNameValues returns the possible values for the ServerConfigurationOptionName const type.
type ServerConfigurationOptionProperties ¶
type ServerConfigurationOptionProperties struct { // REQUIRED; Value of the server configuration option. ServerConfigurationOptionValue *int32 // READ-ONLY; Provisioning state of server configuration option. ProvisioningState *ProvisioningState }
ServerConfigurationOptionProperties - The properties of server configuration option.
func (ServerConfigurationOptionProperties) MarshalJSON ¶
func (s ServerConfigurationOptionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerConfigurationOptionProperties.
func (*ServerConfigurationOptionProperties) UnmarshalJSON ¶
func (s *ServerConfigurationOptionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerConfigurationOptionProperties.
type ServerConfigurationOptionsClient ¶
type ServerConfigurationOptionsClient struct {
// contains filtered or unexported fields
}
ServerConfigurationOptionsClient contains the methods for the ServerConfigurationOptions group. Don't use this type directly, use NewServerConfigurationOptionsClient() instead.
func NewServerConfigurationOptionsClient ¶
func NewServerConfigurationOptionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerConfigurationOptionsClient, error)
NewServerConfigurationOptionsClient creates a new instance of ServerConfigurationOptionsClient 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 (*ServerConfigurationOptionsClient) BeginCreateOrUpdate ¶
func (client *ServerConfigurationOptionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, serverConfigurationOptionName ServerConfigurationOptionName, parameters ServerConfigurationOption, options *ServerConfigurationOptionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerConfigurationOptionsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Updates managed instance server configuration option. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-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.
- managedInstanceName - The name of the managed instance.
- serverConfigurationOptionName - The name of the server configuration option.
- parameters - Server configuration option parameters.
- options - ServerConfigurationOptionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerConfigurationOptionsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ServerConfigurationOptionUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewServerConfigurationOptionsClient().BeginCreateOrUpdate(ctx, "testrg", "testinstance", armsql.ServerConfigurationOptionNameAllowPolybaseExport, armsql.ServerConfigurationOption{ Properties: &armsql.ServerConfigurationOptionProperties{ ServerConfigurationOptionValue: to.Ptr[int32](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.ServerConfigurationOption = armsql.ServerConfigurationOption{ // Name: to.Ptr("allowPolybaseExport"), // Type: to.Ptr("Microsoft.Sql/managedInstances/serverConfigurationOptions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance/serverConfigurationOptions/allowPolybaseExport"), // Properties: &armsql.ServerConfigurationOptionProperties{ // ProvisioningState: to.Ptr(armsql.ProvisioningStateSucceeded), // ServerConfigurationOptionValue: to.Ptr[int32](1), // }, // }
Output:
func (*ServerConfigurationOptionsClient) Get ¶
func (client *ServerConfigurationOptionsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, serverConfigurationOptionName ServerConfigurationOptionName, options *ServerConfigurationOptionsClientGetOptions) (ServerConfigurationOptionsClientGetResponse, error)
Get - Gets managed instance server configuration option. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-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.
- managedInstanceName - The name of the managed instance.
- serverConfigurationOptionName - The name of the server configuration option.
- options - ServerConfigurationOptionsClientGetOptions contains the optional parameters for the ServerConfigurationOptionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ServerConfigurationOptionGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewServerConfigurationOptionsClient().Get(ctx, "testrg", "testinstance", armsql.ServerConfigurationOptionNameAllowPolybaseExport, 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.ServerConfigurationOption = armsql.ServerConfigurationOption{ // Name: to.Ptr("allowPolybaseExport"), // Type: to.Ptr("Microsoft.Sql/managedInstances/serverConfigurationOptions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance/serverConfigurationOptions/allowPolybaseExport"), // Properties: &armsql.ServerConfigurationOptionProperties{ // ProvisioningState: to.Ptr(armsql.ProvisioningStateSucceeded), // ServerConfigurationOptionValue: to.Ptr[int32](1), // }, // }
Output:
func (*ServerConfigurationOptionsClient) NewListByManagedInstancePager ¶
func (client *ServerConfigurationOptionsClient) NewListByManagedInstancePager(resourceGroupName string, managedInstanceName string, options *ServerConfigurationOptionsClientListByManagedInstanceOptions) *runtime.Pager[ServerConfigurationOptionsClientListByManagedInstanceResponse]
NewListByManagedInstancePager - Gets a list of managed instance server configuration options.
Generated from API version 2022-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.
- managedInstanceName - The name of the managed instance.
- options - ServerConfigurationOptionsClientListByManagedInstanceOptions contains the optional parameters for the ServerConfigurationOptionsClient.NewListByManagedInstancePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/ServerConfigurationOptionList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewServerConfigurationOptionsClient().NewListByManagedInstancePager("testrg", "testinstance", 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.ServerConfigurationOptionListResult = armsql.ServerConfigurationOptionListResult{ // Value: []*armsql.ServerConfigurationOption{ // { // Name: to.Ptr("allowPolybaseExport"), // Type: to.Ptr("Microsoft.Sql/managedInstances/serverConfigurationOptions"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance/serverConfigurationOptions/allowPolybaseExport"), // Properties: &armsql.ServerConfigurationOptionProperties{ // ProvisioningState: to.Ptr(armsql.ProvisioningStateSucceeded), // ServerConfigurationOptionValue: to.Ptr[int32](1), // }, // }}, // } }
Output:
type ServerConfigurationOptionsClientBeginCreateOrUpdateOptions ¶
type ServerConfigurationOptionsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerConfigurationOptionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerConfigurationOptionsClient.BeginCreateOrUpdate method.
type ServerConfigurationOptionsClientCreateOrUpdateResponse ¶
type ServerConfigurationOptionsClientCreateOrUpdateResponse struct { // A server configuration option ServerConfigurationOption }
ServerConfigurationOptionsClientCreateOrUpdateResponse contains the response from method ServerConfigurationOptionsClient.BeginCreateOrUpdate.
type ServerConfigurationOptionsClientGetOptions ¶
type ServerConfigurationOptionsClientGetOptions struct { }
ServerConfigurationOptionsClientGetOptions contains the optional parameters for the ServerConfigurationOptionsClient.Get method.
type ServerConfigurationOptionsClientGetResponse ¶
type ServerConfigurationOptionsClientGetResponse struct { // A server configuration option ServerConfigurationOption }
ServerConfigurationOptionsClientGetResponse contains the response from method ServerConfigurationOptionsClient.Get.
type ServerConfigurationOptionsClientListByManagedInstanceOptions ¶
type ServerConfigurationOptionsClientListByManagedInstanceOptions struct { }
ServerConfigurationOptionsClientListByManagedInstanceOptions contains the optional parameters for the ServerConfigurationOptionsClient.NewListByManagedInstancePager method.
type ServerConfigurationOptionsClientListByManagedInstanceResponse ¶
type ServerConfigurationOptionsClientListByManagedInstanceResponse struct { // A list of server configuration options. ServerConfigurationOptionListResult }
ServerConfigurationOptionsClientListByManagedInstanceResponse contains the response from method ServerConfigurationOptionsClient.NewListByManagedInstancePager.
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ServerConnectionPoliciesUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ServerConnectionPoliciesGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ServerConnectionPoliciesList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ServerConnectionPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerConnectionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerConnectionPoliciesClient.BeginCreateOrUpdate method.
type ServerConnectionPoliciesClientCreateOrUpdateResponse ¶
type ServerConnectionPoliciesClientCreateOrUpdateResponse struct { // A server connection policy ServerConnectionPolicy }
ServerConnectionPoliciesClientCreateOrUpdateResponse contains the response from method ServerConnectionPoliciesClient.BeginCreateOrUpdate.
type ServerConnectionPoliciesClientGetOptions ¶
type ServerConnectionPoliciesClientGetOptions struct { }
ServerConnectionPoliciesClientGetOptions contains the optional parameters for the ServerConnectionPoliciesClient.Get method.
type ServerConnectionPoliciesClientGetResponse ¶
type ServerConnectionPoliciesClientGetResponse struct { // A server connection policy ServerConnectionPolicy }
ServerConnectionPoliciesClientGetResponse contains the response from method ServerConnectionPoliciesClient.Get.
type ServerConnectionPoliciesClientListByServerOptions ¶
type ServerConnectionPoliciesClientListByServerOptions struct { }
ServerConnectionPoliciesClientListByServerOptions contains the optional parameters for the ServerConnectionPoliciesClient.NewListByServerPager method.
type ServerConnectionPoliciesClientListByServerResponse ¶
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 ¶
func (s *ServerConnectionPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerConnectionPolicy.
type ServerConnectionPolicyListResult ¶
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 ¶
func (s ServerConnectionPolicyListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerConnectionPolicyListResult.
func (*ServerConnectionPolicyListResult) UnmarshalJSON ¶
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 ¶
func (s ServerConnectionPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerConnectionPolicyProperties.
func (*ServerConnectionPolicyProperties) UnmarshalJSON ¶
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 ¶
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 ¶
func (s ServerDNSAliasAcquisition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerDNSAliasAcquisition.
func (*ServerDNSAliasAcquisition) UnmarshalJSON ¶
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 ¶
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 ¶
func (s ServerDNSAliasProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerDNSAliasProperties.
func (*ServerDNSAliasProperties) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDnsAliasAcquire.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDnsAliasCreateOrUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDnsAliasDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDnsAliasGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDnsAliasList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ServerDNSAliasesClientAcquireResponse struct { // A server DNS alias. ServerDNSAlias }
ServerDNSAliasesClientAcquireResponse contains the response from method ServerDNSAliasesClient.BeginAcquire.
type ServerDNSAliasesClientBeginAcquireOptions ¶
type ServerDNSAliasesClientBeginAcquireOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerDNSAliasesClientBeginAcquireOptions contains the optional parameters for the ServerDNSAliasesClient.BeginAcquire method.
type ServerDNSAliasesClientBeginCreateOrUpdateOptions ¶
type ServerDNSAliasesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerDNSAliasesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerDNSAliasesClient.BeginCreateOrUpdate method.
type ServerDNSAliasesClientBeginDeleteOptions ¶
type ServerDNSAliasesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerDNSAliasesClientBeginDeleteOptions contains the optional parameters for the ServerDNSAliasesClient.BeginDelete method.
type ServerDNSAliasesClientCreateOrUpdateResponse ¶
type ServerDNSAliasesClientCreateOrUpdateResponse struct { // A server DNS alias. ServerDNSAlias }
ServerDNSAliasesClientCreateOrUpdateResponse contains the response from method ServerDNSAliasesClient.BeginCreateOrUpdate.
type ServerDNSAliasesClientDeleteResponse ¶
type ServerDNSAliasesClientDeleteResponse struct { }
ServerDNSAliasesClientDeleteResponse contains the response from method ServerDNSAliasesClient.BeginDelete.
type ServerDNSAliasesClientGetOptions ¶
type ServerDNSAliasesClientGetOptions struct { }
ServerDNSAliasesClientGetOptions contains the optional parameters for the ServerDNSAliasesClient.Get method.
type ServerDNSAliasesClientGetResponse ¶
type ServerDNSAliasesClientGetResponse struct { // A server DNS alias. ServerDNSAlias }
ServerDNSAliasesClientGetResponse contains the response from method ServerDNSAliasesClient.Get.
type ServerDNSAliasesClientListByServerOptions ¶
type ServerDNSAliasesClientListByServerOptions struct { }
ServerDNSAliasesClientListByServerOptions contains the optional parameters for the ServerDNSAliasesClient.NewListByServerPager method.
type ServerDNSAliasesClientListByServerResponse ¶
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 DevOpsAuditingSettingsName, 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 2022-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 - 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/ServerDevOpsAuditCreateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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", armsql.DevOpsAuditingSettingsNameDefault, armsql.ServerDevOpsAuditingSettings{ Properties: &armsql.ServerDevOpsAuditSettingsProperties{ IsAzureMonitorTargetEnabled: to.Ptr(true), State: to.Ptr(armsql.BlobAuditingPolicyStateEnabled), StorageAccountAccessKey: to.Ptr("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/ServerDevOpsAuditCreateMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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", armsql.DevOpsAuditingSettingsNameDefault, armsql.ServerDevOpsAuditingSettings{ Properties: &armsql.ServerDevOpsAuditSettingsProperties{ State: to.Ptr(armsql.BlobAuditingPolicyStateEnabled), StorageAccountAccessKey: to.Ptr("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"), 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 DevOpsAuditingSettingsName, 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 2022-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 - ServerDevOpsAuditSettingsClientGetOptions contains the optional parameters for the ServerDevOpsAuditSettingsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/ServerDevOpsAuditGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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", armsql.DevOpsAuditingSettingsNameDefault, 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), // IsManagedIdentityInUse: to.Ptr(false), // State: to.Ptr(armsql.BlobAuditingPolicyStateDisabled), // StorageAccountSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"), // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), // }, // }
Output:
func (*ServerDevOpsAuditSettingsClient) NewListByServerPager ¶
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 2022-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 - ServerDevOpsAuditSettingsClientListByServerOptions contains the optional parameters for the ServerDevOpsAuditSettingsClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/ServerDevOpsAuditList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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), // IsManagedIdentityInUse: to.Ptr(false), // State: to.Ptr(armsql.BlobAuditingPolicyStateDisabled), // StorageAccountSubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"), // StorageEndpoint: to.Ptr("https://mystorage.blob.core.windows.net"), // }, // }}, // } }
Output:
type ServerDevOpsAuditSettingsClientBeginCreateOrUpdateOptions ¶
type ServerDevOpsAuditSettingsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerDevOpsAuditSettingsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerDevOpsAuditSettingsClient.BeginCreateOrUpdate method.
type ServerDevOpsAuditSettingsClientCreateOrUpdateResponse ¶
type ServerDevOpsAuditSettingsClientCreateOrUpdateResponse struct { // A server DevOps auditing settings. ServerDevOpsAuditingSettings }
ServerDevOpsAuditSettingsClientCreateOrUpdateResponse contains the response from method ServerDevOpsAuditSettingsClient.BeginCreateOrUpdate.
type ServerDevOpsAuditSettingsClientGetOptions ¶
type ServerDevOpsAuditSettingsClientGetOptions struct { }
ServerDevOpsAuditSettingsClientGetOptions contains the optional parameters for the ServerDevOpsAuditSettingsClient.Get method.
type ServerDevOpsAuditSettingsClientGetResponse ¶
type ServerDevOpsAuditSettingsClientGetResponse struct { // A server DevOps auditing settings. ServerDevOpsAuditingSettings }
ServerDevOpsAuditSettingsClientGetResponse contains the response from method ServerDevOpsAuditSettingsClient.Get.
type ServerDevOpsAuditSettingsClientListByServerOptions ¶
type ServerDevOpsAuditSettingsClientListByServerOptions struct { }
ServerDevOpsAuditSettingsClientListByServerOptions contains the optional parameters for the ServerDevOpsAuditSettingsClient.NewListByServerPager method.
type ServerDevOpsAuditSettingsClientListByServerResponse ¶
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 ¶
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 whether Managed Identity is used to access blob storage IsManagedIdentityInUse *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 ¶
func (s ServerDevOpsAuditSettingsProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerDevOpsAuditSettingsProperties.
func (*ServerDevOpsAuditSettingsProperties) UnmarshalJSON ¶
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 ¶
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 ¶
func (s ServerExternalAdministrator) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerExternalAdministrator.
func (*ServerExternalAdministrator) UnmarshalJSON ¶
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 ¶
func (s ServerFirewallRuleProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerFirewallRuleProperties.
func (*ServerFirewallRuleProperties) UnmarshalJSON ¶
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 ¶
func (s ServerInfo) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerInfo.
func (*ServerInfo) UnmarshalJSON ¶
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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerKeyCreateOrUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerKeyDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerKeyGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerKeyList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ServerKeysClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerKeysClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerKeysClient.BeginCreateOrUpdate method.
type ServerKeysClientBeginDeleteOptions ¶
type ServerKeysClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerKeysClientBeginDeleteOptions contains the optional parameters for the ServerKeysClient.BeginDelete method.
type ServerKeysClientCreateOrUpdateResponse ¶
type ServerKeysClientCreateOrUpdateResponse struct { // A server key. ServerKey }
ServerKeysClientCreateOrUpdateResponse contains the response from method ServerKeysClient.BeginCreateOrUpdate.
type ServerKeysClientDeleteResponse ¶
type ServerKeysClientDeleteResponse struct { }
ServerKeysClientDeleteResponse contains the response from method ServerKeysClient.BeginDelete.
type ServerKeysClientGetOptions ¶
type ServerKeysClientGetOptions struct { }
ServerKeysClientGetOptions contains the optional parameters for the ServerKeysClient.Get method.
type ServerKeysClientGetResponse ¶
type ServerKeysClientGetResponse struct { // A server key. ServerKey }
ServerKeysClientGetResponse contains the response from method ServerKeysClient.Get.
type ServerKeysClientListByServerOptions ¶
type ServerKeysClientListByServerOptions struct { }
ServerKeysClientListByServerOptions contains the optional parameters for the ServerKeysClient.NewListByServerPager method.
type ServerKeysClientListByServerResponse ¶
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 ¶
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 to restrict outbound network access 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 ¶
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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListServerOperations.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ServerOperationsClientListByServerOptions struct { }
ServerOperationsClientListByServerOptions contains the optional parameters for the ServerOperationsClient.NewListByServerPager method.
type ServerOperationsClientListByServerResponse ¶
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 ¶
func (s ServerPrivateEndpointConnection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerPrivateEndpointConnection.
func (*ServerPrivateEndpointConnection) UnmarshalJSON ¶
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 administrator of the server. This can only be used at server create time. If used for server // update, it will be ignored or it will result in an error. For updates individual // APIs will need to be used. Administrators *ServerExternalAdministrator // The Client id used for cross tenant CMK scenario FederatedClientID *string // Whether or not to enable IPv6 support for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' IsIPv6Enabled *ServerNetworkAccessFlag // A CMK URI of the key to use for encryption. KeyID *string // Minimal TLS version. Allowed values: 'None', 1.0', '1.1', '1.2', '1.3' MinimalTLSVersion *MinimalTLSVersion // 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' or 'SecuredByPerimeter' PublicNetworkAccess *ServerPublicNetworkAccessFlag // 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; Status of external governance. ExternalGovernanceStatus *ExternalGovernanceStatus // 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 ¶
func (s *ServerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerProperties.
type ServerPublicNetworkAccessFlag ¶
type ServerPublicNetworkAccessFlag string
ServerPublicNetworkAccessFlag - Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' or 'SecuredByPerimeter'
const ( ServerPublicNetworkAccessFlagDisabled ServerPublicNetworkAccessFlag = "Disabled" ServerPublicNetworkAccessFlagEnabled ServerPublicNetworkAccessFlag = "Enabled" ServerPublicNetworkAccessFlagSecuredByPerimeter ServerPublicNetworkAccessFlag = "SecuredByPerimeter" )
func PossibleServerPublicNetworkAccessFlagValues ¶
func PossibleServerPublicNetworkAccessFlagValues() []ServerPublicNetworkAccessFlag
PossibleServerPublicNetworkAccessFlagValues returns the possible values for the ServerPublicNetworkAccessFlag const type.
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerSecurityAlertsCreateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerSecurityAlertsCreateMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerSecurityAlertsGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerSecurityAlertsListByServer.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.BeginCreateOrUpdate method.
type ServerSecurityAlertPoliciesClientCreateOrUpdateResponse ¶
type ServerSecurityAlertPoliciesClientCreateOrUpdateResponse struct { // A server security alert policy. ServerSecurityAlertPolicy }
ServerSecurityAlertPoliciesClientCreateOrUpdateResponse contains the response from method ServerSecurityAlertPoliciesClient.BeginCreateOrUpdate.
type ServerSecurityAlertPoliciesClientGetOptions ¶
type ServerSecurityAlertPoliciesClientGetOptions struct { }
ServerSecurityAlertPoliciesClientGetOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.Get method.
type ServerSecurityAlertPoliciesClientGetResponse ¶
type ServerSecurityAlertPoliciesClientGetResponse struct { // A server security alert policy. ServerSecurityAlertPolicy }
ServerSecurityAlertPoliciesClientGetResponse contains the response from method ServerSecurityAlertPoliciesClient.Get.
type ServerSecurityAlertPoliciesClientListByServerOptions ¶
type ServerSecurityAlertPoliciesClientListByServerOptions struct { }
ServerSecurityAlertPoliciesClientListByServerOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.NewListByServerPager method.
type ServerSecurityAlertPoliciesClientListByServerResponse ¶
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 ¶
func (s *ServerSecurityAlertPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerSecurityAlertPolicy.
type ServerTrustCertificate ¶
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 ¶
func (s ServerTrustCertificate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerTrustCertificate.
func (*ServerTrustCertificate) UnmarshalJSON ¶
func (s *ServerTrustCertificate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerTrustCertificate.
type ServerTrustCertificateProperties ¶
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 ¶
func (s ServerTrustCertificateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerTrustCertificateProperties.
func (*ServerTrustCertificateProperties) UnmarshalJSON ¶
func (s *ServerTrustCertificateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerTrustCertificateProperties.
type ServerTrustCertificatesClient ¶
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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerTrustCertificatesCreate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerTrustCertificatesDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerTrustCertificatesGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerTrustCertificatesListByInstance.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ServerTrustCertificatesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerTrustCertificatesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerTrustCertificatesClient.BeginCreateOrUpdate method.
type ServerTrustCertificatesClientBeginDeleteOptions ¶
type ServerTrustCertificatesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerTrustCertificatesClientBeginDeleteOptions contains the optional parameters for the ServerTrustCertificatesClient.BeginDelete method.
type ServerTrustCertificatesClientCreateOrUpdateResponse ¶
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 ¶
type ServerTrustCertificatesClientDeleteResponse struct { }
ServerTrustCertificatesClientDeleteResponse contains the response from method ServerTrustCertificatesClient.BeginDelete.
type ServerTrustCertificatesClientGetOptions ¶
type ServerTrustCertificatesClientGetOptions struct { }
ServerTrustCertificatesClientGetOptions contains the optional parameters for the ServerTrustCertificatesClient.Get method.
type ServerTrustCertificatesClientGetResponse ¶
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 ¶
type ServerTrustCertificatesClientListByInstanceOptions struct { }
ServerTrustCertificatesClientListByInstanceOptions contains the optional parameters for the ServerTrustCertificatesClient.NewListByInstancePager method.
type ServerTrustCertificatesClientListByInstanceResponse ¶
type ServerTrustCertificatesClientListByInstanceResponse struct { // A list of server trust certificates in instance. ServerTrustCertificatesListResult }
ServerTrustCertificatesClientListByInstanceResponse contains the response from method ServerTrustCertificatesClient.NewListByInstancePager.
type ServerTrustCertificatesListResult ¶
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 ¶
func (s ServerTrustCertificatesListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerTrustCertificatesListResult.
func (*ServerTrustCertificatesListResult) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerTrustGroupCreate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerTrustGroupDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerTrustGroupGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerTrustGroupListByManagedInstance.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerTrustGroupList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ServerTrustGroupsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerTrustGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerTrustGroupsClient.BeginCreateOrUpdate method.
type ServerTrustGroupsClientBeginDeleteOptions ¶
type ServerTrustGroupsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerTrustGroupsClientBeginDeleteOptions contains the optional parameters for the ServerTrustGroupsClient.BeginDelete method.
type ServerTrustGroupsClientCreateOrUpdateResponse ¶
type ServerTrustGroupsClientCreateOrUpdateResponse struct { // A server trust group. ServerTrustGroup }
ServerTrustGroupsClientCreateOrUpdateResponse contains the response from method ServerTrustGroupsClient.BeginCreateOrUpdate.
type ServerTrustGroupsClientDeleteResponse ¶
type ServerTrustGroupsClientDeleteResponse struct { }
ServerTrustGroupsClientDeleteResponse contains the response from method ServerTrustGroupsClient.BeginDelete.
type ServerTrustGroupsClientGetOptions ¶
type ServerTrustGroupsClientGetOptions struct { }
ServerTrustGroupsClientGetOptions contains the optional parameters for the ServerTrustGroupsClient.Get method.
type ServerTrustGroupsClientGetResponse ¶
type ServerTrustGroupsClientGetResponse struct { // A server trust group. ServerTrustGroup }
ServerTrustGroupsClientGetResponse contains the response from method ServerTrustGroupsClient.Get.
type ServerTrustGroupsClientListByInstanceOptions ¶
type ServerTrustGroupsClientListByInstanceOptions struct { }
ServerTrustGroupsClientListByInstanceOptions contains the optional parameters for the ServerTrustGroupsClient.NewListByInstancePager method.
type ServerTrustGroupsClientListByInstanceResponse ¶
type ServerTrustGroupsClientListByInstanceResponse struct { // A list of server trust groups. ServerTrustGroupListResult }
ServerTrustGroupsClientListByInstanceResponse contains the response from method ServerTrustGroupsClient.NewListByInstancePager.
type ServerTrustGroupsClientListByLocationOptions ¶
type ServerTrustGroupsClientListByLocationOptions struct { }
ServerTrustGroupsClientListByLocationOptions contains the optional parameters for the ServerTrustGroupsClient.NewListByLocationPager method.
type ServerTrustGroupsClientListByLocationResponse ¶
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 ¶
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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ServerUsageMetricsList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ServerUsagesClientListByServerOptions struct { }
ServerUsagesClientListByServerOptions contains the optional parameters for the ServerUsagesClient.NewListByServerPager method.
type ServerUsagesClientListByServerResponse ¶
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 ¶
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 ¶
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 ¶
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 ¶
func (s ServerVulnerabilityAssessmentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerVulnerabilityAssessmentProperties.
func (*ServerVulnerabilityAssessmentProperties) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerVulnerabilityAssessmentCreateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerVulnerabilityAssessmentCreateStorageAccessKeyMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerVulnerabilityAssessmentCreateContainerSasKeyMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerVulnerabilityAssessmentDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerVulnerabilityAssessmentGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerVulnerabilityAssessmentListByServer.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ServerVulnerabilityAssessmentsClientCreateOrUpdateOptions struct { }
ServerVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the ServerVulnerabilityAssessmentsClient.CreateOrUpdate method.
type ServerVulnerabilityAssessmentsClientCreateOrUpdateResponse ¶
type ServerVulnerabilityAssessmentsClientCreateOrUpdateResponse struct { // A server vulnerability assessment. ServerVulnerabilityAssessment }
ServerVulnerabilityAssessmentsClientCreateOrUpdateResponse contains the response from method ServerVulnerabilityAssessmentsClient.CreateOrUpdate.
type ServerVulnerabilityAssessmentsClientDeleteOptions ¶
type ServerVulnerabilityAssessmentsClientDeleteOptions struct { }
ServerVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the ServerVulnerabilityAssessmentsClient.Delete method.
type ServerVulnerabilityAssessmentsClientDeleteResponse ¶
type ServerVulnerabilityAssessmentsClientDeleteResponse struct { }
ServerVulnerabilityAssessmentsClientDeleteResponse contains the response from method ServerVulnerabilityAssessmentsClient.Delete.
type ServerVulnerabilityAssessmentsClientGetOptions ¶
type ServerVulnerabilityAssessmentsClientGetOptions struct { }
ServerVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the ServerVulnerabilityAssessmentsClient.Get method.
type ServerVulnerabilityAssessmentsClientGetResponse ¶
type ServerVulnerabilityAssessmentsClientGetResponse struct { // A server vulnerability assessment. ServerVulnerabilityAssessment }
ServerVulnerabilityAssessmentsClientGetResponse contains the response from method ServerVulnerabilityAssessmentsClient.Get.
type ServerVulnerabilityAssessmentsClientListByServerOptions ¶
type ServerVulnerabilityAssessmentsClientListByServerOptions struct { }
ServerVulnerabilityAssessmentsClientListByServerOptions contains the optional parameters for the ServerVulnerabilityAssessmentsClient.NewListByServerPager method.
type ServerVulnerabilityAssessmentsClientListByServerResponse ¶
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 2023-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerCreate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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"), }, IsIPv6Enabled: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), PublicNetworkAccess: to.Ptr(armsql.ServerPublicNetworkAccessFlagEnabled), 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"), // IsIPv6Enabled: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // 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.ServerPublicNetworkAccessFlagEnabled), // 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 2023-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 - ServersClientBeginDeleteOptions contains the optional parameters for the ServersClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2023-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ImportNewDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ImportNewDatabaseWithNetworkIsolation.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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) BeginRefreshStatus ¶
func (client *ServersClient) BeginRefreshStatus(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientBeginRefreshStatusOptions) (*runtime.Poller[ServersClientRefreshStatusResponse], error)
BeginRefreshStatus - Refresh external governance enablement status. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-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 - ServersClientBeginRefreshStatusOptions contains the optional parameters for the ServersClient.BeginRefreshStatus method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/RefreshExternalGovernanceStatus.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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().BeginRefreshStatus(ctx, "sqlcrudtest-7398", "sqlcrudtest-4645", 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.RefreshExternalGovernanceStatusOperationResult = armsql.RefreshExternalGovernanceStatusOperationResult{ // Name: to.Ptr("9d9a794a-5cec-4f23-af70-d29511b522a4"), // Type: to.Ptr("Microsoft.Sql/locations/refreshExternalGovernanceStatusOperationResults"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.Sql/locations/japaneast/refreshExternalGovernanceStatusOperationResults/9d9a794a-5cec-4f23-af70-d29511b522a4"), // Properties: &armsql.RefreshExternalGovernanceStatusOperationResultProperties{ // QueuedTime: to.Ptr("2/12/2022 8:33:27 PM"), // RequestID: to.Ptr("00000000-0000-0000-0000-000000000000"), // RequestType: to.Ptr("UpdatePurviewMetadata"), // 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 2023-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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"), IsIPv6Enabled: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), PublicNetworkAccess: to.Ptr(armsql.ServerPublicNetworkAccessFlagDisabled), 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"), // IsIPv6Enabled: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // 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.ServerPublicNetworkAccessFlagDisabled), // 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 2023-05-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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CheckNameAvailabilityServerAlreadyExists.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CheckNameAvailabilityServerAvailable.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CheckNameAvailabilityServerInvalid.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 2023-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 - 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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"), // IsIPv6Enabled: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // 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.ServerPublicNetworkAccessFlagEnabled), // RestrictOutboundNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // State: to.Ptr("Ready"), // Version: to.Ptr("12.0"), // WorkspaceFeature: to.Ptr(armsql.ServerWorkspaceFeatureConnected), // }, // }
Output:
Example (GetServerWithExpandAdministratorsActivedirectory) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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"), // }, // ExternalGovernanceStatus: to.Ptr(armsql.ExternalGovernanceStatusEnabled), // FullyQualifiedDomainName: to.Ptr("sqlcrudtest-4645.database.windows.net"), // IsIPv6Enabled: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // 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.ServerPublicNetworkAccessFlagEnabled), // RestrictOutboundNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // State: to.Ptr("Ready"), // Version: to.Ptr("12.0"), // WorkspaceFeature: to.Ptr(armsql.ServerWorkspaceFeatureConnected), // }, // }
Output:
func (*ServersClient) NewListByResourceGroupPager ¶
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 2023-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 - 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerListByResourceGroup.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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"), // ExternalGovernanceStatus: to.Ptr(armsql.ExternalGovernanceStatusEnabled), // FullyQualifiedDomainName: to.Ptr("sqlcrudtest-4645.database.windows.net"), // IsIPv6Enabled: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // 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.ServerPublicNetworkAccessFlagEnabled), // 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"), // ExternalGovernanceStatus: to.Ptr(armsql.ExternalGovernanceStatusEnabled), // FullyQualifiedDomainName: to.Ptr("sqlcrudtest-6661.database.windows.net"), // IsIPv6Enabled: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // 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.ServerPublicNetworkAccessFlagEnabled), // RestrictOutboundNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // State: to.Ptr("Ready"), // Version: to.Ptr("12.0"), // WorkspaceFeature: to.Ptr(armsql.ServerWorkspaceFeatureConnected), // }, // }}, // } }
Output:
Example (ListServersByResourceGroupWithExpandAdministratorsActivedirectory) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerListByResourceGroupWithExpandEqualsAdministrators.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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"), // }, // ExternalGovernanceStatus: to.Ptr(armsql.ExternalGovernanceStatusEnabled), // FullyQualifiedDomainName: to.Ptr("sqlcrudtest-4645.database.windows.net"), // IsIPv6Enabled: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // 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.ServerPublicNetworkAccessFlagEnabled), // 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"), // }, // ExternalGovernanceStatus: to.Ptr(armsql.ExternalGovernanceStatusEnabled), // FullyQualifiedDomainName: to.Ptr("sqlcrudtest-6661.database.windows.net"), // IsIPv6Enabled: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // 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.ServerPublicNetworkAccessFlagEnabled), // RestrictOutboundNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // State: to.Ptr("Ready"), // Version: to.Ptr("12.0"), // WorkspaceFeature: to.Ptr(armsql.ServerWorkspaceFeatureConnected), // }, // }}, // } }
Output:
func (*ServersClient) NewListPager ¶
func (client *ServersClient) NewListPager(options *ServersClientListOptions) *runtime.Pager[ServersClientListResponse]
NewListPager - Gets a list of all servers in the subscription.
Generated from API version 2023-05-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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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"), // ExternalGovernanceStatus: to.Ptr(armsql.ExternalGovernanceStatusEnabled), // FullyQualifiedDomainName: to.Ptr("sqlcrudtest-4645.database.windows.net"), // IsIPv6Enabled: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // 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.ServerPublicNetworkAccessFlagEnabled), // 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"), // ExternalGovernanceStatus: to.Ptr(armsql.ExternalGovernanceStatusEnabled), // FullyQualifiedDomainName: to.Ptr("sqlcrudtest-6661.database.windows.net"), // IsIPv6Enabled: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // 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.ServerPublicNetworkAccessFlagEnabled), // RestrictOutboundNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // State: to.Ptr("Ready"), // Version: to.Ptr("12.0"), // WorkspaceFeature: to.Ptr(armsql.ServerWorkspaceFeatureConnected), // }, // }}, // } }
Output:
Example (ListServersWithExpandAdministratorsActivedirectory) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ServerListWithExpandEqualsAdministrators.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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"), // }, // ExternalGovernanceStatus: to.Ptr(armsql.ExternalGovernanceStatusEnabled), // FullyQualifiedDomainName: to.Ptr("sqlcrudtest-4645.database.windows.net"), // IsIPv6Enabled: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // 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.ServerPublicNetworkAccessFlagEnabled), // 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"), // }, // ExternalGovernanceStatus: to.Ptr(armsql.ExternalGovernanceStatusEnabled), // FullyQualifiedDomainName: to.Ptr("sqlcrudtest-6661.database.windows.net"), // IsIPv6Enabled: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // 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.ServerPublicNetworkAccessFlagEnabled), // RestrictOutboundNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), // State: to.Ptr("Ready"), // Version: to.Ptr("12.0"), // WorkspaceFeature: to.Ptr(armsql.ServerWorkspaceFeatureConnected), // }, // }}, // } }
Output:
type ServersClientBeginCreateOrUpdateOptions ¶
type ServersClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServersClientBeginCreateOrUpdateOptions contains the optional parameters for the ServersClient.BeginCreateOrUpdate method.
type ServersClientBeginDeleteOptions ¶
type ServersClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServersClientBeginDeleteOptions contains the optional parameters for the ServersClient.BeginDelete method.
type ServersClientBeginImportDatabaseOptions ¶
type ServersClientBeginImportDatabaseOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServersClientBeginImportDatabaseOptions contains the optional parameters for the ServersClient.BeginImportDatabase method.
type ServersClientBeginRefreshStatusOptions ¶
type ServersClientBeginRefreshStatusOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServersClientBeginRefreshStatusOptions contains the optional parameters for the ServersClient.BeginRefreshStatus method.
type ServersClientBeginUpdateOptions ¶
type ServersClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServersClientBeginUpdateOptions contains the optional parameters for the ServersClient.BeginUpdate method.
type ServersClientCheckNameAvailabilityOptions ¶
type ServersClientCheckNameAvailabilityOptions struct { }
ServersClientCheckNameAvailabilityOptions contains the optional parameters for the ServersClient.CheckNameAvailability method.
type ServersClientCheckNameAvailabilityResponse ¶
type ServersClientCheckNameAvailabilityResponse struct { // The result of a name availability check. CheckNameAvailabilityResponse }
ServersClientCheckNameAvailabilityResponse contains the response from method ServersClient.CheckNameAvailability.
type ServersClientCreateOrUpdateResponse ¶
type ServersClientCreateOrUpdateResponse struct { // An Azure SQL Database server. Server }
ServersClientCreateOrUpdateResponse contains the response from method ServersClient.BeginCreateOrUpdate.
type ServersClientDeleteResponse ¶
type ServersClientDeleteResponse struct { }
ServersClientDeleteResponse contains the response from method ServersClient.BeginDelete.
type ServersClientGetOptions ¶
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 ¶
type ServersClientGetResponse struct { // An Azure SQL Database server. Server }
ServersClientGetResponse contains the response from method ServersClient.Get.
type ServersClientImportDatabaseResponse ¶
type ServersClientImportDatabaseResponse struct { // An ImportExport operation result resource. ImportExportOperationResult }
ServersClientImportDatabaseResponse contains the response from method ServersClient.BeginImportDatabase.
type ServersClientListByResourceGroupOptions ¶
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 ¶
type ServersClientListByResourceGroupResponse struct { // A list of servers. ServerListResult }
ServersClientListByResourceGroupResponse contains the response from method ServersClient.NewListByResourceGroupPager.
type ServersClientListOptions ¶
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 ¶
type ServersClientListResponse struct { // A list of servers. ServerListResult }
ServersClientListResponse contains the response from method ServersClient.NewListPager.
type ServersClientRefreshStatusResponse ¶
type ServersClientRefreshStatusResponse struct { // An RefreshExternalGovernanceStatus operation result resource. RefreshExternalGovernanceStatusOperationResult }
ServersClientRefreshStatusResponse contains the response from method ServersClient.BeginRefreshStatus.
type ServersClientUpdateResponse ¶
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 ¶
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 ¶
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 ¶
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 ¶
func (s ServiceObjectiveProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceObjectiveProperties.
func (*ServiceObjectiveProperties) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ServiceObjectiveGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ServiceObjectiveList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type ServiceObjectivesClientGetOptions struct { }
ServiceObjectivesClientGetOptions contains the optional parameters for the ServiceObjectivesClient.Get method.
type ServiceObjectivesClientGetResponse ¶
type ServiceObjectivesClientGetResponse struct { // Represents a database service objective. ServiceObjective }
ServiceObjectivesClientGetResponse contains the response from method ServiceObjectivesClient.Get.
type ServiceObjectivesClientListByServerOptions ¶
type ServiceObjectivesClientListByServerOptions struct { }
ServiceObjectivesClientListByServerOptions contains the optional parameters for the ServiceObjectivesClient.NewListByServerPager method.
type ServiceObjectivesClientListByServerResponse ¶
type ServiceObjectivesClientListByServerResponse struct { // Represents the response to a get database service objectives request. ServiceObjectiveListResult }
ServiceObjectivesClientListByServerResponse contains the response from method ServiceObjectivesClient.NewListByServerPager.
type ServicePrincipal ¶
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 ¶
func (s ServicePrincipal) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServicePrincipal.
func (*ServicePrincipal) UnmarshalJSON ¶
func (s *ServicePrincipal) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServicePrincipal.
type ServicePrincipalType ¶
type ServicePrincipalType string
ServicePrincipalType - Service principal type.
const ( ServicePrincipalTypeNone ServicePrincipalType = "None" ServicePrincipalTypeSystemAssigned ServicePrincipalType = "SystemAssigned" )
func PossibleServicePrincipalTypeValues ¶
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 ¶
func (s SloUsageMetric) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SloUsageMetric.
func (*SloUsageMetric) UnmarshalJSON ¶
func (s *SloUsageMetric) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SloUsageMetric.
type StartStopManagedInstanceSchedule ¶
type StartStopManagedInstanceSchedule struct { // Resource properties. Properties *StartStopManagedInstanceScheduleProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; System data of the scheduled resource. SystemData *SystemData // READ-ONLY; Resource type. Type *string }
StartStopManagedInstanceSchedule - Managed instance's Start/Stop schedule.
func (StartStopManagedInstanceSchedule) MarshalJSON ¶
func (s StartStopManagedInstanceSchedule) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StartStopManagedInstanceSchedule.
func (*StartStopManagedInstanceSchedule) UnmarshalJSON ¶
func (s *StartStopManagedInstanceSchedule) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StartStopManagedInstanceSchedule.
type StartStopManagedInstanceScheduleListResult ¶
type StartStopManagedInstanceScheduleListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*StartStopManagedInstanceSchedule }
StartStopManagedInstanceScheduleListResult - Managed instance's Start/Stop schedule list result.
func (StartStopManagedInstanceScheduleListResult) MarshalJSON ¶
func (s StartStopManagedInstanceScheduleListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StartStopManagedInstanceScheduleListResult.
func (*StartStopManagedInstanceScheduleListResult) UnmarshalJSON ¶
func (s *StartStopManagedInstanceScheduleListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StartStopManagedInstanceScheduleListResult.
type StartStopManagedInstanceScheduleProperties ¶
type StartStopManagedInstanceScheduleProperties struct { // REQUIRED; Schedule list. ScheduleList []*ScheduleItem // The description of the schedule. Description *string // The time zone of the schedule. TimeZoneID *string // READ-ONLY; Timestamp when the next action will be executed in the corresponding schedule time zone. NextExecutionTime *string // READ-ONLY; Next action to be executed (Start or Stop) NextRunAction *string }
StartStopManagedInstanceScheduleProperties - Properties of managed instance's Start/Stop schedule.
func (StartStopManagedInstanceScheduleProperties) MarshalJSON ¶
func (s StartStopManagedInstanceScheduleProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StartStopManagedInstanceScheduleProperties.
func (*StartStopManagedInstanceScheduleProperties) UnmarshalJSON ¶
func (s *StartStopManagedInstanceScheduleProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StartStopManagedInstanceScheduleProperties.
type StartStopManagedInstanceSchedulesClient ¶
type StartStopManagedInstanceSchedulesClient struct {
// contains filtered or unexported fields
}
StartStopManagedInstanceSchedulesClient contains the methods for the StartStopManagedInstanceSchedules group. Don't use this type directly, use NewStartStopManagedInstanceSchedulesClient() instead.
func NewStartStopManagedInstanceSchedulesClient ¶
func NewStartStopManagedInstanceSchedulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StartStopManagedInstanceSchedulesClient, error)
NewStartStopManagedInstanceSchedulesClient creates a new instance of StartStopManagedInstanceSchedulesClient 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 (*StartStopManagedInstanceSchedulesClient) CreateOrUpdate ¶
func (client *StartStopManagedInstanceSchedulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, startStopScheduleName StartStopScheduleName, parameters StartStopManagedInstanceSchedule, options *StartStopManagedInstanceSchedulesClientCreateOrUpdateOptions) (StartStopManagedInstanceSchedulesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates the managed instance's Start/Stop schedule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-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.
- managedInstanceName - The name of the managed instance.
- startStopScheduleName - Name of the managed instance Start/Stop schedule.
- parameters - The requested managed instance Start/Stop schedule.
- options - StartStopManagedInstanceSchedulesClientCreateOrUpdateOptions contains the optional parameters for the StartStopManagedInstanceSchedulesClient.CreateOrUpdate method.
Example (CreatesOrUpdatesTheManagedInstancesStartStopScheduleWithAllOptionalParametersSpecified) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/StartStopManagedInstanceScheduleCreateOrUpdateMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewStartStopManagedInstanceSchedulesClient().CreateOrUpdate(ctx, "schedulerg", "schedulemi", armsql.StartStopScheduleNameDefault, armsql.StartStopManagedInstanceSchedule{ Properties: &armsql.StartStopManagedInstanceScheduleProperties{ Description: to.Ptr("This is a schedule for our Dev/Test environment."), ScheduleList: []*armsql.ScheduleItem{ { StartDay: to.Ptr(armsql.DayOfWeekThursday), StartTime: to.Ptr("18:00"), StopDay: to.Ptr(armsql.DayOfWeekThursday), StopTime: to.Ptr("17:00"), }, { StartDay: to.Ptr(armsql.DayOfWeekThursday), StartTime: to.Ptr("15:00"), StopDay: to.Ptr(armsql.DayOfWeekThursday), StopTime: to.Ptr("14:00"), }}, TimeZoneID: to.Ptr("Central European 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.StartStopManagedInstanceSchedule = armsql.StartStopManagedInstanceSchedule{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/startStopSchedules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/schedulerg/providers/Microsoft.Sql/managedInstances/schedulemi/startStopSchedules/default"), // Properties: &armsql.StartStopManagedInstanceScheduleProperties{ // Description: to.Ptr("This is a schedule for our Dev/Test environment."), // NextExecutionTime: to.Ptr("2021-08-26T14:00:00"), // NextRunAction: to.Ptr("Stop"), // ScheduleList: []*armsql.ScheduleItem{ // { // StartDay: to.Ptr(armsql.DayOfWeekThursday), // StartTime: to.Ptr("06:00 PM"), // StopDay: to.Ptr(armsql.DayOfWeekThursday), // StopTime: to.Ptr("05:00 PM"), // }, // { // StartDay: to.Ptr(armsql.DayOfWeekThursday), // StartTime: to.Ptr("03:00 PM"), // StopDay: to.Ptr(armsql.DayOfWeekThursday), // StopTime: to.Ptr("02:00 PM"), // }}, // TimeZoneID: to.Ptr("Central European Standard Time"), // }, // SystemData: &armsql.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-26T04: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, "2021-08-27T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armsql.CreatedByTypeUser), // }, // }
Output:
Example (CreatesOrUpdatesTheManagedInstancesStartStopScheduleWithNoOptionalParametersSpecified) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/StartStopManagedInstanceScheduleCreateOrUpdateMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewStartStopManagedInstanceSchedulesClient().CreateOrUpdate(ctx, "schedulerg", "schedulemi", armsql.StartStopScheduleNameDefault, armsql.StartStopManagedInstanceSchedule{ Properties: &armsql.StartStopManagedInstanceScheduleProperties{ ScheduleList: []*armsql.ScheduleItem{ { StartDay: to.Ptr(armsql.DayOfWeekThursday), StartTime: to.Ptr("18:00"), StopDay: to.Ptr(armsql.DayOfWeekThursday), StopTime: to.Ptr("17:00"), }, { StartDay: to.Ptr(armsql.DayOfWeekThursday), StartTime: to.Ptr("15:00"), StopDay: to.Ptr(armsql.DayOfWeekThursday), StopTime: to.Ptr("14:00"), }}, }, }, 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.StartStopManagedInstanceSchedule = armsql.StartStopManagedInstanceSchedule{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/startStopSchedules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/schedulerg/providers/Microsoft.Sql/managedInstances/schedulemi/startStopSchedules/default"), // Properties: &armsql.StartStopManagedInstanceScheduleProperties{ // Description: to.Ptr(""), // NextExecutionTime: to.Ptr("2021-08-26T14:00:00"), // NextRunAction: to.Ptr("Stop"), // ScheduleList: []*armsql.ScheduleItem{ // { // StartDay: to.Ptr(armsql.DayOfWeekThursday), // StartTime: to.Ptr("06:00 PM"), // StopDay: to.Ptr(armsql.DayOfWeekThursday), // StopTime: to.Ptr("05:00 PM"), // }, // { // StartDay: to.Ptr(armsql.DayOfWeekThursday), // StartTime: to.Ptr("03:00 PM"), // StopDay: to.Ptr(armsql.DayOfWeekThursday), // StopTime: to.Ptr("02:00 PM"), // }}, // TimeZoneID: to.Ptr("UTC"), // }, // SystemData: &armsql.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-26T04: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, "2021-08-27T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armsql.CreatedByTypeUser), // }, // }
Output:
func (*StartStopManagedInstanceSchedulesClient) Delete ¶
func (client *StartStopManagedInstanceSchedulesClient) Delete(ctx context.Context, resourceGroupName string, managedInstanceName string, startStopScheduleName StartStopScheduleName, options *StartStopManagedInstanceSchedulesClientDeleteOptions) (StartStopManagedInstanceSchedulesClientDeleteResponse, error)
Delete - Deletes the managed instance's Start/Stop schedule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-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.
- managedInstanceName - The name of the managed instance.
- startStopScheduleName - Name of the managed instance Start/Stop schedule.
- options - StartStopManagedInstanceSchedulesClientDeleteOptions contains the optional parameters for the StartStopManagedInstanceSchedulesClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/StartStopManagedInstanceScheduleDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewStartStopManagedInstanceSchedulesClient().Delete(ctx, "schedulerg", "schedulemi", armsql.StartStopScheduleNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
func (*StartStopManagedInstanceSchedulesClient) Get ¶
func (client *StartStopManagedInstanceSchedulesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, startStopScheduleName StartStopScheduleName, options *StartStopManagedInstanceSchedulesClientGetOptions) (StartStopManagedInstanceSchedulesClientGetResponse, error)
Get - Gets the managed instance's Start/Stop schedule. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-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.
- managedInstanceName - The name of the managed instance.
- startStopScheduleName - Name of the managed instance Start/Stop schedule.
- options - StartStopManagedInstanceSchedulesClientGetOptions contains the optional parameters for the StartStopManagedInstanceSchedulesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/StartStopManagedInstanceScheduleGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewStartStopManagedInstanceSchedulesClient().Get(ctx, "schedulerg", "schedulemi", armsql.StartStopScheduleNameDefault, 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.StartStopManagedInstanceSchedule = armsql.StartStopManagedInstanceSchedule{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/startStopSchedules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/schedulerg/providers/Microsoft.Sql/managedInstances/schedulemi/startStopSchedules/default"), // Properties: &armsql.StartStopManagedInstanceScheduleProperties{ // Description: to.Ptr("This is a schedule for our Dev/Test environment."), // NextExecutionTime: to.Ptr("2021-08-26T14:00:00"), // NextRunAction: to.Ptr("Stop"), // ScheduleList: []*armsql.ScheduleItem{ // { // StartDay: to.Ptr(armsql.DayOfWeekThursday), // StartTime: to.Ptr("06:00 PM"), // StopDay: to.Ptr(armsql.DayOfWeekThursday), // StopTime: to.Ptr("05:00 PM"), // }, // { // StartDay: to.Ptr(armsql.DayOfWeekThursday), // StartTime: to.Ptr("03:00 PM"), // StopDay: to.Ptr(armsql.DayOfWeekThursday), // StopTime: to.Ptr("02:00 PM"), // }}, // TimeZoneID: to.Ptr("Central European Standard Time"), // }, // SystemData: &armsql.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-26T04: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, "2021-08-27T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armsql.CreatedByTypeUser), // }, // }
Output:
func (*StartStopManagedInstanceSchedulesClient) NewListByInstancePager ¶
func (client *StartStopManagedInstanceSchedulesClient) NewListByInstancePager(resourceGroupName string, managedInstanceName string, options *StartStopManagedInstanceSchedulesClientListByInstanceOptions) *runtime.Pager[StartStopManagedInstanceSchedulesClientListByInstanceResponse]
NewListByInstancePager - Lists the managed instance's Start/Stop schedules.
Generated from API version 2022-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.
- managedInstanceName - The name of the managed instance.
- options - StartStopManagedInstanceSchedulesClientListByInstanceOptions contains the optional parameters for the StartStopManagedInstanceSchedulesClient.NewListByInstancePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/StartStopManagedInstanceScheduleList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewStartStopManagedInstanceSchedulesClient().NewListByInstancePager("schedulerg", "schedulemi", 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.StartStopManagedInstanceScheduleListResult = armsql.StartStopManagedInstanceScheduleListResult{ // Value: []*armsql.StartStopManagedInstanceSchedule{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/managedInstances/startStopSchedules"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/schedulerg/providers/Microsoft.Sql/managedInstances/schedulemi/startStopSchedules"), // Properties: &armsql.StartStopManagedInstanceScheduleProperties{ // Description: to.Ptr("This is a schedule for our Dev/Test environment."), // NextExecutionTime: to.Ptr("2021-08-26T14:00:00"), // NextRunAction: to.Ptr("Stop"), // ScheduleList: []*armsql.ScheduleItem{ // { // StartDay: to.Ptr(armsql.DayOfWeekThursday), // StartTime: to.Ptr("06:00 PM"), // StopDay: to.Ptr(armsql.DayOfWeekThursday), // StopTime: to.Ptr("05:00 PM"), // }, // { // StartDay: to.Ptr(armsql.DayOfWeekThursday), // StartTime: to.Ptr("03:00 PM"), // StopDay: to.Ptr(armsql.DayOfWeekThursday), // StopTime: to.Ptr("02:00 PM"), // }}, // TimeZoneID: to.Ptr("Central European Standard Time"), // }, // SystemData: &armsql.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-26T04: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, "2021-08-27T04:41:33.937Z"); return t}()), // LastModifiedBy: to.Ptr("string"), // LastModifiedByType: to.Ptr(armsql.CreatedByTypeUser), // }, // }}, // } }
Output:
type StartStopManagedInstanceSchedulesClientCreateOrUpdateOptions ¶
type StartStopManagedInstanceSchedulesClientCreateOrUpdateOptions struct { }
StartStopManagedInstanceSchedulesClientCreateOrUpdateOptions contains the optional parameters for the StartStopManagedInstanceSchedulesClient.CreateOrUpdate method.
type StartStopManagedInstanceSchedulesClientCreateOrUpdateResponse ¶
type StartStopManagedInstanceSchedulesClientCreateOrUpdateResponse struct { // Managed instance's Start/Stop schedule. StartStopManagedInstanceSchedule }
StartStopManagedInstanceSchedulesClientCreateOrUpdateResponse contains the response from method StartStopManagedInstanceSchedulesClient.CreateOrUpdate.
type StartStopManagedInstanceSchedulesClientDeleteOptions ¶
type StartStopManagedInstanceSchedulesClientDeleteOptions struct { }
StartStopManagedInstanceSchedulesClientDeleteOptions contains the optional parameters for the StartStopManagedInstanceSchedulesClient.Delete method.
type StartStopManagedInstanceSchedulesClientDeleteResponse ¶
type StartStopManagedInstanceSchedulesClientDeleteResponse struct { }
StartStopManagedInstanceSchedulesClientDeleteResponse contains the response from method StartStopManagedInstanceSchedulesClient.Delete.
type StartStopManagedInstanceSchedulesClientGetOptions ¶
type StartStopManagedInstanceSchedulesClientGetOptions struct { }
StartStopManagedInstanceSchedulesClientGetOptions contains the optional parameters for the StartStopManagedInstanceSchedulesClient.Get method.
type StartStopManagedInstanceSchedulesClientGetResponse ¶
type StartStopManagedInstanceSchedulesClientGetResponse struct { // Managed instance's Start/Stop schedule. StartStopManagedInstanceSchedule }
StartStopManagedInstanceSchedulesClientGetResponse contains the response from method StartStopManagedInstanceSchedulesClient.Get.
type StartStopManagedInstanceSchedulesClientListByInstanceOptions ¶
type StartStopManagedInstanceSchedulesClientListByInstanceOptions struct { }
StartStopManagedInstanceSchedulesClientListByInstanceOptions contains the optional parameters for the StartStopManagedInstanceSchedulesClient.NewListByInstancePager method.
type StartStopManagedInstanceSchedulesClientListByInstanceResponse ¶
type StartStopManagedInstanceSchedulesClientListByInstanceResponse struct { // Managed instance's Start/Stop schedule list result. StartStopManagedInstanceScheduleListResult }
StartStopManagedInstanceSchedulesClientListByInstanceResponse contains the response from method StartStopManagedInstanceSchedulesClient.NewListByInstancePager.
type StartStopScheduleName ¶
type StartStopScheduleName string
const (
StartStopScheduleNameDefault StartStopScheduleName = "default"
)
func PossibleStartStopScheduleNameValues ¶
func PossibleStartStopScheduleNameValues() []StartStopScheduleName
PossibleStartStopScheduleNameValues returns the possible values for the StartStopScheduleName const type.
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 ¶
func (s StorageCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageCapability.
func (*StorageCapability) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
func (s SubscriptionUsageProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SubscriptionUsageProperties.
func (*SubscriptionUsageProperties) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SubscriptionUsageGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SubscriptionUsageListByLocation.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type SubscriptionUsagesClientGetOptions struct { }
SubscriptionUsagesClientGetOptions contains the optional parameters for the SubscriptionUsagesClient.Get method.
type SubscriptionUsagesClientGetResponse ¶
type SubscriptionUsagesClientGetResponse struct { // Usage Metric of a Subscription in a Location. SubscriptionUsage }
SubscriptionUsagesClientGetResponse contains the response from method SubscriptionUsagesClient.Get.
type SubscriptionUsagesClientListByLocationOptions ¶
type SubscriptionUsagesClientListByLocationOptions struct { }
SubscriptionUsagesClientListByLocationOptions contains the optional parameters for the SubscriptionUsagesClient.NewListByLocationPager method.
type SubscriptionUsagesClientListByLocationResponse ¶
type SubscriptionUsagesClientListByLocationResponse struct { // A list of subscription usage metrics in a location. SubscriptionUsageListResult }
SubscriptionUsagesClientListByLocationResponse contains the response from method SubscriptionUsagesClient.NewListByLocationPager.
type SynapseLinkWorkspace ¶
type SynapseLinkWorkspace struct { // Resource properties. Properties *SynapseLinkWorkspaceProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
SynapseLinkWorkspace - Synapse link workspace resource
func (SynapseLinkWorkspace) MarshalJSON ¶
func (s SynapseLinkWorkspace) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SynapseLinkWorkspace.
func (*SynapseLinkWorkspace) UnmarshalJSON ¶
func (s *SynapseLinkWorkspace) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SynapseLinkWorkspace.
type SynapseLinkWorkspaceInfoProperties ¶
type SynapseLinkWorkspaceInfoProperties struct { // Link connection name. LinkConnectionName *string // Synapse link workspace id. WorkspaceID *string }
SynapseLinkWorkspaceInfoProperties - Properties of a Synapse link workspaces
func (SynapseLinkWorkspaceInfoProperties) MarshalJSON ¶
func (s SynapseLinkWorkspaceInfoProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SynapseLinkWorkspaceInfoProperties.
func (*SynapseLinkWorkspaceInfoProperties) UnmarshalJSON ¶
func (s *SynapseLinkWorkspaceInfoProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SynapseLinkWorkspaceInfoProperties.
type SynapseLinkWorkspaceListResult ¶
type SynapseLinkWorkspaceListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*SynapseLinkWorkspace }
SynapseLinkWorkspaceListResult - A list of synapselink workspaces
func (SynapseLinkWorkspaceListResult) MarshalJSON ¶
func (s SynapseLinkWorkspaceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SynapseLinkWorkspaceListResult.
func (*SynapseLinkWorkspaceListResult) UnmarshalJSON ¶
func (s *SynapseLinkWorkspaceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SynapseLinkWorkspaceListResult.
type SynapseLinkWorkspaceProperties ¶
type SynapseLinkWorkspaceProperties struct { // List of all synapselink workspaces Workspaces []*SynapseLinkWorkspaceInfoProperties }
SynapseLinkWorkspaceProperties - Properties of a Synapse link workspaces
func (SynapseLinkWorkspaceProperties) MarshalJSON ¶
func (s SynapseLinkWorkspaceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SynapseLinkWorkspaceProperties.
func (*SynapseLinkWorkspaceProperties) UnmarshalJSON ¶
func (s *SynapseLinkWorkspaceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SynapseLinkWorkspaceProperties.
type SynapseLinkWorkspacesClient ¶
type SynapseLinkWorkspacesClient struct {
// contains filtered or unexported fields
}
SynapseLinkWorkspacesClient contains the methods for the SynapseLinkWorkspaces group. Don't use this type directly, use NewSynapseLinkWorkspacesClient() instead.
func NewSynapseLinkWorkspacesClient ¶
func NewSynapseLinkWorkspacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SynapseLinkWorkspacesClient, error)
NewSynapseLinkWorkspacesClient creates a new instance of SynapseLinkWorkspacesClient 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 (*SynapseLinkWorkspacesClient) NewListByDatabasePager ¶
func (client *SynapseLinkWorkspacesClient) NewListByDatabasePager(resourceGroupName string, serverName string, databaseName string, options *SynapseLinkWorkspacesClientListByDatabaseOptions) *runtime.Pager[SynapseLinkWorkspacesClientListByDatabaseResponse]
NewListByDatabasePager - Gets all synapselink workspaces for a database.
Generated from API version 2022-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 - SynapseLinkWorkspacesClientListByDatabaseOptions contains the optional parameters for the SynapseLinkWorkspacesClient.NewListByDatabasePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/SynapseLinkWorkspaceListByDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewSynapseLinkWorkspacesClient().NewListByDatabasePager("Default-SQL-SouthEastAsia", "testsvr", "dbSynapse", 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.SynapseLinkWorkspaceListResult = armsql.SynapseLinkWorkspaceListResult{ // Value: []*armsql.SynapseLinkWorkspace{ // { // Name: to.Ptr("current"), // Type: to.Ptr("Microsoft.Sql/servers/databases/linkWorkspaces"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbSynapse/linkWorkspaces/current"), // Properties: &armsql.SynapseLinkWorkspaceProperties{ // Workspaces: []*armsql.SynapseLinkWorkspaceInfoProperties{ // { // LinkConnectionName: to.Ptr("buildlink-cloud1"), // WorkspaceID: to.Ptr("/subcriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.Synapse/workspaces/workspace1"), // }, // { // LinkConnectionName: to.Ptr("buildlink-cloud2"), // WorkspaceID: to.Ptr("/subcriptions/00000000-1111-2222-3333-444444444444/resourcegroups/Default-SQL-SouthEastAsia/providers/Microsoft.Synapse/workspaces/workspace2"), // }}, // }, // }}, // } }
Output:
type SynapseLinkWorkspacesClientListByDatabaseOptions ¶
type SynapseLinkWorkspacesClientListByDatabaseOptions struct { }
SynapseLinkWorkspacesClientListByDatabaseOptions contains the optional parameters for the SynapseLinkWorkspacesClient.NewListByDatabasePager method.
type SynapseLinkWorkspacesClientListByDatabaseResponse ¶
type SynapseLinkWorkspacesClientListByDatabaseResponse struct { // A list of synapselink workspaces SynapseLinkWorkspaceListResult }
SynapseLinkWorkspacesClientListByDatabaseResponse contains the response from method SynapseLinkWorkspacesClient.NewListByDatabasePager.
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 ¶
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 ¶
func (s SyncAgentKeyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncAgentKeyProperties.
func (*SyncAgentKeyProperties) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
func (s SyncAgentLinkedDatabaseProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncAgentLinkedDatabaseProperties.
func (*SyncAgentLinkedDatabaseProperties) UnmarshalJSON ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncAgentCreate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncAgentUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncAgentDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncAgentGenerateKey.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncAgentGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncAgentListByServer.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncAgentGetLinkedDatabases.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type SyncAgentsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncAgentsClientBeginCreateOrUpdateOptions contains the optional parameters for the SyncAgentsClient.BeginCreateOrUpdate method.
type SyncAgentsClientBeginDeleteOptions ¶
type SyncAgentsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncAgentsClientBeginDeleteOptions contains the optional parameters for the SyncAgentsClient.BeginDelete method.
type SyncAgentsClientCreateOrUpdateResponse ¶
type SyncAgentsClientCreateOrUpdateResponse struct { // An Azure SQL Database sync agent. SyncAgent }
SyncAgentsClientCreateOrUpdateResponse contains the response from method SyncAgentsClient.BeginCreateOrUpdate.
type SyncAgentsClientDeleteResponse ¶
type SyncAgentsClientDeleteResponse struct { }
SyncAgentsClientDeleteResponse contains the response from method SyncAgentsClient.BeginDelete.
type SyncAgentsClientGenerateKeyOptions ¶
type SyncAgentsClientGenerateKeyOptions struct { }
SyncAgentsClientGenerateKeyOptions contains the optional parameters for the SyncAgentsClient.GenerateKey method.
type SyncAgentsClientGenerateKeyResponse ¶
type SyncAgentsClientGenerateKeyResponse struct { // Properties of an Azure SQL Database sync agent key. SyncAgentKeyProperties }
SyncAgentsClientGenerateKeyResponse contains the response from method SyncAgentsClient.GenerateKey.
type SyncAgentsClientGetOptions ¶
type SyncAgentsClientGetOptions struct { }
SyncAgentsClientGetOptions contains the optional parameters for the SyncAgentsClient.Get method.
type SyncAgentsClientGetResponse ¶
type SyncAgentsClientGetResponse struct { // An Azure SQL Database sync agent. SyncAgent }
SyncAgentsClientGetResponse contains the response from method SyncAgentsClient.Get.
type SyncAgentsClientListByServerOptions ¶
type SyncAgentsClientListByServerOptions struct { }
SyncAgentsClientListByServerOptions contains the optional parameters for the SyncAgentsClient.NewListByServerPager method.
type SyncAgentsClientListByServerResponse ¶
type SyncAgentsClientListByServerResponse struct { // A list of sync agents. SyncAgentListResult }
SyncAgentsClientListByServerResponse contains the response from method SyncAgentsClient.NewListByServerPager.
type SyncAgentsClientListLinkedDatabasesOptions ¶
type SyncAgentsClientListLinkedDatabasesOptions struct { }
SyncAgentsClientListLinkedDatabasesOptions contains the optional parameters for the SyncAgentsClient.NewListLinkedDatabasesPager method.
type SyncAgentsClientListLinkedDatabasesResponse ¶
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 ¶
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 ¶
func (s SyncDatabaseIDProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncDatabaseIDProperties.
func (*SyncDatabaseIDProperties) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
func (s SyncFullSchemaTableColumn) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncFullSchemaTableColumn.
func (*SyncFullSchemaTableColumn) UnmarshalJSON ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
func (s SyncGroupSchemaTableColumn) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncGroupSchemaTableColumn.
func (*SyncGroupSchemaTableColumn) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupCreate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupRefreshHubSchema.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupPatch.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupCancelSync.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupListByDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupGetHubSchema.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupGetLog.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupGetSyncDatabaseId.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupTriggerSync.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type SyncGroupsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the SyncGroupsClient.BeginCreateOrUpdate method.
type SyncGroupsClientBeginDeleteOptions ¶
type SyncGroupsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncGroupsClientBeginDeleteOptions contains the optional parameters for the SyncGroupsClient.BeginDelete method.
type SyncGroupsClientBeginRefreshHubSchemaOptions ¶
type SyncGroupsClientBeginRefreshHubSchemaOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncGroupsClientBeginRefreshHubSchemaOptions contains the optional parameters for the SyncGroupsClient.BeginRefreshHubSchema method.
type SyncGroupsClientBeginUpdateOptions ¶
type SyncGroupsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncGroupsClientBeginUpdateOptions contains the optional parameters for the SyncGroupsClient.BeginUpdate method.
type SyncGroupsClientCancelSyncOptions ¶
type SyncGroupsClientCancelSyncOptions struct { }
SyncGroupsClientCancelSyncOptions contains the optional parameters for the SyncGroupsClient.CancelSync method.
type SyncGroupsClientCancelSyncResponse ¶
type SyncGroupsClientCancelSyncResponse struct { }
SyncGroupsClientCancelSyncResponse contains the response from method SyncGroupsClient.CancelSync.
type SyncGroupsClientCreateOrUpdateResponse ¶
type SyncGroupsClientCreateOrUpdateResponse struct { // An Azure SQL Database sync group. SyncGroup }
SyncGroupsClientCreateOrUpdateResponse contains the response from method SyncGroupsClient.BeginCreateOrUpdate.
type SyncGroupsClientDeleteResponse ¶
type SyncGroupsClientDeleteResponse struct { }
SyncGroupsClientDeleteResponse contains the response from method SyncGroupsClient.BeginDelete.
type SyncGroupsClientGetOptions ¶
type SyncGroupsClientGetOptions struct { }
SyncGroupsClientGetOptions contains the optional parameters for the SyncGroupsClient.Get method.
type SyncGroupsClientGetResponse ¶
type SyncGroupsClientGetResponse struct { // An Azure SQL Database sync group. SyncGroup }
SyncGroupsClientGetResponse contains the response from method SyncGroupsClient.Get.
type SyncGroupsClientListByDatabaseOptions ¶
type SyncGroupsClientListByDatabaseOptions struct { }
SyncGroupsClientListByDatabaseOptions contains the optional parameters for the SyncGroupsClient.NewListByDatabasePager method.
type SyncGroupsClientListByDatabaseResponse ¶
type SyncGroupsClientListByDatabaseResponse struct { // A list of sync groups. SyncGroupListResult }
SyncGroupsClientListByDatabaseResponse contains the response from method SyncGroupsClient.NewListByDatabasePager.
type SyncGroupsClientListHubSchemasOptions ¶
type SyncGroupsClientListHubSchemasOptions struct { }
SyncGroupsClientListHubSchemasOptions contains the optional parameters for the SyncGroupsClient.NewListHubSchemasPager method.
type SyncGroupsClientListHubSchemasResponse ¶
type SyncGroupsClientListHubSchemasResponse struct { // A list of sync schema properties. SyncFullSchemaPropertiesListResult }
SyncGroupsClientListHubSchemasResponse contains the response from method SyncGroupsClient.NewListHubSchemasPager.
type SyncGroupsClientListLogsOptions ¶
type SyncGroupsClientListLogsOptions struct { // The continuation token for this operation. ContinuationToken *string }
SyncGroupsClientListLogsOptions contains the optional parameters for the SyncGroupsClient.NewListLogsPager method.
type SyncGroupsClientListLogsResponse ¶
type SyncGroupsClientListLogsResponse struct { // A list of sync group log properties. SyncGroupLogListResult }
SyncGroupsClientListLogsResponse contains the response from method SyncGroupsClient.NewListLogsPager.
type SyncGroupsClientListSyncDatabaseIDsOptions ¶
type SyncGroupsClientListSyncDatabaseIDsOptions struct { }
SyncGroupsClientListSyncDatabaseIDsOptions contains the optional parameters for the SyncGroupsClient.NewListSyncDatabaseIDsPager method.
type SyncGroupsClientListSyncDatabaseIDsResponse ¶
type SyncGroupsClientListSyncDatabaseIDsResponse struct { // A list of sync database ID properties. SyncDatabaseIDListResult }
SyncGroupsClientListSyncDatabaseIDsResponse contains the response from method SyncGroupsClient.NewListSyncDatabaseIDsPager.
type SyncGroupsClientRefreshHubSchemaResponse ¶
type SyncGroupsClientRefreshHubSchemaResponse struct { }
SyncGroupsClientRefreshHubSchemaResponse contains the response from method SyncGroupsClient.BeginRefreshHubSchema.
type SyncGroupsClientTriggerSyncOptions ¶
type SyncGroupsClientTriggerSyncOptions struct { }
SyncGroupsClientTriggerSyncOptions contains the optional parameters for the SyncGroupsClient.TriggerSync method.
type SyncGroupsClientTriggerSyncResponse ¶
type SyncGroupsClientTriggerSyncResponse struct { }
SyncGroupsClientTriggerSyncResponse contains the response from method SyncGroupsClient.TriggerSync.
type SyncGroupsClientUpdateResponse ¶
type SyncGroupsClientUpdateResponse struct { // An Azure SQL Database sync group. SyncGroup }
SyncGroupsClientUpdateResponse contains the response from method SyncGroupsClient.BeginUpdate.
type SyncGroupsType ¶
type SyncGroupsType string
const ( SyncGroupsTypeAll SyncGroupsType = "All" SyncGroupsTypeError SyncGroupsType = "Error" SyncGroupsTypeSuccess SyncGroupsType = "Success" SyncGroupsTypeWarning SyncGroupsType = "Warning" )
func PossibleSyncGroupsTypeValues ¶
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 ¶
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 ¶
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 ¶
func (s SyncMemberProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncMemberProperties.
func (*SyncMemberProperties) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberCreate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberRefreshSchema.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberPatch.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberListBySyncGroup.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberGetSchema.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type SyncMembersClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncMembersClientBeginCreateOrUpdateOptions contains the optional parameters for the SyncMembersClient.BeginCreateOrUpdate method.
type SyncMembersClientBeginDeleteOptions ¶
type SyncMembersClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncMembersClientBeginDeleteOptions contains the optional parameters for the SyncMembersClient.BeginDelete method.
type SyncMembersClientBeginRefreshMemberSchemaOptions ¶
type SyncMembersClientBeginRefreshMemberSchemaOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncMembersClientBeginRefreshMemberSchemaOptions contains the optional parameters for the SyncMembersClient.BeginRefreshMemberSchema method.
type SyncMembersClientBeginUpdateOptions ¶
type SyncMembersClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncMembersClientBeginUpdateOptions contains the optional parameters for the SyncMembersClient.BeginUpdate method.
type SyncMembersClientCreateOrUpdateResponse ¶
type SyncMembersClientCreateOrUpdateResponse struct { // An Azure SQL Database sync member. SyncMember }
SyncMembersClientCreateOrUpdateResponse contains the response from method SyncMembersClient.BeginCreateOrUpdate.
type SyncMembersClientDeleteResponse ¶
type SyncMembersClientDeleteResponse struct { }
SyncMembersClientDeleteResponse contains the response from method SyncMembersClient.BeginDelete.
type SyncMembersClientGetOptions ¶
type SyncMembersClientGetOptions struct { }
SyncMembersClientGetOptions contains the optional parameters for the SyncMembersClient.Get method.
type SyncMembersClientGetResponse ¶
type SyncMembersClientGetResponse struct { // An Azure SQL Database sync member. SyncMember }
SyncMembersClientGetResponse contains the response from method SyncMembersClient.Get.
type SyncMembersClientListBySyncGroupOptions ¶
type SyncMembersClientListBySyncGroupOptions struct { }
SyncMembersClientListBySyncGroupOptions contains the optional parameters for the SyncMembersClient.NewListBySyncGroupPager method.
type SyncMembersClientListBySyncGroupResponse ¶
type SyncMembersClientListBySyncGroupResponse struct { // A list of Azure SQL Database sync members. SyncMemberListResult }
SyncMembersClientListBySyncGroupResponse contains the response from method SyncMembersClient.NewListBySyncGroupPager.
type SyncMembersClientListMemberSchemasOptions ¶
type SyncMembersClientListMemberSchemasOptions struct { }
SyncMembersClientListMemberSchemasOptions contains the optional parameters for the SyncMembersClient.NewListMemberSchemasPager method.
type SyncMembersClientListMemberSchemasResponse ¶
type SyncMembersClientListMemberSchemasResponse struct { // A list of sync schema properties. SyncFullSchemaPropertiesListResult }
SyncMembersClientListMemberSchemasResponse contains the response from method SyncMembersClient.NewListMemberSchemasPager.
type SyncMembersClientRefreshMemberSchemaResponse ¶
type SyncMembersClientRefreshMemberSchemaResponse struct { }
SyncMembersClientRefreshMemberSchemaResponse contains the response from method SyncMembersClient.BeginRefreshMemberSchema.
type SyncMembersClientUpdateResponse ¶
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 ¶
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 ¶
func (t TdeCertificateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TdeCertificateProperties.
func (*TdeCertificateProperties) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SqlTdeCertificateCreate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type TdeCertificatesClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
TdeCertificatesClientBeginCreateOptions contains the optional parameters for the TdeCertificatesClient.BeginCreate method.
type TdeCertificatesClientCreateResponse ¶
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 ¶
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 ¶
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 ¶
func (t TimeZoneProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TimeZoneProperties.
func (*TimeZoneProperties) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceTimeZoneGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceTimeZoneListByLocation.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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) Nur-Sultan"), // 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 ¶
type TimeZonesClientGetOptions struct { }
TimeZonesClientGetOptions contains the optional parameters for the TimeZonesClient.Get method.
type TimeZonesClientGetResponse ¶
type TimeZonesClientGetResponse struct { // Time Zone. TimeZone }
TimeZonesClientGetResponse contains the response from method TimeZonesClient.Get.
type TimeZonesClientListByLocationOptions ¶
type TimeZonesClientListByLocationOptions struct { }
TimeZonesClientListByLocationOptions contains the optional parameters for the TimeZonesClient.NewListByLocationPager method.
type TimeZonesClientListByLocationResponse ¶
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 ¶
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 ¶
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 ¶
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 ¶
func (t TransparentDataEncryptionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TransparentDataEncryptionProperties.
func (*TransparentDataEncryptionProperties) UnmarshalJSON ¶
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) BeginCreateOrUpdate ¶
func (client *TransparentDataEncryptionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, tdeName TransparentDataEncryptionName, parameters LogicalDatabaseTransparentDataEncryption, options *TransparentDataEncryptionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[TransparentDataEncryptionsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Updates a logical database's transparent data encryption configuration. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-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.
- 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 - TransparentDataEncryptionsClientBeginCreateOrUpdateOptions contains the optional parameters for the TransparentDataEncryptionsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/TransparentDataEncryptionUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewTransparentDataEncryptionsClient().BeginCreateOrUpdate(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) } 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.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 2022-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/TransparentDataEncryptionGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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 2022-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/examples/TransparentDataEncryptionList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 TransparentDataEncryptionsClientBeginCreateOrUpdateOptions ¶
type TransparentDataEncryptionsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
TransparentDataEncryptionsClientBeginCreateOrUpdateOptions contains the optional parameters for the TransparentDataEncryptionsClient.BeginCreateOrUpdate method.
type TransparentDataEncryptionsClientCreateOrUpdateResponse ¶
type TransparentDataEncryptionsClientCreateOrUpdateResponse struct { // A logical database transparent data encryption state. LogicalDatabaseTransparentDataEncryption }
TransparentDataEncryptionsClientCreateOrUpdateResponse contains the response from method TransparentDataEncryptionsClient.BeginCreateOrUpdate.
type TransparentDataEncryptionsClientGetOptions ¶
type TransparentDataEncryptionsClientGetOptions struct { }
TransparentDataEncryptionsClientGetOptions contains the optional parameters for the TransparentDataEncryptionsClient.Get method.
type TransparentDataEncryptionsClientGetResponse ¶
type TransparentDataEncryptionsClientGetResponse struct { // A logical database transparent data encryption state. LogicalDatabaseTransparentDataEncryption }
TransparentDataEncryptionsClientGetResponse contains the response from method TransparentDataEncryptionsClient.Get.
type TransparentDataEncryptionsClientListByDatabaseOptions ¶
type TransparentDataEncryptionsClientListByDatabaseOptions struct { }
TransparentDataEncryptionsClientListByDatabaseOptions contains the optional parameters for the TransparentDataEncryptionsClient.NewListByDatabasePager method.
type TransparentDataEncryptionsClientListByDatabaseResponse ¶
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 ¶
func (u UpdateLongTermRetentionBackupParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateLongTermRetentionBackupParameters.
func (*UpdateLongTermRetentionBackupParameters) UnmarshalJSON ¶
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 ¶
func (u UpdateLongTermRetentionBackupParametersProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateLongTermRetentionBackupParametersProperties.
func (*UpdateLongTermRetentionBackupParametersProperties) UnmarshalJSON ¶
func (u *UpdateLongTermRetentionBackupParametersProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateLongTermRetentionBackupParametersProperties.
type UpdateVirtualClusterDNSServersOperation ¶
type UpdateVirtualClusterDNSServersOperation struct { // Resource properties. Properties *VirtualClusterDNSServersProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; Resource type. Type *string }
UpdateVirtualClusterDNSServersOperation - A refresh DNS servers operation.
func (UpdateVirtualClusterDNSServersOperation) MarshalJSON ¶
func (u UpdateVirtualClusterDNSServersOperation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpdateVirtualClusterDNSServersOperation.
func (*UpdateVirtualClusterDNSServersOperation) UnmarshalJSON ¶
func (u *UpdateVirtualClusterDNSServersOperation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UpdateVirtualClusterDNSServersOperation.
type UpsertManagedServerOperationParameters ¶
type UpsertManagedServerOperationParameters struct { Family *string StorageSizeInGB *int32 Tier *string VCores *int32 }
func (UpsertManagedServerOperationParameters) MarshalJSON ¶
func (u UpsertManagedServerOperationParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpsertManagedServerOperationParameters.
func (*UpsertManagedServerOperationParameters) UnmarshalJSON ¶
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 ¶
func (u UpsertManagedServerOperationStep) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UpsertManagedServerOperationStep.
func (*UpsertManagedServerOperationStep) UnmarshalJSON ¶
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 ¶
MarshalJSON implements the json.Marshaller interface for type Usage.
func (*Usage) UnmarshalJSON ¶
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 ¶
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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListInstancePoolUsage.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListInstancePoolUsageExpanded.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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 ¶
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 ¶
func (u UserIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UserIdentity.
func (*UserIdentity) UnmarshalJSON ¶
func (u *UserIdentity) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UserIdentity.
type VaRule ¶
type VaRule struct { // READ-ONLY; SQL Vulnerability Assessment benchmark references. BenchmarkReferences []*BenchmarkReference // READ-ONLY; SQL Vulnerability Assessment rule category. Category *string // READ-ONLY; SQL Vulnerability Assessment rule description. Description *string // READ-ONLY; SQL Vulnerability Assessment rule query details. QueryCheck *QueryCheck // READ-ONLY; SQL Vulnerability Assessment rule rationale. Rationale *string // READ-ONLY; SQL Vulnerability Assessment rule Id. RuleID *string // READ-ONLY; SQL Vulnerability Assessment rule type. RuleType *RuleType // READ-ONLY; SQL Vulnerability Assessment rule severity. Severity *RuleSeverity // READ-ONLY; SQL Vulnerability Assessment rule title. Title *string }
VaRule - SQL Vulnerability Assessment rule metadata details.
func (VaRule) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type VaRule.
func (*VaRule) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type VaRule.
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 ¶
func (v *VirtualCluster) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualCluster.
type VirtualClusterDNSServersProperties ¶
type VirtualClusterDNSServersProperties struct { // READ-ONLY; The status of the DNS refresh operation. Status *DNSRefreshOperationStatus }
VirtualClusterDNSServersProperties - The properties of dns servers on virtual cluster.
func (VirtualClusterDNSServersProperties) MarshalJSON ¶
func (v VirtualClusterDNSServersProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualClusterDNSServersProperties.
func (*VirtualClusterDNSServersProperties) UnmarshalJSON ¶
func (v *VirtualClusterDNSServersProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualClusterDNSServersProperties.
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 ¶
func (v *VirtualClusterListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualClusterListResult.
type VirtualClusterProperties ¶
type VirtualClusterProperties struct { // Virtual cluster version. Version *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 ¶
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 virtual cluster.
func (VirtualClusterUpdate) MarshalJSON ¶
func (v VirtualClusterUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualClusterUpdate.
func (*VirtualClusterUpdate) UnmarshalJSON ¶
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 2022-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/VirtualClusterDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 an existing virtual cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/VirtualClusterUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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{ Tags: map[string]*string{ "tkey": to.Ptr("tvalue1"), }, }, 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("japaneast"), // Tags: map[string]*string{ // "tkey": to.Ptr("tvalue3"), // }, // Properties: &armsql.VirtualClusterProperties{ // }, // }
Output:
func (*VirtualClustersClient) BeginUpdateDNSServers ¶
func (client *VirtualClustersClient) BeginUpdateDNSServers(ctx context.Context, resourceGroupName string, virtualClusterName string, options *VirtualClustersClientBeginUpdateDNSServersOptions) (*runtime.Poller[VirtualClustersClientUpdateDNSServersResponse], error)
BeginUpdateDNSServers - 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 2022-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.
- virtualClusterName - The name of the virtual cluster.
- options - VirtualClustersClientBeginUpdateDNSServersOptions contains the optional parameters for the VirtualClustersClient.BeginUpdateDNSServers method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/UpdateVirtualClusterDnsServers.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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().BeginUpdateDNSServers(ctx, "sqlcrudtest-7398", "VirtualCluster2b9a846b-2e37-43ef-a8e9-f2c6d645c1d7", 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.UpdateVirtualClusterDNSServersOperation = armsql.UpdateVirtualClusterDNSServersOperation{ // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/virtualClusters/VirtualCluster2b9a846b-2e37-43ef-a8e9-f2c6d645c1d7/updateManagedInstanceDnsServers"), // Properties: &armsql.VirtualClusterDNSServersProperties{ // Status: to.Ptr(armsql.DNSRefreshOperationStatusSucceeded), // }, // }
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 2022-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.
- 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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/VirtualClusterGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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-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-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-f769ed71-b3ad-491a-a9d5-26eeceaa6be2"), // Location: to.Ptr("japaneast"), // Tags: map[string]*string{ // "key": to.Ptr("value"), // }, // Properties: &armsql.VirtualClusterProperties{ // ChildResources: []*string{ // to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl"), // to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/mi")}, // SubnetID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/cltest"), // Version: to.Ptr("2.0"), // }, // }
Output:
func (*VirtualClustersClient) NewListByResourceGroupPager ¶
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 2022-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 - VirtualClustersClientListByResourceGroupOptions contains the optional parameters for the VirtualClustersClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/VirtualClusterListByResourceGroup.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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("VirtualClustercltest"), // Type: to.Ptr("Microsoft.Sql/virtualClusters"), // ID: to.Ptr("/subscriptions/65dc2520-d3b9-4d11-b638-f3c41f962550/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/VirtualClustercltest"), // Location: to.Ptr("japaneast"), // Properties: &armsql.VirtualClusterProperties{ // ChildResources: []*string{ // to.Ptr("/subscriptions/65dc2520-d3b9-4d11-b638-f3c41f962550/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl")}, // SubnetID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/cltest"), // Version: to.Ptr("1.0"), // }, // }, // { // Name: to.Ptr("vc2"), // Type: to.Ptr("Microsoft.Sql/virtualClusters"), // ID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc2"), // Location: to.Ptr("japaneast"), // Properties: &armsql.VirtualClusterProperties{ // ChildResources: []*string{ // }, // SubnetID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/cltest2"), // Version: to.Ptr("2.0"), // }, // }, // { // Name: to.Ptr("vc1"), // Type: to.Ptr("Microsoft.Sql/virtualClusters"), // ID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc1"), // Location: to.Ptr("japaneast"), // Tags: map[string]*string{ // "tkey": to.Ptr("tvalue3"), // }, // Properties: &armsql.VirtualClusterProperties{ // ChildResources: []*string{ // to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl"), // to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/mi")}, // SubnetID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/cltest"), // Version: to.Ptr("2.0"), // }, // }}, // } }
Output:
func (*VirtualClustersClient) NewListPager ¶
func (client *VirtualClustersClient) NewListPager(options *VirtualClustersClientListOptions) *runtime.Pager[VirtualClustersClientListResponse]
NewListPager - Gets a list of all virtualClusters in the subscription.
Generated from API version 2022-05-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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/examples/VirtualClusterList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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("VirtualClustercltest"), // Type: to.Ptr("Microsoft.Sql/virtualClusters"), // ID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/VirtualClustercltest"), // Location: to.Ptr("japaneast"), // Properties: &armsql.VirtualClusterProperties{ // ChildResources: []*string{ // to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl")}, // SubnetID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/cltest"), // Version: to.Ptr("1.0"), // }, // }, // { // Name: to.Ptr("vc2"), // Type: to.Ptr("Microsoft.Sql/virtualClusters"), // ID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc2"), // Location: to.Ptr("japaneast"), // Properties: &armsql.VirtualClusterProperties{ // ChildResources: []*string{ // }, // SubnetID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/cltest2"), // Version: to.Ptr("2.0"), // }, // }, // { // Name: to.Ptr("vc1"), // Type: to.Ptr("Microsoft.Sql/virtualClusters"), // ID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/virtualClusters/vc1"), // Location: to.Ptr("japaneast"), // Properties: &armsql.VirtualClusterProperties{ // ChildResources: []*string{ // to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testcl"), // to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/mi")}, // SubnetID: to.Ptr("/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/cltest"), // Version: to.Ptr("2.0"), // }, // }}, // } }
Output:
type VirtualClustersClientBeginDeleteOptions ¶
type VirtualClustersClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualClustersClientBeginDeleteOptions contains the optional parameters for the VirtualClustersClient.BeginDelete method.
type VirtualClustersClientBeginUpdateDNSServersOptions ¶
type VirtualClustersClientBeginUpdateDNSServersOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualClustersClientBeginUpdateDNSServersOptions contains the optional parameters for the VirtualClustersClient.BeginUpdateDNSServers method.
type VirtualClustersClientBeginUpdateOptions ¶
type VirtualClustersClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualClustersClientBeginUpdateOptions contains the optional parameters for the VirtualClustersClient.BeginUpdate method.
type VirtualClustersClientDeleteResponse ¶
type VirtualClustersClientDeleteResponse struct { }
VirtualClustersClientDeleteResponse contains the response from method VirtualClustersClient.BeginDelete.
type VirtualClustersClientGetOptions ¶
type VirtualClustersClientGetOptions struct { }
VirtualClustersClientGetOptions contains the optional parameters for the VirtualClustersClient.Get method.
type VirtualClustersClientGetResponse ¶
type VirtualClustersClientGetResponse struct { // An Azure SQL virtual cluster. VirtualCluster }
VirtualClustersClientGetResponse contains the response from method VirtualClustersClient.Get.
type VirtualClustersClientListByResourceGroupOptions ¶
type VirtualClustersClientListByResourceGroupOptions struct { }
VirtualClustersClientListByResourceGroupOptions contains the optional parameters for the VirtualClustersClient.NewListByResourceGroupPager method.
type VirtualClustersClientListByResourceGroupResponse ¶
type VirtualClustersClientListByResourceGroupResponse struct { // A list of virtual clusters. VirtualClusterListResult }
VirtualClustersClientListByResourceGroupResponse contains the response from method VirtualClustersClient.NewListByResourceGroupPager.
type VirtualClustersClientListOptions ¶
type VirtualClustersClientListOptions struct { }
VirtualClustersClientListOptions contains the optional parameters for the VirtualClustersClient.NewListPager method.
type VirtualClustersClientListResponse ¶
type VirtualClustersClientListResponse struct { // A list of virtual clusters. VirtualClusterListResult }
VirtualClustersClientListResponse contains the response from method VirtualClustersClient.NewListPager.
type VirtualClustersClientUpdateDNSServersResponse ¶
type VirtualClustersClientUpdateDNSServersResponse struct { // A refresh DNS servers operation. UpdateVirtualClusterDNSServersOperation }
VirtualClustersClientUpdateDNSServersResponse contains the response from method VirtualClustersClient.BeginUpdateDNSServers.
type VirtualClustersClientUpdateResponse ¶
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 ¶
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 ¶
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 ¶
func (v VirtualNetworkRuleProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualNetworkRuleProperties.
func (*VirtualNetworkRuleProperties) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualNetworkRulesCreateOrUpdate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualNetworkRulesDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualNetworkRulesGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualNetworkRulesList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type VirtualNetworkRulesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualNetworkRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkRulesClient.BeginCreateOrUpdate method.
type VirtualNetworkRulesClientBeginDeleteOptions ¶
type VirtualNetworkRulesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualNetworkRulesClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkRulesClient.BeginDelete method.
type VirtualNetworkRulesClientCreateOrUpdateResponse ¶
type VirtualNetworkRulesClientCreateOrUpdateResponse struct { // A virtual network rule. VirtualNetworkRule }
VirtualNetworkRulesClientCreateOrUpdateResponse contains the response from method VirtualNetworkRulesClient.BeginCreateOrUpdate.
type VirtualNetworkRulesClientDeleteResponse ¶
type VirtualNetworkRulesClientDeleteResponse struct { }
VirtualNetworkRulesClientDeleteResponse contains the response from method VirtualNetworkRulesClient.BeginDelete.
type VirtualNetworkRulesClientGetOptions ¶
type VirtualNetworkRulesClientGetOptions struct { }
VirtualNetworkRulesClientGetOptions contains the optional parameters for the VirtualNetworkRulesClient.Get method.
type VirtualNetworkRulesClientGetResponse ¶
type VirtualNetworkRulesClientGetResponse struct { // A virtual network rule. VirtualNetworkRule }
VirtualNetworkRulesClientGetResponse contains the response from method VirtualNetworkRulesClient.Get.
type VirtualNetworkRulesClientListByServerOptions ¶
type VirtualNetworkRulesClientListByServerOptions struct { }
VirtualNetworkRulesClientListByServerOptions contains the optional parameters for the VirtualNetworkRulesClient.NewListByServerPager method.
type VirtualNetworkRulesClientListByServerResponse ¶
type VirtualNetworkRulesClientListByServerResponse struct { // A list of virtual network rules. VirtualNetworkRuleListResult }
VirtualNetworkRulesClientListByServerResponse contains the response from method VirtualNetworkRulesClient.NewListByServerPager.
type VulnerabilityAssessment ¶
type VulnerabilityAssessment struct { // Resource properties. Properties *VulnerabilityAssessmentPolicyProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; SystemData of SqlVulnerabilityAssessmentResource. SystemData *SystemData // READ-ONLY; Resource type. Type *string }
VulnerabilityAssessment - A SQL Vulnerability Assessment.
func (VulnerabilityAssessment) MarshalJSON ¶
func (v VulnerabilityAssessment) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessment.
func (*VulnerabilityAssessment) UnmarshalJSON ¶
func (v *VulnerabilityAssessment) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessment.
type VulnerabilityAssessmentBaselineClient ¶
type VulnerabilityAssessmentBaselineClient struct {
// contains filtered or unexported fields
}
VulnerabilityAssessmentBaselineClient contains the methods for the SQLVulnerabilityAssessmentBaseline group. Don't use this type directly, use NewVulnerabilityAssessmentBaselineClient() instead.
func NewVulnerabilityAssessmentBaselineClient ¶
func NewVulnerabilityAssessmentBaselineClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VulnerabilityAssessmentBaselineClient, error)
NewVulnerabilityAssessmentBaselineClient creates a new instance of VulnerabilityAssessmentBaselineClient 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 (*VulnerabilityAssessmentBaselineClient) Get ¶
func (client *VulnerabilityAssessmentBaselineClient) Get(ctx context.Context, resourceGroupName string, serverName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, baselineName BaselineName, options *VulnerabilityAssessmentBaselineClientGetOptions) (VulnerabilityAssessmentBaselineClientGetResponse, error)
Get - Gets a list of database's sql vulnerability assessment rule baselines. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- options - VulnerabilityAssessmentBaselineClientGetOptions contains the optional parameters for the VulnerabilityAssessmentBaselineClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentBaselineGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewVulnerabilityAssessmentBaselineClient().Get(ctx, "vulnerabilityaseessmenttest-4711", "vulnerabilityaseessmenttest-6411", armsql.VulnerabilityAssessmentNameDefault, armsql.BaselineNameDefault, 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.DatabaseSQLVulnerabilityAssessmentBaselineSet = armsql.DatabaseSQLVulnerabilityAssessmentBaselineSet{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/Default/baselines/Default"), // Properties: &armsql.DatabaseSQLVulnerabilityAssessmentBaselineSetProperties{ // Results: map[string][][]*string{ // "VA1223": [][]*string{ // }, // "VA2060": [][]*string{ // []*string{ // to.Ptr("False")}}, // "VA2061": [][]*string{ // []*string{ // to.Ptr("True")}}, // "VA2062": [][]*string{ // }, // "VA2063": [][]*string{ // []*string{ // to.Ptr("AllowAll"), // to.Ptr("0.0.0.0"), // to.Ptr("255.255.255.255")}}, // "VA2064": [][]*string{ // }, // "VA2065": [][]*string{ // []*string{ // to.Ptr("AllowAll"), // to.Ptr("0.0.0.0"), // to.Ptr("255.255.255.255")}}, // "VA2107": [][]*string{ // }, // "VA2130": [][]*string{ // []*string{ // to.Ptr("Value1"), // to.Ptr("Value2")}}, // }, // }, // }
Output:
func (*VulnerabilityAssessmentBaselineClient) NewListBySQLVulnerabilityAssessmentPager ¶
func (client *VulnerabilityAssessmentBaselineClient) NewListBySQLVulnerabilityAssessmentPager(resourceGroupName string, serverName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *VulnerabilityAssessmentBaselineClientListBySQLVulnerabilityAssessmentOptions) *runtime.Pager[VulnerabilityAssessmentBaselineClientListBySQLVulnerabilityAssessmentResponse]
NewListBySQLVulnerabilityAssessmentPager - Gets a list of database's sql vulnerability assessment rule baselines.
Generated from API version 2022-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- options - VulnerabilityAssessmentBaselineClientListBySQLVulnerabilityAssessmentOptions contains the optional parameters for the VulnerabilityAssessmentBaselineClient.NewListBySQLVulnerabilityAssessmentPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewVulnerabilityAssessmentBaselineClient().NewListBySQLVulnerabilityAssessmentPager("vulnerabilityaseessmenttest-4711", "vulnerabilityaseessmenttest-6411", 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.DatabaseSQLVulnerabilityAssessmentBaselineSetListResult = armsql.DatabaseSQLVulnerabilityAssessmentBaselineSetListResult{ // Value: []*armsql.DatabaseSQLVulnerabilityAssessmentBaselineSet{ // { // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselines"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/Default/baselines/Default"), // Properties: &armsql.DatabaseSQLVulnerabilityAssessmentBaselineSetProperties{ // Results: map[string][][]*string{ // "VA1223": [][]*string{ // }, // "VA2060": [][]*string{ // []*string{ // to.Ptr("False")}}, // "VA2061": [][]*string{ // []*string{ // to.Ptr("True")}}, // "VA2062": [][]*string{ // }, // "VA2063": [][]*string{ // []*string{ // to.Ptr("AllowAll"), // to.Ptr("0.0.0.0"), // to.Ptr("255.255.255.255")}}, // "VA2064": [][]*string{ // }, // "VA2065": [][]*string{ // []*string{ // to.Ptr("AllowAll"), // to.Ptr("0.0.0.0"), // to.Ptr("255.255.255.255")}}, // "VA2107": [][]*string{ // }, // "VA2130": [][]*string{ // []*string{ // to.Ptr("Value1"), // to.Ptr("Value2")}}, // }, // }, // }}, // } }
Output:
type VulnerabilityAssessmentBaselineClientGetOptions ¶
type VulnerabilityAssessmentBaselineClientGetOptions struct { }
VulnerabilityAssessmentBaselineClientGetOptions contains the optional parameters for the VulnerabilityAssessmentBaselineClient.Get method.
type VulnerabilityAssessmentBaselineClientGetResponse ¶
type VulnerabilityAssessmentBaselineClientGetResponse struct { // A database sql vulnerability assessment baseline set. DatabaseSQLVulnerabilityAssessmentBaselineSet }
VulnerabilityAssessmentBaselineClientGetResponse contains the response from method VulnerabilityAssessmentBaselineClient.Get.
type VulnerabilityAssessmentBaselineClientListBySQLVulnerabilityAssessmentOptions ¶
type VulnerabilityAssessmentBaselineClientListBySQLVulnerabilityAssessmentOptions struct { }
VulnerabilityAssessmentBaselineClientListBySQLVulnerabilityAssessmentOptions contains the optional parameters for the VulnerabilityAssessmentBaselineClient.NewListBySQLVulnerabilityAssessmentPager method.
type VulnerabilityAssessmentBaselineClientListBySQLVulnerabilityAssessmentResponse ¶
type VulnerabilityAssessmentBaselineClientListBySQLVulnerabilityAssessmentResponse struct { // A list of SQL Vulnerability Assessments baseline set. DatabaseSQLVulnerabilityAssessmentBaselineSetListResult }
VulnerabilityAssessmentBaselineClientListBySQLVulnerabilityAssessmentResponse contains the response from method VulnerabilityAssessmentBaselineClient.NewListBySQLVulnerabilityAssessmentPager.
type VulnerabilityAssessmentBaselinesClient ¶
type VulnerabilityAssessmentBaselinesClient struct {
// contains filtered or unexported fields
}
VulnerabilityAssessmentBaselinesClient contains the methods for the SQLVulnerabilityAssessmentBaselines group. Don't use this type directly, use NewVulnerabilityAssessmentBaselinesClient() instead.
func NewVulnerabilityAssessmentBaselinesClient ¶
func NewVulnerabilityAssessmentBaselinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VulnerabilityAssessmentBaselinesClient, error)
NewVulnerabilityAssessmentBaselinesClient creates a new instance of VulnerabilityAssessmentBaselinesClient 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 (*VulnerabilityAssessmentBaselinesClient) CreateOrUpdate ¶
func (client *VulnerabilityAssessmentBaselinesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, baselineName BaselineName, parameters DatabaseSQLVulnerabilityAssessmentRuleBaselineListInput, options *VulnerabilityAssessmentBaselinesClientCreateOrUpdateOptions) (VulnerabilityAssessmentBaselinesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Add a database's vulnerability assessment rule baseline list. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- parameters - The requested rule baseline resource.
- options - VulnerabilityAssessmentBaselinesClientCreateOrUpdateOptions contains the optional parameters for the VulnerabilityAssessmentBaselinesClient.CreateOrUpdate method.
Example (AddADatabasesVulnerabilityAssessmentRuleBaselineFromTheLatestScanResult) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentBaselineAddLatest.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewVulnerabilityAssessmentBaselinesClient().CreateOrUpdate(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", armsql.VulnerabilityAssessmentNameDefault, armsql.BaselineNameDefault, armsql.DatabaseSQLVulnerabilityAssessmentRuleBaselineListInput{ Properties: &armsql.DatabaseSQLVulnerabilityAssessmentRuleBaselineListInputProperties{ LatestScan: to.Ptr(true), Results: map[string][][]*string{}, }, }, 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.DatabaseSQLVulnerabilityAssessmentBaselineSet = armsql.DatabaseSQLVulnerabilityAssessmentBaselineSet{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselines"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/Default/baselines/Default"), // Properties: &armsql.DatabaseSQLVulnerabilityAssessmentBaselineSetProperties{ // Results: map[string][][]*string{ // "VA1223": [][]*string{ // }, // "VA2060": [][]*string{ // []*string{ // to.Ptr("False")}}, // "VA2061": [][]*string{ // []*string{ // to.Ptr("True")}}, // "VA2062": [][]*string{ // }, // "VA2063": [][]*string{ // []*string{ // to.Ptr("AllowAll"), // to.Ptr("0.0.0.0"), // to.Ptr("255.255.255.255")}}, // "VA2064": [][]*string{ // }, // "VA2065": [][]*string{ // []*string{ // to.Ptr("AllowAll"), // to.Ptr("0.0.0.0"), // to.Ptr("255.255.255.255")}}, // "VA2107": [][]*string{ // }, // "VA2130": [][]*string{ // []*string{ // to.Ptr("Value1"), // to.Ptr("Value2")}}, // }, // }, // }
Output:
Example (AddADatabasesVulnerabilityAssessmentRuleBaselineList) ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentBaselineAdd.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewVulnerabilityAssessmentBaselinesClient().CreateOrUpdate(ctx, "vulnerabilityaseessmenttest-4711", "vulnerabilityaseessmenttest-6411", armsql.VulnerabilityAssessmentNameDefault, armsql.BaselineNameDefault, armsql.DatabaseSQLVulnerabilityAssessmentRuleBaselineListInput{ Properties: &armsql.DatabaseSQLVulnerabilityAssessmentRuleBaselineListInputProperties{ LatestScan: to.Ptr(false), Results: map[string][][]*string{ "VA2063": { { to.Ptr("AllowAll"), to.Ptr("0.0.0.0"), to.Ptr("255.255.255.255")}}, "VA2065": { { to.Ptr("AllowAll"), to.Ptr("0.0.0.0"), to.Ptr("255.255.255.255")}}, }, }, }, 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.DatabaseSQLVulnerabilityAssessmentBaselineSet = armsql.DatabaseSQLVulnerabilityAssessmentBaselineSet{ // Name: to.Ptr("Default"), // Type: to.Ptr("Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselines"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/Default/baselines/Default"), // Properties: &armsql.DatabaseSQLVulnerabilityAssessmentBaselineSetProperties{ // Results: map[string][][]*string{ // "VA2063": [][]*string{ // []*string{ // to.Ptr("AllowAll"), // to.Ptr("0.0.0.0"), // to.Ptr("255.255.255.255")}}, // "VA2065": [][]*string{ // []*string{ // to.Ptr("AllowAll"), // to.Ptr("0.0.0.0"), // to.Ptr("255.255.255.255")}}, // }, // }, // }
Output:
type VulnerabilityAssessmentBaselinesClientCreateOrUpdateOptions ¶
type VulnerabilityAssessmentBaselinesClientCreateOrUpdateOptions struct { }
VulnerabilityAssessmentBaselinesClientCreateOrUpdateOptions contains the optional parameters for the VulnerabilityAssessmentBaselinesClient.CreateOrUpdate method.
type VulnerabilityAssessmentBaselinesClientCreateOrUpdateResponse ¶
type VulnerabilityAssessmentBaselinesClientCreateOrUpdateResponse struct { // A database sql vulnerability assessment baseline set. DatabaseSQLVulnerabilityAssessmentBaselineSet }
VulnerabilityAssessmentBaselinesClientCreateOrUpdateResponse contains the response from method VulnerabilityAssessmentBaselinesClient.CreateOrUpdate.
type VulnerabilityAssessmentExecuteScanClient ¶
type VulnerabilityAssessmentExecuteScanClient struct {
// contains filtered or unexported fields
}
VulnerabilityAssessmentExecuteScanClient contains the methods for the SQLVulnerabilityAssessmentExecuteScan group. Don't use this type directly, use NewVulnerabilityAssessmentExecuteScanClient() instead.
func NewVulnerabilityAssessmentExecuteScanClient ¶
func NewVulnerabilityAssessmentExecuteScanClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VulnerabilityAssessmentExecuteScanClient, error)
NewVulnerabilityAssessmentExecuteScanClient creates a new instance of VulnerabilityAssessmentExecuteScanClient 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 (*VulnerabilityAssessmentExecuteScanClient) BeginExecute ¶
func (client *VulnerabilityAssessmentExecuteScanClient) BeginExecute(ctx context.Context, resourceGroupName string, serverName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *VulnerabilityAssessmentExecuteScanClientBeginExecuteOptions) (*runtime.Poller[VulnerabilityAssessmentExecuteScanClientExecuteResponse], error)
BeginExecute - Executes a Vulnerability Assessment database scan. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- options - VulnerabilityAssessmentExecuteScanClientBeginExecuteOptions contains the optional parameters for the VulnerabilityAssessmentExecuteScanClient.BeginExecute method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentScansExecute.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewVulnerabilityAssessmentExecuteScanClient().BeginExecute(ctx, "vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", armsql.VulnerabilityAssessmentNameDefault, 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 VulnerabilityAssessmentExecuteScanClientBeginExecuteOptions ¶
type VulnerabilityAssessmentExecuteScanClientBeginExecuteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VulnerabilityAssessmentExecuteScanClientBeginExecuteOptions contains the optional parameters for the VulnerabilityAssessmentExecuteScanClient.BeginExecute method.
type VulnerabilityAssessmentExecuteScanClientExecuteResponse ¶
type VulnerabilityAssessmentExecuteScanClientExecuteResponse struct { }
VulnerabilityAssessmentExecuteScanClientExecuteResponse contains the response from method VulnerabilityAssessmentExecuteScanClient.BeginExecute.
type VulnerabilityAssessmentListResult ¶
type VulnerabilityAssessmentListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*VulnerabilityAssessment }
VulnerabilityAssessmentListResult - A list of SQL Vulnerability Assessments.
func (VulnerabilityAssessmentListResult) MarshalJSON ¶
func (v VulnerabilityAssessmentListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentListResult.
func (*VulnerabilityAssessmentListResult) UnmarshalJSON ¶
func (v *VulnerabilityAssessmentListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentListResult.
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 VulnerabilityAssessmentPolicyProperties ¶
type VulnerabilityAssessmentPolicyProperties struct { // Specifies the state of the SQL Vulnerability Assessment, whether it is enabled or disabled or a state has not been applied // yet on the specific database or server. State *SQLVulnerabilityAssessmentState }
func (VulnerabilityAssessmentPolicyProperties) MarshalJSON ¶
func (v VulnerabilityAssessmentPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentPolicyProperties.
func (*VulnerabilityAssessmentPolicyProperties) UnmarshalJSON ¶
func (v *VulnerabilityAssessmentPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentPolicyProperties.
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 ¶
func (v *VulnerabilityAssessmentRecurringScansProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentRecurringScansProperties.
type VulnerabilityAssessmentRuleBaselineClient ¶
type VulnerabilityAssessmentRuleBaselineClient struct {
// contains filtered or unexported fields
}
VulnerabilityAssessmentRuleBaselineClient contains the methods for the SQLVulnerabilityAssessmentRuleBaseline group. Don't use this type directly, use NewVulnerabilityAssessmentRuleBaselineClient() instead.
func NewVulnerabilityAssessmentRuleBaselineClient ¶
func NewVulnerabilityAssessmentRuleBaselineClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VulnerabilityAssessmentRuleBaselineClient, error)
NewVulnerabilityAssessmentRuleBaselineClient creates a new instance of VulnerabilityAssessmentRuleBaselineClient 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 (*VulnerabilityAssessmentRuleBaselineClient) CreateOrUpdate ¶
func (client *VulnerabilityAssessmentRuleBaselineClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, baselineName BaselineName, ruleID string, parameters DatabaseSQLVulnerabilityAssessmentRuleBaselineInput, options *VulnerabilityAssessmentRuleBaselineClientCreateOrUpdateOptions) (VulnerabilityAssessmentRuleBaselineClientCreateOrUpdateResponse, 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 2022-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- ruleID - The vulnerability assessment rule ID.
- parameters - The requested rule baseline resource.
- options - VulnerabilityAssessmentRuleBaselineClientCreateOrUpdateOptions contains the optional parameters for the VulnerabilityAssessmentRuleBaselineClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineCreate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewVulnerabilityAssessmentRuleBaselineClient().CreateOrUpdate(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", armsql.VulnerabilityAssessmentNameDefault, armsql.BaselineNameDefault, "VA1001", armsql.DatabaseSQLVulnerabilityAssessmentRuleBaselineInput{ Properties: &armsql.DatabaseSQLVulnerabilityAssessmentRuleBaselineInputProperties{ LatestScan: to.Ptr(false), Results: [][]*string{ { to.Ptr("userA"), to.Ptr("SELECT")}, { to.Ptr("userB"), to.Ptr("SELECT")}, { to.Ptr("userC"), to.Ptr("SELECT")}}, }, }, 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.DatabaseSQLVulnerabilityAssessmentRuleBaseline = armsql.DatabaseSQLVulnerabilityAssessmentRuleBaseline{ // Name: to.Ptr("Scan123"), // Type: to.Ptr("Microsoft.Sql/servers/vulnerabilityAssessments/rules/baselines"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default/rules/VA1001"), // Properties: &armsql.DatabaseSQLVulnerabilityAssessmentRuleBaselineProperties{ // Results: [][]*string{ // []*string{ // to.Ptr("userA"), // to.Ptr("SELECT")}, // []*string{ // to.Ptr("userB"), // to.Ptr("SELECT")}, // []*string{ // to.Ptr("userC"), // to.Ptr("SELECT")}}, // }, // }
Output:
func (*VulnerabilityAssessmentRuleBaselineClient) Get ¶
func (client *VulnerabilityAssessmentRuleBaselineClient) Get(ctx context.Context, resourceGroupName string, serverName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, baselineName BaselineName, ruleID string, options *VulnerabilityAssessmentRuleBaselineClientGetOptions) (VulnerabilityAssessmentRuleBaselineClientGetResponse, error)
Get - Gets a system database's sql vulnerability assessment rule baseline. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- ruleID - The vulnerability assessment rule ID.
- options - VulnerabilityAssessmentRuleBaselineClientGetOptions contains the optional parameters for the VulnerabilityAssessmentRuleBaselineClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewVulnerabilityAssessmentRuleBaselineClient().Get(ctx, "vulnerabilityaseessmenttest-4711", "vulnerabilityaseessmenttest-6411", armsql.VulnerabilityAssessmentNameDefault, armsql.BaselineNameDefault, "VA1001", 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.DatabaseSQLVulnerabilityAssessmentRuleBaseline = armsql.DatabaseSQLVulnerabilityAssessmentRuleBaseline{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/sqlVulnerabilityAssessments/baselines"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1001"), // Properties: &armsql.DatabaseSQLVulnerabilityAssessmentRuleBaselineProperties{ // Results: [][]*string{ // []*string{ // to.Ptr("userA"), // to.Ptr("SELECT")}, // []*string{ // to.Ptr("userB"), // to.Ptr("SELECT")}, // []*string{ // to.Ptr("userC"), // to.Ptr("SELECT")}}, // }, // }
Output:
func (*VulnerabilityAssessmentRuleBaselineClient) NewListByBaselinePager ¶
func (client *VulnerabilityAssessmentRuleBaselineClient) NewListByBaselinePager(resourceGroupName string, serverName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, baselineName BaselineName, options *VulnerabilityAssessmentRuleBaselineClientListByBaselineOptions) *runtime.Pager[VulnerabilityAssessmentRuleBaselineClientListByBaselineResponse]
NewListByBaselinePager - Gets a system database's sql vulnerability assessment rule baseline.
Generated from API version 2022-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- options - VulnerabilityAssessmentRuleBaselineClientListByBaselineOptions contains the optional parameters for the VulnerabilityAssessmentRuleBaselineClient.NewListByBaselinePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineListByBaseline.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewVulnerabilityAssessmentRuleBaselineClient().NewListByBaselinePager("vulnerabilityaseessmenttest-4711", "vulnerabilityaseessmenttest-6411", armsql.VulnerabilityAssessmentNameDefault, armsql.BaselineNameDefault, 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.DatabaseSQLVulnerabilityAssessmentRuleBaselineListResult = armsql.DatabaseSQLVulnerabilityAssessmentRuleBaselineListResult{ // Value: []*armsql.DatabaseSQLVulnerabilityAssessmentRuleBaseline{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1001"), // Properties: &armsql.DatabaseSQLVulnerabilityAssessmentRuleBaselineProperties{ // Results: [][]*string{ // []*string{ // to.Ptr("userA"), // to.Ptr("SELECT")}, // []*string{ // to.Ptr("userB"), // to.Ptr("SELECT")}, // []*string{ // to.Ptr("userC"), // to.Ptr("SELECT")}}, // }, // }, // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/databases/sqlVulnerabilityAssessments/baselines"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default/baselines/default/rules/VA1002"), // Properties: &armsql.DatabaseSQLVulnerabilityAssessmentRuleBaselineProperties{ // Results: [][]*string{ // []*string{ // to.Ptr("userA"), // to.Ptr("SELECT")}, // []*string{ // to.Ptr("userB"), // to.Ptr("SELECT")}, // []*string{ // to.Ptr("userC"), // to.Ptr("SELECT")}}, // }, // }}, // } }
Output:
type VulnerabilityAssessmentRuleBaselineClientCreateOrUpdateOptions ¶
type VulnerabilityAssessmentRuleBaselineClientCreateOrUpdateOptions struct { }
VulnerabilityAssessmentRuleBaselineClientCreateOrUpdateOptions contains the optional parameters for the VulnerabilityAssessmentRuleBaselineClient.CreateOrUpdate method.
type VulnerabilityAssessmentRuleBaselineClientCreateOrUpdateResponse ¶
type VulnerabilityAssessmentRuleBaselineClientCreateOrUpdateResponse struct { // A database sql vulnerability assessment rule baseline. DatabaseSQLVulnerabilityAssessmentRuleBaseline }
VulnerabilityAssessmentRuleBaselineClientCreateOrUpdateResponse contains the response from method VulnerabilityAssessmentRuleBaselineClient.CreateOrUpdate.
type VulnerabilityAssessmentRuleBaselineClientGetOptions ¶
type VulnerabilityAssessmentRuleBaselineClientGetOptions struct { }
VulnerabilityAssessmentRuleBaselineClientGetOptions contains the optional parameters for the VulnerabilityAssessmentRuleBaselineClient.Get method.
type VulnerabilityAssessmentRuleBaselineClientGetResponse ¶
type VulnerabilityAssessmentRuleBaselineClientGetResponse struct { // A database sql vulnerability assessment rule baseline. DatabaseSQLVulnerabilityAssessmentRuleBaseline }
VulnerabilityAssessmentRuleBaselineClientGetResponse contains the response from method VulnerabilityAssessmentRuleBaselineClient.Get.
type VulnerabilityAssessmentRuleBaselineClientListByBaselineOptions ¶
type VulnerabilityAssessmentRuleBaselineClientListByBaselineOptions struct { }
VulnerabilityAssessmentRuleBaselineClientListByBaselineOptions contains the optional parameters for the VulnerabilityAssessmentRuleBaselineClient.NewListByBaselinePager method.
type VulnerabilityAssessmentRuleBaselineClientListByBaselineResponse ¶
type VulnerabilityAssessmentRuleBaselineClientListByBaselineResponse struct { // A list of SQL Vulnerability Assessments rule baseline. DatabaseSQLVulnerabilityAssessmentRuleBaselineListResult }
VulnerabilityAssessmentRuleBaselineClientListByBaselineResponse contains the response from method VulnerabilityAssessmentRuleBaselineClient.NewListByBaselinePager.
type VulnerabilityAssessmentRuleBaselinesClient ¶
type VulnerabilityAssessmentRuleBaselinesClient struct {
// contains filtered or unexported fields
}
VulnerabilityAssessmentRuleBaselinesClient contains the methods for the SQLVulnerabilityAssessmentRuleBaselines group. Don't use this type directly, use NewVulnerabilityAssessmentRuleBaselinesClient() instead.
func NewVulnerabilityAssessmentRuleBaselinesClient ¶
func NewVulnerabilityAssessmentRuleBaselinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VulnerabilityAssessmentRuleBaselinesClient, error)
NewVulnerabilityAssessmentRuleBaselinesClient creates a new instance of VulnerabilityAssessmentRuleBaselinesClient 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 (*VulnerabilityAssessmentRuleBaselinesClient) Delete ¶
func (client *VulnerabilityAssessmentRuleBaselinesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, baselineName BaselineName, ruleID string, options *VulnerabilityAssessmentRuleBaselinesClientDeleteOptions) (VulnerabilityAssessmentRuleBaselinesClientDeleteResponse, error)
Delete - Removes the database's vulnerability assessment rule baseline. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- ruleID - The vulnerability assessment rule ID.
- options - VulnerabilityAssessmentRuleBaselinesClientDeleteOptions contains the optional parameters for the VulnerabilityAssessmentRuleBaselinesClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewVulnerabilityAssessmentRuleBaselinesClient().Delete(ctx, "vulnerabilityaseessmenttest-4711", "vulnerabilityaseessmenttest-6411", armsql.VulnerabilityAssessmentNameDefault, armsql.BaselineNameDefault, "VA1001", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
type VulnerabilityAssessmentRuleBaselinesClientDeleteOptions ¶
type VulnerabilityAssessmentRuleBaselinesClientDeleteOptions struct { }
VulnerabilityAssessmentRuleBaselinesClientDeleteOptions contains the optional parameters for the VulnerabilityAssessmentRuleBaselinesClient.Delete method.
type VulnerabilityAssessmentRuleBaselinesClientDeleteResponse ¶
type VulnerabilityAssessmentRuleBaselinesClientDeleteResponse struct { }
VulnerabilityAssessmentRuleBaselinesClientDeleteResponse contains the response from method VulnerabilityAssessmentRuleBaselinesClient.Delete.
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 ¶
func (v VulnerabilityAssessmentScanError) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentScanError.
func (*VulnerabilityAssessmentScanError) UnmarshalJSON ¶
func (v *VulnerabilityAssessmentScanError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentScanError.
type VulnerabilityAssessmentScanForSQLError ¶
type VulnerabilityAssessmentScanForSQLError struct { // READ-ONLY; The error code. Code *string // READ-ONLY; The error message. Message *string }
VulnerabilityAssessmentScanForSQLError - Properties of a vulnerability assessment scan error.
func (VulnerabilityAssessmentScanForSQLError) MarshalJSON ¶
func (v VulnerabilityAssessmentScanForSQLError) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentScanForSQLError.
func (*VulnerabilityAssessmentScanForSQLError) UnmarshalJSON ¶
func (v *VulnerabilityAssessmentScanForSQLError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentScanForSQLError.
type VulnerabilityAssessmentScanListResult ¶
type VulnerabilityAssessmentScanListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*VulnerabilityAssessmentScanResults }
VulnerabilityAssessmentScanListResult - A list of vulnerability assessment scan results.
func (VulnerabilityAssessmentScanListResult) MarshalJSON ¶
func (v VulnerabilityAssessmentScanListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentScanListResult.
func (*VulnerabilityAssessmentScanListResult) UnmarshalJSON ¶
func (v *VulnerabilityAssessmentScanListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentScanListResult.
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 ¶
func (v *VulnerabilityAssessmentScanRecord) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentScanRecord.
type VulnerabilityAssessmentScanRecordForSQL ¶
type VulnerabilityAssessmentScanRecordForSQL struct { // Resource properties. Properties *VulnerabilityAssessmentScanRecordForSQLProperties // READ-ONLY; Resource ID. ID *string // READ-ONLY; Resource name. Name *string // READ-ONLY; SystemData of SqlVulnerabilityAssessmentScanRecordResource. SystemData *SystemData // READ-ONLY; Resource type. Type *string }
VulnerabilityAssessmentScanRecordForSQL - A vulnerability assessment scan record.
func (VulnerabilityAssessmentScanRecordForSQL) MarshalJSON ¶
func (v VulnerabilityAssessmentScanRecordForSQL) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentScanRecordForSQL.
func (*VulnerabilityAssessmentScanRecordForSQL) UnmarshalJSON ¶
func (v *VulnerabilityAssessmentScanRecordForSQL) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentScanRecordForSQL.
type VulnerabilityAssessmentScanRecordForSQLListResult ¶
type VulnerabilityAssessmentScanRecordForSQLListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*VulnerabilityAssessmentScanRecordForSQL }
VulnerabilityAssessmentScanRecordForSQLListResult - A list of vulnerability assessment scan records.
func (VulnerabilityAssessmentScanRecordForSQLListResult) MarshalJSON ¶
func (v VulnerabilityAssessmentScanRecordForSQLListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentScanRecordForSQLListResult.
func (*VulnerabilityAssessmentScanRecordForSQLListResult) UnmarshalJSON ¶
func (v *VulnerabilityAssessmentScanRecordForSQLListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentScanRecordForSQLListResult.
type VulnerabilityAssessmentScanRecordForSQLProperties ¶
type VulnerabilityAssessmentScanRecordForSQLProperties struct { // READ-ONLY; The database name. Database *string // READ-ONLY; The scan end time (UTC). EndTime *time.Time // READ-ONLY; The scan errors. Errors []*VulnerabilityAssessmentScanForSQLError // READ-ONLY; The number of failed rules with high severity. HighSeverityFailedRulesCount *int32 // READ-ONLY; Baseline created for this database, and has one or more rules. IsBaselineApplied *bool // READ-ONLY; The last scan time. LastScanTime *time.Time // READ-ONLY; The number of failed rules with low severity. LowSeverityFailedRulesCount *int32 // READ-ONLY; The number of failed rules with medium severity. MediumSeverityFailedRulesCount *int32 // READ-ONLY; The SQL version. SQLVersion *string // READ-ONLY; The scan ID. ScanID *string // READ-ONLY; The server name. Server *string // READ-ONLY; The scan start time (UTC). StartTime *time.Time // READ-ONLY; The scan status. State *VulnerabilityAssessmentScanState // READ-ONLY; The number of total failed rules. TotalFailedRulesCount *int32 // READ-ONLY; The number of total passed rules. TotalPassedRulesCount *int32 // READ-ONLY; The number of total rules assessed. TotalRulesCount *int32 // READ-ONLY; The scan trigger type. TriggerType *VulnerabilityAssessmentScanTriggerType }
VulnerabilityAssessmentScanRecordForSQLProperties - Properties of a vulnerability assessment scan record.
func (VulnerabilityAssessmentScanRecordForSQLProperties) MarshalJSON ¶
func (v VulnerabilityAssessmentScanRecordForSQLProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentScanRecordForSQLProperties.
func (*VulnerabilityAssessmentScanRecordForSQLProperties) UnmarshalJSON ¶
func (v *VulnerabilityAssessmentScanRecordForSQLProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentScanRecordForSQLProperties.
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 ¶
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 VulnerabilityAssessmentScanResultClient ¶
type VulnerabilityAssessmentScanResultClient struct {
// contains filtered or unexported fields
}
VulnerabilityAssessmentScanResultClient contains the methods for the SQLVulnerabilityAssessmentScanResult group. Don't use this type directly, use NewVulnerabilityAssessmentScanResultClient() instead.
func NewVulnerabilityAssessmentScanResultClient ¶
func NewVulnerabilityAssessmentScanResultClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VulnerabilityAssessmentScanResultClient, error)
NewVulnerabilityAssessmentScanResultClient creates a new instance of VulnerabilityAssessmentScanResultClient 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 (*VulnerabilityAssessmentScanResultClient) Get ¶
func (client *VulnerabilityAssessmentScanResultClient) Get(ctx context.Context, resourceGroupName string, serverName string, vulnerabilityAssessmentName SQLVulnerabilityAssessmentName, scanID string, scanResultID string, options *VulnerabilityAssessmentScanResultClientGetOptions) (VulnerabilityAssessmentScanResultClientGetResponse, 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 2022-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- vulnerabilityAssessmentName - The name of the SQL Vulnerability Assessment.
- scanID - The scan id of the SQL Vulnerability Assessment scan to retrieve result from.
- scanResultID - The scan result id of the specific result to retrieve.
- options - VulnerabilityAssessmentScanResultClientGetOptions contains the optional parameters for the VulnerabilityAssessmentScanResultClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentScansResults.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewVulnerabilityAssessmentScanResultClient().Get(ctx, "vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", armsql.SQLVulnerabilityAssessmentNameDefault, "scanId1", "VA1234", 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.VulnerabilityAssessmentScanResults = armsql.VulnerabilityAssessmentScanResults{ // Name: to.Ptr("VA1234"), // Type: to.Ptr("Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans/scanResults"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/Default/scans/scanId1/scanResults/VA1234"), // Properties: &armsql.VulnerabilityAssessmentScanResultProperties{ // IsTrimmed: to.Ptr(false), // QueryResults: [][]*string{ // []*string{ // to.Ptr("a1"), // to.Ptr("a2"), // to.Ptr("a3")}, // []*string{ // to.Ptr("b1"), // to.Ptr("b2"), // to.Ptr("b3")}}, // Remediation: &armsql.Remediation{ // Description: to.Ptr("Remove users"), // Automated: to.Ptr(false), // Scripts: []*string{ // to.Ptr("drop user a"), // to.Ptr("drop user b")}, // }, // RuleID: to.Ptr("VA1234"), // RuleMetadata: &armsql.VaRule{ // Description: to.Ptr("This is an example check"), // BenchmarkReferences: []*armsql.BenchmarkReference{ // { // Benchmark: to.Ptr("fedramp"), // Reference: to.Ptr("v1"), // }}, // Category: to.Ptr("information"), // QueryCheck: &armsql.QueryCheck{ // ColumnNames: []*string{ // to.Ptr("col1"), // to.Ptr("col2"), // to.Ptr("col3")}, // ExpectedResult: [][]*string{ // }, // Query: to.Ptr("Select a1,a2, a3"), // }, // Rationale: to.Ptr("This is important"), // RuleID: to.Ptr("VA1234"), // RuleType: to.Ptr(armsql.RuleTypeNegativeList), // Severity: to.Ptr(armsql.RuleSeverityInformational), // Title: to.Ptr("This is the title"), // }, // Status: to.Ptr(armsql.RuleStatusNonFinding), // }, // }
Output:
func (*VulnerabilityAssessmentScanResultClient) NewListByScanPager ¶
func (client *VulnerabilityAssessmentScanResultClient) NewListByScanPager(resourceGroupName string, serverName string, vulnerabilityAssessmentName SQLVulnerabilityAssessmentName, scanID string, options *VulnerabilityAssessmentScanResultClientListByScanOptions) *runtime.Pager[VulnerabilityAssessmentScanResultClientListByScanResponse]
NewListByScanPager - Gets a vulnerability assessment scan record of a database.
Generated from API version 2022-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- vulnerabilityAssessmentName - The name of the SQL Vulnerability Assessment.
- scanID - The scan id of the SQL Vulnerability Assessment scan to retrieve result from.
- options - VulnerabilityAssessmentScanResultClientListByScanOptions contains the optional parameters for the VulnerabilityAssessmentScanResultClient.NewListByScanPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentListScansResults.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewVulnerabilityAssessmentScanResultClient().NewListByScanPager("vulnerabilityassessmenttest-4711", "testsvr", armsql.SQLVulnerabilityAssessmentNameDefault, "scanId1", 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.VulnerabilityAssessmentScanListResult = armsql.VulnerabilityAssessmentScanListResult{ // Value: []*armsql.VulnerabilityAssessmentScanResults{ // { // Name: to.Ptr("VA1234"), // Type: to.Ptr("Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans/scanResults"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/testsvr/sqlVulnerabilityAssessments/Default/scans/scanId1/scanResults/VA1234"), // Properties: &armsql.VulnerabilityAssessmentScanResultProperties{ // IsTrimmed: to.Ptr(false), // QueryResults: [][]*string{ // []*string{ // to.Ptr("a1"), // to.Ptr("a2"), // to.Ptr("a3")}, // []*string{ // to.Ptr("b1"), // to.Ptr("b2"), // to.Ptr("b3")}}, // Remediation: &armsql.Remediation{ // Description: to.Ptr("Remove users"), // Automated: to.Ptr(false), // Scripts: []*string{ // to.Ptr("drop user a"), // to.Ptr("drop user b")}, // }, // RuleID: to.Ptr("VA1234"), // RuleMetadata: &armsql.VaRule{ // Description: to.Ptr("This is an example check"), // BenchmarkReferences: []*armsql.BenchmarkReference{ // { // Benchmark: to.Ptr("fedramp"), // Reference: to.Ptr("v1"), // }}, // Category: to.Ptr("information"), // QueryCheck: &armsql.QueryCheck{ // ColumnNames: []*string{ // to.Ptr("col1"), // to.Ptr("col2"), // to.Ptr("col3")}, // ExpectedResult: [][]*string{ // }, // Query: to.Ptr("Select a1,a2, a3"), // }, // Rationale: to.Ptr("This is important"), // RuleID: to.Ptr("VA1234"), // RuleType: to.Ptr(armsql.RuleTypeNegativeList), // Severity: to.Ptr(armsql.RuleSeverityInformational), // Title: to.Ptr("This is the title"), // }, // Status: to.Ptr(armsql.RuleStatusNonFinding), // }, // }, // { // Name: to.Ptr("VA2341"), // Type: to.Ptr("Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans/scanResults"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/testsvr/sqlVulnerabilityAssessments/Default/scans/scanId1/scanResults/VA2341"), // Properties: &armsql.VulnerabilityAssessmentScanResultProperties{ // IsTrimmed: to.Ptr(false), // QueryResults: [][]*string{ // []*string{ // to.Ptr("a1"), // to.Ptr("a2"), // to.Ptr("a3")}, // []*string{ // to.Ptr("b1"), // to.Ptr("b2"), // to.Ptr("b3")}}, // Remediation: &armsql.Remediation{ // Description: to.Ptr("Remove users"), // Automated: to.Ptr(false), // Scripts: []*string{ // to.Ptr("drop user a"), // to.Ptr("drop user b")}, // }, // RuleID: to.Ptr("VA2341"), // RuleMetadata: &armsql.VaRule{ // Description: to.Ptr("This is an example check"), // BenchmarkReferences: []*armsql.BenchmarkReference{ // { // Benchmark: to.Ptr("fedramp"), // Reference: to.Ptr("v1"), // }}, // Category: to.Ptr("information"), // QueryCheck: &armsql.QueryCheck{ // ColumnNames: []*string{ // to.Ptr("col1"), // to.Ptr("col2"), // to.Ptr("col3")}, // ExpectedResult: [][]*string{ // }, // Query: to.Ptr("Select a1,a2, a3"), // }, // Rationale: to.Ptr("This is important"), // RuleID: to.Ptr("VA1234"), // RuleType: to.Ptr(armsql.RuleTypeNegativeList), // Severity: to.Ptr(armsql.RuleSeverityInformational), // Title: to.Ptr("This is the title"), // }, // Status: to.Ptr(armsql.RuleStatusNonFinding), // }, // }}, // } }
Output:
type VulnerabilityAssessmentScanResultClientGetOptions ¶
type VulnerabilityAssessmentScanResultClientGetOptions struct { }
VulnerabilityAssessmentScanResultClientGetOptions contains the optional parameters for the VulnerabilityAssessmentScanResultClient.Get method.
type VulnerabilityAssessmentScanResultClientGetResponse ¶
type VulnerabilityAssessmentScanResultClientGetResponse struct {
VulnerabilityAssessmentScanResults
}
VulnerabilityAssessmentScanResultClientGetResponse contains the response from method VulnerabilityAssessmentScanResultClient.Get.
type VulnerabilityAssessmentScanResultClientListByScanOptions ¶
type VulnerabilityAssessmentScanResultClientListByScanOptions struct { }
VulnerabilityAssessmentScanResultClientListByScanOptions contains the optional parameters for the VulnerabilityAssessmentScanResultClient.NewListByScanPager method.
type VulnerabilityAssessmentScanResultClientListByScanResponse ¶
type VulnerabilityAssessmentScanResultClientListByScanResponse struct { // A list of vulnerability assessment scan results. VulnerabilityAssessmentScanListResult }
VulnerabilityAssessmentScanResultClientListByScanResponse contains the response from method VulnerabilityAssessmentScanResultClient.NewListByScanPager.
type VulnerabilityAssessmentScanResultProperties ¶
type VulnerabilityAssessmentScanResultProperties struct { // READ-ONLY; SQL Vulnerability Assessment rule result adjusted with baseline. BaselineAdjustedResult *BaselineAdjustedResult // READ-ONLY; SQL Vulnerability Assessment error message. ErrorMessage *string // READ-ONLY; SQL Vulnerability Assessment is the query results trimmed. IsTrimmed *bool // READ-ONLY; SQL Vulnerability Assessment query results that was run. QueryResults [][]*string // READ-ONLY; SQL Vulnerability Assessment the remediation details. Remediation *Remediation // READ-ONLY; SQL Vulnerability Assessment rule Id. RuleID *string // READ-ONLY; SQL Vulnerability Assessment rule metadata. RuleMetadata *VaRule // READ-ONLY; SQL Vulnerability Assessment rule result status. Status *RuleStatus }
VulnerabilityAssessmentScanResultProperties - SQL Vulnerability Assessment scan result properties for a single rule.
func (VulnerabilityAssessmentScanResultProperties) MarshalJSON ¶
func (v VulnerabilityAssessmentScanResultProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentScanResultProperties.
func (*VulnerabilityAssessmentScanResultProperties) UnmarshalJSON ¶
func (v *VulnerabilityAssessmentScanResultProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentScanResultProperties.
type VulnerabilityAssessmentScanResults ¶
type VulnerabilityAssessmentScanResults struct { // Resource properties. Properties *VulnerabilityAssessmentScanResultProperties // 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 }
func (VulnerabilityAssessmentScanResults) MarshalJSON ¶
func (v VulnerabilityAssessmentScanResults) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentScanResults.
func (*VulnerabilityAssessmentScanResults) UnmarshalJSON ¶
func (v *VulnerabilityAssessmentScanResults) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentScanResults.
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 VulnerabilityAssessmentScansClient ¶
type VulnerabilityAssessmentScansClient struct {
// contains filtered or unexported fields
}
VulnerabilityAssessmentScansClient contains the methods for the SQLVulnerabilityAssessmentScans group. Don't use this type directly, use NewVulnerabilityAssessmentScansClient() instead.
func NewVulnerabilityAssessmentScansClient ¶
func NewVulnerabilityAssessmentScansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VulnerabilityAssessmentScansClient, error)
NewVulnerabilityAssessmentScansClient creates a new instance of VulnerabilityAssessmentScansClient 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 (*VulnerabilityAssessmentScansClient) Get ¶
func (client *VulnerabilityAssessmentScansClient) Get(ctx context.Context, resourceGroupName string, serverName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, scanID string, options *VulnerabilityAssessmentScansClientGetOptions) (VulnerabilityAssessmentScansClientGetResponse, error)
Get - Get a system database vulnerability assessment scan record. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- options - VulnerabilityAssessmentScansClientGetOptions contains the optional parameters for the VulnerabilityAssessmentScansClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentScan.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewVulnerabilityAssessmentScansClient().Get(ctx, "vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", 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.VulnerabilityAssessmentScanRecordForSQL = armsql.VulnerabilityAssessmentScanRecordForSQL{ // Name: to.Ptr("scan001"), // Type: to.Ptr("Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/default/scans/scan001"), // Properties: &armsql.VulnerabilityAssessmentScanRecordForSQLProperties{ // Database: to.Ptr("master"), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.723Z"); return t}()), // HighSeverityFailedRulesCount: to.Ptr[int32](3), // IsBaselineApplied: to.Ptr(false), // LastScanTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.645Z"); return t}()), // LowSeverityFailedRulesCount: to.Ptr[int32](1), // MediumSeverityFailedRulesCount: to.Ptr[int32](2), // ScanID: to.Ptr("scan001"), // Server: to.Ptr("vulnerabilityassessmenttest-6411"), // SQLVersion: to.Ptr("15.0.2000"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.645Z"); return t}()), // State: to.Ptr(armsql.VulnerabilityAssessmentScanStateFailed), // TotalFailedRulesCount: to.Ptr[int32](6), // TotalPassedRulesCount: to.Ptr[int32](20), // TotalRulesCount: to.Ptr[int32](26), // TriggerType: to.Ptr(armsql.VulnerabilityAssessmentScanTriggerTypeRecurring), // }, // }
Output:
func (*VulnerabilityAssessmentScansClient) NewListBySQLVulnerabilityAssessmentsPager ¶
func (client *VulnerabilityAssessmentScansClient) NewListBySQLVulnerabilityAssessmentsPager(resourceGroupName string, serverName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *VulnerabilityAssessmentScansClientListBySQLVulnerabilityAssessmentsOptions) *runtime.Pager[VulnerabilityAssessmentScansClientListBySQLVulnerabilityAssessmentsResponse]
NewListBySQLVulnerabilityAssessmentsPager - Lists the vulnerability assessment scans of a database.
Generated from API version 2022-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- vulnerabilityAssessmentName - The name of the vulnerability assessment.
- options - VulnerabilityAssessmentScansClientListBySQLVulnerabilityAssessmentsOptions contains the optional parameters for the VulnerabilityAssessmentScansClient.NewListBySQLVulnerabilityAssessmentsPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentScanRecordsListByDatabase.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewVulnerabilityAssessmentScansClient().NewListBySQLVulnerabilityAssessmentsPager("vulnerabilityassessmenttest-4711", "vulnerabilityassessmenttest-6411", 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.VulnerabilityAssessmentScanRecordForSQLListResult = armsql.VulnerabilityAssessmentScanRecordForSQLListResult{ // Value: []*armsql.VulnerabilityAssessmentScanRecordForSQL{ // { // Name: to.Ptr("scan001"), // Type: to.Ptr("Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/default/scans/scan001"), // Properties: &armsql.VulnerabilityAssessmentScanRecordForSQLProperties{ // Database: to.Ptr("master"), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.723Z"); return t}()), // HighSeverityFailedRulesCount: to.Ptr[int32](3), // IsBaselineApplied: to.Ptr(false), // LastScanTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.645Z"); return t}()), // LowSeverityFailedRulesCount: to.Ptr[int32](1), // MediumSeverityFailedRulesCount: to.Ptr[int32](2), // ScanID: to.Ptr("scan001"), // Server: to.Ptr("vulnerabilityassessmenttest-6411"), // SQLVersion: to.Ptr("15.0.2000"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.645Z"); return t}()), // State: to.Ptr(armsql.VulnerabilityAssessmentScanStateFailed), // TotalFailedRulesCount: to.Ptr[int32](6), // TotalPassedRulesCount: to.Ptr[int32](20), // TotalRulesCount: to.Ptr[int32](26), // TriggerType: to.Ptr(armsql.VulnerabilityAssessmentScanTriggerTypeRecurring), // }, // }, // { // Name: to.Ptr("scan001"), // Type: to.Ptr("Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/default/scans/scan002"), // Properties: &armsql.VulnerabilityAssessmentScanRecordForSQLProperties{ // Database: to.Ptr("master"), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.723Z"); return t}()), // HighSeverityFailedRulesCount: to.Ptr[int32](3), // IsBaselineApplied: to.Ptr(false), // LastScanTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.645Z"); return t}()), // LowSeverityFailedRulesCount: to.Ptr[int32](1), // MediumSeverityFailedRulesCount: to.Ptr[int32](2), // ScanID: to.Ptr("scan002"), // Server: to.Ptr("vulnerabilityassessmenttest-6411"), // SQLVersion: to.Ptr("15.0.2000"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.645Z"); return t}()), // State: to.Ptr(armsql.VulnerabilityAssessmentScanStateFailed), // TotalFailedRulesCount: to.Ptr[int32](6), // TotalPassedRulesCount: to.Ptr[int32](20), // TotalRulesCount: to.Ptr[int32](26), // TriggerType: to.Ptr(armsql.VulnerabilityAssessmentScanTriggerTypeRecurring), // }, // }, // { // Name: to.Ptr("scan001"), // Type: to.Ptr("Microsoft.Sql/servers/sqlVulnerabilityAssessments/scans"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6411/sqlVulnerabilityAssessments/default/scans/scan003"), // Properties: &armsql.VulnerabilityAssessmentScanRecordForSQLProperties{ // Database: to.Ptr("master"), // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.723Z"); return t}()), // HighSeverityFailedRulesCount: to.Ptr[int32](0), // IsBaselineApplied: to.Ptr(true), // LastScanTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.645Z"); return t}()), // LowSeverityFailedRulesCount: to.Ptr[int32](0), // MediumSeverityFailedRulesCount: to.Ptr[int32](0), // ScanID: to.Ptr("scan003"), // Server: to.Ptr("vulnerabilityassessmenttest-6411"), // SQLVersion: to.Ptr("15.0.2000"), // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-06-23T06:49:00.645Z"); return t}()), // State: to.Ptr(armsql.VulnerabilityAssessmentScanStateFailed), // TotalFailedRulesCount: to.Ptr[int32](6), // TotalPassedRulesCount: to.Ptr[int32](20), // TotalRulesCount: to.Ptr[int32](26), // TriggerType: to.Ptr(armsql.VulnerabilityAssessmentScanTriggerTypeRecurring), // }, // }}, // } }
Output:
type VulnerabilityAssessmentScansClientGetOptions ¶
type VulnerabilityAssessmentScansClientGetOptions struct { }
VulnerabilityAssessmentScansClientGetOptions contains the optional parameters for the VulnerabilityAssessmentScansClient.Get method.
type VulnerabilityAssessmentScansClientGetResponse ¶
type VulnerabilityAssessmentScansClientGetResponse struct { // A vulnerability assessment scan record. VulnerabilityAssessmentScanRecordForSQL }
VulnerabilityAssessmentScansClientGetResponse contains the response from method VulnerabilityAssessmentScansClient.Get.
type VulnerabilityAssessmentScansClientListBySQLVulnerabilityAssessmentsOptions ¶
type VulnerabilityAssessmentScansClientListBySQLVulnerabilityAssessmentsOptions struct { }
VulnerabilityAssessmentScansClientListBySQLVulnerabilityAssessmentsOptions contains the optional parameters for the VulnerabilityAssessmentScansClient.NewListBySQLVulnerabilityAssessmentsPager method.
type VulnerabilityAssessmentScansClientListBySQLVulnerabilityAssessmentsResponse ¶
type VulnerabilityAssessmentScansClientListBySQLVulnerabilityAssessmentsResponse struct { // A list of vulnerability assessment scan records. VulnerabilityAssessmentScanRecordForSQLListResult }
VulnerabilityAssessmentScansClientListBySQLVulnerabilityAssessmentsResponse contains the response from method VulnerabilityAssessmentScansClient.NewListBySQLVulnerabilityAssessmentsPager.
type VulnerabilityAssessmentsClient ¶
type VulnerabilityAssessmentsClient struct {
// contains filtered or unexported fields
}
VulnerabilityAssessmentsClient contains the methods for the SQLVulnerabilityAssessments group. Don't use this type directly, use NewVulnerabilityAssessmentsClient() instead.
func NewVulnerabilityAssessmentsClient ¶
func NewVulnerabilityAssessmentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VulnerabilityAssessmentsClient, error)
NewVulnerabilityAssessmentsClient creates a new instance of VulnerabilityAssessmentsClient 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 (*VulnerabilityAssessmentsClient) Delete ¶
func (client *VulnerabilityAssessmentsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *VulnerabilityAssessmentsClientDeleteOptions) (VulnerabilityAssessmentsClientDeleteResponse, error)
Delete - Removes SQL Vulnerability Assessment. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- vulnerabilityAssessmentName - The name of the SQL Vulnerability Assessment.
- options - VulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the VulnerabilityAssessmentsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentDelete.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewVulnerabilityAssessmentsClient().Delete(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", armsql.VulnerabilityAssessmentNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) }
Output:
type VulnerabilityAssessmentsClientDeleteOptions ¶
type VulnerabilityAssessmentsClientDeleteOptions struct { }
VulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the VulnerabilityAssessmentsClient.Delete method.
type VulnerabilityAssessmentsClientDeleteResponse ¶
type VulnerabilityAssessmentsClientDeleteResponse struct { }
VulnerabilityAssessmentsClientDeleteResponse contains the response from method VulnerabilityAssessmentsClient.Delete.
type VulnerabilityAssessmentsSettingsClient ¶
type VulnerabilityAssessmentsSettingsClient struct {
// contains filtered or unexported fields
}
VulnerabilityAssessmentsSettingsClient contains the methods for the SQLVulnerabilityAssessmentsSettings group. Don't use this type directly, use NewVulnerabilityAssessmentsSettingsClient() instead.
func NewVulnerabilityAssessmentsSettingsClient ¶
func NewVulnerabilityAssessmentsSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VulnerabilityAssessmentsSettingsClient, error)
NewVulnerabilityAssessmentsSettingsClient creates a new instance of VulnerabilityAssessmentsSettingsClient 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 (*VulnerabilityAssessmentsSettingsClient) CreateOrUpdate ¶
func (client *VulnerabilityAssessmentsSettingsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, parameters VulnerabilityAssessment, options *VulnerabilityAssessmentsSettingsClientCreateOrUpdateOptions) (VulnerabilityAssessmentsSettingsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates SQL Vulnerability Assessment policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- vulnerabilityAssessmentName - The name of the SQL Vulnerability Assessment.
- parameters - The requested resource.
- options - VulnerabilityAssessmentsSettingsClientCreateOrUpdateOptions contains the optional parameters for the VulnerabilityAssessmentsSettingsClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentCreate.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewVulnerabilityAssessmentsSettingsClient().CreateOrUpdate(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", armsql.VulnerabilityAssessmentNameDefault, armsql.VulnerabilityAssessment{ Properties: &armsql.VulnerabilityAssessmentPolicyProperties{ State: to.Ptr(armsql.SQLVulnerabilityAssessmentStateEnabled), }, }, 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.VulnerabilityAssessment = armsql.VulnerabilityAssessment{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/sqlVulnerabilityAssessments"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default"), // Properties: &armsql.VulnerabilityAssessmentPolicyProperties{ // State: to.Ptr(armsql.SQLVulnerabilityAssessmentStateEnabled), // }, // }
Output:
func (*VulnerabilityAssessmentsSettingsClient) Get ¶
func (client *VulnerabilityAssessmentsSettingsClient) Get(ctx context.Context, resourceGroupName string, serverName string, vulnerabilityAssessmentName SQLVulnerabilityAssessmentName, options *VulnerabilityAssessmentsSettingsClientGetOptions) (VulnerabilityAssessmentsSettingsClientGetResponse, error)
Get - Gets SQL Vulnerability Assessment policy. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-11-01-preview
- resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- serverName - The name of the server.
- vulnerabilityAssessmentName - The name of the SQL Vulnerability Assessment.
- options - VulnerabilityAssessmentsSettingsClientGetOptions contains the optional parameters for the VulnerabilityAssessmentsSettingsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentGet.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewVulnerabilityAssessmentsSettingsClient().Get(ctx, "vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", armsql.SQLVulnerabilityAssessmentNameDefault, 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.VulnerabilityAssessment = armsql.VulnerabilityAssessment{ // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/sqlVulnerabilityAssessments"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/default"), // Properties: &armsql.VulnerabilityAssessmentPolicyProperties{ // State: to.Ptr(armsql.SQLVulnerabilityAssessmentStateEnabled), // }, // }
Output:
func (*VulnerabilityAssessmentsSettingsClient) NewListByServerPager ¶
func (client *VulnerabilityAssessmentsSettingsClient) NewListByServerPager(resourceGroupName string, serverName string, options *VulnerabilityAssessmentsSettingsClientListByServerOptions) *runtime.Pager[VulnerabilityAssessmentsSettingsClientListByServerResponse]
NewListByServerPager - Lists SQL Vulnerability Assessment policies associated with a server.
Generated from API version 2022-11-01-preview
- resourceGroupName - The name of the resource group 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 - VulnerabilityAssessmentsSettingsClientListByServerOptions contains the optional parameters for the VulnerabilityAssessmentsSettingsClient.NewListByServerPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/SqlVulnerabilityAssessmentListByServer.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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.NewVulnerabilityAssessmentsSettingsClient().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.VulnerabilityAssessmentListResult = armsql.VulnerabilityAssessmentListResult{ // Value: []*armsql.VulnerabilityAssessment{ // { // Name: to.Ptr("default"), // Type: to.Ptr("Microsoft.Sql/servers/sqlVulnerabilityAssessments"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityaseessmenttest-6440/sqlVulnerabilityAssessments/"), // Properties: &armsql.VulnerabilityAssessmentPolicyProperties{ // State: to.Ptr(armsql.SQLVulnerabilityAssessmentStateEnabled), // }, // }}, // } }
Output:
type VulnerabilityAssessmentsSettingsClientCreateOrUpdateOptions ¶
type VulnerabilityAssessmentsSettingsClientCreateOrUpdateOptions struct { }
VulnerabilityAssessmentsSettingsClientCreateOrUpdateOptions contains the optional parameters for the VulnerabilityAssessmentsSettingsClient.CreateOrUpdate method.
type VulnerabilityAssessmentsSettingsClientCreateOrUpdateResponse ¶
type VulnerabilityAssessmentsSettingsClientCreateOrUpdateResponse struct { // A SQL Vulnerability Assessment. VulnerabilityAssessment }
VulnerabilityAssessmentsSettingsClientCreateOrUpdateResponse contains the response from method VulnerabilityAssessmentsSettingsClient.CreateOrUpdate.
type VulnerabilityAssessmentsSettingsClientGetOptions ¶
type VulnerabilityAssessmentsSettingsClientGetOptions struct { }
VulnerabilityAssessmentsSettingsClientGetOptions contains the optional parameters for the VulnerabilityAssessmentsSettingsClient.Get method.
type VulnerabilityAssessmentsSettingsClientGetResponse ¶
type VulnerabilityAssessmentsSettingsClientGetResponse struct { // A SQL Vulnerability Assessment. VulnerabilityAssessment }
VulnerabilityAssessmentsSettingsClientGetResponse contains the response from method VulnerabilityAssessmentsSettingsClient.Get.
type VulnerabilityAssessmentsSettingsClientListByServerOptions ¶
type VulnerabilityAssessmentsSettingsClientListByServerOptions struct { }
VulnerabilityAssessmentsSettingsClientListByServerOptions contains the optional parameters for the VulnerabilityAssessmentsSettingsClient.NewListByServerPager method.
type VulnerabilityAssessmentsSettingsClientListByServerResponse ¶
type VulnerabilityAssessmentsSettingsClientListByServerResponse struct { // A list of SQL Vulnerability Assessments. VulnerabilityAssessmentListResult }
VulnerabilityAssessmentsSettingsClientListByServerResponse contains the response from method VulnerabilityAssessmentsSettingsClient.NewListByServerPager.
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 ¶
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 ¶
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 ¶
func (w WorkloadClassifierProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WorkloadClassifierProperties.
func (*WorkloadClassifierProperties) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateWorkloadClassifierMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateWorkloadClassifierMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteWorkloadClassifier.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetWorkloadClassifier.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetWorkloadClassifierList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type WorkloadClassifiersClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
WorkloadClassifiersClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkloadClassifiersClient.BeginCreateOrUpdate method.
type WorkloadClassifiersClientBeginDeleteOptions ¶
type WorkloadClassifiersClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
WorkloadClassifiersClientBeginDeleteOptions contains the optional parameters for the WorkloadClassifiersClient.BeginDelete method.
type WorkloadClassifiersClientCreateOrUpdateResponse ¶
type WorkloadClassifiersClientCreateOrUpdateResponse struct { // Workload classifier operations for a data warehouse WorkloadClassifier }
WorkloadClassifiersClientCreateOrUpdateResponse contains the response from method WorkloadClassifiersClient.BeginCreateOrUpdate.
type WorkloadClassifiersClientDeleteResponse ¶
type WorkloadClassifiersClientDeleteResponse struct { }
WorkloadClassifiersClientDeleteResponse contains the response from method WorkloadClassifiersClient.BeginDelete.
type WorkloadClassifiersClientGetOptions ¶
type WorkloadClassifiersClientGetOptions struct { }
WorkloadClassifiersClientGetOptions contains the optional parameters for the WorkloadClassifiersClient.Get method.
type WorkloadClassifiersClientGetResponse ¶
type WorkloadClassifiersClientGetResponse struct { // Workload classifier operations for a data warehouse WorkloadClassifier }
WorkloadClassifiersClientGetResponse contains the response from method WorkloadClassifiersClient.Get.
type WorkloadClassifiersClientListByWorkloadGroupOptions ¶
type WorkloadClassifiersClientListByWorkloadGroupOptions struct { }
WorkloadClassifiersClientListByWorkloadGroupOptions contains the optional parameters for the WorkloadClassifiersClient.NewListByWorkloadGroupPager method.
type WorkloadClassifiersClientListByWorkloadGroupResponse ¶
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 ¶
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 ¶
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 ¶
func (w WorkloadGroupProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WorkloadGroupProperties.
func (*WorkloadGroupProperties) UnmarshalJSON ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateWorkloadGroupMax.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateWorkloadGroupMin.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteWorkloadGroup.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetWorkloadGroup.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
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/01e99457ccf5613a95d5b2960d31a12f84018863/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetWorkloadGroupList.json
cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %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 ¶
type WorkloadGroupsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
WorkloadGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkloadGroupsClient.BeginCreateOrUpdate method.
type WorkloadGroupsClientBeginDeleteOptions ¶
type WorkloadGroupsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
WorkloadGroupsClientBeginDeleteOptions contains the optional parameters for the WorkloadGroupsClient.BeginDelete method.
type WorkloadGroupsClientCreateOrUpdateResponse ¶
type WorkloadGroupsClientCreateOrUpdateResponse struct { // Workload group operations for a data warehouse WorkloadGroup }
WorkloadGroupsClientCreateOrUpdateResponse contains the response from method WorkloadGroupsClient.BeginCreateOrUpdate.
type WorkloadGroupsClientDeleteResponse ¶
type WorkloadGroupsClientDeleteResponse struct { }
WorkloadGroupsClientDeleteResponse contains the response from method WorkloadGroupsClient.BeginDelete.
type WorkloadGroupsClientGetOptions ¶
type WorkloadGroupsClientGetOptions struct { }
WorkloadGroupsClientGetOptions contains the optional parameters for the WorkloadGroupsClient.Get method.
type WorkloadGroupsClientGetResponse ¶
type WorkloadGroupsClientGetResponse struct { // Workload group operations for a data warehouse WorkloadGroup }
WorkloadGroupsClientGetResponse contains the response from method WorkloadGroupsClient.Get.
type WorkloadGroupsClientListByDatabaseOptions ¶
type WorkloadGroupsClientListByDatabaseOptions struct { }
WorkloadGroupsClientListByDatabaseOptions contains the optional parameters for the WorkloadGroupsClient.NewListByDatabasePager method.
type WorkloadGroupsClientListByDatabaseResponse ¶
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
- databaseencryptionprotectors_client.go
- databaseextensions_client.go
- databaseoperations_client.go
- databaserecommendedactions_client.go
- databases_client.go
- databaseschemas_client.go
- databasesecurityalertpolicies_client.go
- databasesqlvulnerabilityassessmentbaselines_client.go
- databasesqlvulnerabilityassessmentexecutescan_client.go
- databasesqlvulnerabilityassessmentrulebaselines_client.go
- databasesqlvulnerabilityassessmentscanresult_client.go
- databasesqlvulnerabilityassessmentscans_client.go
- databasesqlvulnerabilityassessmentssettings_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
- jobprivateendpoints_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
- manageddatabaseadvancedthreatprotectionsettings_client.go
- manageddatabasecolumns_client.go
- manageddatabasemoveoperations_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
- managedinstanceadvancedthreatprotectionsettings_client.go
- managedinstanceazureadonlyauthentications_client.go
- managedinstancedtcs_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
- managedledgerdigestuploads_client.go
- managedrestorabledroppeddatabasebackupshorttermretentionpolicies_client.go
- managedserverdnsaliases_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
- serverconfigurationoptions_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
- startstopmanagedinstanceschedules_client.go
- subscriptionusages_client.go
- synapselinkworkspaces_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
- vulnerabilityassessmentbaseline_client.go
- vulnerabilityassessmentbaselines_client.go
- vulnerabilityassessmentexecutescan_client.go
- vulnerabilityassessmentrulebaseline_client.go
- vulnerabilityassessmentrulebaselines_client.go
- vulnerabilityassessments_client.go
- vulnerabilityassessmentscanresult_client.go
- vulnerabilityassessmentscans_client.go
- vulnerabilityassessmentssettings_client.go
- workloadclassifiers_client.go
- workloadgroups_client.go