Documentation
¶
Index ¶
- type AdministratorListResult
- type AdministratorName
- type AdministratorProperties
- type AdministratorType
- type Advisor
- type AdvisorProperties
- type AdvisorStatus
- type AgentClient
- func (client *AgentClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (AgentClientCreateOrUpdateResponse, error)
- func (client *AgentClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (AgentClientGetResponse, error)
- type AgentClientCreateOrUpdateOptions
- type AgentClientCreateOrUpdateResponse
- type AgentClientGetOptions
- type AgentClientGetResponse
- type AgentConfiguration
- type AgentConfigurationProperties
- type AggregationFunctionType
- type AuthenticationName
- type AutoExecuteStatus
- type AutoExecuteStatusInheritedFrom
- type AutoPauseDelayTimeRange
- type AutomaticTuningDisabledReason
- type AutomaticTuningMode
- type AutomaticTuningOptionModeActual
- type AutomaticTuningOptionModeDesired
- type AutomaticTuningOptions
- type AutomaticTuningServerMode
- type AutomaticTuningServerOptions
- type AutomaticTuningServerProperties
- type AutomaticTuningServerReason
- type AzureADOnlyAuthListResult
- type AzureADOnlyAuthProperties
- type BackupShortTermRetentionPoliciesClient
- func (client *BackupShortTermRetentionPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (...)
- func (client *BackupShortTermRetentionPoliciesClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[BackupShortTermRetentionPoliciesClientUpdateResponse], ...)
- func (client *BackupShortTermRetentionPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (BackupShortTermRetentionPoliciesClientGetResponse, error)
- func (client *BackupShortTermRetentionPoliciesClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[BackupShortTermRetentionPoliciesClientListByDatabaseResponse]
- type BackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions
- type BackupShortTermRetentionPoliciesClientBeginUpdateOptions
- type BackupShortTermRetentionPoliciesClientCreateOrUpdateResponse
- type BackupShortTermRetentionPoliciesClientGetOptions
- type BackupShortTermRetentionPoliciesClientGetResponse
- type BackupShortTermRetentionPoliciesClientListByDatabaseOptions
- type BackupShortTermRetentionPoliciesClientListByDatabaseResponse
- type BackupShortTermRetentionPoliciesClientUpdateResponse
- type BackupShortTermRetentionPolicy
- type BackupShortTermRetentionPolicyListResult
- type BackupShortTermRetentionPolicyProperties
- type BackupStorageRedundancy
- type BaseLongTermRetentionPolicyProperties
- type BlobAuditingPolicyState
- type CapabilitiesClient
- type CapabilitiesClientListByLocationOptions
- type CapabilitiesClientListByLocationResponse
- type CapabilityGroup
- type CapabilityStatus
- type CatalogCollationType
- type CheckNameAvailabilityReason
- type CheckNameAvailabilityRequest
- type CheckNameAvailabilityResponse
- type ColumnDataType
- type CompleteDatabaseRestoreDefinition
- type ConnectionPolicyName
- type CopyLongTermRetentionBackupParameters
- type CopyLongTermRetentionBackupParametersProperties
- type CreateDatabaseRestorePointDefinition
- type CreateMode
- type CreatedByType
- type DNSRefreshConfigurationProperties
- type DNSRefreshConfigurationPropertiesStatus
- type DataMaskingFunction
- type DataMaskingPoliciesClient
- func (client *DataMaskingPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (DataMaskingPoliciesClientCreateOrUpdateResponse, error)
- func (client *DataMaskingPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (DataMaskingPoliciesClientGetResponse, error)
- type DataMaskingPoliciesClientCreateOrUpdateOptions
- type DataMaskingPoliciesClientCreateOrUpdateResponse
- type DataMaskingPoliciesClientGetOptions
- type DataMaskingPoliciesClientGetResponse
- type DataMaskingPolicy
- type DataMaskingPolicyProperties
- type DataMaskingRule
- type DataMaskingRuleListResult
- type DataMaskingRuleProperties
- type DataMaskingRuleState
- type DataMaskingRulesClient
- func (client *DataMaskingRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (DataMaskingRulesClientCreateOrUpdateResponse, error)
- func (client *DataMaskingRulesClient) ListByDatabase(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) ListByDatabase(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 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) ListByDatabase(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) ListByDatabase(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[DatabaseColumnsClientListByDatabaseResponse]
- func (client *DatabaseColumnsClient) ListByTable(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[DatabaseColumnsClientListByTableResponse]
- type DatabaseColumnsClientGetOptions
- type DatabaseColumnsClientGetResponse
- type DatabaseColumnsClientListByDatabaseOptions
- type DatabaseColumnsClientListByDatabaseResponse
- type DatabaseColumnsClientListByTableOptions
- type DatabaseColumnsClientListByTableResponse
- type DatabaseExtensions
- type DatabaseExtensionsClient
- func (client *DatabaseExtensionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[DatabaseExtensionsClientCreateOrUpdateResponse], error)
- func (client *DatabaseExtensionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseExtensionsClientGetResponse, error)
- func (client *DatabaseExtensionsClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[DatabaseExtensionsClientListByDatabaseResponse]
- type DatabaseExtensionsClientBeginCreateOrUpdateOptions
- type DatabaseExtensionsClientCreateOrUpdateResponse
- type DatabaseExtensionsClientGetOptions
- type DatabaseExtensionsClientGetResponse
- type DatabaseExtensionsClientListByDatabaseOptions
- type DatabaseExtensionsClientListByDatabaseResponse
- type DatabaseExtensionsProperties
- type DatabaseIdentity
- type DatabaseIdentityType
- type DatabaseLicenseType
- type DatabaseListResult
- type DatabaseOperation
- type DatabaseOperationListResult
- type DatabaseOperationProperties
- type DatabaseOperationsClient
- func (client *DatabaseOperationsClient) Cancel(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseOperationsClientCancelResponse, error)
- func (client *DatabaseOperationsClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[DatabaseOperationsClientListByDatabaseResponse]
- type DatabaseOperationsClientCancelOptions
- type DatabaseOperationsClientCancelResponse
- type DatabaseOperationsClientListByDatabaseOptions
- type DatabaseOperationsClientListByDatabaseResponse
- type DatabaseProperties
- type DatabaseReadScale
- type DatabaseRecommendedActionsClient
- func (client *DatabaseRecommendedActionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseRecommendedActionsClientGetResponse, error)
- func (client *DatabaseRecommendedActionsClient) ListByDatabaseAdvisor(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseRecommendedActionsClientListByDatabaseAdvisorResponse, error)
- func (client *DatabaseRecommendedActionsClient) Update(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseRecommendedActionsClientUpdateResponse, error)
- type DatabaseRecommendedActionsClientGetOptions
- type DatabaseRecommendedActionsClientGetResponse
- type DatabaseRecommendedActionsClientListByDatabaseAdvisorOptions
- type DatabaseRecommendedActionsClientListByDatabaseAdvisorResponse
- type DatabaseRecommendedActionsClientUpdateOptions
- type DatabaseRecommendedActionsClientUpdateResponse
- type DatabaseSchema
- type DatabaseSchemaListResult
- type DatabaseSchemasClient
- func (client *DatabaseSchemasClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabaseSchemasClientGetResponse, error)
- func (client *DatabaseSchemasClient) ListByDatabase(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) ListByDatabase(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) ListBySchema(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) ListByDatabase(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) ListByDatabase(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, ...) (*armruntime.Poller[DatabasesClientCreateOrUpdateResponse], error)
- func (client *DatabasesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[DatabasesClientDeleteResponse], error)
- func (client *DatabasesClient) BeginExport(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[DatabasesClientExportResponse], error)
- func (client *DatabasesClient) BeginFailover(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[DatabasesClientFailoverResponse], error)
- func (client *DatabasesClient) BeginImport(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[DatabasesClientImportResponse], error)
- func (client *DatabasesClient) BeginPause(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[DatabasesClientPauseResponse], error)
- func (client *DatabasesClient) BeginResume(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[DatabasesClientResumeResponse], error)
- func (client *DatabasesClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[DatabasesClientUpdateResponse], error)
- func (client *DatabasesClient) BeginUpgradeDataWarehouse(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[DatabasesClientUpgradeDataWarehouseResponse], error)
- func (client *DatabasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (DatabasesClientGetResponse, error)
- func (client *DatabasesClient) ListByElasticPool(resourceGroupName string, serverName string, elasticPoolName string, ...) *runtime.Pager[DatabasesClientListByElasticPoolResponse]
- func (client *DatabasesClient) ListByServer(resourceGroupName string, serverName string, ...) *runtime.Pager[DatabasesClientListByServerResponse]
- func (client *DatabasesClient) ListInaccessibleByServer(resourceGroupName string, serverName string, ...) *runtime.Pager[DatabasesClientListInaccessibleByServerResponse]
- func (client *DatabasesClient) ListMetricDefinitions(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[DatabasesClientListMetricDefinitionsResponse]
- func (client *DatabasesClient) ListMetrics(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, ...) (*armruntime.Poller[DeletedServersClientRecoverResponse], error)
- func (client *DeletedServersClient) Get(ctx context.Context, locationName string, deletedServerName string, ...) (DeletedServersClientGetResponse, error)
- func (client *DeletedServersClient) List(options *DeletedServersClientListOptions) *runtime.Pager[DeletedServersClientListResponse]
- func (client *DeletedServersClient) ListByLocation(locationName string, options *DeletedServersClientListByLocationOptions) *runtime.Pager[DeletedServersClientListByLocationResponse]
- type DeletedServersClientBeginRecoverOptions
- type DeletedServersClientGetOptions
- type DeletedServersClientGetResponse
- type DeletedServersClientListByLocationOptions
- type DeletedServersClientListByLocationResponse
- type DeletedServersClientListOptions
- type DeletedServersClientListResponse
- type DeletedServersClientRecoverResponse
- type DiffBackupIntervalInHours
- type DistributedAvailabilityGroup
- type DistributedAvailabilityGroupProperties
- type DistributedAvailabilityGroupsClient
- func (client *DistributedAvailabilityGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*armruntime.Poller[DistributedAvailabilityGroupsClientCreateOrUpdateResponse], ...)
- func (client *DistributedAvailabilityGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*armruntime.Poller[DistributedAvailabilityGroupsClientDeleteResponse], error)
- func (client *DistributedAvailabilityGroupsClient) BeginUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*armruntime.Poller[DistributedAvailabilityGroupsClientUpdateResponse], error)
- func (client *DistributedAvailabilityGroupsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (DistributedAvailabilityGroupsClientGetResponse, error)
- func (client *DistributedAvailabilityGroupsClient) ListByInstance(resourceGroupName string, managedInstanceName string, ...) *runtime.Pager[DistributedAvailabilityGroupsClientListByInstanceResponse]
- type DistributedAvailabilityGroupsClientBeginCreateOrUpdateOptions
- type DistributedAvailabilityGroupsClientBeginDeleteOptions
- type DistributedAvailabilityGroupsClientBeginUpdateOptions
- type DistributedAvailabilityGroupsClientCreateOrUpdateResponse
- type DistributedAvailabilityGroupsClientDeleteResponse
- type DistributedAvailabilityGroupsClientGetOptions
- type DistributedAvailabilityGroupsClientGetResponse
- type DistributedAvailabilityGroupsClientListByInstanceOptions
- type DistributedAvailabilityGroupsClientListByInstanceResponse
- type DistributedAvailabilityGroupsClientUpdateResponse
- type DistributedAvailabilityGroupsListResult
- type EditionCapability
- type ElasticPool
- type ElasticPoolActivitiesClient
- type ElasticPoolActivitiesClientListByElasticPoolOptions
- type ElasticPoolActivitiesClientListByElasticPoolResponse
- type ElasticPoolActivity
- type ElasticPoolActivityListResult
- type ElasticPoolActivityProperties
- type ElasticPoolDatabaseActivitiesClient
- type ElasticPoolDatabaseActivitiesClientListByElasticPoolOptions
- type ElasticPoolDatabaseActivitiesClientListByElasticPoolResponse
- type ElasticPoolDatabaseActivity
- type ElasticPoolDatabaseActivityListResult
- type ElasticPoolDatabaseActivityProperties
- type ElasticPoolEditionCapability
- type ElasticPoolLicenseType
- type ElasticPoolListResult
- type ElasticPoolOperation
- type ElasticPoolOperationListResult
- type ElasticPoolOperationProperties
- type ElasticPoolOperationsClient
- func (client *ElasticPoolOperationsClient) Cancel(ctx context.Context, resourceGroupName string, serverName string, ...) (ElasticPoolOperationsClientCancelResponse, error)
- func (client *ElasticPoolOperationsClient) ListByElasticPool(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, ...) (*armruntime.Poller[ElasticPoolsClientCreateOrUpdateResponse], error)
- func (client *ElasticPoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[ElasticPoolsClientDeleteResponse], error)
- func (client *ElasticPoolsClient) BeginFailover(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[ElasticPoolsClientFailoverResponse], error)
- func (client *ElasticPoolsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[ElasticPoolsClientUpdateResponse], error)
- func (client *ElasticPoolsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ElasticPoolsClientGetResponse, error)
- func (client *ElasticPoolsClient) ListByServer(resourceGroupName string, serverName string, ...) *runtime.Pager[ElasticPoolsClientListByServerResponse]
- func (client *ElasticPoolsClient) ListMetricDefinitions(resourceGroupName string, serverName string, elasticPoolName string, ...) *runtime.Pager[ElasticPoolsClientListMetricDefinitionsResponse]
- func (client *ElasticPoolsClient) ListMetrics(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, ...) (*armruntime.Poller[EncryptionProtectorsClientCreateOrUpdateResponse], error)
- func (client *EncryptionProtectorsClient) BeginRevalidate(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[EncryptionProtectorsClientRevalidateResponse], error)
- func (client *EncryptionProtectorsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (EncryptionProtectorsClientGetResponse, error)
- func (client *EncryptionProtectorsClient) ListByServer(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) ListByInstance(resourceGroupName string, managedInstanceName string, ...) *runtime.Pager[EndpointCertificatesClientListByInstanceResponse]
- type EndpointCertificatesClientGetOptions
- type EndpointCertificatesClientGetResponse
- type EndpointCertificatesClientListByInstanceOptions
- type EndpointCertificatesClientListByInstanceResponse
- type ExportDatabaseDefinition
- type ExtendedDatabaseBlobAuditingPoliciesClient
- func (client *ExtendedDatabaseBlobAuditingPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse, error)
- func (client *ExtendedDatabaseBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ExtendedDatabaseBlobAuditingPoliciesClientGetResponse, error)
- func (client *ExtendedDatabaseBlobAuditingPoliciesClient) ListByDatabase(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) ListByServer(resourceGroupName string, serverName string, ...) *runtime.Pager[ExtendedServerBlobAuditingPoliciesClientListByServerResponse]
- type ExtendedServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions
- type ExtendedServerBlobAuditingPoliciesClientCreateOrUpdateResponse
- type ExtendedServerBlobAuditingPoliciesClientGetOptions
- type ExtendedServerBlobAuditingPoliciesClientGetResponse
- type ExtendedServerBlobAuditingPoliciesClientListByServerOptions
- type ExtendedServerBlobAuditingPoliciesClientListByServerResponse
- type ExtendedServerBlobAuditingPolicy
- type ExtendedServerBlobAuditingPolicyListResult
- type ExtendedServerBlobAuditingPolicyProperties
- type FailoverGroup
- type FailoverGroupListResult
- type FailoverGroupProperties
- type FailoverGroupReadOnlyEndpoint
- type FailoverGroupReadWriteEndpoint
- type FailoverGroupReplicationRole
- type FailoverGroupUpdate
- type FailoverGroupUpdateProperties
- type FailoverGroupsClient
- func (client *FailoverGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[FailoverGroupsClientCreateOrUpdateResponse], error)
- func (client *FailoverGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[FailoverGroupsClientDeleteResponse], error)
- func (client *FailoverGroupsClient) BeginFailover(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[FailoverGroupsClientFailoverResponse], error)
- func (client *FailoverGroupsClient) BeginForceFailoverAllowDataLoss(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[FailoverGroupsClientForceFailoverAllowDataLossResponse], ...)
- func (client *FailoverGroupsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[FailoverGroupsClientUpdateResponse], error)
- func (client *FailoverGroupsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (FailoverGroupsClientGetResponse, error)
- func (client *FailoverGroupsClient) ListByServer(resourceGroupName string, serverName string, ...) *runtime.Pager[FailoverGroupsClientListByServerResponse]
- type FailoverGroupsClientBeginCreateOrUpdateOptions
- type FailoverGroupsClientBeginDeleteOptions
- type FailoverGroupsClientBeginFailoverOptions
- type FailoverGroupsClientBeginForceFailoverAllowDataLossOptions
- type FailoverGroupsClientBeginUpdateOptions
- type FailoverGroupsClientCreateOrUpdateResponse
- type FailoverGroupsClientDeleteResponse
- type FailoverGroupsClientFailoverResponse
- type FailoverGroupsClientForceFailoverAllowDataLossResponse
- type FailoverGroupsClientGetOptions
- type FailoverGroupsClientGetResponse
- type FailoverGroupsClientListByServerOptions
- type FailoverGroupsClientListByServerResponse
- type FailoverGroupsClientUpdateResponse
- type FirewallRule
- type FirewallRuleList
- type FirewallRuleListResult
- type FirewallRulesClient
- func (client *FirewallRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (FirewallRulesClientCreateOrUpdateResponse, error)
- func (client *FirewallRulesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, ...) (FirewallRulesClientDeleteResponse, error)
- func (client *FirewallRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (FirewallRulesClientGetResponse, error)
- func (client *FirewallRulesClient) ListByServer(resourceGroupName string, serverName string, ...) *runtime.Pager[FirewallRulesClientListByServerResponse]
- func (client *FirewallRulesClient) Replace(ctx context.Context, resourceGroupName string, serverName string, ...) (FirewallRulesClientReplaceResponse, error)
- type FirewallRulesClientCreateOrUpdateOptions
- type FirewallRulesClientCreateOrUpdateResponse
- type FirewallRulesClientDeleteOptions
- type FirewallRulesClientDeleteResponse
- type FirewallRulesClientGetOptions
- type FirewallRulesClientGetResponse
- type FirewallRulesClientListByServerOptions
- type FirewallRulesClientListByServerResponse
- type FirewallRulesClientReplaceOptions
- type FirewallRulesClientReplaceResponse
- type GeoBackupPoliciesClient
- func (client *GeoBackupPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (GeoBackupPoliciesClientCreateOrUpdateResponse, error)
- func (client *GeoBackupPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (GeoBackupPoliciesClientGetResponse, error)
- func (client *GeoBackupPoliciesClient) ListByDatabase(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) ListByServer(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, ...) (*armruntime.Poller[InstanceFailoverGroupsClientCreateOrUpdateResponse], error)
- func (client *InstanceFailoverGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, locationName string, ...) (*armruntime.Poller[InstanceFailoverGroupsClientDeleteResponse], error)
- func (client *InstanceFailoverGroupsClient) BeginFailover(ctx context.Context, resourceGroupName string, locationName string, ...) (*armruntime.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) ListByLocation(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, ...) (*armruntime.Poller[InstancePoolsClientCreateOrUpdateResponse], error)
- func (client *InstancePoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, instancePoolName string, ...) (*armruntime.Poller[InstancePoolsClientDeleteResponse], error)
- func (client *InstancePoolsClient) BeginUpdate(ctx context.Context, resourceGroupName string, instancePoolName string, ...) (*armruntime.Poller[InstancePoolsClientUpdateResponse], error)
- func (client *InstancePoolsClient) Get(ctx context.Context, resourceGroupName string, instancePoolName string, ...) (InstancePoolsClientGetResponse, error)
- func (client *InstancePoolsClient) List(options *InstancePoolsClientListOptions) *runtime.Pager[InstancePoolsClientListResponse]
- func (client *InstancePoolsClient) ListByResourceGroup(resourceGroupName string, ...) *runtime.Pager[InstancePoolsClientListByResourceGroupResponse]
- 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, ...) (*armruntime.Poller[JobAgentsClientCreateOrUpdateResponse], error)
- func (client *JobAgentsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[JobAgentsClientDeleteResponse], error)
- func (client *JobAgentsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[JobAgentsClientUpdateResponse], error)
- func (client *JobAgentsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (JobAgentsClientGetResponse, error)
- func (client *JobAgentsClient) ListByServer(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) ListByAgent(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, ...) (*armruntime.Poller[JobExecutionsClientCreateResponse], error)
- func (client *JobExecutionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.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) ListByAgent(resourceGroupName string, serverName string, jobAgentName string, ...) *runtime.Pager[JobExecutionsClientListByAgentResponse]
- func (client *JobExecutionsClient) ListByJob(resourceGroupName string, serverName string, jobAgentName string, ...) *runtime.Pager[JobExecutionsClientListByJobResponse]
- type JobExecutionsClientBeginCreateOptions
- type JobExecutionsClientBeginCreateOrUpdateOptions
- type JobExecutionsClientCancelOptions
- type JobExecutionsClientCancelResponse
- type JobExecutionsClientCreateOrUpdateResponse
- type JobExecutionsClientCreateResponse
- type JobExecutionsClientGetOptions
- type JobExecutionsClientGetResponse
- type JobExecutionsClientListByAgentOptions
- type JobExecutionsClientListByAgentResponse
- type JobExecutionsClientListByJobOptions
- type JobExecutionsClientListByJobResponse
- type JobListResult
- type JobProperties
- type JobSchedule
- type JobScheduleType
- type JobStep
- type JobStepAction
- type JobStepActionSource
- type JobStepActionType
- type JobStepExecutionOptions
- type JobStepExecutionsClient
- func (client *JobStepExecutionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (JobStepExecutionsClientGetResponse, error)
- func (client *JobStepExecutionsClient) ListByJobExecution(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) ListByJob(resourceGroupName string, serverName string, jobAgentName string, ...) *runtime.Pager[JobStepsClientListByJobResponse]
- func (client *JobStepsClient) ListByVersion(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) ListByJobExecution(resourceGroupName string, serverName string, jobAgentName string, ...) *runtime.Pager[JobTargetExecutionsClientListByJobExecutionResponse]
- func (client *JobTargetExecutionsClient) ListByStep(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) ListByAgent(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) ListByJob(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) ListByAgent(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, ...) (*armruntime.Poller[LedgerDigestUploadsClientCreateOrUpdateResponse], error)
- func (client *LedgerDigestUploadsClient) BeginDisable(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[LedgerDigestUploadsClientDisableResponse], error)
- func (client *LedgerDigestUploadsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (LedgerDigestUploadsClientGetResponse, error)
- func (client *LedgerDigestUploadsClient) ListByDatabase(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 LogicalServerSecurityAlertPolicyListResult
- type LongTermRetentionBackup
- type LongTermRetentionBackupListResult
- type LongTermRetentionBackupOperationResult
- type LongTermRetentionBackupProperties
- type LongTermRetentionBackupsClient
- func (client *LongTermRetentionBackupsClient) BeginCopy(ctx context.Context, locationName string, longTermRetentionServerName string, ...) (*armruntime.Poller[LongTermRetentionBackupsClientCopyResponse], error)
- func (client *LongTermRetentionBackupsClient) BeginCopyByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, ...) (*armruntime.Poller[LongTermRetentionBackupsClientCopyByResourceGroupResponse], ...)
- func (client *LongTermRetentionBackupsClient) BeginDelete(ctx context.Context, locationName string, longTermRetentionServerName string, ...) (*armruntime.Poller[LongTermRetentionBackupsClientDeleteResponse], error)
- func (client *LongTermRetentionBackupsClient) BeginDeleteByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, ...) (...)
- func (client *LongTermRetentionBackupsClient) BeginUpdate(ctx context.Context, locationName string, longTermRetentionServerName string, ...) (*armruntime.Poller[LongTermRetentionBackupsClientUpdateResponse], error)
- func (client *LongTermRetentionBackupsClient) BeginUpdateByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, ...) (...)
- 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) ListByDatabase(locationName string, longTermRetentionServerName string, ...) *runtime.Pager[LongTermRetentionBackupsClientListByDatabaseResponse]
- func (client *LongTermRetentionBackupsClient) ListByLocation(locationName string, ...) *runtime.Pager[LongTermRetentionBackupsClientListByLocationResponse]
- func (client *LongTermRetentionBackupsClient) ListByResourceGroupDatabase(resourceGroupName string, locationName string, ...) ...
- func (client *LongTermRetentionBackupsClient) ListByResourceGroupLocation(resourceGroupName string, locationName string, ...) ...
- func (client *LongTermRetentionBackupsClient) ListByResourceGroupServer(resourceGroupName string, locationName string, ...) ...
- func (client *LongTermRetentionBackupsClient) ListByServer(locationName string, longTermRetentionServerName string, ...) *runtime.Pager[LongTermRetentionBackupsClientListByServerResponse]
- type LongTermRetentionBackupsClientBeginCopyByResourceGroupOptions
- type LongTermRetentionBackupsClientBeginCopyOptions
- type LongTermRetentionBackupsClientBeginDeleteByResourceGroupOptions
- type LongTermRetentionBackupsClientBeginDeleteOptions
- type LongTermRetentionBackupsClientBeginUpdateByResourceGroupOptions
- type LongTermRetentionBackupsClientBeginUpdateOptions
- type LongTermRetentionBackupsClientCopyByResourceGroupResponse
- type LongTermRetentionBackupsClientCopyResponse
- type LongTermRetentionBackupsClientDeleteByResourceGroupResponse
- type LongTermRetentionBackupsClientDeleteResponse
- type LongTermRetentionBackupsClientGetByResourceGroupOptions
- type LongTermRetentionBackupsClientGetByResourceGroupResponse
- type LongTermRetentionBackupsClientGetOptions
- type LongTermRetentionBackupsClientGetResponse
- type LongTermRetentionBackupsClientListByDatabaseOptions
- type LongTermRetentionBackupsClientListByDatabaseResponse
- type LongTermRetentionBackupsClientListByLocationOptions
- type LongTermRetentionBackupsClientListByLocationResponse
- type LongTermRetentionBackupsClientListByResourceGroupDatabaseOptions
- type LongTermRetentionBackupsClientListByResourceGroupDatabaseResponse
- type LongTermRetentionBackupsClientListByResourceGroupLocationOptions
- type LongTermRetentionBackupsClientListByResourceGroupLocationResponse
- type LongTermRetentionBackupsClientListByResourceGroupServerOptions
- type LongTermRetentionBackupsClientListByResourceGroupServerResponse
- type LongTermRetentionBackupsClientListByServerOptions
- type LongTermRetentionBackupsClientListByServerResponse
- type LongTermRetentionBackupsClientUpdateByResourceGroupResponse
- type LongTermRetentionBackupsClientUpdateResponse
- type LongTermRetentionManagedInstanceBackupsClient
- func (client *LongTermRetentionManagedInstanceBackupsClient) BeginDelete(ctx context.Context, locationName string, managedInstanceName string, ...) (...)
- 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) ListByDatabase(locationName string, managedInstanceName string, databaseName string, ...) ...
- func (client *LongTermRetentionManagedInstanceBackupsClient) ListByInstance(locationName string, managedInstanceName string, ...) ...
- func (client *LongTermRetentionManagedInstanceBackupsClient) ListByLocation(locationName string, ...) ...
- func (client *LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupDatabase(resourceGroupName string, locationName string, managedInstanceName string, ...) ...
- func (client *LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupInstance(resourceGroupName string, locationName string, managedInstanceName string, ...) ...
- func (client *LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupLocation(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, ...) (*armruntime.Poller[LongTermRetentionPoliciesClientCreateOrUpdateResponse], ...)
- func (client *LongTermRetentionPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (LongTermRetentionPoliciesClientGetResponse, error)
- func (client *LongTermRetentionPoliciesClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[LongTermRetentionPoliciesClientListByDatabaseResponse]
- type LongTermRetentionPoliciesClientBeginCreateOrUpdateOptions
- type LongTermRetentionPoliciesClientCreateOrUpdateResponse
- type LongTermRetentionPoliciesClientGetOptions
- type LongTermRetentionPoliciesClientGetResponse
- type LongTermRetentionPoliciesClientListByDatabaseOptions
- type LongTermRetentionPoliciesClientListByDatabaseResponse
- type LongTermRetentionPolicy
- type LongTermRetentionPolicyListResult
- type LongTermRetentionPolicyName
- type MaintenanceConfigurationCapability
- type MaintenanceWindowOptions
- type MaintenanceWindowOptionsClient
- type MaintenanceWindowOptionsClientGetOptions
- type MaintenanceWindowOptionsClientGetResponse
- type MaintenanceWindowOptionsProperties
- type MaintenanceWindowTimeRange
- type MaintenanceWindows
- type MaintenanceWindowsClient
- func (client *MaintenanceWindowsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (MaintenanceWindowsClientCreateOrUpdateResponse, error)
- func (client *MaintenanceWindowsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (MaintenanceWindowsClientGetResponse, error)
- type MaintenanceWindowsClientCreateOrUpdateOptions
- type MaintenanceWindowsClientCreateOrUpdateResponse
- type MaintenanceWindowsClientGetOptions
- type MaintenanceWindowsClientGetResponse
- type MaintenanceWindowsProperties
- type ManagedBackupShortTermRetentionPoliciesClient
- func (client *ManagedBackupShortTermRetentionPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (...)
- func (client *ManagedBackupShortTermRetentionPoliciesClient) BeginUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (...)
- func (client *ManagedBackupShortTermRetentionPoliciesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedBackupShortTermRetentionPoliciesClientGetResponse, error)
- func (client *ManagedBackupShortTermRetentionPoliciesClient) ListByDatabase(resourceGroupName string, managedInstanceName string, databaseName string, ...) ...
- type ManagedBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions
- type ManagedBackupShortTermRetentionPoliciesClientBeginUpdateOptions
- type ManagedBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse
- type ManagedBackupShortTermRetentionPoliciesClientGetOptions
- type ManagedBackupShortTermRetentionPoliciesClientGetResponse
- type ManagedBackupShortTermRetentionPoliciesClientListByDatabaseOptions
- type ManagedBackupShortTermRetentionPoliciesClientListByDatabaseResponse
- type ManagedBackupShortTermRetentionPoliciesClientUpdateResponse
- type ManagedBackupShortTermRetentionPolicy
- type ManagedBackupShortTermRetentionPolicyListResult
- type ManagedBackupShortTermRetentionPolicyProperties
- type ManagedDatabase
- type ManagedDatabaseColumnsClient
- func (client *ManagedDatabaseColumnsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedDatabaseColumnsClientGetResponse, error)
- func (client *ManagedDatabaseColumnsClient) ListByDatabase(resourceGroupName string, managedInstanceName string, databaseName string, ...) *runtime.Pager[ManagedDatabaseColumnsClientListByDatabaseResponse]
- func (client *ManagedDatabaseColumnsClient) ListByTable(resourceGroupName string, managedInstanceName string, databaseName string, ...) *runtime.Pager[ManagedDatabaseColumnsClientListByTableResponse]
- type ManagedDatabaseColumnsClientGetOptions
- type ManagedDatabaseColumnsClientGetResponse
- type ManagedDatabaseColumnsClientListByDatabaseOptions
- type ManagedDatabaseColumnsClientListByDatabaseResponse
- type ManagedDatabaseColumnsClientListByTableOptions
- type ManagedDatabaseColumnsClientListByTableResponse
- type ManagedDatabaseCreateMode
- type ManagedDatabaseListResult
- type ManagedDatabaseProperties
- type ManagedDatabaseQueriesClient
- func (client *ManagedDatabaseQueriesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedDatabaseQueriesClientGetResponse, error)
- func (client *ManagedDatabaseQueriesClient) ListByQuery(resourceGroupName string, managedInstanceName string, databaseName string, ...) *runtime.Pager[ManagedDatabaseQueriesClientListByQueryResponse]
- type ManagedDatabaseQueriesClientGetOptions
- type ManagedDatabaseQueriesClientGetResponse
- type ManagedDatabaseQueriesClientListByQueryOptions
- type ManagedDatabaseQueriesClientListByQueryResponse
- type ManagedDatabaseRecommendedSensitivityLabelsClient
- type ManagedDatabaseRecommendedSensitivityLabelsClientUpdateOptions
- type ManagedDatabaseRecommendedSensitivityLabelsClientUpdateResponse
- type ManagedDatabaseRestoreDetailsClient
- type ManagedDatabaseRestoreDetailsClientGetOptions
- type ManagedDatabaseRestoreDetailsClientGetResponse
- type ManagedDatabaseRestoreDetailsProperties
- type ManagedDatabaseRestoreDetailsResult
- type ManagedDatabaseSchemasClient
- func (client *ManagedDatabaseSchemasClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedDatabaseSchemasClientGetResponse, error)
- func (client *ManagedDatabaseSchemasClient) ListByDatabase(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) ListByDatabase(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) ListByDatabase(resourceGroupName string, managedInstanceName string, databaseName string, ...) *runtime.Pager[ManagedDatabaseSensitivityLabelsClientListByDatabaseResponse]
- func (client *ManagedDatabaseSensitivityLabelsClient) ListCurrentByDatabase(resourceGroupName string, managedInstanceName string, databaseName string, ...) ...
- func (client *ManagedDatabaseSensitivityLabelsClient) ListRecommendedByDatabase(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 ManagedDatabaseSensitivityLabelsClientListByDatabaseOptions
- type ManagedDatabaseSensitivityLabelsClientListByDatabaseResponse
- type ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseOptions
- type ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseResponse
- type ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseOptions
- type ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseResponse
- type ManagedDatabaseSensitivityLabelsClientUpdateOptions
- type ManagedDatabaseSensitivityLabelsClientUpdateResponse
- type ManagedDatabaseStatus
- type ManagedDatabaseTablesClient
- func (client *ManagedDatabaseTablesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedDatabaseTablesClientGetResponse, error)
- func (client *ManagedDatabaseTablesClient) ListBySchema(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) ListByDatabase(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) ListByDatabase(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) ListByDatabase(resourceGroupName string, managedInstanceName string, databaseName string, ...) ...
- type ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions
- type ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse
- type ManagedDatabaseVulnerabilityAssessmentsClientDeleteOptions
- type ManagedDatabaseVulnerabilityAssessmentsClientDeleteResponse
- type ManagedDatabaseVulnerabilityAssessmentsClientGetOptions
- type ManagedDatabaseVulnerabilityAssessmentsClientGetResponse
- type ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseOptions
- type ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseResponse
- type ManagedDatabasesClient
- func (client *ManagedDatabasesClient) BeginCompleteRestore(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*armruntime.Poller[ManagedDatabasesClientCompleteRestoreResponse], error)
- func (client *ManagedDatabasesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*armruntime.Poller[ManagedDatabasesClientCreateOrUpdateResponse], error)
- func (client *ManagedDatabasesClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*armruntime.Poller[ManagedDatabasesClientDeleteResponse], error)
- func (client *ManagedDatabasesClient) BeginUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*armruntime.Poller[ManagedDatabasesClientUpdateResponse], error)
- func (client *ManagedDatabasesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedDatabasesClientGetResponse, error)
- func (client *ManagedDatabasesClient) ListByInstance(resourceGroupName string, managedInstanceName string, ...) *runtime.Pager[ManagedDatabasesClientListByInstanceResponse]
- func (client *ManagedDatabasesClient) ListInaccessibleByInstance(resourceGroupName string, managedInstanceName string, ...) *runtime.Pager[ManagedDatabasesClientListInaccessibleByInstanceResponse]
- type ManagedDatabasesClientBeginCompleteRestoreOptions
- type ManagedDatabasesClientBeginCreateOrUpdateOptions
- type ManagedDatabasesClientBeginDeleteOptions
- type ManagedDatabasesClientBeginUpdateOptions
- type ManagedDatabasesClientCompleteRestoreResponse
- type ManagedDatabasesClientCreateOrUpdateResponse
- type ManagedDatabasesClientDeleteResponse
- type ManagedDatabasesClientGetOptions
- type ManagedDatabasesClientGetResponse
- type ManagedDatabasesClientListByInstanceOptions
- type ManagedDatabasesClientListByInstanceResponse
- type ManagedDatabasesClientListInaccessibleByInstanceOptions
- type ManagedDatabasesClientListInaccessibleByInstanceResponse
- type ManagedDatabasesClientUpdateResponse
- type ManagedInstance
- type ManagedInstanceAdministrator
- type ManagedInstanceAdministratorListResult
- type ManagedInstanceAdministratorProperties
- type ManagedInstanceAdministratorType
- type ManagedInstanceAdministratorsClient
- func (client *ManagedInstanceAdministratorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*armruntime.Poller[ManagedInstanceAdministratorsClientCreateOrUpdateResponse], ...)
- func (client *ManagedInstanceAdministratorsClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*armruntime.Poller[ManagedInstanceAdministratorsClientDeleteResponse], error)
- func (client *ManagedInstanceAdministratorsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedInstanceAdministratorsClientGetResponse, error)
- func (client *ManagedInstanceAdministratorsClient) ListByInstance(resourceGroupName string, managedInstanceName string, ...) *runtime.Pager[ManagedInstanceAdministratorsClientListByInstanceResponse]
- type ManagedInstanceAdministratorsClientBeginCreateOrUpdateOptions
- type ManagedInstanceAdministratorsClientBeginDeleteOptions
- type ManagedInstanceAdministratorsClientCreateOrUpdateResponse
- type ManagedInstanceAdministratorsClientDeleteResponse
- type ManagedInstanceAdministratorsClientGetOptions
- type ManagedInstanceAdministratorsClientGetResponse
- type ManagedInstanceAdministratorsClientListByInstanceOptions
- type ManagedInstanceAdministratorsClientListByInstanceResponse
- type ManagedInstanceAzureADOnlyAuthListResult
- type ManagedInstanceAzureADOnlyAuthProperties
- type ManagedInstanceAzureADOnlyAuthentication
- type ManagedInstanceAzureADOnlyAuthenticationsClient
- func (client *ManagedInstanceAzureADOnlyAuthenticationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (...)
- func (client *ManagedInstanceAzureADOnlyAuthenticationsClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (...)
- func (client *ManagedInstanceAzureADOnlyAuthenticationsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedInstanceAzureADOnlyAuthenticationsClientGetResponse, error)
- func (client *ManagedInstanceAzureADOnlyAuthenticationsClient) ListByInstance(resourceGroupName string, managedInstanceName string, ...) ...
- type ManagedInstanceAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions
- type ManagedInstanceAzureADOnlyAuthenticationsClientBeginDeleteOptions
- type ManagedInstanceAzureADOnlyAuthenticationsClientCreateOrUpdateResponse
- type ManagedInstanceAzureADOnlyAuthenticationsClientDeleteResponse
- type ManagedInstanceAzureADOnlyAuthenticationsClientGetOptions
- type ManagedInstanceAzureADOnlyAuthenticationsClientGetResponse
- type ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceOptions
- type ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceResponse
- type ManagedInstanceEditionCapability
- type ManagedInstanceEncryptionProtector
- type ManagedInstanceEncryptionProtectorListResult
- type ManagedInstanceEncryptionProtectorProperties
- type ManagedInstanceEncryptionProtectorsClient
- func (client *ManagedInstanceEncryptionProtectorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (...)
- func (client *ManagedInstanceEncryptionProtectorsClient) BeginRevalidate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (...)
- func (client *ManagedInstanceEncryptionProtectorsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedInstanceEncryptionProtectorsClientGetResponse, error)
- func (client *ManagedInstanceEncryptionProtectorsClient) ListByInstance(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, ...) (*armruntime.Poller[ManagedInstanceKeysClientCreateOrUpdateResponse], error)
- func (client *ManagedInstanceKeysClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*armruntime.Poller[ManagedInstanceKeysClientDeleteResponse], error)
- func (client *ManagedInstanceKeysClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedInstanceKeysClientGetResponse, error)
- func (client *ManagedInstanceKeysClient) ListByInstance(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) ListByDatabase(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) ListByManagedInstance(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, ...) (...)
- func (client *ManagedInstancePrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedInstancePrivateEndpointConnectionsClientGetResponse, error)
- func (client *ManagedInstancePrivateEndpointConnectionsClient) ListByManagedInstance(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) ListByManagedInstance(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) ListByInstance(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, ...) (*armruntime.Poller[ManagedInstancesClientCreateOrUpdateResponse], error)
- func (client *ManagedInstancesClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*armruntime.Poller[ManagedInstancesClientDeleteResponse], error)
- func (client *ManagedInstancesClient) BeginFailover(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*armruntime.Poller[ManagedInstancesClientFailoverResponse], error)
- func (client *ManagedInstancesClient) BeginUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*armruntime.Poller[ManagedInstancesClientUpdateResponse], error)
- func (client *ManagedInstancesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedInstancesClientGetResponse, error)
- func (client *ManagedInstancesClient) List(options *ManagedInstancesClientListOptions) *runtime.Pager[ManagedInstancesClientListResponse]
- func (client *ManagedInstancesClient) ListByInstancePool(resourceGroupName string, instancePoolName string, ...) *runtime.Pager[ManagedInstancesClientListByInstancePoolResponse]
- func (client *ManagedInstancesClient) ListByManagedInstance(resourceGroupName string, managedInstanceName string, ...) *runtime.Pager[ManagedInstancesClientListByManagedInstanceResponse]
- func (client *ManagedInstancesClient) ListByResourceGroup(resourceGroupName string, ...) *runtime.Pager[ManagedInstancesClientListByResourceGroupResponse]
- type ManagedInstancesClientBeginCreateOrUpdateOptions
- type ManagedInstancesClientBeginDeleteOptions
- type ManagedInstancesClientBeginFailoverOptions
- type ManagedInstancesClientBeginUpdateOptions
- type ManagedInstancesClientCreateOrUpdateResponse
- type ManagedInstancesClientDeleteResponse
- type ManagedInstancesClientFailoverResponse
- type ManagedInstancesClientGetOptions
- type ManagedInstancesClientGetResponse
- type ManagedInstancesClientListByInstancePoolOptions
- type ManagedInstancesClientListByInstancePoolResponse
- type ManagedInstancesClientListByManagedInstanceOptions
- type ManagedInstancesClientListByManagedInstanceResponse
- type ManagedInstancesClientListByResourceGroupOptions
- type ManagedInstancesClientListByResourceGroupResponse
- type ManagedInstancesClientListOptions
- type ManagedInstancesClientListResponse
- type ManagedInstancesClientUpdateResponse
- type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient
- func (client *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (...)
- func (client *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) BeginUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (...)
- func (client *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (...)
- func (client *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) ListByRestorableDroppedDatabase(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, ...) (*armruntime.Poller[ManagedServerDNSAliasesClientAcquireResponse], error)
- func (client *ManagedServerDNSAliasesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*armruntime.Poller[ManagedServerDNSAliasesClientCreateOrUpdateResponse], error)
- func (client *ManagedServerDNSAliasesClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*armruntime.Poller[ManagedServerDNSAliasesClientDeleteResponse], error)
- func (client *ManagedServerDNSAliasesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ManagedServerDNSAliasesClientGetResponse, error)
- func (client *ManagedServerDNSAliasesClient) ListByManagedInstance(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) ListByInstance(resourceGroupName string, managedInstanceName string, ...) *runtime.Pager[ManagedServerSecurityAlertPoliciesClientListByInstanceResponse]
- type ManagedServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions
- type ManagedServerSecurityAlertPoliciesClientCreateOrUpdateResponse
- type ManagedServerSecurityAlertPoliciesClientGetOptions
- type ManagedServerSecurityAlertPoliciesClientGetResponse
- type ManagedServerSecurityAlertPoliciesClientListByInstanceOptions
- type ManagedServerSecurityAlertPoliciesClientListByInstanceResponse
- type ManagedServerSecurityAlertPolicy
- type ManagedServerSecurityAlertPolicyListResult
- type ManagedShortTermRetentionPolicyName
- type ManagedTransparentDataEncryption
- type ManagedTransparentDataEncryptionListResult
- type ManagedTransparentDataEncryptionProperties
- type ManagementOperationState
- type MaxSizeCapability
- type MaxSizeRangeCapability
- type MaxSizeUnit
- type Metric
- type MetricAvailability
- type MetricDefinition
- type MetricDefinitionListResult
- type MetricListResult
- type MetricName
- type MetricType
- type MetricValue
- type MinCapacityCapability
- type Name
- type NetworkIsolationSettings
- type Operation
- type OperationDisplay
- type OperationImpact
- type OperationListResult
- type OperationMode
- type OperationOrigin
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type OutboundFirewallRule
- type OutboundFirewallRuleListResult
- type OutboundFirewallRuleProperties
- type OutboundFirewallRulesClient
- func (client *OutboundFirewallRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[OutboundFirewallRulesClientCreateOrUpdateResponse], error)
- func (client *OutboundFirewallRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[OutboundFirewallRulesClientDeleteResponse], error)
- func (client *OutboundFirewallRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (OutboundFirewallRulesClientGetResponse, error)
- func (client *OutboundFirewallRulesClient) ListByServer(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, ...) (*armruntime.Poller[PrivateEndpointConnectionsClientCreateOrUpdateResponse], ...)
- func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)
- func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (PrivateEndpointConnectionsClientGetResponse, error)
- func (client *PrivateEndpointConnectionsClient) ListByServer(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) ListByServer(resourceGroupName string, serverName string, ...) *runtime.Pager[PrivateLinkResourcesClientListByServerResponse]
- type PrivateLinkResourcesClientGetOptions
- type PrivateLinkResourcesClientGetResponse
- type PrivateLinkResourcesClientListByServerOptions
- type PrivateLinkResourcesClientListByServerResponse
- type PrivateLinkServiceConnectionStateActionsRequire
- type PrivateLinkServiceConnectionStateProperty
- type PrivateLinkServiceConnectionStateStatus
- type ProvisioningState
- type ProxyResource
- type ProxyResourceWithWritableName
- type QueryMetricInterval
- type QueryMetricProperties
- type QueryMetricUnitType
- type QueryProperties
- type QueryStatistics
- type QueryStatisticsProperties
- type QueryTimeGrainType
- type ReadOnlyEndpointFailoverPolicy
- type ReadScaleCapability
- type ReadWriteEndpointFailoverPolicy
- type RecommendedAction
- type RecommendedActionCurrentState
- type RecommendedActionErrorInfo
- type RecommendedActionImpactRecord
- type RecommendedActionImplementationInfo
- type RecommendedActionInitiatedBy
- type RecommendedActionMetricInfo
- type RecommendedActionProperties
- type RecommendedActionStateInfo
- type RecommendedSensitivityLabelUpdate
- type RecommendedSensitivityLabelUpdateKind
- type RecommendedSensitivityLabelUpdateList
- type RecommendedSensitivityLabelUpdateProperties
- type RecommendedSensitivityLabelsClient
- type RecommendedSensitivityLabelsClientUpdateOptions
- type RecommendedSensitivityLabelsClientUpdateResponse
- type RecoverableDatabase
- type RecoverableDatabaseListResult
- type RecoverableDatabaseProperties
- type RecoverableDatabasesClient
- func (client *RecoverableDatabasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (RecoverableDatabasesClientGetResponse, error)
- func (client *RecoverableDatabasesClient) ListByServer(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) ListByInstance(resourceGroupName string, managedInstanceName string, ...) *runtime.Pager[RecoverableManagedDatabasesClientListByInstanceResponse]
- type RecoverableManagedDatabasesClientGetOptions
- type RecoverableManagedDatabasesClientGetResponse
- type RecoverableManagedDatabasesClientListByInstanceOptions
- type RecoverableManagedDatabasesClientListByInstanceResponse
- type ReplicaType
- type ReplicationLink
- type ReplicationLinkListResult
- type ReplicationLinkProperties
- type ReplicationLinkType
- type ReplicationLinksClient
- func (client *ReplicationLinksClient) BeginFailover(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[ReplicationLinksClientFailoverResponse], error)
- func (client *ReplicationLinksClient) BeginFailoverAllowDataLoss(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[ReplicationLinksClientFailoverAllowDataLossResponse], error)
- func (client *ReplicationLinksClient) Delete(ctx context.Context, resourceGroupName string, serverName string, ...) (ReplicationLinksClientDeleteResponse, error)
- func (client *ReplicationLinksClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ReplicationLinksClientGetResponse, error)
- func (client *ReplicationLinksClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[ReplicationLinksClientListByDatabaseResponse]
- func (client *ReplicationLinksClient) ListByServer(resourceGroupName string, serverName string, ...) *runtime.Pager[ReplicationLinksClientListByServerResponse]
- type ReplicationLinksClientBeginFailoverAllowDataLossOptions
- type ReplicationLinksClientBeginFailoverOptions
- type ReplicationLinksClientDeleteOptions
- type ReplicationLinksClientDeleteResponse
- type ReplicationLinksClientFailoverAllowDataLossResponse
- type ReplicationLinksClientFailoverResponse
- type ReplicationLinksClientGetOptions
- type ReplicationLinksClientGetResponse
- type ReplicationLinksClientListByDatabaseOptions
- type ReplicationLinksClientListByDatabaseResponse
- type ReplicationLinksClientListByServerOptions
- type ReplicationLinksClientListByServerResponse
- type ReplicationMode
- type ReplicationRole
- type ReplicationState
- type Resource
- type ResourceIdentity
- type ResourceMoveDefinition
- type ResourceWithWritableName
- type RestorableDroppedDatabase
- type RestorableDroppedDatabaseListResult
- type RestorableDroppedDatabaseProperties
- type RestorableDroppedDatabasesClient
- func (client *RestorableDroppedDatabasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (RestorableDroppedDatabasesClientGetResponse, error)
- func (client *RestorableDroppedDatabasesClient) ListByServer(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) ListByInstance(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, ...) (*armruntime.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) ListByDatabase(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[RestorePointsClientListByDatabaseResponse]
- type RestorePointsClientBeginCreateOptions
- type RestorePointsClientCreateResponse
- type RestorePointsClientDeleteOptions
- type RestorePointsClientDeleteResponse
- type RestorePointsClientGetOptions
- type RestorePointsClientGetResponse
- type RestorePointsClientListByDatabaseOptions
- type RestorePointsClientListByDatabaseResponse
- type SKU
- type SQLAgentConfigurationPropertiesState
- type SampleName
- type SecondaryType
- type SecurityAlertPolicyName
- type SecurityAlertPolicyProperties
- type SecurityAlertPolicyState
- type SecurityAlertsPolicyProperties
- type SecurityAlertsPolicyState
- type SecurityEvent
- type SecurityEventCollection
- type SecurityEventProperties
- type SecurityEventSQLInjectionAdditionalProperties
- type SecurityEventType
- type SecurityEventsFilterParameters
- type SensitivityLabel
- type SensitivityLabelListResult
- type SensitivityLabelProperties
- type SensitivityLabelRank
- type SensitivityLabelSource
- type SensitivityLabelUpdate
- type SensitivityLabelUpdateKind
- type SensitivityLabelUpdateList
- type SensitivityLabelUpdateProperties
- type SensitivityLabelsClient
- func (client *SensitivityLabelsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (SensitivityLabelsClientCreateOrUpdateResponse, error)
- func (client *SensitivityLabelsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, ...) (SensitivityLabelsClientDeleteResponse, error)
- func (client *SensitivityLabelsClient) DisableRecommendation(ctx context.Context, resourceGroupName string, serverName string, ...) (SensitivityLabelsClientDisableRecommendationResponse, error)
- func (client *SensitivityLabelsClient) EnableRecommendation(ctx context.Context, resourceGroupName string, serverName string, ...) (SensitivityLabelsClientEnableRecommendationResponse, error)
- func (client *SensitivityLabelsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (SensitivityLabelsClientGetResponse, error)
- func (client *SensitivityLabelsClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[SensitivityLabelsClientListByDatabaseResponse]
- func (client *SensitivityLabelsClient) ListCurrentByDatabase(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[SensitivityLabelsClientListCurrentByDatabaseResponse]
- func (client *SensitivityLabelsClient) ListRecommendedByDatabase(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 SensitivityLabelsClientListByDatabaseOptions
- type SensitivityLabelsClientListByDatabaseResponse
- type SensitivityLabelsClientListCurrentByDatabaseOptions
- type SensitivityLabelsClientListCurrentByDatabaseResponse
- type SensitivityLabelsClientListRecommendedByDatabaseOptions
- type SensitivityLabelsClientListRecommendedByDatabaseResponse
- type SensitivityLabelsClientUpdateOptions
- type SensitivityLabelsClientUpdateResponse
- type Server
- 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, ...) (*armruntime.Poller[ServerAzureADAdministratorsClientCreateOrUpdateResponse], ...)
- func (client *ServerAzureADAdministratorsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[ServerAzureADAdministratorsClientDeleteResponse], error)
- func (client *ServerAzureADAdministratorsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerAzureADAdministratorsClientGetResponse, error)
- func (client *ServerAzureADAdministratorsClient) ListByServer(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, ...) (...)
- func (client *ServerAzureADOnlyAuthenticationsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[ServerAzureADOnlyAuthenticationsClientDeleteResponse], ...)
- func (client *ServerAzureADOnlyAuthenticationsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerAzureADOnlyAuthenticationsClientGetResponse, error)
- func (client *ServerAzureADOnlyAuthenticationsClient) ListByServer(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, ...) (*armruntime.Poller[ServerBlobAuditingPoliciesClientCreateOrUpdateResponse], ...)
- func (client *ServerBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerBlobAuditingPoliciesClientGetResponse, error)
- func (client *ServerBlobAuditingPoliciesClient) ListByServer(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, ...) (*armruntime.Poller[ServerCommunicationLinksClientCreateOrUpdateResponse], ...)
- 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) ListByServer(resourceGroupName string, serverName string, ...) *runtime.Pager[ServerCommunicationLinksClientListByServerResponse]
- type ServerCommunicationLinksClientBeginCreateOrUpdateOptions
- type ServerCommunicationLinksClientCreateOrUpdateResponse
- type ServerCommunicationLinksClientDeleteOptions
- type ServerCommunicationLinksClientDeleteResponse
- type ServerCommunicationLinksClientGetOptions
- type ServerCommunicationLinksClientGetResponse
- type ServerCommunicationLinksClientListByServerOptions
- type ServerCommunicationLinksClientListByServerResponse
- type ServerConnectionPoliciesClient
- func (client *ServerConnectionPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[ServerConnectionPoliciesClientCreateOrUpdateResponse], ...)
- func (client *ServerConnectionPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerConnectionPoliciesClientGetResponse, error)
- func (client *ServerConnectionPoliciesClient) ListByServer(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, ...) (*armruntime.Poller[ServerDNSAliasesClientAcquireResponse], error)
- func (client *ServerDNSAliasesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[ServerDNSAliasesClientCreateOrUpdateResponse], error)
- func (client *ServerDNSAliasesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[ServerDNSAliasesClientDeleteResponse], error)
- func (client *ServerDNSAliasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerDNSAliasesClientGetResponse, error)
- func (client *ServerDNSAliasesClient) ListByServer(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, ...) (*armruntime.Poller[ServerDevOpsAuditSettingsClientCreateOrUpdateResponse], ...)
- func (client *ServerDevOpsAuditSettingsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerDevOpsAuditSettingsClientGetResponse, error)
- func (client *ServerDevOpsAuditSettingsClient) ListByServer(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, ...) (*armruntime.Poller[ServerKeysClientCreateOrUpdateResponse], error)
- func (client *ServerKeysClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[ServerKeysClientDeleteResponse], error)
- func (client *ServerKeysClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerKeysClientGetResponse, error)
- func (client *ServerKeysClient) ListByServer(resourceGroupName string, serverName string, ...) *runtime.Pager[ServerKeysClientListByServerResponse]
- type ServerKeysClientBeginCreateOrUpdateOptions
- type ServerKeysClientBeginDeleteOptions
- type ServerKeysClientCreateOrUpdateResponse
- type ServerKeysClientDeleteResponse
- type ServerKeysClientGetOptions
- type ServerKeysClientGetResponse
- type ServerKeysClientListByServerOptions
- type ServerKeysClientListByServerResponse
- type ServerListResult
- type ServerNetworkAccessFlag
- type ServerOperation
- type ServerOperationListResult
- type ServerOperationProperties
- type ServerOperationsClient
- type ServerOperationsClientListByServerOptions
- type ServerOperationsClientListByServerResponse
- type ServerPrivateEndpointConnection
- type ServerProperties
- type ServerSecurityAlertPoliciesClient
- func (client *ServerSecurityAlertPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[ServerSecurityAlertPoliciesClientCreateOrUpdateResponse], ...)
- func (client *ServerSecurityAlertPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ServerSecurityAlertPoliciesClientGetResponse, error)
- func (client *ServerSecurityAlertPoliciesClient) ListByServer(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, ...) (*armruntime.Poller[ServerTrustCertificatesClientCreateOrUpdateResponse], error)
- func (client *ServerTrustCertificatesClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (*armruntime.Poller[ServerTrustCertificatesClientDeleteResponse], error)
- func (client *ServerTrustCertificatesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, ...) (ServerTrustCertificatesClientGetResponse, error)
- func (client *ServerTrustCertificatesClient) ListByInstance(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, ...) (*armruntime.Poller[ServerTrustGroupsClientCreateOrUpdateResponse], error)
- func (client *ServerTrustGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, locationName string, ...) (*armruntime.Poller[ServerTrustGroupsClientDeleteResponse], error)
- func (client *ServerTrustGroupsClient) Get(ctx context.Context, resourceGroupName string, locationName string, ...) (ServerTrustGroupsClientGetResponse, error)
- func (client *ServerTrustGroupsClient) ListByInstance(resourceGroupName string, managedInstanceName string, ...) *runtime.Pager[ServerTrustGroupsClientListByInstanceResponse]
- func (client *ServerTrustGroupsClient) ListByLocation(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) ListByServer(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, ...) (*armruntime.Poller[ServersClientCreateOrUpdateResponse], error)
- func (client *ServersClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[ServersClientDeleteResponse], error)
- func (client *ServersClient) BeginImportDatabase(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[ServersClientImportDatabaseResponse], error)
- func (client *ServersClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.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) List(options *ServersClientListOptions) *runtime.Pager[ServersClientListResponse]
- func (client *ServersClient) ListByResourceGroup(resourceGroupName string, options *ServersClientListByResourceGroupOptions) *runtime.Pager[ServersClientListByResourceGroupResponse]
- type ServersClientBeginCreateOrUpdateOptions
- type ServersClientBeginDeleteOptions
- type ServersClientBeginImportDatabaseOptions
- type ServersClientBeginUpdateOptions
- type ServersClientCheckNameAvailabilityOptions
- type ServersClientCheckNameAvailabilityResponse
- type ServersClientCreateOrUpdateResponse
- type ServersClientDeleteResponse
- type ServersClientGetOptions
- type ServersClientGetResponse
- type ServersClientImportDatabaseResponse
- type ServersClientListByResourceGroupOptions
- type ServersClientListByResourceGroupResponse
- type ServersClientListOptions
- type ServersClientListResponse
- type ServersClientUpdateResponse
- type ServiceObjective
- type ServiceObjectiveCapability
- type ServiceObjectiveListResult
- type ServiceObjectiveName
- type ServiceObjectiveProperties
- type ServiceObjectivesClient
- func (client *ServiceObjectivesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (ServiceObjectivesClientGetResponse, error)
- func (client *ServiceObjectivesClient) ListByServer(resourceGroupName string, serverName string, ...) *runtime.Pager[ServiceObjectivesClientListByServerResponse]
- type ServiceObjectivesClientGetOptions
- type ServiceObjectivesClientGetResponse
- type ServiceObjectivesClientListByServerOptions
- type ServiceObjectivesClientListByServerResponse
- type ServicePrincipal
- type ServicePrincipalType
- type ShortTermRetentionPolicyName
- type SloUsageMetric
- type StorageCapability
- type StorageCapabilityStorageAccountType
- type StorageKeyType
- type SubscriptionUsage
- type SubscriptionUsageListResult
- type SubscriptionUsageProperties
- type SubscriptionUsagesClient
- func (client *SubscriptionUsagesClient) Get(ctx context.Context, locationName string, usageName string, ...) (SubscriptionUsagesClientGetResponse, error)
- func (client *SubscriptionUsagesClient) ListByLocation(locationName string, options *SubscriptionUsagesClientListByLocationOptions) *runtime.Pager[SubscriptionUsagesClientListByLocationResponse]
- type SubscriptionUsagesClientGetOptions
- type SubscriptionUsagesClientGetResponse
- type SubscriptionUsagesClientListByLocationOptions
- type SubscriptionUsagesClientListByLocationResponse
- type SyncAgent
- type SyncAgentKeyProperties
- type SyncAgentLinkedDatabase
- type SyncAgentLinkedDatabaseListResult
- type SyncAgentLinkedDatabaseProperties
- type SyncAgentListResult
- type SyncAgentProperties
- type SyncAgentState
- type SyncAgentsClient
- func (client *SyncAgentsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[SyncAgentsClientCreateOrUpdateResponse], error)
- func (client *SyncAgentsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.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) ListByServer(resourceGroupName string, serverName string, ...) *runtime.Pager[SyncAgentsClientListByServerResponse]
- func (client *SyncAgentsClient) ListLinkedDatabases(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, ...) (*armruntime.Poller[SyncGroupsClientCreateOrUpdateResponse], error)
- func (client *SyncGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[SyncGroupsClientDeleteResponse], error)
- func (client *SyncGroupsClient) BeginRefreshHubSchema(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[SyncGroupsClientRefreshHubSchemaResponse], error)
- func (client *SyncGroupsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.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) ListByDatabase(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[SyncGroupsClientListByDatabaseResponse]
- func (client *SyncGroupsClient) ListHubSchemas(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[SyncGroupsClientListHubSchemasResponse]
- func (client *SyncGroupsClient) ListLogs(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[SyncGroupsClientListLogsResponse]
- func (client *SyncGroupsClient) ListSyncDatabaseIDs(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, ...) (*armruntime.Poller[SyncMembersClientCreateOrUpdateResponse], error)
- func (client *SyncMembersClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[SyncMembersClientDeleteResponse], error)
- func (client *SyncMembersClient) BeginRefreshMemberSchema(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[SyncMembersClientRefreshMemberSchemaResponse], error)
- func (client *SyncMembersClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[SyncMembersClientUpdateResponse], error)
- func (client *SyncMembersClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (SyncMembersClientGetResponse, error)
- func (client *SyncMembersClient) ListBySyncGroup(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[SyncMembersClientListBySyncGroupResponse]
- func (client *SyncMembersClient) ListMemberSchemas(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) ListByLocation(locationName string, options *TimeZonesClientListByLocationOptions) *runtime.Pager[TimeZonesClientListByLocationResponse]
- type TimeZonesClientGetOptions
- type TimeZonesClientGetResponse
- type TimeZonesClientListByLocationOptions
- type TimeZonesClientListByLocationResponse
- type TopQueries
- type TopQueriesListResult
- type TrackedResource
- type TransparentDataEncryptionName
- type TransparentDataEncryptionProperties
- type TransparentDataEncryptionState
- type TransparentDataEncryptionsClient
- func (client *TransparentDataEncryptionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (TransparentDataEncryptionsClientCreateOrUpdateResponse, error)
- func (client *TransparentDataEncryptionsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (TransparentDataEncryptionsClientGetResponse, error)
- func (client *TransparentDataEncryptionsClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, ...) *runtime.Pager[TransparentDataEncryptionsClientListByDatabaseResponse]
- type TransparentDataEncryptionsClientCreateOrUpdateOptions
- type TransparentDataEncryptionsClientCreateOrUpdateResponse
- type TransparentDataEncryptionsClientGetOptions
- type TransparentDataEncryptionsClientGetResponse
- type TransparentDataEncryptionsClientListByDatabaseOptions
- type TransparentDataEncryptionsClientListByDatabaseResponse
- type UnitDefinitionType
- type UnitType
- type UpdateLongTermRetentionBackupParameters
- type UpdateLongTermRetentionBackupParametersProperties
- type UpdateManagedInstanceDNSServersOperation
- type UpsertManagedServerOperationParameters
- type UpsertManagedServerOperationStep
- type UpsertManagedServerOperationStepStatus
- type Usage
- type UsageListResult
- type UsagesClient
- type UsagesClientListByInstancePoolOptions
- type UsagesClientListByInstancePoolResponse
- type UserIdentity
- type VirtualCluster
- type VirtualClusterListResult
- type VirtualClusterProperties
- type VirtualClusterUpdate
- type VirtualClustersClient
- func (client *VirtualClustersClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualClusterName string, ...) (*armruntime.Poller[VirtualClustersClientDeleteResponse], error)
- func (client *VirtualClustersClient) BeginUpdate(ctx context.Context, resourceGroupName string, virtualClusterName string, ...) (*armruntime.Poller[VirtualClustersClientUpdateResponse], error)
- func (client *VirtualClustersClient) Get(ctx context.Context, resourceGroupName string, virtualClusterName string, ...) (VirtualClustersClientGetResponse, error)
- func (client *VirtualClustersClient) List(options *VirtualClustersClientListOptions) *runtime.Pager[VirtualClustersClientListResponse]
- func (client *VirtualClustersClient) ListByResourceGroup(resourceGroupName string, ...) *runtime.Pager[VirtualClustersClientListByResourceGroupResponse]
- func (client *VirtualClustersClient) UpdateDNSServers(ctx context.Context, resourceGroupName string, virtualClusterName string, ...) (VirtualClustersClientUpdateDNSServersResponse, error)
- type VirtualClustersClientBeginDeleteOptions
- type VirtualClustersClientBeginUpdateOptions
- type VirtualClustersClientDeleteResponse
- type VirtualClustersClientGetOptions
- type VirtualClustersClientGetResponse
- type VirtualClustersClientListByResourceGroupOptions
- type VirtualClustersClientListByResourceGroupResponse
- type VirtualClustersClientListOptions
- type VirtualClustersClientListResponse
- type VirtualClustersClientUpdateDNSServersOptions
- type VirtualClustersClientUpdateDNSServersResponse
- type VirtualClustersClientUpdateResponse
- type VirtualNetworkRule
- type VirtualNetworkRuleListResult
- type VirtualNetworkRuleProperties
- type VirtualNetworkRuleState
- type VirtualNetworkRulesClient
- func (client *VirtualNetworkRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[VirtualNetworkRulesClientCreateOrUpdateResponse], error)
- func (client *VirtualNetworkRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[VirtualNetworkRulesClientDeleteResponse], error)
- func (client *VirtualNetworkRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (VirtualNetworkRulesClientGetResponse, error)
- func (client *VirtualNetworkRulesClient) ListByServer(resourceGroupName string, serverName string, ...) *runtime.Pager[VirtualNetworkRulesClientListByServerResponse]
- type VirtualNetworkRulesClientBeginCreateOrUpdateOptions
- type VirtualNetworkRulesClientBeginDeleteOptions
- type VirtualNetworkRulesClientCreateOrUpdateResponse
- type VirtualNetworkRulesClientDeleteResponse
- type VirtualNetworkRulesClientGetOptions
- type VirtualNetworkRulesClientGetResponse
- type VirtualNetworkRulesClientListByServerOptions
- type VirtualNetworkRulesClientListByServerResponse
- type VulnerabilityAssessmentName
- type VulnerabilityAssessmentPolicyBaselineName
- type VulnerabilityAssessmentRecurringScansProperties
- type VulnerabilityAssessmentScanError
- type VulnerabilityAssessmentScanRecord
- type VulnerabilityAssessmentScanRecordListResult
- type VulnerabilityAssessmentScanRecordProperties
- type VulnerabilityAssessmentScanState
- type VulnerabilityAssessmentScanTriggerType
- type WorkloadClassifier
- type WorkloadClassifierListResult
- type WorkloadClassifierProperties
- type WorkloadClassifiersClient
- func (client *WorkloadClassifiersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[WorkloadClassifiersClientCreateOrUpdateResponse], error)
- func (client *WorkloadClassifiersClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[WorkloadClassifiersClientDeleteResponse], error)
- func (client *WorkloadClassifiersClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (WorkloadClassifiersClientGetResponse, error)
- func (client *WorkloadClassifiersClient) ListByWorkloadGroup(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, ...) (*armruntime.Poller[WorkloadGroupsClientCreateOrUpdateResponse], error)
- func (client *WorkloadGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, ...) (*armruntime.Poller[WorkloadGroupsClientDeleteResponse], error)
- func (client *WorkloadGroupsClient) Get(ctx context.Context, resourceGroupName string, serverName string, ...) (WorkloadGroupsClientGetResponse, error)
- func (client *WorkloadGroupsClient) ListByDatabase(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.BeginUpdate
- BackupShortTermRetentionPoliciesClient.Get
- BackupShortTermRetentionPoliciesClient.ListByDatabase
- CapabilitiesClient.ListByLocation
- DataMaskingPoliciesClient.CreateOrUpdate
- DataMaskingPoliciesClient.Get
- DataMaskingRulesClient.CreateOrUpdate
- DataMaskingRulesClient.ListByDatabase
- DataWarehouseUserActivitiesClient.Get
- DataWarehouseUserActivitiesClient.ListByDatabase
- DatabaseAdvisorsClient.Get
- DatabaseAdvisorsClient.ListByDatabase
- DatabaseAdvisorsClient.Update
- DatabaseAutomaticTuningClient.Get
- DatabaseAutomaticTuningClient.Update
- DatabaseBlobAuditingPoliciesClient.CreateOrUpdate
- DatabaseBlobAuditingPoliciesClient.Get
- DatabaseBlobAuditingPoliciesClient.ListByDatabase
- DatabaseColumnsClient.Get
- DatabaseColumnsClient.ListByDatabase
- DatabaseColumnsClient.ListByTable
- DatabaseExtensionsClient.BeginCreateOrUpdate
- DatabaseExtensionsClient.Get
- DatabaseExtensionsClient.ListByDatabase
- DatabaseOperationsClient.Cancel
- DatabaseOperationsClient.ListByDatabase
- DatabaseRecommendedActionsClient.Get
- DatabaseRecommendedActionsClient.ListByDatabaseAdvisor
- DatabaseRecommendedActionsClient.Update
- DatabaseSchemasClient.Get
- DatabaseSchemasClient.ListByDatabase
- DatabaseSecurityAlertPoliciesClient.CreateOrUpdate
- DatabaseSecurityAlertPoliciesClient.Get
- DatabaseSecurityAlertPoliciesClient.ListByDatabase
- DatabaseTablesClient.Get
- DatabaseTablesClient.ListBySchema
- DatabaseUsagesClient.ListByDatabase
- DatabaseVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate
- DatabaseVulnerabilityAssessmentRuleBaselinesClient.Delete
- DatabaseVulnerabilityAssessmentRuleBaselinesClient.Get
- DatabaseVulnerabilityAssessmentScansClient.BeginInitiateScan
- DatabaseVulnerabilityAssessmentScansClient.Export
- DatabaseVulnerabilityAssessmentScansClient.Get
- DatabaseVulnerabilityAssessmentScansClient.ListByDatabase
- DatabaseVulnerabilityAssessmentsClient.CreateOrUpdate
- DatabaseVulnerabilityAssessmentsClient.Delete
- DatabaseVulnerabilityAssessmentsClient.Get
- DatabaseVulnerabilityAssessmentsClient.ListByDatabase
- DatabasesClient.BeginCreateOrUpdate
- DatabasesClient.BeginDelete
- DatabasesClient.BeginExport
- DatabasesClient.BeginFailover
- DatabasesClient.BeginImport
- DatabasesClient.BeginPause
- DatabasesClient.BeginResume
- DatabasesClient.BeginUpdate
- DatabasesClient.BeginUpgradeDataWarehouse
- DatabasesClient.Get
- DatabasesClient.ListByElasticPool
- DatabasesClient.ListByServer
- DatabasesClient.ListInaccessibleByServer
- DatabasesClient.ListMetricDefinitions
- DatabasesClient.ListMetrics
- DatabasesClient.Rename
- DeletedServersClient.BeginRecover
- DeletedServersClient.Get
- DeletedServersClient.List
- DeletedServersClient.ListByLocation
- DistributedAvailabilityGroupsClient.BeginCreateOrUpdate
- DistributedAvailabilityGroupsClient.BeginDelete
- DistributedAvailabilityGroupsClient.BeginUpdate
- DistributedAvailabilityGroupsClient.Get
- DistributedAvailabilityGroupsClient.ListByInstance
- ElasticPoolActivitiesClient.ListByElasticPool
- ElasticPoolDatabaseActivitiesClient.ListByElasticPool
- ElasticPoolOperationsClient.Cancel
- ElasticPoolOperationsClient.ListByElasticPool
- ElasticPoolsClient.BeginCreateOrUpdate
- ElasticPoolsClient.BeginDelete
- ElasticPoolsClient.BeginFailover
- ElasticPoolsClient.BeginUpdate
- ElasticPoolsClient.Get
- ElasticPoolsClient.ListByServer
- ElasticPoolsClient.ListMetricDefinitions
- ElasticPoolsClient.ListMetrics
- EncryptionProtectorsClient.BeginCreateOrUpdate
- EncryptionProtectorsClient.BeginRevalidate
- EncryptionProtectorsClient.Get
- EncryptionProtectorsClient.ListByServer
- EndpointCertificatesClient.Get
- EndpointCertificatesClient.ListByInstance
- ExtendedDatabaseBlobAuditingPoliciesClient.CreateOrUpdate
- ExtendedDatabaseBlobAuditingPoliciesClient.Get
- ExtendedDatabaseBlobAuditingPoliciesClient.ListByDatabase
- ExtendedServerBlobAuditingPoliciesClient.BeginCreateOrUpdate
- ExtendedServerBlobAuditingPoliciesClient.Get
- ExtendedServerBlobAuditingPoliciesClient.ListByServer
- FailoverGroupsClient.BeginCreateOrUpdate
- FailoverGroupsClient.BeginDelete
- FailoverGroupsClient.BeginFailover
- FailoverGroupsClient.BeginForceFailoverAllowDataLoss
- FailoverGroupsClient.BeginUpdate
- FailoverGroupsClient.Get
- FailoverGroupsClient.ListByServer
- FirewallRulesClient.CreateOrUpdate
- FirewallRulesClient.Delete
- FirewallRulesClient.Get
- FirewallRulesClient.ListByServer
- FirewallRulesClient.Replace
- GeoBackupPoliciesClient.CreateOrUpdate
- GeoBackupPoliciesClient.Get
- GeoBackupPoliciesClient.ListByDatabase
- IPv6FirewallRulesClient.CreateOrUpdate
- IPv6FirewallRulesClient.Delete
- IPv6FirewallRulesClient.Get
- IPv6FirewallRulesClient.ListByServer
- InstanceFailoverGroupsClient.BeginCreateOrUpdate
- InstanceFailoverGroupsClient.BeginDelete
- InstanceFailoverGroupsClient.BeginFailover
- InstanceFailoverGroupsClient.BeginForceFailoverAllowDataLoss
- InstanceFailoverGroupsClient.Get
- InstanceFailoverGroupsClient.ListByLocation
- InstancePoolsClient.BeginCreateOrUpdate
- InstancePoolsClient.BeginDelete
- InstancePoolsClient.BeginUpdate
- InstancePoolsClient.Get
- InstancePoolsClient.List
- InstancePoolsClient.ListByResourceGroup
- JobAgentsClient.BeginCreateOrUpdate
- JobAgentsClient.BeginDelete
- JobAgentsClient.BeginUpdate
- JobAgentsClient.Get
- JobAgentsClient.ListByServer
- JobCredentialsClient.CreateOrUpdate
- JobCredentialsClient.Delete
- JobCredentialsClient.Get
- JobCredentialsClient.ListByAgent
- JobExecutionsClient.BeginCreate
- JobExecutionsClient.BeginCreateOrUpdate
- JobExecutionsClient.Cancel
- JobExecutionsClient.Get
- JobExecutionsClient.ListByAgent
- JobExecutionsClient.ListByJob
- JobStepExecutionsClient.Get
- JobStepExecutionsClient.ListByJobExecution
- JobStepsClient.CreateOrUpdate
- JobStepsClient.Delete
- JobStepsClient.Get
- JobStepsClient.GetByVersion
- JobStepsClient.ListByJob
- JobStepsClient.ListByVersion
- JobTargetExecutionsClient.Get
- JobTargetExecutionsClient.ListByJobExecution
- JobTargetExecutionsClient.ListByStep
- JobTargetGroupsClient.CreateOrUpdate
- JobTargetGroupsClient.Delete
- JobTargetGroupsClient.Get
- JobTargetGroupsClient.ListByAgent
- JobVersionsClient.Get
- JobVersionsClient.ListByJob
- JobsClient.CreateOrUpdate
- JobsClient.Delete
- JobsClient.Get
- JobsClient.ListByAgent
- LedgerDigestUploadsClient.BeginCreateOrUpdate
- LedgerDigestUploadsClient.BeginDisable
- LedgerDigestUploadsClient.Get
- LedgerDigestUploadsClient.ListByDatabase
- LongTermRetentionBackupsClient.BeginCopy
- LongTermRetentionBackupsClient.BeginCopyByResourceGroup
- LongTermRetentionBackupsClient.BeginDelete
- LongTermRetentionBackupsClient.BeginDeleteByResourceGroup
- LongTermRetentionBackupsClient.BeginUpdate
- LongTermRetentionBackupsClient.BeginUpdateByResourceGroup
- LongTermRetentionBackupsClient.Get
- LongTermRetentionBackupsClient.GetByResourceGroup
- LongTermRetentionBackupsClient.ListByDatabase
- LongTermRetentionBackupsClient.ListByLocation
- LongTermRetentionBackupsClient.ListByResourceGroupDatabase
- LongTermRetentionBackupsClient.ListByResourceGroupLocation
- LongTermRetentionBackupsClient.ListByResourceGroupServer
- LongTermRetentionBackupsClient.ListByServer
- LongTermRetentionManagedInstanceBackupsClient.BeginDelete
- LongTermRetentionManagedInstanceBackupsClient.BeginDeleteByResourceGroup
- LongTermRetentionManagedInstanceBackupsClient.Get
- LongTermRetentionManagedInstanceBackupsClient.GetByResourceGroup
- LongTermRetentionManagedInstanceBackupsClient.ListByDatabase
- LongTermRetentionManagedInstanceBackupsClient.ListByInstance
- LongTermRetentionManagedInstanceBackupsClient.ListByLocation
- LongTermRetentionManagedInstanceBackupsClient.ListByResourceGroupDatabase
- LongTermRetentionManagedInstanceBackupsClient.ListByResourceGroupInstance
- LongTermRetentionManagedInstanceBackupsClient.ListByResourceGroupLocation
- LongTermRetentionPoliciesClient.BeginCreateOrUpdate
- LongTermRetentionPoliciesClient.Get
- LongTermRetentionPoliciesClient.ListByDatabase
- MaintenanceWindowOptionsClient.Get
- MaintenanceWindowsClient.CreateOrUpdate
- MaintenanceWindowsClient.Get
- ManagedBackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate
- ManagedBackupShortTermRetentionPoliciesClient.BeginUpdate
- ManagedBackupShortTermRetentionPoliciesClient.Get
- ManagedBackupShortTermRetentionPoliciesClient.ListByDatabase
- ManagedDatabaseColumnsClient.Get
- ManagedDatabaseColumnsClient.ListByDatabase
- ManagedDatabaseColumnsClient.ListByTable
- ManagedDatabaseQueriesClient.Get
- ManagedDatabaseQueriesClient.ListByQuery
- ManagedDatabaseRecommendedSensitivityLabelsClient.Update
- ManagedDatabaseRestoreDetailsClient.Get
- ManagedDatabaseSchemasClient.Get
- ManagedDatabaseSchemasClient.ListByDatabase
- ManagedDatabaseSecurityAlertPoliciesClient.CreateOrUpdate
- ManagedDatabaseSecurityAlertPoliciesClient.Get
- ManagedDatabaseSecurityAlertPoliciesClient.ListByDatabase
- ManagedDatabaseSecurityEventsClient.ListByDatabase
- ManagedDatabaseSensitivityLabelsClient.CreateOrUpdate
- ManagedDatabaseSensitivityLabelsClient.Delete
- ManagedDatabaseSensitivityLabelsClient.DisableRecommendation
- ManagedDatabaseSensitivityLabelsClient.EnableRecommendation
- ManagedDatabaseSensitivityLabelsClient.Get
- ManagedDatabaseSensitivityLabelsClient.ListByDatabase
- ManagedDatabaseSensitivityLabelsClient.ListCurrentByDatabase
- ManagedDatabaseSensitivityLabelsClient.ListRecommendedByDatabase
- ManagedDatabaseSensitivityLabelsClient.Update
- ManagedDatabaseTablesClient.Get
- ManagedDatabaseTablesClient.ListBySchema
- ManagedDatabaseTransparentDataEncryptionClient.CreateOrUpdate
- ManagedDatabaseTransparentDataEncryptionClient.Get
- ManagedDatabaseTransparentDataEncryptionClient.ListByDatabase
- ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate
- ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.Delete
- ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.Get
- ManagedDatabaseVulnerabilityAssessmentScansClient.BeginInitiateScan
- ManagedDatabaseVulnerabilityAssessmentScansClient.Export
- ManagedDatabaseVulnerabilityAssessmentScansClient.Get
- ManagedDatabaseVulnerabilityAssessmentScansClient.ListByDatabase
- ManagedDatabaseVulnerabilityAssessmentsClient.CreateOrUpdate
- ManagedDatabaseVulnerabilityAssessmentsClient.Delete
- ManagedDatabaseVulnerabilityAssessmentsClient.Get
- ManagedDatabaseVulnerabilityAssessmentsClient.ListByDatabase
- ManagedDatabasesClient.BeginCompleteRestore
- ManagedDatabasesClient.BeginCreateOrUpdate
- ManagedDatabasesClient.BeginDelete
- ManagedDatabasesClient.BeginUpdate
- ManagedDatabasesClient.Get
- ManagedDatabasesClient.ListByInstance
- ManagedDatabasesClient.ListInaccessibleByInstance
- ManagedInstanceAdministratorsClient.BeginCreateOrUpdate
- ManagedInstanceAdministratorsClient.BeginDelete
- ManagedInstanceAdministratorsClient.Get
- ManagedInstanceAdministratorsClient.ListByInstance
- ManagedInstanceAzureADOnlyAuthenticationsClient.BeginCreateOrUpdate
- ManagedInstanceAzureADOnlyAuthenticationsClient.BeginDelete
- ManagedInstanceAzureADOnlyAuthenticationsClient.Get
- ManagedInstanceAzureADOnlyAuthenticationsClient.ListByInstance
- ManagedInstanceEncryptionProtectorsClient.BeginCreateOrUpdate
- ManagedInstanceEncryptionProtectorsClient.BeginRevalidate
- ManagedInstanceEncryptionProtectorsClient.Get
- ManagedInstanceEncryptionProtectorsClient.ListByInstance
- ManagedInstanceKeysClient.BeginCreateOrUpdate
- ManagedInstanceKeysClient.BeginDelete
- ManagedInstanceKeysClient.Get
- ManagedInstanceKeysClient.ListByInstance
- ManagedInstanceLongTermRetentionPoliciesClient.BeginCreateOrUpdate
- ManagedInstanceLongTermRetentionPoliciesClient.Get
- ManagedInstanceLongTermRetentionPoliciesClient.ListByDatabase
- ManagedInstanceOperationsClient.Cancel
- ManagedInstanceOperationsClient.Get
- ManagedInstanceOperationsClient.ListByManagedInstance
- ManagedInstancePrivateEndpointConnectionsClient.BeginCreateOrUpdate
- ManagedInstancePrivateEndpointConnectionsClient.BeginDelete
- ManagedInstancePrivateEndpointConnectionsClient.Get
- ManagedInstancePrivateEndpointConnectionsClient.ListByManagedInstance
- ManagedInstancePrivateLinkResourcesClient.Get
- ManagedInstancePrivateLinkResourcesClient.ListByManagedInstance
- ManagedInstanceTdeCertificatesClient.BeginCreate
- ManagedInstanceVulnerabilityAssessmentsClient.CreateOrUpdate
- ManagedInstanceVulnerabilityAssessmentsClient.Delete
- ManagedInstanceVulnerabilityAssessmentsClient.Get
- ManagedInstanceVulnerabilityAssessmentsClient.ListByInstance
- ManagedInstancesClient.BeginCreateOrUpdate
- ManagedInstancesClient.BeginDelete
- ManagedInstancesClient.BeginFailover
- ManagedInstancesClient.BeginUpdate
- ManagedInstancesClient.Get
- ManagedInstancesClient.List
- ManagedInstancesClient.ListByInstancePool
- ManagedInstancesClient.ListByManagedInstance
- ManagedInstancesClient.ListByResourceGroup
- ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate
- ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.BeginUpdate
- ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.Get
- ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.ListByRestorableDroppedDatabase
- ManagedServerDNSAliasesClient.BeginAcquire
- ManagedServerDNSAliasesClient.BeginCreateOrUpdate
- ManagedServerDNSAliasesClient.BeginDelete
- ManagedServerDNSAliasesClient.Get
- ManagedServerDNSAliasesClient.ListByManagedInstance
- ManagedServerSecurityAlertPoliciesClient.BeginCreateOrUpdate
- ManagedServerSecurityAlertPoliciesClient.Get
- ManagedServerSecurityAlertPoliciesClient.ListByInstance
- OutboundFirewallRulesClient.BeginCreateOrUpdate
- OutboundFirewallRulesClient.BeginDelete
- OutboundFirewallRulesClient.Get
- OutboundFirewallRulesClient.ListByServer
- PrivateEndpointConnectionsClient.BeginCreateOrUpdate
- PrivateEndpointConnectionsClient.BeginDelete
- PrivateEndpointConnectionsClient.Get
- PrivateEndpointConnectionsClient.ListByServer
- PrivateLinkResourcesClient.Get
- PrivateLinkResourcesClient.ListByServer
- RecommendedSensitivityLabelsClient.Update
- RecoverableDatabasesClient.Get
- RecoverableDatabasesClient.ListByServer
- RecoverableManagedDatabasesClient.Get
- RecoverableManagedDatabasesClient.ListByInstance
- ReplicationLinksClient.BeginFailover
- ReplicationLinksClient.BeginFailoverAllowDataLoss
- ReplicationLinksClient.Delete
- ReplicationLinksClient.Get
- ReplicationLinksClient.ListByDatabase
- ReplicationLinksClient.ListByServer
- RestorableDroppedDatabasesClient.Get
- RestorableDroppedDatabasesClient.ListByServer
- RestorableDroppedManagedDatabasesClient.Get
- RestorableDroppedManagedDatabasesClient.ListByInstance
- RestorePointsClient.BeginCreate
- RestorePointsClient.Delete
- RestorePointsClient.Get
- RestorePointsClient.ListByDatabase
- SensitivityLabelsClient.CreateOrUpdate
- SensitivityLabelsClient.Delete
- SensitivityLabelsClient.DisableRecommendation
- SensitivityLabelsClient.EnableRecommendation
- SensitivityLabelsClient.Get
- SensitivityLabelsClient.ListByDatabase
- SensitivityLabelsClient.ListCurrentByDatabase
- SensitivityLabelsClient.ListRecommendedByDatabase
- SensitivityLabelsClient.Update
- ServerAdvisorsClient.Get
- ServerAdvisorsClient.ListByServer
- ServerAdvisorsClient.Update
- ServerAutomaticTuningClient.Get
- ServerAutomaticTuningClient.Update
- ServerAzureADAdministratorsClient.BeginCreateOrUpdate
- ServerAzureADAdministratorsClient.BeginDelete
- ServerAzureADAdministratorsClient.Get
- ServerAzureADAdministratorsClient.ListByServer
- ServerAzureADOnlyAuthenticationsClient.BeginCreateOrUpdate
- ServerAzureADOnlyAuthenticationsClient.BeginDelete
- ServerAzureADOnlyAuthenticationsClient.Get
- ServerAzureADOnlyAuthenticationsClient.ListByServer
- ServerBlobAuditingPoliciesClient.BeginCreateOrUpdate
- ServerBlobAuditingPoliciesClient.Get
- ServerBlobAuditingPoliciesClient.ListByServer
- ServerCommunicationLinksClient.BeginCreateOrUpdate
- ServerCommunicationLinksClient.Delete
- ServerCommunicationLinksClient.Get
- ServerCommunicationLinksClient.ListByServer
- ServerConnectionPoliciesClient.BeginCreateOrUpdate
- ServerConnectionPoliciesClient.Get
- ServerConnectionPoliciesClient.ListByServer
- ServerDNSAliasesClient.BeginAcquire
- ServerDNSAliasesClient.BeginCreateOrUpdate
- ServerDNSAliasesClient.BeginDelete
- ServerDNSAliasesClient.Get
- ServerDNSAliasesClient.ListByServer
- ServerDevOpsAuditSettingsClient.BeginCreateOrUpdate
- ServerDevOpsAuditSettingsClient.Get
- ServerDevOpsAuditSettingsClient.ListByServer
- ServerKeysClient.BeginCreateOrUpdate
- ServerKeysClient.BeginDelete
- ServerKeysClient.Get
- ServerKeysClient.ListByServer
- ServerOperationsClient.ListByServer
- ServerSecurityAlertPoliciesClient.BeginCreateOrUpdate
- ServerSecurityAlertPoliciesClient.Get
- ServerSecurityAlertPoliciesClient.ListByServer
- ServerTrustCertificatesClient.BeginCreateOrUpdate
- ServerTrustCertificatesClient.BeginDelete
- ServerTrustCertificatesClient.Get
- ServerTrustCertificatesClient.ListByInstance
- ServerTrustGroupsClient.BeginCreateOrUpdate
- ServerTrustGroupsClient.BeginDelete
- ServerTrustGroupsClient.Get
- ServerTrustGroupsClient.ListByInstance
- ServerTrustGroupsClient.ListByLocation
- ServerUsagesClient.ListByServer
- ServerVulnerabilityAssessmentsClient.CreateOrUpdate
- ServerVulnerabilityAssessmentsClient.Delete
- ServerVulnerabilityAssessmentsClient.Get
- ServerVulnerabilityAssessmentsClient.ListByServer
- ServersClient.BeginCreateOrUpdate
- ServersClient.BeginDelete
- ServersClient.BeginImportDatabase
- ServersClient.BeginUpdate
- ServersClient.CheckNameAvailability
- ServersClient.Get
- ServersClient.List
- ServersClient.ListByResourceGroup
- ServiceObjectivesClient.Get
- ServiceObjectivesClient.ListByServer
- SubscriptionUsagesClient.Get
- SubscriptionUsagesClient.ListByLocation
- SyncAgentsClient.BeginCreateOrUpdate
- SyncAgentsClient.BeginDelete
- SyncAgentsClient.GenerateKey
- SyncAgentsClient.Get
- SyncAgentsClient.ListByServer
- SyncAgentsClient.ListLinkedDatabases
- SyncGroupsClient.BeginCreateOrUpdate
- SyncGroupsClient.BeginDelete
- SyncGroupsClient.BeginRefreshHubSchema
- SyncGroupsClient.BeginUpdate
- SyncGroupsClient.CancelSync
- SyncGroupsClient.Get
- SyncGroupsClient.ListByDatabase
- SyncGroupsClient.ListHubSchemas
- SyncGroupsClient.ListLogs
- SyncGroupsClient.TriggerSync
- SyncMembersClient.BeginCreateOrUpdate
- SyncMembersClient.BeginDelete
- SyncMembersClient.BeginRefreshMemberSchema
- SyncMembersClient.BeginUpdate
- SyncMembersClient.Get
- SyncMembersClient.ListBySyncGroup
- SyncMembersClient.ListMemberSchemas
- TdeCertificatesClient.BeginCreate
- TimeZonesClient.Get
- TimeZonesClient.ListByLocation
- TransparentDataEncryptionsClient.CreateOrUpdate
- TransparentDataEncryptionsClient.Get
- TransparentDataEncryptionsClient.ListByDatabase
- UsagesClient.ListByInstancePool
- VirtualClustersClient.BeginDelete
- VirtualClustersClient.BeginUpdate
- VirtualClustersClient.Get
- VirtualClustersClient.List
- VirtualClustersClient.ListByResourceGroup
- VirtualNetworkRulesClient.BeginCreateOrUpdate
- VirtualNetworkRulesClient.BeginDelete
- VirtualNetworkRulesClient.Get
- VirtualNetworkRulesClient.ListByServer
- WorkloadClassifiersClient.BeginCreateOrUpdate
- WorkloadClassifiersClient.BeginDelete
- WorkloadClassifiersClient.Get
- WorkloadClassifiersClient.ListByWorkloadGroup
- WorkloadGroupsClient.BeginCreateOrUpdate
- WorkloadGroupsClient.BeginDelete
- WorkloadGroupsClient.Get
- WorkloadGroupsClient.ListByDatabase
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 `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ServerAzureADAdministrator `json:"value,omitempty" azure:"ro"` }
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.
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 `json:"administratorType,omitempty"` // REQUIRED; Login name of the server administrator. Login *string `json:"login,omitempty"` // REQUIRED; SID (object ID) of the server administrator. Sid *string `json:"sid,omitempty"` // Tenant ID of the administrator. TenantID *string `json:"tenantId,omitempty"` // READ-ONLY; Azure Active Directory only Authentication enabled. AzureADOnlyAuthentication *bool `json:"azureADOnlyAuthentication,omitempty" azure:"ro"` }
AdministratorProperties - Properties of a active directory administrator.
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 Advisor ¶
type Advisor struct { // Resource properties. Properties *AdvisorProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource kind. Kind *string `json:"kind,omitempty" azure:"ro"` // READ-ONLY; Resource location. Location *string `json:"location,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
Advisor - Database, Server or Elastic Pool Advisor.
func (Advisor) MarshalJSON ¶
MarshalJSON implements the json.Marshaller 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 `json:"autoExecuteStatus,omitempty"` // READ-ONLY; Gets the status of availability of this advisor to customers. Possible values are 'GA', 'PublicPreview', 'LimitedPublicPreview' // and 'PrivatePreview'. AdvisorStatus *AdvisorStatus `json:"advisorStatus,omitempty" azure:"ro"` // 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 `json:"autoExecuteStatusInheritedFrom,omitempty" azure:"ro"` // READ-ONLY; Gets the time when the current resource was analyzed for recommendations by this advisor. LastChecked *time.Time `json:"lastChecked,omitempty" azure:"ro"` // 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 `json:"recommendationsStatus,omitempty" azure:"ro"` // READ-ONLY; Gets the recommended actions for this advisor. RecommendedActions []*RecommendedAction `json:"recommendedActions,omitempty" azure:"ro"` }
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" AdvisorStatusPublicPreview AdvisorStatus = "PublicPreview" AdvisorStatusLimitedPublicPreview AdvisorStatus = "LimitedPublicPreview" AdvisorStatusPrivatePreview AdvisorStatus = "PrivatePreview" )
func PossibleAdvisorStatusValues ¶
func PossibleAdvisorStatusValues() []AdvisorStatus
PossibleAdvisorStatusValues returns the possible values for the AdvisorStatus const type.
type AgentClient ¶ added in v0.3.0
type AgentClient struct {
// contains filtered or unexported fields
}
AgentClient contains the methods for the SQLAgent group. Don't use this type directly, use NewAgentClient() instead.
func NewAgentClient ¶ added in v0.3.0
func NewAgentClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AgentClient, error)
NewAgentClient creates a new instance of AgentClient with the specified values. subscriptionID - The subscription ID that identifies an Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*AgentClient) CreateOrUpdate ¶ added in v0.3.0
func (client *AgentClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters AgentConfiguration, options *AgentClientCreateOrUpdateOptions) (AgentClientCreateOrUpdateResponse, error)
CreateOrUpdate - Puts new sql agent configuration to instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SqlAgentConfigurationPut.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewAgentClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.CreateOrUpdate(ctx, "<resource-group-name>", "<managed-instance-name>", armsql.AgentConfiguration{ Properties: &armsql.AgentConfigurationProperties{ State: to.Ptr(armsql.SQLAgentConfigurationPropertiesStateEnabled), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*AgentClient) Get ¶ added in v0.3.0
func (client *AgentClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, options *AgentClientGetOptions) (AgentClientGetResponse, error)
Get - Gets current instance sql agent configuration. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SqlAgentConfigurationGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewAgentClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
type AgentClientCreateOrUpdateOptions ¶ added in v0.3.0
type AgentClientCreateOrUpdateOptions struct { }
AgentClientCreateOrUpdateOptions contains the optional parameters for the AgentClient.CreateOrUpdate method.
type AgentClientCreateOrUpdateResponse ¶ added in v0.3.0
type AgentClientCreateOrUpdateResponse struct {
AgentConfiguration
}
AgentClientCreateOrUpdateResponse contains the response from method AgentClient.CreateOrUpdate.
type AgentClientGetOptions ¶ added in v0.3.0
type AgentClientGetOptions struct { }
AgentClientGetOptions contains the optional parameters for the AgentClient.Get method.
type AgentClientGetResponse ¶ added in v0.3.0
type AgentClientGetResponse struct {
AgentConfiguration
}
AgentClientGetResponse contains the response from method AgentClient.Get.
type AgentConfiguration ¶ added in v0.3.0
type AgentConfiguration struct { // Resource properties. Properties *AgentConfigurationProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
AgentConfiguration - A recoverable managed database resource.
type AgentConfigurationProperties ¶ added in v0.3.0
type AgentConfigurationProperties struct { // The state of Sql Agent. State *SQLAgentConfigurationPropertiesState `json:"state,omitempty"` }
AgentConfigurationProperties - Sql agent configuration properties.
type AggregationFunctionType ¶
type AggregationFunctionType string
const ( AggregationFunctionTypeAvg AggregationFunctionType = "avg" AggregationFunctionTypeMax AggregationFunctionType = "max" AggregationFunctionTypeMin AggregationFunctionType = "min" AggregationFunctionTypeStdev AggregationFunctionType = "stdev" AggregationFunctionTypeSum AggregationFunctionType = "sum" )
func PossibleAggregationFunctionTypeValues ¶
func PossibleAggregationFunctionTypeValues() []AggregationFunctionType
PossibleAggregationFunctionTypeValues returns the possible values for the AggregationFunctionType const type.
type AuthenticationName ¶
type AuthenticationName string
const (
AuthenticationNameDefault AuthenticationName = "Default"
)
func PossibleAuthenticationNameValues ¶
func PossibleAuthenticationNameValues() []AuthenticationName
PossibleAuthenticationNameValues returns the possible values for the AuthenticationName const type.
type AutoExecuteStatus ¶
type AutoExecuteStatus string
AutoExecuteStatus - Gets the auto-execute status (whether to let the system execute the recommendations) of this advisor. Possible values are 'Enabled' and 'Disabled'
const ( AutoExecuteStatusEnabled AutoExecuteStatus = "Enabled" AutoExecuteStatusDisabled AutoExecuteStatus = "Disabled" AutoExecuteStatusDefault AutoExecuteStatus = "Default" )
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 ( AutoExecuteStatusInheritedFromDefault AutoExecuteStatusInheritedFrom = "Default" AutoExecuteStatusInheritedFromSubscription AutoExecuteStatusInheritedFrom = "Subscription" AutoExecuteStatusInheritedFromServer AutoExecuteStatusInheritedFrom = "Server" AutoExecuteStatusInheritedFromElasticPool AutoExecuteStatusInheritedFrom = "ElasticPool" AutoExecuteStatusInheritedFromDatabase AutoExecuteStatusInheritedFrom = "Database" )
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 `json:"default,omitempty" azure:"ro"` // READ-ONLY; Value that is used to not pause (infinite delay before pause) DoNotPauseValue *int32 `json:"doNotPauseValue,omitempty" azure:"ro"` // READ-ONLY; Maximum value MaxValue *int32 `json:"maxValue,omitempty" azure:"ro"` // READ-ONLY; Minimum value MinValue *int32 `json:"minValue,omitempty" azure:"ro"` // READ-ONLY; Step value for discrete values between the minimum value and the maximum value. StepSize *int32 `json:"stepSize,omitempty" azure:"ro"` // READ-ONLY; Unit of time that delay is expressed in Unit *PauseDelayTimeUnit `json:"unit,omitempty" azure:"ro"` }
AutoPauseDelayTimeRange - Supported auto pause delay time range
type AutomaticTuningDisabledReason ¶
type AutomaticTuningDisabledReason string
AutomaticTuningDisabledReason - Reason description if desired and actual state are different.
const ( AutomaticTuningDisabledReasonDefault AutomaticTuningDisabledReason = "Default" AutomaticTuningDisabledReasonDisabled AutomaticTuningDisabledReason = "Disabled" AutomaticTuningDisabledReasonAutoConfigured AutomaticTuningDisabledReason = "AutoConfigured" AutomaticTuningDisabledReasonInheritedFromServer AutomaticTuningDisabledReason = "InheritedFromServer" AutomaticTuningDisabledReasonQueryStoreOff AutomaticTuningDisabledReason = "QueryStoreOff" AutomaticTuningDisabledReasonQueryStoreReadOnly AutomaticTuningDisabledReason = "QueryStoreReadOnly" AutomaticTuningDisabledReasonNotSupported AutomaticTuningDisabledReason = "NotSupported" )
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 ( AutomaticTuningModeInherit AutomaticTuningMode = "Inherit" AutomaticTuningModeCustom AutomaticTuningMode = "Custom" AutomaticTuningModeAuto AutomaticTuningMode = "Auto" 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 ( AutomaticTuningOptionModeDesiredOff AutomaticTuningOptionModeDesired = "Off" AutomaticTuningOptionModeDesiredOn AutomaticTuningOptionModeDesired = "On" AutomaticTuningOptionModeDesiredDefault AutomaticTuningOptionModeDesired = "Default" )
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 `json:"desiredState,omitempty"` // READ-ONLY; Automatic tuning option actual state. ActualState *AutomaticTuningOptionModeActual `json:"actualState,omitempty" azure:"ro"` // READ-ONLY; Reason code if desired and actual state are different. ReasonCode *int32 `json:"reasonCode,omitempty" azure:"ro"` // READ-ONLY; Reason description if desired and actual state are different. ReasonDesc *AutomaticTuningDisabledReason `json:"reasonDesc,omitempty" azure:"ro"` }
AutomaticTuningOptions - Automatic tuning properties for individual advisors.
type AutomaticTuningServerMode ¶
type AutomaticTuningServerMode string
AutomaticTuningServerMode - Automatic tuning desired state.
const ( AutomaticTuningServerModeCustom AutomaticTuningServerMode = "Custom" AutomaticTuningServerModeAuto AutomaticTuningServerMode = "Auto" 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 `json:"desiredState,omitempty"` // READ-ONLY; Automatic tuning option actual state. ActualState *AutomaticTuningOptionModeActual `json:"actualState,omitempty" azure:"ro"` // READ-ONLY; Reason code if desired and actual state are different. ReasonCode *int32 `json:"reasonCode,omitempty" azure:"ro"` // READ-ONLY; Reason description if desired and actual state are different. ReasonDesc *AutomaticTuningServerReason `json:"reasonDesc,omitempty" azure:"ro"` }
AutomaticTuningServerOptions - Automatic tuning properties for individual advisors.
type AutomaticTuningServerProperties ¶
type AutomaticTuningServerProperties struct { // Automatic tuning desired state. DesiredState *AutomaticTuningServerMode `json:"desiredState,omitempty"` // Automatic tuning options definition. Options map[string]*AutomaticTuningServerOptions `json:"options,omitempty"` // READ-ONLY; Automatic tuning actual state. ActualState *AutomaticTuningServerMode `json:"actualState,omitempty" azure:"ro"` }
AutomaticTuningServerProperties - Server-level Automatic Tuning properties.
func (AutomaticTuningServerProperties) MarshalJSON ¶
func (a AutomaticTuningServerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AutomaticTuningServerProperties.
type AutomaticTuningServerReason ¶
type AutomaticTuningServerReason string
AutomaticTuningServerReason - Reason description if desired and actual state are different.
const ( AutomaticTuningServerReasonDefault AutomaticTuningServerReason = "Default" AutomaticTuningServerReasonDisabled AutomaticTuningServerReason = "Disabled" AutomaticTuningServerReasonAutoConfigured AutomaticTuningServerReason = "AutoConfigured" )
func PossibleAutomaticTuningServerReasonValues ¶
func PossibleAutomaticTuningServerReasonValues() []AutomaticTuningServerReason
PossibleAutomaticTuningServerReasonValues returns the possible values for the AutomaticTuningServerReason const type.
type AzureADOnlyAuthListResult ¶
type AzureADOnlyAuthListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ServerAzureADOnlyAuthentication `json:"value,omitempty" azure:"ro"` }
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.
type AzureADOnlyAuthProperties ¶
type AzureADOnlyAuthProperties struct { // REQUIRED; Azure Active Directory only Authentication enabled. AzureADOnlyAuthentication *bool `json:"azureADOnlyAuthentication,omitempty"` }
AzureADOnlyAuthProperties - Properties of a active directory only authentication.
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) (*armruntime.Poller[BackupShortTermRetentionPoliciesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Updates a database's short term retention policy. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpdateShortTermRetentionPolicy.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewBackupShortTermRetentionPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<database-name>", armsql.ShortTermRetentionPolicyNameDefault, armsql.BackupShortTermRetentionPolicy{ Properties: &armsql.BackupShortTermRetentionPolicyProperties{ DiffBackupIntervalInHours: to.Ptr(armsql.DiffBackupIntervalInHours(24)), RetentionDays: to.Ptr[int32](7), }, }, &armsql.BackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*BackupShortTermRetentionPoliciesClient) BeginUpdate ¶
func (client *BackupShortTermRetentionPoliciesClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, policyName ShortTermRetentionPolicyName, parameters BackupShortTermRetentionPolicy, options *BackupShortTermRetentionPoliciesClientBeginUpdateOptions) (*armruntime.Poller[BackupShortTermRetentionPoliciesClientUpdateResponse], error)
BeginUpdate - Updates a database's short term retention policy. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/UpdateShortTermRetentionPolicy.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewBackupShortTermRetentionPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginUpdate(ctx, "<resource-group-name>", "<server-name>", "<database-name>", armsql.ShortTermRetentionPolicyNameDefault, armsql.BackupShortTermRetentionPolicy{ Properties: &armsql.BackupShortTermRetentionPolicyProperties{ DiffBackupIntervalInHours: to.Ptr(armsql.DiffBackupIntervalInHours(24)), RetentionDays: to.Ptr[int32](7), }, }, &armsql.BackupShortTermRetentionPoliciesClientBeginUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetShortTermRetentionPolicy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewBackupShortTermRetentionPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", armsql.ShortTermRetentionPolicyNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*BackupShortTermRetentionPoliciesClient) ListByDatabase ¶
func (client *BackupShortTermRetentionPoliciesClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, options *BackupShortTermRetentionPoliciesClientListByDatabaseOptions) *runtime.Pager[BackupShortTermRetentionPoliciesClientListByDatabaseResponse]
ListByDatabase - Gets a database's short term retention policy. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListShortTermRetentionPoliciesByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewBackupShortTermRetentionPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<server-name>", "<database-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type BackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type BackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
BackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the BackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate method.
type BackupShortTermRetentionPoliciesClientBeginUpdateOptions ¶ added in v0.3.0
type BackupShortTermRetentionPoliciesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
BackupShortTermRetentionPoliciesClientBeginUpdateOptions contains the optional parameters for the BackupShortTermRetentionPoliciesClient.BeginUpdate method.
type BackupShortTermRetentionPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type BackupShortTermRetentionPoliciesClientCreateOrUpdateResponse struct {
BackupShortTermRetentionPolicy
}
BackupShortTermRetentionPoliciesClientCreateOrUpdateResponse contains the response from method BackupShortTermRetentionPoliciesClient.CreateOrUpdate.
type BackupShortTermRetentionPoliciesClientGetOptions ¶ added in v0.3.0
type BackupShortTermRetentionPoliciesClientGetOptions struct { }
BackupShortTermRetentionPoliciesClientGetOptions contains the optional parameters for the BackupShortTermRetentionPoliciesClient.Get method.
type BackupShortTermRetentionPoliciesClientGetResponse ¶ added in v0.3.0
type BackupShortTermRetentionPoliciesClientGetResponse struct {
BackupShortTermRetentionPolicy
}
BackupShortTermRetentionPoliciesClientGetResponse contains the response from method BackupShortTermRetentionPoliciesClient.Get.
type BackupShortTermRetentionPoliciesClientListByDatabaseOptions ¶ added in v0.3.0
type BackupShortTermRetentionPoliciesClientListByDatabaseOptions struct { }
BackupShortTermRetentionPoliciesClientListByDatabaseOptions contains the optional parameters for the BackupShortTermRetentionPoliciesClient.ListByDatabase method.
type BackupShortTermRetentionPoliciesClientListByDatabaseResponse ¶ added in v0.3.0
type BackupShortTermRetentionPoliciesClientListByDatabaseResponse struct {
BackupShortTermRetentionPolicyListResult
}
BackupShortTermRetentionPoliciesClientListByDatabaseResponse contains the response from method BackupShortTermRetentionPoliciesClient.ListByDatabase.
type BackupShortTermRetentionPoliciesClientUpdateResponse ¶ added in v0.3.0
type BackupShortTermRetentionPoliciesClientUpdateResponse struct {
BackupShortTermRetentionPolicy
}
BackupShortTermRetentionPoliciesClientUpdateResponse contains the response from method BackupShortTermRetentionPoliciesClient.Update.
type BackupShortTermRetentionPolicy ¶
type BackupShortTermRetentionPolicy struct { // Resource properties. Properties *BackupShortTermRetentionPolicyProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
BackupShortTermRetentionPolicy - A short term retention policy.
func (BackupShortTermRetentionPolicy) MarshalJSON ¶
func (b BackupShortTermRetentionPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BackupShortTermRetentionPolicy.
type BackupShortTermRetentionPolicyListResult ¶
type BackupShortTermRetentionPolicyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*BackupShortTermRetentionPolicy `json:"value,omitempty" azure:"ro"` }
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.
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 `json:"diffBackupIntervalInHours,omitempty"` // The backup retention period in days. This is how many days Point-in-Time Restore will be supported. RetentionDays *int32 `json:"retentionDays,omitempty"` }
BackupShortTermRetentionPolicyProperties - Properties of a short term retention policy
type BackupStorageRedundancy ¶
type BackupStorageRedundancy string
BackupStorageRedundancy - The storage account type used to store backups for this database.
const ( BackupStorageRedundancyGeo BackupStorageRedundancy = "Geo" BackupStorageRedundancyGeoZone BackupStorageRedundancy = "GeoZone" BackupStorageRedundancyLocal BackupStorageRedundancy = "Local" BackupStorageRedundancyZone BackupStorageRedundancy = "Zone" )
func PossibleBackupStorageRedundancyValues ¶
func PossibleBackupStorageRedundancyValues() []BackupStorageRedundancy
PossibleBackupStorageRedundancyValues returns the possible values for the BackupStorageRedundancy const type.
type BaseLongTermRetentionPolicyProperties ¶
type BaseLongTermRetentionPolicyProperties struct { // The monthly retention policy for an LTR backup in an ISO 8601 format. MonthlyRetention *string `json:"monthlyRetention,omitempty"` // The week of year to take the yearly backup in an ISO 8601 format. WeekOfYear *int32 `json:"weekOfYear,omitempty"` // The weekly retention policy for an LTR backup in an ISO 8601 format. WeeklyRetention *string `json:"weeklyRetention,omitempty"` // The yearly retention policy for an LTR backup in an ISO 8601 format. YearlyRetention *string `json:"yearlyRetention,omitempty"` }
BaseLongTermRetentionPolicyProperties - Properties of a long term retention policy
type BlobAuditingPolicyState ¶
type BlobAuditingPolicyState string
BlobAuditingPolicyState - Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.
const ( BlobAuditingPolicyStateEnabled BlobAuditingPolicyState = "Enabled" BlobAuditingPolicyStateDisabled BlobAuditingPolicyState = "Disabled" )
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. 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/LocationCapabilityListByLocation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewCapabilitiesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.ListByLocation(ctx, "<location-name>", &armsql.CapabilitiesClientListByLocationOptions{Include: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
type CapabilitiesClientListByLocationOptions ¶ added in v0.3.0
type CapabilitiesClientListByLocationOptions struct { // If specified, restricts the response to only include the selected item. Include *CapabilityGroup }
CapabilitiesClientListByLocationOptions contains the optional parameters for the CapabilitiesClient.ListByLocation method.
type CapabilitiesClientListByLocationResponse ¶ added in v0.3.0
type CapabilitiesClientListByLocationResponse struct {
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 ( CapabilityStatusVisible CapabilityStatus = "Visible" CapabilityStatusAvailable CapabilityStatus = "Available" CapabilityStatusDefault CapabilityStatus = "Default" CapabilityStatusDisabled CapabilityStatus = "Disabled" )
func PossibleCapabilityStatusValues ¶
func PossibleCapabilityStatusValues() []CapabilityStatus
PossibleCapabilityStatusValues returns the possible values for the CapabilityStatus const type.
type CatalogCollationType ¶
type CatalogCollationType string
CatalogCollationType - Collation of the metadata catalog.
const ( CatalogCollationTypeDATABASEDEFAULT CatalogCollationType = "DATABASE_DEFAULT" CatalogCollationTypeSQLLatin1GeneralCP1CIAS CatalogCollationType = "SQL_Latin1_General_CP1_CI_AS" )
func PossibleCatalogCollationTypeValues ¶
func PossibleCatalogCollationTypeValues() []CatalogCollationType
PossibleCatalogCollationTypeValues returns the possible values for the CatalogCollationType const type.
type CheckNameAvailabilityReason ¶
type CheckNameAvailabilityReason string
CheckNameAvailabilityReason - The reason code explaining why the name is unavailable. Will be undefined if the name is available.
const ( CheckNameAvailabilityReasonInvalid CheckNameAvailabilityReason = "Invalid" CheckNameAvailabilityReasonAlreadyExists CheckNameAvailabilityReason = "AlreadyExists" )
func PossibleCheckNameAvailabilityReasonValues ¶
func PossibleCheckNameAvailabilityReasonValues() []CheckNameAvailabilityReason
PossibleCheckNameAvailabilityReasonValues returns the possible values for the CheckNameAvailabilityReason const type.
type CheckNameAvailabilityRequest ¶
type CheckNameAvailabilityRequest struct { // REQUIRED Name *string `json:"name,omitempty"` // REQUIRED Type *string `json:"type,omitempty"` }
CheckNameAvailabilityRequest - A request to check whether the specified name for a resource is available.
type CheckNameAvailabilityResponse ¶
type CheckNameAvailabilityResponse struct { // READ-ONLY; True if the name is available, otherwise false. Available *bool `json:"available,omitempty" azure:"ro"` // READ-ONLY; A message explaining why the name is unavailable. Will be undefined if the name is available. Message *string `json:"message,omitempty" azure:"ro"` // READ-ONLY; The name whose availability was checked. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The reason code explaining why the name is unavailable. Will be undefined if the name is available. Reason *CheckNameAvailabilityReason `json:"reason,omitempty" azure:"ro"` }
CheckNameAvailabilityResponse - The result of a name availability check.
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 `json:"lastBackupName,omitempty"` }
CompleteDatabaseRestoreDefinition - Contains the information necessary to perform a complete database restore operation.
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 `json:"properties,omitempty"` }
CopyLongTermRetentionBackupParameters - Contains the information necessary to perform long term retention backup copy operation.
type CopyLongTermRetentionBackupParametersProperties ¶
type CopyLongTermRetentionBackupParametersProperties struct { // The storage redundancy type of the copied backup TargetBackupStorageRedundancy *BackupStorageRedundancy `json:"targetBackupStorageRedundancy,omitempty"` // The name of the database owns the copied backup. TargetDatabaseName *string `json:"targetDatabaseName,omitempty"` // The resource group that owns the target server TargetResourceGroup *string `json:"targetResourceGroup,omitempty"` // The fully qualified domain name of the target server TargetServerFullyQualifiedDomainName *string `json:"targetServerFullyQualifiedDomainName,omitempty"` // The resource Id of the target server that owns the database TargetServerResourceID *string `json:"targetServerResourceId,omitempty"` // The subscription that owns the target server TargetSubscriptionID *string `json:"targetSubscriptionId,omitempty"` }
CopyLongTermRetentionBackupParametersProperties - Contains the properties to perform long term retention backup copy operation.
type CreateDatabaseRestorePointDefinition ¶
type CreateDatabaseRestorePointDefinition struct { // REQUIRED; The restore point label to apply RestorePointLabel *string `json:"restorePointLabel,omitempty"` }
CreateDatabaseRestorePointDefinition - Contains the information necessary to perform a create database restore point operation.
type CreateMode ¶
type CreateMode string
CreateMode - Specifies the mode of database creation. Default: regular database creation. Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of the source database. Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified as the resource ID of the existing primary database. PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be specified. Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the recoverable database resource ID to restore. Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime may also be specified to restore from an earlier point in time. RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID. Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition.
const ( CreateModeCopy CreateMode = "Copy" CreateModeDefault CreateMode = "Default" CreateModeOnlineSecondary CreateMode = "OnlineSecondary" CreateModePointInTimeRestore CreateMode = "PointInTimeRestore" CreateModeRecovery CreateMode = "Recovery" CreateModeRestore CreateMode = "Restore" CreateModeRestoreExternalBackup CreateMode = "RestoreExternalBackup" CreateModeRestoreExternalBackupSecondary CreateMode = "RestoreExternalBackupSecondary" CreateModeRestoreLongTermRetentionBackup CreateMode = "RestoreLongTermRetentionBackup" CreateModeSecondary CreateMode = "Secondary" )
func PossibleCreateModeValues ¶
func PossibleCreateModeValues() []CreateMode
PossibleCreateModeValues returns the possible values for the CreateMode const type.
type CreatedByType ¶
type CreatedByType string
CreatedByType - The type of identity that created the resource.
const ( CreatedByTypeApplication CreatedByType = "Application" CreatedByTypeKey CreatedByType = "Key" CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" CreatedByTypeUser CreatedByType = "User" )
func PossibleCreatedByTypeValues ¶
func PossibleCreatedByTypeValues() []CreatedByType
PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
type DNSRefreshConfigurationProperties ¶
type DNSRefreshConfigurationProperties struct { // READ-ONLY; The status of the DNS refresh operation. Status *DNSRefreshConfigurationPropertiesStatus `json:"status,omitempty" azure:"ro"` }
DNSRefreshConfigurationProperties - DNS refresh configuration properties.
type DNSRefreshConfigurationPropertiesStatus ¶
type DNSRefreshConfigurationPropertiesStatus string
DNSRefreshConfigurationPropertiesStatus - The status of the DNS refresh operation.
const ( DNSRefreshConfigurationPropertiesStatusFailed DNSRefreshConfigurationPropertiesStatus = "Failed" DNSRefreshConfigurationPropertiesStatusSucceeded DNSRefreshConfigurationPropertiesStatus = "Succeeded" )
func PossibleDNSRefreshConfigurationPropertiesStatusValues ¶
func PossibleDNSRefreshConfigurationPropertiesStatusValues() []DNSRefreshConfigurationPropertiesStatus
PossibleDNSRefreshConfigurationPropertiesStatusValues returns the possible values for the DNSRefreshConfigurationPropertiesStatus const type.
type DataMaskingFunction ¶
type DataMaskingFunction string
DataMaskingFunction - The masking function that is used for the data masking rule.
const ( DataMaskingFunctionDefault DataMaskingFunction = "Default" DataMaskingFunctionCCN DataMaskingFunction = "CCN" 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. resourceGroupName - The name of the resource group that contains the resource. You can 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingPolicyCreateOrUpdateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDataMaskingPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.CreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<database-name>", armsql.DataMaskingPolicy{ Properties: &armsql.DataMaskingPolicyProperties{ DataMaskingState: to.Ptr(armsql.DataMaskingStateEnabled), ExemptPrincipals: to.Ptr("<exempt-principals>"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingPolicyGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDataMaskingPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
type DataMaskingPoliciesClientCreateOrUpdateOptions ¶ added in v0.3.0
type DataMaskingPoliciesClientCreateOrUpdateOptions struct { }
DataMaskingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the DataMaskingPoliciesClient.CreateOrUpdate method.
type DataMaskingPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type DataMaskingPoliciesClientCreateOrUpdateResponse struct {
DataMaskingPolicy
}
DataMaskingPoliciesClientCreateOrUpdateResponse contains the response from method DataMaskingPoliciesClient.CreateOrUpdate.
type DataMaskingPoliciesClientGetOptions ¶ added in v0.3.0
type DataMaskingPoliciesClientGetOptions struct { }
DataMaskingPoliciesClientGetOptions contains the optional parameters for the DataMaskingPoliciesClient.Get method.
type DataMaskingPoliciesClientGetResponse ¶ added in v0.3.0
type DataMaskingPoliciesClientGetResponse struct {
DataMaskingPolicy
}
DataMaskingPoliciesClientGetResponse contains the response from method DataMaskingPoliciesClient.Get.
type DataMaskingPolicy ¶
type DataMaskingPolicy struct { // The properties of the data masking policy. Properties *DataMaskingPolicyProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The kind of data masking policy. Metadata, used for Azure portal. Kind *string `json:"kind,omitempty" azure:"ro"` // READ-ONLY; The location of the data masking policy. Location *string `json:"location,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
DataMaskingPolicy - Represents a database data masking policy.
type DataMaskingPolicyProperties ¶
type DataMaskingPolicyProperties struct { // REQUIRED; The state of the data masking policy. DataMaskingState *DataMaskingState `json:"dataMaskingState,omitempty"` // 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 `json:"exemptPrincipals,omitempty"` // READ-ONLY; The list of the application principals. This is a legacy parameter and is no longer used. ApplicationPrincipals *string `json:"applicationPrincipals,omitempty" azure:"ro"` // READ-ONLY; The masking level. This is a legacy parameter and is no longer used. MaskingLevel *string `json:"maskingLevel,omitempty" azure:"ro"` }
DataMaskingPolicyProperties - The properties of a database data masking policy.
type DataMaskingRule ¶
type DataMaskingRule struct { // The properties of the resource. Properties *DataMaskingRuleProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The kind of Data Masking Rule. Metadata, used for Azure portal. Kind *string `json:"kind,omitempty" azure:"ro"` // READ-ONLY; The location of the data masking rule. Location *string `json:"location,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
DataMaskingRule - Represents a database data masking rule.
type DataMaskingRuleListResult ¶
type DataMaskingRuleListResult struct { // The list of database data masking rules. Value []*DataMaskingRule `json:"value,omitempty"` }
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.
type DataMaskingRuleProperties ¶
type DataMaskingRuleProperties struct { // REQUIRED; The column name on which the data masking rule is applied. ColumnName *string `json:"columnName,omitempty"` // REQUIRED; The masking function that is used for the data masking rule. MaskingFunction *DataMaskingFunction `json:"maskingFunction,omitempty"` // REQUIRED; The schema name on which the data masking rule is applied. SchemaName *string `json:"schemaName,omitempty"` // REQUIRED; The table name on which the data masking rule is applied. TableName *string `json:"tableName,omitempty"` // The alias name. This is a legacy parameter and is no longer used. AliasName *string `json:"aliasName,omitempty"` // The numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will // be ignored. NumberFrom *string `json:"numberFrom,omitempty"` // The numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter // will be ignored. NumberTo *string `json:"numberTo,omitempty"` // 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 `json:"prefixSize,omitempty"` // 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 `json:"replacementString,omitempty"` // 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 `json:"ruleState,omitempty"` // 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 `json:"suffixSize,omitempty"` // READ-ONLY; The rule Id. ID *string `json:"id,omitempty" azure:"ro"` }
DataMaskingRuleProperties - The properties of a database data masking rule.
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. resourceGroupName - The name of the resource group that contains the resource. You can 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleCreateOrUpdateDefaultMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDataMaskingRulesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.CreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<data-masking-rule-name>", armsql.DataMaskingRule{ Properties: &armsql.DataMaskingRuleProperties{ AliasName: to.Ptr("<alias-name>"), ColumnName: to.Ptr("<column-name>"), MaskingFunction: to.Ptr(armsql.DataMaskingFunctionDefault), RuleState: to.Ptr(armsql.DataMaskingRuleStateEnabled), SchemaName: to.Ptr("<schema-name>"), TableName: to.Ptr("<table-name>"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*DataMaskingRulesClient) ListByDatabase ¶
func (client *DataMaskingRulesClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, options *DataMaskingRulesClientListByDatabaseOptions) *runtime.Pager[DataMaskingRulesClientListByDatabaseResponse]
ListByDatabase - Gets a list of database data masking rules. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DataMaskingRuleList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDataMaskingRulesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<server-name>", "<database-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type DataMaskingRulesClientCreateOrUpdateOptions ¶ added in v0.3.0
type DataMaskingRulesClientCreateOrUpdateOptions struct { }
DataMaskingRulesClientCreateOrUpdateOptions contains the optional parameters for the DataMaskingRulesClient.CreateOrUpdate method.
type DataMaskingRulesClientCreateOrUpdateResponse ¶ added in v0.3.0
type DataMaskingRulesClientCreateOrUpdateResponse struct {
DataMaskingRule
}
DataMaskingRulesClientCreateOrUpdateResponse contains the response from method DataMaskingRulesClient.CreateOrUpdate.
type DataMaskingRulesClientListByDatabaseOptions ¶ added in v0.3.0
type DataMaskingRulesClientListByDatabaseOptions struct { }
DataMaskingRulesClientListByDatabaseOptions contains the optional parameters for the DataMaskingRulesClient.ListByDatabase method.
type DataMaskingRulesClientListByDatabaseResponse ¶ added in v0.3.0
type DataMaskingRulesClientListByDatabaseResponse struct {
DataMaskingRuleListResult
}
DataMaskingRulesClientListByDatabaseResponse contains the response from method DataMaskingRulesClient.ListByDatabase.
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 `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
DataWarehouseUserActivities - User activities of a data warehouse
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetDataWarehouseUserActivities.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDataWarehouseUserActivitiesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", armsql.DataWarehouseUserActivityNameCurrent, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*DataWarehouseUserActivitiesClient) ListByDatabase ¶
func (client *DataWarehouseUserActivitiesClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, options *DataWarehouseUserActivitiesClientListByDatabaseOptions) *runtime.Pager[DataWarehouseUserActivitiesClientListByDatabaseResponse]
ListByDatabase - List the user activities of a data warehouse which includes running and suspended queries If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListDataWarehouseUserActivities.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDataWarehouseUserActivitiesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<server-name>", "<database-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type DataWarehouseUserActivitiesClientGetOptions ¶ added in v0.3.0
type DataWarehouseUserActivitiesClientGetOptions struct { }
DataWarehouseUserActivitiesClientGetOptions contains the optional parameters for the DataWarehouseUserActivitiesClient.Get method.
type DataWarehouseUserActivitiesClientGetResponse ¶ added in v0.3.0
type DataWarehouseUserActivitiesClientGetResponse struct {
DataWarehouseUserActivities
}
DataWarehouseUserActivitiesClientGetResponse contains the response from method DataWarehouseUserActivitiesClient.Get.
type DataWarehouseUserActivitiesClientListByDatabaseOptions ¶ added in v0.3.0
type DataWarehouseUserActivitiesClientListByDatabaseOptions struct { }
DataWarehouseUserActivitiesClientListByDatabaseOptions contains the optional parameters for the DataWarehouseUserActivitiesClient.ListByDatabase method.
type DataWarehouseUserActivitiesClientListByDatabaseResponse ¶ added in v0.3.0
type DataWarehouseUserActivitiesClientListByDatabaseResponse struct {
DataWarehouseUserActivitiesListResult
}
DataWarehouseUserActivitiesClientListByDatabaseResponse contains the response from method DataWarehouseUserActivitiesClient.ListByDatabase.
type DataWarehouseUserActivitiesListResult ¶
type DataWarehouseUserActivitiesListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*DataWarehouseUserActivities `json:"value,omitempty" azure:"ro"` }
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.
type DataWarehouseUserActivitiesProperties ¶
type DataWarehouseUserActivitiesProperties struct { // READ-ONLY; Count of running and suspended queries. ActiveQueriesCount *int32 `json:"activeQueriesCount,omitempty" azure:"ro"` }
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).
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 `json:"location,omitempty"` // The Azure Active Directory identity of the database. Identity *DatabaseIdentity `json:"identity,omitempty"` // Resource properties. Properties *DatabaseProperties `json:"properties,omitempty"` // 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 `json:"sku,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Kind of database. This is metadata used for the Azure portal experience. Kind *string `json:"kind,omitempty" azure:"ro"` // READ-ONLY; Resource that manages the database. ManagedBy *string `json:"managedBy,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
Database - A database resource.
func (Database) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Database.
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseAdvisorGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseAdvisorsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<advisor-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseAdvisorList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseAdvisorsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.ListByDatabase(ctx, "<resource-group-name>", "<server-name>", "<database-name>", &armsql.DatabaseAdvisorsClientListByDatabaseOptions{Expand: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseAdvisorUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseAdvisorsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Update(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<advisor-name>", armsql.Advisor{ Properties: &armsql.AdvisorProperties{ AutoExecuteStatus: to.Ptr(armsql.AutoExecuteStatusDisabled), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
type DatabaseAdvisorsClientGetOptions ¶ added in v0.3.0
type DatabaseAdvisorsClientGetOptions struct { }
DatabaseAdvisorsClientGetOptions contains the optional parameters for the DatabaseAdvisorsClient.Get method.
type DatabaseAdvisorsClientGetResponse ¶ added in v0.3.0
type DatabaseAdvisorsClientGetResponse struct {
Advisor
}
DatabaseAdvisorsClientGetResponse contains the response from method DatabaseAdvisorsClient.Get.
type DatabaseAdvisorsClientListByDatabaseOptions ¶ added in v0.3.0
type DatabaseAdvisorsClientListByDatabaseOptions struct { // The child resources to include in the response. Expand *string }
DatabaseAdvisorsClientListByDatabaseOptions contains the optional parameters for the DatabaseAdvisorsClient.ListByDatabase method.
type DatabaseAdvisorsClientListByDatabaseResponse ¶ added in v0.3.0
type DatabaseAdvisorsClientListByDatabaseResponse struct { // Array of Advisor AdvisorArray []*Advisor }
DatabaseAdvisorsClientListByDatabaseResponse contains the response from method DatabaseAdvisorsClient.ListByDatabase.
type DatabaseAdvisorsClientUpdateOptions ¶ added in v0.3.0
type DatabaseAdvisorsClientUpdateOptions struct { }
DatabaseAdvisorsClientUpdateOptions contains the optional parameters for the DatabaseAdvisorsClient.Update method.
type DatabaseAdvisorsClientUpdateResponse ¶ added in v0.3.0
type DatabaseAdvisorsClientUpdateResponse struct {
Advisor
}
DatabaseAdvisorsClientUpdateResponse contains the response from method DatabaseAdvisorsClient.Update.
type DatabaseAutomaticTuning ¶
type DatabaseAutomaticTuning struct { // Resource properties. Properties *DatabaseAutomaticTuningProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
DatabaseAutomaticTuning - Database-level Automatic Tuning.
func (DatabaseAutomaticTuning) MarshalJSON ¶
func (d DatabaseAutomaticTuning) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller 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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseAutomaticTuningGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseAutomaticTuningClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseAutomaticTuningUpdateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseAutomaticTuningClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Update(ctx, "<resource-group-name>", "<server-name>", "<database-name>", 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) return } // TODO: use response item _ = res }
Output:
type DatabaseAutomaticTuningClientGetOptions ¶ added in v0.3.0
type DatabaseAutomaticTuningClientGetOptions struct { }
DatabaseAutomaticTuningClientGetOptions contains the optional parameters for the DatabaseAutomaticTuningClient.Get method.
type DatabaseAutomaticTuningClientGetResponse ¶ added in v0.3.0
type DatabaseAutomaticTuningClientGetResponse struct {
DatabaseAutomaticTuning
}
DatabaseAutomaticTuningClientGetResponse contains the response from method DatabaseAutomaticTuningClient.Get.
type DatabaseAutomaticTuningClientUpdateOptions ¶ added in v0.3.0
type DatabaseAutomaticTuningClientUpdateOptions struct { }
DatabaseAutomaticTuningClientUpdateOptions contains the optional parameters for the DatabaseAutomaticTuningClient.Update method.
type DatabaseAutomaticTuningClientUpdateResponse ¶ added in v0.3.0
type DatabaseAutomaticTuningClientUpdateResponse struct {
DatabaseAutomaticTuning
}
DatabaseAutomaticTuningClientUpdateResponse contains the response from method DatabaseAutomaticTuningClient.Update.
type DatabaseAutomaticTuningProperties ¶
type DatabaseAutomaticTuningProperties struct { // Automatic tuning desired state. DesiredState *AutomaticTuningMode `json:"desiredState,omitempty"` // Automatic tuning options definition. Options map[string]*AutomaticTuningOptions `json:"options,omitempty"` // READ-ONLY; Automatic tuning actual state. ActualState *AutomaticTuningMode `json:"actualState,omitempty" azure:"ro"` }
DatabaseAutomaticTuningProperties - Database-level Automatic Tuning properties.
func (DatabaseAutomaticTuningProperties) MarshalJSON ¶
func (d DatabaseAutomaticTuningProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller 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. resourceGroupName - The name of the resource group that contains the resource. You can 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseAzureMonitorAuditingCreateMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseBlobAuditingPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.CreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<database-name>", 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) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseBlobAuditingGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseBlobAuditingPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*DatabaseBlobAuditingPoliciesClient) ListByDatabase ¶
func (client *DatabaseBlobAuditingPoliciesClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, options *DatabaseBlobAuditingPoliciesClientListByDatabaseOptions) *runtime.Pager[DatabaseBlobAuditingPoliciesClientListByDatabaseResponse]
ListByDatabase - Lists auditing settings of a database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseAuditingSettingsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseBlobAuditingPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<server-name>", "<database-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type DatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions ¶ added in v0.3.0
type DatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions struct { }
DatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the DatabaseBlobAuditingPoliciesClient.CreateOrUpdate method.
type DatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type DatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse struct {
DatabaseBlobAuditingPolicy
}
DatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse contains the response from method DatabaseBlobAuditingPoliciesClient.CreateOrUpdate.
type DatabaseBlobAuditingPoliciesClientGetOptions ¶ added in v0.3.0
type DatabaseBlobAuditingPoliciesClientGetOptions struct { }
DatabaseBlobAuditingPoliciesClientGetOptions contains the optional parameters for the DatabaseBlobAuditingPoliciesClient.Get method.
type DatabaseBlobAuditingPoliciesClientGetResponse ¶ added in v0.3.0
type DatabaseBlobAuditingPoliciesClientGetResponse struct {
DatabaseBlobAuditingPolicy
}
DatabaseBlobAuditingPoliciesClientGetResponse contains the response from method DatabaseBlobAuditingPoliciesClient.Get.
type DatabaseBlobAuditingPoliciesClientListByDatabaseOptions ¶ added in v0.3.0
type DatabaseBlobAuditingPoliciesClientListByDatabaseOptions struct { }
DatabaseBlobAuditingPoliciesClientListByDatabaseOptions contains the optional parameters for the DatabaseBlobAuditingPoliciesClient.ListByDatabase method.
type DatabaseBlobAuditingPoliciesClientListByDatabaseResponse ¶ added in v0.3.0
type DatabaseBlobAuditingPoliciesClientListByDatabaseResponse struct {
DatabaseBlobAuditingPolicyListResult
}
DatabaseBlobAuditingPoliciesClientListByDatabaseResponse contains the response from method DatabaseBlobAuditingPoliciesClient.ListByDatabase.
type DatabaseBlobAuditingPolicy ¶
type DatabaseBlobAuditingPolicy struct { // Resource properties. Properties *DatabaseBlobAuditingPolicyProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource kind. Kind *string `json:"kind,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
DatabaseBlobAuditingPolicy - A database blob auditing policy.
type DatabaseBlobAuditingPolicyListResult ¶
type DatabaseBlobAuditingPolicyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*DatabaseBlobAuditingPolicy `json:"value,omitempty" azure:"ro"` }
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.
type DatabaseBlobAuditingPolicyProperties ¶
type DatabaseBlobAuditingPolicyProperties struct { // REQUIRED; Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. State *BlobAuditingPolicyState `json:"state,omitempty"` // 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 BATCHCOMPLETED_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 `json:"auditActionsAndGroups,omitempty"` // 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 `json:"isAzureMonitorTargetEnabled,omitempty"` // Specifies whether storageAccountAccessKey value is the storage's secondary key. IsStorageSecondaryKeyInUse *bool `json:"isStorageSecondaryKeyInUse,omitempty"` // 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 `json:"queueDelayMs,omitempty"` // Specifies the number of days to keep in the audit logs in the storage account. RetentionDays *int32 `json:"retentionDays,omitempty"` // 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 `json:"storageAccountAccessKey,omitempty"` // Specifies the blob storage subscription Id. StorageAccountSubscriptionID *string `json:"storageAccountSubscriptionId,omitempty"` // Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint // or isAzureMonitorTargetEnabled is required. StorageEndpoint *string `json:"storageEndpoint,omitempty"` }
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.
type DatabaseColumn ¶
type DatabaseColumn struct { // Resource properties. Properties *DatabaseColumnProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
DatabaseColumn - A database column resource.
type DatabaseColumnListResult ¶
type DatabaseColumnListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*DatabaseColumn `json:"value,omitempty" azure:"ro"` }
DatabaseColumnListResult - A list of database columns.
func (DatabaseColumnListResult) MarshalJSON ¶
func (d DatabaseColumnListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseColumnListResult.
type DatabaseColumnProperties ¶
type DatabaseColumnProperties struct { // The column data type. ColumnType *ColumnDataType `json:"columnType,omitempty"` // Whether or not the column is computed. IsComputed *bool `json:"isComputed,omitempty"` // Whether or not the column belongs to a memory optimized table. MemoryOptimized *bool `json:"memoryOptimized,omitempty"` // The table temporal type. TemporalType *TableTemporalType `json:"temporalType,omitempty"` }
DatabaseColumnProperties - Database column properties.
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseColumnGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseColumnsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<schema-name>", "<table-name>", "<column-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*DatabaseColumnsClient) ListByDatabase ¶
func (client *DatabaseColumnsClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, options *DatabaseColumnsClientListByDatabaseOptions) *runtime.Pager[DatabaseColumnsClientListByDatabaseResponse]
ListByDatabase - List database columns If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ColumnsListByDatabaseMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseColumnsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<server-name>", "<database-name>", &armsql.DatabaseColumnsClientListByDatabaseOptions{Schema: []string{ "dbo"}, Table: []string{ "customer", "address"}, Column: []string{ "username"}, OrderBy: []string{ "schema asc", "table", "column desc"}, Skiptoken: nil, }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*DatabaseColumnsClient) ListByTable ¶
func (client *DatabaseColumnsClient) ListByTable(resourceGroupName string, serverName string, databaseName string, schemaName string, tableName string, options *DatabaseColumnsClientListByTableOptions) *runtime.Pager[DatabaseColumnsClientListByTableResponse]
ListByTable - List database columns If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListByTable method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseColumnListByTable.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseColumnsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByTable("<resource-group-name>", "<server-name>", "<database-name>", "<schema-name>", "<table-name>", &armsql.DatabaseColumnsClientListByTableOptions{Filter: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type DatabaseColumnsClientGetOptions ¶ added in v0.3.0
type DatabaseColumnsClientGetOptions struct { }
DatabaseColumnsClientGetOptions contains the optional parameters for the DatabaseColumnsClient.Get method.
type DatabaseColumnsClientGetResponse ¶ added in v0.3.0
type DatabaseColumnsClientGetResponse struct {
DatabaseColumn
}
DatabaseColumnsClientGetResponse contains the response from method DatabaseColumnsClient.Get.
type DatabaseColumnsClientListByDatabaseOptions ¶ added in v0.3.0
type DatabaseColumnsClientListByDatabaseOptions struct { Column []string OrderBy []string Schema []string // An opaque token that identifies a starting point in the collection. Skiptoken *string Table []string }
DatabaseColumnsClientListByDatabaseOptions contains the optional parameters for the DatabaseColumnsClient.ListByDatabase method.
type DatabaseColumnsClientListByDatabaseResponse ¶ added in v0.3.0
type DatabaseColumnsClientListByDatabaseResponse struct {
DatabaseColumnListResult
}
DatabaseColumnsClientListByDatabaseResponse contains the response from method DatabaseColumnsClient.ListByDatabase.
type DatabaseColumnsClientListByTableOptions ¶ added in v0.3.0
type DatabaseColumnsClientListByTableOptions struct { // An OData filter expression that filters elements in the collection. Filter *string }
DatabaseColumnsClientListByTableOptions contains the optional parameters for the DatabaseColumnsClient.ListByTable method.
type DatabaseColumnsClientListByTableResponse ¶ added in v0.3.0
type DatabaseColumnsClientListByTableResponse struct {
DatabaseColumnListResult
}
DatabaseColumnsClientListByTableResponse contains the response from method DatabaseColumnsClient.ListByTable.
type DatabaseExtensions ¶
type DatabaseExtensions struct { // Resource properties. Properties *DatabaseExtensionsProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
DatabaseExtensions - An export managed database operation result resource.
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) (*armruntime.Poller[DatabaseExtensionsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Perform a database extension operation, like polybase import If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CreateOrUpdateDatabaseExtensions.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseExtensionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<extension-name>", armsql.DatabaseExtensions{ Properties: &armsql.DatabaseExtensionsProperties{ OperationMode: to.Ptr(armsql.OperationModePolybaseImport), StorageKey: to.Ptr("<storage-key>"), StorageKeyType: to.Ptr(armsql.StorageKeyTypeStorageAccessKey), StorageURI: to.Ptr("<storage-uri>"), }, }, &armsql.DatabaseExtensionsClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetDatabaseExtensions.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseExtensionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<extension-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
Output:
func (*DatabaseExtensionsClient) ListByDatabase ¶
func (client *DatabaseExtensionsClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, options *DatabaseExtensionsClientListByDatabaseOptions) *runtime.Pager[DatabaseExtensionsClientListByDatabaseResponse]
ListByDatabase - List database extension. This will return an empty list as it is not supported. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListDatabaseExtensions.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseExtensionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<server-name>", "<database-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type DatabaseExtensionsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type DatabaseExtensionsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabaseExtensionsClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabaseExtensionsClient.BeginCreateOrUpdate method.
type DatabaseExtensionsClientCreateOrUpdateResponse ¶ added in v0.3.0
type DatabaseExtensionsClientCreateOrUpdateResponse struct {
ImportExportExtensionsOperationResult
}
DatabaseExtensionsClientCreateOrUpdateResponse contains the response from method DatabaseExtensionsClient.CreateOrUpdate.
type DatabaseExtensionsClientGetOptions ¶ added in v0.3.0
type DatabaseExtensionsClientGetOptions struct { }
DatabaseExtensionsClientGetOptions contains the optional parameters for the DatabaseExtensionsClient.Get method.
type DatabaseExtensionsClientGetResponse ¶ added in v0.3.0
type DatabaseExtensionsClientGetResponse struct { }
DatabaseExtensionsClientGetResponse contains the response from method DatabaseExtensionsClient.Get.
type DatabaseExtensionsClientListByDatabaseOptions ¶ added in v0.3.0
type DatabaseExtensionsClientListByDatabaseOptions struct { }
DatabaseExtensionsClientListByDatabaseOptions contains the optional parameters for the DatabaseExtensionsClient.ListByDatabase method.
type DatabaseExtensionsClientListByDatabaseResponse ¶ added in v0.3.0
type DatabaseExtensionsClientListByDatabaseResponse struct {
ImportExportExtensionsOperationListResult
}
DatabaseExtensionsClientListByDatabaseResponse contains the response from method DatabaseExtensionsClient.ListByDatabase.
type DatabaseExtensionsProperties ¶
type DatabaseExtensionsProperties struct { // REQUIRED; Operation Mode. OperationMode *OperationMode `json:"operationMode,omitempty"` // REQUIRED; Storage key. StorageKey *string `json:"storageKey,omitempty"` // REQUIRED; Storage key type. StorageKeyType *StorageKeyType `json:"storageKeyType,omitempty"` // REQUIRED; Storage Uri. StorageURI *string `json:"storageUri,omitempty"` }
DatabaseExtensionsProperties - Contains the database information after successful export.
type DatabaseIdentity ¶ added in v0.3.0
type DatabaseIdentity struct { // The identity type Type *DatabaseIdentityType `json:"type,omitempty"` // The resource ids of the user assigned identities to use UserAssignedIdentities map[string]*DatabaseUserIdentity `json:"userAssignedIdentities,omitempty"` // READ-ONLY; The Azure Active Directory tenant id. TenantID *string `json:"tenantId,omitempty" azure:"ro"` }
DatabaseIdentity - Azure Active Directory identity configuration for a resource.
func (DatabaseIdentity) MarshalJSON ¶ added in v0.3.0
func (d DatabaseIdentity) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseIdentity.
type DatabaseIdentityType ¶ added in v0.3.0
type DatabaseIdentityType string
DatabaseIdentityType - The identity type
const ( DatabaseIdentityTypeNone DatabaseIdentityType = "None" DatabaseIdentityTypeUserAssigned DatabaseIdentityType = "UserAssigned" )
func PossibleDatabaseIdentityTypeValues ¶ added in v0.3.0
func PossibleDatabaseIdentityTypeValues() []DatabaseIdentityType
PossibleDatabaseIdentityTypeValues returns the possible values for the DatabaseIdentityType const type.
type DatabaseLicenseType ¶
type DatabaseLicenseType string
DatabaseLicenseType - The license type to apply for this database. LicenseIncluded if you need a license, or BasePrice if you have a license and are eligible for the Azure Hybrid Benefit.
const ( DatabaseLicenseTypeBasePrice DatabaseLicenseType = "BasePrice" DatabaseLicenseTypeLicenseIncluded DatabaseLicenseType = "LicenseIncluded" )
func PossibleDatabaseLicenseTypeValues ¶
func PossibleDatabaseLicenseTypeValues() []DatabaseLicenseType
PossibleDatabaseLicenseTypeValues returns the possible values for the DatabaseLicenseType const type.
type DatabaseListResult ¶
type DatabaseListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*Database `json:"value,omitempty" azure:"ro"` }
DatabaseListResult - A list of databases.
func (DatabaseListResult) MarshalJSON ¶
func (d DatabaseListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseListResult.
type DatabaseOperation ¶
type DatabaseOperation struct { // Resource properties. Properties *DatabaseOperationProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
DatabaseOperation - A database operation.
type DatabaseOperationListResult ¶
type DatabaseOperationListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*DatabaseOperation `json:"value,omitempty" azure:"ro"` }
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.
type DatabaseOperationProperties ¶
type DatabaseOperationProperties struct { // READ-ONLY; The name of the database the operation is being performed on. DatabaseName *string `json:"databaseName,omitempty" azure:"ro"` // READ-ONLY; The operation description. Description *string `json:"description,omitempty" azure:"ro"` // READ-ONLY; The operation error code. ErrorCode *int32 `json:"errorCode,omitempty" azure:"ro"` // READ-ONLY; The operation error description. ErrorDescription *string `json:"errorDescription,omitempty" azure:"ro"` // READ-ONLY; The operation error severity. ErrorSeverity *int32 `json:"errorSeverity,omitempty" azure:"ro"` // READ-ONLY; The estimated completion time of the operation. EstimatedCompletionTime *time.Time `json:"estimatedCompletionTime,omitempty" azure:"ro"` // READ-ONLY; Whether the operation can be cancelled. IsCancellable *bool `json:"isCancellable,omitempty" azure:"ro"` // READ-ONLY; Whether or not the error is a user error. IsUserError *bool `json:"isUserError,omitempty" azure:"ro"` // READ-ONLY; The name of operation. Operation *string `json:"operation,omitempty" azure:"ro"` // READ-ONLY; The friendly name of operation. OperationFriendlyName *string `json:"operationFriendlyName,omitempty" azure:"ro"` // READ-ONLY; The percentage of the operation completed. PercentComplete *int32 `json:"percentComplete,omitempty" azure:"ro"` // READ-ONLY; The name of the server. ServerName *string `json:"serverName,omitempty" azure:"ro"` // READ-ONLY; The operation start time. StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` // READ-ONLY; The operation state. State *ManagementOperationState `json:"state,omitempty" azure:"ro"` }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CancelDatabaseOperation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseOperationsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Cancel(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<operation-id>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
Output:
func (*DatabaseOperationsClient) ListByDatabase ¶
func (client *DatabaseOperationsClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, options *DatabaseOperationsClientListByDatabaseOptions) *runtime.Pager[DatabaseOperationsClientListByDatabaseResponse]
ListByDatabase - Gets a list of operations performed on the database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListDatabaseOperations.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseOperationsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<server-name>", "<database-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type DatabaseOperationsClientCancelOptions ¶ added in v0.3.0
type DatabaseOperationsClientCancelOptions struct { }
DatabaseOperationsClientCancelOptions contains the optional parameters for the DatabaseOperationsClient.Cancel method.
type DatabaseOperationsClientCancelResponse ¶ added in v0.3.0
type DatabaseOperationsClientCancelResponse struct { }
DatabaseOperationsClientCancelResponse contains the response from method DatabaseOperationsClient.Cancel.
type DatabaseOperationsClientListByDatabaseOptions ¶ added in v0.3.0
type DatabaseOperationsClientListByDatabaseOptions struct { }
DatabaseOperationsClientListByDatabaseOptions contains the optional parameters for the DatabaseOperationsClient.ListByDatabase method.
type DatabaseOperationsClientListByDatabaseResponse ¶ added in v0.3.0
type DatabaseOperationsClientListByDatabaseResponse struct {
DatabaseOperationListResult
}
DatabaseOperationsClientListByDatabaseResponse contains the response from method DatabaseOperationsClient.ListByDatabase.
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 `json:"autoPauseDelay,omitempty"` // Collation of the metadata catalog. CatalogCollation *CatalogCollationType `json:"catalogCollation,omitempty"` // The collation of the database. Collation *string `json:"collation,omitempty"` // 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 `json:"createMode,omitempty"` // The resource identifier of the elastic pool containing this database. ElasticPoolID *string `json:"elasticPoolId,omitempty"` // The Client id used for cross tenant per database CMK scenario FederatedClientID *string `json:"federatedClientId,omitempty"` // 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 `json:"highAvailabilityReplicaCount,omitempty"` // 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 `json:"isLedgerOn,omitempty"` // 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 `json:"licenseType,omitempty"` // The resource identifier of the long term retention backup associated with create operation of this database. LongTermRetentionBackupResourceID *string `json:"longTermRetentionBackupResourceId,omitempty"` // Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates // will occur. MaintenanceConfigurationID *string `json:"maintenanceConfigurationId,omitempty"` // The max size of the database expressed in bytes. MaxSizeBytes *int64 `json:"maxSizeBytes,omitempty"` // Minimal capacity that database will always have allocated, if not paused MinCapacity *float64 `json:"minCapacity,omitempty"` // 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 `json:"readScale,omitempty"` // The resource identifier of the recoverable database associated with create operation of this database. RecoverableDatabaseID *string `json:"recoverableDatabaseId,omitempty"` // The resource identifier of the recovery point associated with create operation of this database. RecoveryServicesRecoveryPointID *string `json:"recoveryServicesRecoveryPointId,omitempty"` // The storage account type to be used to store backups for this database. RequestedBackupStorageRedundancy *BackupStorageRedundancy `json:"requestedBackupStorageRedundancy,omitempty"` // The resource identifier of the restorable dropped database associated with create operation of this database. RestorableDroppedDatabaseID *string `json:"restorableDroppedDatabaseId,omitempty"` // Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. RestorePointInTime *time.Time `json:"restorePointInTime,omitempty"` // The name of the sample schema to apply when creating this database. SampleName *SampleName `json:"sampleName,omitempty"` // The secondary type of the database if it is a secondary. Valid values are Geo and Named. SecondaryType *SecondaryType `json:"secondaryType,omitempty"` // Specifies the time that the database was deleted. SourceDatabaseDeletionDate *time.Time `json:"sourceDatabaseDeletionDate,omitempty"` // The resource identifier of the source database associated with create operation of this database. SourceDatabaseID *string `json:"sourceDatabaseId,omitempty"` // The resource identifier of the source associated with the create operation of this database. // When sourceResourceId is specified, sourceDatabaseId, recoverableDatabaseId, restorableDroppedDatabaseId and sourceDatabaseDeletionDate // must not be specified and CreateMode must be PointInTimeRestore, // Restore or Recover. // When createMode is PointInTimeRestore, sourceResourceId must be the resource ID of an existing database or existing sql // pool, and restorePointInTime must be specified. // When createMode is Restore, sourceResourceId must be the resource ID of restorable dropped database or restorable dropped // sql pool. // When createMode is Recover, sourceResourceId must be the resource ID of recoverable database or recoverable sql pool. // This property allows to restore across subscriptions which is only supported for DataWarehouse edition. // When source subscription belongs to a different tenant than target subscription, “x-ms-authorization-auxiliary” header // must contain authentication token for the source tenant. For more details about // “x-ms-authorization-auxiliary” header see https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant SourceResourceID *string `json:"sourceResourceId,omitempty"` // Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple // availability zones. ZoneRedundant *bool `json:"zoneRedundant,omitempty"` // READ-ONLY; The creation date of the database (ISO8601 format). CreationDate *time.Time `json:"creationDate,omitempty" azure:"ro"` // READ-ONLY; The storage account type used to store backups for this database. CurrentBackupStorageRedundancy *BackupStorageRedundancy `json:"currentBackupStorageRedundancy,omitempty" azure:"ro"` // READ-ONLY; The name and tier of the SKU. CurrentSKU *SKU `json:"currentSku,omitempty" azure:"ro"` // READ-ONLY; The current service level objective name of the database. CurrentServiceObjectiveName *string `json:"currentServiceObjectiveName,omitempty" azure:"ro"` // READ-ONLY; The ID of the database. DatabaseID *string `json:"databaseId,omitempty" azure:"ro"` // READ-ONLY; The default secondary region for this database. DefaultSecondaryLocation *string `json:"defaultSecondaryLocation,omitempty" azure:"ro"` // READ-ONLY; This records the earliest start date and time that restore is available for this database (ISO8601 format). EarliestRestoreDate *time.Time `json:"earliestRestoreDate,omitempty" azure:"ro"` // READ-ONLY; Failover Group resource identifier that this database belongs to. FailoverGroupID *string `json:"failoverGroupId,omitempty" azure:"ro"` // READ-ONLY; Infra encryption is enabled for this database. IsInfraEncryptionEnabled *bool `json:"isInfraEncryptionEnabled,omitempty" azure:"ro"` // READ-ONLY; The max log size for this database. MaxLogSizeBytes *int64 `json:"maxLogSizeBytes,omitempty" azure:"ro"` // READ-ONLY; The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready. PausedDate *time.Time `json:"pausedDate,omitempty" azure:"ro"` // READ-ONLY; The requested service level objective name of the database. RequestedServiceObjectiveName *string `json:"requestedServiceObjectiveName,omitempty" azure:"ro"` // 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 `json:"resumedDate,omitempty" azure:"ro"` // READ-ONLY; The status of the database. Status *DatabaseStatus `json:"status,omitempty" azure:"ro"` }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRecommendedActionGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseRecommendedActionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<advisor-name>", "<recommended-action-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRecommendedActionList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseRecommendedActionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.ListByDatabaseAdvisor(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<advisor-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRecommendedActionUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseRecommendedActionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Update(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<advisor-name>", "<recommended-action-name>", 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) return } // TODO: use response item _ = res }
Output:
type DatabaseRecommendedActionsClientGetOptions ¶ added in v0.3.0
type DatabaseRecommendedActionsClientGetOptions struct { }
DatabaseRecommendedActionsClientGetOptions contains the optional parameters for the DatabaseRecommendedActionsClient.Get method.
type DatabaseRecommendedActionsClientGetResponse ¶ added in v0.3.0
type DatabaseRecommendedActionsClientGetResponse struct {
RecommendedAction
}
DatabaseRecommendedActionsClientGetResponse contains the response from method DatabaseRecommendedActionsClient.Get.
type DatabaseRecommendedActionsClientListByDatabaseAdvisorOptions ¶ added in v0.3.0
type DatabaseRecommendedActionsClientListByDatabaseAdvisorOptions struct { }
DatabaseRecommendedActionsClientListByDatabaseAdvisorOptions contains the optional parameters for the DatabaseRecommendedActionsClient.ListByDatabaseAdvisor method.
type DatabaseRecommendedActionsClientListByDatabaseAdvisorResponse ¶ added in v0.3.0
type DatabaseRecommendedActionsClientListByDatabaseAdvisorResponse struct { // Array of RecommendedAction RecommendedActionArray []*RecommendedAction }
DatabaseRecommendedActionsClientListByDatabaseAdvisorResponse contains the response from method DatabaseRecommendedActionsClient.ListByDatabaseAdvisor.
type DatabaseRecommendedActionsClientUpdateOptions ¶ added in v0.3.0
type DatabaseRecommendedActionsClientUpdateOptions struct { }
DatabaseRecommendedActionsClientUpdateOptions contains the optional parameters for the DatabaseRecommendedActionsClient.Update method.
type DatabaseRecommendedActionsClientUpdateResponse ¶ added in v0.3.0
type DatabaseRecommendedActionsClientUpdateResponse struct {
RecommendedAction
}
DatabaseRecommendedActionsClientUpdateResponse contains the response from method DatabaseRecommendedActionsClient.Update.
type DatabaseSchema ¶
type DatabaseSchema struct { // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
DatabaseSchema - A database schema resource.
type DatabaseSchemaListResult ¶
type DatabaseSchemaListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*DatabaseSchema `json:"value,omitempty" azure:"ro"` }
DatabaseSchemaListResult - A list of database schemas.
func (DatabaseSchemaListResult) MarshalJSON ¶
func (d DatabaseSchemaListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller 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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseSchemaGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseSchemasClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<schema-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*DatabaseSchemasClient) ListByDatabase ¶
func (client *DatabaseSchemasClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, options *DatabaseSchemasClientListByDatabaseOptions) *runtime.Pager[DatabaseSchemasClientListByDatabaseResponse]
ListByDatabase - List database schemas If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseSchemaListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseSchemasClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<server-name>", "<database-name>", &armsql.DatabaseSchemasClientListByDatabaseOptions{Filter: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type DatabaseSchemasClientGetOptions ¶ added in v0.3.0
type DatabaseSchemasClientGetOptions struct { }
DatabaseSchemasClientGetOptions contains the optional parameters for the DatabaseSchemasClient.Get method.
type DatabaseSchemasClientGetResponse ¶ added in v0.3.0
type DatabaseSchemasClientGetResponse struct {
DatabaseSchema
}
DatabaseSchemasClientGetResponse contains the response from method DatabaseSchemasClient.Get.
type DatabaseSchemasClientListByDatabaseOptions ¶ added in v0.3.0
type DatabaseSchemasClientListByDatabaseOptions struct { // An OData filter expression that filters elements in the collection. Filter *string }
DatabaseSchemasClientListByDatabaseOptions contains the optional parameters for the DatabaseSchemasClient.ListByDatabase method.
type DatabaseSchemasClientListByDatabaseResponse ¶ added in v0.3.0
type DatabaseSchemasClientListByDatabaseResponse struct {
DatabaseSchemaListResult
}
DatabaseSchemasClientListByDatabaseResponse contains the response from method DatabaseSchemasClient.ListByDatabase.
type DatabaseSecurityAlertListResult ¶
type DatabaseSecurityAlertListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*DatabaseSecurityAlertPolicy `json:"value,omitempty" azure:"ro"` }
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.
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. resourceGroupName - The name of the resource group that contains the resource. You can 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseSecurityAlertCreateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseSecurityAlertPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.CreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<database-name>", 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("<storage-account-access-key>"), StorageEndpoint: to.Ptr("<storage-endpoint>"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseSecurityAlertGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseSecurityAlertPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", armsql.SecurityAlertPolicyNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*DatabaseSecurityAlertPoliciesClient) ListByDatabase ¶
func (client *DatabaseSecurityAlertPoliciesClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, options *DatabaseSecurityAlertPoliciesClientListByDatabaseOptions) *runtime.Pager[DatabaseSecurityAlertPoliciesClientListByDatabaseResponse]
ListByDatabase - Gets a list of database's security alert policies. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseSecurityAlertListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseSecurityAlertPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<server-name>", "<database-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type DatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions ¶ added in v0.3.0
type DatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions struct { }
DatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions contains the optional parameters for the DatabaseSecurityAlertPoliciesClient.CreateOrUpdate method.
type DatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type DatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse struct {
DatabaseSecurityAlertPolicy
}
DatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse contains the response from method DatabaseSecurityAlertPoliciesClient.CreateOrUpdate.
type DatabaseSecurityAlertPoliciesClientGetOptions ¶ added in v0.3.0
type DatabaseSecurityAlertPoliciesClientGetOptions struct { }
DatabaseSecurityAlertPoliciesClientGetOptions contains the optional parameters for the DatabaseSecurityAlertPoliciesClient.Get method.
type DatabaseSecurityAlertPoliciesClientGetResponse ¶ added in v0.3.0
type DatabaseSecurityAlertPoliciesClientGetResponse struct {
DatabaseSecurityAlertPolicy
}
DatabaseSecurityAlertPoliciesClientGetResponse contains the response from method DatabaseSecurityAlertPoliciesClient.Get.
type DatabaseSecurityAlertPoliciesClientListByDatabaseOptions ¶ added in v0.3.0
type DatabaseSecurityAlertPoliciesClientListByDatabaseOptions struct { }
DatabaseSecurityAlertPoliciesClientListByDatabaseOptions contains the optional parameters for the DatabaseSecurityAlertPoliciesClient.ListByDatabase method.
type DatabaseSecurityAlertPoliciesClientListByDatabaseResponse ¶ added in v0.3.0
type DatabaseSecurityAlertPoliciesClientListByDatabaseResponse struct {
DatabaseSecurityAlertListResult
}
DatabaseSecurityAlertPoliciesClientListByDatabaseResponse contains the response from method DatabaseSecurityAlertPoliciesClient.ListByDatabase.
type DatabaseSecurityAlertPolicy ¶
type DatabaseSecurityAlertPolicy struct { // Resource properties. Properties *SecurityAlertsPolicyProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; SystemData of SecurityAlertPolicyResource. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
DatabaseSecurityAlertPolicy - A database security alert policy.
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 `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
DatabaseTable - A database table resource.
type DatabaseTableListResult ¶
type DatabaseTableListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*DatabaseTable `json:"value,omitempty" azure:"ro"` }
DatabaseTableListResult - A list of database tables.
func (DatabaseTableListResult) MarshalJSON ¶
func (d DatabaseTableListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseTableListResult.
type DatabaseTableProperties ¶
type DatabaseTableProperties struct { // Whether or not the table is memory optimized. MemoryOptimized *bool `json:"memoryOptimized,omitempty"` // The table temporal type. TemporalType *TableTemporalType `json:"temporalType,omitempty"` }
DatabaseTableProperties - Database table properties.
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseTableGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseTablesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<schema-name>", "<table-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*DatabaseTablesClient) ListBySchema ¶
func (client *DatabaseTablesClient) ListBySchema(resourceGroupName string, serverName string, databaseName string, schemaName string, options *DatabaseTablesClientListBySchemaOptions) *runtime.Pager[DatabaseTablesClientListBySchemaResponse]
ListBySchema - List database tables If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListBySchema method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseTableListBySchema.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseTablesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListBySchema("<resource-group-name>", "<server-name>", "<database-name>", "<schema-name>", &armsql.DatabaseTablesClientListBySchemaOptions{Filter: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type DatabaseTablesClientGetOptions ¶ added in v0.3.0
type DatabaseTablesClientGetOptions struct { }
DatabaseTablesClientGetOptions contains the optional parameters for the DatabaseTablesClient.Get method.
type DatabaseTablesClientGetResponse ¶ added in v0.3.0
type DatabaseTablesClientGetResponse struct {
DatabaseTable
}
DatabaseTablesClientGetResponse contains the response from method DatabaseTablesClient.Get.
type DatabaseTablesClientListBySchemaOptions ¶ added in v0.3.0
type DatabaseTablesClientListBySchemaOptions struct { // An OData filter expression that filters elements in the collection. Filter *string }
DatabaseTablesClientListBySchemaOptions contains the optional parameters for the DatabaseTablesClient.ListBySchema method.
type DatabaseTablesClientListBySchemaResponse ¶ added in v0.3.0
type DatabaseTablesClientListBySchemaResponse struct {
DatabaseTableListResult
}
DatabaseTablesClientListBySchemaResponse contains the response from method DatabaseTablesClient.ListBySchema.
type DatabaseUpdate ¶
type DatabaseUpdate struct { // Database identity Identity *DatabaseIdentity `json:"identity,omitempty"` // Resource properties. Properties *DatabaseUpdateProperties `json:"properties,omitempty"` // The name and tier of the SKU. SKU *SKU `json:"sku,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` }
DatabaseUpdate - A database update resource.
func (DatabaseUpdate) MarshalJSON ¶
func (d DatabaseUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseUpdate.
type DatabaseUpdateProperties ¶ added in v0.4.0
type DatabaseUpdateProperties struct { // Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled AutoPauseDelay *int32 `json:"autoPauseDelay,omitempty"` // Collation of the metadata catalog. CatalogCollation *CatalogCollationType `json:"catalogCollation,omitempty"` // The collation of the database. Collation *string `json:"collation,omitempty"` // 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 `json:"createMode,omitempty"` // The resource identifier of the elastic pool containing this database. ElasticPoolID *string `json:"elasticPoolId,omitempty"` // The Client id used for cross tenant per database CMK scenario FederatedClientID *string `json:"federatedClientId,omitempty"` // 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 `json:"highAvailabilityReplicaCount,omitempty"` // 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 `json:"isLedgerOn,omitempty"` // 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 `json:"licenseType,omitempty"` // The resource identifier of the long term retention backup associated with create operation of this database. LongTermRetentionBackupResourceID *string `json:"longTermRetentionBackupResourceId,omitempty"` // Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates // will occur. MaintenanceConfigurationID *string `json:"maintenanceConfigurationId,omitempty"` // The max size of the database expressed in bytes. MaxSizeBytes *int64 `json:"maxSizeBytes,omitempty"` // Minimal capacity that database will always have allocated, if not paused MinCapacity *float64 `json:"minCapacity,omitempty"` // 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 `json:"readScale,omitempty"` // The resource identifier of the recoverable database associated with create operation of this database. RecoverableDatabaseID *string `json:"recoverableDatabaseId,omitempty"` // The resource identifier of the recovery point associated with create operation of this database. RecoveryServicesRecoveryPointID *string `json:"recoveryServicesRecoveryPointId,omitempty"` // The storage account type to be used to store backups for this database. RequestedBackupStorageRedundancy *BackupStorageRedundancy `json:"requestedBackupStorageRedundancy,omitempty"` // The resource identifier of the restorable dropped database associated with create operation of this database. RestorableDroppedDatabaseID *string `json:"restorableDroppedDatabaseId,omitempty"` // Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. RestorePointInTime *time.Time `json:"restorePointInTime,omitempty"` // The name of the sample schema to apply when creating this database. SampleName *SampleName `json:"sampleName,omitempty"` // The secondary type of the database if it is a secondary. Valid values are Geo and Named. SecondaryType *SecondaryType `json:"secondaryType,omitempty"` // Specifies the time that the database was deleted. SourceDatabaseDeletionDate *time.Time `json:"sourceDatabaseDeletionDate,omitempty"` // The resource identifier of the source database associated with create operation of this database. SourceDatabaseID *string `json:"sourceDatabaseId,omitempty"` // Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple // availability zones. ZoneRedundant *bool `json:"zoneRedundant,omitempty"` // READ-ONLY; The creation date of the database (ISO8601 format). CreationDate *time.Time `json:"creationDate,omitempty" azure:"ro"` // READ-ONLY; The storage account type used to store backups for this database. CurrentBackupStorageRedundancy *BackupStorageRedundancy `json:"currentBackupStorageRedundancy,omitempty" azure:"ro"` // READ-ONLY; The name and tier of the SKU. CurrentSKU *SKU `json:"currentSku,omitempty" azure:"ro"` // READ-ONLY; The current service level objective name of the database. CurrentServiceObjectiveName *string `json:"currentServiceObjectiveName,omitempty" azure:"ro"` // READ-ONLY; The ID of the database. DatabaseID *string `json:"databaseId,omitempty" azure:"ro"` // READ-ONLY; The default secondary region for this database. DefaultSecondaryLocation *string `json:"defaultSecondaryLocation,omitempty" azure:"ro"` // READ-ONLY; This records the earliest start date and time that restore is available for this database (ISO8601 format). EarliestRestoreDate *time.Time `json:"earliestRestoreDate,omitempty" azure:"ro"` // READ-ONLY; Failover Group resource identifier that this database belongs to. FailoverGroupID *string `json:"failoverGroupId,omitempty" azure:"ro"` // READ-ONLY; Infra encryption is enabled for this database. IsInfraEncryptionEnabled *bool `json:"isInfraEncryptionEnabled,omitempty" azure:"ro"` // READ-ONLY; The max log size for this database. MaxLogSizeBytes *int64 `json:"maxLogSizeBytes,omitempty" azure:"ro"` // READ-ONLY; The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready. PausedDate *time.Time `json:"pausedDate,omitempty" azure:"ro"` // READ-ONLY; The requested service level objective name of the database. RequestedServiceObjectiveName *string `json:"requestedServiceObjectiveName,omitempty" azure:"ro"` // 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 `json:"resumedDate,omitempty" azure:"ro"` // READ-ONLY; The status of the database. Status *DatabaseStatus `json:"status,omitempty" azure:"ro"` }
DatabaseUpdateProperties - A database update properties.
func (DatabaseUpdateProperties) MarshalJSON ¶ added in v0.4.0
func (d DatabaseUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DatabaseUpdateProperties.
func (*DatabaseUpdateProperties) UnmarshalJSON ¶ added in v0.4.0
func (d *DatabaseUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DatabaseUpdateProperties.
type DatabaseUsage ¶
type DatabaseUsage struct { // Resource properties. Properties *DatabaseUsageProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
DatabaseUsage - Usage metric of a database.
type DatabaseUsageListResult ¶
type DatabaseUsageListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*DatabaseUsage `json:"value,omitempty" azure:"ro"` }
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.
type DatabaseUsageProperties ¶
type DatabaseUsageProperties struct { // READ-ONLY; Current value of the metric. CurrentValue *float64 `json:"currentValue,omitempty" azure:"ro"` // READ-ONLY; User-readable name of the metric. DisplayName *string `json:"displayName,omitempty" azure:"ro"` // READ-ONLY; Boundary value of the metric. Limit *float64 `json:"limit,omitempty" azure:"ro"` // READ-ONLY; Unit of the metric. Unit *string `json:"unit,omitempty" azure:"ro"` }
DatabaseUsageProperties - Properties of a database usage.
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) ListByDatabase ¶
func (client *DatabaseUsagesClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, options *DatabaseUsagesClientListByDatabaseOptions) *runtime.Pager[DatabaseUsagesClientListByDatabaseResponse]
ListByDatabase - Gets database usages. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/GetDatabaseUsages.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseUsagesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<server-name>", "<database-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type DatabaseUsagesClientListByDatabaseOptions ¶ added in v0.3.0
type DatabaseUsagesClientListByDatabaseOptions struct { }
DatabaseUsagesClientListByDatabaseOptions contains the optional parameters for the DatabaseUsagesClient.ListByDatabase method.
type DatabaseUsagesClientListByDatabaseResponse ¶ added in v0.3.0
type DatabaseUsagesClientListByDatabaseResponse struct {
DatabaseUsageListResult
}
DatabaseUsagesClientListByDatabaseResponse contains the response from method DatabaseUsagesClient.ListByDatabase.
type DatabaseUserIdentity ¶ added in v0.3.0
type DatabaseUserIdentity struct { // READ-ONLY; The Azure Active Directory client id. ClientID *string `json:"clientId,omitempty" azure:"ro"` // READ-ONLY; The Azure Active Directory principal id. PrincipalID *string `json:"principalId,omitempty" azure:"ro"` }
DatabaseUserIdentity - Azure Active Directory identity configuration for a resource.
type DatabaseVulnerabilityAssessment ¶
type DatabaseVulnerabilityAssessment struct { // Resource properties. Properties *DatabaseVulnerabilityAssessmentProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
DatabaseVulnerabilityAssessment - A database vulnerability assessment.
type DatabaseVulnerabilityAssessmentListResult ¶
type DatabaseVulnerabilityAssessmentListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*DatabaseVulnerabilityAssessment `json:"value,omitempty" azure:"ro"` }
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.
type DatabaseVulnerabilityAssessmentProperties ¶
type DatabaseVulnerabilityAssessmentProperties struct { // The recurring scans settings RecurringScans *VulnerabilityAssessmentRecurringScansProperties `json:"recurringScans,omitempty"` // Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' // isn't specified, storageAccountAccessKey is required. StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` // 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 `json:"storageContainerPath,omitempty"` // 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 `json:"storageContainerSasKey,omitempty"` }
DatabaseVulnerabilityAssessmentProperties - Properties of a database Vulnerability Assessment.
type DatabaseVulnerabilityAssessmentRuleBaseline ¶
type DatabaseVulnerabilityAssessmentRuleBaseline struct { // Resource properties. Properties *DatabaseVulnerabilityAssessmentRuleBaselineProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
DatabaseVulnerabilityAssessmentRuleBaseline - A database vulnerability assessment rule baseline.
type DatabaseVulnerabilityAssessmentRuleBaselineItem ¶
type DatabaseVulnerabilityAssessmentRuleBaselineItem struct { // REQUIRED; The rule baseline result Result []*string `json:"result,omitempty"` }
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.
type DatabaseVulnerabilityAssessmentRuleBaselineProperties ¶
type DatabaseVulnerabilityAssessmentRuleBaselineProperties struct { // REQUIRED; The rule baseline result BaselineResults []*DatabaseVulnerabilityAssessmentRuleBaselineItem `json:"baselineResults,omitempty"` }
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.
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseVulnerabilityAssessmentRuleBaselinesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.CreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<database-name>", armsql.VulnerabilityAssessmentNameDefault, "<rule-id>", 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) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseVulnerabilityAssessmentRuleBaselinesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Delete(ctx, "<resource-group-name>", "<server-name>", "<database-name>", armsql.VulnerabilityAssessmentNameDefault, "<rule-id>", armsql.VulnerabilityAssessmentPolicyBaselineNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseVulnerabilityAssessmentRuleBaselinesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", armsql.VulnerabilityAssessmentNameDefault, "<rule-id>", armsql.VulnerabilityAssessmentPolicyBaselineNameMaster, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
type DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions struct { }
DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate method.
type DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse struct {
DatabaseVulnerabilityAssessmentRuleBaseline
}
DatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse contains the response from method DatabaseVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate.
type DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions struct { }
DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentRuleBaselinesClient.Delete method.
type DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse struct { }
DatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse contains the response from method DatabaseVulnerabilityAssessmentRuleBaselinesClient.Delete.
type DatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions struct { }
DatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentRuleBaselinesClient.Get method.
type DatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse struct {
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 `json:"exportedReportLocation,omitempty" azure:"ro"` }
DatabaseVulnerabilityAssessmentScanExportProperties - Properties of the export operation's result.
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) (*armruntime.Poller[DatabaseVulnerabilityAssessmentScansClientInitiateScanResponse], error)
BeginInitiateScan - Executes a Vulnerability Assessment database scan. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentScansExecute.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseVulnerabilityAssessmentScansClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginInitiateScan(ctx, "<resource-group-name>", "<server-name>", "<database-name>", armsql.VulnerabilityAssessmentNameDefault, "<scan-id>", &armsql.DatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
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. resourceGroupName - The name of the resource group that contains the resource. You 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentScanExport.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseVulnerabilityAssessmentScansClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Export(ctx, "<resource-group-name>", "<server-name>", "<database-name>", armsql.VulnerabilityAssessmentNameDefault, "<scan-id>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseVulnerabilityAssessmentScansClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", armsql.VulnerabilityAssessmentNameDefault, "<scan-id>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*DatabaseVulnerabilityAssessmentScansClient) ListByDatabase ¶
func (client *DatabaseVulnerabilityAssessmentScansClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *DatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions) *runtime.Pager[DatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse]
ListByDatabase - Lists the vulnerability assessment scans of a database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseVulnerabilityAssessmentScansClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<server-name>", "<database-name>", armsql.VulnerabilityAssessmentNameDefault, nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type DatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentScansClient.BeginInitiateScan method.
type DatabaseVulnerabilityAssessmentScansClientExportOptions ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentScansClientExportOptions struct { }
DatabaseVulnerabilityAssessmentScansClientExportOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentScansClient.Export method.
type DatabaseVulnerabilityAssessmentScansClientExportResponse ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentScansClientExportResponse struct {
DatabaseVulnerabilityAssessmentScansExport
}
DatabaseVulnerabilityAssessmentScansClientExportResponse contains the response from method DatabaseVulnerabilityAssessmentScansClient.Export.
type DatabaseVulnerabilityAssessmentScansClientGetOptions ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentScansClientGetOptions struct { }
DatabaseVulnerabilityAssessmentScansClientGetOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentScansClient.Get method.
type DatabaseVulnerabilityAssessmentScansClientGetResponse ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentScansClientGetResponse struct {
VulnerabilityAssessmentScanRecord
}
DatabaseVulnerabilityAssessmentScansClientGetResponse contains the response from method DatabaseVulnerabilityAssessmentScansClient.Get.
type DatabaseVulnerabilityAssessmentScansClientInitiateScanResponse ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentScansClientInitiateScanResponse struct { }
DatabaseVulnerabilityAssessmentScansClientInitiateScanResponse contains the response from method DatabaseVulnerabilityAssessmentScansClient.InitiateScan.
type DatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions struct { }
DatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentScansClient.ListByDatabase method.
type DatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse struct {
VulnerabilityAssessmentScanRecordListResult
}
DatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse contains the response from method DatabaseVulnerabilityAssessmentScansClient.ListByDatabase.
type DatabaseVulnerabilityAssessmentScansExport ¶
type DatabaseVulnerabilityAssessmentScansExport struct { // Resource properties. Properties *DatabaseVulnerabilityAssessmentScanExportProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
DatabaseVulnerabilityAssessmentScansExport - A database Vulnerability Assessment scan export resource.
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. resourceGroupName - The name of the resource group that contains the resource. You can 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentCreateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseVulnerabilityAssessmentsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.CreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<database-name>", 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("<storage-account-access-key>"), StorageContainerPath: to.Ptr("<storage-container-path>"), StorageContainerSasKey: to.Ptr("<storage-container-sas-key>"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseVulnerabilityAssessmentsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Delete(ctx, "<resource-group-name>", "<server-name>", "<database-name>", armsql.VulnerabilityAssessmentNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseVulnerabilityAssessmentsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", armsql.VulnerabilityAssessmentNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*DatabaseVulnerabilityAssessmentsClient) ListByDatabase ¶
func (client *DatabaseVulnerabilityAssessmentsClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, options *DatabaseVulnerabilityAssessmentsClientListByDatabaseOptions) *runtime.Pager[DatabaseVulnerabilityAssessmentsClientListByDatabaseResponse]
ListByDatabase - Lists the vulnerability assessment policies associated with a database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseVulnerabilityAssessmentListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabaseVulnerabilityAssessmentsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<server-name>", "<database-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type DatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions struct { }
DatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentsClient.CreateOrUpdate method.
type DatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse struct {
DatabaseVulnerabilityAssessment
}
DatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse contains the response from method DatabaseVulnerabilityAssessmentsClient.CreateOrUpdate.
type DatabaseVulnerabilityAssessmentsClientDeleteOptions ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentsClientDeleteOptions struct { }
DatabaseVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentsClient.Delete method.
type DatabaseVulnerabilityAssessmentsClientDeleteResponse ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentsClientDeleteResponse struct { }
DatabaseVulnerabilityAssessmentsClientDeleteResponse contains the response from method DatabaseVulnerabilityAssessmentsClient.Delete.
type DatabaseVulnerabilityAssessmentsClientGetOptions ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentsClientGetOptions struct { }
DatabaseVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentsClient.Get method.
type DatabaseVulnerabilityAssessmentsClientGetResponse ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentsClientGetResponse struct {
DatabaseVulnerabilityAssessment
}
DatabaseVulnerabilityAssessmentsClientGetResponse contains the response from method DatabaseVulnerabilityAssessmentsClient.Get.
type DatabaseVulnerabilityAssessmentsClientListByDatabaseOptions ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentsClientListByDatabaseOptions struct { }
DatabaseVulnerabilityAssessmentsClientListByDatabaseOptions contains the optional parameters for the DatabaseVulnerabilityAssessmentsClient.ListByDatabase method.
type DatabaseVulnerabilityAssessmentsClientListByDatabaseResponse ¶ added in v0.3.0
type DatabaseVulnerabilityAssessmentsClientListByDatabaseResponse struct {
DatabaseVulnerabilityAssessmentListResult
}
DatabaseVulnerabilityAssessmentsClientListByDatabaseResponse contains the response from method DatabaseVulnerabilityAssessmentsClient.ListByDatabase.
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) (*armruntime.Poller[DatabasesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates a new database or updates an existing database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/CreateVCoreDatabaseByServiceObjective.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<database-name>", armsql.Database{ Location: to.Ptr("<location>"), SKU: &armsql.SKU{ Name: to.Ptr("<name>"), Capacity: to.Ptr[int32](2), Family: to.Ptr("<family>"), }, }, &armsql.DatabasesClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*DatabasesClient) BeginDelete ¶
func (client *DatabasesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginDeleteOptions) (*armruntime.Poller[DatabasesClientDeleteResponse], error)
BeginDelete - Deletes the database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/DeleteDatabase.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<server-name>", "<database-name>", &armsql.DatabasesClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*DatabasesClient) BeginExport ¶
func (client *DatabasesClient) BeginExport(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ExportDatabaseDefinition, options *DatabasesClientBeginExportOptions) (*armruntime.Poller[DatabasesClientExportResponse], error)
BeginExport - Exports a database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ExportDatabaseWithNetworkIsolation.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginExport(ctx, "<resource-group-name>", "<server-name>", "<database-name>", armsql.ExportDatabaseDefinition{ AdministratorLogin: to.Ptr("<administrator-login>"), AdministratorLoginPassword: to.Ptr("<administrator-login-password>"), AuthenticationType: to.Ptr("<authentication-type>"), NetworkIsolation: &armsql.NetworkIsolationSettings{ SQLServerResourceID: to.Ptr("<sqlserver-resource-id>"), StorageAccountResourceID: to.Ptr("<storage-account-resource-id>"), }, StorageKey: to.Ptr("<storage-key>"), StorageKeyType: to.Ptr(armsql.StorageKeyTypeStorageAccessKey), StorageURI: to.Ptr("<storage-uri>"), }, &armsql.DatabasesClientBeginExportOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*DatabasesClient) BeginFailover ¶
func (client *DatabasesClient) BeginFailover(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginFailoverOptions) (*armruntime.Poller[DatabasesClientFailoverResponse], error)
BeginFailover - Failovers a database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/FailoverDatabase.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginFailover(ctx, "<resource-group-name>", "<server-name>", "<database-name>", &armsql.DatabasesClientBeginFailoverOptions{ReplicaType: to.Ptr(armsql.ReplicaTypePrimary), ResumeToken: "", }) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*DatabasesClient) BeginImport ¶
func (client *DatabasesClient) BeginImport(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ImportExistingDatabaseDefinition, options *DatabasesClientBeginImportOptions) (*armruntime.Poller[DatabasesClientImportResponse], error)
BeginImport - Imports a bacpac into a new database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ImportDatabaseWithNetworkIsolation.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginImport(ctx, "<resource-group-name>", "<server-name>", "<database-name>", armsql.ImportExistingDatabaseDefinition{ AdministratorLogin: to.Ptr("<administrator-login>"), AdministratorLoginPassword: to.Ptr("<administrator-login-password>"), AuthenticationType: to.Ptr("<authentication-type>"), NetworkIsolation: &armsql.NetworkIsolationSettings{ SQLServerResourceID: to.Ptr("<sqlserver-resource-id>"), StorageAccountResourceID: to.Ptr("<storage-account-resource-id>"), }, StorageKey: to.Ptr("<storage-key>"), StorageKeyType: to.Ptr(armsql.StorageKeyTypeStorageAccessKey), StorageURI: to.Ptr("<storage-uri>"), }, &armsql.DatabasesClientBeginImportOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*DatabasesClient) BeginPause ¶
func (client *DatabasesClient) BeginPause(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginPauseOptions) (*armruntime.Poller[DatabasesClientPauseResponse], error)
BeginPause - Pauses a database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/PauseDatabase.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginPause(ctx, "<resource-group-name>", "<server-name>", "<database-name>", &armsql.DatabasesClientBeginPauseOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*DatabasesClient) BeginResume ¶
func (client *DatabasesClient) BeginResume(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginResumeOptions) (*armruntime.Poller[DatabasesClientResumeResponse], error)
BeginResume - Resumes a database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResumeDatabase.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginResume(ctx, "<resource-group-name>", "<server-name>", "<database-name>", &armsql.DatabasesClientBeginResumeOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*DatabasesClient) BeginUpdate ¶
func (client *DatabasesClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DatabaseUpdate, options *DatabasesClientBeginUpdateOptions) (*armruntime.Poller[DatabasesClientUpdateResponse], error)
BeginUpdate - Updates an existing database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/PatchVCoreDatabaseAssignMaintenanceConfiguration.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginUpdate(ctx, "<resource-group-name>", "<server-name>", "<database-name>", armsql.DatabaseUpdate{ Properties: &armsql.DatabaseUpdateProperties{ MaintenanceConfigurationID: to.Ptr("<maintenance-configuration-id>"), }, SKU: &armsql.SKU{ Name: to.Ptr("<name>"), }, }, &armsql.DatabasesClientBeginUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*DatabasesClient) BeginUpgradeDataWarehouse ¶
func (client *DatabasesClient) BeginUpgradeDataWarehouse(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *DatabasesClientBeginUpgradeDataWarehouseOptions) (*armruntime.Poller[DatabasesClientUpgradeDataWarehouseResponse], error)
BeginUpgradeDataWarehouse - Upgrades a data warehouse. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/UpgradeDataWarehouse.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginUpgradeDataWarehouse(ctx, "<resource-group-name>", "<server-name>", "<database-name>", &armsql.DatabasesClientBeginUpgradeDataWarehouseOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
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. resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. serverName - The name of the server. databaseName - The name of the database. options - DatabasesClientGetOptions contains the optional parameters for the DatabasesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/GetVCoreDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*DatabasesClient) ListByElasticPool ¶
func (client *DatabasesClient) ListByElasticPool(resourceGroupName string, serverName string, elasticPoolName string, options *DatabasesClientListByElasticPoolOptions) *runtime.Pager[DatabasesClientListByElasticPoolResponse]
ListByElasticPool - Gets a list of databases in an elastic pool. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByElasticPool method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ListDatabasesByElasticPool.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByElasticPool("<resource-group-name>", "<server-name>", "<elastic-pool-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*DatabasesClient) ListByServer ¶
func (client *DatabasesClient) ListByServer(resourceGroupName string, serverName string, options *DatabasesClientListByServerOptions) *runtime.Pager[DatabasesClientListByServerResponse]
ListByServer - Gets a list of databases. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ListVCoreDatabasesByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<resource-group-name>", "<server-name>", &armsql.DatabasesClientListByServerOptions{SkipToken: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*DatabasesClient) ListInaccessibleByServer ¶
func (client *DatabasesClient) ListInaccessibleByServer(resourceGroupName string, serverName string, options *DatabasesClientListInaccessibleByServerOptions) *runtime.Pager[DatabasesClientListInaccessibleByServerResponse]
ListInaccessibleByServer - Gets a list of inaccessible databases in a logical server If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListInaccessibleByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ListVCoreInaccessibleDatabasesByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListInaccessibleByServer("<resource-group-name>", "<server-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*DatabasesClient) ListMetricDefinitions ¶
func (client *DatabasesClient) ListMetricDefinitions(resourceGroupName string, serverName string, databaseName string, options *DatabasesClientListMetricDefinitionsOptions) *runtime.Pager[DatabasesClientListMetricDefinitionsResponse]
ListMetricDefinitions - Returns database metric definitions. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListMetricDefinitions method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DatabaseMetricsDefinitionsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListMetricDefinitions("<resource-group-name>", "<server-name>", "<database-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*DatabasesClient) ListMetrics ¶
func (client *DatabasesClient) ListMetrics(resourceGroupName string, serverName string, databaseName string, filter string, options *DatabasesClientListMetricsOptions) *runtime.Pager[DatabasesClientListMetricsResponse]
ListMetrics - Returns database metrics. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListMetrics method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/DatabaseMetricsListWithFilter.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListMetrics("<resource-group-name>", "<server-name>", "<database-name>", "<filter>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/RenameDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Rename(ctx, "<resource-group-name>", "<server-name>", "<database-name>", armsql.ResourceMoveDefinition{ ID: to.Ptr("<id>"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
Output:
type DatabasesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type DatabasesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginCreateOrUpdateOptions contains the optional parameters for the DatabasesClient.BeginCreateOrUpdate method.
type DatabasesClientBeginDeleteOptions ¶ added in v0.3.0
type DatabasesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginDeleteOptions contains the optional parameters for the DatabasesClient.BeginDelete method.
type DatabasesClientBeginExportOptions ¶ added in v0.3.0
type DatabasesClientBeginExportOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginExportOptions contains the optional parameters for the DatabasesClient.BeginExport method.
type DatabasesClientBeginFailoverOptions ¶ added in v0.3.0
type DatabasesClientBeginFailoverOptions struct { // The type of replica to be failed over. ReplicaType *ReplicaType // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginFailoverOptions contains the optional parameters for the DatabasesClient.BeginFailover method.
type DatabasesClientBeginImportOptions ¶ added in v0.3.0
type DatabasesClientBeginImportOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginImportOptions contains the optional parameters for the DatabasesClient.BeginImport method.
type DatabasesClientBeginPauseOptions ¶ added in v0.3.0
type DatabasesClientBeginPauseOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginPauseOptions contains the optional parameters for the DatabasesClient.BeginPause method.
type DatabasesClientBeginResumeOptions ¶ added in v0.3.0
type DatabasesClientBeginResumeOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginResumeOptions contains the optional parameters for the DatabasesClient.BeginResume method.
type DatabasesClientBeginUpdateOptions ¶ added in v0.3.0
type DatabasesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginUpdateOptions contains the optional parameters for the DatabasesClient.BeginUpdate method.
type DatabasesClientBeginUpgradeDataWarehouseOptions ¶ added in v0.3.0
type DatabasesClientBeginUpgradeDataWarehouseOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DatabasesClientBeginUpgradeDataWarehouseOptions contains the optional parameters for the DatabasesClient.BeginUpgradeDataWarehouse method.
type DatabasesClientCreateOrUpdateResponse ¶ added in v0.3.0
type DatabasesClientCreateOrUpdateResponse struct {
Database
}
DatabasesClientCreateOrUpdateResponse contains the response from method DatabasesClient.CreateOrUpdate.
type DatabasesClientDeleteResponse ¶ added in v0.3.0
type DatabasesClientDeleteResponse struct { }
DatabasesClientDeleteResponse contains the response from method DatabasesClient.Delete.
type DatabasesClientExportResponse ¶ added in v0.3.0
type DatabasesClientExportResponse struct {
ImportExportOperationResult
}
DatabasesClientExportResponse contains the response from method DatabasesClient.Export.
type DatabasesClientFailoverResponse ¶ added in v0.3.0
type DatabasesClientFailoverResponse struct { }
DatabasesClientFailoverResponse contains the response from method DatabasesClient.Failover.
type DatabasesClientGetOptions ¶ added in v0.3.0
type DatabasesClientGetOptions struct { }
DatabasesClientGetOptions contains the optional parameters for the DatabasesClient.Get method.
type DatabasesClientGetResponse ¶ added in v0.3.0
type DatabasesClientGetResponse struct {
Database
}
DatabasesClientGetResponse contains the response from method DatabasesClient.Get.
type DatabasesClientImportResponse ¶ added in v0.3.0
type DatabasesClientImportResponse struct {
ImportExportOperationResult
}
DatabasesClientImportResponse contains the response from method DatabasesClient.Import.
type DatabasesClientListByElasticPoolOptions ¶ added in v0.3.0
type DatabasesClientListByElasticPoolOptions struct { }
DatabasesClientListByElasticPoolOptions contains the optional parameters for the DatabasesClient.ListByElasticPool method.
type DatabasesClientListByElasticPoolResponse ¶ added in v0.3.0
type DatabasesClientListByElasticPoolResponse struct {
DatabaseListResult
}
DatabasesClientListByElasticPoolResponse contains the response from method DatabasesClient.ListByElasticPool.
type DatabasesClientListByServerOptions ¶ added in v0.3.0
type DatabasesClientListByServerOptions struct {
SkipToken *string
}
DatabasesClientListByServerOptions contains the optional parameters for the DatabasesClient.ListByServer method.
type DatabasesClientListByServerResponse ¶ added in v0.3.0
type DatabasesClientListByServerResponse struct {
DatabaseListResult
}
DatabasesClientListByServerResponse contains the response from method DatabasesClient.ListByServer.
type DatabasesClientListInaccessibleByServerOptions ¶ added in v0.3.0
type DatabasesClientListInaccessibleByServerOptions struct { }
DatabasesClientListInaccessibleByServerOptions contains the optional parameters for the DatabasesClient.ListInaccessibleByServer method.
type DatabasesClientListInaccessibleByServerResponse ¶ added in v0.3.0
type DatabasesClientListInaccessibleByServerResponse struct {
DatabaseListResult
}
DatabasesClientListInaccessibleByServerResponse contains the response from method DatabasesClient.ListInaccessibleByServer.
type DatabasesClientListMetricDefinitionsOptions ¶ added in v0.3.0
type DatabasesClientListMetricDefinitionsOptions struct { }
DatabasesClientListMetricDefinitionsOptions contains the optional parameters for the DatabasesClient.ListMetricDefinitions method.
type DatabasesClientListMetricDefinitionsResponse ¶ added in v0.3.0
type DatabasesClientListMetricDefinitionsResponse struct {
MetricDefinitionListResult
}
DatabasesClientListMetricDefinitionsResponse contains the response from method DatabasesClient.ListMetricDefinitions.
type DatabasesClientListMetricsOptions ¶ added in v0.3.0
type DatabasesClientListMetricsOptions struct { }
DatabasesClientListMetricsOptions contains the optional parameters for the DatabasesClient.ListMetrics method.
type DatabasesClientListMetricsResponse ¶ added in v0.3.0
type DatabasesClientListMetricsResponse struct {
MetricListResult
}
DatabasesClientListMetricsResponse contains the response from method DatabasesClient.ListMetrics.
type DatabasesClientPauseResponse ¶ added in v0.3.0
type DatabasesClientPauseResponse struct {
Database
}
DatabasesClientPauseResponse contains the response from method DatabasesClient.Pause.
type DatabasesClientRenameOptions ¶ added in v0.3.0
type DatabasesClientRenameOptions struct { }
DatabasesClientRenameOptions contains the optional parameters for the DatabasesClient.Rename method.
type DatabasesClientRenameResponse ¶ added in v0.3.0
type DatabasesClientRenameResponse struct { }
DatabasesClientRenameResponse contains the response from method DatabasesClient.Rename.
type DatabasesClientResumeResponse ¶ added in v0.3.0
type DatabasesClientResumeResponse struct {
Database
}
DatabasesClientResumeResponse contains the response from method DatabasesClient.Resume.
type DatabasesClientUpdateResponse ¶ added in v0.3.0
type DatabasesClientUpdateResponse struct {
Database
}
DatabasesClientUpdateResponse contains the response from method DatabasesClient.Update.
type DatabasesClientUpgradeDataWarehouseResponse ¶ added in v0.3.0
type DatabasesClientUpgradeDataWarehouseResponse struct { }
DatabasesClientUpgradeDataWarehouseResponse contains the response from method DatabasesClient.UpgradeDataWarehouse.
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 `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
DeletedServer - A deleted server.
type DeletedServerListResult ¶
type DeletedServerListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*DeletedServer `json:"value,omitempty" azure:"ro"` }
DeletedServerListResult - A list of deleted servers.
func (DeletedServerListResult) MarshalJSON ¶
func (d DeletedServerListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DeletedServerListResult.
type DeletedServerProperties ¶
type DeletedServerProperties struct { // READ-ONLY; The deletion time of the deleted server. DeletionTime *time.Time `json:"deletionTime,omitempty" azure:"ro"` // READ-ONLY; The fully qualified domain name of the server. FullyQualifiedDomainName *string `json:"fullyQualifiedDomainName,omitempty" azure:"ro"` // READ-ONLY; The original ID of the server before deletion. OriginalID *string `json:"originalId,omitempty" azure:"ro"` // READ-ONLY; The version of the deleted server. Version *string `json:"version,omitempty" azure:"ro"` }
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) (*armruntime.Poller[DeletedServersClientRecoverResponse], error)
BeginRecover - Recovers a deleted server. If the operation fails it returns an *azcore.ResponseError type. 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeletedServerRecover.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDeletedServersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginRecover(ctx, "<location-name>", "<deleted-server-name>", &armsql.DeletedServersClientBeginRecoverOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
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. 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeletedServerGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDeletedServersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<location-name>", "<deleted-server-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*DeletedServersClient) List ¶
func (client *DeletedServersClient) List(options *DeletedServersClientListOptions) *runtime.Pager[DeletedServersClientListResponse]
List - Gets a list of all deleted servers in a subscription. If the operation fails it returns an *azcore.ResponseError type. options - DeletedServersClientListOptions contains the optional parameters for the DeletedServersClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeletedServerListBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDeletedServersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.List(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*DeletedServersClient) ListByLocation ¶
func (client *DeletedServersClient) ListByLocation(locationName string, options *DeletedServersClientListByLocationOptions) *runtime.Pager[DeletedServersClientListByLocationResponse]
ListByLocation - Gets a list of deleted servers for a location. If the operation fails it returns an *azcore.ResponseError type. locationName - The name of the region where the resource is located. options - DeletedServersClientListByLocationOptions contains the optional parameters for the DeletedServersClient.ListByLocation method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeletedServerList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDeletedServersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByLocation("<location-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type DeletedServersClientBeginRecoverOptions ¶ added in v0.3.0
type DeletedServersClientBeginRecoverOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DeletedServersClientBeginRecoverOptions contains the optional parameters for the DeletedServersClient.BeginRecover method.
type DeletedServersClientGetOptions ¶ added in v0.3.0
type DeletedServersClientGetOptions struct { }
DeletedServersClientGetOptions contains the optional parameters for the DeletedServersClient.Get method.
type DeletedServersClientGetResponse ¶ added in v0.3.0
type DeletedServersClientGetResponse struct {
DeletedServer
}
DeletedServersClientGetResponse contains the response from method DeletedServersClient.Get.
type DeletedServersClientListByLocationOptions ¶ added in v0.3.0
type DeletedServersClientListByLocationOptions struct { }
DeletedServersClientListByLocationOptions contains the optional parameters for the DeletedServersClient.ListByLocation method.
type DeletedServersClientListByLocationResponse ¶ added in v0.3.0
type DeletedServersClientListByLocationResponse struct {
DeletedServerListResult
}
DeletedServersClientListByLocationResponse contains the response from method DeletedServersClient.ListByLocation.
type DeletedServersClientListOptions ¶ added in v0.3.0
type DeletedServersClientListOptions struct { }
DeletedServersClientListOptions contains the optional parameters for the DeletedServersClient.List method.
type DeletedServersClientListResponse ¶ added in v0.3.0
type DeletedServersClientListResponse struct {
DeletedServerListResult
}
DeletedServersClientListResponse contains the response from method DeletedServersClient.List.
type DeletedServersClientRecoverResponse ¶ added in v0.3.0
type DeletedServersClientRecoverResponse struct {
DeletedServer
}
DeletedServersClientRecoverResponse contains the response from method DeletedServersClient.Recover.
type DiffBackupIntervalInHours ¶
type DiffBackupIntervalInHours int32
DiffBackupIntervalInHours - The differential backup interval in hours. This is how many interval hours between each differential backup will be supported. This is only applicable to live databases but not dropped databases.
const ( DiffBackupIntervalInHoursTwelve DiffBackupIntervalInHours = 12 DiffBackupIntervalInHoursTwentyFour DiffBackupIntervalInHours = 24 )
func PossibleDiffBackupIntervalInHoursValues ¶
func PossibleDiffBackupIntervalInHoursValues() []DiffBackupIntervalInHours
PossibleDiffBackupIntervalInHoursValues returns the possible values for the DiffBackupIntervalInHours const type.
type DistributedAvailabilityGroup ¶ added in v0.4.0
type DistributedAvailabilityGroup struct { // Resource properties. Properties *DistributedAvailabilityGroupProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
DistributedAvailabilityGroup - Distributed availability group between box and Sql Managed Instance.
func (DistributedAvailabilityGroup) MarshalJSON ¶ added in v0.4.0
func (d DistributedAvailabilityGroup) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DistributedAvailabilityGroup.
type DistributedAvailabilityGroupProperties ¶ added in v0.4.0
type DistributedAvailabilityGroupProperties struct { // The primary availability group name PrimaryAvailabilityGroupName *string `json:"primaryAvailabilityGroupName,omitempty"` // The replication mode of a distributed availability group. Parameter will be ignored during link creation. ReplicationMode *ReplicationMode `json:"replicationMode,omitempty"` // The secondary availability group name SecondaryAvailabilityGroupName *string `json:"secondaryAvailabilityGroupName,omitempty"` // The source endpoint SourceEndpoint *string `json:"sourceEndpoint,omitempty"` // The name of the target database TargetDatabase *string `json:"targetDatabase,omitempty"` // READ-ONLY; The distributed availability group id DistributedAvailabilityGroupID *string `json:"distributedAvailabilityGroupId,omitempty" azure:"ro"` // READ-ONLY; The last hardened lsn LastHardenedLsn *string `json:"lastHardenedLsn,omitempty" azure:"ro"` // READ-ONLY; The link state LinkState *string `json:"linkState,omitempty" azure:"ro"` // READ-ONLY; The source replica id SourceReplicaID *string `json:"sourceReplicaId,omitempty" azure:"ro"` // READ-ONLY; The target replica id TargetReplicaID *string `json:"targetReplicaId,omitempty" azure:"ro"` }
DistributedAvailabilityGroupProperties - The properties of a distributed availability group.
type DistributedAvailabilityGroupsClient ¶ added in v0.4.0
type DistributedAvailabilityGroupsClient struct {
// contains filtered or unexported fields
}
DistributedAvailabilityGroupsClient contains the methods for the DistributedAvailabilityGroups group. Don't use this type directly, use NewDistributedAvailabilityGroupsClient() instead.
func NewDistributedAvailabilityGroupsClient ¶ added in v0.4.0
func NewDistributedAvailabilityGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DistributedAvailabilityGroupsClient, error)
NewDistributedAvailabilityGroupsClient creates a new instance of DistributedAvailabilityGroupsClient with the specified values. subscriptionID - The subscription ID that identifies an Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*DistributedAvailabilityGroupsClient) BeginCreateOrUpdate ¶ added in v0.4.0
func (client *DistributedAvailabilityGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, distributedAvailabilityGroupName string, parameters DistributedAvailabilityGroup, options *DistributedAvailabilityGroupsClientBeginCreateOrUpdateOptions) (*armruntime.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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DistributedAvailabilityGroupsCreate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDistributedAvailabilityGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<managed-instance-name>", "<distributed-availability-group-name>", armsql.DistributedAvailabilityGroup{ Properties: &armsql.DistributedAvailabilityGroupProperties{ PrimaryAvailabilityGroupName: to.Ptr("<primary-availability-group-name>"), SecondaryAvailabilityGroupName: to.Ptr("<secondary-availability-group-name>"), SourceEndpoint: to.Ptr("<source-endpoint>"), TargetDatabase: to.Ptr("<target-database>"), }, }, &armsql.DistributedAvailabilityGroupsClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*DistributedAvailabilityGroupsClient) BeginDelete ¶ added in v0.4.0
func (client *DistributedAvailabilityGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, distributedAvailabilityGroupName string, options *DistributedAvailabilityGroupsClientBeginDeleteOptions) (*armruntime.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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DistributedAvailabilityGroupsDelete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDistributedAvailabilityGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<managed-instance-name>", "<distributed-availability-group-name>", &armsql.DistributedAvailabilityGroupsClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*DistributedAvailabilityGroupsClient) BeginUpdate ¶ added in v0.4.0
func (client *DistributedAvailabilityGroupsClient) BeginUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, distributedAvailabilityGroupName string, parameters DistributedAvailabilityGroup, options *DistributedAvailabilityGroupsClientBeginUpdateOptions) (*armruntime.Poller[DistributedAvailabilityGroupsClientUpdateResponse], error)
BeginUpdate - Updates a distributed availability group replication mode. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DistributedAvailabilityGroupsUpdate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDistributedAvailabilityGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginUpdate(ctx, "<resource-group-name>", "<managed-instance-name>", "<distributed-availability-group-name>", armsql.DistributedAvailabilityGroup{ Properties: &armsql.DistributedAvailabilityGroupProperties{ ReplicationMode: to.Ptr(armsql.ReplicationModeSync), }, }, &armsql.DistributedAvailabilityGroupsClientBeginUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*DistributedAvailabilityGroupsClient) Get ¶ added in v0.4.0
func (client *DistributedAvailabilityGroupsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, distributedAvailabilityGroupName string, options *DistributedAvailabilityGroupsClientGetOptions) (DistributedAvailabilityGroupsClientGetResponse, error)
Get - Gets a distributed availability group info. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DistributedAvailabilityGroupsGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDistributedAvailabilityGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", "<distributed-availability-group-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*DistributedAvailabilityGroupsClient) ListByInstance ¶ added in v0.4.0
func (client *DistributedAvailabilityGroupsClient) ListByInstance(resourceGroupName string, managedInstanceName string, options *DistributedAvailabilityGroupsClientListByInstanceOptions) *runtime.Pager[DistributedAvailabilityGroupsClientListByInstanceResponse]
ListByInstance - Gets a list of a distributed availability groups in instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByInstance method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DistributedAvailabilityGroupsListByInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewDistributedAvailabilityGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByInstance("<resource-group-name>", "<managed-instance-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type DistributedAvailabilityGroupsClientBeginCreateOrUpdateOptions ¶ added in v0.4.0
type DistributedAvailabilityGroupsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DistributedAvailabilityGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.BeginCreateOrUpdate method.
type DistributedAvailabilityGroupsClientBeginDeleteOptions ¶ added in v0.4.0
type DistributedAvailabilityGroupsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DistributedAvailabilityGroupsClientBeginDeleteOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.BeginDelete method.
type DistributedAvailabilityGroupsClientBeginUpdateOptions ¶ added in v0.4.0
type DistributedAvailabilityGroupsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DistributedAvailabilityGroupsClientBeginUpdateOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.BeginUpdate method.
type DistributedAvailabilityGroupsClientCreateOrUpdateResponse ¶ added in v0.4.0
type DistributedAvailabilityGroupsClientCreateOrUpdateResponse struct {
DistributedAvailabilityGroup
}
DistributedAvailabilityGroupsClientCreateOrUpdateResponse contains the response from method DistributedAvailabilityGroupsClient.CreateOrUpdate.
type DistributedAvailabilityGroupsClientDeleteResponse ¶ added in v0.4.0
type DistributedAvailabilityGroupsClientDeleteResponse struct { }
DistributedAvailabilityGroupsClientDeleteResponse contains the response from method DistributedAvailabilityGroupsClient.Delete.
type DistributedAvailabilityGroupsClientGetOptions ¶ added in v0.4.0
type DistributedAvailabilityGroupsClientGetOptions struct { }
DistributedAvailabilityGroupsClientGetOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.Get method.
type DistributedAvailabilityGroupsClientGetResponse ¶ added in v0.4.0
type DistributedAvailabilityGroupsClientGetResponse struct {
DistributedAvailabilityGroup
}
DistributedAvailabilityGroupsClientGetResponse contains the response from method DistributedAvailabilityGroupsClient.Get.
type DistributedAvailabilityGroupsClientListByInstanceOptions ¶ added in v0.4.0
type DistributedAvailabilityGroupsClientListByInstanceOptions struct { }
DistributedAvailabilityGroupsClientListByInstanceOptions contains the optional parameters for the DistributedAvailabilityGroupsClient.ListByInstance method.
type DistributedAvailabilityGroupsClientListByInstanceResponse ¶ added in v0.4.0
type DistributedAvailabilityGroupsClientListByInstanceResponse struct {
DistributedAvailabilityGroupsListResult
}
DistributedAvailabilityGroupsClientListByInstanceResponse contains the response from method DistributedAvailabilityGroupsClient.ListByInstance.
type DistributedAvailabilityGroupsClientUpdateResponse ¶ added in v0.4.0
type DistributedAvailabilityGroupsClientUpdateResponse struct {
DistributedAvailabilityGroup
}
DistributedAvailabilityGroupsClientUpdateResponse contains the response from method DistributedAvailabilityGroupsClient.Update.
type DistributedAvailabilityGroupsListResult ¶ added in v0.4.0
type DistributedAvailabilityGroupsListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*DistributedAvailabilityGroup `json:"value,omitempty" azure:"ro"` }
DistributedAvailabilityGroupsListResult - A list of distributed availability groups in instance.
func (DistributedAvailabilityGroupsListResult) MarshalJSON ¶ added in v0.4.0
func (d DistributedAvailabilityGroupsListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DistributedAvailabilityGroupsListResult.
type EditionCapability ¶
type EditionCapability struct { // The reason for the capability not being available. Reason *string `json:"reason,omitempty"` // READ-ONLY; The database edition name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The read scale capability for the edition. ReadScale *ReadScaleCapability `json:"readScale,omitempty" azure:"ro"` // READ-ONLY; The status of the capability. Status *CapabilityStatus `json:"status,omitempty" azure:"ro"` // READ-ONLY; The list of supported service objectives for the edition. SupportedServiceLevelObjectives []*ServiceObjectiveCapability `json:"supportedServiceLevelObjectives,omitempty" azure:"ro"` // READ-ONLY; The list of supported storage capabilities for this edition SupportedStorageCapabilities []*StorageCapability `json:"supportedStorageCapabilities,omitempty" azure:"ro"` // READ-ONLY; Whether or not zone redundancy is supported for the edition. ZoneRedundant *bool `json:"zoneRedundant,omitempty" azure:"ro"` }
EditionCapability - The edition capability.
func (EditionCapability) MarshalJSON ¶
func (e EditionCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EditionCapability.
type ElasticPool ¶
type ElasticPool struct { // REQUIRED; Resource location. Location *string `json:"location,omitempty"` // Resource properties. Properties *ElasticPoolProperties `json:"properties,omitempty"` // 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 `json:"sku,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Kind of elastic pool. This is metadata used for the Azure portal experience. Kind *string `json:"kind,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ElasticPool - An elastic pool.
func (ElasticPool) MarshalJSON ¶
func (e ElasticPool) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller 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) ListByElasticPool ¶
func (client *ElasticPoolActivitiesClient) ListByElasticPool(resourceGroupName string, serverName string, elasticPoolName string, options *ElasticPoolActivitiesClientListByElasticPoolOptions) *runtime.Pager[ElasticPoolActivitiesClientListByElasticPoolResponse]
ListByElasticPool - Returns elastic pool activities. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByElasticPool method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ElasticPoolActivityList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewElasticPoolActivitiesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByElasticPool("<resource-group-name>", "<server-name>", "<elastic-pool-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ElasticPoolActivitiesClientListByElasticPoolOptions ¶ added in v0.3.0
type ElasticPoolActivitiesClientListByElasticPoolOptions struct { }
ElasticPoolActivitiesClientListByElasticPoolOptions contains the optional parameters for the ElasticPoolActivitiesClient.ListByElasticPool method.
type ElasticPoolActivitiesClientListByElasticPoolResponse ¶ added in v0.3.0
type ElasticPoolActivitiesClientListByElasticPoolResponse struct {
ElasticPoolActivityListResult
}
ElasticPoolActivitiesClientListByElasticPoolResponse contains the response from method ElasticPoolActivitiesClient.ListByElasticPool.
type ElasticPoolActivity ¶
type ElasticPoolActivity struct { // The geo-location where the resource lives Location *string `json:"location,omitempty"` // The properties representing the resource. Properties *ElasticPoolActivityProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ElasticPoolActivity - Represents the activity on an elastic pool.
type ElasticPoolActivityListResult ¶
type ElasticPoolActivityListResult struct { // REQUIRED; The list of elastic pool activities. Value []*ElasticPoolActivity `json:"value,omitempty"` }
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.
type ElasticPoolActivityProperties ¶
type ElasticPoolActivityProperties struct { // READ-ONLY; The name of the elastic pool. ElasticPoolName *string `json:"elasticPoolName,omitempty" azure:"ro"` // READ-ONLY; The time the operation finished (ISO8601 format). EndTime *time.Time `json:"endTime,omitempty" azure:"ro"` // READ-ONLY; The error code if available. ErrorCode *int32 `json:"errorCode,omitempty" azure:"ro"` // READ-ONLY; The error message if available. ErrorMessage *string `json:"errorMessage,omitempty" azure:"ro"` // READ-ONLY; The error severity if available. ErrorSeverity *int32 `json:"errorSeverity,omitempty" azure:"ro"` // READ-ONLY; The operation name. Operation *string `json:"operation,omitempty" azure:"ro"` // READ-ONLY; The unique operation ID. OperationID *string `json:"operationId,omitempty" azure:"ro"` // READ-ONLY; The percentage complete if available. PercentComplete *int32 `json:"percentComplete,omitempty" azure:"ro"` // READ-ONLY; The requested per database DTU cap. RequestedDatabaseDtuCap *int32 `json:"requestedDatabaseDtuCap,omitempty" azure:"ro"` // READ-ONLY; The requested per database DTU guarantee. RequestedDatabaseDtuGuarantee *int32 `json:"requestedDatabaseDtuGuarantee,omitempty" azure:"ro"` // READ-ONLY; The requested max DTU per database if available. RequestedDatabaseDtuMax *int32 `json:"requestedDatabaseDtuMax,omitempty" azure:"ro"` // READ-ONLY; The requested min DTU per database if available. RequestedDatabaseDtuMin *int32 `json:"requestedDatabaseDtuMin,omitempty" azure:"ro"` // READ-ONLY; The requested DTU for the pool if available. RequestedDtu *int32 `json:"requestedDtu,omitempty" azure:"ro"` // READ-ONLY; The requested DTU guarantee. RequestedDtuGuarantee *int32 `json:"requestedDtuGuarantee,omitempty" azure:"ro"` // READ-ONLY; The requested name for the elastic pool if available. RequestedElasticPoolName *string `json:"requestedElasticPoolName,omitempty" azure:"ro"` // READ-ONLY; The requested storage limit for the pool in GB if available. RequestedStorageLimitInGB *int64 `json:"requestedStorageLimitInGB,omitempty" azure:"ro"` // READ-ONLY; The requested storage limit in MB. RequestedStorageLimitInMB *int32 `json:"requestedStorageLimitInMB,omitempty" azure:"ro"` // READ-ONLY; The name of the server the elastic pool is in. ServerName *string `json:"serverName,omitempty" azure:"ro"` // READ-ONLY; The time the operation started (ISO8601 format). StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` // READ-ONLY; The current state of the operation. State *string `json:"state,omitempty" azure:"ro"` }
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) ListByElasticPool ¶
func (client *ElasticPoolDatabaseActivitiesClient) ListByElasticPool(resourceGroupName string, serverName string, elasticPoolName string, options *ElasticPoolDatabaseActivitiesClientListByElasticPoolOptions) *runtime.Pager[ElasticPoolDatabaseActivitiesClientListByElasticPoolResponse]
ListByElasticPool - Returns activity on databases inside of an elastic pool. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByElasticPool method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ElasticPoolDatabaseActivityList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewElasticPoolDatabaseActivitiesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByElasticPool("<resource-group-name>", "<server-name>", "<elastic-pool-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ElasticPoolDatabaseActivitiesClientListByElasticPoolOptions ¶ added in v0.3.0
type ElasticPoolDatabaseActivitiesClientListByElasticPoolOptions struct { }
ElasticPoolDatabaseActivitiesClientListByElasticPoolOptions contains the optional parameters for the ElasticPoolDatabaseActivitiesClient.ListByElasticPool method.
type ElasticPoolDatabaseActivitiesClientListByElasticPoolResponse ¶ added in v0.3.0
type ElasticPoolDatabaseActivitiesClientListByElasticPoolResponse struct {
ElasticPoolDatabaseActivityListResult
}
ElasticPoolDatabaseActivitiesClientListByElasticPoolResponse contains the response from method ElasticPoolDatabaseActivitiesClient.ListByElasticPool.
type ElasticPoolDatabaseActivity ¶
type ElasticPoolDatabaseActivity struct { // The geo-location where the resource lives Location *string `json:"location,omitempty"` // The properties representing the resource. Properties *ElasticPoolDatabaseActivityProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ElasticPoolDatabaseActivity - Represents the activity on an elastic pool.
type ElasticPoolDatabaseActivityListResult ¶
type ElasticPoolDatabaseActivityListResult struct { // REQUIRED; The list of elastic pool database activities. Value []*ElasticPoolDatabaseActivity `json:"value,omitempty"` }
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.
type ElasticPoolDatabaseActivityProperties ¶
type ElasticPoolDatabaseActivityProperties struct { // READ-ONLY; The name of the current elastic pool the database is in if available. CurrentElasticPoolName *string `json:"currentElasticPoolName,omitempty" azure:"ro"` // READ-ONLY; The name of the current service objective if available. CurrentServiceObjective *string `json:"currentServiceObjective,omitempty" azure:"ro"` // READ-ONLY; The database name. DatabaseName *string `json:"databaseName,omitempty" azure:"ro"` // READ-ONLY; The time the operation finished (ISO8601 format). EndTime *time.Time `json:"endTime,omitempty" azure:"ro"` // READ-ONLY; The error code if available. ErrorCode *int32 `json:"errorCode,omitempty" azure:"ro"` // READ-ONLY; The error message if available. ErrorMessage *string `json:"errorMessage,omitempty" azure:"ro"` // READ-ONLY; The error severity if available. ErrorSeverity *int32 `json:"errorSeverity,omitempty" azure:"ro"` // READ-ONLY; The operation name. Operation *string `json:"operation,omitempty" azure:"ro"` // READ-ONLY; The unique operation ID. OperationID *string `json:"operationId,omitempty" azure:"ro"` // READ-ONLY; The percentage complete if available. PercentComplete *int32 `json:"percentComplete,omitempty" azure:"ro"` // READ-ONLY; The name for the elastic pool the database is moving into if available. RequestedElasticPoolName *string `json:"requestedElasticPoolName,omitempty" azure:"ro"` // READ-ONLY; The name of the requested service objective if available. RequestedServiceObjective *string `json:"requestedServiceObjective,omitempty" azure:"ro"` // READ-ONLY; The name of the server the elastic pool is in. ServerName *string `json:"serverName,omitempty" azure:"ro"` // READ-ONLY; The time the operation started (ISO8601 format). StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` // READ-ONLY; The current state of the operation. State *string `json:"state,omitempty" azure:"ro"` }
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 `json:"reason,omitempty"` // READ-ONLY; The elastic pool edition name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The status of the capability. Status *CapabilityStatus `json:"status,omitempty" azure:"ro"` // READ-ONLY; The list of supported elastic pool DTU levels for the edition. SupportedElasticPoolPerformanceLevels []*ElasticPoolPerformanceLevelCapability `json:"supportedElasticPoolPerformanceLevels,omitempty" azure:"ro"` // READ-ONLY; Whether or not zone redundancy is supported for the edition. ZoneRedundant *bool `json:"zoneRedundant,omitempty" azure:"ro"` }
ElasticPoolEditionCapability - The elastic pool edition capability.
func (ElasticPoolEditionCapability) MarshalJSON ¶
func (e ElasticPoolEditionCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller 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 `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ElasticPool `json:"value,omitempty" azure:"ro"` }
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.
type ElasticPoolOperation ¶
type ElasticPoolOperation struct { // Resource properties. Properties *ElasticPoolOperationProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ElasticPoolOperation - A elastic pool operation.
type ElasticPoolOperationListResult ¶
type ElasticPoolOperationListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ElasticPoolOperation `json:"value,omitempty" azure:"ro"` }
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.
type ElasticPoolOperationProperties ¶
type ElasticPoolOperationProperties struct { // READ-ONLY; The operation description. Description *string `json:"description,omitempty" azure:"ro"` // READ-ONLY; The name of the elastic pool the operation is being performed on. ElasticPoolName *string `json:"elasticPoolName,omitempty" azure:"ro"` // READ-ONLY; The operation error code. ErrorCode *int32 `json:"errorCode,omitempty" azure:"ro"` // READ-ONLY; The operation error description. ErrorDescription *string `json:"errorDescription,omitempty" azure:"ro"` // READ-ONLY; The operation error severity. ErrorSeverity *int32 `json:"errorSeverity,omitempty" azure:"ro"` // READ-ONLY; The estimated completion time of the operation. EstimatedCompletionTime *time.Time `json:"estimatedCompletionTime,omitempty" azure:"ro"` // READ-ONLY; Whether the operation can be cancelled. IsCancellable *bool `json:"isCancellable,omitempty" azure:"ro"` // READ-ONLY; Whether or not the error is a user error. IsUserError *bool `json:"isUserError,omitempty" azure:"ro"` // READ-ONLY; The name of operation. Operation *string `json:"operation,omitempty" azure:"ro"` // READ-ONLY; The friendly name of operation. OperationFriendlyName *string `json:"operationFriendlyName,omitempty" azure:"ro"` // READ-ONLY; The percentage of the operation completed. PercentComplete *int32 `json:"percentComplete,omitempty" azure:"ro"` // READ-ONLY; The name of the server. ServerName *string `json:"serverName,omitempty" azure:"ro"` // READ-ONLY; The operation start time. StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` // READ-ONLY; The operation state. State *string `json:"state,omitempty" azure:"ro"` }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CancelElasticPoolOperation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewElasticPoolOperationsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Cancel(ctx, "<resource-group-name>", "<server-name>", "<elastic-pool-name>", "<operation-id>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
Output:
func (*ElasticPoolOperationsClient) ListByElasticPool ¶
func (client *ElasticPoolOperationsClient) ListByElasticPool(resourceGroupName string, serverName string, elasticPoolName string, options *ElasticPoolOperationsClientListByElasticPoolOptions) *runtime.Pager[ElasticPoolOperationsClientListByElasticPoolResponse]
ListByElasticPool - Gets a list of operations performed on the elastic pool. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByElasticPool method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListElasticPoolOperations.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewElasticPoolOperationsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByElasticPool("<resource-group-name>", "<server-name>", "<elastic-pool-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ElasticPoolOperationsClientCancelOptions ¶ added in v0.3.0
type ElasticPoolOperationsClientCancelOptions struct { }
ElasticPoolOperationsClientCancelOptions contains the optional parameters for the ElasticPoolOperationsClient.Cancel method.
type ElasticPoolOperationsClientCancelResponse ¶ added in v0.3.0
type ElasticPoolOperationsClientCancelResponse struct { }
ElasticPoolOperationsClientCancelResponse contains the response from method ElasticPoolOperationsClient.Cancel.
type ElasticPoolOperationsClientListByElasticPoolOptions ¶ added in v0.3.0
type ElasticPoolOperationsClientListByElasticPoolOptions struct { }
ElasticPoolOperationsClientListByElasticPoolOptions contains the optional parameters for the ElasticPoolOperationsClient.ListByElasticPool method.
type ElasticPoolOperationsClientListByElasticPoolResponse ¶ added in v0.3.0
type ElasticPoolOperationsClientListByElasticPoolResponse struct {
ElasticPoolOperationListResult
}
ElasticPoolOperationsClientListByElasticPoolResponse contains the response from method ElasticPoolOperationsClient.ListByElasticPool.
type ElasticPoolPerDatabaseMaxPerformanceLevelCapability ¶
type ElasticPoolPerDatabaseMaxPerformanceLevelCapability struct { // The reason for the capability not being available. Reason *string `json:"reason,omitempty"` // READ-ONLY; The maximum performance level per database. Limit *float64 `json:"limit,omitempty" azure:"ro"` // READ-ONLY; The status of the capability. Status *CapabilityStatus `json:"status,omitempty" azure:"ro"` // READ-ONLY; The list of supported min database performance levels. SupportedPerDatabaseMinPerformanceLevels []*ElasticPoolPerDatabaseMinPerformanceLevelCapability `json:"supportedPerDatabaseMinPerformanceLevels,omitempty" azure:"ro"` // READ-ONLY; Unit type used to measure performance level. Unit *PerformanceLevelUnit `json:"unit,omitempty" azure:"ro"` }
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.
type ElasticPoolPerDatabaseMinPerformanceLevelCapability ¶
type ElasticPoolPerDatabaseMinPerformanceLevelCapability struct { // The reason for the capability not being available. Reason *string `json:"reason,omitempty"` // READ-ONLY; The minimum performance level per database. Limit *float64 `json:"limit,omitempty" azure:"ro"` // READ-ONLY; The status of the capability. Status *CapabilityStatus `json:"status,omitempty" azure:"ro"` // READ-ONLY; Unit type used to measure performance level. Unit *PerformanceLevelUnit `json:"unit,omitempty" azure:"ro"` }
ElasticPoolPerDatabaseMinPerformanceLevelCapability - The minimum per-database performance level capability.
type ElasticPoolPerDatabaseSettings ¶
type ElasticPoolPerDatabaseSettings struct { // The maximum capacity any one database can consume. MaxCapacity *float64 `json:"maxCapacity,omitempty"` // The minimum capacity all databases are guaranteed. MinCapacity *float64 `json:"minCapacity,omitempty"` }
ElasticPoolPerDatabaseSettings - Per database settings of an elastic pool.
type ElasticPoolPerformanceLevelCapability ¶
type ElasticPoolPerformanceLevelCapability struct { // The reason for the capability not being available. Reason *string `json:"reason,omitempty"` // READ-ONLY; The included (free) max size for this performance level. IncludedMaxSize *MaxSizeCapability `json:"includedMaxSize,omitempty" azure:"ro"` // READ-ONLY; The maximum number of databases supported. MaxDatabaseCount *int32 `json:"maxDatabaseCount,omitempty" azure:"ro"` // READ-ONLY; The performance level for the pool. PerformanceLevel *PerformanceLevelCapability `json:"performanceLevel,omitempty" azure:"ro"` // READ-ONLY; The sku. SKU *SKU `json:"sku,omitempty" azure:"ro"` // READ-ONLY; The status of the capability. Status *CapabilityStatus `json:"status,omitempty" azure:"ro"` // READ-ONLY; List of supported license types. SupportedLicenseTypes []*LicenseTypeCapability `json:"supportedLicenseTypes,omitempty" azure:"ro"` // READ-ONLY; List of supported maintenance configurations SupportedMaintenanceConfigurations []*MaintenanceConfigurationCapability `json:"supportedMaintenanceConfigurations,omitempty" azure:"ro"` // READ-ONLY; The list of supported max sizes. SupportedMaxSizes []*MaxSizeRangeCapability `json:"supportedMaxSizes,omitempty" azure:"ro"` // READ-ONLY; The list of supported per database max performance levels. SupportedPerDatabaseMaxPerformanceLevels []*ElasticPoolPerDatabaseMaxPerformanceLevelCapability `json:"supportedPerDatabaseMaxPerformanceLevels,omitempty" azure:"ro"` // READ-ONLY; The list of supported per database max sizes. SupportedPerDatabaseMaxSizes []*MaxSizeRangeCapability `json:"supportedPerDatabaseMaxSizes,omitempty" azure:"ro"` // READ-ONLY; Whether or not zone redundancy is supported for the performance level. ZoneRedundant *bool `json:"zoneRedundant,omitempty" azure:"ro"` }
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.
type ElasticPoolProperties ¶
type ElasticPoolProperties struct { // The number of secondary replicas associated with the elastic pool that are used to provide high availability. HighAvailabilityReplicaCount *int32 `json:"highAvailabilityReplicaCount,omitempty"` // The license type to apply for this elastic pool. LicenseType *ElasticPoolLicenseType `json:"licenseType,omitempty"` // Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates // will will occur. MaintenanceConfigurationID *string `json:"maintenanceConfigurationId,omitempty"` // The storage limit for the database elastic pool in bytes. MaxSizeBytes *int64 `json:"maxSizeBytes,omitempty"` // The per database settings for the elastic pool. PerDatabaseSettings *ElasticPoolPerDatabaseSettings `json:"perDatabaseSettings,omitempty"` // 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 `json:"zoneRedundant,omitempty"` // READ-ONLY; The creation date of the elastic pool (ISO8601 format). CreationDate *time.Time `json:"creationDate,omitempty" azure:"ro"` // READ-ONLY; The state of the elastic pool. State *ElasticPoolState `json:"state,omitempty" azure:"ro"` }
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 `json:"properties,omitempty"` // An ARM Resource SKU. SKU *SKU `json:"sku,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` }
ElasticPoolUpdate - An elastic pool update.
func (ElasticPoolUpdate) MarshalJSON ¶
func (e ElasticPoolUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ElasticPoolUpdate.
type ElasticPoolUpdateProperties ¶
type ElasticPoolUpdateProperties struct { // The number of secondary replicas associated with the elastic pool that are used to provide high availability. Applicable // only to Hyperscale elastic pools. HighAvailabilityReplicaCount *int32 `json:"highAvailabilityReplicaCount,omitempty"` // The license type to apply for this elastic pool. LicenseType *ElasticPoolLicenseType `json:"licenseType,omitempty"` // Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates // will will occur. MaintenanceConfigurationID *string `json:"maintenanceConfigurationId,omitempty"` // The storage limit for the database elastic pool in bytes. MaxSizeBytes *int64 `json:"maxSizeBytes,omitempty"` // The per database settings for the elastic pool. PerDatabaseSettings *ElasticPoolPerDatabaseSettings `json:"perDatabaseSettings,omitempty"` // 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 `json:"zoneRedundant,omitempty"` }
ElasticPoolUpdateProperties - Properties of an elastic pool
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) (*armruntime.Poller[ElasticPoolsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates an elastic pool. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/HyperscaleElasticPoolCreateOrUpdateSetHighAvailabilityReplicaCount.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewElasticPoolsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<elastic-pool-name>", armsql.ElasticPool{ Location: to.Ptr("<location>"), Properties: &armsql.ElasticPoolProperties{ HighAvailabilityReplicaCount: to.Ptr[int32](2), }, SKU: &armsql.SKU{ Name: to.Ptr("<name>"), }, }, &armsql.ElasticPoolsClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ElasticPoolsClient) BeginDelete ¶
func (client *ElasticPoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, options *ElasticPoolsClientBeginDeleteOptions) (*armruntime.Poller[ElasticPoolsClientDeleteResponse], error)
BeginDelete - Deletes an elastic pool. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/ElasticPoolDelete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewElasticPoolsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<server-name>", "<elastic-pool-name>", &armsql.ElasticPoolsClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*ElasticPoolsClient) BeginFailover ¶
func (client *ElasticPoolsClient) BeginFailover(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, options *ElasticPoolsClientBeginFailoverOptions) (*armruntime.Poller[ElasticPoolsClientFailoverResponse], error)
BeginFailover - Failovers an elastic pool. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/FailoverElasticPool.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewElasticPoolsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginFailover(ctx, "<resource-group-name>", "<server-name>", "<elastic-pool-name>", &armsql.ElasticPoolsClientBeginFailoverOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*ElasticPoolsClient) BeginUpdate ¶
func (client *ElasticPoolsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, parameters ElasticPoolUpdate, options *ElasticPoolsClientBeginUpdateOptions) (*armruntime.Poller[ElasticPoolsClientUpdateResponse], error)
BeginUpdate - Updates an elastic pool. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/ElasticPoolUpdateAssignMaintenanceConfiguration.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewElasticPoolsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginUpdate(ctx, "<resource-group-name>", "<server-name>", "<elastic-pool-name>", armsql.ElasticPoolUpdate{ Properties: &armsql.ElasticPoolUpdateProperties{ MaintenanceConfigurationID: to.Ptr("<maintenance-configuration-id>"), }, }, &armsql.ElasticPoolsClientBeginUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/HyperscaleElasticPoolGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewElasticPoolsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<elastic-pool-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ElasticPoolsClient) ListByServer ¶
func (client *ElasticPoolsClient) ListByServer(resourceGroupName string, serverName string, options *ElasticPoolsClientListByServerOptions) *runtime.Pager[ElasticPoolsClientListByServerResponse]
ListByServer - Gets all elastic pools in a server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-08-01-preview/examples/ElasticPoolListByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewElasticPoolsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<resource-group-name>", "<server-name>", &armsql.ElasticPoolsClientListByServerOptions{Skip: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*ElasticPoolsClient) ListMetricDefinitions ¶
func (client *ElasticPoolsClient) ListMetricDefinitions(resourceGroupName string, serverName string, elasticPoolName string, options *ElasticPoolsClientListMetricDefinitionsOptions) *runtime.Pager[ElasticPoolsClientListMetricDefinitionsResponse]
ListMetricDefinitions - Returns elastic pool metric definitions. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListMetricDefinitions method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ElasticPoolMetricsDefinitionsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewElasticPoolsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListMetricDefinitions("<resource-group-name>", "<server-name>", "<elastic-pool-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*ElasticPoolsClient) ListMetrics ¶
func (client *ElasticPoolsClient) ListMetrics(resourceGroupName string, serverName string, elasticPoolName string, filter string, options *ElasticPoolsClientListMetricsOptions) *runtime.Pager[ElasticPoolsClientListMetricsResponse]
ListMetrics - Returns elastic pool metrics. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListMetrics method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ElasticPoolMetricsListWithFilter.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewElasticPoolsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListMetrics("<resource-group-name>", "<server-name>", "<elastic-pool-name>", "<filter>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ElasticPoolsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ElasticPoolsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ElasticPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the ElasticPoolsClient.BeginCreateOrUpdate method.
type ElasticPoolsClientBeginDeleteOptions ¶ added in v0.3.0
type ElasticPoolsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ElasticPoolsClientBeginDeleteOptions contains the optional parameters for the ElasticPoolsClient.BeginDelete method.
type ElasticPoolsClientBeginFailoverOptions ¶ added in v0.3.0
type ElasticPoolsClientBeginFailoverOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ElasticPoolsClientBeginFailoverOptions contains the optional parameters for the ElasticPoolsClient.BeginFailover method.
type ElasticPoolsClientBeginUpdateOptions ¶ added in v0.3.0
type ElasticPoolsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ElasticPoolsClientBeginUpdateOptions contains the optional parameters for the ElasticPoolsClient.BeginUpdate method.
type ElasticPoolsClientCreateOrUpdateResponse ¶ added in v0.3.0
type ElasticPoolsClientCreateOrUpdateResponse struct {
ElasticPool
}
ElasticPoolsClientCreateOrUpdateResponse contains the response from method ElasticPoolsClient.CreateOrUpdate.
type ElasticPoolsClientDeleteResponse ¶ added in v0.3.0
type ElasticPoolsClientDeleteResponse struct { }
ElasticPoolsClientDeleteResponse contains the response from method ElasticPoolsClient.Delete.
type ElasticPoolsClientFailoverResponse ¶ added in v0.3.0
type ElasticPoolsClientFailoverResponse struct { }
ElasticPoolsClientFailoverResponse contains the response from method ElasticPoolsClient.Failover.
type ElasticPoolsClientGetOptions ¶ added in v0.3.0
type ElasticPoolsClientGetOptions struct { }
ElasticPoolsClientGetOptions contains the optional parameters for the ElasticPoolsClient.Get method.
type ElasticPoolsClientGetResponse ¶ added in v0.3.0
type ElasticPoolsClientGetResponse struct {
ElasticPool
}
ElasticPoolsClientGetResponse contains the response from method ElasticPoolsClient.Get.
type ElasticPoolsClientListByServerOptions ¶ added in v0.3.0
type ElasticPoolsClientListByServerOptions struct { // The number of elements in the collection to skip. Skip *int64 }
ElasticPoolsClientListByServerOptions contains the optional parameters for the ElasticPoolsClient.ListByServer method.
type ElasticPoolsClientListByServerResponse ¶ added in v0.3.0
type ElasticPoolsClientListByServerResponse struct {
ElasticPoolListResult
}
ElasticPoolsClientListByServerResponse contains the response from method ElasticPoolsClient.ListByServer.
type ElasticPoolsClientListMetricDefinitionsOptions ¶ added in v0.3.0
type ElasticPoolsClientListMetricDefinitionsOptions struct { }
ElasticPoolsClientListMetricDefinitionsOptions contains the optional parameters for the ElasticPoolsClient.ListMetricDefinitions method.
type ElasticPoolsClientListMetricDefinitionsResponse ¶ added in v0.3.0
type ElasticPoolsClientListMetricDefinitionsResponse struct {
MetricDefinitionListResult
}
ElasticPoolsClientListMetricDefinitionsResponse contains the response from method ElasticPoolsClient.ListMetricDefinitions.
type ElasticPoolsClientListMetricsOptions ¶ added in v0.3.0
type ElasticPoolsClientListMetricsOptions struct { }
ElasticPoolsClientListMetricsOptions contains the optional parameters for the ElasticPoolsClient.ListMetrics method.
type ElasticPoolsClientListMetricsResponse ¶ added in v0.3.0
type ElasticPoolsClientListMetricsResponse struct {
MetricListResult
}
ElasticPoolsClientListMetricsResponse contains the response from method ElasticPoolsClient.ListMetrics.
type ElasticPoolsClientUpdateResponse ¶ added in v0.3.0
type ElasticPoolsClientUpdateResponse struct {
ElasticPool
}
ElasticPoolsClientUpdateResponse contains the response from method ElasticPoolsClient.Update.
type EncryptionProtector ¶
type EncryptionProtector struct { // Resource properties. Properties *EncryptionProtectorProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Kind of encryption protector. This is metadata used for the Azure portal experience. Kind *string `json:"kind,omitempty" azure:"ro"` // READ-ONLY; Resource location. Location *string `json:"location,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
EncryptionProtector - The server encryption protector.
type EncryptionProtectorListResult ¶
type EncryptionProtectorListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*EncryptionProtector `json:"value,omitempty" azure:"ro"` }
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.
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 `json:"serverKeyType,omitempty"` // Key auto rotation opt-in flag. Either true or false. AutoRotationEnabled *bool `json:"autoRotationEnabled,omitempty"` // The name of the server key. ServerKeyName *string `json:"serverKeyName,omitempty"` // READ-ONLY; Subregion of the encryption protector. Subregion *string `json:"subregion,omitempty" azure:"ro"` // READ-ONLY; Thumbprint of the server key. Thumbprint *string `json:"thumbprint,omitempty" azure:"ro"` // READ-ONLY; The URI of the server key. URI *string `json:"uri,omitempty" azure:"ro"` }
EncryptionProtectorProperties - Properties for an encryption protector execution.
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) (*armruntime.Poller[EncryptionProtectorsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Updates an existing encryption protector. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/EncryptionProtectorCreateOrUpdateKeyVault.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewEncryptionProtectorsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", armsql.EncryptionProtectorNameCurrent, armsql.EncryptionProtector{ Properties: &armsql.EncryptionProtectorProperties{ AutoRotationEnabled: to.Ptr(false), ServerKeyName: to.Ptr("<server-key-name>"), ServerKeyType: to.Ptr(armsql.ServerKeyTypeAzureKeyVault), }, }, &armsql.EncryptionProtectorsClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*EncryptionProtectorsClient) BeginRevalidate ¶
func (client *EncryptionProtectorsClient) BeginRevalidate(ctx context.Context, resourceGroupName string, serverName string, encryptionProtectorName EncryptionProtectorName, options *EncryptionProtectorsClientBeginRevalidateOptions) (*armruntime.Poller[EncryptionProtectorsClientRevalidateResponse], error)
BeginRevalidate - Revalidates an existing encryption protector. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/EncryptionProtectorRevalidate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewEncryptionProtectorsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginRevalidate(ctx, "<resource-group-name>", "<server-name>", armsql.EncryptionProtectorNameCurrent, &armsql.EncryptionProtectorsClientBeginRevalidateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/EncryptionProtectorGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewEncryptionProtectorsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", armsql.EncryptionProtectorNameCurrent, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*EncryptionProtectorsClient) ListByServer ¶
func (client *EncryptionProtectorsClient) ListByServer(resourceGroupName string, serverName string, options *EncryptionProtectorsClientListByServerOptions) *runtime.Pager[EncryptionProtectorsClientListByServerResponse]
ListByServer - Gets a list of server encryption protectors If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/EncryptionProtectorList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewEncryptionProtectorsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<resource-group-name>", "<server-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type EncryptionProtectorsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type EncryptionProtectorsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
EncryptionProtectorsClientBeginCreateOrUpdateOptions contains the optional parameters for the EncryptionProtectorsClient.BeginCreateOrUpdate method.
type EncryptionProtectorsClientBeginRevalidateOptions ¶ added in v0.3.0
type EncryptionProtectorsClientBeginRevalidateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
EncryptionProtectorsClientBeginRevalidateOptions contains the optional parameters for the EncryptionProtectorsClient.BeginRevalidate method.
type EncryptionProtectorsClientCreateOrUpdateResponse ¶ added in v0.3.0
type EncryptionProtectorsClientCreateOrUpdateResponse struct {
EncryptionProtector
}
EncryptionProtectorsClientCreateOrUpdateResponse contains the response from method EncryptionProtectorsClient.CreateOrUpdate.
type EncryptionProtectorsClientGetOptions ¶ added in v0.3.0
type EncryptionProtectorsClientGetOptions struct { }
EncryptionProtectorsClientGetOptions contains the optional parameters for the EncryptionProtectorsClient.Get method.
type EncryptionProtectorsClientGetResponse ¶ added in v0.3.0
type EncryptionProtectorsClientGetResponse struct {
EncryptionProtector
}
EncryptionProtectorsClientGetResponse contains the response from method EncryptionProtectorsClient.Get.
type EncryptionProtectorsClientListByServerOptions ¶ added in v0.3.0
type EncryptionProtectorsClientListByServerOptions struct { }
EncryptionProtectorsClientListByServerOptions contains the optional parameters for the EncryptionProtectorsClient.ListByServer method.
type EncryptionProtectorsClientListByServerResponse ¶ added in v0.3.0
type EncryptionProtectorsClientListByServerResponse struct {
EncryptionProtectorListResult
}
EncryptionProtectorsClientListByServerResponse contains the response from method EncryptionProtectorsClient.ListByServer.
type EncryptionProtectorsClientRevalidateResponse ¶ added in v0.3.0
type EncryptionProtectorsClientRevalidateResponse struct { }
EncryptionProtectorsClientRevalidateResponse contains the response from method EncryptionProtectorsClient.Revalidate.
type EndpointCertificate ¶ added in v0.4.0
type EndpointCertificate struct { // Resource properties. Properties *EndpointCertificateProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
EndpointCertificate - Certificate used on an endpoint on the Managed Instance.
type EndpointCertificateListResult ¶ added in v0.4.0
type EndpointCertificateListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*EndpointCertificate `json:"value,omitempty" azure:"ro"` }
EndpointCertificateListResult - A list of endpoint certificates on the target instance.
func (EndpointCertificateListResult) MarshalJSON ¶ added in v0.4.0
func (e EndpointCertificateListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type EndpointCertificateListResult.
type EndpointCertificateProperties ¶ added in v0.4.0
type EndpointCertificateProperties struct { // The certificate public blob PublicBlob *string `json:"publicBlob,omitempty"` }
EndpointCertificateProperties - The properties of an endpoint certificate.
type EndpointCertificatesClient ¶ added in v0.4.0
type EndpointCertificatesClient struct {
// contains filtered or unexported fields
}
EndpointCertificatesClient contains the methods for the EndpointCertificates group. Don't use this type directly, use NewEndpointCertificatesClient() instead.
func NewEndpointCertificatesClient ¶ added in v0.4.0
func NewEndpointCertificatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EndpointCertificatesClient, error)
NewEndpointCertificatesClient creates a new instance of EndpointCertificatesClient with the specified values. subscriptionID - The subscription ID that identifies an Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*EndpointCertificatesClient) Get ¶ added in v0.4.0
func (client *EndpointCertificatesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, endpointType string, options *EndpointCertificatesClientGetOptions) (EndpointCertificatesClientGetResponse, error)
Get - Gets a certificate used on the endpoint with the given id. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/EndpointCertificatesGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewEndpointCertificatesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", "<endpoint-type>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*EndpointCertificatesClient) ListByInstance ¶ added in v0.4.0
func (client *EndpointCertificatesClient) ListByInstance(resourceGroupName string, managedInstanceName string, options *EndpointCertificatesClientListByInstanceOptions) *runtime.Pager[EndpointCertificatesClientListByInstanceResponse]
ListByInstance - List certificates used on endpoints on the target instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByInstance method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/EndpointCertificatesListByInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewEndpointCertificatesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByInstance("<resource-group-name>", "<managed-instance-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type EndpointCertificatesClientGetOptions ¶ added in v0.4.0
type EndpointCertificatesClientGetOptions struct { }
EndpointCertificatesClientGetOptions contains the optional parameters for the EndpointCertificatesClient.Get method.
type EndpointCertificatesClientGetResponse ¶ added in v0.4.0
type EndpointCertificatesClientGetResponse struct {
EndpointCertificate
}
EndpointCertificatesClientGetResponse contains the response from method EndpointCertificatesClient.Get.
type EndpointCertificatesClientListByInstanceOptions ¶ added in v0.4.0
type EndpointCertificatesClientListByInstanceOptions struct { }
EndpointCertificatesClientListByInstanceOptions contains the optional parameters for the EndpointCertificatesClient.ListByInstance method.
type EndpointCertificatesClientListByInstanceResponse ¶ added in v0.4.0
type EndpointCertificatesClientListByInstanceResponse struct {
EndpointCertificateListResult
}
EndpointCertificatesClientListByInstanceResponse contains the response from method EndpointCertificatesClient.ListByInstance.
type ExportDatabaseDefinition ¶
type ExportDatabaseDefinition struct { // REQUIRED; Administrator login name. AdministratorLogin *string `json:"administratorLogin,omitempty"` // REQUIRED; Administrator login password. AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` // REQUIRED; Storage key. StorageKey *string `json:"storageKey,omitempty"` // REQUIRED; Storage key type. StorageKeyType *StorageKeyType `json:"storageKeyType,omitempty"` // REQUIRED; Storage Uri. StorageURI *string `json:"storageUri,omitempty"` // Authentication type. AuthenticationType *string `json:"authenticationType,omitempty"` // Optional resource information to enable network isolation for request. NetworkIsolation *NetworkIsolationSettings `json:"networkIsolation,omitempty"` }
ExportDatabaseDefinition - Contains the information necessary to perform export database operation.
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. resourceGroupName - The name of the resource group that contains the resource. You can 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ExtendedDatabaseAzureMonitorAuditingCreateMin.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewExtendedDatabaseBlobAuditingPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.CreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<database-name>", 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) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ExtendedDatabaseBlobAuditingGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewExtendedDatabaseBlobAuditingPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ExtendedDatabaseBlobAuditingPoliciesClient) ListByDatabase ¶
func (client *ExtendedDatabaseBlobAuditingPoliciesClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, options *ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseOptions) *runtime.Pager[ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseResponse]
ListByDatabase - Lists extended auditing settings of a database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseExtendedAuditingSettingsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewExtendedDatabaseBlobAuditingPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<server-name>", "<database-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions ¶ added in v0.3.0
type ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions struct { }
ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ExtendedDatabaseBlobAuditingPoliciesClient.CreateOrUpdate method.
type ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse struct {
ExtendedDatabaseBlobAuditingPolicy
}
ExtendedDatabaseBlobAuditingPoliciesClientCreateOrUpdateResponse contains the response from method ExtendedDatabaseBlobAuditingPoliciesClient.CreateOrUpdate.
type ExtendedDatabaseBlobAuditingPoliciesClientGetOptions ¶ added in v0.3.0
type ExtendedDatabaseBlobAuditingPoliciesClientGetOptions struct { }
ExtendedDatabaseBlobAuditingPoliciesClientGetOptions contains the optional parameters for the ExtendedDatabaseBlobAuditingPoliciesClient.Get method.
type ExtendedDatabaseBlobAuditingPoliciesClientGetResponse ¶ added in v0.3.0
type ExtendedDatabaseBlobAuditingPoliciesClientGetResponse struct {
ExtendedDatabaseBlobAuditingPolicy
}
ExtendedDatabaseBlobAuditingPoliciesClientGetResponse contains the response from method ExtendedDatabaseBlobAuditingPoliciesClient.Get.
type ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseOptions ¶ added in v0.3.0
type ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseOptions struct { }
ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseOptions contains the optional parameters for the ExtendedDatabaseBlobAuditingPoliciesClient.ListByDatabase method.
type ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseResponse ¶ added in v0.3.0
type ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseResponse struct {
ExtendedDatabaseBlobAuditingPolicyListResult
}
ExtendedDatabaseBlobAuditingPoliciesClientListByDatabaseResponse contains the response from method ExtendedDatabaseBlobAuditingPoliciesClient.ListByDatabase.
type ExtendedDatabaseBlobAuditingPolicy ¶
type ExtendedDatabaseBlobAuditingPolicy struct { // Resource properties. Properties *ExtendedDatabaseBlobAuditingPolicyProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ExtendedDatabaseBlobAuditingPolicy - An extended database blob auditing policy.
type ExtendedDatabaseBlobAuditingPolicyListResult ¶
type ExtendedDatabaseBlobAuditingPolicyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ExtendedDatabaseBlobAuditingPolicy `json:"value,omitempty" azure:"ro"` }
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.
type ExtendedDatabaseBlobAuditingPolicyProperties ¶
type ExtendedDatabaseBlobAuditingPolicyProperties struct { // REQUIRED; Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. State *BlobAuditingPolicyState `json:"state,omitempty"` // 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 BATCHCOMPLETED_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 `json:"auditActionsAndGroups,omitempty"` // 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 `json:"isAzureMonitorTargetEnabled,omitempty"` // Specifies whether storageAccountAccessKey value is the storage's secondary key. IsStorageSecondaryKeyInUse *bool `json:"isStorageSecondaryKeyInUse,omitempty"` // Specifies condition of where clause when creating an audit. PredicateExpression *string `json:"predicateExpression,omitempty"` // 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 `json:"queueDelayMs,omitempty"` // Specifies the number of days to keep in the audit logs in the storage account. RetentionDays *int32 `json:"retentionDays,omitempty"` // 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 `json:"storageAccountAccessKey,omitempty"` // Specifies the blob storage subscription Id. StorageAccountSubscriptionID *string `json:"storageAccountSubscriptionId,omitempty"` // Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint // or isAzureMonitorTargetEnabled is required. StorageEndpoint *string `json:"storageEndpoint,omitempty"` }
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.
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) (*armruntime.Poller[ExtendedServerBlobAuditingPoliciesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates an extended server's blob auditing policy. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ExtendedServerBlobAuditingCreateMax.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewExtendedServerBlobAuditingPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", 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("<predicate-expression>"), QueueDelayMs: to.Ptr[int32](4000), RetentionDays: to.Ptr[int32](6), State: to.Ptr(armsql.BlobAuditingPolicyStateEnabled), StorageAccountAccessKey: to.Ptr("<storage-account-access-key>"), StorageAccountSubscriptionID: to.Ptr("<storage-account-subscription-id>"), StorageEndpoint: to.Ptr("<storage-endpoint>"), }, }, &armsql.ExtendedServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ExtendedServerBlobAuditingGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewExtendedServerBlobAuditingPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ExtendedServerBlobAuditingPoliciesClient) ListByServer ¶
func (client *ExtendedServerBlobAuditingPoliciesClient) ListByServer(resourceGroupName string, serverName string, options *ExtendedServerBlobAuditingPoliciesClientListByServerOptions) *runtime.Pager[ExtendedServerBlobAuditingPoliciesClientListByServerResponse]
ListByServer - Lists extended auditing settings of a server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerExtendedAuditingSettingsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewExtendedServerBlobAuditingPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<resource-group-name>", "<server-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ExtendedServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ExtendedServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ExtendedServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ExtendedServerBlobAuditingPoliciesClient.BeginCreateOrUpdate method.
type ExtendedServerBlobAuditingPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ExtendedServerBlobAuditingPoliciesClientCreateOrUpdateResponse struct {
ExtendedServerBlobAuditingPolicy
}
ExtendedServerBlobAuditingPoliciesClientCreateOrUpdateResponse contains the response from method ExtendedServerBlobAuditingPoliciesClient.CreateOrUpdate.
type ExtendedServerBlobAuditingPoliciesClientGetOptions ¶ added in v0.3.0
type ExtendedServerBlobAuditingPoliciesClientGetOptions struct { }
ExtendedServerBlobAuditingPoliciesClientGetOptions contains the optional parameters for the ExtendedServerBlobAuditingPoliciesClient.Get method.
type ExtendedServerBlobAuditingPoliciesClientGetResponse ¶ added in v0.3.0
type ExtendedServerBlobAuditingPoliciesClientGetResponse struct {
ExtendedServerBlobAuditingPolicy
}
ExtendedServerBlobAuditingPoliciesClientGetResponse contains the response from method ExtendedServerBlobAuditingPoliciesClient.Get.
type ExtendedServerBlobAuditingPoliciesClientListByServerOptions ¶ added in v0.3.0
type ExtendedServerBlobAuditingPoliciesClientListByServerOptions struct { }
ExtendedServerBlobAuditingPoliciesClientListByServerOptions contains the optional parameters for the ExtendedServerBlobAuditingPoliciesClient.ListByServer method.
type ExtendedServerBlobAuditingPoliciesClientListByServerResponse ¶ added in v0.3.0
type ExtendedServerBlobAuditingPoliciesClientListByServerResponse struct {
ExtendedServerBlobAuditingPolicyListResult
}
ExtendedServerBlobAuditingPoliciesClientListByServerResponse contains the response from method ExtendedServerBlobAuditingPoliciesClient.ListByServer.
type ExtendedServerBlobAuditingPolicy ¶
type ExtendedServerBlobAuditingPolicy struct { // Resource properties. Properties *ExtendedServerBlobAuditingPolicyProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ExtendedServerBlobAuditingPolicy - An extended server blob auditing policy.
type ExtendedServerBlobAuditingPolicyListResult ¶
type ExtendedServerBlobAuditingPolicyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ExtendedServerBlobAuditingPolicy `json:"value,omitempty" azure:"ro"` }
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.
type ExtendedServerBlobAuditingPolicyProperties ¶
type ExtendedServerBlobAuditingPolicyProperties struct { // REQUIRED; Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. State *BlobAuditingPolicyState `json:"state,omitempty"` // 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 BATCHCOMPLETED_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 `json:"auditActionsAndGroups,omitempty"` // 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 `json:"isAzureMonitorTargetEnabled,omitempty"` // 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 `json:"isDevopsAuditEnabled,omitempty"` // Specifies whether storageAccountAccessKey value is the storage's secondary key. IsStorageSecondaryKeyInUse *bool `json:"isStorageSecondaryKeyInUse,omitempty"` // Specifies condition of where clause when creating an audit. PredicateExpression *string `json:"predicateExpression,omitempty"` // 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 `json:"queueDelayMs,omitempty"` // Specifies the number of days to keep in the audit logs in the storage account. RetentionDays *int32 `json:"retentionDays,omitempty"` // 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 `json:"storageAccountAccessKey,omitempty"` // Specifies the blob storage subscription Id. StorageAccountSubscriptionID *string `json:"storageAccountSubscriptionId,omitempty"` // Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint // or isAzureMonitorTargetEnabled is required. StorageEndpoint *string `json:"storageEndpoint,omitempty"` }
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.
type FailoverGroup ¶
type FailoverGroup struct { // Resource properties. Properties *FailoverGroupProperties `json:"properties,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource location. Location *string `json:"location,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
FailoverGroup - A failover group.
func (FailoverGroup) MarshalJSON ¶
func (f FailoverGroup) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FailoverGroup.
type FailoverGroupListResult ¶
type FailoverGroupListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*FailoverGroup `json:"value,omitempty" azure:"ro"` }
FailoverGroupListResult - A list of failover groups.
func (FailoverGroupListResult) MarshalJSON ¶
func (f FailoverGroupListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FailoverGroupListResult.
type FailoverGroupProperties ¶
type FailoverGroupProperties struct { // REQUIRED; List of partner server information for the failover group. PartnerServers []*PartnerInfo `json:"partnerServers,omitempty"` // REQUIRED; Read-write endpoint of the failover group instance. ReadWriteEndpoint *FailoverGroupReadWriteEndpoint `json:"readWriteEndpoint,omitempty"` // List of databases in the failover group. Databases []*string `json:"databases,omitempty"` // Read-only endpoint of the failover group instance. ReadOnlyEndpoint *FailoverGroupReadOnlyEndpoint `json:"readOnlyEndpoint,omitempty"` // READ-ONLY; Local replication role of the failover group instance. ReplicationRole *FailoverGroupReplicationRole `json:"replicationRole,omitempty" azure:"ro"` // READ-ONLY; Replication state of the failover group instance. ReplicationState *string `json:"replicationState,omitempty" azure:"ro"` }
FailoverGroupProperties - Properties of a failover group.
func (FailoverGroupProperties) MarshalJSON ¶
func (f FailoverGroupProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FailoverGroupProperties.
type FailoverGroupReadOnlyEndpoint ¶
type FailoverGroupReadOnlyEndpoint struct { // Failover policy of the read-only endpoint for the failover group. FailoverPolicy *ReadOnlyEndpointFailoverPolicy `json:"failoverPolicy,omitempty"` }
FailoverGroupReadOnlyEndpoint - Read-only endpoint of the failover group instance.
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 `json:"failoverPolicy,omitempty"` // Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then // failoverWithDataLossGracePeriodMinutes is required. FailoverWithDataLossGracePeriodMinutes *int32 `json:"failoverWithDataLossGracePeriodMinutes,omitempty"` }
FailoverGroupReadWriteEndpoint - Read-write endpoint of the failover group instance.
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 `json:"properties,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` }
FailoverGroupUpdate - A failover group update request.
func (FailoverGroupUpdate) MarshalJSON ¶
func (f FailoverGroupUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type FailoverGroupUpdate.
type FailoverGroupUpdateProperties ¶
type FailoverGroupUpdateProperties struct { // List of databases in the failover group. Databases []*string `json:"databases,omitempty"` // Read-only endpoint of the failover group instance. ReadOnlyEndpoint *FailoverGroupReadOnlyEndpoint `json:"readOnlyEndpoint,omitempty"` // Read-write endpoint of the failover group instance. ReadWriteEndpoint *FailoverGroupReadWriteEndpoint `json:"readWriteEndpoint,omitempty"` }
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.
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) (*armruntime.Poller[FailoverGroupsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a failover group. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupCreateOrUpdate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewFailoverGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<failover-group-name>", 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("<id>"), }}, ReadOnlyEndpoint: &armsql.FailoverGroupReadOnlyEndpoint{ FailoverPolicy: to.Ptr(armsql.ReadOnlyEndpointFailoverPolicyDisabled), }, ReadWriteEndpoint: &armsql.FailoverGroupReadWriteEndpoint{ FailoverPolicy: to.Ptr(armsql.ReadWriteEndpointFailoverPolicyAutomatic), FailoverWithDataLossGracePeriodMinutes: to.Ptr[int32](480), }, }, }, &armsql.FailoverGroupsClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*FailoverGroupsClient) BeginDelete ¶
func (client *FailoverGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, options *FailoverGroupsClientBeginDeleteOptions) (*armruntime.Poller[FailoverGroupsClientDeleteResponse], error)
BeginDelete - Deletes a failover group. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupDelete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewFailoverGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<server-name>", "<failover-group-name>", &armsql.FailoverGroupsClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*FailoverGroupsClient) BeginFailover ¶
func (client *FailoverGroupsClient) BeginFailover(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, options *FailoverGroupsClientBeginFailoverOptions) (*armruntime.Poller[FailoverGroupsClientFailoverResponse], error)
BeginFailover - Fails over from the current primary server to this server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupFailover.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewFailoverGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginFailover(ctx, "<resource-group-name>", "<server-name>", "<failover-group-name>", &armsql.FailoverGroupsClientBeginFailoverOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*FailoverGroupsClient) BeginForceFailoverAllowDataLoss ¶
func (client *FailoverGroupsClient) BeginForceFailoverAllowDataLoss(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, options *FailoverGroupsClientBeginForceFailoverAllowDataLossOptions) (*armruntime.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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupForceFailoverAllowDataLoss.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewFailoverGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginForceFailoverAllowDataLoss(ctx, "<resource-group-name>", "<server-name>", "<failover-group-name>", &armsql.FailoverGroupsClientBeginForceFailoverAllowDataLossOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*FailoverGroupsClient) BeginUpdate ¶
func (client *FailoverGroupsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, parameters FailoverGroupUpdate, options *FailoverGroupsClientBeginUpdateOptions) (*armruntime.Poller[FailoverGroupsClientUpdateResponse], error)
BeginUpdate - Updates a failover group. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupUpdate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewFailoverGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginUpdate(ctx, "<resource-group-name>", "<server-name>", "<failover-group-name>", 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), }, }, }, &armsql.FailoverGroupsClientBeginUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewFailoverGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<failover-group-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*FailoverGroupsClient) ListByServer ¶
func (client *FailoverGroupsClient) ListByServer(resourceGroupName string, serverName string, options *FailoverGroupsClientListByServerOptions) *runtime.Pager[FailoverGroupsClientListByServerResponse]
ListByServer - Lists the failover groups in a server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FailoverGroupList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewFailoverGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<resource-group-name>", "<server-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type FailoverGroupsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type FailoverGroupsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
FailoverGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the FailoverGroupsClient.BeginCreateOrUpdate method.
type FailoverGroupsClientBeginDeleteOptions ¶ added in v0.3.0
type FailoverGroupsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
FailoverGroupsClientBeginDeleteOptions contains the optional parameters for the FailoverGroupsClient.BeginDelete method.
type FailoverGroupsClientBeginFailoverOptions ¶ added in v0.3.0
type FailoverGroupsClientBeginFailoverOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
FailoverGroupsClientBeginFailoverOptions contains the optional parameters for the FailoverGroupsClient.BeginFailover method.
type FailoverGroupsClientBeginForceFailoverAllowDataLossOptions ¶ added in v0.3.0
type FailoverGroupsClientBeginForceFailoverAllowDataLossOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
FailoverGroupsClientBeginForceFailoverAllowDataLossOptions contains the optional parameters for the FailoverGroupsClient.BeginForceFailoverAllowDataLoss method.
type FailoverGroupsClientBeginUpdateOptions ¶ added in v0.3.0
type FailoverGroupsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
FailoverGroupsClientBeginUpdateOptions contains the optional parameters for the FailoverGroupsClient.BeginUpdate method.
type FailoverGroupsClientCreateOrUpdateResponse ¶ added in v0.3.0
type FailoverGroupsClientCreateOrUpdateResponse struct {
FailoverGroup
}
FailoverGroupsClientCreateOrUpdateResponse contains the response from method FailoverGroupsClient.CreateOrUpdate.
type FailoverGroupsClientDeleteResponse ¶ added in v0.3.0
type FailoverGroupsClientDeleteResponse struct { }
FailoverGroupsClientDeleteResponse contains the response from method FailoverGroupsClient.Delete.
type FailoverGroupsClientFailoverResponse ¶ added in v0.3.0
type FailoverGroupsClientFailoverResponse struct {
FailoverGroup
}
FailoverGroupsClientFailoverResponse contains the response from method FailoverGroupsClient.Failover.
type FailoverGroupsClientForceFailoverAllowDataLossResponse ¶ added in v0.3.0
type FailoverGroupsClientForceFailoverAllowDataLossResponse struct {
FailoverGroup
}
FailoverGroupsClientForceFailoverAllowDataLossResponse contains the response from method FailoverGroupsClient.ForceFailoverAllowDataLoss.
type FailoverGroupsClientGetOptions ¶ added in v0.3.0
type FailoverGroupsClientGetOptions struct { }
FailoverGroupsClientGetOptions contains the optional parameters for the FailoverGroupsClient.Get method.
type FailoverGroupsClientGetResponse ¶ added in v0.3.0
type FailoverGroupsClientGetResponse struct {
FailoverGroup
}
FailoverGroupsClientGetResponse contains the response from method FailoverGroupsClient.Get.
type FailoverGroupsClientListByServerOptions ¶ added in v0.3.0
type FailoverGroupsClientListByServerOptions struct { }
FailoverGroupsClientListByServerOptions contains the optional parameters for the FailoverGroupsClient.ListByServer method.
type FailoverGroupsClientListByServerResponse ¶ added in v0.3.0
type FailoverGroupsClientListByServerResponse struct {
FailoverGroupListResult
}
FailoverGroupsClientListByServerResponse contains the response from method FailoverGroupsClient.ListByServer.
type FailoverGroupsClientUpdateResponse ¶ added in v0.3.0
type FailoverGroupsClientUpdateResponse struct {
FailoverGroup
}
FailoverGroupsClientUpdateResponse contains the response from method FailoverGroupsClient.Update.
type FirewallRule ¶
type FirewallRule struct { // Resource name. Name *string `json:"name,omitempty"` // Resource properties. Properties *ServerFirewallRuleProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
FirewallRule - A server firewall rule.
type FirewallRuleList ¶
type FirewallRuleList struct {
Values []*FirewallRule `json:"values,omitempty"`
}
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.
type FirewallRuleListResult ¶
type FirewallRuleListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*FirewallRule `json:"value,omitempty" azure:"ro"` }
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.
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. resourceGroupName - The name of the resource group 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FirewallRuleCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewFirewallRulesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.CreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<firewall-rule-name>", armsql.FirewallRule{ Properties: &armsql.ServerFirewallRuleProperties{ EndIPAddress: to.Ptr("<end-ipaddress>"), StartIPAddress: to.Ptr("<start-ipaddress>"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FirewallRuleDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewFirewallRulesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Delete(ctx, "<resource-group-name>", "<server-name>", "<firewall-rule-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FirewallRuleGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewFirewallRulesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<firewall-rule-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*FirewallRulesClient) ListByServer ¶
func (client *FirewallRulesClient) ListByServer(resourceGroupName string, serverName string, options *FirewallRulesClientListByServerOptions) *runtime.Pager[FirewallRulesClientListByServerResponse]
ListByServer - Gets a list of firewall rules. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FirewallRuleList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewFirewallRulesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<resource-group-name>", "<server-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/FirewallRuleReplace.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewFirewallRulesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Replace(ctx, "<resource-group-name>", "<server-name>", armsql.FirewallRuleList{ Values: []*armsql.FirewallRule{ { Name: to.Ptr("<name>"), Properties: &armsql.ServerFirewallRuleProperties{ EndIPAddress: to.Ptr("<end-ipaddress>"), StartIPAddress: to.Ptr("<start-ipaddress>"), }, }}, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
type FirewallRulesClientCreateOrUpdateOptions ¶ added in v0.3.0
type FirewallRulesClientCreateOrUpdateOptions struct { }
FirewallRulesClientCreateOrUpdateOptions contains the optional parameters for the FirewallRulesClient.CreateOrUpdate method.
type FirewallRulesClientCreateOrUpdateResponse ¶ added in v0.3.0
type FirewallRulesClientCreateOrUpdateResponse struct {
FirewallRule
}
FirewallRulesClientCreateOrUpdateResponse contains the response from method FirewallRulesClient.CreateOrUpdate.
type FirewallRulesClientDeleteOptions ¶ added in v0.3.0
type FirewallRulesClientDeleteOptions struct { }
FirewallRulesClientDeleteOptions contains the optional parameters for the FirewallRulesClient.Delete method.
type FirewallRulesClientDeleteResponse ¶ added in v0.3.0
type FirewallRulesClientDeleteResponse struct { }
FirewallRulesClientDeleteResponse contains the response from method FirewallRulesClient.Delete.
type FirewallRulesClientGetOptions ¶ added in v0.3.0
type FirewallRulesClientGetOptions struct { }
FirewallRulesClientGetOptions contains the optional parameters for the FirewallRulesClient.Get method.
type FirewallRulesClientGetResponse ¶ added in v0.3.0
type FirewallRulesClientGetResponse struct {
FirewallRule
}
FirewallRulesClientGetResponse contains the response from method FirewallRulesClient.Get.
type FirewallRulesClientListByServerOptions ¶ added in v0.3.0
type FirewallRulesClientListByServerOptions struct { }
FirewallRulesClientListByServerOptions contains the optional parameters for the FirewallRulesClient.ListByServer method.
type FirewallRulesClientListByServerResponse ¶ added in v0.3.0
type FirewallRulesClientListByServerResponse struct {
FirewallRuleListResult
}
FirewallRulesClientListByServerResponse contains the response from method FirewallRulesClient.ListByServer.
type FirewallRulesClientReplaceOptions ¶ added in v0.3.0
type FirewallRulesClientReplaceOptions struct { }
FirewallRulesClientReplaceOptions contains the optional parameters for the FirewallRulesClient.Replace method.
type FirewallRulesClientReplaceResponse ¶ added in v0.3.0
type FirewallRulesClientReplaceResponse struct {
FirewallRule
}
FirewallRulesClientReplaceResponse contains the response from method FirewallRulesClient.Replace.
type GeoBackupPoliciesClient ¶
type GeoBackupPoliciesClient struct {
// contains filtered or unexported fields
}
GeoBackupPoliciesClient contains the methods for the GeoBackupPolicies group. Don't use this type directly, use NewGeoBackupPoliciesClient() instead.
func NewGeoBackupPoliciesClient ¶
func NewGeoBackupPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GeoBackupPoliciesClient, error)
NewGeoBackupPoliciesClient creates a new instance of GeoBackupPoliciesClient with the specified values. subscriptionID - The subscription ID that identifies an Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*GeoBackupPoliciesClient) CreateOrUpdate ¶
func (client *GeoBackupPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, geoBackupPolicyName GeoBackupPolicyName, parameters GeoBackupPolicy, options *GeoBackupPoliciesClientCreateOrUpdateOptions) (GeoBackupPoliciesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Updates a database geo backup policy. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/GeoBackupPoliciesCreateOrUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewGeoBackupPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.CreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<database-name>", 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) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/GeoBackupPoliciesGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewGeoBackupPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", armsql.GeoBackupPolicyNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*GeoBackupPoliciesClient) ListByDatabase ¶
func (client *GeoBackupPoliciesClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, options *GeoBackupPoliciesClientListByDatabaseOptions) *runtime.Pager[GeoBackupPoliciesClientListByDatabaseResponse]
ListByDatabase - Returns a list of geo backup policies. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/GeoBackupPoliciesList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewGeoBackupPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<server-name>", "<database-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type GeoBackupPoliciesClientCreateOrUpdateOptions ¶ added in v0.3.0
type GeoBackupPoliciesClientCreateOrUpdateOptions struct { }
GeoBackupPoliciesClientCreateOrUpdateOptions contains the optional parameters for the GeoBackupPoliciesClient.CreateOrUpdate method.
type GeoBackupPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type GeoBackupPoliciesClientCreateOrUpdateResponse struct {
GeoBackupPolicy
}
GeoBackupPoliciesClientCreateOrUpdateResponse contains the response from method GeoBackupPoliciesClient.CreateOrUpdate.
type GeoBackupPoliciesClientGetOptions ¶ added in v0.3.0
type GeoBackupPoliciesClientGetOptions struct { }
GeoBackupPoliciesClientGetOptions contains the optional parameters for the GeoBackupPoliciesClient.Get method.
type GeoBackupPoliciesClientGetResponse ¶ added in v0.3.0
type GeoBackupPoliciesClientGetResponse struct {
GeoBackupPolicy
}
GeoBackupPoliciesClientGetResponse contains the response from method GeoBackupPoliciesClient.Get.
type GeoBackupPoliciesClientListByDatabaseOptions ¶ added in v0.3.0
type GeoBackupPoliciesClientListByDatabaseOptions struct { }
GeoBackupPoliciesClientListByDatabaseOptions contains the optional parameters for the GeoBackupPoliciesClient.ListByDatabase method.
type GeoBackupPoliciesClientListByDatabaseResponse ¶ added in v0.3.0
type GeoBackupPoliciesClientListByDatabaseResponse struct {
GeoBackupPolicyListResult
}
GeoBackupPoliciesClientListByDatabaseResponse contains the response from method GeoBackupPoliciesClient.ListByDatabase.
type GeoBackupPolicy ¶
type GeoBackupPolicy struct { // REQUIRED; The properties of the geo backup policy. Properties *GeoBackupPolicyProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Kind of geo backup policy. This is metadata used for the Azure portal experience. Kind *string `json:"kind,omitempty" azure:"ro"` // READ-ONLY; Backup policy location. Location *string `json:"location,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
GeoBackupPolicy - A database geo backup policy.
type GeoBackupPolicyListResult ¶
type GeoBackupPolicyListResult struct { // The list of geo backup policies. Value []*GeoBackupPolicy `json:"value,omitempty"` }
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.
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 `json:"state,omitempty"` // READ-ONLY; The storage type of the geo backup policy. StorageType *string `json:"storageType,omitempty" azure:"ro"` }
GeoBackupPolicyProperties - The properties of the geo backup policy.
type GeoBackupPolicyState ¶
type GeoBackupPolicyState string
GeoBackupPolicyState - The state of the geo backup policy.
const ( GeoBackupPolicyStateDisabled GeoBackupPolicyState = "Disabled" GeoBackupPolicyStateEnabled GeoBackupPolicyState = "Enabled" )
func PossibleGeoBackupPolicyStateValues ¶
func PossibleGeoBackupPolicyStateValues() []GeoBackupPolicyState
PossibleGeoBackupPolicyStateValues returns the possible values for the GeoBackupPolicyState const type.
type IPv6FirewallRule ¶ added in v0.4.0
type IPv6FirewallRule struct { // Resource name. Name *string `json:"name,omitempty"` // Resource properties. Properties *IPv6ServerFirewallRuleProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
IPv6FirewallRule - An IPv6 server firewall rule.
type IPv6FirewallRuleListResult ¶ added in v0.4.0
type IPv6FirewallRuleListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*IPv6FirewallRule `json:"value,omitempty" azure:"ro"` }
IPv6FirewallRuleListResult - The response to a list IPv6 firewall rules request
func (IPv6FirewallRuleListResult) MarshalJSON ¶ added in v0.4.0
func (i IPv6FirewallRuleListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type IPv6FirewallRuleListResult.
type IPv6FirewallRulesClient ¶ added in v0.4.0
type IPv6FirewallRulesClient struct {
// contains filtered or unexported fields
}
IPv6FirewallRulesClient contains the methods for the IPv6FirewallRules group. Don't use this type directly, use NewIPv6FirewallRulesClient() instead.
func NewIPv6FirewallRulesClient ¶ added in v0.4.0
func NewIPv6FirewallRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IPv6FirewallRulesClient, error)
NewIPv6FirewallRulesClient creates a new instance of IPv6FirewallRulesClient with the specified values. subscriptionID - The subscription ID that identifies an Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*IPv6FirewallRulesClient) CreateOrUpdate ¶ added in v0.4.0
func (client *IPv6FirewallRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, parameters IPv6FirewallRule, options *IPv6FirewallRulesClientCreateOrUpdateOptions) (IPv6FirewallRulesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates an IPv6 firewall rule. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/IPv6FirewallRuleCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewIPv6FirewallRulesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.CreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<firewall-rule-name>", armsql.IPv6FirewallRule{ Properties: &armsql.IPv6ServerFirewallRuleProperties{ EndIPv6Address: to.Ptr("<end-ipv6address>"), StartIPv6Address: to.Ptr("<start-ipv6address>"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*IPv6FirewallRulesClient) Delete ¶ added in v0.4.0
func (client *IPv6FirewallRulesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, options *IPv6FirewallRulesClientDeleteOptions) (IPv6FirewallRulesClientDeleteResponse, error)
Delete - Deletes an IPv6 firewall rule. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/IPv6FirewallRuleDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewIPv6FirewallRulesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Delete(ctx, "<resource-group-name>", "<server-name>", "<firewall-rule-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
Output:
func (*IPv6FirewallRulesClient) Get ¶ added in v0.4.0
func (client *IPv6FirewallRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, options *IPv6FirewallRulesClientGetOptions) (IPv6FirewallRulesClientGetResponse, error)
Get - Gets an IPv6 firewall rule. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/IPv6FirewallRuleGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewIPv6FirewallRulesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<firewall-rule-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*IPv6FirewallRulesClient) ListByServer ¶ added in v0.4.0
func (client *IPv6FirewallRulesClient) ListByServer(resourceGroupName string, serverName string, options *IPv6FirewallRulesClientListByServerOptions) *runtime.Pager[IPv6FirewallRulesClientListByServerResponse]
ListByServer - Gets a list of IPv6 firewall rules. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/IPv6FirewallRuleList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewIPv6FirewallRulesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<resource-group-name>", "<server-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type IPv6FirewallRulesClientCreateOrUpdateOptions ¶ added in v0.4.0
type IPv6FirewallRulesClientCreateOrUpdateOptions struct { }
IPv6FirewallRulesClientCreateOrUpdateOptions contains the optional parameters for the IPv6FirewallRulesClient.CreateOrUpdate method.
type IPv6FirewallRulesClientCreateOrUpdateResponse ¶ added in v0.4.0
type IPv6FirewallRulesClientCreateOrUpdateResponse struct {
IPv6FirewallRule
}
IPv6FirewallRulesClientCreateOrUpdateResponse contains the response from method IPv6FirewallRulesClient.CreateOrUpdate.
type IPv6FirewallRulesClientDeleteOptions ¶ added in v0.4.0
type IPv6FirewallRulesClientDeleteOptions struct { }
IPv6FirewallRulesClientDeleteOptions contains the optional parameters for the IPv6FirewallRulesClient.Delete method.
type IPv6FirewallRulesClientDeleteResponse ¶ added in v0.4.0
type IPv6FirewallRulesClientDeleteResponse struct { }
IPv6FirewallRulesClientDeleteResponse contains the response from method IPv6FirewallRulesClient.Delete.
type IPv6FirewallRulesClientGetOptions ¶ added in v0.4.0
type IPv6FirewallRulesClientGetOptions struct { }
IPv6FirewallRulesClientGetOptions contains the optional parameters for the IPv6FirewallRulesClient.Get method.
type IPv6FirewallRulesClientGetResponse ¶ added in v0.4.0
type IPv6FirewallRulesClientGetResponse struct {
IPv6FirewallRule
}
IPv6FirewallRulesClientGetResponse contains the response from method IPv6FirewallRulesClient.Get.
type IPv6FirewallRulesClientListByServerOptions ¶ added in v0.4.0
type IPv6FirewallRulesClientListByServerOptions struct { }
IPv6FirewallRulesClientListByServerOptions contains the optional parameters for the IPv6FirewallRulesClient.ListByServer method.
type IPv6FirewallRulesClientListByServerResponse ¶ added in v0.4.0
type IPv6FirewallRulesClientListByServerResponse struct {
IPv6FirewallRuleListResult
}
IPv6FirewallRulesClientListByServerResponse contains the response from method IPv6FirewallRulesClient.ListByServer.
type IPv6ServerFirewallRuleProperties ¶ added in v0.4.0
type IPv6ServerFirewallRuleProperties struct { // The end IP address of the firewall rule. Must be IPv6 format. Must be greater than or equal to startIpAddress. EndIPv6Address *string `json:"endIPv6Address,omitempty"` // The start IP address of the firewall rule. Must be IPv6 format. StartIPv6Address *string `json:"startIPv6Address,omitempty"` }
IPv6ServerFirewallRuleProperties - The properties of an IPv6 server firewall rule.
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 ( ImplementationMethodTSQL ImplementationMethod = "TSql" ImplementationMethodAzurePowerShell ImplementationMethod = "AzurePowerShell" )
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 `json:"administratorLogin,omitempty"` // REQUIRED; Administrator login password. AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` // REQUIRED; Storage key. StorageKey *string `json:"storageKey,omitempty"` // REQUIRED; Storage key type. StorageKeyType *StorageKeyType `json:"storageKeyType,omitempty"` // REQUIRED; Storage Uri. StorageURI *string `json:"storageUri,omitempty"` // Authentication type. AuthenticationType *string `json:"authenticationType,omitempty"` // Optional resource information to enable network isolation for request. NetworkIsolation *NetworkIsolationSettings `json:"networkIsolation,omitempty"` }
ImportExistingDatabaseDefinition - Contains the information necessary to perform import operation for existing database.
type ImportExportExtensionsOperationListResult ¶
type ImportExportExtensionsOperationListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ImportExportExtensionsOperationResult `json:"value,omitempty" azure:"ro"` }
ImportExportExtensionsOperationListResult - Import export operation extensions list.
func (ImportExportExtensionsOperationListResult) MarshalJSON ¶
func (i ImportExportExtensionsOperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ImportExportExtensionsOperationListResult.
type ImportExportExtensionsOperationResult ¶
type ImportExportExtensionsOperationResult struct { // Resource properties. Properties *ImportExportExtensionsOperationResultProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ImportExportExtensionsOperationResult - An Extension operation result resource.
type ImportExportExtensionsOperationResultProperties ¶
type ImportExportExtensionsOperationResultProperties struct { // READ-ONLY; Database name. DatabaseName *string `json:"databaseName,omitempty" azure:"ro"` // READ-ONLY; Error message. ErrorMessage *string `json:"errorMessage,omitempty" azure:"ro"` // READ-ONLY; Last modified time. LastModifiedTime *string `json:"lastModifiedTime,omitempty" azure:"ro"` // READ-ONLY; Request Id. RequestID *string `json:"requestId,omitempty" azure:"ro"` // READ-ONLY; Request type. RequestType *string `json:"requestType,omitempty" azure:"ro"` // READ-ONLY; Server name. ServerName *string `json:"serverName,omitempty" azure:"ro"` // READ-ONLY; Operation status. Status *string `json:"status,omitempty" azure:"ro"` }
ImportExportExtensionsOperationResultProperties - Contains the operation result properties for import/export operation.
type ImportExportOperationResult ¶
type ImportExportOperationResult struct { // Resource properties. Properties *ImportExportOperationResultProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ImportExportOperationResult - An ImportExport operation result resource.
type ImportExportOperationResultProperties ¶
type ImportExportOperationResultProperties struct { // READ-ONLY; Blob Uri. BlobURI *string `json:"blobUri,omitempty" azure:"ro"` // READ-ONLY; Database name. DatabaseName *string `json:"databaseName,omitempty" azure:"ro"` // READ-ONLY; Error message. ErrorMessage *string `json:"errorMessage,omitempty" azure:"ro"` // READ-ONLY; Last modified time. LastModifiedTime *string `json:"lastModifiedTime,omitempty" azure:"ro"` // READ-ONLY; Gets the status of private endpoints associated with this request. PrivateEndpointConnections []*PrivateEndpointConnectionRequestStatus `json:"privateEndpointConnections,omitempty" azure:"ro"` // READ-ONLY; Queued time. QueuedTime *string `json:"queuedTime,omitempty" azure:"ro"` // READ-ONLY; Request Id. RequestID *string `json:"requestId,omitempty" azure:"ro"` // READ-ONLY; Request type. RequestType *string `json:"requestType,omitempty" azure:"ro"` // READ-ONLY; Server name. ServerName *string `json:"serverName,omitempty" azure:"ro"` // READ-ONLY; Operation status. Status *string `json:"status,omitempty" azure:"ro"` }
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.
type ImportNewDatabaseDefinition ¶
type ImportNewDatabaseDefinition struct { // REQUIRED; Administrator login name. AdministratorLogin *string `json:"administratorLogin,omitempty"` // REQUIRED; Administrator login password. AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` // REQUIRED; Storage key. StorageKey *string `json:"storageKey,omitempty"` // REQUIRED; Storage key type. StorageKeyType *StorageKeyType `json:"storageKeyType,omitempty"` // REQUIRED; Storage Uri. StorageURI *string `json:"storageUri,omitempty"` // Authentication type. AuthenticationType *string `json:"authenticationType,omitempty"` // Name of the import database. DatabaseName *string `json:"databaseName,omitempty"` // Edition of the import database. Edition *string `json:"edition,omitempty"` // Max size in bytes for the import database. MaxSizeBytes *string `json:"maxSizeBytes,omitempty"` // Optional resource information to enable network isolation for request. NetworkIsolation *NetworkIsolationSettings `json:"networkIsolation,omitempty"` // Service level objective name of the import database. ServiceObjectiveName *string `json:"serviceObjectiveName,omitempty"` }
ImportNewDatabaseDefinition - Contains the information necessary to perform import operation for new database.
type InstanceFailoverGroup ¶
type InstanceFailoverGroup struct { // Resource properties. Properties *InstanceFailoverGroupProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
InstanceFailoverGroup - An instance failover group.
type InstanceFailoverGroupListResult ¶
type InstanceFailoverGroupListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*InstanceFailoverGroup `json:"value,omitempty" azure:"ro"` }
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.
type InstanceFailoverGroupProperties ¶
type InstanceFailoverGroupProperties struct { // REQUIRED; List of managed instance pairs in the failover group. ManagedInstancePairs []*ManagedInstancePairInfo `json:"managedInstancePairs,omitempty"` // REQUIRED; Partner region information for the failover group. PartnerRegions []*PartnerRegionInfo `json:"partnerRegions,omitempty"` // REQUIRED; Read-write endpoint of the failover group instance. ReadWriteEndpoint *InstanceFailoverGroupReadWriteEndpoint `json:"readWriteEndpoint,omitempty"` // Read-only endpoint of the failover group instance. ReadOnlyEndpoint *InstanceFailoverGroupReadOnlyEndpoint `json:"readOnlyEndpoint,omitempty"` // READ-ONLY; Local replication role of the failover group instance. ReplicationRole *InstanceFailoverGroupReplicationRole `json:"replicationRole,omitempty" azure:"ro"` // READ-ONLY; Replication state of the failover group instance. ReplicationState *string `json:"replicationState,omitempty" azure:"ro"` }
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.
type InstanceFailoverGroupReadOnlyEndpoint ¶
type InstanceFailoverGroupReadOnlyEndpoint struct { // Failover policy of the read-only endpoint for the failover group. FailoverPolicy *ReadOnlyEndpointFailoverPolicy `json:"failoverPolicy,omitempty"` }
InstanceFailoverGroupReadOnlyEndpoint - Read-only endpoint of the failover group instance.
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 `json:"failoverPolicy,omitempty"` // Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then // failoverWithDataLossGracePeriodMinutes is required. FailoverWithDataLossGracePeriodMinutes *int32 `json:"failoverWithDataLossGracePeriodMinutes,omitempty"` }
InstanceFailoverGroupReadWriteEndpoint - Read-write endpoint of the failover group instance.
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) (*armruntime.Poller[InstanceFailoverGroupsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a failover group. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/InstanceFailoverGroupCreateOrUpdate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewInstanceFailoverGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<location-name>", "<failover-group-name>", armsql.InstanceFailoverGroup{ Properties: &armsql.InstanceFailoverGroupProperties{ ManagedInstancePairs: []*armsql.ManagedInstancePairInfo{ { PartnerManagedInstanceID: to.Ptr("<partner-managed-instance-id>"), PrimaryManagedInstanceID: to.Ptr("<primary-managed-instance-id>"), }}, PartnerRegions: []*armsql.PartnerRegionInfo{ { Location: to.Ptr("<location>"), }}, ReadOnlyEndpoint: &armsql.InstanceFailoverGroupReadOnlyEndpoint{ FailoverPolicy: to.Ptr(armsql.ReadOnlyEndpointFailoverPolicyDisabled), }, ReadWriteEndpoint: &armsql.InstanceFailoverGroupReadWriteEndpoint{ FailoverPolicy: to.Ptr(armsql.ReadWriteEndpointFailoverPolicyAutomatic), FailoverWithDataLossGracePeriodMinutes: to.Ptr[int32](480), }, }, }, &armsql.InstanceFailoverGroupsClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*InstanceFailoverGroupsClient) BeginDelete ¶
func (client *InstanceFailoverGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, locationName string, failoverGroupName string, options *InstanceFailoverGroupsClientBeginDeleteOptions) (*armruntime.Poller[InstanceFailoverGroupsClientDeleteResponse], error)
BeginDelete - Deletes a failover group. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/InstanceFailoverGroupDelete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewInstanceFailoverGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<location-name>", "<failover-group-name>", &armsql.InstanceFailoverGroupsClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*InstanceFailoverGroupsClient) BeginFailover ¶
func (client *InstanceFailoverGroupsClient) BeginFailover(ctx context.Context, resourceGroupName string, locationName string, failoverGroupName string, options *InstanceFailoverGroupsClientBeginFailoverOptions) (*armruntime.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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/InstanceFailoverGroupFailover.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewInstanceFailoverGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginFailover(ctx, "<resource-group-name>", "<location-name>", "<failover-group-name>", &armsql.InstanceFailoverGroupsClientBeginFailoverOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*InstanceFailoverGroupsClient) BeginForceFailoverAllowDataLoss ¶
func (client *InstanceFailoverGroupsClient) BeginForceFailoverAllowDataLoss(ctx context.Context, resourceGroupName string, locationName string, failoverGroupName string, options *InstanceFailoverGroupsClientBeginForceFailoverAllowDataLossOptions) (*armruntime.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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/InstanceFailoverGroupForceFailoverAllowDataLoss.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewInstanceFailoverGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginForceFailoverAllowDataLoss(ctx, "<resource-group-name>", "<location-name>", "<failover-group-name>", &armsql.InstanceFailoverGroupsClientBeginForceFailoverAllowDataLossOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/InstanceFailoverGroupGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewInstanceFailoverGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<location-name>", "<failover-group-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*InstanceFailoverGroupsClient) ListByLocation ¶
func (client *InstanceFailoverGroupsClient) ListByLocation(resourceGroupName string, locationName string, options *InstanceFailoverGroupsClientListByLocationOptions) *runtime.Pager[InstanceFailoverGroupsClientListByLocationResponse]
ListByLocation - Lists the failover groups in a location. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByLocation method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/InstanceFailoverGroupList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewInstanceFailoverGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByLocation("<resource-group-name>", "<location-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type InstanceFailoverGroupsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type InstanceFailoverGroupsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
InstanceFailoverGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the InstanceFailoverGroupsClient.BeginCreateOrUpdate method.
type InstanceFailoverGroupsClientBeginDeleteOptions ¶ added in v0.3.0
type InstanceFailoverGroupsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
InstanceFailoverGroupsClientBeginDeleteOptions contains the optional parameters for the InstanceFailoverGroupsClient.BeginDelete method.
type InstanceFailoverGroupsClientBeginFailoverOptions ¶ added in v0.3.0
type InstanceFailoverGroupsClientBeginFailoverOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
InstanceFailoverGroupsClientBeginFailoverOptions contains the optional parameters for the InstanceFailoverGroupsClient.BeginFailover method.
type InstanceFailoverGroupsClientBeginForceFailoverAllowDataLossOptions ¶ added in v0.3.0
type InstanceFailoverGroupsClientBeginForceFailoverAllowDataLossOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
InstanceFailoverGroupsClientBeginForceFailoverAllowDataLossOptions contains the optional parameters for the InstanceFailoverGroupsClient.BeginForceFailoverAllowDataLoss method.
type InstanceFailoverGroupsClientCreateOrUpdateResponse ¶ added in v0.3.0
type InstanceFailoverGroupsClientCreateOrUpdateResponse struct {
InstanceFailoverGroup
}
InstanceFailoverGroupsClientCreateOrUpdateResponse contains the response from method InstanceFailoverGroupsClient.CreateOrUpdate.
type InstanceFailoverGroupsClientDeleteResponse ¶ added in v0.3.0
type InstanceFailoverGroupsClientDeleteResponse struct { }
InstanceFailoverGroupsClientDeleteResponse contains the response from method InstanceFailoverGroupsClient.Delete.
type InstanceFailoverGroupsClientFailoverResponse ¶ added in v0.3.0
type InstanceFailoverGroupsClientFailoverResponse struct {
InstanceFailoverGroup
}
InstanceFailoverGroupsClientFailoverResponse contains the response from method InstanceFailoverGroupsClient.Failover.
type InstanceFailoverGroupsClientForceFailoverAllowDataLossResponse ¶ added in v0.3.0
type InstanceFailoverGroupsClientForceFailoverAllowDataLossResponse struct {
InstanceFailoverGroup
}
InstanceFailoverGroupsClientForceFailoverAllowDataLossResponse contains the response from method InstanceFailoverGroupsClient.ForceFailoverAllowDataLoss.
type InstanceFailoverGroupsClientGetOptions ¶ added in v0.3.0
type InstanceFailoverGroupsClientGetOptions struct { }
InstanceFailoverGroupsClientGetOptions contains the optional parameters for the InstanceFailoverGroupsClient.Get method.
type InstanceFailoverGroupsClientGetResponse ¶ added in v0.3.0
type InstanceFailoverGroupsClientGetResponse struct {
InstanceFailoverGroup
}
InstanceFailoverGroupsClientGetResponse contains the response from method InstanceFailoverGroupsClient.Get.
type InstanceFailoverGroupsClientListByLocationOptions ¶ added in v0.3.0
type InstanceFailoverGroupsClientListByLocationOptions struct { }
InstanceFailoverGroupsClientListByLocationOptions contains the optional parameters for the InstanceFailoverGroupsClient.ListByLocation method.
type InstanceFailoverGroupsClientListByLocationResponse ¶ added in v0.3.0
type InstanceFailoverGroupsClientListByLocationResponse struct {
InstanceFailoverGroupListResult
}
InstanceFailoverGroupsClientListByLocationResponse contains the response from method InstanceFailoverGroupsClient.ListByLocation.
type InstancePool ¶
type InstancePool struct { // REQUIRED; Resource location. Location *string `json:"location,omitempty"` // Resource properties. Properties *InstancePoolProperties `json:"properties,omitempty"` // The name and tier of the SKU. SKU *SKU `json:"sku,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
InstancePool - An Azure SQL instance pool.
func (InstancePool) MarshalJSON ¶
func (i InstancePool) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InstancePool.
type InstancePoolEditionCapability ¶
type InstancePoolEditionCapability struct { // The reason for the capability not being available. Reason *string `json:"reason,omitempty"` // READ-ONLY; The instance pool version name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The status of the capability. Status *CapabilityStatus `json:"status,omitempty" azure:"ro"` // READ-ONLY; The supported families. SupportedFamilies []*InstancePoolFamilyCapability `json:"supportedFamilies,omitempty" azure:"ro"` }
InstancePoolEditionCapability - The instance pool capability
func (InstancePoolEditionCapability) MarshalJSON ¶
func (i InstancePoolEditionCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InstancePoolEditionCapability.
type InstancePoolFamilyCapability ¶
type InstancePoolFamilyCapability struct { // The reason for the capability not being available. Reason *string `json:"reason,omitempty"` // READ-ONLY; Family name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The status of the capability. Status *CapabilityStatus `json:"status,omitempty" azure:"ro"` // READ-ONLY; List of supported license types. SupportedLicenseTypes []*LicenseTypeCapability `json:"supportedLicenseTypes,omitempty" azure:"ro"` // READ-ONLY; List of supported virtual cores values. SupportedVcoresValues []*InstancePoolVcoresCapability `json:"supportedVcoresValues,omitempty" azure:"ro"` }
InstancePoolFamilyCapability - The instance pool family capability.
func (InstancePoolFamilyCapability) MarshalJSON ¶
func (i InstancePoolFamilyCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller 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 `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*InstancePool `json:"value,omitempty" azure:"ro"` }
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.
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 `json:"licenseType,omitempty"` // REQUIRED; Resource ID of the subnet to place this instance pool in. SubnetID *string `json:"subnetId,omitempty"` // REQUIRED; Count of vCores belonging to this instance pool. VCores *int32 `json:"vCores,omitempty"` }
InstancePoolProperties - Properties of an instance pool.
type InstancePoolUpdate ¶
type InstancePoolUpdate struct { // Resource tags. Tags map[string]*string `json:"tags,omitempty"` }
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.
type InstancePoolVcoresCapability ¶
type InstancePoolVcoresCapability struct { // The reason for the capability not being available. Reason *string `json:"reason,omitempty"` // READ-ONLY; The virtual cores identifier. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The status of the capability. Status *CapabilityStatus `json:"status,omitempty" azure:"ro"` // READ-ONLY; Storage limit. StorageLimit *MaxSizeCapability `json:"storageLimit,omitempty" azure:"ro"` // READ-ONLY; The virtual cores value. Value *int32 `json:"value,omitempty" azure:"ro"` }
InstancePoolVcoresCapability - The managed instance virtual cores capability.
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) (*armruntime.Poller[InstancePoolsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates an instance pool. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateInstancePoolMax.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewInstancePoolsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<instance-pool-name>", armsql.InstancePool{ Location: to.Ptr("<location>"), Tags: map[string]*string{ "a": to.Ptr("b"), }, Properties: &armsql.InstancePoolProperties{ LicenseType: to.Ptr(armsql.InstancePoolLicenseTypeLicenseIncluded), SubnetID: to.Ptr("<subnet-id>"), VCores: to.Ptr[int32](8), }, SKU: &armsql.SKU{ Name: to.Ptr("<name>"), Family: to.Ptr("<family>"), Tier: to.Ptr("<tier>"), }, }, &armsql.InstancePoolsClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*InstancePoolsClient) BeginDelete ¶
func (client *InstancePoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, instancePoolName string, options *InstancePoolsClientBeginDeleteOptions) (*armruntime.Poller[InstancePoolsClientDeleteResponse], error)
BeginDelete - Deletes an instance pool If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteInstancePool.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewInstancePoolsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<instance-pool-name>", &armsql.InstancePoolsClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*InstancePoolsClient) BeginUpdate ¶
func (client *InstancePoolsClient) BeginUpdate(ctx context.Context, resourceGroupName string, instancePoolName string, parameters InstancePoolUpdate, options *InstancePoolsClientBeginUpdateOptions) (*armruntime.Poller[InstancePoolsClientUpdateResponse], error)
BeginUpdate - Updates an instance pool. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/PatchInstancePool.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewInstancePoolsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginUpdate(ctx, "<resource-group-name>", "<instance-pool-name>", armsql.InstancePoolUpdate{ Tags: map[string]*string{ "x": to.Ptr("y"), }, }, &armsql.InstancePoolsClientBeginUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetInstancePool.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewInstancePoolsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<instance-pool-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*InstancePoolsClient) List ¶
func (client *InstancePoolsClient) List(options *InstancePoolsClientListOptions) *runtime.Pager[InstancePoolsClientListResponse]
List - Gets a list of all instance pools in the subscription. If the operation fails it returns an *azcore.ResponseError type. options - InstancePoolsClientListOptions contains the optional parameters for the InstancePoolsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListInstancePoolsBySubscriptionId.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewInstancePoolsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.List(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*InstancePoolsClient) ListByResourceGroup ¶
func (client *InstancePoolsClient) ListByResourceGroup(resourceGroupName string, options *InstancePoolsClientListByResourceGroupOptions) *runtime.Pager[InstancePoolsClientListByResourceGroupResponse]
ListByResourceGroup - Gets a list of instance pools in the resource group If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListInstancePoolsByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewInstancePoolsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByResourceGroup("<resource-group-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type InstancePoolsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type InstancePoolsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
InstancePoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the InstancePoolsClient.BeginCreateOrUpdate method.
type InstancePoolsClientBeginDeleteOptions ¶ added in v0.3.0
type InstancePoolsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
InstancePoolsClientBeginDeleteOptions contains the optional parameters for the InstancePoolsClient.BeginDelete method.
type InstancePoolsClientBeginUpdateOptions ¶ added in v0.3.0
type InstancePoolsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
InstancePoolsClientBeginUpdateOptions contains the optional parameters for the InstancePoolsClient.BeginUpdate method.
type InstancePoolsClientCreateOrUpdateResponse ¶ added in v0.3.0
type InstancePoolsClientCreateOrUpdateResponse struct {
InstancePool
}
InstancePoolsClientCreateOrUpdateResponse contains the response from method InstancePoolsClient.CreateOrUpdate.
type InstancePoolsClientDeleteResponse ¶ added in v0.3.0
type InstancePoolsClientDeleteResponse struct { }
InstancePoolsClientDeleteResponse contains the response from method InstancePoolsClient.Delete.
type InstancePoolsClientGetOptions ¶ added in v0.3.0
type InstancePoolsClientGetOptions struct { }
InstancePoolsClientGetOptions contains the optional parameters for the InstancePoolsClient.Get method.
type InstancePoolsClientGetResponse ¶ added in v0.3.0
type InstancePoolsClientGetResponse struct {
InstancePool
}
InstancePoolsClientGetResponse contains the response from method InstancePoolsClient.Get.
type InstancePoolsClientListByResourceGroupOptions ¶ added in v0.3.0
type InstancePoolsClientListByResourceGroupOptions struct { }
InstancePoolsClientListByResourceGroupOptions contains the optional parameters for the InstancePoolsClient.ListByResourceGroup method.
type InstancePoolsClientListByResourceGroupResponse ¶ added in v0.3.0
type InstancePoolsClientListByResourceGroupResponse struct {
InstancePoolListResult
}
InstancePoolsClientListByResourceGroupResponse contains the response from method InstancePoolsClient.ListByResourceGroup.
type InstancePoolsClientListOptions ¶ added in v0.3.0
type InstancePoolsClientListOptions struct { }
InstancePoolsClientListOptions contains the optional parameters for the InstancePoolsClient.List method.
type InstancePoolsClientListResponse ¶ added in v0.3.0
type InstancePoolsClientListResponse struct {
InstancePoolListResult
}
InstancePoolsClientListResponse contains the response from method InstancePoolsClient.List.
type InstancePoolsClientUpdateResponse ¶ added in v0.3.0
type InstancePoolsClientUpdateResponse struct {
InstancePool
}
InstancePoolsClientUpdateResponse contains the response from method InstancePoolsClient.Update.
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 ( IsRetryableYes IsRetryable = "Yes" IsRetryableNo IsRetryable = "No" )
func PossibleIsRetryableValues ¶
func PossibleIsRetryableValues() []IsRetryable
PossibleIsRetryableValues returns the possible values for the IsRetryable const type.
type Job ¶
type Job struct { // Resource properties. Properties *JobProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
Job - A job.
type JobAgent ¶
type JobAgent struct { // REQUIRED; Resource location. Location *string `json:"location,omitempty"` // Resource properties. Properties *JobAgentProperties `json:"properties,omitempty"` // The name and tier of the SKU. SKU *SKU `json:"sku,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
JobAgent - An Azure SQL job agent.
func (JobAgent) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type JobAgent.
type JobAgentListResult ¶
type JobAgentListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*JobAgent `json:"value,omitempty" azure:"ro"` }
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.
type JobAgentProperties ¶
type JobAgentProperties struct { // REQUIRED; Resource ID of the database to store job metadata in. DatabaseID *string `json:"databaseId,omitempty"` // READ-ONLY; The state of the job agent. State *JobAgentState `json:"state,omitempty" azure:"ro"` }
JobAgentProperties - Properties of a job agent.
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.
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) (*armruntime.Poller[JobAgentsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a job agent. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobAgent.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobAgentsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<job-agent-name>", armsql.JobAgent{ Location: to.Ptr("<location>"), Properties: &armsql.JobAgentProperties{ DatabaseID: to.Ptr("<database-id>"), }, }, &armsql.JobAgentsClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*JobAgentsClient) BeginDelete ¶
func (client *JobAgentsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, options *JobAgentsClientBeginDeleteOptions) (*armruntime.Poller[JobAgentsClientDeleteResponse], error)
BeginDelete - Deletes a job agent. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteJobAgent.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobAgentsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<server-name>", "<job-agent-name>", &armsql.JobAgentsClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*JobAgentsClient) BeginUpdate ¶
func (client *JobAgentsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, parameters JobAgentUpdate, options *JobAgentsClientBeginUpdateOptions) (*armruntime.Poller[JobAgentsClientUpdateResponse], error)
BeginUpdate - Updates a job agent. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/UpdateJobAgent.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobAgentsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginUpdate(ctx, "<resource-group-name>", "<server-name>", "<job-agent-name>", armsql.JobAgentUpdate{ Tags: map[string]*string{ "mytag1": to.Ptr("myvalue1"), }, }, &armsql.JobAgentsClientBeginUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobAgent.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobAgentsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<job-agent-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*JobAgentsClient) ListByServer ¶
func (client *JobAgentsClient) ListByServer(resourceGroupName string, serverName string, options *JobAgentsClientListByServerOptions) *runtime.Pager[JobAgentsClientListByServerResponse]
ListByServer - Gets a list of job agents in a server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobAgentsByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobAgentsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<resource-group-name>", "<server-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type JobAgentsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type JobAgentsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
JobAgentsClientBeginCreateOrUpdateOptions contains the optional parameters for the JobAgentsClient.BeginCreateOrUpdate method.
type JobAgentsClientBeginDeleteOptions ¶ added in v0.3.0
type JobAgentsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
JobAgentsClientBeginDeleteOptions contains the optional parameters for the JobAgentsClient.BeginDelete method.
type JobAgentsClientBeginUpdateOptions ¶ added in v0.3.0
type JobAgentsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
JobAgentsClientBeginUpdateOptions contains the optional parameters for the JobAgentsClient.BeginUpdate method.
type JobAgentsClientCreateOrUpdateResponse ¶ added in v0.3.0
type JobAgentsClientCreateOrUpdateResponse struct {
JobAgent
}
JobAgentsClientCreateOrUpdateResponse contains the response from method JobAgentsClient.CreateOrUpdate.
type JobAgentsClientDeleteResponse ¶ added in v0.3.0
type JobAgentsClientDeleteResponse struct { }
JobAgentsClientDeleteResponse contains the response from method JobAgentsClient.Delete.
type JobAgentsClientGetOptions ¶ added in v0.3.0
type JobAgentsClientGetOptions struct { }
JobAgentsClientGetOptions contains the optional parameters for the JobAgentsClient.Get method.
type JobAgentsClientGetResponse ¶ added in v0.3.0
type JobAgentsClientGetResponse struct {
JobAgent
}
JobAgentsClientGetResponse contains the response from method JobAgentsClient.Get.
type JobAgentsClientListByServerOptions ¶ added in v0.3.0
type JobAgentsClientListByServerOptions struct { }
JobAgentsClientListByServerOptions contains the optional parameters for the JobAgentsClient.ListByServer method.
type JobAgentsClientListByServerResponse ¶ added in v0.3.0
type JobAgentsClientListByServerResponse struct {
JobAgentListResult
}
JobAgentsClientListByServerResponse contains the response from method JobAgentsClient.ListByServer.
type JobAgentsClientUpdateResponse ¶ added in v0.3.0
type JobAgentsClientUpdateResponse struct {
JobAgent
}
JobAgentsClientUpdateResponse contains the response from method JobAgentsClient.Update.
type JobCredential ¶
type JobCredential struct { // Resource properties. Properties *JobCredentialProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
JobCredential - A stored credential that can be used by a job to connect to target databases.
type JobCredentialListResult ¶
type JobCredentialListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*JobCredential `json:"value,omitempty" azure:"ro"` }
JobCredentialListResult - A list of job credentials.
func (JobCredentialListResult) MarshalJSON ¶
func (j JobCredentialListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobCredentialListResult.
type JobCredentialProperties ¶
type JobCredentialProperties struct { // REQUIRED; The credential password. Password *string `json:"password,omitempty"` // REQUIRED; The credential user name. Username *string `json:"username,omitempty"` }
JobCredentialProperties - Properties of a job credential.
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobCredential.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobCredentialsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.CreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<job-agent-name>", "<credential-name>", armsql.JobCredential{ Properties: &armsql.JobCredentialProperties{ Password: to.Ptr("<password>"), Username: to.Ptr("<username>"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteJobCredential.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobCredentialsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Delete(ctx, "<resource-group-name>", "<server-name>", "<job-agent-name>", "<credential-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobCredential.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobCredentialsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<job-agent-name>", "<credential-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*JobCredentialsClient) ListByAgent ¶
func (client *JobCredentialsClient) ListByAgent(resourceGroupName string, serverName string, jobAgentName string, options *JobCredentialsClientListByAgentOptions) *runtime.Pager[JobCredentialsClientListByAgentResponse]
ListByAgent - Gets a list of jobs credentials. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByAgent method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobCredentialsByAgent.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobCredentialsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByAgent("<resource-group-name>", "<server-name>", "<job-agent-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type JobCredentialsClientCreateOrUpdateOptions ¶ added in v0.3.0
type JobCredentialsClientCreateOrUpdateOptions struct { }
JobCredentialsClientCreateOrUpdateOptions contains the optional parameters for the JobCredentialsClient.CreateOrUpdate method.
type JobCredentialsClientCreateOrUpdateResponse ¶ added in v0.3.0
type JobCredentialsClientCreateOrUpdateResponse struct {
JobCredential
}
JobCredentialsClientCreateOrUpdateResponse contains the response from method JobCredentialsClient.CreateOrUpdate.
type JobCredentialsClientDeleteOptions ¶ added in v0.3.0
type JobCredentialsClientDeleteOptions struct { }
JobCredentialsClientDeleteOptions contains the optional parameters for the JobCredentialsClient.Delete method.
type JobCredentialsClientDeleteResponse ¶ added in v0.3.0
type JobCredentialsClientDeleteResponse struct { }
JobCredentialsClientDeleteResponse contains the response from method JobCredentialsClient.Delete.
type JobCredentialsClientGetOptions ¶ added in v0.3.0
type JobCredentialsClientGetOptions struct { }
JobCredentialsClientGetOptions contains the optional parameters for the JobCredentialsClient.Get method.
type JobCredentialsClientGetResponse ¶ added in v0.3.0
type JobCredentialsClientGetResponse struct {
JobCredential
}
JobCredentialsClientGetResponse contains the response from method JobCredentialsClient.Get.
type JobCredentialsClientListByAgentOptions ¶ added in v0.3.0
type JobCredentialsClientListByAgentOptions struct { }
JobCredentialsClientListByAgentOptions contains the optional parameters for the JobCredentialsClient.ListByAgent method.
type JobCredentialsClientListByAgentResponse ¶ added in v0.3.0
type JobCredentialsClientListByAgentResponse struct {
JobCredentialListResult
}
JobCredentialsClientListByAgentResponse contains the response from method JobCredentialsClient.ListByAgent.
type JobExecution ¶
type JobExecution struct { // Resource properties. Properties *JobExecutionProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
JobExecution - An execution of a job
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 `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*JobExecution `json:"value,omitempty" azure:"ro"` }
JobExecutionListResult - A list of job executions.
func (JobExecutionListResult) MarshalJSON ¶
func (j JobExecutionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobExecutionListResult.
type JobExecutionProperties ¶
type JobExecutionProperties struct { // Number of times the job execution has been attempted. CurrentAttempts *int32 `json:"currentAttempts,omitempty"` // READ-ONLY; The time that the job execution was created. CreateTime *time.Time `json:"createTime,omitempty" azure:"ro"` // READ-ONLY; Start time of the current attempt. CurrentAttemptStartTime *time.Time `json:"currentAttemptStartTime,omitempty" azure:"ro"` // READ-ONLY; The time that the job execution completed. EndTime *time.Time `json:"endTime,omitempty" azure:"ro"` // READ-ONLY; The unique identifier of the job execution. JobExecutionID *string `json:"jobExecutionId,omitempty" azure:"ro"` // READ-ONLY; The job version number. JobVersion *int32 `json:"jobVersion,omitempty" azure:"ro"` // READ-ONLY; The last status or error message. LastMessage *string `json:"lastMessage,omitempty" azure:"ro"` // READ-ONLY; The detailed state of the job execution. Lifecycle *JobExecutionLifecycle `json:"lifecycle,omitempty" azure:"ro"` // READ-ONLY; The ARM provisioning state of the job execution. ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; The time that the job execution started. StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` // READ-ONLY; The job step id. StepID *int32 `json:"stepId,omitempty" azure:"ro"` // READ-ONLY; The job step name. StepName *string `json:"stepName,omitempty" azure:"ro"` // READ-ONLY; The target that this execution is executed on. Target *JobExecutionTarget `json:"target,omitempty" azure:"ro"` }
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 `json:"databaseName,omitempty" azure:"ro"` // READ-ONLY; The server name. ServerName *string `json:"serverName,omitempty" azure:"ro"` // READ-ONLY; The type of the target. Type *JobTargetType `json:"type,omitempty" azure:"ro"` }
JobExecutionTarget - The target that a job execution is executed on.
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) (*armruntime.Poller[JobExecutionsClientCreateResponse], error)
BeginCreate - Starts an elastic job execution. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateJobExecution.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobExecutionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreate(ctx, "<resource-group-name>", "<server-name>", "<job-agent-name>", "<job-name>", &armsql.JobExecutionsClientBeginCreateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*JobExecutionsClient) BeginCreateOrUpdate ¶
func (client *JobExecutionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID string, options *JobExecutionsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[JobExecutionsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a job execution. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobExecution.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobExecutionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<job-agent-name>", "<job-name>", "<job-execution-id>", &armsql.JobExecutionsClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CancelJobExecution.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobExecutionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Cancel(ctx, "<resource-group-name>", "<server-name>", "<job-agent-name>", "<job-name>", "<job-execution-id>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobExecution.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobExecutionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<job-agent-name>", "<job-name>", "<job-execution-id>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*JobExecutionsClient) ListByAgent ¶
func (client *JobExecutionsClient) ListByAgent(resourceGroupName string, serverName string, jobAgentName string, options *JobExecutionsClientListByAgentOptions) *runtime.Pager[JobExecutionsClientListByAgentResponse]
ListByAgent - Lists all executions in a job agent. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByAgent method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobExecutionsByAgentWithFilter.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobExecutionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByAgent("<resource-group-name>", "<server-name>", "<job-agent-name>", &armsql.JobExecutionsClientListByAgentOptions{CreateTimeMin: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-21T19:00:00Z"); return t }()), CreateTimeMax: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-21T19:05:00Z"); return t }()), EndTimeMin: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-21T19:20:00Z"); return t }()), EndTimeMax: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-03-21T19:25:00Z"); return t }()), IsActive: to.Ptr(false), Skip: nil, Top: nil, }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*JobExecutionsClient) ListByJob ¶
func (client *JobExecutionsClient) ListByJob(resourceGroupName string, serverName string, jobAgentName string, jobName string, options *JobExecutionsClientListByJobOptions) *runtime.Pager[JobExecutionsClientListByJobResponse]
ListByJob - Lists a job's executions. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByJob method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobExecutionsByJob.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobExecutionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByJob("<resource-group-name>", "<server-name>", "<job-agent-name>", "<job-name>", &armsql.JobExecutionsClientListByJobOptions{CreateTimeMin: nil, CreateTimeMax: nil, EndTimeMin: nil, EndTimeMax: nil, IsActive: nil, Skip: nil, Top: nil, }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type JobExecutionsClientBeginCreateOptions ¶ added in v0.3.0
type JobExecutionsClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
JobExecutionsClientBeginCreateOptions contains the optional parameters for the JobExecutionsClient.BeginCreate method.
type JobExecutionsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type JobExecutionsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
JobExecutionsClientBeginCreateOrUpdateOptions contains the optional parameters for the JobExecutionsClient.BeginCreateOrUpdate method.
type JobExecutionsClientCancelOptions ¶ added in v0.3.0
type JobExecutionsClientCancelOptions struct { }
JobExecutionsClientCancelOptions contains the optional parameters for the JobExecutionsClient.Cancel method.
type JobExecutionsClientCancelResponse ¶ added in v0.3.0
type JobExecutionsClientCancelResponse struct { }
JobExecutionsClientCancelResponse contains the response from method JobExecutionsClient.Cancel.
type JobExecutionsClientCreateOrUpdateResponse ¶ added in v0.3.0
type JobExecutionsClientCreateOrUpdateResponse struct {
JobExecution
}
JobExecutionsClientCreateOrUpdateResponse contains the response from method JobExecutionsClient.CreateOrUpdate.
type JobExecutionsClientCreateResponse ¶ added in v0.3.0
type JobExecutionsClientCreateResponse struct {
JobExecution
}
JobExecutionsClientCreateResponse contains the response from method JobExecutionsClient.Create.
type JobExecutionsClientGetOptions ¶ added in v0.3.0
type JobExecutionsClientGetOptions struct { }
JobExecutionsClientGetOptions contains the optional parameters for the JobExecutionsClient.Get method.
type JobExecutionsClientGetResponse ¶ added in v0.3.0
type JobExecutionsClientGetResponse struct {
JobExecution
}
JobExecutionsClientGetResponse contains the response from method JobExecutionsClient.Get.
type JobExecutionsClientListByAgentOptions ¶ added in v0.3.0
type JobExecutionsClientListByAgentOptions struct { // If specified, only job executions created before the specified time are included. CreateTimeMax *time.Time // If specified, only job executions created at or after the specified time are included. CreateTimeMin *time.Time // If specified, only job executions completed before the specified time are included. EndTimeMax *time.Time // If specified, only job executions completed at or after the specified time are included. EndTimeMin *time.Time // If specified, only active or only completed job executions are included. IsActive *bool // The number of elements in the collection to skip. Skip *int32 // The number of elements to return from the collection. Top *int32 }
JobExecutionsClientListByAgentOptions contains the optional parameters for the JobExecutionsClient.ListByAgent method.
type JobExecutionsClientListByAgentResponse ¶ added in v0.3.0
type JobExecutionsClientListByAgentResponse struct {
JobExecutionListResult
}
JobExecutionsClientListByAgentResponse contains the response from method JobExecutionsClient.ListByAgent.
type JobExecutionsClientListByJobOptions ¶ added in v0.3.0
type JobExecutionsClientListByJobOptions struct { // If specified, only job executions created before the specified time are included. CreateTimeMax *time.Time // If specified, only job executions created at or after the specified time are included. CreateTimeMin *time.Time // If specified, only job executions completed before the specified time are included. EndTimeMax *time.Time // If specified, only job executions completed at or after the specified time are included. EndTimeMin *time.Time // If specified, only active or only completed job executions are included. IsActive *bool // The number of elements in the collection to skip. Skip *int32 // The number of elements to return from the collection. Top *int32 }
JobExecutionsClientListByJobOptions contains the optional parameters for the JobExecutionsClient.ListByJob method.
type JobExecutionsClientListByJobResponse ¶ added in v0.3.0
type JobExecutionsClientListByJobResponse struct {
JobExecutionListResult
}
JobExecutionsClientListByJobResponse contains the response from method JobExecutionsClient.ListByJob.
type JobListResult ¶
type JobListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*Job `json:"value,omitempty" azure:"ro"` }
JobListResult - A list of jobs.
func (JobListResult) MarshalJSON ¶
func (j JobListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobListResult.
type JobProperties ¶
type JobProperties struct { // User-defined description of the job. Description *string `json:"description,omitempty"` // Schedule properties of the job. Schedule *JobSchedule `json:"schedule,omitempty"` // READ-ONLY; The job version number. Version *int32 `json:"version,omitempty" azure:"ro"` }
JobProperties - Properties of a job.
type JobSchedule ¶
type JobSchedule struct { // Whether or not the schedule is enabled. Enabled *bool `json:"enabled,omitempty"` // Schedule end time. EndTime *time.Time `json:"endTime,omitempty"` // Value of the schedule's recurring interval, if the ScheduleType is recurring. ISO8601 duration format. Interval *string `json:"interval,omitempty"` // Schedule start time. StartTime *time.Time `json:"startTime,omitempty"` // Schedule interval type Type *JobScheduleType `json:"type,omitempty"` }
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 `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
JobStep - A job step.
type JobStepAction ¶
type JobStepAction struct { // REQUIRED; The action value, for example the text of the T-SQL script to execute. Value *string `json:"value,omitempty"` // The source of the action to execute. Source *JobStepActionSource `json:"source,omitempty"` // Type of action being executed by the job step. Type *JobStepActionType `json:"type,omitempty"` }
JobStepAction - The action to be executed by a job step.
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 `json:"initialRetryIntervalSeconds,omitempty"` // The maximum amount of time to wait between retries for job step execution. MaximumRetryIntervalSeconds *int32 `json:"maximumRetryIntervalSeconds,omitempty"` // Maximum number of times the job step will be reattempted if the first attempt fails. RetryAttempts *int32 `json:"retryAttempts,omitempty"` // The backoff multiplier for the time between retries. RetryIntervalBackoffMultiplier *float32 `json:"retryIntervalBackoffMultiplier,omitempty"` // Execution timeout for the job step. TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"` }
JobStepExecutionOptions - The execution options of a job step.
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobExecutionStep.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobStepExecutionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<job-agent-name>", "<job-name>", "<job-execution-id>", "<step-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*JobStepExecutionsClient) ListByJobExecution ¶
func (client *JobStepExecutionsClient) ListByJobExecution(resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID string, options *JobStepExecutionsClientListByJobExecutionOptions) *runtime.Pager[JobStepExecutionsClientListByJobExecutionResponse]
ListByJobExecution - Lists the step executions of a job execution. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByJobExecution method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobExecutionSteps.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobStepExecutionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByJobExecution("<resource-group-name>", "<server-name>", "<job-agent-name>", "<job-name>", "<job-execution-id>", &armsql.JobStepExecutionsClientListByJobExecutionOptions{CreateTimeMin: nil, CreateTimeMax: nil, EndTimeMin: nil, EndTimeMax: nil, IsActive: nil, Skip: nil, Top: nil, }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type JobStepExecutionsClientGetOptions ¶ added in v0.3.0
type JobStepExecutionsClientGetOptions struct { }
JobStepExecutionsClientGetOptions contains the optional parameters for the JobStepExecutionsClient.Get method.
type JobStepExecutionsClientGetResponse ¶ added in v0.3.0
type JobStepExecutionsClientGetResponse struct {
JobExecution
}
JobStepExecutionsClientGetResponse contains the response from method JobStepExecutionsClient.Get.
type JobStepExecutionsClientListByJobExecutionOptions ¶ added in v0.3.0
type JobStepExecutionsClientListByJobExecutionOptions struct { // If specified, only job executions created before the specified time are included. CreateTimeMax *time.Time // If specified, only job executions created at or after the specified time are included. CreateTimeMin *time.Time // If specified, only job executions completed before the specified time are included. EndTimeMax *time.Time // If specified, only job executions completed at or after the specified time are included. EndTimeMin *time.Time // If specified, only active or only completed job executions are included. IsActive *bool // The number of elements in the collection to skip. Skip *int32 // The number of elements to return from the collection. Top *int32 }
JobStepExecutionsClientListByJobExecutionOptions contains the optional parameters for the JobStepExecutionsClient.ListByJobExecution method.
type JobStepExecutionsClientListByJobExecutionResponse ¶ added in v0.3.0
type JobStepExecutionsClientListByJobExecutionResponse struct {
JobExecutionListResult
}
JobStepExecutionsClientListByJobExecutionResponse contains the response from method JobStepExecutionsClient.ListByJobExecution.
type JobStepListResult ¶
type JobStepListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*JobStep `json:"value,omitempty" azure:"ro"` }
JobStepListResult - A list of job steps.
func (JobStepListResult) MarshalJSON ¶
func (j JobStepListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller 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 `json:"credential,omitempty"` // REQUIRED; The output destination database. DatabaseName *string `json:"databaseName,omitempty"` // REQUIRED; The output destination server name. ServerName *string `json:"serverName,omitempty"` // REQUIRED; The output destination table. TableName *string `json:"tableName,omitempty"` // The output destination resource group. ResourceGroupName *string `json:"resourceGroupName,omitempty"` // The output destination schema. SchemaName *string `json:"schemaName,omitempty"` // The output destination subscription id. SubscriptionID *string `json:"subscriptionId,omitempty"` // The output destination type. Type *JobStepOutputType `json:"type,omitempty"` }
JobStepOutput - The output configuration of a job step.
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 `json:"action,omitempty"` // REQUIRED; The resource ID of the job credential that will be used to connect to the targets. Credential *string `json:"credential,omitempty"` // REQUIRED; The resource ID of the target group that the job step will be executed on. TargetGroup *string `json:"targetGroup,omitempty"` // Execution options for the job step. ExecutionOptions *JobStepExecutionOptions `json:"executionOptions,omitempty"` // Output destination properties of the job step. Output *JobStepOutput `json:"output,omitempty"` // 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 `json:"stepId,omitempty"` }
JobStepProperties - Properties of a job step.
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. resourceGroupName - The name of the resource group 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobStepMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobStepsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.CreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<job-agent-name>", "<job-name>", "<step-name>", armsql.JobStep{ Properties: &armsql.JobStepProperties{ Action: &armsql.JobStepAction{ Type: to.Ptr(armsql.JobStepActionTypeTSQL), Source: to.Ptr(armsql.JobStepActionSourceInline), Value: to.Ptr("<value>"), }, Credential: to.Ptr("<credential>"), 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("<credential>"), DatabaseName: to.Ptr("<database-name>"), ResourceGroupName: to.Ptr("<resource-group-name>"), SchemaName: to.Ptr("<schema-name>"), ServerName: to.Ptr("<server-name>"), SubscriptionID: to.Ptr("<subscription-id>"), TableName: to.Ptr("<table-name>"), }, StepID: to.Ptr[int32](1), TargetGroup: to.Ptr("<target-group>"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteJobStep.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobStepsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Delete(ctx, "<resource-group-name>", "<server-name>", "<job-agent-name>", "<job-name>", "<step-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobStepByJob.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobStepsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<job-agent-name>", "<job-name>", "<step-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobStepByVersion.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobStepsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.GetByVersion(ctx, "<resource-group-name>", "<server-name>", "<job-agent-name>", "<job-name>", 1, "<step-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*JobStepsClient) ListByJob ¶
func (client *JobStepsClient) ListByJob(resourceGroupName string, serverName string, jobAgentName string, jobName string, options *JobStepsClientListByJobOptions) *runtime.Pager[JobStepsClientListByJobResponse]
ListByJob - Gets all job steps for a job's current version. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByJob method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobStepsByJob.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobStepsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByJob("<resource-group-name>", "<server-name>", "<job-agent-name>", "<job-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*JobStepsClient) ListByVersion ¶
func (client *JobStepsClient) ListByVersion(resourceGroupName string, serverName string, jobAgentName string, jobName string, jobVersion int32, options *JobStepsClientListByVersionOptions) *runtime.Pager[JobStepsClientListByVersionResponse]
ListByVersion - Gets all job steps in the specified job version. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByVersion method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobStepsByVersion.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobStepsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByVersion("<resource-group-name>", "<server-name>", "<job-agent-name>", "<job-name>", 1, nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type JobStepsClientCreateOrUpdateOptions ¶ added in v0.3.0
type JobStepsClientCreateOrUpdateOptions struct { }
JobStepsClientCreateOrUpdateOptions contains the optional parameters for the JobStepsClient.CreateOrUpdate method.
type JobStepsClientCreateOrUpdateResponse ¶ added in v0.3.0
type JobStepsClientCreateOrUpdateResponse struct {
JobStep
}
JobStepsClientCreateOrUpdateResponse contains the response from method JobStepsClient.CreateOrUpdate.
type JobStepsClientDeleteOptions ¶ added in v0.3.0
type JobStepsClientDeleteOptions struct { }
JobStepsClientDeleteOptions contains the optional parameters for the JobStepsClient.Delete method.
type JobStepsClientDeleteResponse ¶ added in v0.3.0
type JobStepsClientDeleteResponse struct { }
JobStepsClientDeleteResponse contains the response from method JobStepsClient.Delete.
type JobStepsClientGetByVersionOptions ¶ added in v0.3.0
type JobStepsClientGetByVersionOptions struct { }
JobStepsClientGetByVersionOptions contains the optional parameters for the JobStepsClient.GetByVersion method.
type JobStepsClientGetByVersionResponse ¶ added in v0.3.0
type JobStepsClientGetByVersionResponse struct {
JobStep
}
JobStepsClientGetByVersionResponse contains the response from method JobStepsClient.GetByVersion.
type JobStepsClientGetOptions ¶ added in v0.3.0
type JobStepsClientGetOptions struct { }
JobStepsClientGetOptions contains the optional parameters for the JobStepsClient.Get method.
type JobStepsClientGetResponse ¶ added in v0.3.0
type JobStepsClientGetResponse struct {
JobStep
}
JobStepsClientGetResponse contains the response from method JobStepsClient.Get.
type JobStepsClientListByJobOptions ¶ added in v0.3.0
type JobStepsClientListByJobOptions struct { }
JobStepsClientListByJobOptions contains the optional parameters for the JobStepsClient.ListByJob method.
type JobStepsClientListByJobResponse ¶ added in v0.3.0
type JobStepsClientListByJobResponse struct {
JobStepListResult
}
JobStepsClientListByJobResponse contains the response from method JobStepsClient.ListByJob.
type JobStepsClientListByVersionOptions ¶ added in v0.3.0
type JobStepsClientListByVersionOptions struct { }
JobStepsClientListByVersionOptions contains the optional parameters for the JobStepsClient.ListByVersion method.
type JobStepsClientListByVersionResponse ¶ added in v0.3.0
type JobStepsClientListByVersionResponse struct {
JobStepListResult
}
JobStepsClientListByVersionResponse contains the response from method JobStepsClient.ListByVersion.
type JobTarget ¶
type JobTarget struct { // REQUIRED; The target type. Type *JobTargetType `json:"type,omitempty"` // The target database name. DatabaseName *string `json:"databaseName,omitempty"` // The target elastic pool name. ElasticPoolName *string `json:"elasticPoolName,omitempty"` // Whether the target is included or excluded from the group. MembershipType *JobTargetGroupMembershipType `json:"membershipType,omitempty"` // 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 `json:"refreshCredential,omitempty"` // The target server name. ServerName *string `json:"serverName,omitempty"` // The target shard map. ShardMapName *string `json:"shardMapName,omitempty"` }
JobTarget - A job target, for example a specific database or a container of databases that is evaluated during job execution.
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobExecutionTarget.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobTargetExecutionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<job-agent-name>", "<job-name>", "<job-execution-id>", "<step-name>", "<target-id>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*JobTargetExecutionsClient) ListByJobExecution ¶
func (client *JobTargetExecutionsClient) ListByJobExecution(resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID string, options *JobTargetExecutionsClientListByJobExecutionOptions) *runtime.Pager[JobTargetExecutionsClientListByJobExecutionResponse]
ListByJobExecution - Lists target executions for all steps of a job execution. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByJobExecution method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobExecutionTargetsByExecution.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobTargetExecutionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByJobExecution("<resource-group-name>", "<server-name>", "<job-agent-name>", "<job-name>", "<job-execution-id>", &armsql.JobTargetExecutionsClientListByJobExecutionOptions{CreateTimeMin: nil, CreateTimeMax: nil, EndTimeMin: nil, EndTimeMax: nil, IsActive: nil, Skip: nil, Top: nil, }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*JobTargetExecutionsClient) ListByStep ¶
func (client *JobTargetExecutionsClient) ListByStep(resourceGroupName string, serverName string, jobAgentName string, jobName string, jobExecutionID string, stepName string, options *JobTargetExecutionsClientListByStepOptions) *runtime.Pager[JobTargetExecutionsClientListByStepResponse]
ListByStep - Lists the target executions of a job step execution. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByStep method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobExecutionTargetsByStep.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobTargetExecutionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByStep("<resource-group-name>", "<server-name>", "<job-agent-name>", "<job-name>", "<job-execution-id>", "<step-name>", &armsql.JobTargetExecutionsClientListByStepOptions{CreateTimeMin: nil, CreateTimeMax: nil, EndTimeMin: nil, EndTimeMax: nil, IsActive: nil, Skip: nil, Top: nil, }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type JobTargetExecutionsClientGetOptions ¶ added in v0.3.0
type JobTargetExecutionsClientGetOptions struct { }
JobTargetExecutionsClientGetOptions contains the optional parameters for the JobTargetExecutionsClient.Get method.
type JobTargetExecutionsClientGetResponse ¶ added in v0.3.0
type JobTargetExecutionsClientGetResponse struct {
JobExecution
}
JobTargetExecutionsClientGetResponse contains the response from method JobTargetExecutionsClient.Get.
type JobTargetExecutionsClientListByJobExecutionOptions ¶ added in v0.3.0
type JobTargetExecutionsClientListByJobExecutionOptions struct { // If specified, only job executions created before the specified time are included. CreateTimeMax *time.Time // If specified, only job executions created at or after the specified time are included. CreateTimeMin *time.Time // If specified, only job executions completed before the specified time are included. EndTimeMax *time.Time // If specified, only job executions completed at or after the specified time are included. EndTimeMin *time.Time // If specified, only active or only completed job executions are included. IsActive *bool // The number of elements in the collection to skip. Skip *int32 // The number of elements to return from the collection. Top *int32 }
JobTargetExecutionsClientListByJobExecutionOptions contains the optional parameters for the JobTargetExecutionsClient.ListByJobExecution method.
type JobTargetExecutionsClientListByJobExecutionResponse ¶ added in v0.3.0
type JobTargetExecutionsClientListByJobExecutionResponse struct {
JobExecutionListResult
}
JobTargetExecutionsClientListByJobExecutionResponse contains the response from method JobTargetExecutionsClient.ListByJobExecution.
type JobTargetExecutionsClientListByStepOptions ¶ added in v0.3.0
type JobTargetExecutionsClientListByStepOptions struct { // If specified, only job executions created before the specified time are included. CreateTimeMax *time.Time // If specified, only job executions created at or after the specified time are included. CreateTimeMin *time.Time // If specified, only job executions completed before the specified time are included. EndTimeMax *time.Time // If specified, only job executions completed at or after the specified time are included. EndTimeMin *time.Time // If specified, only active or only completed job executions are included. IsActive *bool // The number of elements in the collection to skip. Skip *int32 // The number of elements to return from the collection. Top *int32 }
JobTargetExecutionsClientListByStepOptions contains the optional parameters for the JobTargetExecutionsClient.ListByStep method.
type JobTargetExecutionsClientListByStepResponse ¶ added in v0.3.0
type JobTargetExecutionsClientListByStepResponse struct {
JobExecutionListResult
}
JobTargetExecutionsClientListByStepResponse contains the response from method JobTargetExecutionsClient.ListByStep.
type JobTargetGroup ¶
type JobTargetGroup struct { // Resource properties. Properties *JobTargetGroupProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
JobTargetGroup - A group of job targets.
type JobTargetGroupListResult ¶
type JobTargetGroupListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*JobTargetGroup `json:"value,omitempty" azure:"ro"` }
JobTargetGroupListResult - A list of target groups.
func (JobTargetGroupListResult) MarshalJSON ¶
func (j JobTargetGroupListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type JobTargetGroupListResult.
type JobTargetGroupMembershipType ¶
type JobTargetGroupMembershipType string
JobTargetGroupMembershipType - Whether the target is included or excluded from the group.
const ( JobTargetGroupMembershipTypeInclude JobTargetGroupMembershipType = "Include" JobTargetGroupMembershipTypeExclude JobTargetGroupMembershipType = "Exclude" )
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 `json:"members,omitempty"` }
JobTargetGroupProperties - Properties of job target group.
func (JobTargetGroupProperties) MarshalJSON ¶
func (j JobTargetGroupProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller 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. resourceGroupName - The name of the resource group 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobTargetGroupMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobTargetGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.CreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<job-agent-name>", "<target-group-name>", armsql.JobTargetGroup{ Properties: &armsql.JobTargetGroupProperties{ Members: []*armsql.JobTarget{ { Type: to.Ptr(armsql.JobTargetTypeSQLDatabase), DatabaseName: to.Ptr("<database-name>"), MembershipType: to.Ptr(armsql.JobTargetGroupMembershipTypeExclude), ServerName: to.Ptr("<server-name>"), }, { Type: to.Ptr(armsql.JobTargetTypeSQLServer), MembershipType: to.Ptr(armsql.JobTargetGroupMembershipTypeInclude), RefreshCredential: to.Ptr("<refresh-credential>"), ServerName: to.Ptr("<server-name>"), }, { Type: to.Ptr(armsql.JobTargetTypeSQLElasticPool), ElasticPoolName: to.Ptr("<elastic-pool-name>"), MembershipType: to.Ptr(armsql.JobTargetGroupMembershipTypeInclude), RefreshCredential: to.Ptr("<refresh-credential>"), ServerName: to.Ptr("<server-name>"), }, { Type: to.Ptr(armsql.JobTargetTypeSQLShardMap), MembershipType: to.Ptr(armsql.JobTargetGroupMembershipTypeInclude), RefreshCredential: to.Ptr("<refresh-credential>"), ServerName: to.Ptr("<server-name>"), ShardMapName: to.Ptr("<shard-map-name>"), }}, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteJobTargetGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobTargetGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Delete(ctx, "<resource-group-name>", "<server-name>", "<job-agent-name>", "<target-group-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobTargetGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobTargetGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<job-agent-name>", "<target-group-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*JobTargetGroupsClient) ListByAgent ¶
func (client *JobTargetGroupsClient) ListByAgent(resourceGroupName string, serverName string, jobAgentName string, options *JobTargetGroupsClientListByAgentOptions) *runtime.Pager[JobTargetGroupsClientListByAgentResponse]
ListByAgent - Gets all target groups in an agent. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByAgent method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobTargetGroups.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobTargetGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByAgent("<resource-group-name>", "<server-name>", "<job-agent-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type JobTargetGroupsClientCreateOrUpdateOptions ¶ added in v0.3.0
type JobTargetGroupsClientCreateOrUpdateOptions struct { }
JobTargetGroupsClientCreateOrUpdateOptions contains the optional parameters for the JobTargetGroupsClient.CreateOrUpdate method.
type JobTargetGroupsClientCreateOrUpdateResponse ¶ added in v0.3.0
type JobTargetGroupsClientCreateOrUpdateResponse struct {
JobTargetGroup
}
JobTargetGroupsClientCreateOrUpdateResponse contains the response from method JobTargetGroupsClient.CreateOrUpdate.
type JobTargetGroupsClientDeleteOptions ¶ added in v0.3.0
type JobTargetGroupsClientDeleteOptions struct { }
JobTargetGroupsClientDeleteOptions contains the optional parameters for the JobTargetGroupsClient.Delete method.
type JobTargetGroupsClientDeleteResponse ¶ added in v0.3.0
type JobTargetGroupsClientDeleteResponse struct { }
JobTargetGroupsClientDeleteResponse contains the response from method JobTargetGroupsClient.Delete.
type JobTargetGroupsClientGetOptions ¶ added in v0.3.0
type JobTargetGroupsClientGetOptions struct { }
JobTargetGroupsClientGetOptions contains the optional parameters for the JobTargetGroupsClient.Get method.
type JobTargetGroupsClientGetResponse ¶ added in v0.3.0
type JobTargetGroupsClientGetResponse struct {
JobTargetGroup
}
JobTargetGroupsClientGetResponse contains the response from method JobTargetGroupsClient.Get.
type JobTargetGroupsClientListByAgentOptions ¶ added in v0.3.0
type JobTargetGroupsClientListByAgentOptions struct { }
JobTargetGroupsClientListByAgentOptions contains the optional parameters for the JobTargetGroupsClient.ListByAgent method.
type JobTargetGroupsClientListByAgentResponse ¶ added in v0.3.0
type JobTargetGroupsClientListByAgentResponse struct {
JobTargetGroupListResult
}
JobTargetGroupsClientListByAgentResponse contains the response from method JobTargetGroupsClient.ListByAgent.
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 `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
JobVersion - A job version.
type JobVersionListResult ¶
type JobVersionListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*JobVersion `json:"value,omitempty" azure:"ro"` }
JobVersionListResult - A list of job versions.
func (JobVersionListResult) MarshalJSON ¶
func (j JobVersionListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller 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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJobVersion.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobVersionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<job-agent-name>", "<job-name>", 1, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*JobVersionsClient) ListByJob ¶
func (client *JobVersionsClient) ListByJob(resourceGroupName string, serverName string, jobAgentName string, jobName string, options *JobVersionsClientListByJobOptions) *runtime.Pager[JobVersionsClientListByJobResponse]
ListByJob - Gets all versions of a job. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByJob method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobVersions.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobVersionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByJob("<resource-group-name>", "<server-name>", "<job-agent-name>", "<job-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type JobVersionsClientGetOptions ¶ added in v0.3.0
type JobVersionsClientGetOptions struct { }
JobVersionsClientGetOptions contains the optional parameters for the JobVersionsClient.Get method.
type JobVersionsClientGetResponse ¶ added in v0.3.0
type JobVersionsClientGetResponse struct {
JobVersion
}
JobVersionsClientGetResponse contains the response from method JobVersionsClient.Get.
type JobVersionsClientListByJobOptions ¶ added in v0.3.0
type JobVersionsClientListByJobOptions struct { }
JobVersionsClientListByJobOptions contains the optional parameters for the JobVersionsClient.ListByJob method.
type JobVersionsClientListByJobResponse ¶ added in v0.3.0
type JobVersionsClientListByJobResponse struct {
JobVersionListResult
}
JobVersionsClientListByJobResponse contains the response from method JobVersionsClient.ListByJob.
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. resourceGroupName - The name of the resource group 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateJobMax.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.CreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<job-agent-name>", "<job-name>", armsql.Job{ Properties: &armsql.JobProperties{ Description: to.Ptr("<description>"), 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:59Z"); return t }()), Interval: to.Ptr("<interval>"), StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2015-09-24T18:30:01Z"); return t }()), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteJob.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Delete(ctx, "<resource-group-name>", "<server-name>", "<job-agent-name>", "<job-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetJob.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<job-agent-name>", "<job-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*JobsClient) ListByAgent ¶
func (client *JobsClient) ListByAgent(resourceGroupName string, serverName string, jobAgentName string, options *JobsClientListByAgentOptions) *runtime.Pager[JobsClientListByAgentResponse]
ListByAgent - Gets a list of jobs. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByAgent method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListJobsByAgent.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewJobsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByAgent("<resource-group-name>", "<server-name>", "<job-agent-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type JobsClientCreateOrUpdateOptions ¶ added in v0.3.0
type JobsClientCreateOrUpdateOptions struct { }
JobsClientCreateOrUpdateOptions contains the optional parameters for the JobsClient.CreateOrUpdate method.
type JobsClientCreateOrUpdateResponse ¶ added in v0.3.0
type JobsClientCreateOrUpdateResponse struct {
Job
}
JobsClientCreateOrUpdateResponse contains the response from method JobsClient.CreateOrUpdate.
type JobsClientDeleteOptions ¶ added in v0.3.0
type JobsClientDeleteOptions struct { }
JobsClientDeleteOptions contains the optional parameters for the JobsClient.Delete method.
type JobsClientDeleteResponse ¶ added in v0.3.0
type JobsClientDeleteResponse struct { }
JobsClientDeleteResponse contains the response from method JobsClient.Delete.
type JobsClientGetOptions ¶ added in v0.3.0
type JobsClientGetOptions struct { }
JobsClientGetOptions contains the optional parameters for the JobsClient.Get method.
type JobsClientGetResponse ¶ added in v0.3.0
type JobsClientGetResponse struct {
Job
}
JobsClientGetResponse contains the response from method JobsClient.Get.
type JobsClientListByAgentOptions ¶ added in v0.3.0
type JobsClientListByAgentOptions struct { }
JobsClientListByAgentOptions contains the optional parameters for the JobsClient.ListByAgent method.
type JobsClientListByAgentResponse ¶ added in v0.3.0
type JobsClientListByAgentResponse struct {
JobListResult
}
JobsClientListByAgentResponse contains the response from method JobsClient.ListByAgent.
type LedgerDigestUploads ¶
type LedgerDigestUploads struct { // Resource properties. Properties *LedgerDigestUploadsProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
LedgerDigestUploads - Azure SQL Database ledger digest upload settings.
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) (*armruntime.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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsEnable.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLedgerDigestUploadsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<database-name>", armsql.LedgerDigestUploadsNameCurrent, armsql.LedgerDigestUploads{ Properties: &armsql.LedgerDigestUploadsProperties{ DigestStorageEndpoint: to.Ptr("<digest-storage-endpoint>"), }, }, &armsql.LedgerDigestUploadsClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*LedgerDigestUploadsClient) BeginDisable ¶
func (client *LedgerDigestUploadsClient) BeginDisable(ctx context.Context, resourceGroupName string, serverName string, databaseName string, ledgerDigestUploads LedgerDigestUploadsName, options *LedgerDigestUploadsClientBeginDisableOptions) (*armruntime.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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsDisable.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLedgerDigestUploadsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDisable(ctx, "<resource-group-name>", "<server-name>", "<database-name>", armsql.LedgerDigestUploadsNameCurrent, &armsql.LedgerDigestUploadsClientBeginDisableOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLedgerDigestUploadsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", armsql.LedgerDigestUploadsNameCurrent, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*LedgerDigestUploadsClient) ListByDatabase ¶
func (client *LedgerDigestUploadsClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, options *LedgerDigestUploadsClientListByDatabaseOptions) *runtime.Pager[LedgerDigestUploadsClientListByDatabaseResponse]
ListByDatabase - Gets all ledger digest upload settings on a database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/LedgerDigestUploadsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLedgerDigestUploadsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<server-name>", "<database-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type LedgerDigestUploadsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type LedgerDigestUploadsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LedgerDigestUploadsClientBeginCreateOrUpdateOptions contains the optional parameters for the LedgerDigestUploadsClient.BeginCreateOrUpdate method.
type LedgerDigestUploadsClientBeginDisableOptions ¶ added in v0.3.0
type LedgerDigestUploadsClientBeginDisableOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LedgerDigestUploadsClientBeginDisableOptions contains the optional parameters for the LedgerDigestUploadsClient.BeginDisable method.
type LedgerDigestUploadsClientCreateOrUpdateResponse ¶ added in v0.3.0
type LedgerDigestUploadsClientCreateOrUpdateResponse struct {
LedgerDigestUploads
}
LedgerDigestUploadsClientCreateOrUpdateResponse contains the response from method LedgerDigestUploadsClient.CreateOrUpdate.
type LedgerDigestUploadsClientDisableResponse ¶ added in v0.3.0
type LedgerDigestUploadsClientDisableResponse struct {
LedgerDigestUploads
}
LedgerDigestUploadsClientDisableResponse contains the response from method LedgerDigestUploadsClient.Disable.
type LedgerDigestUploadsClientGetOptions ¶ added in v0.3.0
type LedgerDigestUploadsClientGetOptions struct { }
LedgerDigestUploadsClientGetOptions contains the optional parameters for the LedgerDigestUploadsClient.Get method.
type LedgerDigestUploadsClientGetResponse ¶ added in v0.3.0
type LedgerDigestUploadsClientGetResponse struct {
LedgerDigestUploads
}
LedgerDigestUploadsClientGetResponse contains the response from method LedgerDigestUploadsClient.Get.
type LedgerDigestUploadsClientListByDatabaseOptions ¶ added in v0.3.0
type LedgerDigestUploadsClientListByDatabaseOptions struct { }
LedgerDigestUploadsClientListByDatabaseOptions contains the optional parameters for the LedgerDigestUploadsClient.ListByDatabase method.
type LedgerDigestUploadsClientListByDatabaseResponse ¶ added in v0.3.0
type LedgerDigestUploadsClientListByDatabaseResponse struct {
LedgerDigestUploadsListResult
}
LedgerDigestUploadsClientListByDatabaseResponse contains the response from method LedgerDigestUploadsClient.ListByDatabase.
type LedgerDigestUploadsListResult ¶
type LedgerDigestUploadsListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*LedgerDigestUploads `json:"value,omitempty" azure:"ro"` }
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.
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 `json:"digestStorageEndpoint,omitempty"` // READ-ONLY; Specifies the state of ledger digest upload. State *LedgerDigestUploadsState `json:"state,omitempty" azure:"ro"` }
LedgerDigestUploadsProperties - The properties of a database ledger digest upload settings.
type LedgerDigestUploadsState ¶
type LedgerDigestUploadsState string
LedgerDigestUploadsState - Specifies the state of ledger digest upload.
const ( LedgerDigestUploadsStateEnabled LedgerDigestUploadsState = "Enabled" LedgerDigestUploadsStateDisabled LedgerDigestUploadsState = "Disabled" )
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 `json:"reason,omitempty"` // READ-ONLY; License type identifier. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The status of the capability. Status *CapabilityStatus `json:"status,omitempty" azure:"ro"` }
LicenseTypeCapability - The license type capability
type LocationCapabilities ¶
type LocationCapabilities struct { // The reason for the capability not being available. Reason *string `json:"reason,omitempty"` // READ-ONLY; The location name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The status of the capability. Status *CapabilityStatus `json:"status,omitempty" azure:"ro"` // READ-ONLY; The list of supported managed instance versions. SupportedManagedInstanceVersions []*ManagedInstanceVersionCapability `json:"supportedManagedInstanceVersions,omitempty" azure:"ro"` // READ-ONLY; The list of supported server versions. SupportedServerVersions []*ServerVersionCapability `json:"supportedServerVersions,omitempty" azure:"ro"` }
LocationCapabilities - The location capability.
func (LocationCapabilities) MarshalJSON ¶
func (l LocationCapabilities) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LocationCapabilities.
type LogSizeCapability ¶
type LogSizeCapability struct { // READ-ONLY; The log size limit (see 'unit' for the units). Limit *int32 `json:"limit,omitempty" azure:"ro"` // READ-ONLY; The units that the limit is expressed in. Unit *LogSizeUnit `json:"unit,omitempty" azure:"ro"` }
LogSizeCapability - The log size capability.
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 `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
LogicalDatabaseTransparentDataEncryption - A logical database transparent data encryption state.
type LogicalDatabaseTransparentDataEncryptionListResult ¶
type LogicalDatabaseTransparentDataEncryptionListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*LogicalDatabaseTransparentDataEncryption `json:"value,omitempty" azure:"ro"` }
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.
type LogicalServerSecurityAlertPolicyListResult ¶
type LogicalServerSecurityAlertPolicyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ServerSecurityAlertPolicy `json:"value,omitempty" azure:"ro"` }
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.
type LongTermRetentionBackup ¶
type LongTermRetentionBackup struct { // Resource properties. Properties *LongTermRetentionBackupProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
LongTermRetentionBackup - A long term retention backup.
type LongTermRetentionBackupListResult ¶
type LongTermRetentionBackupListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*LongTermRetentionBackup `json:"value,omitempty" azure:"ro"` }
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.
type LongTermRetentionBackupOperationResult ¶
type LongTermRetentionBackupOperationResult struct { // Resource properties. Properties *LongTermRetentionOperationResultProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
LongTermRetentionBackupOperationResult - A LongTermRetentionBackup operation result resource.
type LongTermRetentionBackupProperties ¶
type LongTermRetentionBackupProperties struct { // The storage redundancy type of the backup RequestedBackupStorageRedundancy *BackupStorageRedundancy `json:"requestedBackupStorageRedundancy,omitempty"` // READ-ONLY; The time the long term retention backup will expire. BackupExpirationTime *time.Time `json:"backupExpirationTime,omitempty" azure:"ro"` // READ-ONLY; The storage redundancy type of the backup BackupStorageRedundancy *BackupStorageRedundancy `json:"backupStorageRedundancy,omitempty" azure:"ro"` // READ-ONLY; The time the backup was taken BackupTime *time.Time `json:"backupTime,omitempty" azure:"ro"` // READ-ONLY; The delete time of the database DatabaseDeletionTime *time.Time `json:"databaseDeletionTime,omitempty" azure:"ro"` // READ-ONLY; The name of the database the backup belong to DatabaseName *string `json:"databaseName,omitempty" azure:"ro"` // READ-ONLY; The create time of the server. ServerCreateTime *time.Time `json:"serverCreateTime,omitempty" azure:"ro"` // READ-ONLY; The server name that the backup database belong to. ServerName *string `json:"serverName,omitempty" azure:"ro"` }
LongTermRetentionBackupProperties - Properties of a long term retention backup
func (LongTermRetentionBackupProperties) MarshalJSON ¶
func (l LongTermRetentionBackupProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LongTermRetentionBackupProperties.
func (*LongTermRetentionBackupProperties) UnmarshalJSON ¶
func (l *LongTermRetentionBackupProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LongTermRetentionBackupProperties.
type LongTermRetentionBackupsClient ¶
type LongTermRetentionBackupsClient struct {
// contains filtered or unexported fields
}
LongTermRetentionBackupsClient contains the methods for the LongTermRetentionBackups group. Don't use this type directly, use NewLongTermRetentionBackupsClient() instead.
func NewLongTermRetentionBackupsClient ¶
func NewLongTermRetentionBackupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LongTermRetentionBackupsClient, error)
NewLongTermRetentionBackupsClient creates a new instance of LongTermRetentionBackupsClient with the specified values. subscriptionID - The subscription ID that identifies an Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*LongTermRetentionBackupsClient) BeginCopy ¶
func (client *LongTermRetentionBackupsClient) BeginCopy(ctx context.Context, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, parameters CopyLongTermRetentionBackupParameters, options *LongTermRetentionBackupsClientBeginCopyOptions) (*armruntime.Poller[LongTermRetentionBackupsClientCopyResponse], error)
BeginCopy - Copy an existing long term retention backup. If the operation fails it returns an *azcore.ResponseError type. 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/LongTermRetentionBackupCopy.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLongTermRetentionBackupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCopy(ctx, "<location-name>", "<long-term-retention-server-name>", "<long-term-retention-database-name>", "<backup-name>", armsql.CopyLongTermRetentionBackupParameters{ Properties: &armsql.CopyLongTermRetentionBackupParametersProperties{ TargetBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), TargetDatabaseName: to.Ptr("<target-database-name>"), TargetServerResourceID: to.Ptr("<target-server-resource-id>"), }, }, &armsql.LongTermRetentionBackupsClientBeginCopyOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
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) (*armruntime.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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupCopy.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLongTermRetentionBackupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCopyByResourceGroup(ctx, "<resource-group-name>", "<location-name>", "<long-term-retention-server-name>", "<long-term-retention-database-name>", "<backup-name>", armsql.CopyLongTermRetentionBackupParameters{ Properties: &armsql.CopyLongTermRetentionBackupParametersProperties{ TargetBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), TargetDatabaseName: to.Ptr("<target-database-name>"), TargetServerResourceID: to.Ptr("<target-server-resource-id>"), }, }, &armsql.LongTermRetentionBackupsClientBeginCopyByResourceGroupOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*LongTermRetentionBackupsClient) BeginDelete ¶
func (client *LongTermRetentionBackupsClient) BeginDelete(ctx context.Context, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, options *LongTermRetentionBackupsClientBeginDeleteOptions) (*armruntime.Poller[LongTermRetentionBackupsClientDeleteResponse], error)
BeginDelete - Deletes a long term retention backup. If the operation fails it returns an *azcore.ResponseError type. 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/LongTermRetentionBackupDelete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLongTermRetentionBackupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<location-name>", "<long-term-retention-server-name>", "<long-term-retention-database-name>", "<backup-name>", &armsql.LongTermRetentionBackupsClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*LongTermRetentionBackupsClient) BeginDeleteByResourceGroup ¶
func (client *LongTermRetentionBackupsClient) BeginDeleteByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, options *LongTermRetentionBackupsClientBeginDeleteByResourceGroupOptions) (*armruntime.Poller[LongTermRetentionBackupsClientDeleteByResourceGroupResponse], error)
BeginDeleteByResourceGroup - Deletes a long term retention backup. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupDelete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLongTermRetentionBackupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDeleteByResourceGroup(ctx, "<resource-group-name>", "<location-name>", "<long-term-retention-server-name>", "<long-term-retention-database-name>", "<backup-name>", &armsql.LongTermRetentionBackupsClientBeginDeleteByResourceGroupOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*LongTermRetentionBackupsClient) BeginUpdate ¶
func (client *LongTermRetentionBackupsClient) BeginUpdate(ctx context.Context, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, backupName string, parameters UpdateLongTermRetentionBackupParameters, options *LongTermRetentionBackupsClientBeginUpdateOptions) (*armruntime.Poller[LongTermRetentionBackupsClientUpdateResponse], error)
BeginUpdate - Updates an existing long term retention backup. If the operation fails it returns an *azcore.ResponseError type. 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/LongTermRetentionBackupUpdate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLongTermRetentionBackupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginUpdate(ctx, "<location-name>", "<long-term-retention-server-name>", "<long-term-retention-database-name>", "<backup-name>", armsql.UpdateLongTermRetentionBackupParameters{ Properties: &armsql.UpdateLongTermRetentionBackupParametersProperties{ RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), }, }, &armsql.LongTermRetentionBackupsClientBeginUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
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) (*armruntime.Poller[LongTermRetentionBackupsClientUpdateByResourceGroupResponse], error)
BeginUpdateByResourceGroup - Updates an existing long term retention backup. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupUpdate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLongTermRetentionBackupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginUpdateByResourceGroup(ctx, "<resource-group-name>", "<location-name>", "<long-term-retention-server-name>", "<long-term-retention-database-name>", "<backup-name>", armsql.UpdateLongTermRetentionBackupParameters{ Properties: &armsql.UpdateLongTermRetentionBackupParametersProperties{ RequestedBackupStorageRedundancy: to.Ptr(armsql.BackupStorageRedundancyGeo), }, }, &armsql.LongTermRetentionBackupsClientBeginUpdateByResourceGroupOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
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. 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/LongTermRetentionBackupGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLongTermRetentionBackupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<location-name>", "<long-term-retention-server-name>", "<long-term-retention-database-name>", "<backup-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLongTermRetentionBackupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.GetByResourceGroup(ctx, "<resource-group-name>", "<location-name>", "<long-term-retention-server-name>", "<long-term-retention-database-name>", "<backup-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*LongTermRetentionBackupsClient) ListByDatabase ¶
func (client *LongTermRetentionBackupsClient) ListByDatabase(locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, options *LongTermRetentionBackupsClientListByDatabaseOptions) *runtime.Pager[LongTermRetentionBackupsClientListByDatabaseResponse]
ListByDatabase - Lists all long term retention backups for a database. If the operation fails it returns an *azcore.ResponseError type. 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/LongTermRetentionBackupListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLongTermRetentionBackupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<location-name>", "<long-term-retention-server-name>", "<long-term-retention-database-name>", &armsql.LongTermRetentionBackupsClientListByDatabaseOptions{OnlyLatestPerDatabase: nil, DatabaseState: nil, }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*LongTermRetentionBackupsClient) ListByLocation ¶
func (client *LongTermRetentionBackupsClient) ListByLocation(locationName string, options *LongTermRetentionBackupsClientListByLocationOptions) *runtime.Pager[LongTermRetentionBackupsClientListByLocationResponse]
ListByLocation - Lists the long term retention backups for a given location. If the operation fails it returns an *azcore.ResponseError type. locationName - The location of the database options - LongTermRetentionBackupsClientListByLocationOptions contains the optional parameters for the LongTermRetentionBackupsClient.ListByLocation method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/LongTermRetentionBackupListByLocation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLongTermRetentionBackupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByLocation("<location-name>", &armsql.LongTermRetentionBackupsClientListByLocationOptions{OnlyLatestPerDatabase: nil, DatabaseState: nil, }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*LongTermRetentionBackupsClient) ListByResourceGroupDatabase ¶
func (client *LongTermRetentionBackupsClient) ListByResourceGroupDatabase(resourceGroupName string, locationName string, longTermRetentionServerName string, longTermRetentionDatabaseName string, options *LongTermRetentionBackupsClientListByResourceGroupDatabaseOptions) *runtime.Pager[LongTermRetentionBackupsClientListByResourceGroupDatabaseResponse]
ListByResourceGroupDatabase - Lists all long term retention backups for a database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByResourceGroupDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLongTermRetentionBackupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByResourceGroupDatabase("<resource-group-name>", "<location-name>", "<long-term-retention-server-name>", "<long-term-retention-database-name>", &armsql.LongTermRetentionBackupsClientListByResourceGroupDatabaseOptions{OnlyLatestPerDatabase: nil, DatabaseState: nil, }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*LongTermRetentionBackupsClient) ListByResourceGroupLocation ¶
func (client *LongTermRetentionBackupsClient) ListByResourceGroupLocation(resourceGroupName string, locationName string, options *LongTermRetentionBackupsClientListByResourceGroupLocationOptions) *runtime.Pager[LongTermRetentionBackupsClientListByResourceGroupLocationResponse]
ListByResourceGroupLocation - Lists the long term retention backups for a given location. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByResourceGroupLocation method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByLocation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLongTermRetentionBackupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByResourceGroupLocation("<resource-group-name>", "<location-name>", &armsql.LongTermRetentionBackupsClientListByResourceGroupLocationOptions{OnlyLatestPerDatabase: nil, DatabaseState: nil, }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*LongTermRetentionBackupsClient) ListByResourceGroupServer ¶
func (client *LongTermRetentionBackupsClient) ListByResourceGroupServer(resourceGroupName string, locationName string, longTermRetentionServerName string, options *LongTermRetentionBackupsClientListByResourceGroupServerOptions) *runtime.Pager[LongTermRetentionBackupsClientListByResourceGroupServerResponse]
ListByResourceGroupServer - Lists the long term retention backups for a given server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByResourceGroupServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLongTermRetentionBackupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByResourceGroupServer("<resource-group-name>", "<location-name>", "<long-term-retention-server-name>", &armsql.LongTermRetentionBackupsClientListByResourceGroupServerOptions{OnlyLatestPerDatabase: nil, DatabaseState: nil, }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*LongTermRetentionBackupsClient) ListByServer ¶
func (client *LongTermRetentionBackupsClient) ListByServer(locationName string, longTermRetentionServerName string, options *LongTermRetentionBackupsClientListByServerOptions) *runtime.Pager[LongTermRetentionBackupsClientListByServerResponse]
ListByServer - Lists the long term retention backups for a given server. If the operation fails it returns an *azcore.ResponseError type. locationName - The location of the database longTermRetentionServerName - The name of the server options - LongTermRetentionBackupsClientListByServerOptions contains the optional parameters for the LongTermRetentionBackupsClient.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/LongTermRetentionBackupListByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLongTermRetentionBackupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<location-name>", "<long-term-retention-server-name>", &armsql.LongTermRetentionBackupsClientListByServerOptions{OnlyLatestPerDatabase: nil, DatabaseState: nil, }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type LongTermRetentionBackupsClientBeginCopyByResourceGroupOptions ¶ added in v0.3.0
type LongTermRetentionBackupsClientBeginCopyByResourceGroupOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LongTermRetentionBackupsClientBeginCopyByResourceGroupOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginCopyByResourceGroup method.
type LongTermRetentionBackupsClientBeginCopyOptions ¶ added in v0.3.0
type LongTermRetentionBackupsClientBeginCopyOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LongTermRetentionBackupsClientBeginCopyOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginCopy method.
type LongTermRetentionBackupsClientBeginDeleteByResourceGroupOptions ¶ added in v0.3.0
type LongTermRetentionBackupsClientBeginDeleteByResourceGroupOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LongTermRetentionBackupsClientBeginDeleteByResourceGroupOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginDeleteByResourceGroup method.
type LongTermRetentionBackupsClientBeginDeleteOptions ¶ added in v0.3.0
type LongTermRetentionBackupsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LongTermRetentionBackupsClientBeginDeleteOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginDelete method.
type LongTermRetentionBackupsClientBeginUpdateByResourceGroupOptions ¶ added in v0.3.0
type LongTermRetentionBackupsClientBeginUpdateByResourceGroupOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LongTermRetentionBackupsClientBeginUpdateByResourceGroupOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginUpdateByResourceGroup method.
type LongTermRetentionBackupsClientBeginUpdateOptions ¶ added in v0.3.0
type LongTermRetentionBackupsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LongTermRetentionBackupsClientBeginUpdateOptions contains the optional parameters for the LongTermRetentionBackupsClient.BeginUpdate method.
type LongTermRetentionBackupsClientCopyByResourceGroupResponse ¶ added in v0.3.0
type LongTermRetentionBackupsClientCopyByResourceGroupResponse struct {
LongTermRetentionBackupOperationResult
}
LongTermRetentionBackupsClientCopyByResourceGroupResponse contains the response from method LongTermRetentionBackupsClient.CopyByResourceGroup.
type LongTermRetentionBackupsClientCopyResponse ¶ added in v0.3.0
type LongTermRetentionBackupsClientCopyResponse struct {
LongTermRetentionBackupOperationResult
}
LongTermRetentionBackupsClientCopyResponse contains the response from method LongTermRetentionBackupsClient.Copy.
type LongTermRetentionBackupsClientDeleteByResourceGroupResponse ¶ added in v0.3.0
type LongTermRetentionBackupsClientDeleteByResourceGroupResponse struct { }
LongTermRetentionBackupsClientDeleteByResourceGroupResponse contains the response from method LongTermRetentionBackupsClient.DeleteByResourceGroup.
type LongTermRetentionBackupsClientDeleteResponse ¶ added in v0.3.0
type LongTermRetentionBackupsClientDeleteResponse struct { }
LongTermRetentionBackupsClientDeleteResponse contains the response from method LongTermRetentionBackupsClient.Delete.
type LongTermRetentionBackupsClientGetByResourceGroupOptions ¶ added in v0.3.0
type LongTermRetentionBackupsClientGetByResourceGroupOptions struct { }
LongTermRetentionBackupsClientGetByResourceGroupOptions contains the optional parameters for the LongTermRetentionBackupsClient.GetByResourceGroup method.
type LongTermRetentionBackupsClientGetByResourceGroupResponse ¶ added in v0.3.0
type LongTermRetentionBackupsClientGetByResourceGroupResponse struct {
LongTermRetentionBackup
}
LongTermRetentionBackupsClientGetByResourceGroupResponse contains the response from method LongTermRetentionBackupsClient.GetByResourceGroup.
type LongTermRetentionBackupsClientGetOptions ¶ added in v0.3.0
type LongTermRetentionBackupsClientGetOptions struct { }
LongTermRetentionBackupsClientGetOptions contains the optional parameters for the LongTermRetentionBackupsClient.Get method.
type LongTermRetentionBackupsClientGetResponse ¶ added in v0.3.0
type LongTermRetentionBackupsClientGetResponse struct {
LongTermRetentionBackup
}
LongTermRetentionBackupsClientGetResponse contains the response from method LongTermRetentionBackupsClient.Get.
type LongTermRetentionBackupsClientListByDatabaseOptions ¶ added in v0.3.0
type LongTermRetentionBackupsClientListByDatabaseOptions struct { // Whether to query against just live databases, just deleted databases, or all databases. DatabaseState *DatabaseState // Whether or not to only get the latest backup for each database. OnlyLatestPerDatabase *bool }
LongTermRetentionBackupsClientListByDatabaseOptions contains the optional parameters for the LongTermRetentionBackupsClient.ListByDatabase method.
type LongTermRetentionBackupsClientListByDatabaseResponse ¶ added in v0.3.0
type LongTermRetentionBackupsClientListByDatabaseResponse struct {
LongTermRetentionBackupListResult
}
LongTermRetentionBackupsClientListByDatabaseResponse contains the response from method LongTermRetentionBackupsClient.ListByDatabase.
type LongTermRetentionBackupsClientListByLocationOptions ¶ added in v0.3.0
type LongTermRetentionBackupsClientListByLocationOptions struct { // Whether to query against just live databases, just deleted databases, or all databases. DatabaseState *DatabaseState // Whether or not to only get the latest backup for each database. OnlyLatestPerDatabase *bool }
LongTermRetentionBackupsClientListByLocationOptions contains the optional parameters for the LongTermRetentionBackupsClient.ListByLocation method.
type LongTermRetentionBackupsClientListByLocationResponse ¶ added in v0.3.0
type LongTermRetentionBackupsClientListByLocationResponse struct {
LongTermRetentionBackupListResult
}
LongTermRetentionBackupsClientListByLocationResponse contains the response from method LongTermRetentionBackupsClient.ListByLocation.
type LongTermRetentionBackupsClientListByResourceGroupDatabaseOptions ¶ added in v0.3.0
type LongTermRetentionBackupsClientListByResourceGroupDatabaseOptions struct { // Whether to query against just live databases, just deleted databases, or all databases. DatabaseState *DatabaseState // Whether or not to only get the latest backup for each database. OnlyLatestPerDatabase *bool }
LongTermRetentionBackupsClientListByResourceGroupDatabaseOptions contains the optional parameters for the LongTermRetentionBackupsClient.ListByResourceGroupDatabase method.
type LongTermRetentionBackupsClientListByResourceGroupDatabaseResponse ¶ added in v0.3.0
type LongTermRetentionBackupsClientListByResourceGroupDatabaseResponse struct {
LongTermRetentionBackupListResult
}
LongTermRetentionBackupsClientListByResourceGroupDatabaseResponse contains the response from method LongTermRetentionBackupsClient.ListByResourceGroupDatabase.
type LongTermRetentionBackupsClientListByResourceGroupLocationOptions ¶ added in v0.3.0
type LongTermRetentionBackupsClientListByResourceGroupLocationOptions struct { // Whether to query against just live databases, just deleted databases, or all databases. DatabaseState *DatabaseState // Whether or not to only get the latest backup for each database. OnlyLatestPerDatabase *bool }
LongTermRetentionBackupsClientListByResourceGroupLocationOptions contains the optional parameters for the LongTermRetentionBackupsClient.ListByResourceGroupLocation method.
type LongTermRetentionBackupsClientListByResourceGroupLocationResponse ¶ added in v0.3.0
type LongTermRetentionBackupsClientListByResourceGroupLocationResponse struct {
LongTermRetentionBackupListResult
}
LongTermRetentionBackupsClientListByResourceGroupLocationResponse contains the response from method LongTermRetentionBackupsClient.ListByResourceGroupLocation.
type LongTermRetentionBackupsClientListByResourceGroupServerOptions ¶ added in v0.3.0
type LongTermRetentionBackupsClientListByResourceGroupServerOptions struct { // Whether to query against just live databases, just deleted databases, or all databases. DatabaseState *DatabaseState // Whether or not to only get the latest backup for each database. OnlyLatestPerDatabase *bool }
LongTermRetentionBackupsClientListByResourceGroupServerOptions contains the optional parameters for the LongTermRetentionBackupsClient.ListByResourceGroupServer method.
type LongTermRetentionBackupsClientListByResourceGroupServerResponse ¶ added in v0.3.0
type LongTermRetentionBackupsClientListByResourceGroupServerResponse struct {
LongTermRetentionBackupListResult
}
LongTermRetentionBackupsClientListByResourceGroupServerResponse contains the response from method LongTermRetentionBackupsClient.ListByResourceGroupServer.
type LongTermRetentionBackupsClientListByServerOptions ¶ added in v0.3.0
type LongTermRetentionBackupsClientListByServerOptions struct { // Whether to query against just live databases, just deleted databases, or all databases. DatabaseState *DatabaseState // Whether or not to only get the latest backup for each database. OnlyLatestPerDatabase *bool }
LongTermRetentionBackupsClientListByServerOptions contains the optional parameters for the LongTermRetentionBackupsClient.ListByServer method.
type LongTermRetentionBackupsClientListByServerResponse ¶ added in v0.3.0
type LongTermRetentionBackupsClientListByServerResponse struct {
LongTermRetentionBackupListResult
}
LongTermRetentionBackupsClientListByServerResponse contains the response from method LongTermRetentionBackupsClient.ListByServer.
type LongTermRetentionBackupsClientUpdateByResourceGroupResponse ¶ added in v0.3.0
type LongTermRetentionBackupsClientUpdateByResourceGroupResponse struct {
LongTermRetentionBackupOperationResult
}
LongTermRetentionBackupsClientUpdateByResourceGroupResponse contains the response from method LongTermRetentionBackupsClient.UpdateByResourceGroup.
type LongTermRetentionBackupsClientUpdateResponse ¶ added in v0.3.0
type LongTermRetentionBackupsClientUpdateResponse struct {
LongTermRetentionBackupOperationResult
}
LongTermRetentionBackupsClientUpdateResponse contains the response from method LongTermRetentionBackupsClient.Update.
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) (*armruntime.Poller[LongTermRetentionManagedInstanceBackupsClientDeleteResponse], error)
BeginDelete - Deletes a long term retention backup. If the operation fails it returns an *azcore.ResponseError type. 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupDelete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLongTermRetentionManagedInstanceBackupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<location-name>", "<managed-instance-name>", "<database-name>", "<backup-name>", &armsql.LongTermRetentionManagedInstanceBackupsClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*LongTermRetentionManagedInstanceBackupsClient) BeginDeleteByResourceGroup ¶
func (client *LongTermRetentionManagedInstanceBackupsClient) BeginDeleteByResourceGroup(ctx context.Context, resourceGroupName string, locationName string, managedInstanceName string, databaseName string, backupName string, options *LongTermRetentionManagedInstanceBackupsClientBeginDeleteByResourceGroupOptions) (*armruntime.Poller[LongTermRetentionManagedInstanceBackupsClientDeleteByResourceGroupResponse], error)
BeginDeleteByResourceGroup - Deletes a long term retention backup. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupDelete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLongTermRetentionManagedInstanceBackupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDeleteByResourceGroup(ctx, "<resource-group-name>", "<location-name>", "<managed-instance-name>", "<database-name>", "<backup-name>", &armsql.LongTermRetentionManagedInstanceBackupsClientBeginDeleteByResourceGroupOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
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. 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLongTermRetentionManagedInstanceBackupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<location-name>", "<managed-instance-name>", "<database-name>", "<backup-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLongTermRetentionManagedInstanceBackupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.GetByResourceGroup(ctx, "<resource-group-name>", "<location-name>", "<managed-instance-name>", "<database-name>", "<backup-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*LongTermRetentionManagedInstanceBackupsClient) ListByDatabase ¶
func (client *LongTermRetentionManagedInstanceBackupsClient) ListByDatabase(locationName string, managedInstanceName string, databaseName string, options *LongTermRetentionManagedInstanceBackupsClientListByDatabaseOptions) *runtime.Pager[LongTermRetentionManagedInstanceBackupsClientListByDatabaseResponse]
ListByDatabase - Lists all long term retention backups for a managed database. If the operation fails it returns an *azcore.ResponseError type. 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLongTermRetentionManagedInstanceBackupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<location-name>", "<managed-instance-name>", "<database-name>", &armsql.LongTermRetentionManagedInstanceBackupsClientListByDatabaseOptions{OnlyLatestPerDatabase: nil, DatabaseState: nil, }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*LongTermRetentionManagedInstanceBackupsClient) ListByInstance ¶
func (client *LongTermRetentionManagedInstanceBackupsClient) ListByInstance(locationName string, managedInstanceName string, options *LongTermRetentionManagedInstanceBackupsClientListByInstanceOptions) *runtime.Pager[LongTermRetentionManagedInstanceBackupsClientListByInstanceResponse]
ListByInstance - Lists the long term retention backups for a given managed instance. If the operation fails it returns an *azcore.ResponseError type. locationName - The location of the database managedInstanceName - The name of the managed instance. options - LongTermRetentionManagedInstanceBackupsClientListByInstanceOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.ListByInstance method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLongTermRetentionManagedInstanceBackupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByInstance("<location-name>", "<managed-instance-name>", &armsql.LongTermRetentionManagedInstanceBackupsClientListByInstanceOptions{OnlyLatestPerDatabase: nil, DatabaseState: nil, }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*LongTermRetentionManagedInstanceBackupsClient) ListByLocation ¶
func (client *LongTermRetentionManagedInstanceBackupsClient) ListByLocation(locationName string, options *LongTermRetentionManagedInstanceBackupsClientListByLocationOptions) *runtime.Pager[LongTermRetentionManagedInstanceBackupsClientListByLocationResponse]
ListByLocation - Lists the long term retention backups for managed databases in a given location. If the operation fails it returns an *azcore.ResponseError type. locationName - The location of the database. options - LongTermRetentionManagedInstanceBackupsClientListByLocationOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.ListByLocation method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByLocation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLongTermRetentionManagedInstanceBackupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByLocation("<location-name>", &armsql.LongTermRetentionManagedInstanceBackupsClientListByLocationOptions{OnlyLatestPerDatabase: nil, DatabaseState: nil, }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupDatabase ¶
func (client *LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupDatabase(resourceGroupName string, locationName string, managedInstanceName string, databaseName string, options *LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseOptions) *runtime.Pager[LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseResponse]
ListByResourceGroupDatabase - Lists all long term retention backups for a managed database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByResourceGroupDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLongTermRetentionManagedInstanceBackupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByResourceGroupDatabase("<resource-group-name>", "<location-name>", "<managed-instance-name>", "<database-name>", &armsql.LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseOptions{OnlyLatestPerDatabase: nil, DatabaseState: nil, }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupInstance ¶
func (client *LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupInstance(resourceGroupName string, locationName string, managedInstanceName string, options *LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceOptions) *runtime.Pager[LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceResponse]
ListByResourceGroupInstance - Lists the long term retention backups for a given managed instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByResourceGroupInstance method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLongTermRetentionManagedInstanceBackupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByResourceGroupInstance("<resource-group-name>", "<location-name>", "<managed-instance-name>", &armsql.LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceOptions{OnlyLatestPerDatabase: nil, DatabaseState: nil, }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupLocation ¶
func (client *LongTermRetentionManagedInstanceBackupsClient) ListByResourceGroupLocation(resourceGroupName string, locationName string, options *LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationOptions) *runtime.Pager[LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationResponse]
ListByResourceGroupLocation - Lists the long term retention backups for managed databases in a given location. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByResourceGroupLocation method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByLocation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLongTermRetentionManagedInstanceBackupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByResourceGroupLocation("<resource-group-name>", "<location-name>", &armsql.LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationOptions{OnlyLatestPerDatabase: nil, DatabaseState: nil, }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type LongTermRetentionManagedInstanceBackupsClientBeginDeleteByResourceGroupOptions ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientBeginDeleteByResourceGroupOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LongTermRetentionManagedInstanceBackupsClientBeginDeleteByResourceGroupOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.BeginDeleteByResourceGroup method.
type LongTermRetentionManagedInstanceBackupsClientBeginDeleteOptions ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LongTermRetentionManagedInstanceBackupsClientBeginDeleteOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.BeginDelete method.
type LongTermRetentionManagedInstanceBackupsClientDeleteByResourceGroupResponse ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientDeleteByResourceGroupResponse struct { }
LongTermRetentionManagedInstanceBackupsClientDeleteByResourceGroupResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.DeleteByResourceGroup.
type LongTermRetentionManagedInstanceBackupsClientDeleteResponse ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientDeleteResponse struct { }
LongTermRetentionManagedInstanceBackupsClientDeleteResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.Delete.
type LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupOptions ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupOptions struct { }
LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.GetByResourceGroup method.
type LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupResponse ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupResponse struct {
ManagedInstanceLongTermRetentionBackup
}
LongTermRetentionManagedInstanceBackupsClientGetByResourceGroupResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.GetByResourceGroup.
type LongTermRetentionManagedInstanceBackupsClientGetOptions ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientGetOptions struct { }
LongTermRetentionManagedInstanceBackupsClientGetOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.Get method.
type LongTermRetentionManagedInstanceBackupsClientGetResponse ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientGetResponse struct {
ManagedInstanceLongTermRetentionBackup
}
LongTermRetentionManagedInstanceBackupsClientGetResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.Get.
type LongTermRetentionManagedInstanceBackupsClientListByDatabaseOptions ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientListByDatabaseOptions struct { // Whether to query against just live databases, just deleted databases, or all databases. DatabaseState *DatabaseState // Whether or not to only get the latest backup for each database. OnlyLatestPerDatabase *bool }
LongTermRetentionManagedInstanceBackupsClientListByDatabaseOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.ListByDatabase method.
type LongTermRetentionManagedInstanceBackupsClientListByDatabaseResponse ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientListByDatabaseResponse struct {
ManagedInstanceLongTermRetentionBackupListResult
}
LongTermRetentionManagedInstanceBackupsClientListByDatabaseResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.ListByDatabase.
type LongTermRetentionManagedInstanceBackupsClientListByInstanceOptions ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientListByInstanceOptions struct { // Whether to query against just live databases, just deleted databases, or all databases. DatabaseState *DatabaseState // Whether or not to only get the latest backup for each database. OnlyLatestPerDatabase *bool }
LongTermRetentionManagedInstanceBackupsClientListByInstanceOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.ListByInstance method.
type LongTermRetentionManagedInstanceBackupsClientListByInstanceResponse ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientListByInstanceResponse struct {
ManagedInstanceLongTermRetentionBackupListResult
}
LongTermRetentionManagedInstanceBackupsClientListByInstanceResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.ListByInstance.
type LongTermRetentionManagedInstanceBackupsClientListByLocationOptions ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientListByLocationOptions struct { // Whether to query against just live databases, just deleted databases, or all databases. DatabaseState *DatabaseState // Whether or not to only get the latest backup for each database. OnlyLatestPerDatabase *bool }
LongTermRetentionManagedInstanceBackupsClientListByLocationOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.ListByLocation method.
type LongTermRetentionManagedInstanceBackupsClientListByLocationResponse ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientListByLocationResponse struct {
ManagedInstanceLongTermRetentionBackupListResult
}
LongTermRetentionManagedInstanceBackupsClientListByLocationResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.ListByLocation.
type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseOptions ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseOptions struct { // Whether to query against just live databases, just deleted databases, or all databases. DatabaseState *DatabaseState // Whether or not to only get the latest backup for each database. OnlyLatestPerDatabase *bool }
LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.ListByResourceGroupDatabase method.
type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseResponse ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseResponse struct {
ManagedInstanceLongTermRetentionBackupListResult
}
LongTermRetentionManagedInstanceBackupsClientListByResourceGroupDatabaseResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.ListByResourceGroupDatabase.
type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceOptions ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceOptions struct { // Whether to query against just live databases, just deleted databases, or all databases. DatabaseState *DatabaseState // Whether or not to only get the latest backup for each database. OnlyLatestPerDatabase *bool }
LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.ListByResourceGroupInstance method.
type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceResponse ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceResponse struct {
ManagedInstanceLongTermRetentionBackupListResult
}
LongTermRetentionManagedInstanceBackupsClientListByResourceGroupInstanceResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.ListByResourceGroupInstance.
type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationOptions ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationOptions struct { // Whether to query against just live databases, just deleted databases, or all databases. DatabaseState *DatabaseState // Whether or not to only get the latest backup for each database. OnlyLatestPerDatabase *bool }
LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationOptions contains the optional parameters for the LongTermRetentionManagedInstanceBackupsClient.ListByResourceGroupLocation method.
type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationResponse ¶ added in v0.3.0
type LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationResponse struct {
ManagedInstanceLongTermRetentionBackupListResult
}
LongTermRetentionManagedInstanceBackupsClientListByResourceGroupLocationResponse contains the response from method LongTermRetentionManagedInstanceBackupsClient.ListByResourceGroupLocation.
type LongTermRetentionOperationResultProperties ¶
type LongTermRetentionOperationResultProperties struct { // READ-ONLY; Source backup resource id FromBackupResourceID *string `json:"fromBackupResourceId,omitempty" azure:"ro"` // READ-ONLY; Progress message Message *string `json:"message,omitempty" azure:"ro"` // READ-ONLY; Operation type. OperationType *string `json:"operationType,omitempty" azure:"ro"` // READ-ONLY; Request Id. RequestID *string `json:"requestId,omitempty" azure:"ro"` // READ-ONLY; Operation status Status *string `json:"status,omitempty" azure:"ro"` // READ-ONLY; The storage redundancy type of the copied backup TargetBackupStorageRedundancy *BackupStorageRedundancy `json:"targetBackupStorageRedundancy,omitempty" azure:"ro"` // READ-ONLY; Target backup resource id ToBackupResourceID *string `json:"toBackupResourceId,omitempty" azure:"ro"` }
LongTermRetentionOperationResultProperties - Contains the operation result properties for long term retention backup operation.
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) (*armruntime.Poller[LongTermRetentionPoliciesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Sets a database's long term retention policy. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/LongTermRetentionPolicyCreateOrUpdate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLongTermRetentionPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<database-name>", armsql.LongTermRetentionPolicyNameDefault, armsql.LongTermRetentionPolicy{ Properties: &armsql.BaseLongTermRetentionPolicyProperties{ MonthlyRetention: to.Ptr("<monthly-retention>"), WeekOfYear: to.Ptr[int32](5), WeeklyRetention: to.Ptr("<weekly-retention>"), YearlyRetention: to.Ptr("<yearly-retention>"), }, }, &armsql.LongTermRetentionPoliciesClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/LongTermRetentionPolicyGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLongTermRetentionPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", armsql.LongTermRetentionPolicyNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*LongTermRetentionPoliciesClient) ListByDatabase ¶
func (client *LongTermRetentionPoliciesClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, options *LongTermRetentionPoliciesClientListByDatabaseOptions) *runtime.Pager[LongTermRetentionPoliciesClientListByDatabaseResponse]
ListByDatabase - Gets a database's long term retention policy. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/LongTermRetentionPolicyListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewLongTermRetentionPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<server-name>", "<database-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type LongTermRetentionPoliciesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type LongTermRetentionPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
LongTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the LongTermRetentionPoliciesClient.BeginCreateOrUpdate method.
type LongTermRetentionPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type LongTermRetentionPoliciesClientCreateOrUpdateResponse struct {
LongTermRetentionPolicy
}
LongTermRetentionPoliciesClientCreateOrUpdateResponse contains the response from method LongTermRetentionPoliciesClient.CreateOrUpdate.
type LongTermRetentionPoliciesClientGetOptions ¶ added in v0.3.0
type LongTermRetentionPoliciesClientGetOptions struct { }
LongTermRetentionPoliciesClientGetOptions contains the optional parameters for the LongTermRetentionPoliciesClient.Get method.
type LongTermRetentionPoliciesClientGetResponse ¶ added in v0.3.0
type LongTermRetentionPoliciesClientGetResponse struct {
LongTermRetentionPolicy
}
LongTermRetentionPoliciesClientGetResponse contains the response from method LongTermRetentionPoliciesClient.Get.
type LongTermRetentionPoliciesClientListByDatabaseOptions ¶ added in v0.3.0
type LongTermRetentionPoliciesClientListByDatabaseOptions struct { }
LongTermRetentionPoliciesClientListByDatabaseOptions contains the optional parameters for the LongTermRetentionPoliciesClient.ListByDatabase method.
type LongTermRetentionPoliciesClientListByDatabaseResponse ¶ added in v0.3.0
type LongTermRetentionPoliciesClientListByDatabaseResponse struct {
LongTermRetentionPolicyListResult
}
LongTermRetentionPoliciesClientListByDatabaseResponse contains the response from method LongTermRetentionPoliciesClient.ListByDatabase.
type LongTermRetentionPolicy ¶
type LongTermRetentionPolicy struct { // Resource properties. Properties *BaseLongTermRetentionPolicyProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
LongTermRetentionPolicy - A long term retention policy.
type LongTermRetentionPolicyListResult ¶
type LongTermRetentionPolicyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*LongTermRetentionPolicy `json:"value,omitempty" azure:"ro"` }
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.
type LongTermRetentionPolicyName ¶
type LongTermRetentionPolicyName string
const (
LongTermRetentionPolicyNameDefault LongTermRetentionPolicyName = "default"
)
func PossibleLongTermRetentionPolicyNameValues ¶
func PossibleLongTermRetentionPolicyNameValues() []LongTermRetentionPolicyName
PossibleLongTermRetentionPolicyNameValues returns the possible values for the LongTermRetentionPolicyName const type.
type MaintenanceConfigurationCapability ¶
type MaintenanceConfigurationCapability struct { // The reason for the capability not being available. Reason *string `json:"reason,omitempty"` // READ-ONLY; Maintenance configuration name Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The status of the capability. Status *CapabilityStatus `json:"status,omitempty" azure:"ro"` // READ-ONLY; Whether or not zone redundancy is supported for the maintenance configuration. ZoneRedundant *bool `json:"zoneRedundant,omitempty" azure:"ro"` }
MaintenanceConfigurationCapability - The maintenance configuration capability
type MaintenanceWindowOptions ¶
type MaintenanceWindowOptions struct { // Resource properties. Properties *MaintenanceWindowOptionsProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
MaintenanceWindowOptions - Maintenance window options.
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetMaintenanceWindowOptions.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewMaintenanceWindowOptionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<maintenance-window-options-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
type MaintenanceWindowOptionsClientGetOptions ¶ added in v0.3.0
type MaintenanceWindowOptionsClientGetOptions struct { }
MaintenanceWindowOptionsClientGetOptions contains the optional parameters for the MaintenanceWindowOptionsClient.Get method.
type MaintenanceWindowOptionsClientGetResponse ¶ added in v0.3.0
type MaintenanceWindowOptionsClientGetResponse struct {
MaintenanceWindowOptions
}
MaintenanceWindowOptionsClientGetResponse contains the response from method MaintenanceWindowOptionsClient.Get.
type MaintenanceWindowOptionsProperties ¶
type MaintenanceWindowOptionsProperties struct { // Whether we allow multiple maintenance windows per cycle. AllowMultipleMaintenanceWindowsPerCycle *bool `json:"allowMultipleMaintenanceWindowsPerCycle,omitempty"` // Default duration for maintenance window. DefaultDurationInMinutes *int32 `json:"defaultDurationInMinutes,omitempty"` // Whether maintenance windows are enabled for the database. IsEnabled *bool `json:"isEnabled,omitempty"` // Available maintenance cycles e.g. {Saturday, 0, 4860}, {Wednesday, 0, 2460}. MaintenanceWindowCycles []*MaintenanceWindowTimeRange `json:"maintenanceWindowCycles,omitempty"` // Minimum number of maintenance windows cycles to be set on the database. MinCycles *int32 `json:"minCycles,omitempty"` // Minimum duration of maintenance window. MinDurationInMinutes *int32 `json:"minDurationInMinutes,omitempty"` // Time granularity in minutes for maintenance windows. TimeGranularityInMinutes *int32 `json:"timeGranularityInMinutes,omitempty"` }
MaintenanceWindowOptionsProperties - Maintenance window options properties.
func (MaintenanceWindowOptionsProperties) MarshalJSON ¶
func (m MaintenanceWindowOptionsProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MaintenanceWindowOptionsProperties.
type MaintenanceWindowTimeRange ¶
type MaintenanceWindowTimeRange struct { // Day of maintenance window. DayOfWeek *DayOfWeek `json:"dayOfWeek,omitempty"` // Duration of maintenance window in minutes. Duration *string `json:"duration,omitempty"` // Start time minutes offset from 12am. StartTime *string `json:"startTime,omitempty"` }
MaintenanceWindowTimeRange - Maintenance window time range.
type MaintenanceWindows ¶
type MaintenanceWindows struct { // Resource properties. Properties *MaintenanceWindowsProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
MaintenanceWindows - Maintenance windows.
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateMaintenanceWindows.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewMaintenanceWindowsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.CreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<maintenance-window-name>", armsql.MaintenanceWindows{ Properties: &armsql.MaintenanceWindowsProperties{ TimeRanges: []*armsql.MaintenanceWindowTimeRange{ { DayOfWeek: to.Ptr(armsql.DayOfWeekSaturday), Duration: to.Ptr("<duration>"), StartTime: to.Ptr("<start-time>"), }}, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetMaintenanceWindows.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewMaintenanceWindowsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<maintenance-window-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
type MaintenanceWindowsClientCreateOrUpdateOptions ¶ added in v0.3.0
type MaintenanceWindowsClientCreateOrUpdateOptions struct { }
MaintenanceWindowsClientCreateOrUpdateOptions contains the optional parameters for the MaintenanceWindowsClient.CreateOrUpdate method.
type MaintenanceWindowsClientCreateOrUpdateResponse ¶ added in v0.3.0
type MaintenanceWindowsClientCreateOrUpdateResponse struct { }
MaintenanceWindowsClientCreateOrUpdateResponse contains the response from method MaintenanceWindowsClient.CreateOrUpdate.
type MaintenanceWindowsClientGetOptions ¶ added in v0.3.0
type MaintenanceWindowsClientGetOptions struct { }
MaintenanceWindowsClientGetOptions contains the optional parameters for the MaintenanceWindowsClient.Get method.
type MaintenanceWindowsClientGetResponse ¶ added in v0.3.0
type MaintenanceWindowsClientGetResponse struct {
MaintenanceWindows
}
MaintenanceWindowsClientGetResponse contains the response from method MaintenanceWindowsClient.Get.
type MaintenanceWindowsProperties ¶
type MaintenanceWindowsProperties struct {
TimeRanges []*MaintenanceWindowTimeRange `json:"timeRanges,omitempty"`
}
MaintenanceWindowsProperties - Maintenance windows resource properties.
func (MaintenanceWindowsProperties) MarshalJSON ¶
func (m MaintenanceWindowsProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller 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) (*armruntime.Poller[ManagedBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Updates a managed database's short term retention policy. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/UpdateManagedShortTermRetentionPolicy.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedBackupShortTermRetentionPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", armsql.ManagedShortTermRetentionPolicyNameDefault, armsql.ManagedBackupShortTermRetentionPolicy{ Properties: &armsql.ManagedBackupShortTermRetentionPolicyProperties{ RetentionDays: to.Ptr[int32](14), }, }, &armsql.ManagedBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedBackupShortTermRetentionPoliciesClient) BeginUpdate ¶
func (client *ManagedBackupShortTermRetentionPoliciesClient) BeginUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, policyName ManagedShortTermRetentionPolicyName, parameters ManagedBackupShortTermRetentionPolicy, options *ManagedBackupShortTermRetentionPoliciesClientBeginUpdateOptions) (*armruntime.Poller[ManagedBackupShortTermRetentionPoliciesClientUpdateResponse], error)
BeginUpdate - Updates a managed database's short term retention policy. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/UpdateManagedShortTermRetentionPolicy.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedBackupShortTermRetentionPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginUpdate(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", armsql.ManagedShortTermRetentionPolicyNameDefault, armsql.ManagedBackupShortTermRetentionPolicy{ Properties: &armsql.ManagedBackupShortTermRetentionPolicyProperties{ RetentionDays: to.Ptr[int32](14), }, }, &armsql.ManagedBackupShortTermRetentionPoliciesClientBeginUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetManagedShortTermRetentionPolicy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedBackupShortTermRetentionPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", armsql.ManagedShortTermRetentionPolicyNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedBackupShortTermRetentionPoliciesClient) ListByDatabase ¶
func (client *ManagedBackupShortTermRetentionPoliciesClient) ListByDatabase(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedBackupShortTermRetentionPoliciesClientListByDatabaseOptions) *runtime.Pager[ManagedBackupShortTermRetentionPoliciesClientListByDatabaseResponse]
ListByDatabase - Gets a managed database's short term retention policy list. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetListManagedShortTermRetentionPolicy.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedBackupShortTermRetentionPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<managed-instance-name>", "<database-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ManagedBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedBackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate method.
type ManagedBackupShortTermRetentionPoliciesClientBeginUpdateOptions ¶ added in v0.3.0
type ManagedBackupShortTermRetentionPoliciesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedBackupShortTermRetentionPoliciesClientBeginUpdateOptions contains the optional parameters for the ManagedBackupShortTermRetentionPoliciesClient.BeginUpdate method.
type ManagedBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse struct {
ManagedBackupShortTermRetentionPolicy
}
ManagedBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse contains the response from method ManagedBackupShortTermRetentionPoliciesClient.CreateOrUpdate.
type ManagedBackupShortTermRetentionPoliciesClientGetOptions ¶ added in v0.3.0
type ManagedBackupShortTermRetentionPoliciesClientGetOptions struct { }
ManagedBackupShortTermRetentionPoliciesClientGetOptions contains the optional parameters for the ManagedBackupShortTermRetentionPoliciesClient.Get method.
type ManagedBackupShortTermRetentionPoliciesClientGetResponse ¶ added in v0.3.0
type ManagedBackupShortTermRetentionPoliciesClientGetResponse struct {
ManagedBackupShortTermRetentionPolicy
}
ManagedBackupShortTermRetentionPoliciesClientGetResponse contains the response from method ManagedBackupShortTermRetentionPoliciesClient.Get.
type ManagedBackupShortTermRetentionPoliciesClientListByDatabaseOptions ¶ added in v0.3.0
type ManagedBackupShortTermRetentionPoliciesClientListByDatabaseOptions struct { }
ManagedBackupShortTermRetentionPoliciesClientListByDatabaseOptions contains the optional parameters for the ManagedBackupShortTermRetentionPoliciesClient.ListByDatabase method.
type ManagedBackupShortTermRetentionPoliciesClientListByDatabaseResponse ¶ added in v0.3.0
type ManagedBackupShortTermRetentionPoliciesClientListByDatabaseResponse struct {
ManagedBackupShortTermRetentionPolicyListResult
}
ManagedBackupShortTermRetentionPoliciesClientListByDatabaseResponse contains the response from method ManagedBackupShortTermRetentionPoliciesClient.ListByDatabase.
type ManagedBackupShortTermRetentionPoliciesClientUpdateResponse ¶ added in v0.3.0
type ManagedBackupShortTermRetentionPoliciesClientUpdateResponse struct {
ManagedBackupShortTermRetentionPolicy
}
ManagedBackupShortTermRetentionPoliciesClientUpdateResponse contains the response from method ManagedBackupShortTermRetentionPoliciesClient.Update.
type ManagedBackupShortTermRetentionPolicy ¶
type ManagedBackupShortTermRetentionPolicy struct { // Resource properties. Properties *ManagedBackupShortTermRetentionPolicyProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ManagedBackupShortTermRetentionPolicy - A short term retention policy.
func (ManagedBackupShortTermRetentionPolicy) MarshalJSON ¶
func (m ManagedBackupShortTermRetentionPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedBackupShortTermRetentionPolicy.
type ManagedBackupShortTermRetentionPolicyListResult ¶
type ManagedBackupShortTermRetentionPolicyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ManagedBackupShortTermRetentionPolicy `json:"value,omitempty" azure:"ro"` }
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.
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 `json:"retentionDays,omitempty"` }
ManagedBackupShortTermRetentionPolicyProperties - Properties of a short term retention policy
type ManagedDatabase ¶
type ManagedDatabase struct { // REQUIRED; Resource location. Location *string `json:"location,omitempty"` // Resource properties. Properties *ManagedDatabaseProperties `json:"properties,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ManagedDatabase - A managed database resource.
func (ManagedDatabase) MarshalJSON ¶
func (m ManagedDatabase) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedDatabase.
type ManagedDatabaseColumnsClient ¶
type ManagedDatabaseColumnsClient struct {
// contains filtered or unexported fields
}
ManagedDatabaseColumnsClient contains the methods for the ManagedDatabaseColumns group. Don't use this type directly, use NewManagedDatabaseColumnsClient() instead.
func NewManagedDatabaseColumnsClient ¶
func NewManagedDatabaseColumnsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseColumnsClient, error)
NewManagedDatabaseColumnsClient creates a new instance of ManagedDatabaseColumnsClient with the specified values. subscriptionID - The subscription ID that identifies an Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ManagedDatabaseColumnsClient) Get ¶
func (client *ManagedDatabaseColumnsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, columnName string, options *ManagedDatabaseColumnsClientGetOptions) (ManagedDatabaseColumnsClientGetResponse, error)
Get - Get managed database column If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseColumnGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseColumnsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", "<schema-name>", "<table-name>", "<column-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedDatabaseColumnsClient) ListByDatabase ¶
func (client *ManagedDatabaseColumnsClient) ListByDatabase(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseColumnsClientListByDatabaseOptions) *runtime.Pager[ManagedDatabaseColumnsClientListByDatabaseResponse]
ListByDatabase - List managed database columns If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedColumnsListByDatabaseMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseColumnsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<managed-instance-name>", "<database-name>", &armsql.ManagedDatabaseColumnsClientListByDatabaseOptions{Schema: []string{ "dbo"}, Table: []string{ "customer", "address"}, Column: []string{ "username"}, OrderBy: []string{ "schema asc", "table", "column desc"}, Skiptoken: nil, }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*ManagedDatabaseColumnsClient) ListByTable ¶
func (client *ManagedDatabaseColumnsClient) ListByTable(resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, options *ManagedDatabaseColumnsClientListByTableOptions) *runtime.Pager[ManagedDatabaseColumnsClientListByTableResponse]
ListByTable - List managed database columns If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByTable method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseColumnListByTable.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseColumnsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByTable("<resource-group-name>", "<managed-instance-name>", "<database-name>", "<schema-name>", "<table-name>", &armsql.ManagedDatabaseColumnsClientListByTableOptions{Filter: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ManagedDatabaseColumnsClientGetOptions ¶ added in v0.3.0
type ManagedDatabaseColumnsClientGetOptions struct { }
ManagedDatabaseColumnsClientGetOptions contains the optional parameters for the ManagedDatabaseColumnsClient.Get method.
type ManagedDatabaseColumnsClientGetResponse ¶ added in v0.3.0
type ManagedDatabaseColumnsClientGetResponse struct {
DatabaseColumn
}
ManagedDatabaseColumnsClientGetResponse contains the response from method ManagedDatabaseColumnsClient.Get.
type ManagedDatabaseColumnsClientListByDatabaseOptions ¶ added in v0.3.0
type ManagedDatabaseColumnsClientListByDatabaseOptions struct { Column []string OrderBy []string Schema []string // An opaque token that identifies a starting point in the collection. Skiptoken *string Table []string }
ManagedDatabaseColumnsClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseColumnsClient.ListByDatabase method.
type ManagedDatabaseColumnsClientListByDatabaseResponse ¶ added in v0.3.0
type ManagedDatabaseColumnsClientListByDatabaseResponse struct {
DatabaseColumnListResult
}
ManagedDatabaseColumnsClientListByDatabaseResponse contains the response from method ManagedDatabaseColumnsClient.ListByDatabase.
type ManagedDatabaseColumnsClientListByTableOptions ¶ added in v0.3.0
type ManagedDatabaseColumnsClientListByTableOptions struct { // An OData filter expression that filters elements in the collection. Filter *string }
ManagedDatabaseColumnsClientListByTableOptions contains the optional parameters for the ManagedDatabaseColumnsClient.ListByTable method.
type ManagedDatabaseColumnsClientListByTableResponse ¶ added in v0.3.0
type ManagedDatabaseColumnsClientListByTableResponse struct {
DatabaseColumnListResult
}
ManagedDatabaseColumnsClientListByTableResponse contains the response from method ManagedDatabaseColumnsClient.ListByTable.
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 `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ManagedDatabase `json:"value,omitempty" azure:"ro"` }
ManagedDatabaseListResult - A list of managed databases.
func (ManagedDatabaseListResult) MarshalJSON ¶
func (m ManagedDatabaseListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedDatabaseListResult.
type ManagedDatabaseProperties ¶
type ManagedDatabaseProperties struct { // Whether to auto complete restore of this managed database. AutoCompleteRestore *bool `json:"autoCompleteRestore,omitempty"` // Collation of the metadata catalog. CatalogCollation *CatalogCollationType `json:"catalogCollation,omitempty"` // Collation of the managed database. Collation *string `json:"collation,omitempty"` // 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 `json:"createMode,omitempty"` // Last backup file name for restore of this managed database. LastBackupName *string `json:"lastBackupName,omitempty"` // The name of the Long Term Retention backup to be used for restore of this managed database. LongTermRetentionBackupResourceID *string `json:"longTermRetentionBackupResourceId,omitempty"` // The resource identifier of the recoverable database associated with create operation of this database. RecoverableDatabaseID *string `json:"recoverableDatabaseId,omitempty"` // The restorable dropped database resource id to restore when creating this database. RestorableDroppedDatabaseID *string `json:"restorableDroppedDatabaseId,omitempty"` // 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 `json:"restorePointInTime,omitempty"` // The resource identifier of the source database associated with create operation of this database. SourceDatabaseID *string `json:"sourceDatabaseId,omitempty"` // Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token. StorageContainerSasToken *string `json:"storageContainerSasToken,omitempty"` // 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 `json:"storageContainerUri,omitempty"` // READ-ONLY; Creation date of the database. CreationDate *time.Time `json:"creationDate,omitempty" azure:"ro"` // READ-ONLY; Geo paired region. DefaultSecondaryLocation *string `json:"defaultSecondaryLocation,omitempty" azure:"ro"` // READ-ONLY; Earliest restore point in time for point in time restore. EarliestRestorePoint *time.Time `json:"earliestRestorePoint,omitempty" azure:"ro"` // READ-ONLY; Instance Failover Group resource identifier that this managed database belongs to. FailoverGroupID *string `json:"failoverGroupId,omitempty" azure:"ro"` // READ-ONLY; Status of the database. Status *ManagedDatabaseStatus `json:"status,omitempty" azure:"ro"` }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceQueryGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseQueriesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", "<query-id>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedDatabaseQueriesClient) ListByQuery ¶
func (client *ManagedDatabaseQueriesClient) ListByQuery(resourceGroupName string, managedInstanceName string, databaseName string, queryID string, options *ManagedDatabaseQueriesClientListByQueryOptions) *runtime.Pager[ManagedDatabaseQueriesClientListByQueryResponse]
ListByQuery - Get query execution statistics by query id. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByQuery method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceQueryStatisticsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseQueriesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByQuery("<resource-group-name>", "<managed-instance-name>", "<database-name>", "<query-id>", &armsql.ManagedDatabaseQueriesClientListByQueryOptions{StartTime: nil, EndTime: nil, Interval: nil, }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ManagedDatabaseQueriesClientGetOptions ¶ added in v0.3.0
type ManagedDatabaseQueriesClientGetOptions struct { }
ManagedDatabaseQueriesClientGetOptions contains the optional parameters for the ManagedDatabaseQueriesClient.Get method.
type ManagedDatabaseQueriesClientGetResponse ¶ added in v0.3.0
type ManagedDatabaseQueriesClientGetResponse struct {
ManagedInstanceQuery
}
ManagedDatabaseQueriesClientGetResponse contains the response from method ManagedDatabaseQueriesClient.Get.
type ManagedDatabaseQueriesClientListByQueryOptions ¶ added in v0.3.0
type ManagedDatabaseQueriesClientListByQueryOptions struct { // End time for observed period. EndTime *string // The time step to be used to summarize the metric values. Interval *QueryTimeGrainType // Start time for observed period. StartTime *string }
ManagedDatabaseQueriesClientListByQueryOptions contains the optional parameters for the ManagedDatabaseQueriesClient.ListByQuery method.
type ManagedDatabaseQueriesClientListByQueryResponse ¶ added in v0.3.0
type ManagedDatabaseQueriesClientListByQueryResponse struct {
ManagedInstanceQueryStatistics
}
ManagedDatabaseQueriesClientListByQueryResponse contains the response from method ManagedDatabaseQueriesClient.ListByQuery.
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ManagedDatabaseSensitivityLabelsRecommendedUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseRecommendedSensitivityLabelsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Update(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", armsql.RecommendedSensitivityLabelUpdateList{ Operations: []*armsql.RecommendedSensitivityLabelUpdate{ { Properties: &armsql.RecommendedSensitivityLabelUpdateProperties{ Schema: to.Ptr("<schema>"), Column: to.Ptr("<column>"), Op: to.Ptr(armsql.RecommendedSensitivityLabelUpdateKindEnable), Table: to.Ptr("<table>"), }, }, { Properties: &armsql.RecommendedSensitivityLabelUpdateProperties{ Schema: to.Ptr("<schema>"), Column: to.Ptr("<column>"), Op: to.Ptr(armsql.RecommendedSensitivityLabelUpdateKindDisable), Table: to.Ptr("<table>"), }, }, { Properties: &armsql.RecommendedSensitivityLabelUpdateProperties{ Schema: to.Ptr("<schema>"), Column: to.Ptr("<column>"), Op: to.Ptr(armsql.RecommendedSensitivityLabelUpdateKindDisable), Table: to.Ptr("<table>"), }, }}, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
Output:
type ManagedDatabaseRecommendedSensitivityLabelsClientUpdateOptions ¶ added in v0.3.0
type ManagedDatabaseRecommendedSensitivityLabelsClientUpdateOptions struct { }
ManagedDatabaseRecommendedSensitivityLabelsClientUpdateOptions contains the optional parameters for the ManagedDatabaseRecommendedSensitivityLabelsClient.Update method.
type ManagedDatabaseRecommendedSensitivityLabelsClientUpdateResponse ¶ added in v0.3.0
type ManagedDatabaseRecommendedSensitivityLabelsClientUpdateResponse struct { }
ManagedDatabaseRecommendedSensitivityLabelsClientUpdateResponse contains the response from method ManagedDatabaseRecommendedSensitivityLabelsClient.Update.
type ManagedDatabaseRestoreDetailsClient ¶
type ManagedDatabaseRestoreDetailsClient struct {
// contains filtered or unexported fields
}
ManagedDatabaseRestoreDetailsClient contains the methods for the ManagedDatabaseRestoreDetails group. Don't use this type directly, use NewManagedDatabaseRestoreDetailsClient() instead.
func NewManagedDatabaseRestoreDetailsClient ¶
func NewManagedDatabaseRestoreDetailsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseRestoreDetailsClient, error)
NewManagedDatabaseRestoreDetailsClient creates a new instance of ManagedDatabaseRestoreDetailsClient with the specified values. subscriptionID - The subscription ID that identifies an Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ManagedDatabaseRestoreDetailsClient) Get ¶
func (client *ManagedDatabaseRestoreDetailsClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, restoreDetailsName RestoreDetailsName, options *ManagedDatabaseRestoreDetailsClientGetOptions) (ManagedDatabaseRestoreDetailsClientGetResponse, error)
Get - Gets managed database restore details. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseRestoreDetails.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseRestoreDetailsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", armsql.RestoreDetailsNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
type ManagedDatabaseRestoreDetailsClientGetOptions ¶ added in v0.3.0
type ManagedDatabaseRestoreDetailsClientGetOptions struct { }
ManagedDatabaseRestoreDetailsClientGetOptions contains the optional parameters for the ManagedDatabaseRestoreDetailsClient.Get method.
type ManagedDatabaseRestoreDetailsClientGetResponse ¶ added in v0.3.0
type ManagedDatabaseRestoreDetailsClientGetResponse struct {
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 `json:"blockReason,omitempty" azure:"ro"` // READ-ONLY; Current restoring file name. CurrentRestoringFileName *string `json:"currentRestoringFileName,omitempty" azure:"ro"` // READ-ONLY; Last restored file name. LastRestoredFileName *string `json:"lastRestoredFileName,omitempty" azure:"ro"` // READ-ONLY; Last restored file time. LastRestoredFileTime *time.Time `json:"lastRestoredFileTime,omitempty" azure:"ro"` // READ-ONLY; Last uploaded file name. LastUploadedFileName *string `json:"lastUploadedFileName,omitempty" azure:"ro"` // READ-ONLY; Last uploaded file time. LastUploadedFileTime *time.Time `json:"lastUploadedFileTime,omitempty" azure:"ro"` // READ-ONLY; Number of files detected. NumberOfFilesDetected *int64 `json:"numberOfFilesDetected,omitempty" azure:"ro"` // READ-ONLY; Percent completed. PercentCompleted *float64 `json:"percentCompleted,omitempty" azure:"ro"` // READ-ONLY; Restore status. Status *string `json:"status,omitempty" azure:"ro"` // READ-ONLY; List of unrestorable files. UnrestorableFiles []*string `json:"unrestorableFiles,omitempty" azure:"ro"` }
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 `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ManagedDatabaseRestoreDetailsResult - A managed database restore details.
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSchemaGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseSchemasClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", "<schema-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedDatabaseSchemasClient) ListByDatabase ¶
func (client *ManagedDatabaseSchemasClient) ListByDatabase(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseSchemasClientListByDatabaseOptions) *runtime.Pager[ManagedDatabaseSchemasClientListByDatabaseResponse]
ListByDatabase - List managed database schemas If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSchemaListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseSchemasClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<managed-instance-name>", "<database-name>", &armsql.ManagedDatabaseSchemasClientListByDatabaseOptions{Filter: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ManagedDatabaseSchemasClientGetOptions ¶ added in v0.3.0
type ManagedDatabaseSchemasClientGetOptions struct { }
ManagedDatabaseSchemasClientGetOptions contains the optional parameters for the ManagedDatabaseSchemasClient.Get method.
type ManagedDatabaseSchemasClientGetResponse ¶ added in v0.3.0
type ManagedDatabaseSchemasClientGetResponse struct {
DatabaseSchema
}
ManagedDatabaseSchemasClientGetResponse contains the response from method ManagedDatabaseSchemasClient.Get.
type ManagedDatabaseSchemasClientListByDatabaseOptions ¶ added in v0.3.0
type ManagedDatabaseSchemasClientListByDatabaseOptions struct { // An OData filter expression that filters elements in the collection. Filter *string }
ManagedDatabaseSchemasClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseSchemasClient.ListByDatabase method.
type ManagedDatabaseSchemasClientListByDatabaseResponse ¶ added in v0.3.0
type ManagedDatabaseSchemasClientListByDatabaseResponse struct {
DatabaseSchemaListResult
}
ManagedDatabaseSchemasClientListByDatabaseResponse contains the response from method ManagedDatabaseSchemasClient.ListByDatabase.
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. resourceGroupName - 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSecurityAlertCreateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseSecurityAlertPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.CreateOrUpdate(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", 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("<storage-account-access-key>"), StorageEndpoint: to.Ptr("<storage-endpoint>"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSecurityAlertGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseSecurityAlertPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", armsql.SecurityAlertPolicyNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedDatabaseSecurityAlertPoliciesClient) ListByDatabase ¶
func (client *ManagedDatabaseSecurityAlertPoliciesClient) ListByDatabase(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseOptions) *runtime.Pager[ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseResponse]
ListByDatabase - Gets a list of managed database's security alert policies. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSecurityAlertListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseSecurityAlertPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<managed-instance-name>", "<database-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions struct { }
ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateOptions contains the optional parameters for the ManagedDatabaseSecurityAlertPoliciesClient.CreateOrUpdate method.
type ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse struct {
ManagedDatabaseSecurityAlertPolicy
}
ManagedDatabaseSecurityAlertPoliciesClientCreateOrUpdateResponse contains the response from method ManagedDatabaseSecurityAlertPoliciesClient.CreateOrUpdate.
type ManagedDatabaseSecurityAlertPoliciesClientGetOptions ¶ added in v0.3.0
type ManagedDatabaseSecurityAlertPoliciesClientGetOptions struct { }
ManagedDatabaseSecurityAlertPoliciesClientGetOptions contains the optional parameters for the ManagedDatabaseSecurityAlertPoliciesClient.Get method.
type ManagedDatabaseSecurityAlertPoliciesClientGetResponse ¶ added in v0.3.0
type ManagedDatabaseSecurityAlertPoliciesClientGetResponse struct {
ManagedDatabaseSecurityAlertPolicy
}
ManagedDatabaseSecurityAlertPoliciesClientGetResponse contains the response from method ManagedDatabaseSecurityAlertPoliciesClient.Get.
type ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseOptions ¶ added in v0.3.0
type ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseOptions struct { }
ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseSecurityAlertPoliciesClient.ListByDatabase method.
type ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseResponse ¶ added in v0.3.0
type ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseResponse struct {
ManagedDatabaseSecurityAlertPolicyListResult
}
ManagedDatabaseSecurityAlertPoliciesClientListByDatabaseResponse contains the response from method ManagedDatabaseSecurityAlertPoliciesClient.ListByDatabase.
type ManagedDatabaseSecurityAlertPolicy ¶
type ManagedDatabaseSecurityAlertPolicy struct { // Resource properties. Properties *SecurityAlertPolicyProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ManagedDatabaseSecurityAlertPolicy - A managed database security alert policy.
type ManagedDatabaseSecurityAlertPolicyListResult ¶
type ManagedDatabaseSecurityAlertPolicyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ManagedDatabaseSecurityAlertPolicy `json:"value,omitempty" azure:"ro"` }
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.
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) ListByDatabase ¶
func (client *ManagedDatabaseSecurityEventsClient) ListByDatabase(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseSecurityEventsClientListByDatabaseOptions) *runtime.Pager[ManagedDatabaseSecurityEventsClientListByDatabaseResponse]
ListByDatabase - Gets a list of security events. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseSecurityEventsGetMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseSecurityEventsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<managed-instance-name>", "<database-name>", &armsql.ManagedDatabaseSecurityEventsClientListByDatabaseOptions{Filter: to.Ptr("<filter>"), Skip: to.Ptr[int32](0), Top: to.Ptr[int32](1), Skiptoken: to.Ptr("<skiptoken>"), }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ManagedDatabaseSecurityEventsClientListByDatabaseOptions ¶ added in v0.3.0
type ManagedDatabaseSecurityEventsClientListByDatabaseOptions struct { // An OData filter expression that filters elements in the collection. Filter *string // The number of elements in the collection to skip. Skip *int32 // An opaque token that identifies a starting point in the collection. Skiptoken *string // The number of elements to return from the collection. Top *int32 }
ManagedDatabaseSecurityEventsClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseSecurityEventsClient.ListByDatabase method.
type ManagedDatabaseSecurityEventsClientListByDatabaseResponse ¶ added in v0.3.0
type ManagedDatabaseSecurityEventsClientListByDatabaseResponse struct {
SecurityEventCollection
}
ManagedDatabaseSecurityEventsClientListByDatabaseResponse contains the response from method ManagedDatabaseSecurityEventsClient.ListByDatabase.
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ManagedDatabaseColumnSensitivityLabelCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseSensitivityLabelsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.CreateOrUpdate(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", "<schema-name>", "<table-name>", "<column-name>", armsql.SensitivityLabel{ Properties: &armsql.SensitivityLabelProperties{ InformationType: to.Ptr("<information-type>"), InformationTypeID: to.Ptr("<information-type-id>"), LabelID: to.Ptr("<label-id>"), LabelName: to.Ptr("<label-name>"), Rank: to.Ptr(armsql.SensitivityLabelRankHigh), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ManagedDatabaseColumnSensitivityLabelDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseSensitivityLabelsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Delete(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", "<schema-name>", "<table-name>", "<column-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelDisable.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseSensitivityLabelsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.DisableRecommendation(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", "<schema-name>", "<table-name>", "<column-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelEnable.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseSensitivityLabelsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.EnableRecommendation(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", "<schema-name>", "<table-name>", "<column-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ManagedDatabaseColumnSensitivityLabelGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseSensitivityLabelsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", "<schema-name>", "<table-name>", "<column-name>", armsql.SensitivityLabelSourceCurrent, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedDatabaseSensitivityLabelsClient) ListByDatabase ¶ added in v0.4.0
func (client *ManagedDatabaseSensitivityLabelsClient) ListByDatabase(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseSensitivityLabelsClientListByDatabaseOptions) *runtime.Pager[ManagedDatabaseSensitivityLabelsClientListByDatabaseResponse]
ListByDatabase - Gets the sensitivity labels of a given database If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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 - ManagedDatabaseSensitivityLabelsClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ManagedDatabaseSensitivityLabelsListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseSensitivityLabelsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<managed-instance-name>", "<database-name>", &armsql.ManagedDatabaseSensitivityLabelsClientListByDatabaseOptions{Filter: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*ManagedDatabaseSensitivityLabelsClient) ListCurrentByDatabase ¶
func (client *ManagedDatabaseSensitivityLabelsClient) ListCurrentByDatabase(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseOptions) *runtime.Pager[ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseResponse]
ListCurrentByDatabase - Gets the sensitivity labels of a given database If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListCurrentByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ManagedDatabaseSensitivityLabelsListByDatabaseCurrent.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseSensitivityLabelsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListCurrentByDatabase("<resource-group-name>", "<managed-instance-name>", "<database-name>", &armsql.ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseOptions{SkipToken: nil, Count: nil, Filter: nil, }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*ManagedDatabaseSensitivityLabelsClient) ListRecommendedByDatabase ¶
func (client *ManagedDatabaseSensitivityLabelsClient) ListRecommendedByDatabase(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseOptions) *runtime.Pager[ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseResponse]
ListRecommendedByDatabase - Gets the sensitivity labels of a given database If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListRecommendedByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ManagedDatabaseSensitivityLabelsListByDatabaseRecommended.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseSensitivityLabelsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListRecommendedByDatabase("<resource-group-name>", "<managed-instance-name>", "<database-name>", &armsql.ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseOptions{SkipToken: nil, IncludeDisabledRecommendations: nil, Filter: nil, }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ManagedDatabaseSensitivityLabelsCurrentUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseSensitivityLabelsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Update(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", armsql.SensitivityLabelUpdateList{ Operations: []*armsql.SensitivityLabelUpdate{ { Properties: &armsql.SensitivityLabelUpdateProperties{ Schema: to.Ptr("<schema>"), Column: to.Ptr("<column>"), Op: to.Ptr(armsql.SensitivityLabelUpdateKindSet), SensitivityLabel: &armsql.SensitivityLabel{ Properties: &armsql.SensitivityLabelProperties{ InformationType: to.Ptr("<information-type>"), InformationTypeID: to.Ptr("<information-type-id>"), LabelID: to.Ptr("<label-id>"), LabelName: to.Ptr("<label-name>"), }, }, Table: to.Ptr("<table>"), }, }, { Properties: &armsql.SensitivityLabelUpdateProperties{ Schema: to.Ptr("<schema>"), Column: to.Ptr("<column>"), Op: to.Ptr(armsql.SensitivityLabelUpdateKindSet), SensitivityLabel: &armsql.SensitivityLabel{ Properties: &armsql.SensitivityLabelProperties{ InformationType: to.Ptr("<information-type>"), InformationTypeID: to.Ptr("<information-type-id>"), LabelID: to.Ptr("<label-id>"), LabelName: to.Ptr("<label-name>"), }, }, Table: to.Ptr("<table>"), }, }, { Properties: &armsql.SensitivityLabelUpdateProperties{ Schema: to.Ptr("<schema>"), Column: to.Ptr("<column>"), Op: to.Ptr(armsql.SensitivityLabelUpdateKindRemove), Table: to.Ptr("<table>"), }, }}, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
Output:
type ManagedDatabaseSensitivityLabelsClientCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientCreateOrUpdateOptions struct { }
ManagedDatabaseSensitivityLabelsClientCreateOrUpdateOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.CreateOrUpdate method.
type ManagedDatabaseSensitivityLabelsClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientCreateOrUpdateResponse struct {
SensitivityLabel
}
ManagedDatabaseSensitivityLabelsClientCreateOrUpdateResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.CreateOrUpdate.
type ManagedDatabaseSensitivityLabelsClientDeleteOptions ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientDeleteOptions struct { }
ManagedDatabaseSensitivityLabelsClientDeleteOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.Delete method.
type ManagedDatabaseSensitivityLabelsClientDeleteResponse ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientDeleteResponse struct { }
ManagedDatabaseSensitivityLabelsClientDeleteResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.Delete.
type ManagedDatabaseSensitivityLabelsClientDisableRecommendationOptions ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientDisableRecommendationOptions struct { }
ManagedDatabaseSensitivityLabelsClientDisableRecommendationOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.DisableRecommendation method.
type ManagedDatabaseSensitivityLabelsClientDisableRecommendationResponse ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientDisableRecommendationResponse struct { }
ManagedDatabaseSensitivityLabelsClientDisableRecommendationResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.DisableRecommendation.
type ManagedDatabaseSensitivityLabelsClientEnableRecommendationOptions ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientEnableRecommendationOptions struct { }
ManagedDatabaseSensitivityLabelsClientEnableRecommendationOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.EnableRecommendation method.
type ManagedDatabaseSensitivityLabelsClientEnableRecommendationResponse ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientEnableRecommendationResponse struct { }
ManagedDatabaseSensitivityLabelsClientEnableRecommendationResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.EnableRecommendation.
type ManagedDatabaseSensitivityLabelsClientGetOptions ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientGetOptions struct { }
ManagedDatabaseSensitivityLabelsClientGetOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.Get method.
type ManagedDatabaseSensitivityLabelsClientGetResponse ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientGetResponse struct {
SensitivityLabel
}
ManagedDatabaseSensitivityLabelsClientGetResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.Get.
type ManagedDatabaseSensitivityLabelsClientListByDatabaseOptions ¶ added in v0.4.0
type ManagedDatabaseSensitivityLabelsClientListByDatabaseOptions struct { // An OData filter expression that filters elements in the collection. Filter *string }
ManagedDatabaseSensitivityLabelsClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.ListByDatabase method.
type ManagedDatabaseSensitivityLabelsClientListByDatabaseResponse ¶ added in v0.4.0
type ManagedDatabaseSensitivityLabelsClientListByDatabaseResponse struct {
SensitivityLabelListResult
}
ManagedDatabaseSensitivityLabelsClientListByDatabaseResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.ListByDatabase.
type ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseOptions ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseOptions struct { Count *bool // An OData filter expression that filters elements in the collection. Filter *string SkipToken *string }
ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.ListCurrentByDatabase method.
type ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseResponse ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseResponse struct {
SensitivityLabelListResult
}
ManagedDatabaseSensitivityLabelsClientListCurrentByDatabaseResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.ListCurrentByDatabase.
type ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseOptions ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseOptions struct { // An OData filter expression that filters elements in the collection. Filter *string // Specifies whether to include disabled recommendations or not. IncludeDisabledRecommendations *bool SkipToken *string }
ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.ListRecommendedByDatabase method.
type ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseResponse ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseResponse struct {
SensitivityLabelListResult
}
ManagedDatabaseSensitivityLabelsClientListRecommendedByDatabaseResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.ListRecommendedByDatabase.
type ManagedDatabaseSensitivityLabelsClientUpdateOptions ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientUpdateOptions struct { }
ManagedDatabaseSensitivityLabelsClientUpdateOptions contains the optional parameters for the ManagedDatabaseSensitivityLabelsClient.Update method.
type ManagedDatabaseSensitivityLabelsClientUpdateResponse ¶ added in v0.3.0
type ManagedDatabaseSensitivityLabelsClientUpdateResponse struct { }
ManagedDatabaseSensitivityLabelsClientUpdateResponse contains the response from method ManagedDatabaseSensitivityLabelsClient.Update.
type ManagedDatabaseStatus ¶
type ManagedDatabaseStatus string
ManagedDatabaseStatus - Status of the database.
const ( ManagedDatabaseStatusCreating ManagedDatabaseStatus = "Creating" ManagedDatabaseStatusInaccessible ManagedDatabaseStatus = "Inaccessible" ManagedDatabaseStatusOffline ManagedDatabaseStatus = "Offline" ManagedDatabaseStatusOnline ManagedDatabaseStatus = "Online" ManagedDatabaseStatusRestoring ManagedDatabaseStatus = "Restoring" ManagedDatabaseStatusShutdown ManagedDatabaseStatus = "Shutdown" ManagedDatabaseStatusUpdating ManagedDatabaseStatus = "Updating" )
func PossibleManagedDatabaseStatusValues ¶
func PossibleManagedDatabaseStatusValues() []ManagedDatabaseStatus
PossibleManagedDatabaseStatusValues returns the possible values for the ManagedDatabaseStatus const type.
type ManagedDatabaseTablesClient ¶
type ManagedDatabaseTablesClient struct {
// contains filtered or unexported fields
}
ManagedDatabaseTablesClient contains the methods for the ManagedDatabaseTables group. Don't use this type directly, use NewManagedDatabaseTablesClient() instead.
func NewManagedDatabaseTablesClient ¶
func NewManagedDatabaseTablesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabaseTablesClient, error)
NewManagedDatabaseTablesClient creates a new instance of ManagedDatabaseTablesClient with the specified values. subscriptionID - The subscription ID that identifies an Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ManagedDatabaseTablesClient) Get ¶
func (client *ManagedDatabaseTablesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, tableName string, options *ManagedDatabaseTablesClientGetOptions) (ManagedDatabaseTablesClientGetResponse, error)
Get - Get managed database table If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseTableGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseTablesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", "<schema-name>", "<table-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedDatabaseTablesClient) ListBySchema ¶
func (client *ManagedDatabaseTablesClient) ListBySchema(resourceGroupName string, managedInstanceName string, databaseName string, schemaName string, options *ManagedDatabaseTablesClientListBySchemaOptions) *runtime.Pager[ManagedDatabaseTablesClientListBySchemaResponse]
ListBySchema - List managed database tables If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListBySchema method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseTableListBySchema.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseTablesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListBySchema("<resource-group-name>", "<managed-instance-name>", "<database-name>", "<schema-name>", &armsql.ManagedDatabaseTablesClientListBySchemaOptions{Filter: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ManagedDatabaseTablesClientGetOptions ¶ added in v0.3.0
type ManagedDatabaseTablesClientGetOptions struct { }
ManagedDatabaseTablesClientGetOptions contains the optional parameters for the ManagedDatabaseTablesClient.Get method.
type ManagedDatabaseTablesClientGetResponse ¶ added in v0.3.0
type ManagedDatabaseTablesClientGetResponse struct {
DatabaseTable
}
ManagedDatabaseTablesClientGetResponse contains the response from method ManagedDatabaseTablesClient.Get.
type ManagedDatabaseTablesClientListBySchemaOptions ¶ added in v0.3.0
type ManagedDatabaseTablesClientListBySchemaOptions struct { // An OData filter expression that filters elements in the collection. Filter *string }
ManagedDatabaseTablesClientListBySchemaOptions contains the optional parameters for the ManagedDatabaseTablesClient.ListBySchema method.
type ManagedDatabaseTablesClientListBySchemaResponse ¶ added in v0.3.0
type ManagedDatabaseTablesClientListBySchemaResponse struct {
DatabaseTableListResult
}
ManagedDatabaseTablesClientListBySchemaResponse contains the response from method ManagedDatabaseTablesClient.ListBySchema.
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedTransparentDataEncryptionUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseTransparentDataEncryptionClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.CreateOrUpdate(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", 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) return } // TODO: use response item _ = res }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedTransparentDataEncryptionGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseTransparentDataEncryptionClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", armsql.TransparentDataEncryptionNameCurrent, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedDatabaseTransparentDataEncryptionClient) ListByDatabase ¶
func (client *ManagedDatabaseTransparentDataEncryptionClient) ListByDatabase(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseTransparentDataEncryptionClientListByDatabaseOptions) *runtime.Pager[ManagedDatabaseTransparentDataEncryptionClientListByDatabaseResponse]
ListByDatabase - Gets a list of managed database's transparent data encryptions. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedTransparentDataEncryptionList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseTransparentDataEncryptionClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<managed-instance-name>", "<database-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateOptions struct { }
ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateOptions contains the optional parameters for the ManagedDatabaseTransparentDataEncryptionClient.CreateOrUpdate method.
type ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateResponse struct {
ManagedTransparentDataEncryption
}
ManagedDatabaseTransparentDataEncryptionClientCreateOrUpdateResponse contains the response from method ManagedDatabaseTransparentDataEncryptionClient.CreateOrUpdate.
type ManagedDatabaseTransparentDataEncryptionClientGetOptions ¶ added in v0.3.0
type ManagedDatabaseTransparentDataEncryptionClientGetOptions struct { }
ManagedDatabaseTransparentDataEncryptionClientGetOptions contains the optional parameters for the ManagedDatabaseTransparentDataEncryptionClient.Get method.
type ManagedDatabaseTransparentDataEncryptionClientGetResponse ¶ added in v0.3.0
type ManagedDatabaseTransparentDataEncryptionClientGetResponse struct {
ManagedTransparentDataEncryption
}
ManagedDatabaseTransparentDataEncryptionClientGetResponse contains the response from method ManagedDatabaseTransparentDataEncryptionClient.Get.
type ManagedDatabaseTransparentDataEncryptionClientListByDatabaseOptions ¶ added in v0.3.0
type ManagedDatabaseTransparentDataEncryptionClientListByDatabaseOptions struct { }
ManagedDatabaseTransparentDataEncryptionClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseTransparentDataEncryptionClient.ListByDatabase method.
type ManagedDatabaseTransparentDataEncryptionClientListByDatabaseResponse ¶ added in v0.3.0
type ManagedDatabaseTransparentDataEncryptionClientListByDatabaseResponse struct {
ManagedTransparentDataEncryptionListResult
}
ManagedDatabaseTransparentDataEncryptionClientListByDatabaseResponse contains the response from method ManagedDatabaseTransparentDataEncryptionClient.ListByDatabase.
type ManagedDatabaseUpdate ¶
type ManagedDatabaseUpdate struct { // Resource properties. Properties *ManagedDatabaseProperties `json:"properties,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` }
ManagedDatabaseUpdate - An managed database update.
func (ManagedDatabaseUpdate) MarshalJSON ¶
func (m ManagedDatabaseUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller 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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.CreateOrUpdate(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", armsql.VulnerabilityAssessmentNameDefault, "<rule-id>", 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) return } // TODO: use response item _ = res }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Delete(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", armsql.VulnerabilityAssessmentNameDefault, "<rule-id>", armsql.VulnerabilityAssessmentPolicyBaselineNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", armsql.VulnerabilityAssessmentNameDefault, "<rule-id>", armsql.VulnerabilityAssessmentPolicyBaselineNameMaster, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions struct { }
ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate method.
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse struct {
DatabaseVulnerabilityAssessmentRuleBaseline
}
ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientCreateOrUpdateResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.CreateOrUpdate.
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions struct { }
ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.Delete method.
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse struct { }
ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientDeleteResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.Delete.
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions struct { }
ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClient.Get method.
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentRuleBaselinesClientGetResponse struct {
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) (*armruntime.Poller[ManagedDatabaseVulnerabilityAssessmentScansClientInitiateScanResponse], error)
BeginInitiateScan - Executes a Vulnerability Assessment database scan. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScansExecute.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseVulnerabilityAssessmentScansClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginInitiateScan(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", armsql.VulnerabilityAssessmentNameDefault, "<scan-id>", &armsql.ManagedDatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanExport.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseVulnerabilityAssessmentScansClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Export(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", armsql.VulnerabilityAssessmentNameDefault, "<scan-id>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseVulnerabilityAssessmentScansClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", armsql.VulnerabilityAssessmentNameDefault, "<scan-id>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedDatabaseVulnerabilityAssessmentScansClient) ListByDatabase ¶
func (client *ManagedDatabaseVulnerabilityAssessmentScansClient) ListByDatabase(resourceGroupName string, managedInstanceName string, databaseName string, vulnerabilityAssessmentName VulnerabilityAssessmentName, options *ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions) *runtime.Pager[ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse]
ListByDatabase - Lists the vulnerability assessment scans of a database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseVulnerabilityAssessmentScansClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<managed-instance-name>", "<database-name>", armsql.VulnerabilityAssessmentNameDefault, nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ManagedDatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedDatabaseVulnerabilityAssessmentScansClientBeginInitiateScanOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentScansClient.BeginInitiateScan method.
type ManagedDatabaseVulnerabilityAssessmentScansClientExportOptions ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentScansClientExportOptions struct { }
ManagedDatabaseVulnerabilityAssessmentScansClientExportOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentScansClient.Export method.
type ManagedDatabaseVulnerabilityAssessmentScansClientExportResponse ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentScansClientExportResponse struct {
DatabaseVulnerabilityAssessmentScansExport
}
ManagedDatabaseVulnerabilityAssessmentScansClientExportResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentScansClient.Export.
type ManagedDatabaseVulnerabilityAssessmentScansClientGetOptions ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentScansClientGetOptions struct { }
ManagedDatabaseVulnerabilityAssessmentScansClientGetOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentScansClient.Get method.
type ManagedDatabaseVulnerabilityAssessmentScansClientGetResponse ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentScansClientGetResponse struct {
VulnerabilityAssessmentScanRecord
}
ManagedDatabaseVulnerabilityAssessmentScansClientGetResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentScansClient.Get.
type ManagedDatabaseVulnerabilityAssessmentScansClientInitiateScanResponse ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentScansClientInitiateScanResponse struct { }
ManagedDatabaseVulnerabilityAssessmentScansClientInitiateScanResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentScansClient.InitiateScan.
type ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions struct { }
ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentScansClient.ListByDatabase method.
type ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse struct {
VulnerabilityAssessmentScanRecordListResult
}
ManagedDatabaseVulnerabilityAssessmentScansClientListByDatabaseResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentScansClient.ListByDatabase.
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. resourceGroupName - 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseVulnerabilityAssessmentsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.CreateOrUpdate(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", 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("<storage-container-path>"), StorageContainerSasKey: to.Ptr("<storage-container-sas-key>"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseVulnerabilityAssessmentsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Delete(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", armsql.VulnerabilityAssessmentNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseVulnerabilityAssessmentsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", armsql.VulnerabilityAssessmentNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedDatabaseVulnerabilityAssessmentsClient) ListByDatabase ¶
func (client *ManagedDatabaseVulnerabilityAssessmentsClient) ListByDatabase(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseOptions) *runtime.Pager[ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseResponse]
ListByDatabase - Lists the vulnerability assessments of a managed database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabaseVulnerabilityAssessmentsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<managed-instance-name>", "<database-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions struct { }
ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentsClient.CreateOrUpdate method.
type ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse struct {
DatabaseVulnerabilityAssessment
}
ManagedDatabaseVulnerabilityAssessmentsClientCreateOrUpdateResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentsClient.CreateOrUpdate.
type ManagedDatabaseVulnerabilityAssessmentsClientDeleteOptions ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentsClientDeleteOptions struct { }
ManagedDatabaseVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentsClient.Delete method.
type ManagedDatabaseVulnerabilityAssessmentsClientDeleteResponse ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentsClientDeleteResponse struct { }
ManagedDatabaseVulnerabilityAssessmentsClientDeleteResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentsClient.Delete.
type ManagedDatabaseVulnerabilityAssessmentsClientGetOptions ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentsClientGetOptions struct { }
ManagedDatabaseVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentsClient.Get method.
type ManagedDatabaseVulnerabilityAssessmentsClientGetResponse ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentsClientGetResponse struct {
DatabaseVulnerabilityAssessment
}
ManagedDatabaseVulnerabilityAssessmentsClientGetResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentsClient.Get.
type ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseOptions ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseOptions struct { }
ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseOptions contains the optional parameters for the ManagedDatabaseVulnerabilityAssessmentsClient.ListByDatabase method.
type ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseResponse ¶ added in v0.3.0
type ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseResponse struct {
DatabaseVulnerabilityAssessmentListResult
}
ManagedDatabaseVulnerabilityAssessmentsClientListByDatabaseResponse contains the response from method ManagedDatabaseVulnerabilityAssessmentsClient.ListByDatabase.
type ManagedDatabasesClient ¶
type ManagedDatabasesClient struct {
// contains filtered or unexported fields
}
ManagedDatabasesClient contains the methods for the ManagedDatabases group. Don't use this type directly, use NewManagedDatabasesClient() instead.
func NewManagedDatabasesClient ¶
func NewManagedDatabasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedDatabasesClient, error)
NewManagedDatabasesClient creates a new instance of ManagedDatabasesClient with the specified values. subscriptionID - The subscription ID that identifies an Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ManagedDatabasesClient) BeginCompleteRestore ¶
func (client *ManagedDatabasesClient) BeginCompleteRestore(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters CompleteDatabaseRestoreDefinition, options *ManagedDatabasesClientBeginCompleteRestoreOptions) (*armruntime.Poller[ManagedDatabasesClientCompleteRestoreResponse], error)
BeginCompleteRestore - Completes the restore operation on a managed database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseCompleteExternalRestore.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCompleteRestore(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", armsql.CompleteDatabaseRestoreDefinition{ LastBackupName: to.Ptr("<last-backup-name>"), }, &armsql.ManagedDatabasesClientBeginCompleteRestoreOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*ManagedDatabasesClient) BeginCreateOrUpdate ¶
func (client *ManagedDatabasesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters ManagedDatabase, options *ManagedDatabasesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[ManagedDatabasesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates a new database or updates an existing database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseCreateRestoreExternalBackup.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", armsql.ManagedDatabase{ Location: to.Ptr("<location>"), Properties: &armsql.ManagedDatabaseProperties{ AutoCompleteRestore: to.Ptr(true), Collation: to.Ptr("<collation>"), CreateMode: to.Ptr(armsql.ManagedDatabaseCreateModeRestoreExternalBackup), LastBackupName: to.Ptr("<last-backup-name>"), StorageContainerSasToken: to.Ptr("<storage-container-sas-token>"), StorageContainerURI: to.Ptr("<storage-container-uri>"), }, }, &armsql.ManagedDatabasesClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedDatabasesClient) BeginDelete ¶
func (client *ManagedDatabasesClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedDatabasesClientBeginDeleteOptions) (*armruntime.Poller[ManagedDatabasesClientDeleteResponse], error)
BeginDelete - Deletes a managed database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseDelete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", &armsql.ManagedDatabasesClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*ManagedDatabasesClient) BeginUpdate ¶
func (client *ManagedDatabasesClient) BeginUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, databaseName string, parameters ManagedDatabaseUpdate, options *ManagedDatabasesClientBeginUpdateOptions) (*armruntime.Poller[ManagedDatabasesClientUpdateResponse], error)
BeginUpdate - Updates an existing database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseUpdateMax.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginUpdate(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", armsql.ManagedDatabaseUpdate{ Tags: map[string]*string{ "tagKey1": to.Ptr("TagValue1"), }, }, &armsql.ManagedDatabasesClientBeginUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedDatabasesClient) ListByInstance ¶
func (client *ManagedDatabasesClient) ListByInstance(resourceGroupName string, managedInstanceName string, options *ManagedDatabasesClientListByInstanceOptions) *runtime.Pager[ManagedDatabasesClientListByInstanceResponse]
ListByInstance - Gets a list of managed databases. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByInstance method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedDatabaseListByManagedInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByInstance("<resource-group-name>", "<managed-instance-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*ManagedDatabasesClient) ListInaccessibleByInstance ¶
func (client *ManagedDatabasesClient) ListInaccessibleByInstance(resourceGroupName string, managedInstanceName string, options *ManagedDatabasesClientListInaccessibleByInstanceOptions) *runtime.Pager[ManagedDatabasesClientListInaccessibleByInstanceResponse]
ListInaccessibleByInstance - Gets a list of inaccessible managed databases in a managed instance If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListInaccessibleByInstance method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/InaccessibleManagedDatabaseListByManagedInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListInaccessibleByInstance("<resource-group-name>", "<managed-instance-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ManagedDatabasesClientBeginCompleteRestoreOptions ¶ added in v0.3.0
type ManagedDatabasesClientBeginCompleteRestoreOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedDatabasesClientBeginCompleteRestoreOptions contains the optional parameters for the ManagedDatabasesClient.BeginCompleteRestore method.
type ManagedDatabasesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedDatabasesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedDatabasesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedDatabasesClient.BeginCreateOrUpdate method.
type ManagedDatabasesClientBeginDeleteOptions ¶ added in v0.3.0
type ManagedDatabasesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedDatabasesClientBeginDeleteOptions contains the optional parameters for the ManagedDatabasesClient.BeginDelete method.
type ManagedDatabasesClientBeginUpdateOptions ¶ added in v0.3.0
type ManagedDatabasesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedDatabasesClientBeginUpdateOptions contains the optional parameters for the ManagedDatabasesClient.BeginUpdate method.
type ManagedDatabasesClientCompleteRestoreResponse ¶ added in v0.3.0
type ManagedDatabasesClientCompleteRestoreResponse struct { }
ManagedDatabasesClientCompleteRestoreResponse contains the response from method ManagedDatabasesClient.CompleteRestore.
type ManagedDatabasesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedDatabasesClientCreateOrUpdateResponse struct {
ManagedDatabase
}
ManagedDatabasesClientCreateOrUpdateResponse contains the response from method ManagedDatabasesClient.CreateOrUpdate.
type ManagedDatabasesClientDeleteResponse ¶ added in v0.3.0
type ManagedDatabasesClientDeleteResponse struct { }
ManagedDatabasesClientDeleteResponse contains the response from method ManagedDatabasesClient.Delete.
type ManagedDatabasesClientGetOptions ¶ added in v0.3.0
type ManagedDatabasesClientGetOptions struct { }
ManagedDatabasesClientGetOptions contains the optional parameters for the ManagedDatabasesClient.Get method.
type ManagedDatabasesClientGetResponse ¶ added in v0.3.0
type ManagedDatabasesClientGetResponse struct {
ManagedDatabase
}
ManagedDatabasesClientGetResponse contains the response from method ManagedDatabasesClient.Get.
type ManagedDatabasesClientListByInstanceOptions ¶ added in v0.3.0
type ManagedDatabasesClientListByInstanceOptions struct { }
ManagedDatabasesClientListByInstanceOptions contains the optional parameters for the ManagedDatabasesClient.ListByInstance method.
type ManagedDatabasesClientListByInstanceResponse ¶ added in v0.3.0
type ManagedDatabasesClientListByInstanceResponse struct {
ManagedDatabaseListResult
}
ManagedDatabasesClientListByInstanceResponse contains the response from method ManagedDatabasesClient.ListByInstance.
type ManagedDatabasesClientListInaccessibleByInstanceOptions ¶ added in v0.3.0
type ManagedDatabasesClientListInaccessibleByInstanceOptions struct { }
ManagedDatabasesClientListInaccessibleByInstanceOptions contains the optional parameters for the ManagedDatabasesClient.ListInaccessibleByInstance method.
type ManagedDatabasesClientListInaccessibleByInstanceResponse ¶ added in v0.3.0
type ManagedDatabasesClientListInaccessibleByInstanceResponse struct {
ManagedDatabaseListResult
}
ManagedDatabasesClientListInaccessibleByInstanceResponse contains the response from method ManagedDatabasesClient.ListInaccessibleByInstance.
type ManagedDatabasesClientUpdateResponse ¶ added in v0.3.0
type ManagedDatabasesClientUpdateResponse struct {
ManagedDatabase
}
ManagedDatabasesClientUpdateResponse contains the response from method ManagedDatabasesClient.Update.
type ManagedInstance ¶
type ManagedInstance struct { // REQUIRED; Resource location. Location *string `json:"location,omitempty"` // The Azure Active Directory identity of the managed instance. Identity *ResourceIdentity `json:"identity,omitempty"` // Resource properties. Properties *ManagedInstanceProperties `json:"properties,omitempty"` // Managed instance SKU. Allowed values for sku.name: GPGen4, GPGen5, BCGen4, BCGen5 SKU *SKU `json:"sku,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ManagedInstance - An Azure SQL managed instance.
func (ManagedInstance) MarshalJSON ¶
func (m ManagedInstance) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstance.
type ManagedInstanceAdministrator ¶
type ManagedInstanceAdministrator struct { // Resource properties. Properties *ManagedInstanceAdministratorProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ManagedInstanceAdministrator - An Azure SQL managed instance administrator.
type ManagedInstanceAdministratorListResult ¶
type ManagedInstanceAdministratorListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ManagedInstanceAdministrator `json:"value,omitempty" azure:"ro"` }
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.
type ManagedInstanceAdministratorProperties ¶
type ManagedInstanceAdministratorProperties struct { // REQUIRED; Type of the managed instance administrator. AdministratorType *ManagedInstanceAdministratorType `json:"administratorType,omitempty"` // REQUIRED; Login name of the managed instance administrator. Login *string `json:"login,omitempty"` // REQUIRED; SID (object ID) of the managed instance administrator. Sid *string `json:"sid,omitempty"` // Tenant ID of the managed instance administrator. TenantID *string `json:"tenantId,omitempty"` }
ManagedInstanceAdministratorProperties - The properties of a managed instance administrator.
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) (*armruntime.Poller[ManagedInstanceAdministratorsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a managed instance administrator. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAdministratorCreate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstanceAdministratorsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<managed-instance-name>", armsql.AdministratorNameActiveDirectory, armsql.ManagedInstanceAdministrator{ Properties: &armsql.ManagedInstanceAdministratorProperties{ AdministratorType: to.Ptr(armsql.ManagedInstanceAdministratorTypeActiveDirectory), Login: to.Ptr("<login>"), Sid: to.Ptr("<sid>"), TenantID: to.Ptr("<tenant-id>"), }, }, &armsql.ManagedInstanceAdministratorsClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedInstanceAdministratorsClient) BeginDelete ¶
func (client *ManagedInstanceAdministratorsClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, administratorName AdministratorName, options *ManagedInstanceAdministratorsClientBeginDeleteOptions) (*armruntime.Poller[ManagedInstanceAdministratorsClientDeleteResponse], error)
BeginDelete - Deletes a managed instance administrator. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAdministratorDelete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstanceAdministratorsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<managed-instance-name>", armsql.AdministratorNameActiveDirectory, &armsql.ManagedInstanceAdministratorsClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAdministratorGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstanceAdministratorsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", armsql.AdministratorNameActiveDirectory, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedInstanceAdministratorsClient) ListByInstance ¶
func (client *ManagedInstanceAdministratorsClient) ListByInstance(resourceGroupName string, managedInstanceName string, options *ManagedInstanceAdministratorsClientListByInstanceOptions) *runtime.Pager[ManagedInstanceAdministratorsClientListByInstanceResponse]
ListByInstance - Gets a list of managed instance administrators. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByInstance method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAdministratorListByInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstanceAdministratorsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByInstance("<resource-group-name>", "<managed-instance-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ManagedInstanceAdministratorsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedInstanceAdministratorsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceAdministratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceAdministratorsClient.BeginCreateOrUpdate method.
type ManagedInstanceAdministratorsClientBeginDeleteOptions ¶ added in v0.3.0
type ManagedInstanceAdministratorsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceAdministratorsClientBeginDeleteOptions contains the optional parameters for the ManagedInstanceAdministratorsClient.BeginDelete method.
type ManagedInstanceAdministratorsClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedInstanceAdministratorsClientCreateOrUpdateResponse struct {
ManagedInstanceAdministrator
}
ManagedInstanceAdministratorsClientCreateOrUpdateResponse contains the response from method ManagedInstanceAdministratorsClient.CreateOrUpdate.
type ManagedInstanceAdministratorsClientDeleteResponse ¶ added in v0.3.0
type ManagedInstanceAdministratorsClientDeleteResponse struct { }
ManagedInstanceAdministratorsClientDeleteResponse contains the response from method ManagedInstanceAdministratorsClient.Delete.
type ManagedInstanceAdministratorsClientGetOptions ¶ added in v0.3.0
type ManagedInstanceAdministratorsClientGetOptions struct { }
ManagedInstanceAdministratorsClientGetOptions contains the optional parameters for the ManagedInstanceAdministratorsClient.Get method.
type ManagedInstanceAdministratorsClientGetResponse ¶ added in v0.3.0
type ManagedInstanceAdministratorsClientGetResponse struct {
ManagedInstanceAdministrator
}
ManagedInstanceAdministratorsClientGetResponse contains the response from method ManagedInstanceAdministratorsClient.Get.
type ManagedInstanceAdministratorsClientListByInstanceOptions ¶ added in v0.3.0
type ManagedInstanceAdministratorsClientListByInstanceOptions struct { }
ManagedInstanceAdministratorsClientListByInstanceOptions contains the optional parameters for the ManagedInstanceAdministratorsClient.ListByInstance method.
type ManagedInstanceAdministratorsClientListByInstanceResponse ¶ added in v0.3.0
type ManagedInstanceAdministratorsClientListByInstanceResponse struct {
ManagedInstanceAdministratorListResult
}
ManagedInstanceAdministratorsClientListByInstanceResponse contains the response from method ManagedInstanceAdministratorsClient.ListByInstance.
type ManagedInstanceAzureADOnlyAuthListResult ¶
type ManagedInstanceAzureADOnlyAuthListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ManagedInstanceAzureADOnlyAuthentication `json:"value,omitempty" azure:"ro"` }
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.
type ManagedInstanceAzureADOnlyAuthProperties ¶
type ManagedInstanceAzureADOnlyAuthProperties struct { // REQUIRED; Azure Active Directory only Authentication enabled. AzureADOnlyAuthentication *bool `json:"azureADOnlyAuthentication,omitempty"` }
ManagedInstanceAzureADOnlyAuthProperties - Properties of a active directory only authentication for Managed Instance.
type ManagedInstanceAzureADOnlyAuthentication ¶
type ManagedInstanceAzureADOnlyAuthentication struct { // Resource properties. Properties *ManagedInstanceAzureADOnlyAuthProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ManagedInstanceAzureADOnlyAuthentication - Azure Active Directory only authentication.
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) (*armruntime.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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAzureADOnlyAuthCreateOrUpdate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstanceAzureADOnlyAuthenticationsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<managed-instance-name>", armsql.AuthenticationNameDefault, armsql.ManagedInstanceAzureADOnlyAuthentication{ Properties: &armsql.ManagedInstanceAzureADOnlyAuthProperties{ AzureADOnlyAuthentication: to.Ptr(false), }, }, &armsql.ManagedInstanceAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedInstanceAzureADOnlyAuthenticationsClient) BeginDelete ¶
func (client *ManagedInstanceAzureADOnlyAuthenticationsClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, authenticationName AuthenticationName, options *ManagedInstanceAzureADOnlyAuthenticationsClientBeginDeleteOptions) (*armruntime.Poller[ManagedInstanceAzureADOnlyAuthenticationsClientDeleteResponse], error)
BeginDelete - Deletes an existing server Active Directory only authentication property. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAzureADOnlyAuthDelete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstanceAzureADOnlyAuthenticationsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<managed-instance-name>", armsql.AuthenticationNameDefault, &armsql.ManagedInstanceAzureADOnlyAuthenticationsClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAzureADOnlyAuthGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstanceAzureADOnlyAuthenticationsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", armsql.AuthenticationNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedInstanceAzureADOnlyAuthenticationsClient) ListByInstance ¶
func (client *ManagedInstanceAzureADOnlyAuthenticationsClient) ListByInstance(resourceGroupName string, managedInstanceName string, options *ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceOptions) *runtime.Pager[ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceResponse]
ListByInstance - Gets a list of server Azure Active Directory only authentications. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByInstance method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceAzureADOnlyAuthListByInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstanceAzureADOnlyAuthenticationsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByInstance("<resource-group-name>", "<managed-instance-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ManagedInstanceAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedInstanceAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceAzureADOnlyAuthenticationsClient.BeginCreateOrUpdate method.
type ManagedInstanceAzureADOnlyAuthenticationsClientBeginDeleteOptions ¶ added in v0.3.0
type ManagedInstanceAzureADOnlyAuthenticationsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceAzureADOnlyAuthenticationsClientBeginDeleteOptions contains the optional parameters for the ManagedInstanceAzureADOnlyAuthenticationsClient.BeginDelete method.
type ManagedInstanceAzureADOnlyAuthenticationsClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedInstanceAzureADOnlyAuthenticationsClientCreateOrUpdateResponse struct {
ManagedInstanceAzureADOnlyAuthentication
}
ManagedInstanceAzureADOnlyAuthenticationsClientCreateOrUpdateResponse contains the response from method ManagedInstanceAzureADOnlyAuthenticationsClient.CreateOrUpdate.
type ManagedInstanceAzureADOnlyAuthenticationsClientDeleteResponse ¶ added in v0.3.0
type ManagedInstanceAzureADOnlyAuthenticationsClientDeleteResponse struct { }
ManagedInstanceAzureADOnlyAuthenticationsClientDeleteResponse contains the response from method ManagedInstanceAzureADOnlyAuthenticationsClient.Delete.
type ManagedInstanceAzureADOnlyAuthenticationsClientGetOptions ¶ added in v0.3.0
type ManagedInstanceAzureADOnlyAuthenticationsClientGetOptions struct { }
ManagedInstanceAzureADOnlyAuthenticationsClientGetOptions contains the optional parameters for the ManagedInstanceAzureADOnlyAuthenticationsClient.Get method.
type ManagedInstanceAzureADOnlyAuthenticationsClientGetResponse ¶ added in v0.3.0
type ManagedInstanceAzureADOnlyAuthenticationsClientGetResponse struct {
ManagedInstanceAzureADOnlyAuthentication
}
ManagedInstanceAzureADOnlyAuthenticationsClientGetResponse contains the response from method ManagedInstanceAzureADOnlyAuthenticationsClient.Get.
type ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceOptions ¶ added in v0.3.0
type ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceOptions struct { }
ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceOptions contains the optional parameters for the ManagedInstanceAzureADOnlyAuthenticationsClient.ListByInstance method.
type ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceResponse ¶ added in v0.3.0
type ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceResponse struct {
ManagedInstanceAzureADOnlyAuthListResult
}
ManagedInstanceAzureADOnlyAuthenticationsClientListByInstanceResponse contains the response from method ManagedInstanceAzureADOnlyAuthenticationsClient.ListByInstance.
type ManagedInstanceEditionCapability ¶
type ManagedInstanceEditionCapability struct { // The reason for the capability not being available. Reason *string `json:"reason,omitempty"` // READ-ONLY; The managed server version name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The status of the capability. Status *CapabilityStatus `json:"status,omitempty" azure:"ro"` // READ-ONLY; The supported families. SupportedFamilies []*ManagedInstanceFamilyCapability `json:"supportedFamilies,omitempty" azure:"ro"` // READ-ONLY; The list of supported storage capabilities for this edition SupportedStorageCapabilities []*StorageCapability `json:"supportedStorageCapabilities,omitempty" azure:"ro"` // READ-ONLY; Whether or not zone redundancy is supported for the edition. ZoneRedundant *bool `json:"zoneRedundant,omitempty" azure:"ro"` }
ManagedInstanceEditionCapability - The managed server capability
func (ManagedInstanceEditionCapability) MarshalJSON ¶
func (m ManagedInstanceEditionCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceEditionCapability.
type ManagedInstanceEncryptionProtector ¶
type ManagedInstanceEncryptionProtector struct { // Resource properties. Properties *ManagedInstanceEncryptionProtectorProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Kind of encryption protector. This is metadata used for the Azure portal experience. Kind *string `json:"kind,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ManagedInstanceEncryptionProtector - The managed instance encryption protector.
type ManagedInstanceEncryptionProtectorListResult ¶
type ManagedInstanceEncryptionProtectorListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ManagedInstanceEncryptionProtector `json:"value,omitempty" azure:"ro"` }
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.
type ManagedInstanceEncryptionProtectorProperties ¶
type ManagedInstanceEncryptionProtectorProperties struct { // REQUIRED; The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. ServerKeyType *ServerKeyType `json:"serverKeyType,omitempty"` // Key auto rotation opt-in flag. Either true or false. AutoRotationEnabled *bool `json:"autoRotationEnabled,omitempty"` // The name of the managed instance key. ServerKeyName *string `json:"serverKeyName,omitempty"` // READ-ONLY; Thumbprint of the server key. Thumbprint *string `json:"thumbprint,omitempty" azure:"ro"` // READ-ONLY; The URI of the server key. URI *string `json:"uri,omitempty" azure:"ro"` }
ManagedInstanceEncryptionProtectorProperties - Properties for an encryption protector execution.
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) (*armruntime.Poller[ManagedInstanceEncryptionProtectorsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Updates an existing encryption protector. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateKeyVault.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstanceEncryptionProtectorsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<managed-instance-name>", armsql.EncryptionProtectorNameCurrent, armsql.ManagedInstanceEncryptionProtector{ Properties: &armsql.ManagedInstanceEncryptionProtectorProperties{ AutoRotationEnabled: to.Ptr(false), ServerKeyName: to.Ptr("<server-key-name>"), ServerKeyType: to.Ptr(armsql.ServerKeyTypeAzureKeyVault), }, }, &armsql.ManagedInstanceEncryptionProtectorsClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedInstanceEncryptionProtectorsClient) BeginRevalidate ¶
func (client *ManagedInstanceEncryptionProtectorsClient) BeginRevalidate(ctx context.Context, resourceGroupName string, managedInstanceName string, encryptionProtectorName EncryptionProtectorName, options *ManagedInstanceEncryptionProtectorsClientBeginRevalidateOptions) (*armruntime.Poller[ManagedInstanceEncryptionProtectorsClientRevalidateResponse], error)
BeginRevalidate - Revalidates an existing encryption protector. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceEncryptionProtectorRevalidate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstanceEncryptionProtectorsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginRevalidate(ctx, "<resource-group-name>", "<managed-instance-name>", armsql.EncryptionProtectorNameCurrent, &armsql.ManagedInstanceEncryptionProtectorsClientBeginRevalidateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceEncryptionProtectorGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstanceEncryptionProtectorsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", armsql.EncryptionProtectorNameCurrent, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedInstanceEncryptionProtectorsClient) ListByInstance ¶
func (client *ManagedInstanceEncryptionProtectorsClient) ListByInstance(resourceGroupName string, managedInstanceName string, options *ManagedInstanceEncryptionProtectorsClientListByInstanceOptions) *runtime.Pager[ManagedInstanceEncryptionProtectorsClientListByInstanceResponse]
ListByInstance - Gets a list of managed instance encryption protectors If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByInstance method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceEncryptionProtectorList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstanceEncryptionProtectorsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByInstance("<resource-group-name>", "<managed-instance-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ManagedInstanceEncryptionProtectorsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedInstanceEncryptionProtectorsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceEncryptionProtectorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceEncryptionProtectorsClient.BeginCreateOrUpdate method.
type ManagedInstanceEncryptionProtectorsClientBeginRevalidateOptions ¶ added in v0.3.0
type ManagedInstanceEncryptionProtectorsClientBeginRevalidateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceEncryptionProtectorsClientBeginRevalidateOptions contains the optional parameters for the ManagedInstanceEncryptionProtectorsClient.BeginRevalidate method.
type ManagedInstanceEncryptionProtectorsClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedInstanceEncryptionProtectorsClientCreateOrUpdateResponse struct {
ManagedInstanceEncryptionProtector
}
ManagedInstanceEncryptionProtectorsClientCreateOrUpdateResponse contains the response from method ManagedInstanceEncryptionProtectorsClient.CreateOrUpdate.
type ManagedInstanceEncryptionProtectorsClientGetOptions ¶ added in v0.3.0
type ManagedInstanceEncryptionProtectorsClientGetOptions struct { }
ManagedInstanceEncryptionProtectorsClientGetOptions contains the optional parameters for the ManagedInstanceEncryptionProtectorsClient.Get method.
type ManagedInstanceEncryptionProtectorsClientGetResponse ¶ added in v0.3.0
type ManagedInstanceEncryptionProtectorsClientGetResponse struct {
ManagedInstanceEncryptionProtector
}
ManagedInstanceEncryptionProtectorsClientGetResponse contains the response from method ManagedInstanceEncryptionProtectorsClient.Get.
type ManagedInstanceEncryptionProtectorsClientListByInstanceOptions ¶ added in v0.3.0
type ManagedInstanceEncryptionProtectorsClientListByInstanceOptions struct { }
ManagedInstanceEncryptionProtectorsClientListByInstanceOptions contains the optional parameters for the ManagedInstanceEncryptionProtectorsClient.ListByInstance method.
type ManagedInstanceEncryptionProtectorsClientListByInstanceResponse ¶ added in v0.3.0
type ManagedInstanceEncryptionProtectorsClientListByInstanceResponse struct {
ManagedInstanceEncryptionProtectorListResult
}
ManagedInstanceEncryptionProtectorsClientListByInstanceResponse contains the response from method ManagedInstanceEncryptionProtectorsClient.ListByInstance.
type ManagedInstanceEncryptionProtectorsClientRevalidateResponse ¶ added in v0.3.0
type ManagedInstanceEncryptionProtectorsClientRevalidateResponse struct { }
ManagedInstanceEncryptionProtectorsClientRevalidateResponse contains the response from method ManagedInstanceEncryptionProtectorsClient.Revalidate.
type ManagedInstanceExternalAdministrator ¶
type ManagedInstanceExternalAdministrator struct { // Type of the sever administrator. AdministratorType *AdministratorType `json:"administratorType,omitempty"` // Azure Active Directory only Authentication enabled. AzureADOnlyAuthentication *bool `json:"azureADOnlyAuthentication,omitempty"` // Login name of the server administrator. Login *string `json:"login,omitempty"` // Principal Type of the sever administrator. PrincipalType *PrincipalType `json:"principalType,omitempty"` // SID (object ID) of the server administrator. Sid *string `json:"sid,omitempty"` // Tenant ID of the administrator. TenantID *string `json:"tenantId,omitempty"` }
ManagedInstanceExternalAdministrator - Properties of a active directory administrator.
type ManagedInstanceFamilyCapability ¶
type ManagedInstanceFamilyCapability struct { // The reason for the capability not being available. Reason *string `json:"reason,omitempty"` // READ-ONLY; Family name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; SKU name. SKU *string `json:"sku,omitempty" azure:"ro"` // READ-ONLY; The status of the capability. Status *CapabilityStatus `json:"status,omitempty" azure:"ro"` // READ-ONLY; List of supported license types. SupportedLicenseTypes []*LicenseTypeCapability `json:"supportedLicenseTypes,omitempty" azure:"ro"` // READ-ONLY; List of supported virtual cores values. SupportedVcoresValues []*ManagedInstanceVcoresCapability `json:"supportedVcoresValues,omitempty" azure:"ro"` }
ManagedInstanceFamilyCapability - The managed server family capability.
func (ManagedInstanceFamilyCapability) MarshalJSON ¶
func (m ManagedInstanceFamilyCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceFamilyCapability.
type ManagedInstanceKey ¶
type ManagedInstanceKey struct { // Resource properties. Properties *ManagedInstanceKeyProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Kind of encryption protector. This is metadata used for the Azure portal experience. Kind *string `json:"kind,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ManagedInstanceKey - A managed instance key.
type ManagedInstanceKeyListResult ¶
type ManagedInstanceKeyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ManagedInstanceKey `json:"value,omitempty" azure:"ro"` }
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.
type ManagedInstanceKeyProperties ¶
type ManagedInstanceKeyProperties struct { // REQUIRED; The key type like 'ServiceManaged', 'AzureKeyVault'. ServerKeyType *ServerKeyType `json:"serverKeyType,omitempty"` // The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required. URI *string `json:"uri,omitempty"` // READ-ONLY; Key auto rotation opt-in flag. Either true or false. AutoRotationEnabled *bool `json:"autoRotationEnabled,omitempty" azure:"ro"` // READ-ONLY; The key creation date. CreationDate *time.Time `json:"creationDate,omitempty" azure:"ro"` // READ-ONLY; Thumbprint of the key. Thumbprint *string `json:"thumbprint,omitempty" azure:"ro"` }
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) (*armruntime.Poller[ManagedInstanceKeysClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a managed instance key. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceKeyCreateOrUpdate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstanceKeysClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<managed-instance-name>", "<key-name>", armsql.ManagedInstanceKey{ Properties: &armsql.ManagedInstanceKeyProperties{ ServerKeyType: to.Ptr(armsql.ServerKeyTypeAzureKeyVault), URI: to.Ptr("<uri>"), }, }, &armsql.ManagedInstanceKeysClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedInstanceKeysClient) BeginDelete ¶
func (client *ManagedInstanceKeysClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, keyName string, options *ManagedInstanceKeysClientBeginDeleteOptions) (*armruntime.Poller[ManagedInstanceKeysClientDeleteResponse], error)
BeginDelete - Deletes the managed instance key with the given name. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceKeyDelete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstanceKeysClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<managed-instance-name>", "<key-name>", &armsql.ManagedInstanceKeysClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceKeyGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstanceKeysClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", "<key-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedInstanceKeysClient) ListByInstance ¶
func (client *ManagedInstanceKeysClient) ListByInstance(resourceGroupName string, managedInstanceName string, options *ManagedInstanceKeysClientListByInstanceOptions) *runtime.Pager[ManagedInstanceKeysClientListByInstanceResponse]
ListByInstance - Gets a list of managed instance keys. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByInstance method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceKeyList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstanceKeysClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByInstance("<resource-group-name>", "<managed-instance-name>", &armsql.ManagedInstanceKeysClientListByInstanceOptions{Filter: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ManagedInstanceKeysClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedInstanceKeysClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceKeysClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceKeysClient.BeginCreateOrUpdate method.
type ManagedInstanceKeysClientBeginDeleteOptions ¶ added in v0.3.0
type ManagedInstanceKeysClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceKeysClientBeginDeleteOptions contains the optional parameters for the ManagedInstanceKeysClient.BeginDelete method.
type ManagedInstanceKeysClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedInstanceKeysClientCreateOrUpdateResponse struct {
ManagedInstanceKey
}
ManagedInstanceKeysClientCreateOrUpdateResponse contains the response from method ManagedInstanceKeysClient.CreateOrUpdate.
type ManagedInstanceKeysClientDeleteResponse ¶ added in v0.3.0
type ManagedInstanceKeysClientDeleteResponse struct { }
ManagedInstanceKeysClientDeleteResponse contains the response from method ManagedInstanceKeysClient.Delete.
type ManagedInstanceKeysClientGetOptions ¶ added in v0.3.0
type ManagedInstanceKeysClientGetOptions struct { }
ManagedInstanceKeysClientGetOptions contains the optional parameters for the ManagedInstanceKeysClient.Get method.
type ManagedInstanceKeysClientGetResponse ¶ added in v0.3.0
type ManagedInstanceKeysClientGetResponse struct {
ManagedInstanceKey
}
ManagedInstanceKeysClientGetResponse contains the response from method ManagedInstanceKeysClient.Get.
type ManagedInstanceKeysClientListByInstanceOptions ¶ added in v0.3.0
type ManagedInstanceKeysClientListByInstanceOptions struct { // An OData filter expression that filters elements in the collection. Filter *string }
ManagedInstanceKeysClientListByInstanceOptions contains the optional parameters for the ManagedInstanceKeysClient.ListByInstance method.
type ManagedInstanceKeysClientListByInstanceResponse ¶ added in v0.3.0
type ManagedInstanceKeysClientListByInstanceResponse struct {
ManagedInstanceKeyListResult
}
ManagedInstanceKeysClientListByInstanceResponse contains the response from method ManagedInstanceKeysClient.ListByInstance.
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 `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ManagedInstance `json:"value,omitempty" azure:"ro"` }
ManagedInstanceListResult - A list of managed instances.
func (ManagedInstanceListResult) MarshalJSON ¶
func (m ManagedInstanceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceListResult.
type ManagedInstanceLongTermRetentionBackup ¶
type ManagedInstanceLongTermRetentionBackup struct { // Resource properties. Properties *ManagedInstanceLongTermRetentionBackupProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ManagedInstanceLongTermRetentionBackup - A long term retention backup for a managed database.
type ManagedInstanceLongTermRetentionBackupListResult ¶
type ManagedInstanceLongTermRetentionBackupListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ManagedInstanceLongTermRetentionBackup `json:"value,omitempty" azure:"ro"` }
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.
type ManagedInstanceLongTermRetentionBackupProperties ¶
type ManagedInstanceLongTermRetentionBackupProperties struct { // READ-ONLY; The time the long term retention backup will expire. BackupExpirationTime *time.Time `json:"backupExpirationTime,omitempty" azure:"ro"` // READ-ONLY; The storage redundancy type of the backup BackupStorageRedundancy *BackupStorageRedundancy `json:"backupStorageRedundancy,omitempty" azure:"ro"` // READ-ONLY; The time the backup was taken BackupTime *time.Time `json:"backupTime,omitempty" azure:"ro"` // READ-ONLY; The delete time of the database DatabaseDeletionTime *time.Time `json:"databaseDeletionTime,omitempty" azure:"ro"` // READ-ONLY; The name of the database the backup belong to DatabaseName *string `json:"databaseName,omitempty" azure:"ro"` // READ-ONLY; The create time of the instance. ManagedInstanceCreateTime *time.Time `json:"managedInstanceCreateTime,omitempty" azure:"ro"` // READ-ONLY; The managed instance that the backup database belongs to. ManagedInstanceName *string `json:"managedInstanceName,omitempty" azure:"ro"` }
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) (*armruntime.Poller[ManagedInstanceLongTermRetentionPoliciesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Sets a managed database's long term retention policy. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceLongTermRetentionPolicyCreateOrUpdate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstanceLongTermRetentionPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", armsql.ManagedInstanceLongTermRetentionPolicyNameDefault, armsql.ManagedInstanceLongTermRetentionPolicy{ Properties: &armsql.BaseLongTermRetentionPolicyProperties{ MonthlyRetention: to.Ptr("<monthly-retention>"), WeekOfYear: to.Ptr[int32](5), WeeklyRetention: to.Ptr("<weekly-retention>"), YearlyRetention: to.Ptr("<yearly-retention>"), }, }, &armsql.ManagedInstanceLongTermRetentionPoliciesClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceLongTermRetentionPolicyGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstanceLongTermRetentionPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", "<database-name>", armsql.ManagedInstanceLongTermRetentionPolicyNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedInstanceLongTermRetentionPoliciesClient) ListByDatabase ¶
func (client *ManagedInstanceLongTermRetentionPoliciesClient) ListByDatabase(resourceGroupName string, managedInstanceName string, databaseName string, options *ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseOptions) *runtime.Pager[ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseResponse]
ListByDatabase - Gets a database's long term retention policy. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceLongTermRetentionPolicyListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstanceLongTermRetentionPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<managed-instance-name>", "<database-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ManagedInstanceLongTermRetentionPoliciesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedInstanceLongTermRetentionPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceLongTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceLongTermRetentionPoliciesClient.BeginCreateOrUpdate method.
type ManagedInstanceLongTermRetentionPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedInstanceLongTermRetentionPoliciesClientCreateOrUpdateResponse struct {
ManagedInstanceLongTermRetentionPolicy
}
ManagedInstanceLongTermRetentionPoliciesClientCreateOrUpdateResponse contains the response from method ManagedInstanceLongTermRetentionPoliciesClient.CreateOrUpdate.
type ManagedInstanceLongTermRetentionPoliciesClientGetOptions ¶ added in v0.3.0
type ManagedInstanceLongTermRetentionPoliciesClientGetOptions struct { }
ManagedInstanceLongTermRetentionPoliciesClientGetOptions contains the optional parameters for the ManagedInstanceLongTermRetentionPoliciesClient.Get method.
type ManagedInstanceLongTermRetentionPoliciesClientGetResponse ¶ added in v0.3.0
type ManagedInstanceLongTermRetentionPoliciesClientGetResponse struct {
ManagedInstanceLongTermRetentionPolicy
}
ManagedInstanceLongTermRetentionPoliciesClientGetResponse contains the response from method ManagedInstanceLongTermRetentionPoliciesClient.Get.
type ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseOptions ¶ added in v0.3.0
type ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseOptions struct { }
ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseOptions contains the optional parameters for the ManagedInstanceLongTermRetentionPoliciesClient.ListByDatabase method.
type ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseResponse ¶ added in v0.3.0
type ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseResponse struct {
ManagedInstanceLongTermRetentionPolicyListResult
}
ManagedInstanceLongTermRetentionPoliciesClientListByDatabaseResponse contains the response from method ManagedInstanceLongTermRetentionPoliciesClient.ListByDatabase.
type ManagedInstanceLongTermRetentionPolicy ¶
type ManagedInstanceLongTermRetentionPolicy struct { // Resource properties. Properties *BaseLongTermRetentionPolicyProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ManagedInstanceLongTermRetentionPolicy - A long term retention policy.
type ManagedInstanceLongTermRetentionPolicyListResult ¶
type ManagedInstanceLongTermRetentionPolicyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ManagedInstanceLongTermRetentionPolicy `json:"value,omitempty" azure:"ro"` }
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.
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 `json:"reason,omitempty"` // READ-ONLY; Maintenance configuration name Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The status of the capability. Status *CapabilityStatus `json:"status,omitempty" azure:"ro"` }
ManagedInstanceMaintenanceConfigurationCapability - The maintenance configuration capability
type ManagedInstanceOperation ¶
type ManagedInstanceOperation struct { // Resource properties. Properties *ManagedInstanceOperationProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ManagedInstanceOperation - A managed instance operation.
type ManagedInstanceOperationListResult ¶
type ManagedInstanceOperationListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ManagedInstanceOperation `json:"value,omitempty" azure:"ro"` }
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.
type ManagedInstanceOperationParametersPair ¶
type ManagedInstanceOperationParametersPair struct { // READ-ONLY; The current parameters. CurrentParameters *UpsertManagedServerOperationParameters `json:"currentParameters,omitempty" azure:"ro"` // READ-ONLY; The requested parameters. RequestedParameters *UpsertManagedServerOperationParameters `json:"requestedParameters,omitempty" azure:"ro"` }
ManagedInstanceOperationParametersPair - The parameters of a managed instance operation.
type ManagedInstanceOperationProperties ¶
type ManagedInstanceOperationProperties struct { // READ-ONLY; The operation description. Description *string `json:"description,omitempty" azure:"ro"` // READ-ONLY; The operation error code. ErrorCode *int32 `json:"errorCode,omitempty" azure:"ro"` // READ-ONLY; The operation error description. ErrorDescription *string `json:"errorDescription,omitempty" azure:"ro"` // READ-ONLY; The operation error severity. ErrorSeverity *int32 `json:"errorSeverity,omitempty" azure:"ro"` // READ-ONLY; The estimated completion time of the operation. EstimatedCompletionTime *time.Time `json:"estimatedCompletionTime,omitempty" azure:"ro"` // READ-ONLY; Whether the operation can be cancelled. IsCancellable *bool `json:"isCancellable,omitempty" azure:"ro"` // READ-ONLY; Whether or not the error is a user error. IsUserError *bool `json:"isUserError,omitempty" azure:"ro"` // READ-ONLY; The name of the managed instance the operation is being performed on. ManagedInstanceName *string `json:"managedInstanceName,omitempty" azure:"ro"` // READ-ONLY; The name of operation. Operation *string `json:"operation,omitempty" azure:"ro"` // READ-ONLY; The friendly name of operation. OperationFriendlyName *string `json:"operationFriendlyName,omitempty" azure:"ro"` // READ-ONLY; The operation parameters. OperationParameters *ManagedInstanceOperationParametersPair `json:"operationParameters,omitempty" azure:"ro"` // READ-ONLY; The operation steps. OperationSteps *ManagedInstanceOperationSteps `json:"operationSteps,omitempty" azure:"ro"` // READ-ONLY; The percentage of the operation completed. PercentComplete *int32 `json:"percentComplete,omitempty" azure:"ro"` // READ-ONLY; The operation start time. StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` // READ-ONLY; The operation state. State *ManagementOperationState `json:"state,omitempty" azure:"ro"` }
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 `json:"currentStep,omitempty" azure:"ro"` // READ-ONLY; The operation steps list. StepsList []*UpsertManagedServerOperationStep `json:"stepsList,omitempty" azure:"ro"` // READ-ONLY; The total number of operation steps. TotalSteps *string `json:"totalSteps,omitempty" azure:"ro"` }
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.
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CancelManagedInstanceOperation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstanceOperationsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Cancel(ctx, "<resource-group-name>", "<managed-instance-name>", "<operation-id>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetManagedInstanceOperation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstanceOperationsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", "<operation-id>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedInstanceOperationsClient) ListByManagedInstance ¶
func (client *ManagedInstanceOperationsClient) ListByManagedInstance(resourceGroupName string, managedInstanceName string, options *ManagedInstanceOperationsClientListByManagedInstanceOptions) *runtime.Pager[ManagedInstanceOperationsClientListByManagedInstanceResponse]
ListByManagedInstance - Gets a list of operations performed on the managed instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByManagedInstance method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListManagedInstanceOperations.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstanceOperationsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByManagedInstance("<resource-group-name>", "<managed-instance-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ManagedInstanceOperationsClientCancelOptions ¶ added in v0.3.0
type ManagedInstanceOperationsClientCancelOptions struct { }
ManagedInstanceOperationsClientCancelOptions contains the optional parameters for the ManagedInstanceOperationsClient.Cancel method.
type ManagedInstanceOperationsClientCancelResponse ¶ added in v0.3.0
type ManagedInstanceOperationsClientCancelResponse struct { }
ManagedInstanceOperationsClientCancelResponse contains the response from method ManagedInstanceOperationsClient.Cancel.
type ManagedInstanceOperationsClientGetOptions ¶ added in v0.3.0
type ManagedInstanceOperationsClientGetOptions struct { }
ManagedInstanceOperationsClientGetOptions contains the optional parameters for the ManagedInstanceOperationsClient.Get method.
type ManagedInstanceOperationsClientGetResponse ¶ added in v0.3.0
type ManagedInstanceOperationsClientGetResponse struct {
ManagedInstanceOperation
}
ManagedInstanceOperationsClientGetResponse contains the response from method ManagedInstanceOperationsClient.Get.
type ManagedInstanceOperationsClientListByManagedInstanceOptions ¶ added in v0.3.0
type ManagedInstanceOperationsClientListByManagedInstanceOptions struct { }
ManagedInstanceOperationsClientListByManagedInstanceOptions contains the optional parameters for the ManagedInstanceOperationsClient.ListByManagedInstance method.
type ManagedInstanceOperationsClientListByManagedInstanceResponse ¶ added in v0.3.0
type ManagedInstanceOperationsClientListByManagedInstanceResponse struct {
ManagedInstanceOperationListResult
}
ManagedInstanceOperationsClientListByManagedInstanceResponse contains the response from method ManagedInstanceOperationsClient.ListByManagedInstance.
type ManagedInstancePairInfo ¶
type ManagedInstancePairInfo struct { // Id of Partner Managed Instance in pair. PartnerManagedInstanceID *string `json:"partnerManagedInstanceId,omitempty"` // Id of Primary Managed Instance in pair. PrimaryManagedInstanceID *string `json:"primaryManagedInstanceId,omitempty"` }
ManagedInstancePairInfo - Pairs of Managed Instances in the failover group.
type ManagedInstancePecProperty ¶
type ManagedInstancePecProperty struct { // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Private endpoint connection properties Properties *ManagedInstancePrivateEndpointConnectionProperties `json:"properties,omitempty" azure:"ro"` }
ManagedInstancePecProperty - A private endpoint connection under a managed instance
type ManagedInstancePrivateEndpointConnection ¶
type ManagedInstancePrivateEndpointConnection struct { // Resource properties. Properties *ManagedInstancePrivateEndpointConnectionProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ManagedInstancePrivateEndpointConnection - A private endpoint connection
type ManagedInstancePrivateEndpointConnectionListResult ¶
type ManagedInstancePrivateEndpointConnectionListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ManagedInstancePrivateEndpointConnection `json:"value,omitempty" azure:"ro"` }
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.
type ManagedInstancePrivateEndpointConnectionProperties ¶
type ManagedInstancePrivateEndpointConnectionProperties struct { // Private endpoint which the connection belongs to. PrivateEndpoint *ManagedInstancePrivateEndpointProperty `json:"privateEndpoint,omitempty"` // Connection State of the Private Endpoint Connection. PrivateLinkServiceConnectionState *ManagedInstancePrivateLinkServiceConnectionStateProperty `json:"privateLinkServiceConnectionState,omitempty"` // READ-ONLY; State of the Private Endpoint Connection. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` }
ManagedInstancePrivateEndpointConnectionProperties - Properties of a private endpoint connection.
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) (*armruntime.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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstancePrivateEndpointConnectionUpdate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstancePrivateEndpointConnectionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<managed-instance-name>", "<private-endpoint-connection-name>", armsql.ManagedInstancePrivateEndpointConnection{ Properties: &armsql.ManagedInstancePrivateEndpointConnectionProperties{ PrivateLinkServiceConnectionState: &armsql.ManagedInstancePrivateLinkServiceConnectionStateProperty{ Description: to.Ptr("<description>"), Status: to.Ptr("<status>"), }, }, }, &armsql.ManagedInstancePrivateEndpointConnectionsClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedInstancePrivateEndpointConnectionsClient) BeginDelete ¶
func (client *ManagedInstancePrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, privateEndpointConnectionName string, options *ManagedInstancePrivateEndpointConnectionsClientBeginDeleteOptions) (*armruntime.Poller[ManagedInstancePrivateEndpointConnectionsClientDeleteResponse], error)
BeginDelete - Deletes a private endpoint connection with a given name. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstancePrivateEndpointConnectionDelete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstancePrivateEndpointConnectionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<managed-instance-name>", "<private-endpoint-connection-name>", &armsql.ManagedInstancePrivateEndpointConnectionsClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstancePrivateEndpointConnectionGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstancePrivateEndpointConnectionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", "<private-endpoint-connection-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedInstancePrivateEndpointConnectionsClient) ListByManagedInstance ¶
func (client *ManagedInstancePrivateEndpointConnectionsClient) ListByManagedInstance(resourceGroupName string, managedInstanceName string, options *ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceOptions) *runtime.Pager[ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceResponse]
ListByManagedInstance - Gets all private endpoint connections on a server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByManagedInstance method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstancePrivateEndpointConnectionList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstancePrivateEndpointConnectionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByManagedInstance("<resource-group-name>", "<managed-instance-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ManagedInstancePrivateEndpointConnectionsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedInstancePrivateEndpointConnectionsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstancePrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstancePrivateEndpointConnectionsClient.BeginCreateOrUpdate method.
type ManagedInstancePrivateEndpointConnectionsClientBeginDeleteOptions ¶ added in v0.3.0
type ManagedInstancePrivateEndpointConnectionsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstancePrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the ManagedInstancePrivateEndpointConnectionsClient.BeginDelete method.
type ManagedInstancePrivateEndpointConnectionsClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedInstancePrivateEndpointConnectionsClientCreateOrUpdateResponse struct {
ManagedInstancePrivateEndpointConnection
}
ManagedInstancePrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method ManagedInstancePrivateEndpointConnectionsClient.CreateOrUpdate.
type ManagedInstancePrivateEndpointConnectionsClientDeleteResponse ¶ added in v0.3.0
type ManagedInstancePrivateEndpointConnectionsClientDeleteResponse struct { }
ManagedInstancePrivateEndpointConnectionsClientDeleteResponse contains the response from method ManagedInstancePrivateEndpointConnectionsClient.Delete.
type ManagedInstancePrivateEndpointConnectionsClientGetOptions ¶ added in v0.3.0
type ManagedInstancePrivateEndpointConnectionsClientGetOptions struct { }
ManagedInstancePrivateEndpointConnectionsClientGetOptions contains the optional parameters for the ManagedInstancePrivateEndpointConnectionsClient.Get method.
type ManagedInstancePrivateEndpointConnectionsClientGetResponse ¶ added in v0.3.0
type ManagedInstancePrivateEndpointConnectionsClientGetResponse struct {
ManagedInstancePrivateEndpointConnection
}
ManagedInstancePrivateEndpointConnectionsClientGetResponse contains the response from method ManagedInstancePrivateEndpointConnectionsClient.Get.
type ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceOptions ¶ added in v0.3.0
type ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceOptions struct { }
ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceOptions contains the optional parameters for the ManagedInstancePrivateEndpointConnectionsClient.ListByManagedInstance method.
type ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceResponse ¶ added in v0.3.0
type ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceResponse struct {
ManagedInstancePrivateEndpointConnectionListResult
}
ManagedInstancePrivateEndpointConnectionsClientListByManagedInstanceResponse contains the response from method ManagedInstancePrivateEndpointConnectionsClient.ListByManagedInstance.
type ManagedInstancePrivateEndpointProperty ¶
type ManagedInstancePrivateEndpointProperty struct { // Resource id of the private endpoint. ID *string `json:"id,omitempty"` }
type ManagedInstancePrivateLink ¶
type ManagedInstancePrivateLink struct { // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The private link resource group id. Properties *ManagedInstancePrivateLinkProperties `json:"properties,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ManagedInstancePrivateLink - A private link resource
type ManagedInstancePrivateLinkListResult ¶
type ManagedInstancePrivateLinkListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ManagedInstancePrivateLink `json:"value,omitempty" azure:"ro"` }
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.
type ManagedInstancePrivateLinkProperties ¶
type ManagedInstancePrivateLinkProperties struct { // READ-ONLY; The private link resource group id. GroupID *string `json:"groupId,omitempty" azure:"ro"` // READ-ONLY; The private link resource required member names. RequiredMembers []*string `json:"requiredMembers,omitempty" azure:"ro"` }
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.
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstancePrivateLinkResourcesGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstancePrivateLinkResourcesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", "<group-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedInstancePrivateLinkResourcesClient) ListByManagedInstance ¶
func (client *ManagedInstancePrivateLinkResourcesClient) ListByManagedInstance(resourceGroupName string, managedInstanceName string, options *ManagedInstancePrivateLinkResourcesClientListByManagedInstanceOptions) *runtime.Pager[ManagedInstancePrivateLinkResourcesClientListByManagedInstanceResponse]
ListByManagedInstance - Gets the private link resources for SQL server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByManagedInstance method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstancePrivateLinkResourcesList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstancePrivateLinkResourcesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByManagedInstance("<resource-group-name>", "<managed-instance-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ManagedInstancePrivateLinkResourcesClientGetOptions ¶ added in v0.3.0
type ManagedInstancePrivateLinkResourcesClientGetOptions struct { }
ManagedInstancePrivateLinkResourcesClientGetOptions contains the optional parameters for the ManagedInstancePrivateLinkResourcesClient.Get method.
type ManagedInstancePrivateLinkResourcesClientGetResponse ¶ added in v0.3.0
type ManagedInstancePrivateLinkResourcesClientGetResponse struct {
ManagedInstancePrivateLink
}
ManagedInstancePrivateLinkResourcesClientGetResponse contains the response from method ManagedInstancePrivateLinkResourcesClient.Get.
type ManagedInstancePrivateLinkResourcesClientListByManagedInstanceOptions ¶ added in v0.3.0
type ManagedInstancePrivateLinkResourcesClientListByManagedInstanceOptions struct { }
ManagedInstancePrivateLinkResourcesClientListByManagedInstanceOptions contains the optional parameters for the ManagedInstancePrivateLinkResourcesClient.ListByManagedInstance method.
type ManagedInstancePrivateLinkResourcesClientListByManagedInstanceResponse ¶ added in v0.3.0
type ManagedInstancePrivateLinkResourcesClientListByManagedInstanceResponse struct {
ManagedInstancePrivateLinkListResult
}
ManagedInstancePrivateLinkResourcesClientListByManagedInstanceResponse contains the response from method ManagedInstancePrivateLinkResourcesClient.ListByManagedInstance.
type ManagedInstancePrivateLinkServiceConnectionStateProperty ¶
type ManagedInstancePrivateLinkServiceConnectionStateProperty struct { // REQUIRED; The private link service connection description. Description *string `json:"description,omitempty"` // REQUIRED; The private link service connection status. Status *string `json:"status,omitempty"` // READ-ONLY; The private link service connection description. ActionsRequired *string `json:"actionsRequired,omitempty" azure:"ro"` }
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 `json:"administratorLogin,omitempty"` // The administrator login password (required for managed instance creation). AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` // The Azure Active Directory administrator of the server. Administrators *ManagedInstanceExternalAdministrator `json:"administrators,omitempty"` // Collation of the managed instance. Collation *string `json:"collation,omitempty"` // The resource id of another managed instance whose DNS zone this managed instance will share after creation. DNSZonePartner *string `json:"dnsZonePartner,omitempty"` // The Id of the instance pool this managed server belongs to. InstancePoolID *string `json:"instancePoolId,omitempty"` // A CMK URI of the key to use for encryption. KeyID *string `json:"keyId,omitempty"` // 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 `json:"licenseType,omitempty"` // Specifies maintenance configuration id to apply to this managed instance. MaintenanceConfigurationID *string `json:"maintenanceConfigurationId,omitempty"` // 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 `json:"managedInstanceCreateMode,omitempty"` // Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2' MinimalTLSVersion *string `json:"minimalTlsVersion,omitempty"` // The resource id of a user assigned identity to be used by default. PrimaryUserAssignedIdentityID *string `json:"primaryUserAssignedIdentityId,omitempty"` // Connection type used for connecting to the instance. ProxyOverride *ManagedInstanceProxyOverride `json:"proxyOverride,omitempty"` // Whether or not the public data endpoint is enabled. PublicDataEndpointEnabled *bool `json:"publicDataEndpointEnabled,omitempty"` // 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 `json:"requestedBackupStorageRedundancy,omitempty"` // Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. RestorePointInTime *time.Time `json:"restorePointInTime,omitempty"` // The managed instance's service principal. ServicePrincipal *ServicePrincipal `json:"servicePrincipal,omitempty"` // The resource identifier of the source managed instance associated with create operation of this instance. SourceManagedInstanceID *string `json:"sourceManagedInstanceId,omitempty"` // Storage size in GB. Minimum value: 32. Maximum value: 8192. Increments of 32 GB allowed only. StorageSizeInGB *int32 `json:"storageSizeInGB,omitempty"` // Subnet resource ID for the managed instance. SubnetID *string `json:"subnetId,omitempty"` // 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 `json:"timezoneId,omitempty"` // The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. VCores *int32 `json:"vCores,omitempty"` // Whether or not the multi-az is enabled. ZoneRedundant *bool `json:"zoneRedundant,omitempty"` // 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 `json:"currentBackupStorageRedundancy,omitempty" azure:"ro"` // READ-ONLY; The Dns Zone that the managed instance is in. DNSZone *string `json:"dnsZone,omitempty" azure:"ro"` // READ-ONLY; The fully qualified domain name of the managed instance. FullyQualifiedDomainName *string `json:"fullyQualifiedDomainName,omitempty" azure:"ro"` // READ-ONLY; List of private endpoint connections on a managed instance. PrivateEndpointConnections []*ManagedInstancePecProperty `json:"privateEndpointConnections,omitempty" azure:"ro"` // READ-ONLY ProvisioningState *ManagedInstancePropertiesProvisioningState `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; The state of the managed instance. State *string `json:"state,omitempty" azure:"ro"` }
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 `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ManagedInstanceQuery - Database query.
type ManagedInstanceQueryStatistics ¶
type ManagedInstanceQueryStatistics struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*QueryStatistics `json:"value,omitempty" azure:"ro"` }
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.
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) (*armruntime.Poller[ManagedInstanceTdeCertificatesClientCreateResponse], error)
BeginCreate - Creates a TDE certificate for a given server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceTdeCertificate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstanceTdeCertificatesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreate(ctx, "<resource-group-name>", "<managed-instance-name>", armsql.TdeCertificate{ Properties: &armsql.TdeCertificateProperties{ PrivateBlob: to.Ptr("<private-blob>"), }, }, &armsql.ManagedInstanceTdeCertificatesClientBeginCreateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
type ManagedInstanceTdeCertificatesClientBeginCreateOptions ¶ added in v0.3.0
type ManagedInstanceTdeCertificatesClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstanceTdeCertificatesClientBeginCreateOptions contains the optional parameters for the ManagedInstanceTdeCertificatesClient.BeginCreate method.
type ManagedInstanceTdeCertificatesClientCreateResponse ¶ added in v0.3.0
type ManagedInstanceTdeCertificatesClientCreateResponse struct { }
ManagedInstanceTdeCertificatesClientCreateResponse contains the response from method ManagedInstanceTdeCertificatesClient.Create.
type ManagedInstanceUpdate ¶
type ManagedInstanceUpdate struct { // Managed instance identity Identity *ResourceIdentity `json:"identity,omitempty"` // Resource properties. Properties *ManagedInstanceProperties `json:"properties,omitempty"` // Managed instance sku SKU *SKU `json:"sku,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` }
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.
type ManagedInstanceVcoresCapability ¶
type ManagedInstanceVcoresCapability struct { // The reason for the capability not being available. Reason *string `json:"reason,omitempty"` // READ-ONLY; Included size. IncludedMaxSize *MaxSizeCapability `json:"includedMaxSize,omitempty" azure:"ro"` // READ-ONLY; True if this service objective is supported for managed instances in an instance pool. InstancePoolSupported *bool `json:"instancePoolSupported,omitempty" azure:"ro"` // READ-ONLY; The virtual cores identifier. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; True if this service objective is supported for standalone managed instances. StandaloneSupported *bool `json:"standaloneSupported,omitempty" azure:"ro"` // READ-ONLY; The status of the capability. Status *CapabilityStatus `json:"status,omitempty" azure:"ro"` // READ-ONLY; List of supported maintenance configurations SupportedMaintenanceConfigurations []*ManagedInstanceMaintenanceConfigurationCapability `json:"supportedMaintenanceConfigurations,omitempty" azure:"ro"` // READ-ONLY; Storage size ranges. SupportedStorageSizes []*MaxSizeRangeCapability `json:"supportedStorageSizes,omitempty" azure:"ro"` // READ-ONLY; The virtual cores value. Value *int32 `json:"value,omitempty" azure:"ro"` }
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.
type ManagedInstanceVersionCapability ¶
type ManagedInstanceVersionCapability struct { // The reason for the capability not being available. Reason *string `json:"reason,omitempty"` // READ-ONLY; The server version name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The status of the capability. Status *CapabilityStatus `json:"status,omitempty" azure:"ro"` // READ-ONLY; The list of supported managed instance editions. SupportedEditions []*ManagedInstanceEditionCapability `json:"supportedEditions,omitempty" azure:"ro"` // READ-ONLY; The list of supported instance pool editions. SupportedInstancePoolEditions []*InstancePoolEditionCapability `json:"supportedInstancePoolEditions,omitempty" azure:"ro"` }
ManagedInstanceVersionCapability - The managed instance capability
func (ManagedInstanceVersionCapability) MarshalJSON ¶
func (m ManagedInstanceVersionCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedInstanceVersionCapability.
type ManagedInstanceVulnerabilityAssessment ¶
type ManagedInstanceVulnerabilityAssessment struct { // Resource properties. Properties *ManagedInstanceVulnerabilityAssessmentProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ManagedInstanceVulnerabilityAssessment - A managed instance vulnerability assessment.
type ManagedInstanceVulnerabilityAssessmentListResult ¶
type ManagedInstanceVulnerabilityAssessmentListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ManagedInstanceVulnerabilityAssessment `json:"value,omitempty" azure:"ro"` }
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.
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 `json:"storageContainerPath,omitempty"` // The recurring scans settings RecurringScans *VulnerabilityAssessmentRecurringScansProperties `json:"recurringScans,omitempty"` // 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 `json:"storageAccountAccessKey,omitempty"` // 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 `json:"storageContainerSasKey,omitempty"` }
ManagedInstanceVulnerabilityAssessmentProperties - Properties of a managed instance vulnerability assessment.
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. resourceGroupName - 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstanceVulnerabilityAssessmentsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.CreateOrUpdate(ctx, "<resource-group-name>", "<managed-instance-name>", 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("<storage-account-access-key>"), StorageContainerPath: to.Ptr("<storage-container-path>"), StorageContainerSasKey: to.Ptr("<storage-container-sas-key>"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceVulnerabilityAssessmentDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstanceVulnerabilityAssessmentsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Delete(ctx, "<resource-group-name>", "<managed-instance-name>", armsql.VulnerabilityAssessmentNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceVulnerabilityAssessmentGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstanceVulnerabilityAssessmentsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", armsql.VulnerabilityAssessmentNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedInstanceVulnerabilityAssessmentsClient) ListByInstance ¶
func (client *ManagedInstanceVulnerabilityAssessmentsClient) ListByInstance(resourceGroupName string, managedInstanceName string, options *ManagedInstanceVulnerabilityAssessmentsClientListByInstanceOptions) *runtime.Pager[ManagedInstanceVulnerabilityAssessmentsClientListByInstanceResponse]
ListByInstance - Gets the managed instance's vulnerability assessment policies. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByInstance method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceVulnerabilityAssessmentListByInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstanceVulnerabilityAssessmentsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByInstance("<resource-group-name>", "<managed-instance-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateOptions struct { }
ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the ManagedInstanceVulnerabilityAssessmentsClient.CreateOrUpdate method.
type ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateResponse struct {
ManagedInstanceVulnerabilityAssessment
}
ManagedInstanceVulnerabilityAssessmentsClientCreateOrUpdateResponse contains the response from method ManagedInstanceVulnerabilityAssessmentsClient.CreateOrUpdate.
type ManagedInstanceVulnerabilityAssessmentsClientDeleteOptions ¶ added in v0.3.0
type ManagedInstanceVulnerabilityAssessmentsClientDeleteOptions struct { }
ManagedInstanceVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the ManagedInstanceVulnerabilityAssessmentsClient.Delete method.
type ManagedInstanceVulnerabilityAssessmentsClientDeleteResponse ¶ added in v0.3.0
type ManagedInstanceVulnerabilityAssessmentsClientDeleteResponse struct { }
ManagedInstanceVulnerabilityAssessmentsClientDeleteResponse contains the response from method ManagedInstanceVulnerabilityAssessmentsClient.Delete.
type ManagedInstanceVulnerabilityAssessmentsClientGetOptions ¶ added in v0.3.0
type ManagedInstanceVulnerabilityAssessmentsClientGetOptions struct { }
ManagedInstanceVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the ManagedInstanceVulnerabilityAssessmentsClient.Get method.
type ManagedInstanceVulnerabilityAssessmentsClientGetResponse ¶ added in v0.3.0
type ManagedInstanceVulnerabilityAssessmentsClientGetResponse struct {
ManagedInstanceVulnerabilityAssessment
}
ManagedInstanceVulnerabilityAssessmentsClientGetResponse contains the response from method ManagedInstanceVulnerabilityAssessmentsClient.Get.
type ManagedInstanceVulnerabilityAssessmentsClientListByInstanceOptions ¶ added in v0.3.0
type ManagedInstanceVulnerabilityAssessmentsClientListByInstanceOptions struct { }
ManagedInstanceVulnerabilityAssessmentsClientListByInstanceOptions contains the optional parameters for the ManagedInstanceVulnerabilityAssessmentsClient.ListByInstance method.
type ManagedInstanceVulnerabilityAssessmentsClientListByInstanceResponse ¶ added in v0.3.0
type ManagedInstanceVulnerabilityAssessmentsClientListByInstanceResponse struct {
ManagedInstanceVulnerabilityAssessmentListResult
}
ManagedInstanceVulnerabilityAssessmentsClientListByInstanceResponse contains the response from method ManagedInstanceVulnerabilityAssessmentsClient.ListByInstance.
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) (*armruntime.Poller[ManagedInstancesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a managed instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceCreateMax.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstancesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<managed-instance-name>", armsql.ManagedInstance{ Location: to.Ptr("<location>"), Tags: map[string]*string{ "tagKey1": to.Ptr("TagValue1"), }, Properties: &armsql.ManagedInstanceProperties{ AdministratorLogin: to.Ptr("<administrator-login>"), AdministratorLoginPassword: to.Ptr("<administrator-login-password>"), Administrators: &armsql.ManagedInstanceExternalAdministrator{ AzureADOnlyAuthentication: to.Ptr(true), Login: to.Ptr("<login>"), PrincipalType: to.Ptr(armsql.PrincipalTypeUser), Sid: to.Ptr("<sid>"), TenantID: to.Ptr("<tenant-id>"), }, Collation: to.Ptr("<collation>"), DNSZonePartner: to.Ptr("<dnszone-partner>"), InstancePoolID: to.Ptr("<instance-pool-id>"), LicenseType: to.Ptr(armsql.ManagedInstanceLicenseTypeLicenseIncluded), MaintenanceConfigurationID: to.Ptr("<maintenance-configuration-id>"), MinimalTLSVersion: to.Ptr("<minimal-tlsversion>"), 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("<subnet-id>"), TimezoneID: to.Ptr("<timezone-id>"), VCores: to.Ptr[int32](8), }, SKU: &armsql.SKU{ Name: to.Ptr("<name>"), Tier: to.Ptr("<tier>"), }, }, &armsql.ManagedInstancesClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedInstancesClient) BeginDelete ¶
func (client *ManagedInstancesClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstancesClientBeginDeleteOptions) (*armruntime.Poller[ManagedInstancesClientDeleteResponse], error)
BeginDelete - Deletes a managed instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceDelete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstancesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<managed-instance-name>", &armsql.ManagedInstancesClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*ManagedInstancesClient) BeginFailover ¶
func (client *ManagedInstancesClient) BeginFailover(ctx context.Context, resourceGroupName string, managedInstanceName string, options *ManagedInstancesClientBeginFailoverOptions) (*armruntime.Poller[ManagedInstancesClientFailoverResponse], error)
BeginFailover - Failovers a managed instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/FailoverManagedInstance.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstancesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginFailover(ctx, "<resource-group-name>", "<managed-instance-name>", &armsql.ManagedInstancesClientBeginFailoverOptions{ReplicaType: to.Ptr(armsql.ReplicaTypePrimary), ResumeToken: "", }) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*ManagedInstancesClient) BeginUpdate ¶
func (client *ManagedInstancesClient) BeginUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters ManagedInstanceUpdate, options *ManagedInstancesClientBeginUpdateOptions) (*armruntime.Poller[ManagedInstancesClientUpdateResponse], error)
BeginUpdate - Updates a managed instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceRemoveMaintenanceConfiguration.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstancesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginUpdate(ctx, "<resource-group-name>", "<managed-instance-name>", armsql.ManagedInstanceUpdate{ Properties: &armsql.ManagedInstanceProperties{ MaintenanceConfigurationID: to.Ptr("<maintenance-configuration-id>"), }, }, &armsql.ManagedInstancesClientBeginUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstancesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", &armsql.ManagedInstancesClientGetOptions{Expand: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedInstancesClient) List ¶
func (client *ManagedInstancesClient) List(options *ManagedInstancesClientListOptions) *runtime.Pager[ManagedInstancesClientListResponse]
List - Gets a list of all managed instances in the subscription. If the operation fails it returns an *azcore.ResponseError type. options - ManagedInstancesClientListOptions contains the optional parameters for the ManagedInstancesClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstancesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.List(&armsql.ManagedInstancesClientListOptions{Expand: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*ManagedInstancesClient) ListByInstancePool ¶
func (client *ManagedInstancesClient) ListByInstancePool(resourceGroupName string, instancePoolName string, options *ManagedInstancesClientListByInstancePoolOptions) *runtime.Pager[ManagedInstancesClientListByInstancePoolResponse]
ListByInstancePool - Gets a list of all managed instances in an instance pool. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByInstancePool method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceListByInstancePool.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstancesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByInstancePool("<resource-group-name>", "<instance-pool-name>", &armsql.ManagedInstancesClientListByInstancePoolOptions{Expand: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*ManagedInstancesClient) ListByManagedInstance ¶
func (client *ManagedInstancesClient) ListByManagedInstance(resourceGroupName string, managedInstanceName string, options *ManagedInstancesClientListByManagedInstanceOptions) *runtime.Pager[ManagedInstancesClientListByManagedInstanceResponse]
ListByManagedInstance - Get top resource consuming queries of a managed instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByManagedInstance method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceTopQueriesList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstancesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByManagedInstance("<resource-group-name>", "<managed-instance-name>", &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() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*ManagedInstancesClient) ListByResourceGroup ¶
func (client *ManagedInstancesClient) ListByResourceGroup(resourceGroupName string, options *ManagedInstancesClientListByResourceGroupOptions) *runtime.Pager[ManagedInstancesClientListByResourceGroupResponse]
ListByResourceGroup - Gets a list of managed instances in a resource group. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ManagedInstanceListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedInstancesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByResourceGroup("<resource-group-name>", &armsql.ManagedInstancesClientListByResourceGroupOptions{Expand: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ManagedInstancesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedInstancesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstancesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedInstancesClient.BeginCreateOrUpdate method.
type ManagedInstancesClientBeginDeleteOptions ¶ added in v0.3.0
type ManagedInstancesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstancesClientBeginDeleteOptions contains the optional parameters for the ManagedInstancesClient.BeginDelete method.
type ManagedInstancesClientBeginFailoverOptions ¶ added in v0.3.0
type ManagedInstancesClientBeginFailoverOptions struct { // The type of replica to be failed over. ReplicaType *ReplicaType // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstancesClientBeginFailoverOptions contains the optional parameters for the ManagedInstancesClient.BeginFailover method.
type ManagedInstancesClientBeginUpdateOptions ¶ added in v0.3.0
type ManagedInstancesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedInstancesClientBeginUpdateOptions contains the optional parameters for the ManagedInstancesClient.BeginUpdate method.
type ManagedInstancesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedInstancesClientCreateOrUpdateResponse struct {
ManagedInstance
}
ManagedInstancesClientCreateOrUpdateResponse contains the response from method ManagedInstancesClient.CreateOrUpdate.
type ManagedInstancesClientDeleteResponse ¶ added in v0.3.0
type ManagedInstancesClientDeleteResponse struct { }
ManagedInstancesClientDeleteResponse contains the response from method ManagedInstancesClient.Delete.
type ManagedInstancesClientFailoverResponse ¶ added in v0.3.0
type ManagedInstancesClientFailoverResponse struct { }
ManagedInstancesClientFailoverResponse contains the response from method ManagedInstancesClient.Failover.
type ManagedInstancesClientGetOptions ¶ added in v0.3.0
type ManagedInstancesClientGetOptions struct { // The child resources to include in the response. Expand *string }
ManagedInstancesClientGetOptions contains the optional parameters for the ManagedInstancesClient.Get method.
type ManagedInstancesClientGetResponse ¶ added in v0.3.0
type ManagedInstancesClientGetResponse struct {
ManagedInstance
}
ManagedInstancesClientGetResponse contains the response from method ManagedInstancesClient.Get.
type ManagedInstancesClientListByInstancePoolOptions ¶ added in v0.3.0
type ManagedInstancesClientListByInstancePoolOptions struct { // The child resources to include in the response. Expand *string }
ManagedInstancesClientListByInstancePoolOptions contains the optional parameters for the ManagedInstancesClient.ListByInstancePool method.
type ManagedInstancesClientListByInstancePoolResponse ¶ added in v0.3.0
type ManagedInstancesClientListByInstancePoolResponse struct {
ManagedInstanceListResult
}
ManagedInstancesClientListByInstancePoolResponse contains the response from method ManagedInstancesClient.ListByInstancePool.
type ManagedInstancesClientListByManagedInstanceOptions ¶ added in v0.3.0
type ManagedInstancesClientListByManagedInstanceOptions struct { // Aggregation function to be used, default value is 'sum' AggregationFunction *AggregationFunctionType // Comma separated list of databases to be included into search. All DB's are included if this parameter is not specified. Databases *string // End time for observed period. EndTime *string // The time step to be used to summarize the metric values. Default value is PT1H Interval *QueryTimeGrainType // How many 'top queries' to return. Default is 5. NumberOfQueries *int32 // Metric to be used for ranking top queries. Default is 'cpu' ObservationMetric *MetricType // Start time for observed period. StartTime *string }
ManagedInstancesClientListByManagedInstanceOptions contains the optional parameters for the ManagedInstancesClient.ListByManagedInstance method.
type ManagedInstancesClientListByManagedInstanceResponse ¶ added in v0.3.0
type ManagedInstancesClientListByManagedInstanceResponse struct {
TopQueriesListResult
}
ManagedInstancesClientListByManagedInstanceResponse contains the response from method ManagedInstancesClient.ListByManagedInstance.
type ManagedInstancesClientListByResourceGroupOptions ¶ added in v0.3.0
type ManagedInstancesClientListByResourceGroupOptions struct { // The child resources to include in the response. Expand *string }
ManagedInstancesClientListByResourceGroupOptions contains the optional parameters for the ManagedInstancesClient.ListByResourceGroup method.
type ManagedInstancesClientListByResourceGroupResponse ¶ added in v0.3.0
type ManagedInstancesClientListByResourceGroupResponse struct {
ManagedInstanceListResult
}
ManagedInstancesClientListByResourceGroupResponse contains the response from method ManagedInstancesClient.ListByResourceGroup.
type ManagedInstancesClientListOptions ¶ added in v0.3.0
type ManagedInstancesClientListOptions struct { // The child resources to include in the response. Expand *string }
ManagedInstancesClientListOptions contains the optional parameters for the ManagedInstancesClient.List method.
type ManagedInstancesClientListResponse ¶ added in v0.3.0
type ManagedInstancesClientListResponse struct {
ManagedInstanceListResult
}
ManagedInstancesClientListResponse contains the response from method ManagedInstancesClient.List.
type ManagedInstancesClientUpdateResponse ¶ added in v0.3.0
type ManagedInstancesClientUpdateResponse struct {
ManagedInstance
}
ManagedInstancesClientUpdateResponse contains the response from method ManagedInstancesClient.Update.
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) (*armruntime.Poller[ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Sets a database's short term retention policy. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/UpdateManagedShortTermRetentionPolicyRestorableDropped.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<managed-instance-name>", "<restorable-dropped-database-id>", armsql.ManagedShortTermRetentionPolicyNameDefault, armsql.ManagedBackupShortTermRetentionPolicy{ Properties: &armsql.ManagedBackupShortTermRetentionPolicyProperties{ RetentionDays: to.Ptr[int32](14), }, }, &armsql.ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) BeginUpdate ¶
func (client *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) BeginUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, restorableDroppedDatabaseID string, policyName ManagedShortTermRetentionPolicyName, parameters ManagedBackupShortTermRetentionPolicy, options *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginUpdateOptions) (*armruntime.Poller[ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientUpdateResponse], error)
BeginUpdate - Sets a database's short term retention policy. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/UpdateManagedShortTermRetentionPolicyRestorableDropped.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginUpdate(ctx, "<resource-group-name>", "<managed-instance-name>", "<restorable-dropped-database-id>", armsql.ManagedShortTermRetentionPolicyNameDefault, armsql.ManagedBackupShortTermRetentionPolicy{ Properties: &armsql.ManagedBackupShortTermRetentionPolicyProperties{ RetentionDays: to.Ptr[int32](14), }, }, &armsql.ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetManagedShortTermRetentionPolicyRestorableDropped.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", "<restorable-dropped-database-id>", armsql.ManagedShortTermRetentionPolicyNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) ListByRestorableDroppedDatabase ¶
func (client *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient) ListByRestorableDroppedDatabase(resourceGroupName string, managedInstanceName string, restorableDroppedDatabaseID string, options *ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseOptions) *runtime.Pager[ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseResponse]
ListByRestorableDroppedDatabase - Gets a dropped database's short term retention policy list. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByRestorableDroppedDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetListManagedShortTermRetentionPolicyRestorableDropped.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByRestorableDroppedDatabase("<resource-group-name>", "<managed-instance-name>", "<restorable-dropped-database-id>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.BeginCreateOrUpdate method.
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginUpdateOptions ¶ added in v0.3.0
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientBeginUpdateOptions contains the optional parameters for the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.BeginUpdate method.
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse struct {
ManagedBackupShortTermRetentionPolicy
}
ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientCreateOrUpdateResponse contains the response from method ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.CreateOrUpdate.
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetOptions ¶ added in v0.3.0
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetOptions struct { }
ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetOptions contains the optional parameters for the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.Get method.
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetResponse ¶ added in v0.3.0
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetResponse struct {
ManagedBackupShortTermRetentionPolicy
}
ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientGetResponse contains the response from method ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.Get.
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseOptions ¶ added in v0.3.0
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseOptions struct { }
ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseOptions contains the optional parameters for the ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.ListByRestorableDroppedDatabase method.
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseResponse ¶ added in v0.3.0
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseResponse struct {
ManagedBackupShortTermRetentionPolicyListResult
}
ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientListByRestorableDroppedDatabaseResponse contains the response from method ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.ListByRestorableDroppedDatabase.
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientUpdateResponse ¶ added in v0.3.0
type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientUpdateResponse struct {
ManagedBackupShortTermRetentionPolicy
}
ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClientUpdateResponse contains the response from method ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesClient.Update.
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 ¶ added in v0.4.0
type ManagedServerDNSAlias struct { // Resource properties. Properties *ManagedServerDNSAliasProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ManagedServerDNSAlias - A managed server DNS alias.
type ManagedServerDNSAliasAcquisition ¶ added in v0.4.0
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 `json:"oldManagedServerDnsAliasResourceId,omitempty"` }
ManagedServerDNSAliasAcquisition - A managed server DNS alias acquisition request.
type ManagedServerDNSAliasCreation ¶ added in v0.4.0
type ManagedServerDNSAliasCreation struct { // Whether or not DNS record should be created for this alias. CreateDNSRecord *bool `json:"createDnsRecord,omitempty"` }
ManagedServerDNSAliasCreation - A managed server dns alias creation request.
type ManagedServerDNSAliasListResult ¶ added in v0.4.0
type ManagedServerDNSAliasListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ManagedServerDNSAlias `json:"value,omitempty" azure:"ro"` }
ManagedServerDNSAliasListResult - A list of managed server DNS aliases.
func (ManagedServerDNSAliasListResult) MarshalJSON ¶ added in v0.4.0
func (m ManagedServerDNSAliasListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedServerDNSAliasListResult.
type ManagedServerDNSAliasProperties ¶ added in v0.4.0
type ManagedServerDNSAliasProperties struct { // READ-ONLY; The fully qualified DNS record for managed server alias AzureDNSRecord *string `json:"azureDnsRecord,omitempty" azure:"ro"` }
ManagedServerDNSAliasProperties - Properties of a managed server DNS alias.
type ManagedServerDNSAliasesClient ¶ added in v0.4.0
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 ¶ added in v0.4.0
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 ¶ added in v0.4.0
func (client *ManagedServerDNSAliasesClient) BeginAcquire(ctx context.Context, resourceGroupName string, managedInstanceName string, dnsAliasName string, parameters ManagedServerDNSAliasAcquisition, options *ManagedServerDNSAliasesClientBeginAcquireOptions) (*armruntime.Poller[ManagedServerDNSAliasesClientAcquireResponse], error)
BeginAcquire - Acquires managed server DNS alias from another managed server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ManagedServerDnsAliasAcquire.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedServerDNSAliasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginAcquire(ctx, "<resource-group-name>", "<managed-instance-name>", "<dns-alias-name>", armsql.ManagedServerDNSAliasAcquisition{ OldManagedServerDNSAliasResourceID: to.Ptr("<old-managed-server-dnsalias-resource-id>"), }, &armsql.ManagedServerDNSAliasesClientBeginAcquireOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedServerDNSAliasesClient) BeginCreateOrUpdate ¶ added in v0.4.0
func (client *ManagedServerDNSAliasesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, dnsAliasName string, parameters ManagedServerDNSAliasCreation, options *ManagedServerDNSAliasesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[ManagedServerDNSAliasesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates a managed server DNS alias. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ManagedServerDnsAliasCreateOrUpdate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedServerDNSAliasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<managed-instance-name>", "<dns-alias-name>", armsql.ManagedServerDNSAliasCreation{}, &armsql.ManagedServerDNSAliasesClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedServerDNSAliasesClient) BeginDelete ¶ added in v0.4.0
func (client *ManagedServerDNSAliasesClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, dnsAliasName string, options *ManagedServerDNSAliasesClientBeginDeleteOptions) (*armruntime.Poller[ManagedServerDNSAliasesClientDeleteResponse], error)
BeginDelete - Deletes the managed server DNS alias with the given name. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ManagedServerDnsAliasDelete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedServerDNSAliasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<managed-instance-name>", "<dns-alias-name>", &armsql.ManagedServerDNSAliasesClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*ManagedServerDNSAliasesClient) Get ¶ added in v0.4.0
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ManagedServerDnsAliasGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedServerDNSAliasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", "<dns-alias-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedServerDNSAliasesClient) ListByManagedInstance ¶ added in v0.4.0
func (client *ManagedServerDNSAliasesClient) ListByManagedInstance(resourceGroupName string, managedInstanceName string, options *ManagedServerDNSAliasesClientListByManagedInstanceOptions) *runtime.Pager[ManagedServerDNSAliasesClientListByManagedInstanceResponse]
ListByManagedInstance - Gets a list of managed server DNS aliases for a managed server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByManagedInstance method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ManagedServerDnsAliasList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedServerDNSAliasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByManagedInstance("<resource-group-name>", "<managed-instance-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ManagedServerDNSAliasesClientAcquireResponse ¶ added in v0.4.0
type ManagedServerDNSAliasesClientAcquireResponse struct {
ManagedServerDNSAlias
}
ManagedServerDNSAliasesClientAcquireResponse contains the response from method ManagedServerDNSAliasesClient.Acquire.
type ManagedServerDNSAliasesClientBeginAcquireOptions ¶ added in v0.4.0
type ManagedServerDNSAliasesClientBeginAcquireOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedServerDNSAliasesClientBeginAcquireOptions contains the optional parameters for the ManagedServerDNSAliasesClient.BeginAcquire method.
type ManagedServerDNSAliasesClientBeginCreateOrUpdateOptions ¶ added in v0.4.0
type ManagedServerDNSAliasesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedServerDNSAliasesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedServerDNSAliasesClient.BeginCreateOrUpdate method.
type ManagedServerDNSAliasesClientBeginDeleteOptions ¶ added in v0.4.0
type ManagedServerDNSAliasesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedServerDNSAliasesClientBeginDeleteOptions contains the optional parameters for the ManagedServerDNSAliasesClient.BeginDelete method.
type ManagedServerDNSAliasesClientCreateOrUpdateResponse ¶ added in v0.4.0
type ManagedServerDNSAliasesClientCreateOrUpdateResponse struct {
ManagedServerDNSAlias
}
ManagedServerDNSAliasesClientCreateOrUpdateResponse contains the response from method ManagedServerDNSAliasesClient.CreateOrUpdate.
type ManagedServerDNSAliasesClientDeleteResponse ¶ added in v0.4.0
type ManagedServerDNSAliasesClientDeleteResponse struct { }
ManagedServerDNSAliasesClientDeleteResponse contains the response from method ManagedServerDNSAliasesClient.Delete.
type ManagedServerDNSAliasesClientGetOptions ¶ added in v0.4.0
type ManagedServerDNSAliasesClientGetOptions struct { }
ManagedServerDNSAliasesClientGetOptions contains the optional parameters for the ManagedServerDNSAliasesClient.Get method.
type ManagedServerDNSAliasesClientGetResponse ¶ added in v0.4.0
type ManagedServerDNSAliasesClientGetResponse struct {
ManagedServerDNSAlias
}
ManagedServerDNSAliasesClientGetResponse contains the response from method ManagedServerDNSAliasesClient.Get.
type ManagedServerDNSAliasesClientListByManagedInstanceOptions ¶ added in v0.4.0
type ManagedServerDNSAliasesClientListByManagedInstanceOptions struct { }
ManagedServerDNSAliasesClientListByManagedInstanceOptions contains the optional parameters for the ManagedServerDNSAliasesClient.ListByManagedInstance method.
type ManagedServerDNSAliasesClientListByManagedInstanceResponse ¶ added in v0.4.0
type ManagedServerDNSAliasesClientListByManagedInstanceResponse struct {
ManagedServerDNSAliasListResult
}
ManagedServerDNSAliasesClientListByManagedInstanceResponse contains the response from method ManagedServerDNSAliasesClient.ListByManagedInstance.
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) (*armruntime.Poller[ManagedServerSecurityAlertPoliciesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a threat detection policy. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedServerSecurityAlertCreateMax.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedServerSecurityAlertPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<managed-instance-name>", 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("<storage-account-access-key>"), StorageEndpoint: to.Ptr("<storage-endpoint>"), }, }, &armsql.ManagedServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedServerSecurityAlertGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedServerSecurityAlertPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", armsql.SecurityAlertPolicyNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ManagedServerSecurityAlertPoliciesClient) ListByInstance ¶
func (client *ManagedServerSecurityAlertPoliciesClient) ListByInstance(resourceGroupName string, managedInstanceName string, options *ManagedServerSecurityAlertPoliciesClientListByInstanceOptions) *runtime.Pager[ManagedServerSecurityAlertPoliciesClientListByInstanceResponse]
ListByInstance - Get the managed server's threat detection policies. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByInstance method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedServerSecurityAlertListByInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewManagedServerSecurityAlertPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByInstance("<resource-group-name>", "<managed-instance-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ManagedServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ManagedServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedServerSecurityAlertPoliciesClient.BeginCreateOrUpdate method.
type ManagedServerSecurityAlertPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ManagedServerSecurityAlertPoliciesClientCreateOrUpdateResponse struct {
ManagedServerSecurityAlertPolicy
}
ManagedServerSecurityAlertPoliciesClientCreateOrUpdateResponse contains the response from method ManagedServerSecurityAlertPoliciesClient.CreateOrUpdate.
type ManagedServerSecurityAlertPoliciesClientGetOptions ¶ added in v0.3.0
type ManagedServerSecurityAlertPoliciesClientGetOptions struct { }
ManagedServerSecurityAlertPoliciesClientGetOptions contains the optional parameters for the ManagedServerSecurityAlertPoliciesClient.Get method.
type ManagedServerSecurityAlertPoliciesClientGetResponse ¶ added in v0.3.0
type ManagedServerSecurityAlertPoliciesClientGetResponse struct {
ManagedServerSecurityAlertPolicy
}
ManagedServerSecurityAlertPoliciesClientGetResponse contains the response from method ManagedServerSecurityAlertPoliciesClient.Get.
type ManagedServerSecurityAlertPoliciesClientListByInstanceOptions ¶ added in v0.3.0
type ManagedServerSecurityAlertPoliciesClientListByInstanceOptions struct { }
ManagedServerSecurityAlertPoliciesClientListByInstanceOptions contains the optional parameters for the ManagedServerSecurityAlertPoliciesClient.ListByInstance method.
type ManagedServerSecurityAlertPoliciesClientListByInstanceResponse ¶ added in v0.3.0
type ManagedServerSecurityAlertPoliciesClientListByInstanceResponse struct {
ManagedServerSecurityAlertPolicyListResult
}
ManagedServerSecurityAlertPoliciesClientListByInstanceResponse contains the response from method ManagedServerSecurityAlertPoliciesClient.ListByInstance.
type ManagedServerSecurityAlertPolicy ¶
type ManagedServerSecurityAlertPolicy struct { // Resource properties. Properties *SecurityAlertsPolicyProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; SystemData of SecurityAlertPolicyResource. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ManagedServerSecurityAlertPolicy - A managed server security alert policy.
type ManagedServerSecurityAlertPolicyListResult ¶
type ManagedServerSecurityAlertPolicyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ManagedServerSecurityAlertPolicy `json:"value,omitempty" azure:"ro"` }
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.
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 `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ManagedTransparentDataEncryption - A managed database transparent data encryption state.
type ManagedTransparentDataEncryptionListResult ¶
type ManagedTransparentDataEncryptionListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ManagedTransparentDataEncryption `json:"value,omitempty" azure:"ro"` }
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.
type ManagedTransparentDataEncryptionProperties ¶
type ManagedTransparentDataEncryptionProperties struct { // REQUIRED; Specifies the state of the transparent data encryption. State *TransparentDataEncryptionState `json:"state,omitempty"` }
ManagedTransparentDataEncryptionProperties - Properties of a transparent data encryption.
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 `json:"limit,omitempty" azure:"ro"` // READ-ONLY; The units that the limit is expressed in. Unit *MaxSizeUnit `json:"unit,omitempty" azure:"ro"` }
MaxSizeCapability - The maximum size capability.
type MaxSizeRangeCapability ¶
type MaxSizeRangeCapability struct { // The reason for the capability not being available. Reason *string `json:"reason,omitempty"` // READ-ONLY; Size of transaction log. LogSize *LogSizeCapability `json:"logSize,omitempty" azure:"ro"` // READ-ONLY; Maximum value. MaxValue *MaxSizeCapability `json:"maxValue,omitempty" azure:"ro"` // READ-ONLY; Minimum value. MinValue *MaxSizeCapability `json:"minValue,omitempty" azure:"ro"` // READ-ONLY; Scale/step size for discrete values between the minimum value and the maximum value. ScaleSize *MaxSizeCapability `json:"scaleSize,omitempty" azure:"ro"` // READ-ONLY; The status of the capability. Status *CapabilityStatus `json:"status,omitempty" azure:"ro"` }
MaxSizeRangeCapability - The maximum size range capability.
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 `json:"endTime,omitempty" azure:"ro"` // READ-ONLY; The metric values for the specified time window and timestep. MetricValues []*MetricValue `json:"metricValues,omitempty" azure:"ro"` // READ-ONLY; The name information for the metric. Name *MetricName `json:"name,omitempty" azure:"ro"` // READ-ONLY; The start time for the metric (ISO-8601 format). StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` // READ-ONLY; The time step to be used to summarize the metric values. TimeGrain *string `json:"timeGrain,omitempty" azure:"ro"` // READ-ONLY; The unit of the metric. Unit *UnitType `json:"unit,omitempty" azure:"ro"` }
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 `json:"retention,omitempty" azure:"ro"` // READ-ONLY; The granularity of the database metric. TimeGrain *string `json:"timeGrain,omitempty" azure:"ro"` }
MetricAvailability - A metric availability value.
type MetricDefinition ¶
type MetricDefinition struct { // READ-ONLY; The list of database metric availabilities for the metric. MetricAvailabilities []*MetricAvailability `json:"metricAvailabilities,omitempty" azure:"ro"` // READ-ONLY; The name information for the metric. Name *MetricName `json:"name,omitempty" azure:"ro"` // READ-ONLY; The primary aggregation type defining how metric values are displayed. PrimaryAggregationType *PrimaryAggregationType `json:"primaryAggregationType,omitempty" azure:"ro"` // READ-ONLY; The resource uri of the database. ResourceURI *string `json:"resourceUri,omitempty" azure:"ro"` // READ-ONLY; The unit of the metric. Unit *UnitDefinitionType `json:"unit,omitempty" azure:"ro"` }
MetricDefinition - A database metric definition.
func (MetricDefinition) MarshalJSON ¶
func (m MetricDefinition) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MetricDefinition.
type MetricDefinitionListResult ¶
type MetricDefinitionListResult struct { // REQUIRED; The list of metric definitions for the database. Value []*MetricDefinition `json:"value,omitempty"` }
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.
type MetricListResult ¶
type MetricListResult struct { // REQUIRED; The list of metrics for the database. Value []*Metric `json:"value,omitempty"` }
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.
type MetricName ¶
type MetricName struct { // READ-ONLY; The friendly name of the database metric. LocalizedValue *string `json:"localizedValue,omitempty" azure:"ro"` // READ-ONLY; The name of the database metric. Value *string `json:"value,omitempty" azure:"ro"` }
MetricName - A database metric name.
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 `json:"average,omitempty" azure:"ro"` // READ-ONLY; The number of values for the metric. Count *int32 `json:"count,omitempty" azure:"ro"` // READ-ONLY; The max value of the metric. Maximum *float64 `json:"maximum,omitempty" azure:"ro"` // READ-ONLY; The min value of the metric. Minimum *float64 `json:"minimum,omitempty" azure:"ro"` // READ-ONLY; The metric timestamp (ISO-8601 format). Timestamp *time.Time `json:"timestamp,omitempty" azure:"ro"` // READ-ONLY; The total value of the metric. Total *float64 `json:"total,omitempty" azure:"ro"` }
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 `json:"reason,omitempty"` // READ-ONLY; The status of the capability. Status *CapabilityStatus `json:"status,omitempty" azure:"ro"` // READ-ONLY; Min capacity value Value *float64 `json:"value,omitempty" azure:"ro"` }
MinCapacityCapability - The min capacity capability
type Name ¶
type Name struct { // Usage name localized value. LocalizedValue *string `json:"localizedValue,omitempty"` // Usage name value Value *string `json:"value,omitempty"` }
Name - ARM Usage 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 `json:"sqlServerResourceId,omitempty"` // 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 `json:"storageAccountResourceId,omitempty"` }
NetworkIsolationSettings - Contains the ARM resources for which to create private endpoint connection.
type Operation ¶
type Operation struct { // READ-ONLY; The localized display information for this particular operation / action. Display *OperationDisplay `json:"display,omitempty" azure:"ro"` // READ-ONLY; The name of the operation being performed on this particular object. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The intended executor of the operation. Origin *OperationOrigin `json:"origin,omitempty" azure:"ro"` // READ-ONLY; Additional descriptions for the operation. Properties map[string]interface{} `json:"properties,omitempty" azure:"ro"` }
Operation - SQL REST API operation definition.
func (Operation) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Operation.
type OperationDisplay ¶
type OperationDisplay struct { // READ-ONLY; The localized friendly description for the operation. Description *string `json:"description,omitempty" azure:"ro"` // READ-ONLY; The localized friendly name for the operation. Operation *string `json:"operation,omitempty" azure:"ro"` // READ-ONLY; The localized friendly form of the resource provider name. Provider *string `json:"provider,omitempty" azure:"ro"` // READ-ONLY; The localized friendly form of the resource type related to this action/operation. Resource *string `json:"resource,omitempty" azure:"ro"` }
OperationDisplay - Display metadata associated with the operation.
type OperationImpact ¶
type OperationImpact struct { // READ-ONLY; The absolute impact to dimension. ChangeValueAbsolute *float64 `json:"changeValueAbsolute,omitempty" azure:"ro"` // READ-ONLY; The relative impact to dimension (null if not applicable) ChangeValueRelative *float64 `json:"changeValueRelative,omitempty" azure:"ro"` // READ-ONLY; The name of the impact dimension. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The unit in which estimated impact to dimension is measured. Unit *string `json:"unit,omitempty" azure:"ro"` }
OperationImpact - The impact of an operation, both in absolute and relative terms.
type OperationListResult ¶
type OperationListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*Operation `json:"value,omitempty" azure:"ro"` }
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.
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) List ¶
func (client *OperationsClient) List(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
List - Lists all of the available SQL Rest API operations. If the operation fails it returns an *azcore.ResponseError type. options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
type OperationsClientListOptions ¶ added in v0.3.0
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
type OperationsClientListResponse ¶ added in v0.3.0
type OperationsClientListResponse struct {
OperationListResult
}
OperationsClientListResponse contains the response from method OperationsClient.List.
type OutboundFirewallRule ¶
type OutboundFirewallRule struct { // Resource properties. Properties *OutboundFirewallRuleProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
OutboundFirewallRule - An Azure SQL DB Server Outbound Firewall Rule.
type OutboundFirewallRuleListResult ¶
type OutboundFirewallRuleListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*OutboundFirewallRule `json:"value,omitempty" azure:"ro"` }
OutboundFirewallRuleListResult - A list of outbound rules.
func (OutboundFirewallRuleListResult) MarshalJSON ¶
func (o OutboundFirewallRuleListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OutboundFirewallRuleListResult.
type OutboundFirewallRuleProperties ¶
type OutboundFirewallRuleProperties struct { // READ-ONLY; The state of the outbound rule. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` }
OutboundFirewallRuleProperties - The properties of an outbound firewall rule.
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) (*armruntime.Poller[OutboundFirewallRulesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a outbound firewall rule with a given name. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleCreate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewOutboundFirewallRulesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<outbound-rule-fqdn>", armsql.OutboundFirewallRule{}, &armsql.OutboundFirewallRulesClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*OutboundFirewallRulesClient) BeginDelete ¶
func (client *OutboundFirewallRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, outboundRuleFqdn string, options *OutboundFirewallRulesClientBeginDeleteOptions) (*armruntime.Poller[OutboundFirewallRulesClientDeleteResponse], error)
BeginDelete - Deletes a outbound firewall rule with a given name. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleDelete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewOutboundFirewallRulesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<server-name>", "<outbound-rule-fqdn>", &armsql.OutboundFirewallRulesClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewOutboundFirewallRulesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<outbound-rule-fqdn>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*OutboundFirewallRulesClient) ListByServer ¶
func (client *OutboundFirewallRulesClient) ListByServer(resourceGroupName string, serverName string, options *OutboundFirewallRulesClientListByServerOptions) *runtime.Pager[OutboundFirewallRulesClientListByServerResponse]
ListByServer - Gets all outbound firewall rules on a server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/OutboundFirewallRuleList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewOutboundFirewallRulesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<resource-group-name>", "<server-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type OutboundFirewallRulesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type OutboundFirewallRulesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
OutboundFirewallRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the OutboundFirewallRulesClient.BeginCreateOrUpdate method.
type OutboundFirewallRulesClientBeginDeleteOptions ¶ added in v0.3.0
type OutboundFirewallRulesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
OutboundFirewallRulesClientBeginDeleteOptions contains the optional parameters for the OutboundFirewallRulesClient.BeginDelete method.
type OutboundFirewallRulesClientCreateOrUpdateResponse ¶ added in v0.3.0
type OutboundFirewallRulesClientCreateOrUpdateResponse struct {
OutboundFirewallRule
}
OutboundFirewallRulesClientCreateOrUpdateResponse contains the response from method OutboundFirewallRulesClient.CreateOrUpdate.
type OutboundFirewallRulesClientDeleteResponse ¶ added in v0.3.0
type OutboundFirewallRulesClientDeleteResponse struct { }
OutboundFirewallRulesClientDeleteResponse contains the response from method OutboundFirewallRulesClient.Delete.
type OutboundFirewallRulesClientGetOptions ¶ added in v0.3.0
type OutboundFirewallRulesClientGetOptions struct { }
OutboundFirewallRulesClientGetOptions contains the optional parameters for the OutboundFirewallRulesClient.Get method.
type OutboundFirewallRulesClientGetResponse ¶ added in v0.3.0
type OutboundFirewallRulesClientGetResponse struct {
OutboundFirewallRule
}
OutboundFirewallRulesClientGetResponse contains the response from method OutboundFirewallRulesClient.Get.
type OutboundFirewallRulesClientListByServerOptions ¶ added in v0.3.0
type OutboundFirewallRulesClientListByServerOptions struct { }
OutboundFirewallRulesClientListByServerOptions contains the optional parameters for the OutboundFirewallRulesClient.ListByServer method.
type OutboundFirewallRulesClientListByServerResponse ¶ added in v0.3.0
type OutboundFirewallRulesClientListByServerResponse struct {
OutboundFirewallRuleListResult
}
OutboundFirewallRulesClientListByServerResponse contains the response from method OutboundFirewallRulesClient.ListByServer.
type PartnerInfo ¶
type PartnerInfo struct { // REQUIRED; Resource identifier of the partner server. ID *string `json:"id,omitempty"` // READ-ONLY; Geo location of the partner server. Location *string `json:"location,omitempty" azure:"ro"` // READ-ONLY; Replication role of the partner server. ReplicationRole *FailoverGroupReplicationRole `json:"replicationRole,omitempty" azure:"ro"` }
PartnerInfo - Partner server information for the failover group.
type PartnerRegionInfo ¶
type PartnerRegionInfo struct { // Geo location of the partner managed instances. Location *string `json:"location,omitempty"` // READ-ONLY; Replication role of the partner managed instances. ReplicationRole *InstanceFailoverGroupReplicationRole `json:"replicationRole,omitempty" azure:"ro"` }
PartnerRegionInfo - Partner region information for the failover group.
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 `json:"unit,omitempty" azure:"ro"` // READ-ONLY; Performance level value. Value *float64 `json:"value,omitempty" azure:"ro"` }
PerformanceLevelCapability - The performance level capability.
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 `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
PrivateEndpointConnection - A private endpoint connection
type PrivateEndpointConnectionListResult ¶
type PrivateEndpointConnectionListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*PrivateEndpointConnection `json:"value,omitempty" azure:"ro"` }
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.
type PrivateEndpointConnectionProperties ¶
type PrivateEndpointConnectionProperties struct { // Private endpoint which the connection belongs to. PrivateEndpoint *PrivateEndpointProperty `json:"privateEndpoint,omitempty"` // Connection state of the private endpoint connection. PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionStateProperty `json:"privateLinkServiceConnectionState,omitempty"` // READ-ONLY; State of the private endpoint connection. ProvisioningState *PrivateEndpointProvisioningState `json:"provisioningState,omitempty" azure:"ro"` }
PrivateEndpointConnectionProperties - Properties of a private endpoint connection.
type PrivateEndpointConnectionRequestStatus ¶
type PrivateEndpointConnectionRequestStatus struct { // READ-ONLY; The connection name for the private endpoint. PrivateEndpointConnectionName *string `json:"privateEndpointConnectionName,omitempty" azure:"ro"` // READ-ONLY; Resource id for which the private endpoint is created. PrivateLinkServiceID *string `json:"privateLinkServiceId,omitempty" azure:"ro"` // READ-ONLY; Status of this private endpoint connection. Status *string `json:"status,omitempty" azure:"ro"` }
PrivateEndpointConnectionRequestStatus - Contains the private endpoint connection requests status.
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) (*armruntime.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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/PrivateEndpointConnectionUpdate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewPrivateEndpointConnectionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<private-endpoint-connection-name>", armsql.PrivateEndpointConnection{ Properties: &armsql.PrivateEndpointConnectionProperties{ PrivateLinkServiceConnectionState: &armsql.PrivateLinkServiceConnectionStateProperty{ Description: to.Ptr("<description>"), Status: to.Ptr(armsql.PrivateLinkServiceConnectionStateStatusApproved), }, }, }, &armsql.PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*PrivateEndpointConnectionsClient) BeginDelete ¶
func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*armruntime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)
BeginDelete - Deletes a private endpoint connection with a given name. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/PrivateEndpointConnectionDelete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewPrivateEndpointConnectionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<server-name>", "<private-endpoint-connection-name>", &armsql.PrivateEndpointConnectionsClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/PrivateEndpointConnectionGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewPrivateEndpointConnectionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<private-endpoint-connection-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*PrivateEndpointConnectionsClient) ListByServer ¶
func (client *PrivateEndpointConnectionsClient) ListByServer(resourceGroupName string, serverName string, options *PrivateEndpointConnectionsClientListByServerOptions) *runtime.Pager[PrivateEndpointConnectionsClientListByServerResponse]
ListByServer - Gets all private endpoint connections on a server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/PrivateEndpointConnectionList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewPrivateEndpointConnectionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<resource-group-name>", "<server-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate method.
type PrivateEndpointConnectionsClientBeginDeleteOptions ¶ added in v0.3.0
type PrivateEndpointConnectionsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
type PrivateEndpointConnectionsClientCreateOrUpdateResponse ¶ added in v0.3.0
type PrivateEndpointConnectionsClientCreateOrUpdateResponse struct {
PrivateEndpointConnection
}
PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.CreateOrUpdate.
type PrivateEndpointConnectionsClientDeleteResponse ¶ added in v0.3.0
type PrivateEndpointConnectionsClientDeleteResponse struct { }
PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.Delete.
type PrivateEndpointConnectionsClientGetOptions ¶ added in v0.3.0
type PrivateEndpointConnectionsClientGetOptions struct { }
PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
type PrivateEndpointConnectionsClientGetResponse ¶ added in v0.3.0
type PrivateEndpointConnectionsClientGetResponse struct {
PrivateEndpointConnection
}
PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.
type PrivateEndpointConnectionsClientListByServerOptions ¶ added in v0.3.0
type PrivateEndpointConnectionsClientListByServerOptions struct { }
PrivateEndpointConnectionsClientListByServerOptions contains the optional parameters for the PrivateEndpointConnectionsClient.ListByServer method.
type PrivateEndpointConnectionsClientListByServerResponse ¶ added in v0.3.0
type PrivateEndpointConnectionsClientListByServerResponse struct {
PrivateEndpointConnectionListResult
}
PrivateEndpointConnectionsClientListByServerResponse contains the response from method PrivateEndpointConnectionsClient.ListByServer.
type PrivateEndpointProperty ¶
type PrivateEndpointProperty struct { // Resource id of the private endpoint. ID *string `json:"id,omitempty"` }
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 `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The private link resource group id. Properties *PrivateLinkResourceProperties `json:"properties,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
PrivateLinkResource - A private link resource
type PrivateLinkResourceListResult ¶
type PrivateLinkResourceListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*PrivateLinkResource `json:"value,omitempty" azure:"ro"` }
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.
type PrivateLinkResourceProperties ¶
type PrivateLinkResourceProperties struct { // READ-ONLY; The private link resource group id. GroupID *string `json:"groupId,omitempty" azure:"ro"` // READ-ONLY; The private link resource required member names. RequiredMembers []*string `json:"requiredMembers,omitempty" azure:"ro"` // READ-ONLY; The private link resource required zone names. RequiredZoneNames []*string `json:"requiredZoneNames,omitempty" azure:"ro"` }
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.
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/PrivateLinkResourcesGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewPrivateLinkResourcesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<group-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*PrivateLinkResourcesClient) ListByServer ¶
func (client *PrivateLinkResourcesClient) ListByServer(resourceGroupName string, serverName string, options *PrivateLinkResourcesClientListByServerOptions) *runtime.Pager[PrivateLinkResourcesClientListByServerResponse]
ListByServer - Gets the private link resources for SQL server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/PrivateLinkResourcesList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewPrivateLinkResourcesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<resource-group-name>", "<server-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type PrivateLinkResourcesClientGetOptions ¶ added in v0.3.0
type PrivateLinkResourcesClientGetOptions struct { }
PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.
type PrivateLinkResourcesClientGetResponse ¶ added in v0.3.0
type PrivateLinkResourcesClientGetResponse struct {
PrivateLinkResource
}
PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get.
type PrivateLinkResourcesClientListByServerOptions ¶ added in v0.3.0
type PrivateLinkResourcesClientListByServerOptions struct { }
PrivateLinkResourcesClientListByServerOptions contains the optional parameters for the PrivateLinkResourcesClient.ListByServer method.
type PrivateLinkResourcesClientListByServerResponse ¶ added in v0.3.0
type PrivateLinkResourcesClientListByServerResponse struct {
PrivateLinkResourceListResult
}
PrivateLinkResourcesClientListByServerResponse contains the response from method PrivateLinkResourcesClient.ListByServer.
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 `json:"description,omitempty"` // REQUIRED; The private link service connection status. Status *PrivateLinkServiceConnectionStateStatus `json:"status,omitempty"` // READ-ONLY; The actions required for private link service connection. ActionsRequired *PrivateLinkServiceConnectionStateActionsRequire `json:"actionsRequired,omitempty" azure:"ro"` }
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 `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ProxyResource - ARM proxy resource.
type ProxyResourceWithWritableName ¶
type ProxyResourceWithWritableName struct { // Resource name. Name *string `json:"name,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ProxyResourceWithWritableName - ARM proxy resource.
type QueryMetricInterval ¶
type QueryMetricInterval struct { // List of metric objects for this interval Metrics []*QueryMetricProperties `json:"metrics,omitempty"` // READ-ONLY; Execution count of a query in this interval. ExecutionCount *int64 `json:"executionCount,omitempty" azure:"ro"` // READ-ONLY; The start time for the metric interval (ISO-8601 format). IntervalStartTime *string `json:"intervalStartTime,omitempty" azure:"ro"` // READ-ONLY; Interval type (length). IntervalType *QueryTimeGrainType `json:"intervalType,omitempty" azure:"ro"` }
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.
type QueryMetricProperties ¶
type QueryMetricProperties struct { // READ-ONLY; Metric value when avg() aggregate function is used over the interval. Avg *float64 `json:"avg,omitempty" azure:"ro"` // READ-ONLY; The UI appropriate name for the metric. DisplayName *string `json:"displayName,omitempty" azure:"ro"` // READ-ONLY; Metric value when max() aggregate function is used over the interval. Max *float64 `json:"max,omitempty" azure:"ro"` // READ-ONLY; Metric value when min() aggregate function is used over the interval. Min *float64 `json:"min,omitempty" azure:"ro"` // READ-ONLY; The name information for the metric. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Metric value when stdev aggregate function is used over the interval. Stdev *float64 `json:"stdev,omitempty" azure:"ro"` // READ-ONLY; Metric value when sum() aggregate function is used over the interval. Sum *float64 `json:"sum,omitempty" azure:"ro"` // READ-ONLY; The unit of the metric. Unit *QueryMetricUnitType `json:"unit,omitempty" azure:"ro"` // READ-ONLY; The value of the metric. Value *float64 `json:"value,omitempty" azure:"ro"` }
QueryMetricProperties - Properties of a topquery metric in one interval.
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 `json:"queryText,omitempty"` }
QueryProperties - Properties of a database query.
type QueryStatistics ¶
type QueryStatistics struct { // Resource properties. Properties *QueryStatisticsProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
type QueryStatisticsProperties ¶
type QueryStatisticsProperties struct { // List of intervals with appropriate metric data Intervals []*QueryMetricInterval `json:"intervals,omitempty"` // READ-ONLY; Database name of the database in which this query was executed. DatabaseName *string `json:"databaseName,omitempty" azure:"ro"` // READ-ONLY; The end time for the metric (ISO-8601 format). EndTime *string `json:"endTime,omitempty" azure:"ro"` // READ-ONLY; Unique query id (unique within one database). QueryID *string `json:"queryId,omitempty" azure:"ro"` // READ-ONLY; The start time for the metric (ISO-8601 format). StartTime *string `json:"startTime,omitempty" azure:"ro"` }
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.
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 `json:"reason,omitempty"` // READ-ONLY; The maximum number of read scale replicas. MaxNumberOfReplicas *int32 `json:"maxNumberOfReplicas,omitempty" azure:"ro"` // READ-ONLY; The status of the capability. Status *CapabilityStatus `json:"status,omitempty" azure:"ro"` }
ReadScaleCapability - The read scale capability.
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 `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource kind. Kind *string `json:"kind,omitempty" azure:"ro"` // READ-ONLY; Resource location. Location *string `json:"location,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
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.
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 `json:"errorCode,omitempty" azure:"ro"` // READ-ONLY; Gets whether the error could be ignored and recommended action could be retried. Possible values are: Yes/No IsRetryable *IsRetryable `json:"isRetryable,omitempty" azure:"ro"` }
RecommendedActionErrorInfo - Contains error information for an Azure SQL Database, Server or Elastic Pool Recommended Action.
type RecommendedActionImpactRecord ¶
type RecommendedActionImpactRecord struct { // READ-ONLY; Gets the absolute value of this dimension if applicable. e.g., Number of Queries affected AbsoluteValue *float64 `json:"absoluteValue,omitempty" azure:"ro"` // READ-ONLY; Gets the absolute change in the value of this dimension. e.g., Absolute Disk space change in Megabytes ChangeValueAbsolute *float64 `json:"changeValueAbsolute,omitempty" azure:"ro"` // READ-ONLY; Gets the relative change in the value of this dimension. e.g., Relative Disk space change in Percentage ChangeValueRelative *float64 `json:"changeValueRelative,omitempty" azure:"ro"` // READ-ONLY; Gets the name of the impact dimension. e.g., CPUChange, DiskSpaceChange, NumberOfQueriesAffected. DimensionName *string `json:"dimensionName,omitempty" azure:"ro"` // READ-ONLY; Gets the name of the impact dimension. e.g., CPUChange, DiskSpaceChange, NumberOfQueriesAffected. Unit *string `json:"unit,omitempty" azure:"ro"` }
RecommendedActionImpactRecord - Contains information of estimated or observed impact on various metrics for an Azure SQL Database, Server or Elastic Pool Recommended Action.
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 `json:"method,omitempty" azure:"ro"` // READ-ONLY; Gets the manual implementation script. e.g., T-SQL script that could be executed on the database. Script *string `json:"script,omitempty" azure:"ro"` }
RecommendedActionImplementationInfo - Contains information for manual implementation for an Azure SQL Database, Server or Elastic Pool Recommended Action.
type RecommendedActionInitiatedBy ¶
type RecommendedActionInitiatedBy string
RecommendedActionInitiatedBy - Gets if approval for applying this recommended action was given by user/system.
const ( RecommendedActionInitiatedByUser RecommendedActionInitiatedBy = "User" RecommendedActionInitiatedBySystem RecommendedActionInitiatedBy = "System" )
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 `json:"metricName,omitempty" azure:"ro"` // READ-ONLY; Gets the start time of time interval given by this MetricInfo. StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` // READ-ONLY; Gets the duration of time interval for the value given by this MetricInfo. e.g., PT1H (1 hour) TimeGrain *string `json:"timeGrain,omitempty" azure:"ro"` // READ-ONLY; Gets the unit in which metric is measured. e.g., DTU, Frequency Unit *string `json:"unit,omitempty" azure:"ro"` // READ-ONLY; Gets the value of the metric in the time interval given by this MetricInfo. Value *float64 `json:"value,omitempty" azure:"ro"` }
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 `json:"state,omitempty"` // READ-ONLY; Gets additional details specific to this recommended action. Details map[string]interface{} `json:"details,omitempty" azure:"ro"` // READ-ONLY; Gets the error details if and why this recommended action is put to error state. ErrorDetails *RecommendedActionErrorInfo `json:"errorDetails,omitempty" azure:"ro"` // READ-ONLY; Gets the estimated impact info for this recommended action e.g., Estimated CPU gain, Estimated Disk Space change EstimatedImpact []*RecommendedActionImpactRecord `json:"estimatedImpact,omitempty" azure:"ro"` // READ-ONLY; Gets the time taken for applying this recommended action on user resource. e.g., time taken for index creation ExecuteActionDuration *string `json:"executeActionDuration,omitempty" azure:"ro"` // READ-ONLY; Gets if approval for applying this recommended action was given by user/system. ExecuteActionInitiatedBy *RecommendedActionInitiatedBy `json:"executeActionInitiatedBy,omitempty" azure:"ro"` // READ-ONLY; Gets the time when this recommended action was approved for execution. ExecuteActionInitiatedTime *time.Time `json:"executeActionInitiatedTime,omitempty" azure:"ro"` // 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 `json:"executeActionStartTime,omitempty" azure:"ro"` // READ-ONLY; Gets the implementation details of this recommended action for user to apply it manually. ImplementationDetails *RecommendedActionImplementationInfo `json:"implementationDetails,omitempty" azure:"ro"` // 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 `json:"isArchivedAction,omitempty" azure:"ro"` // READ-ONLY; Gets if this recommended action is actionable by user IsExecutableAction *bool `json:"isExecutableAction,omitempty" azure:"ro"` // READ-ONLY; Gets if changes applied by this recommended action can be reverted by user IsRevertableAction *bool `json:"isRevertableAction,omitempty" azure:"ro"` // READ-ONLY; Gets time when this recommended action was last refreshed. LastRefresh *time.Time `json:"lastRefresh,omitempty" azure:"ro"` // READ-ONLY; Gets the linked objects, if any. LinkedObjects []*string `json:"linkedObjects,omitempty" azure:"ro"` // READ-ONLY; Gets the observed/actual impact info for this recommended action e.g., Actual CPU gain, Actual Disk Space change ObservedImpact []*RecommendedActionImpactRecord `json:"observedImpact,omitempty" azure:"ro"` // READ-ONLY; Gets the reason for recommending this action. e.g., DuplicateIndex RecommendationReason *string `json:"recommendationReason,omitempty" azure:"ro"` // 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 `json:"revertActionDuration,omitempty" azure:"ro"` // READ-ONLY; Gets if approval for reverting this recommended action was given by user/system. RevertActionInitiatedBy *RecommendedActionInitiatedBy `json:"revertActionInitiatedBy,omitempty" azure:"ro"` // READ-ONLY; Gets the time when this recommended action was approved for revert. RevertActionInitiatedTime *time.Time `json:"revertActionInitiatedTime,omitempty" azure:"ro"` // 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 `json:"revertActionStartTime,omitempty" azure:"ro"` // READ-ONLY; Gets the impact of this recommended action. Possible values are 1 - Low impact, 2 - Medium Impact and 3 - High // Impact Score *int32 `json:"score,omitempty" azure:"ro"` // READ-ONLY; Gets the time series info of metrics for this recommended action e.g., CPU consumption time series TimeSeries []*RecommendedActionMetricInfo `json:"timeSeries,omitempty" azure:"ro"` // READ-ONLY; Gets the time since when this recommended action is valid. ValidSince *time.Time `json:"validSince,omitempty" azure:"ro"` }
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 `json:"currentValue,omitempty"` // 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 `json:"actionInitiatedBy,omitempty" azure:"ro"` // READ-ONLY; Gets the time when the state was last modified LastModified *time.Time `json:"lastModified,omitempty" azure:"ro"` }
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 `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
RecommendedSensitivityLabelUpdate - A recommended sensitivity label update operation.
type RecommendedSensitivityLabelUpdateKind ¶
type RecommendedSensitivityLabelUpdateKind string
const ( RecommendedSensitivityLabelUpdateKindEnable RecommendedSensitivityLabelUpdateKind = "enable" RecommendedSensitivityLabelUpdateKindDisable RecommendedSensitivityLabelUpdateKind = "disable" )
func PossibleRecommendedSensitivityLabelUpdateKindValues ¶
func PossibleRecommendedSensitivityLabelUpdateKindValues() []RecommendedSensitivityLabelUpdateKind
PossibleRecommendedSensitivityLabelUpdateKindValues returns the possible values for the RecommendedSensitivityLabelUpdateKind const type.
type RecommendedSensitivityLabelUpdateList ¶
type RecommendedSensitivityLabelUpdateList struct {
Operations []*RecommendedSensitivityLabelUpdate `json:"operations,omitempty"`
}
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.
type RecommendedSensitivityLabelUpdateProperties ¶
type RecommendedSensitivityLabelUpdateProperties struct { // REQUIRED; Column name to update. Column *string `json:"column,omitempty"` // REQUIRED Op *RecommendedSensitivityLabelUpdateKind `json:"op,omitempty"` // REQUIRED; Schema name of the column to update. Schema *string `json:"schema,omitempty"` // REQUIRED; Table name of the column to update. Table *string `json:"table,omitempty"` }
RecommendedSensitivityLabelUpdateProperties - Properties of an operation executed on a recommended sensitivity label.
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/SensitivityLabelsRecommendedUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewRecommendedSensitivityLabelsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Update(ctx, "<resource-group-name>", "<server-name>", "<database-name>", armsql.RecommendedSensitivityLabelUpdateList{ Operations: []*armsql.RecommendedSensitivityLabelUpdate{ { Properties: &armsql.RecommendedSensitivityLabelUpdateProperties{ Schema: to.Ptr("<schema>"), Column: to.Ptr("<column>"), Op: to.Ptr(armsql.RecommendedSensitivityLabelUpdateKindEnable), Table: to.Ptr("<table>"), }, }, { Properties: &armsql.RecommendedSensitivityLabelUpdateProperties{ Schema: to.Ptr("<schema>"), Column: to.Ptr("<column>"), Op: to.Ptr(armsql.RecommendedSensitivityLabelUpdateKindEnable), Table: to.Ptr("<table>"), }, }, { Properties: &armsql.RecommendedSensitivityLabelUpdateProperties{ Schema: to.Ptr("<schema>"), Column: to.Ptr("<column>"), Op: to.Ptr(armsql.RecommendedSensitivityLabelUpdateKindDisable), Table: to.Ptr("<table>"), }, }}, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
Output:
type RecommendedSensitivityLabelsClientUpdateOptions ¶ added in v0.3.0
type RecommendedSensitivityLabelsClientUpdateOptions struct { }
RecommendedSensitivityLabelsClientUpdateOptions contains the optional parameters for the RecommendedSensitivityLabelsClient.Update method.
type RecommendedSensitivityLabelsClientUpdateResponse ¶ added in v0.3.0
type RecommendedSensitivityLabelsClientUpdateResponse struct { }
RecommendedSensitivityLabelsClientUpdateResponse contains the response from method RecommendedSensitivityLabelsClient.Update.
type RecoverableDatabase ¶
type RecoverableDatabase struct { // The properties of a recoverable database Properties *RecoverableDatabaseProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
RecoverableDatabase - A recoverable database
type RecoverableDatabaseListResult ¶
type RecoverableDatabaseListResult struct { // REQUIRED; A list of recoverable databases Value []*RecoverableDatabase `json:"value,omitempty"` }
RecoverableDatabaseListResult - The response to a list recoverable databases request
func (RecoverableDatabaseListResult) MarshalJSON ¶
func (r RecoverableDatabaseListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecoverableDatabaseListResult.
type RecoverableDatabaseProperties ¶
type RecoverableDatabaseProperties struct { // READ-ONLY; The edition of the database Edition *string `json:"edition,omitempty" azure:"ro"` // READ-ONLY; The elastic pool name of the database ElasticPoolName *string `json:"elasticPoolName,omitempty" azure:"ro"` // READ-ONLY; The last available backup date of the database (ISO8601 format) LastAvailableBackupDate *time.Time `json:"lastAvailableBackupDate,omitempty" azure:"ro"` // READ-ONLY; The service level objective name of the database ServiceLevelObjective *string `json:"serviceLevelObjective,omitempty" azure:"ro"` }
RecoverableDatabaseProperties - The properties of a recoverable database
func (RecoverableDatabaseProperties) MarshalJSON ¶
func (r RecoverableDatabaseProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RecoverableDatabaseProperties.
func (*RecoverableDatabaseProperties) UnmarshalJSON ¶
func (r *RecoverableDatabaseProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RecoverableDatabaseProperties.
type RecoverableDatabasesClient ¶
type RecoverableDatabasesClient struct {
// contains filtered or unexported fields
}
RecoverableDatabasesClient contains the methods for the RecoverableDatabases group. Don't use this type directly, use NewRecoverableDatabasesClient() instead.
func NewRecoverableDatabasesClient ¶
func NewRecoverableDatabasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RecoverableDatabasesClient, error)
NewRecoverableDatabasesClient creates a new instance of RecoverableDatabasesClient with the specified values. subscriptionID - The subscription ID that identifies an Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*RecoverableDatabasesClient) Get ¶
func (client *RecoverableDatabasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, options *RecoverableDatabasesClientGetOptions) (RecoverableDatabasesClientGetResponse, error)
Get - Gets a recoverable database, which is a resource representing a database's geo backup If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. serverName - The name of the server. databaseName - The name of the database options - RecoverableDatabasesClientGetOptions contains the optional parameters for the RecoverableDatabasesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/RecoverableDatabaseGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewRecoverableDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*RecoverableDatabasesClient) ListByServer ¶
func (client *RecoverableDatabasesClient) ListByServer(resourceGroupName string, serverName string, options *RecoverableDatabasesClientListByServerOptions) *runtime.Pager[RecoverableDatabasesClientListByServerResponse]
ListByServer - Gets a list of recoverable databases If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/RecoverableDatabaseList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewRecoverableDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<resource-group-name>", "<server-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type RecoverableDatabasesClientGetOptions ¶ added in v0.3.0
type RecoverableDatabasesClientGetOptions struct { }
RecoverableDatabasesClientGetOptions contains the optional parameters for the RecoverableDatabasesClient.Get method.
type RecoverableDatabasesClientGetResponse ¶ added in v0.3.0
type RecoverableDatabasesClientGetResponse struct {
RecoverableDatabase
}
RecoverableDatabasesClientGetResponse contains the response from method RecoverableDatabasesClient.Get.
type RecoverableDatabasesClientListByServerOptions ¶ added in v0.3.0
type RecoverableDatabasesClientListByServerOptions struct { }
RecoverableDatabasesClientListByServerOptions contains the optional parameters for the RecoverableDatabasesClient.ListByServer method.
type RecoverableDatabasesClientListByServerResponse ¶ added in v0.3.0
type RecoverableDatabasesClientListByServerResponse struct {
RecoverableDatabaseListResult
}
RecoverableDatabasesClientListByServerResponse contains the response from method RecoverableDatabasesClient.ListByServer.
type RecoverableManagedDatabase ¶
type RecoverableManagedDatabase struct { // Resource properties. Properties *RecoverableManagedDatabaseProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
RecoverableManagedDatabase - A recoverable managed database resource.
type RecoverableManagedDatabaseListResult ¶
type RecoverableManagedDatabaseListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*RecoverableManagedDatabase `json:"value,omitempty" azure:"ro"` }
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.
type RecoverableManagedDatabaseProperties ¶
type RecoverableManagedDatabaseProperties struct { // READ-ONLY; The last available backup date. LastAvailableBackupDate *string `json:"lastAvailableBackupDate,omitempty" azure:"ro"` }
RecoverableManagedDatabaseProperties - The recoverable managed database's properties.
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetRecoverableManagedDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewRecoverableManagedDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", "<recoverable-database-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*RecoverableManagedDatabasesClient) ListByInstance ¶
func (client *RecoverableManagedDatabasesClient) ListByInstance(resourceGroupName string, managedInstanceName string, options *RecoverableManagedDatabasesClientListByInstanceOptions) *runtime.Pager[RecoverableManagedDatabasesClientListByInstanceResponse]
ListByInstance - Gets a list of recoverable managed databases. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByInstance method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListRecoverableManagedDatabasesByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewRecoverableManagedDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByInstance("<resource-group-name>", "<managed-instance-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type RecoverableManagedDatabasesClientGetOptions ¶ added in v0.3.0
type RecoverableManagedDatabasesClientGetOptions struct { }
RecoverableManagedDatabasesClientGetOptions contains the optional parameters for the RecoverableManagedDatabasesClient.Get method.
type RecoverableManagedDatabasesClientGetResponse ¶ added in v0.3.0
type RecoverableManagedDatabasesClientGetResponse struct {
RecoverableManagedDatabase
}
RecoverableManagedDatabasesClientGetResponse contains the response from method RecoverableManagedDatabasesClient.Get.
type RecoverableManagedDatabasesClientListByInstanceOptions ¶ added in v0.3.0
type RecoverableManagedDatabasesClientListByInstanceOptions struct { }
RecoverableManagedDatabasesClientListByInstanceOptions contains the optional parameters for the RecoverableManagedDatabasesClient.ListByInstance method.
type RecoverableManagedDatabasesClientListByInstanceResponse ¶ added in v0.3.0
type RecoverableManagedDatabasesClientListByInstanceResponse struct {
RecoverableManagedDatabaseListResult
}
RecoverableManagedDatabasesClientListByInstanceResponse contains the response from method RecoverableManagedDatabasesClient.ListByInstance.
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 `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ReplicationLink - A replication link.
type ReplicationLinkListResult ¶
type ReplicationLinkListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ReplicationLink `json:"value,omitempty" azure:"ro"` }
ReplicationLinkListResult - A list of replication links.
func (ReplicationLinkListResult) MarshalJSON ¶
func (r ReplicationLinkListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ReplicationLinkListResult.
type ReplicationLinkProperties ¶
type ReplicationLinkProperties struct { // READ-ONLY; Whether the user is currently allowed to terminate the link. IsTerminationAllowed *bool `json:"isTerminationAllowed,omitempty" azure:"ro"` // READ-ONLY; Link type (GEO, NAMED). LinkType *ReplicationLinkType `json:"linkType,omitempty" azure:"ro"` // READ-ONLY; Resource partner database. PartnerDatabase *string `json:"partnerDatabase,omitempty" azure:"ro"` // READ-ONLY; Resource partner location. PartnerLocation *string `json:"partnerLocation,omitempty" azure:"ro"` // READ-ONLY; Partner replication role. PartnerRole *ReplicationRole `json:"partnerRole,omitempty" azure:"ro"` // READ-ONLY; Resource partner server. PartnerServer *string `json:"partnerServer,omitempty" azure:"ro"` // READ-ONLY; Seeding completion percentage for the link. PercentComplete *int32 `json:"percentComplete,omitempty" azure:"ro"` // READ-ONLY; Replication mode. ReplicationMode *string `json:"replicationMode,omitempty" azure:"ro"` // READ-ONLY; Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED). ReplicationState *ReplicationState `json:"replicationState,omitempty" azure:"ro"` // READ-ONLY; Local replication role. Role *ReplicationRole `json:"role,omitempty" azure:"ro"` // READ-ONLY; Time at which the link was created. StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` }
ReplicationLinkProperties - Properties of a replication link.
func (ReplicationLinkProperties) MarshalJSON ¶
func (r ReplicationLinkProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ReplicationLinkProperties.
func (*ReplicationLinkProperties) UnmarshalJSON ¶
func (r *ReplicationLinkProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ReplicationLinkProperties.
type ReplicationLinkType ¶
type ReplicationLinkType string
ReplicationLinkType - Link type (GEO, NAMED).
const ( ReplicationLinkTypeGEO ReplicationLinkType = "GEO" ReplicationLinkTypeNAMED ReplicationLinkType = "NAMED" )
func PossibleReplicationLinkTypeValues ¶
func PossibleReplicationLinkTypeValues() []ReplicationLinkType
PossibleReplicationLinkTypeValues returns the possible values for the ReplicationLinkType const type.
type ReplicationLinksClient ¶
type ReplicationLinksClient struct {
// contains filtered or unexported fields
}
ReplicationLinksClient contains the methods for the ReplicationLinks group. Don't use this type directly, use NewReplicationLinksClient() instead.
func NewReplicationLinksClient ¶
func NewReplicationLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReplicationLinksClient, error)
NewReplicationLinksClient creates a new instance of ReplicationLinksClient with the specified values. subscriptionID - The subscription ID that identifies an Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ReplicationLinksClient) BeginFailover ¶
func (client *ReplicationLinksClient) BeginFailover(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string, options *ReplicationLinksClientBeginFailoverOptions) (*armruntime.Poller[ReplicationLinksClientFailoverResponse], error)
BeginFailover - Fails over from the current primary server to this server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ReplicationLinkFailover.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewReplicationLinksClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginFailover(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<link-id>", &armsql.ReplicationLinksClientBeginFailoverOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ReplicationLinksClient) BeginFailoverAllowDataLoss ¶
func (client *ReplicationLinksClient) BeginFailoverAllowDataLoss(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string, options *ReplicationLinksClientBeginFailoverAllowDataLossOptions) (*armruntime.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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ReplicationLinkFailoverAllowDataLoss.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewReplicationLinksClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginFailoverAllowDataLoss(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<link-id>", &armsql.ReplicationLinksClientBeginFailoverAllowDataLossOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ReplicationLinksClient) Delete ¶
func (client *ReplicationLinksClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, linkID string, options *ReplicationLinksClientDeleteOptions) (ReplicationLinksClientDeleteResponse, error)
Delete - Deletes the replication link. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. serverName - The name of the server. databaseName - The name of the database. options - ReplicationLinksClientDeleteOptions contains the optional parameters for the ReplicationLinksClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ReplicationLinkDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewReplicationLinksClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Delete(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<link-id>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ReplicationLinkGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewReplicationLinksClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<link-id>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ReplicationLinksClient) ListByDatabase ¶
func (client *ReplicationLinksClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, options *ReplicationLinksClientListByDatabaseOptions) *runtime.Pager[ReplicationLinksClientListByDatabaseResponse]
ListByDatabase - Gets a list of replication links on database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ReplicationLinkListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewReplicationLinksClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<server-name>", "<database-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*ReplicationLinksClient) ListByServer ¶
func (client *ReplicationLinksClient) ListByServer(resourceGroupName string, serverName string, options *ReplicationLinksClientListByServerOptions) *runtime.Pager[ReplicationLinksClientListByServerResponse]
ListByServer - Gets a list of replication links. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ReplicationLinkListByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewReplicationLinksClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<resource-group-name>", "<server-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ReplicationLinksClientBeginFailoverAllowDataLossOptions ¶ added in v0.3.0
type ReplicationLinksClientBeginFailoverAllowDataLossOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ReplicationLinksClientBeginFailoverAllowDataLossOptions contains the optional parameters for the ReplicationLinksClient.BeginFailoverAllowDataLoss method.
type ReplicationLinksClientBeginFailoverOptions ¶ added in v0.3.0
type ReplicationLinksClientBeginFailoverOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ReplicationLinksClientBeginFailoverOptions contains the optional parameters for the ReplicationLinksClient.BeginFailover method.
type ReplicationLinksClientDeleteOptions ¶ added in v0.3.0
type ReplicationLinksClientDeleteOptions struct { }
ReplicationLinksClientDeleteOptions contains the optional parameters for the ReplicationLinksClient.Delete method.
type ReplicationLinksClientDeleteResponse ¶ added in v0.3.0
type ReplicationLinksClientDeleteResponse struct { }
ReplicationLinksClientDeleteResponse contains the response from method ReplicationLinksClient.Delete.
type ReplicationLinksClientFailoverAllowDataLossResponse ¶ added in v0.3.0
type ReplicationLinksClientFailoverAllowDataLossResponse struct {
ReplicationLink
}
ReplicationLinksClientFailoverAllowDataLossResponse contains the response from method ReplicationLinksClient.FailoverAllowDataLoss.
type ReplicationLinksClientFailoverResponse ¶ added in v0.3.0
type ReplicationLinksClientFailoverResponse struct {
ReplicationLink
}
ReplicationLinksClientFailoverResponse contains the response from method ReplicationLinksClient.Failover.
type ReplicationLinksClientGetOptions ¶ added in v0.3.0
type ReplicationLinksClientGetOptions struct { }
ReplicationLinksClientGetOptions contains the optional parameters for the ReplicationLinksClient.Get method.
type ReplicationLinksClientGetResponse ¶ added in v0.3.0
type ReplicationLinksClientGetResponse struct {
ReplicationLink
}
ReplicationLinksClientGetResponse contains the response from method ReplicationLinksClient.Get.
type ReplicationLinksClientListByDatabaseOptions ¶ added in v0.3.0
type ReplicationLinksClientListByDatabaseOptions struct { }
ReplicationLinksClientListByDatabaseOptions contains the optional parameters for the ReplicationLinksClient.ListByDatabase method.
type ReplicationLinksClientListByDatabaseResponse ¶ added in v0.3.0
type ReplicationLinksClientListByDatabaseResponse struct {
ReplicationLinkListResult
}
ReplicationLinksClientListByDatabaseResponse contains the response from method ReplicationLinksClient.ListByDatabase.
type ReplicationLinksClientListByServerOptions ¶ added in v0.3.0
type ReplicationLinksClientListByServerOptions struct { }
ReplicationLinksClientListByServerOptions contains the optional parameters for the ReplicationLinksClient.ListByServer method.
type ReplicationLinksClientListByServerResponse ¶ added in v0.3.0
type ReplicationLinksClientListByServerResponse struct {
ReplicationLinkListResult
}
ReplicationLinksClientListByServerResponse contains the response from method ReplicationLinksClient.ListByServer.
type ReplicationMode ¶ added in v0.4.0
type ReplicationMode string
ReplicationMode - The replication mode of a distributed availability group. Parameter will be ignored during link creation.
const ( ReplicationModeAsync ReplicationMode = "Async" ReplicationModeSync ReplicationMode = "Sync" )
func PossibleReplicationModeValues ¶ added in v0.4.0
func PossibleReplicationModeValues() []ReplicationMode
PossibleReplicationModeValues returns the possible values for the ReplicationMode const type.
type ReplicationRole ¶
type ReplicationRole string
ReplicationRole - Local replication role.
const ( ReplicationRolePrimary ReplicationRole = "Primary" ReplicationRoleSecondary ReplicationRole = "Secondary" ReplicationRoleNonReadableSecondary ReplicationRole = "NonReadableSecondary" ReplicationRoleSource ReplicationRole = "Source" ReplicationRoleCopy ReplicationRole = "Copy" )
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 `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
Resource - ARM 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 `json:"type,omitempty"` // The resource ids of the user assigned identities to use UserAssignedIdentities map[string]*UserIdentity `json:"userAssignedIdentities,omitempty"` // READ-ONLY; The Azure Active Directory principal id. PrincipalID *string `json:"principalId,omitempty" azure:"ro"` // READ-ONLY; The Azure Active Directory tenant id. TenantID *string `json:"tenantId,omitempty" azure:"ro"` }
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.
type ResourceMoveDefinition ¶
type ResourceMoveDefinition struct { // REQUIRED; The target ID for the resource ID *string `json:"id,omitempty"` }
ResourceMoveDefinition - Contains the information necessary to perform a resource move (rename).
type ResourceWithWritableName ¶
type ResourceWithWritableName struct { // Resource name. Name *string `json:"name,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ResourceWithWritableName - ARM resource.
type RestorableDroppedDatabase ¶
type RestorableDroppedDatabase struct { // Resource location. Location *string `json:"location,omitempty"` // Resource properties. Properties *RestorableDroppedDatabaseProperties `json:"properties,omitempty"` // The name and tier of the SKU. SKU *SKU `json:"sku,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
RestorableDroppedDatabase - A restorable dropped database resource.
func (RestorableDroppedDatabase) MarshalJSON ¶
func (r RestorableDroppedDatabase) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RestorableDroppedDatabase.
type RestorableDroppedDatabaseListResult ¶
type RestorableDroppedDatabaseListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*RestorableDroppedDatabase `json:"value,omitempty" azure:"ro"` }
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.
type RestorableDroppedDatabaseProperties ¶
type RestorableDroppedDatabaseProperties struct { // READ-ONLY; The storage account type used to store backups for this database. BackupStorageRedundancy *BackupStorageRedundancy `json:"backupStorageRedundancy,omitempty" azure:"ro"` // READ-ONLY; The creation date of the database (ISO8601 format). CreationDate *time.Time `json:"creationDate,omitempty" azure:"ro"` // READ-ONLY; The name of the database. DatabaseName *string `json:"databaseName,omitempty" azure:"ro"` // READ-ONLY; The deletion date of the database (ISO8601 format). DeletionDate *time.Time `json:"deletionDate,omitempty" azure:"ro"` // READ-ONLY; The earliest restore date of the database (ISO8601 format). EarliestRestoreDate *time.Time `json:"earliestRestoreDate,omitempty" azure:"ro"` // READ-ONLY; The max size of the database expressed in bytes. MaxSizeBytes *int64 `json:"maxSizeBytes,omitempty" azure:"ro"` }
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. resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. serverName - The name of the server. options - RestorableDroppedDatabasesClientGetOptions contains the optional parameters for the RestorableDroppedDatabasesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/GetRestorableDroppedDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewRestorableDroppedDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<restorable-dropped-database-id>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*RestorableDroppedDatabasesClient) ListByServer ¶
func (client *RestorableDroppedDatabasesClient) ListByServer(resourceGroupName string, serverName string, options *RestorableDroppedDatabasesClientListByServerOptions) *runtime.Pager[RestorableDroppedDatabasesClientListByServerResponse]
ListByServer - Gets a list of restorable dropped databases. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ListRestorableDroppedDatabasesByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewRestorableDroppedDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<resource-group-name>", "<server-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type RestorableDroppedDatabasesClientGetOptions ¶ added in v0.3.0
type RestorableDroppedDatabasesClientGetOptions struct { }
RestorableDroppedDatabasesClientGetOptions contains the optional parameters for the RestorableDroppedDatabasesClient.Get method.
type RestorableDroppedDatabasesClientGetResponse ¶ added in v0.3.0
type RestorableDroppedDatabasesClientGetResponse struct {
RestorableDroppedDatabase
}
RestorableDroppedDatabasesClientGetResponse contains the response from method RestorableDroppedDatabasesClient.Get.
type RestorableDroppedDatabasesClientListByServerOptions ¶ added in v0.3.0
type RestorableDroppedDatabasesClientListByServerOptions struct { }
RestorableDroppedDatabasesClientListByServerOptions contains the optional parameters for the RestorableDroppedDatabasesClient.ListByServer method.
type RestorableDroppedDatabasesClientListByServerResponse ¶ added in v0.3.0
type RestorableDroppedDatabasesClientListByServerResponse struct {
RestorableDroppedDatabaseListResult
}
RestorableDroppedDatabasesClientListByServerResponse contains the response from method RestorableDroppedDatabasesClient.ListByServer.
type RestorableDroppedManagedDatabase ¶
type RestorableDroppedManagedDatabase struct { // REQUIRED; Resource location. Location *string `json:"location,omitempty"` // Resource properties. Properties *RestorableDroppedManagedDatabaseProperties `json:"properties,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
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.
type RestorableDroppedManagedDatabaseListResult ¶
type RestorableDroppedManagedDatabaseListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*RestorableDroppedManagedDatabase `json:"value,omitempty" azure:"ro"` }
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.
type RestorableDroppedManagedDatabaseProperties ¶
type RestorableDroppedManagedDatabaseProperties struct { // READ-ONLY; The creation date of the database (ISO8601 format). CreationDate *time.Time `json:"creationDate,omitempty" azure:"ro"` // READ-ONLY; The name of the database. DatabaseName *string `json:"databaseName,omitempty" azure:"ro"` // READ-ONLY; The deletion date of the database (ISO8601 format). DeletionDate *time.Time `json:"deletionDate,omitempty" azure:"ro"` // READ-ONLY; The earliest restore date of the database (ISO8601 format). EarliestRestoreDate *time.Time `json:"earliestRestoreDate,omitempty" azure:"ro"` }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/GetRestorableDroppedManagedDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewRestorableDroppedManagedDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", "<restorable-dropped-database-id>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*RestorableDroppedManagedDatabasesClient) ListByInstance ¶
func (client *RestorableDroppedManagedDatabasesClient) ListByInstance(resourceGroupName string, managedInstanceName string, options *RestorableDroppedManagedDatabasesClientListByInstanceOptions) *runtime.Pager[RestorableDroppedManagedDatabasesClientListByInstanceResponse]
ListByInstance - Gets a list of restorable dropped managed databases. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByInstance method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/RestorableDroppedManagedDatabaseListByManagedInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewRestorableDroppedManagedDatabasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByInstance("<resource-group-name>", "<managed-instance-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type RestorableDroppedManagedDatabasesClientGetOptions ¶ added in v0.3.0
type RestorableDroppedManagedDatabasesClientGetOptions struct { }
RestorableDroppedManagedDatabasesClientGetOptions contains the optional parameters for the RestorableDroppedManagedDatabasesClient.Get method.
type RestorableDroppedManagedDatabasesClientGetResponse ¶ added in v0.3.0
type RestorableDroppedManagedDatabasesClientGetResponse struct {
RestorableDroppedManagedDatabase
}
RestorableDroppedManagedDatabasesClientGetResponse contains the response from method RestorableDroppedManagedDatabasesClient.Get.
type RestorableDroppedManagedDatabasesClientListByInstanceOptions ¶ added in v0.3.0
type RestorableDroppedManagedDatabasesClientListByInstanceOptions struct { }
RestorableDroppedManagedDatabasesClientListByInstanceOptions contains the optional parameters for the RestorableDroppedManagedDatabasesClient.ListByInstance method.
type RestorableDroppedManagedDatabasesClientListByInstanceResponse ¶ added in v0.3.0
type RestorableDroppedManagedDatabasesClientListByInstanceResponse struct {
RestorableDroppedManagedDatabaseListResult
}
RestorableDroppedManagedDatabasesClientListByInstanceResponse contains the response from method RestorableDroppedManagedDatabasesClient.ListByInstance.
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 `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource location. Location *string `json:"location,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
RestorePoint - Database restore points.
type RestorePointListResult ¶
type RestorePointListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*RestorePoint `json:"value,omitempty" azure:"ro"` }
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.
type RestorePointProperties ¶
type RestorePointProperties struct { // READ-ONLY; The earliest time to which this database can be restored EarliestRestoreDate *time.Time `json:"earliestRestoreDate,omitempty" azure:"ro"` // READ-ONLY; The time the backup was taken RestorePointCreationDate *time.Time `json:"restorePointCreationDate,omitempty" azure:"ro"` // READ-ONLY; The label of restore point for backup request by user RestorePointLabel *string `json:"restorePointLabel,omitempty" azure:"ro"` // READ-ONLY; The type of restore point RestorePointType *RestorePointType `json:"restorePointType,omitempty" azure:"ro"` }
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) (*armruntime.Poller[RestorePointsClientCreateResponse], error)
BeginCreate - Creates a restore point for a data warehouse. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRestorePointsPost.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewRestorePointsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreate(ctx, "<resource-group-name>", "<server-name>", "<database-name>", armsql.CreateDatabaseRestorePointDefinition{ RestorePointLabel: to.Ptr("<restore-point-label>"), }, &armsql.RestorePointsClientBeginCreateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRestorePointsDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewRestorePointsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Delete(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<restore-point-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRestorePointsGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewRestorePointsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<restore-point-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*RestorePointsClient) ListByDatabase ¶
func (client *RestorePointsClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, options *RestorePointsClientListByDatabaseOptions) *runtime.Pager[RestorePointsClientListByDatabaseResponse]
ListByDatabase - Gets a list of database restore points. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DatabaseRestorePointsListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewRestorePointsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<server-name>", "<database-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type RestorePointsClientBeginCreateOptions ¶ added in v0.3.0
type RestorePointsClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
RestorePointsClientBeginCreateOptions contains the optional parameters for the RestorePointsClient.BeginCreate method.
type RestorePointsClientCreateResponse ¶ added in v0.3.0
type RestorePointsClientCreateResponse struct {
RestorePoint
}
RestorePointsClientCreateResponse contains the response from method RestorePointsClient.Create.
type RestorePointsClientDeleteOptions ¶ added in v0.3.0
type RestorePointsClientDeleteOptions struct { }
RestorePointsClientDeleteOptions contains the optional parameters for the RestorePointsClient.Delete method.
type RestorePointsClientDeleteResponse ¶ added in v0.3.0
type RestorePointsClientDeleteResponse struct { }
RestorePointsClientDeleteResponse contains the response from method RestorePointsClient.Delete.
type RestorePointsClientGetOptions ¶ added in v0.3.0
type RestorePointsClientGetOptions struct { }
RestorePointsClientGetOptions contains the optional parameters for the RestorePointsClient.Get method.
type RestorePointsClientGetResponse ¶ added in v0.3.0
type RestorePointsClientGetResponse struct {
RestorePoint
}
RestorePointsClientGetResponse contains the response from method RestorePointsClient.Get.
type RestorePointsClientListByDatabaseOptions ¶ added in v0.3.0
type RestorePointsClientListByDatabaseOptions struct { }
RestorePointsClientListByDatabaseOptions contains the optional parameters for the RestorePointsClient.ListByDatabase method.
type RestorePointsClientListByDatabaseResponse ¶ added in v0.3.0
type RestorePointsClientListByDatabaseResponse struct {
RestorePointListResult
}
RestorePointsClientListByDatabaseResponse contains the response from method RestorePointsClient.ListByDatabase.
type SKU ¶
type SKU struct { // REQUIRED; The name of the SKU, typically, a letter + Number code, e.g. P3. Name *string `json:"name,omitempty"` // Capacity of the particular SKU. Capacity *int32 `json:"capacity,omitempty"` // If the service has different generations of hardware, for the same SKU, then that can be captured here. Family *string `json:"family,omitempty"` // Size of the particular SKU Size *string `json:"size,omitempty"` // The tier or edition of the particular SKU, e.g. Basic, Premium. Tier *string `json:"tier,omitempty"` }
SKU - An ARM Resource SKU.
type SQLAgentConfigurationPropertiesState ¶
type SQLAgentConfigurationPropertiesState string
SQLAgentConfigurationPropertiesState - The state of Sql Agent.
const ( SQLAgentConfigurationPropertiesStateDisabled SQLAgentConfigurationPropertiesState = "Disabled" SQLAgentConfigurationPropertiesStateEnabled SQLAgentConfigurationPropertiesState = "Enabled" )
func PossibleSQLAgentConfigurationPropertiesStateValues ¶
func PossibleSQLAgentConfigurationPropertiesStateValues() []SQLAgentConfigurationPropertiesState
PossibleSQLAgentConfigurationPropertiesStateValues returns the possible values for the SQLAgentConfigurationPropertiesState const type.
type SampleName ¶
type SampleName string
SampleName - The name of the sample schema to apply when creating this database.
const ( SampleNameAdventureWorksLT SampleName = "AdventureWorksLT" SampleNameWideWorldImportersFull SampleName = "WideWorldImportersFull" SampleNameWideWorldImportersStd SampleName = "WideWorldImportersStd" )
func PossibleSampleNameValues ¶
func PossibleSampleNameValues() []SampleName
PossibleSampleNameValues returns the possible values for the SampleName const type.
type SecondaryType ¶
type SecondaryType string
SecondaryType - The secondary type of the database if it is a secondary. Valid values are Geo and Named.
const ( SecondaryTypeGeo SecondaryType = "Geo" SecondaryTypeNamed SecondaryType = "Named" )
func PossibleSecondaryTypeValues ¶
func PossibleSecondaryTypeValues() []SecondaryType
PossibleSecondaryTypeValues returns the possible values for the SecondaryType const type.
type SecurityAlertPolicyName ¶
type SecurityAlertPolicyName string
const (
SecurityAlertPolicyNameDefault SecurityAlertPolicyName = "Default"
)
func PossibleSecurityAlertPolicyNameValues ¶
func PossibleSecurityAlertPolicyNameValues() []SecurityAlertPolicyName
PossibleSecurityAlertPolicyNameValues returns the possible values for the SecurityAlertPolicyName const type.
type SecurityAlertPolicyProperties ¶
type SecurityAlertPolicyProperties struct { // REQUIRED; Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on // the specific database. State *SecurityAlertPolicyState `json:"state,omitempty"` // Specifies an array of alerts that are disabled. Allowed values are: SqlInjection, SqlInjectionVulnerability, AccessAnomaly, // DataExfiltration, UnsafeAction, Brute_Force DisabledAlerts []*string `json:"disabledAlerts,omitempty"` // Specifies that the alert is sent to the account administrators. EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty"` // Specifies an array of e-mail addresses to which the alert is sent. EmailAddresses []*string `json:"emailAddresses,omitempty"` // Specifies the number of days to keep in the Threat Detection audit logs. RetentionDays *int32 `json:"retentionDays,omitempty"` // Specifies the identifier key of the Threat Detection audit storage account. StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` // 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 `json:"storageEndpoint,omitempty"` // READ-ONLY; Specifies the UTC creation time of the policy. CreationTime *time.Time `json:"creationTime,omitempty" azure:"ro"` }
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 ( SecurityAlertPolicyStateNew SecurityAlertPolicyState = "New" SecurityAlertPolicyStateEnabled SecurityAlertPolicyState = "Enabled" SecurityAlertPolicyStateDisabled SecurityAlertPolicyState = "Disabled" )
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 `json:"state,omitempty"` // Specifies an array of alerts that are disabled. Allowed values are: SqlInjection, SqlInjectionVulnerability, AccessAnomaly, // DataExfiltration, UnsafeAction, Brute_Force DisabledAlerts []*string `json:"disabledAlerts,omitempty"` // Specifies that the alert is sent to the account administrators. EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty"` // Specifies an array of e-mail addresses to which the alert is sent. EmailAddresses []*string `json:"emailAddresses,omitempty"` // Specifies the number of days to keep in the Threat Detection audit logs. RetentionDays *int32 `json:"retentionDays,omitempty"` // Specifies the identifier key of the Threat Detection audit storage account. StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` // 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 `json:"storageEndpoint,omitempty"` // READ-ONLY; Specifies the UTC creation time of the policy. CreationTime *time.Time `json:"creationTime,omitempty" azure:"ro"` }
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 ( SecurityAlertsPolicyStateEnabled SecurityAlertsPolicyState = "Enabled" SecurityAlertsPolicyStateDisabled SecurityAlertsPolicyState = "Disabled" )
func PossibleSecurityAlertsPolicyStateValues ¶
func PossibleSecurityAlertsPolicyStateValues() []SecurityAlertsPolicyState
PossibleSecurityAlertsPolicyStateValues returns the possible values for the SecurityAlertsPolicyState const type.
type SecurityEvent ¶
type SecurityEvent struct { // Resource properties. Properties *SecurityEventProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
SecurityEvent - A security event.
type SecurityEventCollection ¶
type SecurityEventCollection struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*SecurityEvent `json:"value,omitempty" azure:"ro"` }
SecurityEventCollection - A list of security events.
func (SecurityEventCollection) MarshalJSON ¶
func (s SecurityEventCollection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SecurityEventCollection.
type SecurityEventProperties ¶
type SecurityEventProperties struct { // READ-ONLY; The application used to execute the statement. ApplicationName *string `json:"applicationName,omitempty" azure:"ro"` // READ-ONLY; The IP address of the client who executed the statement. ClientIP *string `json:"clientIp,omitempty" azure:"ro"` // READ-ONLY; The database name Database *string `json:"database,omitempty" azure:"ro"` // READ-ONLY; The time when the security event occurred. EventTime *time.Time `json:"eventTime,omitempty" azure:"ro"` // READ-ONLY; The principal user who executed the statement PrincipalName *string `json:"principalName,omitempty" azure:"ro"` // READ-ONLY; The sql injection additional properties, populated only if the type of the security event is sql injection. SecurityEventSQLInjectionAdditionalProperties *SecurityEventSQLInjectionAdditionalProperties `json:"securityEventSqlInjectionAdditionalProperties,omitempty" azure:"ro"` // READ-ONLY; The type of the security event. SecurityEventType *SecurityEventType `json:"securityEventType,omitempty" azure:"ro"` // READ-ONLY; The server name Server *string `json:"server,omitempty" azure:"ro"` // READ-ONLY; The subscription name Subscription *string `json:"subscription,omitempty" azure:"ro"` }
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 `json:"errorCode,omitempty" azure:"ro"` // READ-ONLY; The sql error message ErrorMessage *string `json:"errorMessage,omitempty" azure:"ro"` // READ-ONLY; The sql error severity ErrorSeverity *int32 `json:"errorSeverity,omitempty" azure:"ro"` // READ-ONLY; The statement Statement *string `json:"statement,omitempty" azure:"ro"` // READ-ONLY; The statement highlight length StatementHighlightLength *int32 `json:"statementHighlightLength,omitempty" azure:"ro"` // READ-ONLY; The statement highlight offset StatementHighlightOffset *int32 `json:"statementHighlightOffset,omitempty" azure:"ro"` // READ-ONLY; The threat ID. ThreatID *string `json:"threatId,omitempty" azure:"ro"` }
SecurityEventSQLInjectionAdditionalProperties - The properties of a security event sql injection additional properties.
type SecurityEventType ¶
type SecurityEventType string
SecurityEventType - The type of the security event.
const ( SecurityEventTypeUndefined SecurityEventType = "Undefined" SecurityEventTypeSQLInjectionVulnerability SecurityEventType = "SqlInjectionVulnerability" SecurityEventTypeSQLInjectionExploit SecurityEventType = "SqlInjectionExploit" )
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 `json:"eventTime,omitempty"` // Whether to show server records or not. ShowServerRecords *bool `json:"showServerRecords,omitempty"` }
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 `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource that manages the sensitivity label. ManagedBy *string `json:"managedBy,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
SensitivityLabel - A sensitivity label.
type SensitivityLabelListResult ¶
type SensitivityLabelListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*SensitivityLabel `json:"value,omitempty" azure:"ro"` }
SensitivityLabelListResult - A list of sensitivity labels.
func (SensitivityLabelListResult) MarshalJSON ¶
func (s SensitivityLabelListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SensitivityLabelListResult.
type SensitivityLabelProperties ¶
type SensitivityLabelProperties struct { // The information type. InformationType *string `json:"informationType,omitempty"` // The information type ID. InformationTypeID *string `json:"informationTypeId,omitempty"` // The label ID. LabelID *string `json:"labelId,omitempty"` // The label name. LabelName *string `json:"labelName,omitempty"` Rank *SensitivityLabelRank `json:"rank,omitempty"` // READ-ONLY; The column name. ColumnName *string `json:"columnName,omitempty" azure:"ro"` // 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 `json:"isDisabled,omitempty" azure:"ro"` // READ-ONLY; The schema name. SchemaName *string `json:"schemaName,omitempty" azure:"ro"` // READ-ONLY; The table name. TableName *string `json:"tableName,omitempty" azure:"ro"` }
SensitivityLabelProperties - Properties of a sensitivity label.
type SensitivityLabelRank ¶
type SensitivityLabelRank string
const ( SensitivityLabelRankNone SensitivityLabelRank = "None" SensitivityLabelRankLow SensitivityLabelRank = "Low" SensitivityLabelRankMedium SensitivityLabelRank = "Medium" SensitivityLabelRankHigh SensitivityLabelRank = "High" SensitivityLabelRankCritical SensitivityLabelRank = "Critical" )
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 `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
SensitivityLabelUpdate - A sensitivity label update operation.
type SensitivityLabelUpdateKind ¶
type SensitivityLabelUpdateKind string
const ( SensitivityLabelUpdateKindSet SensitivityLabelUpdateKind = "set" SensitivityLabelUpdateKindRemove SensitivityLabelUpdateKind = "remove" )
func PossibleSensitivityLabelUpdateKindValues ¶
func PossibleSensitivityLabelUpdateKindValues() []SensitivityLabelUpdateKind
PossibleSensitivityLabelUpdateKindValues returns the possible values for the SensitivityLabelUpdateKind const type.
type SensitivityLabelUpdateList ¶
type SensitivityLabelUpdateList struct {
Operations []*SensitivityLabelUpdate `json:"operations,omitempty"`
}
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.
type SensitivityLabelUpdateProperties ¶
type SensitivityLabelUpdateProperties struct { // REQUIRED; Column name to update. Column *string `json:"column,omitempty"` // REQUIRED Op *SensitivityLabelUpdateKind `json:"op,omitempty"` // REQUIRED; Schema name of the column to update. Schema *string `json:"schema,omitempty"` // REQUIRED; Table name of the column to update. Table *string `json:"table,omitempty"` // The sensitivity label information to apply on a column. SensitivityLabel *SensitivityLabel `json:"sensitivityLabel,omitempty"` }
SensitivityLabelUpdateProperties - Properties of an operation executed on a sensitivity label.
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ColumnSensitivityLabelCreateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSensitivityLabelsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.CreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<schema-name>", "<table-name>", "<column-name>", armsql.SensitivityLabel{ Properties: &armsql.SensitivityLabelProperties{ InformationType: to.Ptr("<information-type>"), InformationTypeID: to.Ptr("<information-type-id>"), LabelID: to.Ptr("<label-id>"), LabelName: to.Ptr("<label-name>"), Rank: to.Ptr(armsql.SensitivityLabelRankLow), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ColumnSensitivityLabelDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSensitivityLabelsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Delete(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<schema-name>", "<table-name>", "<column-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/RecommendedColumnSensitivityLabelDisable.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSensitivityLabelsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.DisableRecommendation(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<schema-name>", "<table-name>", "<column-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/RecommendedColumnSensitivityLabelEnable.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSensitivityLabelsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.EnableRecommendation(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<schema-name>", "<table-name>", "<column-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ColumnSensitivityLabelGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSensitivityLabelsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<schema-name>", "<table-name>", "<column-name>", armsql.SensitivityLabelSourceCurrent, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*SensitivityLabelsClient) ListByDatabase ¶ added in v0.4.0
func (client *SensitivityLabelsClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, options *SensitivityLabelsClientListByDatabaseOptions) *runtime.Pager[SensitivityLabelsClientListByDatabaseResponse]
ListByDatabase - Gets the sensitivity labels of a given database If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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 - SensitivityLabelsClientListByDatabaseOptions contains the optional parameters for the SensitivityLabelsClient.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/SensitivityLabelsListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSensitivityLabelsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<server-name>", "<database-name>", &armsql.SensitivityLabelsClientListByDatabaseOptions{Filter: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*SensitivityLabelsClient) ListCurrentByDatabase ¶
func (client *SensitivityLabelsClient) ListCurrentByDatabase(resourceGroupName string, serverName string, databaseName string, options *SensitivityLabelsClientListCurrentByDatabaseOptions) *runtime.Pager[SensitivityLabelsClientListCurrentByDatabaseResponse]
ListCurrentByDatabase - Gets the sensitivity labels of a given database If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListCurrentByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/SensitivityLabelsListByDatabaseWithSourceCurrent.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSensitivityLabelsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListCurrentByDatabase("<resource-group-name>", "<server-name>", "<database-name>", &armsql.SensitivityLabelsClientListCurrentByDatabaseOptions{SkipToken: nil, Count: nil, Filter: nil, }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*SensitivityLabelsClient) ListRecommendedByDatabase ¶
func (client *SensitivityLabelsClient) ListRecommendedByDatabase(resourceGroupName string, serverName string, databaseName string, options *SensitivityLabelsClientListRecommendedByDatabaseOptions) *runtime.Pager[SensitivityLabelsClientListRecommendedByDatabaseResponse]
ListRecommendedByDatabase - Gets the sensitivity labels of a given database If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListRecommendedByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/SensitivityLabelsListByDatabaseWithSourceRecommended.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSensitivityLabelsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListRecommendedByDatabase("<resource-group-name>", "<server-name>", "<database-name>", &armsql.SensitivityLabelsClientListRecommendedByDatabaseOptions{SkipToken: nil, IncludeDisabledRecommendations: nil, Filter: nil, }) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/SensitivityLabelsCurrentUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSensitivityLabelsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Update(ctx, "<resource-group-name>", "<server-name>", "<database-name>", armsql.SensitivityLabelUpdateList{ Operations: []*armsql.SensitivityLabelUpdate{ { Properties: &armsql.SensitivityLabelUpdateProperties{ Schema: to.Ptr("<schema>"), Column: to.Ptr("<column>"), Op: to.Ptr(armsql.SensitivityLabelUpdateKindSet), SensitivityLabel: &armsql.SensitivityLabel{ Properties: &armsql.SensitivityLabelProperties{ InformationType: to.Ptr("<information-type>"), InformationTypeID: to.Ptr("<information-type-id>"), LabelID: to.Ptr("<label-id>"), LabelName: to.Ptr("<label-name>"), Rank: to.Ptr(armsql.SensitivityLabelRankLow), }, }, Table: to.Ptr("<table>"), }, }, { Properties: &armsql.SensitivityLabelUpdateProperties{ Schema: to.Ptr("<schema>"), Column: to.Ptr("<column>"), Op: to.Ptr(armsql.SensitivityLabelUpdateKindSet), SensitivityLabel: &armsql.SensitivityLabel{ Properties: &armsql.SensitivityLabelProperties{ InformationType: to.Ptr("<information-type>"), InformationTypeID: to.Ptr("<information-type-id>"), LabelID: to.Ptr("<label-id>"), LabelName: to.Ptr("<label-name>"), Rank: to.Ptr(armsql.SensitivityLabelRankCritical), }, }, Table: to.Ptr("<table>"), }, }, { Properties: &armsql.SensitivityLabelUpdateProperties{ Schema: to.Ptr("<schema>"), Column: to.Ptr("<column>"), Op: to.Ptr(armsql.SensitivityLabelUpdateKindRemove), Table: to.Ptr("<table>"), }, }}, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
Output:
type SensitivityLabelsClientCreateOrUpdateOptions ¶ added in v0.3.0
type SensitivityLabelsClientCreateOrUpdateOptions struct { }
SensitivityLabelsClientCreateOrUpdateOptions contains the optional parameters for the SensitivityLabelsClient.CreateOrUpdate method.
type SensitivityLabelsClientCreateOrUpdateResponse ¶ added in v0.3.0
type SensitivityLabelsClientCreateOrUpdateResponse struct {
SensitivityLabel
}
SensitivityLabelsClientCreateOrUpdateResponse contains the response from method SensitivityLabelsClient.CreateOrUpdate.
type SensitivityLabelsClientDeleteOptions ¶ added in v0.3.0
type SensitivityLabelsClientDeleteOptions struct { }
SensitivityLabelsClientDeleteOptions contains the optional parameters for the SensitivityLabelsClient.Delete method.
type SensitivityLabelsClientDeleteResponse ¶ added in v0.3.0
type SensitivityLabelsClientDeleteResponse struct { }
SensitivityLabelsClientDeleteResponse contains the response from method SensitivityLabelsClient.Delete.
type SensitivityLabelsClientDisableRecommendationOptions ¶ added in v0.3.0
type SensitivityLabelsClientDisableRecommendationOptions struct { }
SensitivityLabelsClientDisableRecommendationOptions contains the optional parameters for the SensitivityLabelsClient.DisableRecommendation method.
type SensitivityLabelsClientDisableRecommendationResponse ¶ added in v0.3.0
type SensitivityLabelsClientDisableRecommendationResponse struct { }
SensitivityLabelsClientDisableRecommendationResponse contains the response from method SensitivityLabelsClient.DisableRecommendation.
type SensitivityLabelsClientEnableRecommendationOptions ¶ added in v0.3.0
type SensitivityLabelsClientEnableRecommendationOptions struct { }
SensitivityLabelsClientEnableRecommendationOptions contains the optional parameters for the SensitivityLabelsClient.EnableRecommendation method.
type SensitivityLabelsClientEnableRecommendationResponse ¶ added in v0.3.0
type SensitivityLabelsClientEnableRecommendationResponse struct { }
SensitivityLabelsClientEnableRecommendationResponse contains the response from method SensitivityLabelsClient.EnableRecommendation.
type SensitivityLabelsClientGetOptions ¶ added in v0.3.0
type SensitivityLabelsClientGetOptions struct { }
SensitivityLabelsClientGetOptions contains the optional parameters for the SensitivityLabelsClient.Get method.
type SensitivityLabelsClientGetResponse ¶ added in v0.3.0
type SensitivityLabelsClientGetResponse struct {
SensitivityLabel
}
SensitivityLabelsClientGetResponse contains the response from method SensitivityLabelsClient.Get.
type SensitivityLabelsClientListByDatabaseOptions ¶ added in v0.4.0
type SensitivityLabelsClientListByDatabaseOptions struct { // An OData filter expression that filters elements in the collection. Filter *string }
SensitivityLabelsClientListByDatabaseOptions contains the optional parameters for the SensitivityLabelsClient.ListByDatabase method.
type SensitivityLabelsClientListByDatabaseResponse ¶ added in v0.4.0
type SensitivityLabelsClientListByDatabaseResponse struct {
SensitivityLabelListResult
}
SensitivityLabelsClientListByDatabaseResponse contains the response from method SensitivityLabelsClient.ListByDatabase.
type SensitivityLabelsClientListCurrentByDatabaseOptions ¶ added in v0.3.0
type SensitivityLabelsClientListCurrentByDatabaseOptions struct { Count *bool // An OData filter expression that filters elements in the collection. Filter *string SkipToken *string }
SensitivityLabelsClientListCurrentByDatabaseOptions contains the optional parameters for the SensitivityLabelsClient.ListCurrentByDatabase method.
type SensitivityLabelsClientListCurrentByDatabaseResponse ¶ added in v0.3.0
type SensitivityLabelsClientListCurrentByDatabaseResponse struct {
SensitivityLabelListResult
}
SensitivityLabelsClientListCurrentByDatabaseResponse contains the response from method SensitivityLabelsClient.ListCurrentByDatabase.
type SensitivityLabelsClientListRecommendedByDatabaseOptions ¶ added in v0.3.0
type SensitivityLabelsClientListRecommendedByDatabaseOptions struct { // An OData filter expression that filters elements in the collection. Filter *string // Specifies whether to include disabled recommendations or not. IncludeDisabledRecommendations *bool SkipToken *string }
SensitivityLabelsClientListRecommendedByDatabaseOptions contains the optional parameters for the SensitivityLabelsClient.ListRecommendedByDatabase method.
type SensitivityLabelsClientListRecommendedByDatabaseResponse ¶ added in v0.3.0
type SensitivityLabelsClientListRecommendedByDatabaseResponse struct {
SensitivityLabelListResult
}
SensitivityLabelsClientListRecommendedByDatabaseResponse contains the response from method SensitivityLabelsClient.ListRecommendedByDatabase.
type SensitivityLabelsClientUpdateOptions ¶ added in v0.3.0
type SensitivityLabelsClientUpdateOptions struct { }
SensitivityLabelsClientUpdateOptions contains the optional parameters for the SensitivityLabelsClient.Update method.
type SensitivityLabelsClientUpdateResponse ¶ added in v0.3.0
type SensitivityLabelsClientUpdateResponse struct { }
SensitivityLabelsClientUpdateResponse contains the response from method SensitivityLabelsClient.Update.
type Server ¶
type Server struct { // REQUIRED; Resource location. Location *string `json:"location,omitempty"` // The Azure Active Directory identity of the server. Identity *ResourceIdentity `json:"identity,omitempty"` // Resource properties. Properties *ServerProperties `json:"properties,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Kind of sql server. This is metadata used for the Azure portal experience. Kind *string `json:"kind,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
Server - An Azure SQL Database server.
func (Server) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Server.
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerAdvisorGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerAdvisorsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<advisor-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerAdvisorList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerAdvisorsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.ListByServer(ctx, "<resource-group-name>", "<server-name>", &armsql.ServerAdvisorsClientListByServerOptions{Expand: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerAdvisorUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerAdvisorsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Update(ctx, "<resource-group-name>", "<server-name>", "<advisor-name>", armsql.Advisor{ Properties: &armsql.AdvisorProperties{ AutoExecuteStatus: to.Ptr(armsql.AutoExecuteStatusDisabled), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
type ServerAdvisorsClientGetOptions ¶ added in v0.3.0
type ServerAdvisorsClientGetOptions struct { }
ServerAdvisorsClientGetOptions contains the optional parameters for the ServerAdvisorsClient.Get method.
type ServerAdvisorsClientGetResponse ¶ added in v0.3.0
type ServerAdvisorsClientGetResponse struct {
Advisor
}
ServerAdvisorsClientGetResponse contains the response from method ServerAdvisorsClient.Get.
type ServerAdvisorsClientListByServerOptions ¶ added in v0.3.0
type ServerAdvisorsClientListByServerOptions struct { // The child resources to include in the response. Expand *string }
ServerAdvisorsClientListByServerOptions contains the optional parameters for the ServerAdvisorsClient.ListByServer method.
type ServerAdvisorsClientListByServerResponse ¶ added in v0.3.0
type ServerAdvisorsClientListByServerResponse struct { // Array of Advisor AdvisorArray []*Advisor }
ServerAdvisorsClientListByServerResponse contains the response from method ServerAdvisorsClient.ListByServer.
type ServerAdvisorsClientUpdateOptions ¶ added in v0.3.0
type ServerAdvisorsClientUpdateOptions struct { }
ServerAdvisorsClientUpdateOptions contains the optional parameters for the ServerAdvisorsClient.Update method.
type ServerAdvisorsClientUpdateResponse ¶ added in v0.3.0
type ServerAdvisorsClientUpdateResponse struct {
Advisor
}
ServerAdvisorsClientUpdateResponse contains the response from method ServerAdvisorsClient.Update.
type ServerAutomaticTuning ¶
type ServerAutomaticTuning struct { // Resource properties. Properties *AutomaticTuningServerProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ServerAutomaticTuning - Server-level Automatic Tuning.
func (ServerAutomaticTuning) MarshalJSON ¶
func (s ServerAutomaticTuning) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller 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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerAutomaticTuningGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerAutomaticTuningClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerAutomaticTuningUpdateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerAutomaticTuningClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Update(ctx, "<resource-group-name>", "<server-name>", 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) return } // TODO: use response item _ = res }
Output:
type ServerAutomaticTuningClientGetOptions ¶ added in v0.3.0
type ServerAutomaticTuningClientGetOptions struct { }
ServerAutomaticTuningClientGetOptions contains the optional parameters for the ServerAutomaticTuningClient.Get method.
type ServerAutomaticTuningClientGetResponse ¶ added in v0.3.0
type ServerAutomaticTuningClientGetResponse struct {
ServerAutomaticTuning
}
ServerAutomaticTuningClientGetResponse contains the response from method ServerAutomaticTuningClient.Get.
type ServerAutomaticTuningClientUpdateOptions ¶ added in v0.3.0
type ServerAutomaticTuningClientUpdateOptions struct { }
ServerAutomaticTuningClientUpdateOptions contains the optional parameters for the ServerAutomaticTuningClient.Update method.
type ServerAutomaticTuningClientUpdateResponse ¶ added in v0.3.0
type ServerAutomaticTuningClientUpdateResponse struct {
ServerAutomaticTuning
}
ServerAutomaticTuningClientUpdateResponse contains the response from method ServerAutomaticTuningClient.Update.
type ServerAzureADAdministrator ¶
type ServerAzureADAdministrator struct { // Resource properties. Properties *AdministratorProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ServerAzureADAdministrator - Azure Active Directory administrator.
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) (*armruntime.Poller[ServerAzureADAdministratorsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates an existing Azure Active Directory administrator. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AdministratorCreateOrUpdate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerAzureADAdministratorsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", armsql.AdministratorNameActiveDirectory, armsql.ServerAzureADAdministrator{ Properties: &armsql.AdministratorProperties{ AdministratorType: to.Ptr(armsql.AdministratorTypeActiveDirectory), Login: to.Ptr("<login>"), Sid: to.Ptr("<sid>"), TenantID: to.Ptr("<tenant-id>"), }, }, &armsql.ServerAzureADAdministratorsClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ServerAzureADAdministratorsClient) BeginDelete ¶
func (client *ServerAzureADAdministratorsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, administratorName AdministratorName, options *ServerAzureADAdministratorsClientBeginDeleteOptions) (*armruntime.Poller[ServerAzureADAdministratorsClientDeleteResponse], error)
BeginDelete - Deletes the Azure Active Directory administrator with the given name. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AdministratorDelete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerAzureADAdministratorsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<server-name>", armsql.AdministratorNameActiveDirectory, &armsql.ServerAzureADAdministratorsClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AdministratorGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerAzureADAdministratorsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", armsql.AdministratorNameActiveDirectory, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ServerAzureADAdministratorsClient) ListByServer ¶
func (client *ServerAzureADAdministratorsClient) ListByServer(resourceGroupName string, serverName string, options *ServerAzureADAdministratorsClientListByServerOptions) *runtime.Pager[ServerAzureADAdministratorsClientListByServerResponse]
ListByServer - Gets a list of Azure Active Directory administrators in a server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AdministratorList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerAzureADAdministratorsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<resource-group-name>", "<server-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ServerAzureADAdministratorsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ServerAzureADAdministratorsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerAzureADAdministratorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerAzureADAdministratorsClient.BeginCreateOrUpdate method.
type ServerAzureADAdministratorsClientBeginDeleteOptions ¶ added in v0.3.0
type ServerAzureADAdministratorsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerAzureADAdministratorsClientBeginDeleteOptions contains the optional parameters for the ServerAzureADAdministratorsClient.BeginDelete method.
type ServerAzureADAdministratorsClientCreateOrUpdateResponse ¶ added in v0.3.0
type ServerAzureADAdministratorsClientCreateOrUpdateResponse struct {
ServerAzureADAdministrator
}
ServerAzureADAdministratorsClientCreateOrUpdateResponse contains the response from method ServerAzureADAdministratorsClient.CreateOrUpdate.
type ServerAzureADAdministratorsClientDeleteResponse ¶ added in v0.3.0
type ServerAzureADAdministratorsClientDeleteResponse struct { }
ServerAzureADAdministratorsClientDeleteResponse contains the response from method ServerAzureADAdministratorsClient.Delete.
type ServerAzureADAdministratorsClientGetOptions ¶ added in v0.3.0
type ServerAzureADAdministratorsClientGetOptions struct { }
ServerAzureADAdministratorsClientGetOptions contains the optional parameters for the ServerAzureADAdministratorsClient.Get method.
type ServerAzureADAdministratorsClientGetResponse ¶ added in v0.3.0
type ServerAzureADAdministratorsClientGetResponse struct {
ServerAzureADAdministrator
}
ServerAzureADAdministratorsClientGetResponse contains the response from method ServerAzureADAdministratorsClient.Get.
type ServerAzureADAdministratorsClientListByServerOptions ¶ added in v0.3.0
type ServerAzureADAdministratorsClientListByServerOptions struct { }
ServerAzureADAdministratorsClientListByServerOptions contains the optional parameters for the ServerAzureADAdministratorsClient.ListByServer method.
type ServerAzureADAdministratorsClientListByServerResponse ¶ added in v0.3.0
type ServerAzureADAdministratorsClientListByServerResponse struct {
AdministratorListResult
}
ServerAzureADAdministratorsClientListByServerResponse contains the response from method ServerAzureADAdministratorsClient.ListByServer.
type ServerAzureADOnlyAuthentication ¶
type ServerAzureADOnlyAuthentication struct { // Resource properties. Properties *AzureADOnlyAuthProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ServerAzureADOnlyAuthentication - Azure Active Directory only authentication.
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) (*armruntime.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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AzureADOnlyAuthCreateOrUpdate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerAzureADOnlyAuthenticationsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", armsql.AuthenticationNameDefault, armsql.ServerAzureADOnlyAuthentication{ Properties: &armsql.AzureADOnlyAuthProperties{ AzureADOnlyAuthentication: to.Ptr(false), }, }, &armsql.ServerAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ServerAzureADOnlyAuthenticationsClient) BeginDelete ¶
func (client *ServerAzureADOnlyAuthenticationsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, authenticationName AuthenticationName, options *ServerAzureADOnlyAuthenticationsClientBeginDeleteOptions) (*armruntime.Poller[ServerAzureADOnlyAuthenticationsClientDeleteResponse], error)
BeginDelete - Deletes an existing server Active Directory only authentication property. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AzureADOnlyAuthDelete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerAzureADOnlyAuthenticationsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<server-name>", armsql.AuthenticationNameDefault, &armsql.ServerAzureADOnlyAuthenticationsClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AzureADOnlyAuthGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerAzureADOnlyAuthenticationsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", armsql.AuthenticationNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ServerAzureADOnlyAuthenticationsClient) ListByServer ¶
func (client *ServerAzureADOnlyAuthenticationsClient) ListByServer(resourceGroupName string, serverName string, options *ServerAzureADOnlyAuthenticationsClientListByServerOptions) *runtime.Pager[ServerAzureADOnlyAuthenticationsClientListByServerResponse]
ListByServer - Gets a list of server Azure Active Directory only authentications. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/AzureADOnlyAuthList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerAzureADOnlyAuthenticationsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<resource-group-name>", "<server-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ServerAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ServerAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerAzureADOnlyAuthenticationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerAzureADOnlyAuthenticationsClient.BeginCreateOrUpdate method.
type ServerAzureADOnlyAuthenticationsClientBeginDeleteOptions ¶ added in v0.3.0
type ServerAzureADOnlyAuthenticationsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerAzureADOnlyAuthenticationsClientBeginDeleteOptions contains the optional parameters for the ServerAzureADOnlyAuthenticationsClient.BeginDelete method.
type ServerAzureADOnlyAuthenticationsClientCreateOrUpdateResponse ¶ added in v0.3.0
type ServerAzureADOnlyAuthenticationsClientCreateOrUpdateResponse struct {
ServerAzureADOnlyAuthentication
}
ServerAzureADOnlyAuthenticationsClientCreateOrUpdateResponse contains the response from method ServerAzureADOnlyAuthenticationsClient.CreateOrUpdate.
type ServerAzureADOnlyAuthenticationsClientDeleteResponse ¶ added in v0.3.0
type ServerAzureADOnlyAuthenticationsClientDeleteResponse struct { }
ServerAzureADOnlyAuthenticationsClientDeleteResponse contains the response from method ServerAzureADOnlyAuthenticationsClient.Delete.
type ServerAzureADOnlyAuthenticationsClientGetOptions ¶ added in v0.3.0
type ServerAzureADOnlyAuthenticationsClientGetOptions struct { }
ServerAzureADOnlyAuthenticationsClientGetOptions contains the optional parameters for the ServerAzureADOnlyAuthenticationsClient.Get method.
type ServerAzureADOnlyAuthenticationsClientGetResponse ¶ added in v0.3.0
type ServerAzureADOnlyAuthenticationsClientGetResponse struct {
ServerAzureADOnlyAuthentication
}
ServerAzureADOnlyAuthenticationsClientGetResponse contains the response from method ServerAzureADOnlyAuthenticationsClient.Get.
type ServerAzureADOnlyAuthenticationsClientListByServerOptions ¶ added in v0.3.0
type ServerAzureADOnlyAuthenticationsClientListByServerOptions struct { }
ServerAzureADOnlyAuthenticationsClientListByServerOptions contains the optional parameters for the ServerAzureADOnlyAuthenticationsClient.ListByServer method.
type ServerAzureADOnlyAuthenticationsClientListByServerResponse ¶ added in v0.3.0
type ServerAzureADOnlyAuthenticationsClientListByServerResponse struct {
AzureADOnlyAuthListResult
}
ServerAzureADOnlyAuthenticationsClientListByServerResponse contains the response from method ServerAzureADOnlyAuthenticationsClient.ListByServer.
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) (*armruntime.Poller[ServerBlobAuditingPoliciesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a server's blob auditing policy. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerBlobAuditingCreateMax.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerBlobAuditingPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", 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("<storage-account-access-key>"), StorageAccountSubscriptionID: to.Ptr("<storage-account-subscription-id>"), StorageEndpoint: to.Ptr("<storage-endpoint>"), }, }, &armsql.ServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerBlobAuditingGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerBlobAuditingPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ServerBlobAuditingPoliciesClient) ListByServer ¶
func (client *ServerBlobAuditingPoliciesClient) ListByServer(resourceGroupName string, serverName string, options *ServerBlobAuditingPoliciesClientListByServerOptions) *runtime.Pager[ServerBlobAuditingPoliciesClientListByServerResponse]
ListByServer - Lists auditing settings of a server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerAuditingSettingsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerBlobAuditingPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<resource-group-name>", "<server-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerBlobAuditingPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerBlobAuditingPoliciesClient.BeginCreateOrUpdate method.
type ServerBlobAuditingPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ServerBlobAuditingPoliciesClientCreateOrUpdateResponse struct {
ServerBlobAuditingPolicy
}
ServerBlobAuditingPoliciesClientCreateOrUpdateResponse contains the response from method ServerBlobAuditingPoliciesClient.CreateOrUpdate.
type ServerBlobAuditingPoliciesClientGetOptions ¶ added in v0.3.0
type ServerBlobAuditingPoliciesClientGetOptions struct { }
ServerBlobAuditingPoliciesClientGetOptions contains the optional parameters for the ServerBlobAuditingPoliciesClient.Get method.
type ServerBlobAuditingPoliciesClientGetResponse ¶ added in v0.3.0
type ServerBlobAuditingPoliciesClientGetResponse struct {
ServerBlobAuditingPolicy
}
ServerBlobAuditingPoliciesClientGetResponse contains the response from method ServerBlobAuditingPoliciesClient.Get.
type ServerBlobAuditingPoliciesClientListByServerOptions ¶ added in v0.3.0
type ServerBlobAuditingPoliciesClientListByServerOptions struct { }
ServerBlobAuditingPoliciesClientListByServerOptions contains the optional parameters for the ServerBlobAuditingPoliciesClient.ListByServer method.
type ServerBlobAuditingPoliciesClientListByServerResponse ¶ added in v0.3.0
type ServerBlobAuditingPoliciesClientListByServerResponse struct {
ServerBlobAuditingPolicyListResult
}
ServerBlobAuditingPoliciesClientListByServerResponse contains the response from method ServerBlobAuditingPoliciesClient.ListByServer.
type ServerBlobAuditingPolicy ¶
type ServerBlobAuditingPolicy struct { // Resource properties. Properties *ServerBlobAuditingPolicyProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ServerBlobAuditingPolicy - A server blob auditing policy.
type ServerBlobAuditingPolicyListResult ¶
type ServerBlobAuditingPolicyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ServerBlobAuditingPolicy `json:"value,omitempty" azure:"ro"` }
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.
type ServerBlobAuditingPolicyProperties ¶
type ServerBlobAuditingPolicyProperties struct { // REQUIRED; Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. State *BlobAuditingPolicyState `json:"state,omitempty"` // 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 BATCHCOMPLETED_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 `json:"auditActionsAndGroups,omitempty"` // 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 `json:"isAzureMonitorTargetEnabled,omitempty"` // 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 `json:"isDevopsAuditEnabled,omitempty"` // Specifies whether storageAccountAccessKey value is the storage's secondary key. IsStorageSecondaryKeyInUse *bool `json:"isStorageSecondaryKeyInUse,omitempty"` // 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 `json:"queueDelayMs,omitempty"` // Specifies the number of days to keep in the audit logs in the storage account. RetentionDays *int32 `json:"retentionDays,omitempty"` // 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 `json:"storageAccountAccessKey,omitempty"` // Specifies the blob storage subscription Id. StorageAccountSubscriptionID *string `json:"storageAccountSubscriptionId,omitempty"` // Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint // or isAzureMonitorTargetEnabled is required. StorageEndpoint *string `json:"storageEndpoint,omitempty"` }
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.
type ServerCommunicationLink ¶
type ServerCommunicationLink struct { // The properties of resource. Properties *ServerCommunicationLinkProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Communication link kind. This property is used for Azure Portal metadata. Kind *string `json:"kind,omitempty" azure:"ro"` // READ-ONLY; Communication link location. Location *string `json:"location,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ServerCommunicationLink - Server communication link.
type ServerCommunicationLinkListResult ¶
type ServerCommunicationLinkListResult struct { // The list of server communication links. Value []*ServerCommunicationLink `json:"value,omitempty"` }
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.
type ServerCommunicationLinkProperties ¶
type ServerCommunicationLinkProperties struct { // REQUIRED; The name of the partner server. PartnerServer *string `json:"partnerServer,omitempty"` // READ-ONLY; The state. State *string `json:"state,omitempty" azure:"ro"` }
ServerCommunicationLinkProperties - The properties of a server communication link.
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) (*armruntime.Poller[ServerCommunicationLinksClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates a server communication link. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ServerCommunicationLinkCreateOrUpdate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerCommunicationLinksClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<communication-link-name>", armsql.ServerCommunicationLink{ Properties: &armsql.ServerCommunicationLinkProperties{ PartnerServer: to.Ptr("<partner-server>"), }, }, &armsql.ServerCommunicationLinksClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ServerCommunicationLinkDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerCommunicationLinksClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Delete(ctx, "<resource-group-name>", "<server-name>", "<communication-link-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ServerCommunicationLinkGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerCommunicationLinksClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<communication-link-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ServerCommunicationLinksClient) ListByServer ¶
func (client *ServerCommunicationLinksClient) ListByServer(resourceGroupName string, serverName string, options *ServerCommunicationLinksClientListByServerOptions) *runtime.Pager[ServerCommunicationLinksClientListByServerResponse]
ListByServer - Gets a list of server communication links. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ServerCommunicationLinkList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerCommunicationLinksClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<resource-group-name>", "<server-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ServerCommunicationLinksClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ServerCommunicationLinksClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerCommunicationLinksClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerCommunicationLinksClient.BeginCreateOrUpdate method.
type ServerCommunicationLinksClientCreateOrUpdateResponse ¶ added in v0.3.0
type ServerCommunicationLinksClientCreateOrUpdateResponse struct {
ServerCommunicationLink
}
ServerCommunicationLinksClientCreateOrUpdateResponse contains the response from method ServerCommunicationLinksClient.CreateOrUpdate.
type ServerCommunicationLinksClientDeleteOptions ¶ added in v0.3.0
type ServerCommunicationLinksClientDeleteOptions struct { }
ServerCommunicationLinksClientDeleteOptions contains the optional parameters for the ServerCommunicationLinksClient.Delete method.
type ServerCommunicationLinksClientDeleteResponse ¶ added in v0.3.0
type ServerCommunicationLinksClientDeleteResponse struct { }
ServerCommunicationLinksClientDeleteResponse contains the response from method ServerCommunicationLinksClient.Delete.
type ServerCommunicationLinksClientGetOptions ¶ added in v0.3.0
type ServerCommunicationLinksClientGetOptions struct { }
ServerCommunicationLinksClientGetOptions contains the optional parameters for the ServerCommunicationLinksClient.Get method.
type ServerCommunicationLinksClientGetResponse ¶ added in v0.3.0
type ServerCommunicationLinksClientGetResponse struct {
ServerCommunicationLink
}
ServerCommunicationLinksClientGetResponse contains the response from method ServerCommunicationLinksClient.Get.
type ServerCommunicationLinksClientListByServerOptions ¶ added in v0.3.0
type ServerCommunicationLinksClientListByServerOptions struct { }
ServerCommunicationLinksClientListByServerOptions contains the optional parameters for the ServerCommunicationLinksClient.ListByServer method.
type ServerCommunicationLinksClientListByServerResponse ¶ added in v0.3.0
type ServerCommunicationLinksClientListByServerResponse struct {
ServerCommunicationLinkListResult
}
ServerCommunicationLinksClientListByServerResponse contains the response from method ServerCommunicationLinksClient.ListByServer.
type ServerConnectionPoliciesClient ¶
type ServerConnectionPoliciesClient struct {
// contains filtered or unexported fields
}
ServerConnectionPoliciesClient contains the methods for the ServerConnectionPolicies group. Don't use this type directly, use NewServerConnectionPoliciesClient() instead.
func NewServerConnectionPoliciesClient ¶
func NewServerConnectionPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerConnectionPoliciesClient, error)
NewServerConnectionPoliciesClient creates a new instance of ServerConnectionPoliciesClient with the specified values. subscriptionID - The subscription ID that identifies an Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ServerConnectionPoliciesClient) BeginCreateOrUpdate ¶ added in v0.3.0
func (client *ServerConnectionPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, connectionPolicyName ConnectionPolicyName, parameters ServerConnectionPolicy, options *ServerConnectionPoliciesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[ServerConnectionPoliciesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Updates a server connection policy If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ServerConnectionPoliciesUpdate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerConnectionPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", armsql.ConnectionPolicyNameDefault, armsql.ServerConnectionPolicy{ Properties: &armsql.ServerConnectionPolicyProperties{ ConnectionType: to.Ptr(armsql.ServerConnectionTypeRedirect), }, }, &armsql.ServerConnectionPoliciesClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ServerConnectionPoliciesGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerConnectionPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", armsql.ConnectionPolicyNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ServerConnectionPoliciesClient) ListByServer ¶ added in v0.3.0
func (client *ServerConnectionPoliciesClient) ListByServer(resourceGroupName string, serverName string, options *ServerConnectionPoliciesClientListByServerOptions) *runtime.Pager[ServerConnectionPoliciesClientListByServerResponse]
ListByServer - Lists connection policy If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-05-01-preview/examples/ServerConnectionPoliciesList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerConnectionPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<resource-group-name>", "<server-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ServerConnectionPoliciesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ServerConnectionPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerConnectionPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerConnectionPoliciesClient.BeginCreateOrUpdate method.
type ServerConnectionPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ServerConnectionPoliciesClientCreateOrUpdateResponse struct {
ServerConnectionPolicy
}
ServerConnectionPoliciesClientCreateOrUpdateResponse contains the response from method ServerConnectionPoliciesClient.CreateOrUpdate.
type ServerConnectionPoliciesClientGetOptions ¶ added in v0.3.0
type ServerConnectionPoliciesClientGetOptions struct { }
ServerConnectionPoliciesClientGetOptions contains the optional parameters for the ServerConnectionPoliciesClient.Get method.
type ServerConnectionPoliciesClientGetResponse ¶ added in v0.3.0
type ServerConnectionPoliciesClientGetResponse struct {
ServerConnectionPolicy
}
ServerConnectionPoliciesClientGetResponse contains the response from method ServerConnectionPoliciesClient.Get.
type ServerConnectionPoliciesClientListByServerOptions ¶ added in v0.3.0
type ServerConnectionPoliciesClientListByServerOptions struct { }
ServerConnectionPoliciesClientListByServerOptions contains the optional parameters for the ServerConnectionPoliciesClient.ListByServer method.
type ServerConnectionPoliciesClientListByServerResponse ¶ added in v0.3.0
type ServerConnectionPoliciesClientListByServerResponse struct {
ServerConnectionPolicyListResult
}
ServerConnectionPoliciesClientListByServerResponse contains the response from method ServerConnectionPoliciesClient.ListByServer.
type ServerConnectionPolicy ¶
type ServerConnectionPolicy struct { // Resource properties. Properties *ServerConnectionPolicyProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Metadata used for the Azure portal experience. Kind *string `json:"kind,omitempty" azure:"ro"` // READ-ONLY; Resource location. Location *string `json:"location,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ServerConnectionPolicy - A server connection policy
type ServerConnectionPolicyListResult ¶ added in v0.3.0
type ServerConnectionPolicyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ServerConnectionPolicy `json:"value,omitempty" azure:"ro"` }
ServerConnectionPolicyListResult - A list of server connection policy objects.
func (ServerConnectionPolicyListResult) MarshalJSON ¶ added in v0.3.0
func (s ServerConnectionPolicyListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerConnectionPolicyListResult.
type ServerConnectionPolicyProperties ¶
type ServerConnectionPolicyProperties struct { // REQUIRED; The server connection type. ConnectionType *ServerConnectionType `json:"connectionType,omitempty"` }
ServerConnectionPolicyProperties - The properties of a server connection policy.
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 `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ServerDNSAlias - A server DNS alias.
type ServerDNSAliasAcquisition ¶
type ServerDNSAliasAcquisition struct { // REQUIRED; The id of the server alias that will be acquired to point to this server instead. OldServerDNSAliasID *string `json:"oldServerDnsAliasId,omitempty"` }
ServerDNSAliasAcquisition - A server dns alias acquisition request.
type ServerDNSAliasListResult ¶
type ServerDNSAliasListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ServerDNSAlias `json:"value,omitempty" azure:"ro"` }
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.
type ServerDNSAliasProperties ¶
type ServerDNSAliasProperties struct { // READ-ONLY; The fully qualified DNS record for alias AzureDNSRecord *string `json:"azureDnsRecord,omitempty" azure:"ro"` }
ServerDNSAliasProperties - Properties of a server DNS alias.
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) (*armruntime.Poller[ServerDNSAliasesClientAcquireResponse], error)
BeginAcquire - Acquires server DNS alias from another server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDnsAliasAcquire.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerDNSAliasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginAcquire(ctx, "<resource-group-name>", "<server-name>", "<dns-alias-name>", armsql.ServerDNSAliasAcquisition{ OldServerDNSAliasID: to.Ptr("<old-server-dnsalias-id>"), }, &armsql.ServerDNSAliasesClientBeginAcquireOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ServerDNSAliasesClient) BeginCreateOrUpdate ¶
func (client *ServerDNSAliasesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, dnsAliasName string, options *ServerDNSAliasesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[ServerDNSAliasesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates a server DNS alias. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDnsAliasCreateOrUpdate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerDNSAliasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<dns-alias-name>", &armsql.ServerDNSAliasesClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ServerDNSAliasesClient) BeginDelete ¶
func (client *ServerDNSAliasesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, dnsAliasName string, options *ServerDNSAliasesClientBeginDeleteOptions) (*armruntime.Poller[ServerDNSAliasesClientDeleteResponse], error)
BeginDelete - Deletes the server DNS alias with the given name. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDnsAliasDelete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerDNSAliasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<server-name>", "<dns-alias-name>", &armsql.ServerDNSAliasesClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDnsAliasGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerDNSAliasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<dns-alias-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ServerDNSAliasesClient) ListByServer ¶
func (client *ServerDNSAliasesClient) ListByServer(resourceGroupName string, serverName string, options *ServerDNSAliasesClientListByServerOptions) *runtime.Pager[ServerDNSAliasesClientListByServerResponse]
ListByServer - Gets a list of server DNS aliases for a server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDnsAliasList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerDNSAliasesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<resource-group-name>", "<server-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ServerDNSAliasesClientAcquireResponse ¶ added in v0.3.0
type ServerDNSAliasesClientAcquireResponse struct {
ServerDNSAlias
}
ServerDNSAliasesClientAcquireResponse contains the response from method ServerDNSAliasesClient.Acquire.
type ServerDNSAliasesClientBeginAcquireOptions ¶ added in v0.3.0
type ServerDNSAliasesClientBeginAcquireOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerDNSAliasesClientBeginAcquireOptions contains the optional parameters for the ServerDNSAliasesClient.BeginAcquire method.
type ServerDNSAliasesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ServerDNSAliasesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerDNSAliasesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerDNSAliasesClient.BeginCreateOrUpdate method.
type ServerDNSAliasesClientBeginDeleteOptions ¶ added in v0.3.0
type ServerDNSAliasesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerDNSAliasesClientBeginDeleteOptions contains the optional parameters for the ServerDNSAliasesClient.BeginDelete method.
type ServerDNSAliasesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ServerDNSAliasesClientCreateOrUpdateResponse struct {
ServerDNSAlias
}
ServerDNSAliasesClientCreateOrUpdateResponse contains the response from method ServerDNSAliasesClient.CreateOrUpdate.
type ServerDNSAliasesClientDeleteResponse ¶ added in v0.3.0
type ServerDNSAliasesClientDeleteResponse struct { }
ServerDNSAliasesClientDeleteResponse contains the response from method ServerDNSAliasesClient.Delete.
type ServerDNSAliasesClientGetOptions ¶ added in v0.3.0
type ServerDNSAliasesClientGetOptions struct { }
ServerDNSAliasesClientGetOptions contains the optional parameters for the ServerDNSAliasesClient.Get method.
type ServerDNSAliasesClientGetResponse ¶ added in v0.3.0
type ServerDNSAliasesClientGetResponse struct {
ServerDNSAlias
}
ServerDNSAliasesClientGetResponse contains the response from method ServerDNSAliasesClient.Get.
type ServerDNSAliasesClientListByServerOptions ¶ added in v0.3.0
type ServerDNSAliasesClientListByServerOptions struct { }
ServerDNSAliasesClientListByServerOptions contains the optional parameters for the ServerDNSAliasesClient.ListByServer method.
type ServerDNSAliasesClientListByServerResponse ¶ added in v0.3.0
type ServerDNSAliasesClientListByServerResponse struct {
ServerDNSAliasListResult
}
ServerDNSAliasesClientListByServerResponse contains the response from method ServerDNSAliasesClient.ListByServer.
type ServerDevOpsAuditSettingsClient ¶
type ServerDevOpsAuditSettingsClient struct {
// contains filtered or unexported fields
}
ServerDevOpsAuditSettingsClient contains the methods for the ServerDevOpsAuditSettings group. Don't use this type directly, use NewServerDevOpsAuditSettingsClient() instead.
func NewServerDevOpsAuditSettingsClient ¶
func NewServerDevOpsAuditSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerDevOpsAuditSettingsClient, error)
NewServerDevOpsAuditSettingsClient creates a new instance of ServerDevOpsAuditSettingsClient with the specified values. subscriptionID - The subscription ID that identifies an Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ServerDevOpsAuditSettingsClient) BeginCreateOrUpdate ¶
func (client *ServerDevOpsAuditSettingsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, devOpsAuditingSettingsName string, parameters ServerDevOpsAuditingSettings, options *ServerDevOpsAuditSettingsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[ServerDevOpsAuditSettingsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a server's DevOps audit settings. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. serverName - The name of the server. devOpsAuditingSettingsName - The name of the devops audit settings. This should always be 'default'. parameters - Properties of DevOps audit settings options - ServerDevOpsAuditSettingsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerDevOpsAuditSettingsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDevOpsAuditCreateMax.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerDevOpsAuditSettingsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<dev-ops-auditing-settings-name>", armsql.ServerDevOpsAuditingSettings{ Properties: &armsql.ServerDevOpsAuditSettingsProperties{ IsAzureMonitorTargetEnabled: to.Ptr(true), State: to.Ptr(armsql.BlobAuditingPolicyStateEnabled), StorageAccountAccessKey: to.Ptr("<storage-account-access-key>"), StorageAccountSubscriptionID: to.Ptr("<storage-account-subscription-id>"), StorageEndpoint: to.Ptr("<storage-endpoint>"), }, }, &armsql.ServerDevOpsAuditSettingsClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ServerDevOpsAuditSettingsClient) Get ¶
func (client *ServerDevOpsAuditSettingsClient) Get(ctx context.Context, resourceGroupName string, serverName string, devOpsAuditingSettingsName string, options *ServerDevOpsAuditSettingsClientGetOptions) (ServerDevOpsAuditSettingsClientGetResponse, error)
Get - Gets a server's DevOps audit settings. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. serverName - The name of the server. devOpsAuditingSettingsName - The name of the devops audit settings. This should always be 'default'. options - ServerDevOpsAuditSettingsClientGetOptions contains the optional parameters for the ServerDevOpsAuditSettingsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDevOpsAuditGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerDevOpsAuditSettingsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<dev-ops-auditing-settings-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ServerDevOpsAuditSettingsClient) ListByServer ¶
func (client *ServerDevOpsAuditSettingsClient) ListByServer(resourceGroupName string, serverName string, options *ServerDevOpsAuditSettingsClientListByServerOptions) *runtime.Pager[ServerDevOpsAuditSettingsClientListByServerResponse]
ListByServer - Lists DevOps audit settings of a server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerDevOpsAuditSettingsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerDevOpsAuditSettingsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<resource-group-name>", "<server-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ServerDevOpsAuditSettingsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ServerDevOpsAuditSettingsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerDevOpsAuditSettingsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerDevOpsAuditSettingsClient.BeginCreateOrUpdate method.
type ServerDevOpsAuditSettingsClientCreateOrUpdateResponse ¶ added in v0.3.0
type ServerDevOpsAuditSettingsClientCreateOrUpdateResponse struct {
ServerDevOpsAuditingSettings
}
ServerDevOpsAuditSettingsClientCreateOrUpdateResponse contains the response from method ServerDevOpsAuditSettingsClient.CreateOrUpdate.
type ServerDevOpsAuditSettingsClientGetOptions ¶ added in v0.3.0
type ServerDevOpsAuditSettingsClientGetOptions struct { }
ServerDevOpsAuditSettingsClientGetOptions contains the optional parameters for the ServerDevOpsAuditSettingsClient.Get method.
type ServerDevOpsAuditSettingsClientGetResponse ¶ added in v0.3.0
type ServerDevOpsAuditSettingsClientGetResponse struct {
ServerDevOpsAuditingSettings
}
ServerDevOpsAuditSettingsClientGetResponse contains the response from method ServerDevOpsAuditSettingsClient.Get.
type ServerDevOpsAuditSettingsClientListByServerOptions ¶ added in v0.3.0
type ServerDevOpsAuditSettingsClientListByServerOptions struct { }
ServerDevOpsAuditSettingsClientListByServerOptions contains the optional parameters for the ServerDevOpsAuditSettingsClient.ListByServer method.
type ServerDevOpsAuditSettingsClientListByServerResponse ¶ added in v0.3.0
type ServerDevOpsAuditSettingsClientListByServerResponse struct {
ServerDevOpsAuditSettingsListResult
}
ServerDevOpsAuditSettingsClientListByServerResponse contains the response from method ServerDevOpsAuditSettingsClient.ListByServer.
type ServerDevOpsAuditSettingsListResult ¶
type ServerDevOpsAuditSettingsListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ServerDevOpsAuditingSettings `json:"value,omitempty" azure:"ro"` }
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.
type ServerDevOpsAuditSettingsProperties ¶
type ServerDevOpsAuditSettingsProperties struct { // REQUIRED; Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. State *BlobAuditingPolicyState `json:"state,omitempty"` // 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 `json:"isAzureMonitorTargetEnabled,omitempty"` // 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 `json:"storageAccountAccessKey,omitempty"` // Specifies the blob storage subscription Id. StorageAccountSubscriptionID *string `json:"storageAccountSubscriptionId,omitempty"` // Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint // or isAzureMonitorTargetEnabled is required. StorageEndpoint *string `json:"storageEndpoint,omitempty"` }
ServerDevOpsAuditSettingsProperties - Properties of a server DevOps audit settings.
type ServerDevOpsAuditingSettings ¶
type ServerDevOpsAuditingSettings struct { // Resource properties. Properties *ServerDevOpsAuditSettingsProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; SystemData of ServerDevOpsAuditSettingsResource. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ServerDevOpsAuditingSettings - A server DevOps auditing settings.
type ServerExternalAdministrator ¶
type ServerExternalAdministrator struct { // Type of the sever administrator. AdministratorType *AdministratorType `json:"administratorType,omitempty"` // Azure Active Directory only Authentication enabled. AzureADOnlyAuthentication *bool `json:"azureADOnlyAuthentication,omitempty"` // Login name of the server administrator. Login *string `json:"login,omitempty"` // Principal Type of the sever administrator. PrincipalType *PrincipalType `json:"principalType,omitempty"` // SID (object ID) of the server administrator. Sid *string `json:"sid,omitempty"` // Tenant ID of the administrator. TenantID *string `json:"tenantId,omitempty"` }
ServerExternalAdministrator - Properties of a active directory administrator.
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 `json:"endIpAddress,omitempty"` // 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 `json:"startIpAddress,omitempty"` }
ServerFirewallRuleProperties - The properties of a server firewall rule.
type ServerInfo ¶
type ServerInfo struct { // REQUIRED; Server Id. ServerID *string `json:"serverId,omitempty"` }
ServerInfo - Server info for the server trust group.
type ServerKey ¶
type ServerKey struct { // Resource properties. Properties *ServerKeyProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Kind of encryption protector. This is metadata used for the Azure portal experience. Kind *string `json:"kind,omitempty" azure:"ro"` // READ-ONLY; Resource location. Location *string `json:"location,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ServerKey - A server key.
type ServerKeyListResult ¶
type ServerKeyListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ServerKey `json:"value,omitempty" azure:"ro"` }
ServerKeyListResult - A list of server keys.
func (ServerKeyListResult) MarshalJSON ¶
func (s ServerKeyListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerKeyListResult.
type ServerKeyProperties ¶
type ServerKeyProperties struct { // REQUIRED; The server key type like 'ServiceManaged', 'AzureKeyVault'. ServerKeyType *ServerKeyType `json:"serverKeyType,omitempty"` // The URI of the server key. If the ServerKeyType is AzureKeyVault, then the URI is required. URI *string `json:"uri,omitempty"` // READ-ONLY; Key auto rotation opt-in flag. Either true or false. AutoRotationEnabled *bool `json:"autoRotationEnabled,omitempty" azure:"ro"` // READ-ONLY; The server key creation date. CreationDate *time.Time `json:"creationDate,omitempty" azure:"ro"` // READ-ONLY; Subregion of the server key. Subregion *string `json:"subregion,omitempty" azure:"ro"` // READ-ONLY; Thumbprint of the server key. Thumbprint *string `json:"thumbprint,omitempty" azure:"ro"` }
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) (*armruntime.Poller[ServerKeysClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a server key. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerKeyCreateOrUpdate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerKeysClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<key-name>", armsql.ServerKey{ Properties: &armsql.ServerKeyProperties{ ServerKeyType: to.Ptr(armsql.ServerKeyTypeAzureKeyVault), URI: to.Ptr("<uri>"), }, }, &armsql.ServerKeysClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ServerKeysClient) BeginDelete ¶
func (client *ServerKeysClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, keyName string, options *ServerKeysClientBeginDeleteOptions) (*armruntime.Poller[ServerKeysClientDeleteResponse], error)
BeginDelete - Deletes the server key with the given name. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerKeyDelete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerKeysClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<server-name>", "<key-name>", &armsql.ServerKeysClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerKeyGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerKeysClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<key-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ServerKeysClient) ListByServer ¶
func (client *ServerKeysClient) ListByServer(resourceGroupName string, serverName string, options *ServerKeysClientListByServerOptions) *runtime.Pager[ServerKeysClientListByServerResponse]
ListByServer - Gets a list of server keys. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerKeyList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerKeysClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<resource-group-name>", "<server-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ServerKeysClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ServerKeysClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerKeysClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerKeysClient.BeginCreateOrUpdate method.
type ServerKeysClientBeginDeleteOptions ¶ added in v0.3.0
type ServerKeysClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerKeysClientBeginDeleteOptions contains the optional parameters for the ServerKeysClient.BeginDelete method.
type ServerKeysClientCreateOrUpdateResponse ¶ added in v0.3.0
type ServerKeysClientCreateOrUpdateResponse struct {
ServerKey
}
ServerKeysClientCreateOrUpdateResponse contains the response from method ServerKeysClient.CreateOrUpdate.
type ServerKeysClientDeleteResponse ¶ added in v0.3.0
type ServerKeysClientDeleteResponse struct { }
ServerKeysClientDeleteResponse contains the response from method ServerKeysClient.Delete.
type ServerKeysClientGetOptions ¶ added in v0.3.0
type ServerKeysClientGetOptions struct { }
ServerKeysClientGetOptions contains the optional parameters for the ServerKeysClient.Get method.
type ServerKeysClientGetResponse ¶ added in v0.3.0
type ServerKeysClientGetResponse struct {
ServerKey
}
ServerKeysClientGetResponse contains the response from method ServerKeysClient.Get.
type ServerKeysClientListByServerOptions ¶ added in v0.3.0
type ServerKeysClientListByServerOptions struct { }
ServerKeysClientListByServerOptions contains the optional parameters for the ServerKeysClient.ListByServer method.
type ServerKeysClientListByServerResponse ¶ added in v0.3.0
type ServerKeysClientListByServerResponse struct {
ServerKeyListResult
}
ServerKeysClientListByServerResponse contains the response from method ServerKeysClient.ListByServer.
type ServerListResult ¶
type ServerListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*Server `json:"value,omitempty" azure:"ro"` }
ServerListResult - A list of servers.
func (ServerListResult) MarshalJSON ¶
func (s ServerListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerListResult.
type ServerNetworkAccessFlag ¶
type ServerNetworkAccessFlag string
ServerNetworkAccessFlag - Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'
const ( ServerNetworkAccessFlagDisabled ServerNetworkAccessFlag = "Disabled" ServerNetworkAccessFlagEnabled ServerNetworkAccessFlag = "Enabled" )
func PossibleServerNetworkAccessFlagValues ¶
func PossibleServerNetworkAccessFlagValues() []ServerNetworkAccessFlag
PossibleServerNetworkAccessFlagValues returns the possible values for the ServerNetworkAccessFlag const type.
type ServerOperation ¶
type ServerOperation struct { // Resource properties. Properties *ServerOperationProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ServerOperation - A server operation.
type ServerOperationListResult ¶
type ServerOperationListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ServerOperation `json:"value,omitempty" azure:"ro"` }
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.
type ServerOperationProperties ¶
type ServerOperationProperties struct { // READ-ONLY; The operation description. Description *string `json:"description,omitempty" azure:"ro"` // READ-ONLY; The operation error code. ErrorCode *int32 `json:"errorCode,omitempty" azure:"ro"` // READ-ONLY; The operation error description. ErrorDescription *string `json:"errorDescription,omitempty" azure:"ro"` // READ-ONLY; The operation error severity. ErrorSeverity *int32 `json:"errorSeverity,omitempty" azure:"ro"` // READ-ONLY; The estimated completion time of the operation. EstimatedCompletionTime *time.Time `json:"estimatedCompletionTime,omitempty" azure:"ro"` // READ-ONLY; Whether the operation can be cancelled. IsCancellable *bool `json:"isCancellable,omitempty" azure:"ro"` // READ-ONLY; Whether or not the error is a user error. IsUserError *bool `json:"isUserError,omitempty" azure:"ro"` // READ-ONLY; The name of operation. Operation *string `json:"operation,omitempty" azure:"ro"` // READ-ONLY; The friendly name of operation. OperationFriendlyName *string `json:"operationFriendlyName,omitempty" azure:"ro"` // READ-ONLY; The percentage of the operation completed. PercentComplete *int32 `json:"percentComplete,omitempty" azure:"ro"` // READ-ONLY; The name of the server. ServerName *string `json:"serverName,omitempty" azure:"ro"` // READ-ONLY; The operation start time. StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` // READ-ONLY; The operation state. State *ManagementOperationState `json:"state,omitempty" azure:"ro"` }
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) ListByServer ¶
func (client *ServerOperationsClient) ListByServer(resourceGroupName string, serverName string, options *ServerOperationsClientListByServerOptions) *runtime.Pager[ServerOperationsClientListByServerResponse]
ListByServer - Gets a list of operations performed on the server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ListServerOperations.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerOperationsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<resource-group-name>", "<server-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ServerOperationsClientListByServerOptions ¶ added in v0.3.0
type ServerOperationsClientListByServerOptions struct { }
ServerOperationsClientListByServerOptions contains the optional parameters for the ServerOperationsClient.ListByServer method.
type ServerOperationsClientListByServerResponse ¶ added in v0.3.0
type ServerOperationsClientListByServerResponse struct {
ServerOperationListResult
}
ServerOperationsClientListByServerResponse contains the response from method ServerOperationsClient.ListByServer.
type ServerPrivateEndpointConnection ¶
type ServerPrivateEndpointConnection struct { // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Private endpoint connection properties Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty" azure:"ro"` }
ServerPrivateEndpointConnection - A private endpoint connection under a server
type ServerProperties ¶
type ServerProperties struct { // Administrator username for the server. Once created it cannot be changed. AdministratorLogin *string `json:"administratorLogin,omitempty"` // The administrator login password (required for server creation). AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` // The Azure Active Directory identity of the server. Administrators *ServerExternalAdministrator `json:"administrators,omitempty"` // The Client id used for cross tenant CMK scenario FederatedClientID *string `json:"federatedClientId,omitempty"` // A CMK URI of the key to use for encryption. KeyID *string `json:"keyId,omitempty"` // Minimal TLS version. Allowed values: '1.0', '1.1', '1.2' MinimalTLSVersion *string `json:"minimalTlsVersion,omitempty"` // The resource id of a user assigned identity to be used by default. PrimaryUserAssignedIdentityID *string `json:"primaryUserAssignedIdentityId,omitempty"` // Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' // or 'Disabled' PublicNetworkAccess *ServerNetworkAccessFlag `json:"publicNetworkAccess,omitempty"` // 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 `json:"restrictOutboundNetworkAccess,omitempty"` // The version of the server. Version *string `json:"version,omitempty"` // READ-ONLY; The fully qualified domain name of the server. FullyQualifiedDomainName *string `json:"fullyQualifiedDomainName,omitempty" azure:"ro"` // READ-ONLY; List of private endpoint connections on a server PrivateEndpointConnections []*ServerPrivateEndpointConnection `json:"privateEndpointConnections,omitempty" azure:"ro"` // READ-ONLY; The state of the server. State *string `json:"state,omitempty" azure:"ro"` // READ-ONLY; Whether or not existing server has a workspace created and if it allows connection from workspace WorkspaceFeature *ServerWorkspaceFeature `json:"workspaceFeature,omitempty" azure:"ro"` }
ServerProperties - The properties of a server.
func (ServerProperties) MarshalJSON ¶
func (s ServerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerProperties.
type ServerSecurityAlertPoliciesClient ¶
type ServerSecurityAlertPoliciesClient struct {
// contains filtered or unexported fields
}
ServerSecurityAlertPoliciesClient contains the methods for the ServerSecurityAlertPolicies group. Don't use this type directly, use NewServerSecurityAlertPoliciesClient() instead.
func NewServerSecurityAlertPoliciesClient ¶
func NewServerSecurityAlertPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerSecurityAlertPoliciesClient, error)
NewServerSecurityAlertPoliciesClient creates a new instance of ServerSecurityAlertPoliciesClient with the specified values. subscriptionID - The subscription ID that identifies an Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ServerSecurityAlertPoliciesClient) BeginCreateOrUpdate ¶
func (client *ServerSecurityAlertPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, securityAlertPolicyName SecurityAlertPolicyName, parameters ServerSecurityAlertPolicy, options *ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[ServerSecurityAlertPoliciesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a threat detection policy. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerSecurityAlertsCreateMax.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerSecurityAlertPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", 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("<storage-account-access-key>"), StorageEndpoint: to.Ptr("<storage-endpoint>"), }, }, &armsql.ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerSecurityAlertsGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerSecurityAlertPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", armsql.SecurityAlertPolicyNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ServerSecurityAlertPoliciesClient) ListByServer ¶
func (client *ServerSecurityAlertPoliciesClient) ListByServer(resourceGroupName string, serverName string, options *ServerSecurityAlertPoliciesClientListByServerOptions) *runtime.Pager[ServerSecurityAlertPoliciesClientListByServerResponse]
ListByServer - Get the server's threat detection policies. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerSecurityAlertsListByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerSecurityAlertPoliciesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<resource-group-name>", "<server-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerSecurityAlertPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.BeginCreateOrUpdate method.
type ServerSecurityAlertPoliciesClientCreateOrUpdateResponse ¶ added in v0.3.0
type ServerSecurityAlertPoliciesClientCreateOrUpdateResponse struct {
ServerSecurityAlertPolicy
}
ServerSecurityAlertPoliciesClientCreateOrUpdateResponse contains the response from method ServerSecurityAlertPoliciesClient.CreateOrUpdate.
type ServerSecurityAlertPoliciesClientGetOptions ¶ added in v0.3.0
type ServerSecurityAlertPoliciesClientGetOptions struct { }
ServerSecurityAlertPoliciesClientGetOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.Get method.
type ServerSecurityAlertPoliciesClientGetResponse ¶ added in v0.3.0
type ServerSecurityAlertPoliciesClientGetResponse struct {
ServerSecurityAlertPolicy
}
ServerSecurityAlertPoliciesClientGetResponse contains the response from method ServerSecurityAlertPoliciesClient.Get.
type ServerSecurityAlertPoliciesClientListByServerOptions ¶ added in v0.3.0
type ServerSecurityAlertPoliciesClientListByServerOptions struct { }
ServerSecurityAlertPoliciesClientListByServerOptions contains the optional parameters for the ServerSecurityAlertPoliciesClient.ListByServer method.
type ServerSecurityAlertPoliciesClientListByServerResponse ¶ added in v0.3.0
type ServerSecurityAlertPoliciesClientListByServerResponse struct {
LogicalServerSecurityAlertPolicyListResult
}
ServerSecurityAlertPoliciesClientListByServerResponse contains the response from method ServerSecurityAlertPoliciesClient.ListByServer.
type ServerSecurityAlertPolicy ¶
type ServerSecurityAlertPolicy struct { // Resource properties. Properties *SecurityAlertsPolicyProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; SystemData of SecurityAlertPolicyResource. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ServerSecurityAlertPolicy - A server security alert policy.
type ServerTrustCertificate ¶ added in v0.4.0
type ServerTrustCertificate struct { // Resource properties. Properties *ServerTrustCertificateProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ServerTrustCertificate - Server trust certificate imported from box to enable connection between box and Sql Managed Instance.
type ServerTrustCertificateProperties ¶ added in v0.4.0
type ServerTrustCertificateProperties struct { // The certificate public blob PublicBlob *string `json:"publicBlob,omitempty"` // READ-ONLY; The certificate name CertificateName *string `json:"certificateName,omitempty" azure:"ro"` // READ-ONLY; The certificate thumbprint Thumbprint *string `json:"thumbprint,omitempty" azure:"ro"` }
ServerTrustCertificateProperties - The properties of a server trust certificate.
type ServerTrustCertificatesClient ¶ added in v0.4.0
type ServerTrustCertificatesClient struct {
// contains filtered or unexported fields
}
ServerTrustCertificatesClient contains the methods for the ServerTrustCertificates group. Don't use this type directly, use NewServerTrustCertificatesClient() instead.
func NewServerTrustCertificatesClient ¶ added in v0.4.0
func NewServerTrustCertificatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerTrustCertificatesClient, error)
NewServerTrustCertificatesClient creates a new instance of ServerTrustCertificatesClient with the specified values. subscriptionID - The subscription ID that identifies an Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ServerTrustCertificatesClient) BeginCreateOrUpdate ¶ added in v0.4.0
func (client *ServerTrustCertificatesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, certificateName string, parameters ServerTrustCertificate, options *ServerTrustCertificatesClientBeginCreateOrUpdateOptions) (*armruntime.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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerTrustCertificatesCreate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerTrustCertificatesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<managed-instance-name>", "<certificate-name>", armsql.ServerTrustCertificate{ Properties: &armsql.ServerTrustCertificateProperties{ PublicBlob: to.Ptr("<public-blob>"), }, }, &armsql.ServerTrustCertificatesClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ServerTrustCertificatesClient) BeginDelete ¶ added in v0.4.0
func (client *ServerTrustCertificatesClient) BeginDelete(ctx context.Context, resourceGroupName string, managedInstanceName string, certificateName string, options *ServerTrustCertificatesClientBeginDeleteOptions) (*armruntime.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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerTrustCertificatesDelete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerTrustCertificatesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<managed-instance-name>", "<certificate-name>", &armsql.ServerTrustCertificatesClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*ServerTrustCertificatesClient) Get ¶ added in v0.4.0
func (client *ServerTrustCertificatesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string, certificateName string, options *ServerTrustCertificatesClientGetOptions) (ServerTrustCertificatesClientGetResponse, error)
Get - Gets a server trust certificate that was uploaded from box to Sql Managed Instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerTrustCertificatesGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerTrustCertificatesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<managed-instance-name>", "<certificate-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ServerTrustCertificatesClient) ListByInstance ¶ added in v0.4.0
func (client *ServerTrustCertificatesClient) ListByInstance(resourceGroupName string, managedInstanceName string, options *ServerTrustCertificatesClientListByInstanceOptions) *runtime.Pager[ServerTrustCertificatesClientListByInstanceResponse]
ListByInstance - Gets a list of server trust certificates that were uploaded from box to the given Sql Managed Instance. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByInstance method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerTrustCertificatesListByInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerTrustCertificatesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByInstance("<resource-group-name>", "<managed-instance-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ServerTrustCertificatesClientBeginCreateOrUpdateOptions ¶ added in v0.4.0
type ServerTrustCertificatesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerTrustCertificatesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerTrustCertificatesClient.BeginCreateOrUpdate method.
type ServerTrustCertificatesClientBeginDeleteOptions ¶ added in v0.4.0
type ServerTrustCertificatesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerTrustCertificatesClientBeginDeleteOptions contains the optional parameters for the ServerTrustCertificatesClient.BeginDelete method.
type ServerTrustCertificatesClientCreateOrUpdateResponse ¶ added in v0.4.0
type ServerTrustCertificatesClientCreateOrUpdateResponse struct {
ServerTrustCertificate
}
ServerTrustCertificatesClientCreateOrUpdateResponse contains the response from method ServerTrustCertificatesClient.CreateOrUpdate.
type ServerTrustCertificatesClientDeleteResponse ¶ added in v0.4.0
type ServerTrustCertificatesClientDeleteResponse struct { }
ServerTrustCertificatesClientDeleteResponse contains the response from method ServerTrustCertificatesClient.Delete.
type ServerTrustCertificatesClientGetOptions ¶ added in v0.4.0
type ServerTrustCertificatesClientGetOptions struct { }
ServerTrustCertificatesClientGetOptions contains the optional parameters for the ServerTrustCertificatesClient.Get method.
type ServerTrustCertificatesClientGetResponse ¶ added in v0.4.0
type ServerTrustCertificatesClientGetResponse struct {
ServerTrustCertificate
}
ServerTrustCertificatesClientGetResponse contains the response from method ServerTrustCertificatesClient.Get.
type ServerTrustCertificatesClientListByInstanceOptions ¶ added in v0.4.0
type ServerTrustCertificatesClientListByInstanceOptions struct { }
ServerTrustCertificatesClientListByInstanceOptions contains the optional parameters for the ServerTrustCertificatesClient.ListByInstance method.
type ServerTrustCertificatesClientListByInstanceResponse ¶ added in v0.4.0
type ServerTrustCertificatesClientListByInstanceResponse struct {
ServerTrustCertificatesListResult
}
ServerTrustCertificatesClientListByInstanceResponse contains the response from method ServerTrustCertificatesClient.ListByInstance.
type ServerTrustCertificatesListResult ¶ added in v0.4.0
type ServerTrustCertificatesListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ServerTrustCertificate `json:"value,omitempty" azure:"ro"` }
ServerTrustCertificatesListResult - A list of server trust certificates in instance.
func (ServerTrustCertificatesListResult) MarshalJSON ¶ added in v0.4.0
func (s ServerTrustCertificatesListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerTrustCertificatesListResult.
type ServerTrustGroup ¶
type ServerTrustGroup struct { // Resource properties. Properties *ServerTrustGroupProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ServerTrustGroup - A server trust group.
type ServerTrustGroupListResult ¶
type ServerTrustGroupListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ServerTrustGroup `json:"value,omitempty" azure:"ro"` }
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.
type ServerTrustGroupProperties ¶
type ServerTrustGroupProperties struct { // REQUIRED; Group members information for the server trust group. GroupMembers []*ServerInfo `json:"groupMembers,omitempty"` // REQUIRED; Trust scope of the server trust group. TrustScopes []*ServerTrustGroupPropertiesTrustScopesItem `json:"trustScopes,omitempty"` }
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.
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) (*armruntime.Poller[ServerTrustGroupsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a server trust group. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerTrustGroupCreate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerTrustGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<location-name>", "<server-trust-group-name>", armsql.ServerTrustGroup{ Properties: &armsql.ServerTrustGroupProperties{ GroupMembers: []*armsql.ServerInfo{ { ServerID: to.Ptr("<server-id>"), }, { ServerID: to.Ptr("<server-id>"), }}, TrustScopes: []*armsql.ServerTrustGroupPropertiesTrustScopesItem{ to.Ptr(armsql.ServerTrustGroupPropertiesTrustScopesItemGlobalTransactions), to.Ptr(armsql.ServerTrustGroupPropertiesTrustScopesItemServiceBroker)}, }, }, &armsql.ServerTrustGroupsClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ServerTrustGroupsClient) BeginDelete ¶
func (client *ServerTrustGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, locationName string, serverTrustGroupName string, options *ServerTrustGroupsClientBeginDeleteOptions) (*armruntime.Poller[ServerTrustGroupsClientDeleteResponse], error)
BeginDelete - Deletes a server trust group. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerTrustGroupDelete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerTrustGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<location-name>", "<server-trust-group-name>", &armsql.ServerTrustGroupsClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerTrustGroupGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerTrustGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<location-name>", "<server-trust-group-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ServerTrustGroupsClient) ListByInstance ¶
func (client *ServerTrustGroupsClient) ListByInstance(resourceGroupName string, managedInstanceName string, options *ServerTrustGroupsClientListByInstanceOptions) *runtime.Pager[ServerTrustGroupsClientListByInstanceResponse]
ListByInstance - Gets a server trust groups by instance name. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByInstance method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerTrustGroupListByManagedInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerTrustGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByInstance("<resource-group-name>", "<managed-instance-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*ServerTrustGroupsClient) ListByLocation ¶
func (client *ServerTrustGroupsClient) ListByLocation(resourceGroupName string, locationName string, options *ServerTrustGroupsClientListByLocationOptions) *runtime.Pager[ServerTrustGroupsClientListByLocationResponse]
ListByLocation - Lists a server trust group. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByLocation method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerTrustGroupList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerTrustGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByLocation("<resource-group-name>", "<location-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ServerTrustGroupsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ServerTrustGroupsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerTrustGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerTrustGroupsClient.BeginCreateOrUpdate method.
type ServerTrustGroupsClientBeginDeleteOptions ¶ added in v0.3.0
type ServerTrustGroupsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerTrustGroupsClientBeginDeleteOptions contains the optional parameters for the ServerTrustGroupsClient.BeginDelete method.
type ServerTrustGroupsClientCreateOrUpdateResponse ¶ added in v0.3.0
type ServerTrustGroupsClientCreateOrUpdateResponse struct {
ServerTrustGroup
}
ServerTrustGroupsClientCreateOrUpdateResponse contains the response from method ServerTrustGroupsClient.CreateOrUpdate.
type ServerTrustGroupsClientDeleteResponse ¶ added in v0.3.0
type ServerTrustGroupsClientDeleteResponse struct { }
ServerTrustGroupsClientDeleteResponse contains the response from method ServerTrustGroupsClient.Delete.
type ServerTrustGroupsClientGetOptions ¶ added in v0.3.0
type ServerTrustGroupsClientGetOptions struct { }
ServerTrustGroupsClientGetOptions contains the optional parameters for the ServerTrustGroupsClient.Get method.
type ServerTrustGroupsClientGetResponse ¶ added in v0.3.0
type ServerTrustGroupsClientGetResponse struct {
ServerTrustGroup
}
ServerTrustGroupsClientGetResponse contains the response from method ServerTrustGroupsClient.Get.
type ServerTrustGroupsClientListByInstanceOptions ¶ added in v0.3.0
type ServerTrustGroupsClientListByInstanceOptions struct { }
ServerTrustGroupsClientListByInstanceOptions contains the optional parameters for the ServerTrustGroupsClient.ListByInstance method.
type ServerTrustGroupsClientListByInstanceResponse ¶ added in v0.3.0
type ServerTrustGroupsClientListByInstanceResponse struct {
ServerTrustGroupListResult
}
ServerTrustGroupsClientListByInstanceResponse contains the response from method ServerTrustGroupsClient.ListByInstance.
type ServerTrustGroupsClientListByLocationOptions ¶ added in v0.3.0
type ServerTrustGroupsClientListByLocationOptions struct { }
ServerTrustGroupsClientListByLocationOptions contains the optional parameters for the ServerTrustGroupsClient.ListByLocation method.
type ServerTrustGroupsClientListByLocationResponse ¶ added in v0.3.0
type ServerTrustGroupsClientListByLocationResponse struct {
ServerTrustGroupListResult
}
ServerTrustGroupsClientListByLocationResponse contains the response from method ServerTrustGroupsClient.ListByLocation.
type ServerUpdate ¶
type ServerUpdate struct { // Server identity Identity *ResourceIdentity `json:"identity,omitempty"` // Resource properties. Properties *ServerProperties `json:"properties,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` }
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.
type ServerUsage ¶
type ServerUsage struct { // READ-ONLY; The current value of the metric. CurrentValue *float64 `json:"currentValue,omitempty" azure:"ro"` // READ-ONLY; The metric display name. DisplayName *string `json:"displayName,omitempty" azure:"ro"` // READ-ONLY; The current limit of the metric. Limit *float64 `json:"limit,omitempty" azure:"ro"` // READ-ONLY; Name of the server usage metric. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The next reset time for the metric (ISO8601 format). NextResetTime *time.Time `json:"nextResetTime,omitempty" azure:"ro"` // READ-ONLY; The name of the resource. ResourceName *string `json:"resourceName,omitempty" azure:"ro"` // READ-ONLY; The units of the metric. Unit *string `json:"unit,omitempty" azure:"ro"` }
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 `json:"value,omitempty"` }
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.
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) ListByServer ¶
func (client *ServerUsagesClient) ListByServer(resourceGroupName string, serverName string, options *ServerUsagesClientListByServerOptions) *runtime.Pager[ServerUsagesClientListByServerResponse]
ListByServer - Returns server usages. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/examples/ServerUsageMetricsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerUsagesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<resource-group-name>", "<server-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ServerUsagesClientListByServerOptions ¶ added in v0.3.0
type ServerUsagesClientListByServerOptions struct { }
ServerUsagesClientListByServerOptions contains the optional parameters for the ServerUsagesClient.ListByServer method.
type ServerUsagesClientListByServerResponse ¶ added in v0.3.0
type ServerUsagesClientListByServerResponse struct {
ServerUsageListResult
}
ServerUsagesClientListByServerResponse contains the response from method ServerUsagesClient.ListByServer.
type ServerVersionCapability ¶
type ServerVersionCapability struct { // The reason for the capability not being available. Reason *string `json:"reason,omitempty"` // READ-ONLY; The server version name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The status of the capability. Status *CapabilityStatus `json:"status,omitempty" azure:"ro"` // READ-ONLY; The list of supported database editions. SupportedEditions []*EditionCapability `json:"supportedEditions,omitempty" azure:"ro"` // READ-ONLY; The list of supported elastic pool editions. SupportedElasticPoolEditions []*ElasticPoolEditionCapability `json:"supportedElasticPoolEditions,omitempty" azure:"ro"` }
ServerVersionCapability - The server capability
func (ServerVersionCapability) MarshalJSON ¶
func (s ServerVersionCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerVersionCapability.
type ServerVulnerabilityAssessment ¶
type ServerVulnerabilityAssessment struct { // Resource properties. Properties *ServerVulnerabilityAssessmentProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ServerVulnerabilityAssessment - A server vulnerability assessment.
type ServerVulnerabilityAssessmentListResult ¶
type ServerVulnerabilityAssessmentListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*ServerVulnerabilityAssessment `json:"value,omitempty" azure:"ro"` }
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.
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 `json:"storageContainerPath,omitempty"` // The recurring scans settings RecurringScans *VulnerabilityAssessmentRecurringScansProperties `json:"recurringScans,omitempty"` // 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 `json:"storageAccountAccessKey,omitempty"` // 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 `json:"storageContainerSasKey,omitempty"` }
ServerVulnerabilityAssessmentProperties - Properties of a server Vulnerability Assessment.
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. resourceGroupName - The name of the resource group 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerVulnerabilityAssessmentCreateMax.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerVulnerabilityAssessmentsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.CreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", 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("<storage-account-access-key>"), StorageContainerPath: to.Ptr("<storage-container-path>"), StorageContainerSasKey: to.Ptr("<storage-container-sas-key>"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerVulnerabilityAssessmentDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerVulnerabilityAssessmentsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.Delete(ctx, "<resource-group-name>", "<server-name>", armsql.VulnerabilityAssessmentNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerVulnerabilityAssessmentGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerVulnerabilityAssessmentsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", armsql.VulnerabilityAssessmentNameDefault, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ServerVulnerabilityAssessmentsClient) ListByServer ¶
func (client *ServerVulnerabilityAssessmentsClient) ListByServer(resourceGroupName string, serverName string, options *ServerVulnerabilityAssessmentsClientListByServerOptions) *runtime.Pager[ServerVulnerabilityAssessmentsClientListByServerResponse]
ListByServer - Lists the vulnerability assessment policies associated with a server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ServerVulnerabilityAssessmentListByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServerVulnerabilityAssessmentsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<resource-group-name>", "<server-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ServerVulnerabilityAssessmentsClientCreateOrUpdateOptions ¶ added in v0.3.0
type ServerVulnerabilityAssessmentsClientCreateOrUpdateOptions struct { }
ServerVulnerabilityAssessmentsClientCreateOrUpdateOptions contains the optional parameters for the ServerVulnerabilityAssessmentsClient.CreateOrUpdate method.
type ServerVulnerabilityAssessmentsClientCreateOrUpdateResponse ¶ added in v0.3.0
type ServerVulnerabilityAssessmentsClientCreateOrUpdateResponse struct {
ServerVulnerabilityAssessment
}
ServerVulnerabilityAssessmentsClientCreateOrUpdateResponse contains the response from method ServerVulnerabilityAssessmentsClient.CreateOrUpdate.
type ServerVulnerabilityAssessmentsClientDeleteOptions ¶ added in v0.3.0
type ServerVulnerabilityAssessmentsClientDeleteOptions struct { }
ServerVulnerabilityAssessmentsClientDeleteOptions contains the optional parameters for the ServerVulnerabilityAssessmentsClient.Delete method.
type ServerVulnerabilityAssessmentsClientDeleteResponse ¶ added in v0.3.0
type ServerVulnerabilityAssessmentsClientDeleteResponse struct { }
ServerVulnerabilityAssessmentsClientDeleteResponse contains the response from method ServerVulnerabilityAssessmentsClient.Delete.
type ServerVulnerabilityAssessmentsClientGetOptions ¶ added in v0.3.0
type ServerVulnerabilityAssessmentsClientGetOptions struct { }
ServerVulnerabilityAssessmentsClientGetOptions contains the optional parameters for the ServerVulnerabilityAssessmentsClient.Get method.
type ServerVulnerabilityAssessmentsClientGetResponse ¶ added in v0.3.0
type ServerVulnerabilityAssessmentsClientGetResponse struct {
ServerVulnerabilityAssessment
}
ServerVulnerabilityAssessmentsClientGetResponse contains the response from method ServerVulnerabilityAssessmentsClient.Get.
type ServerVulnerabilityAssessmentsClientListByServerOptions ¶ added in v0.3.0
type ServerVulnerabilityAssessmentsClientListByServerOptions struct { }
ServerVulnerabilityAssessmentsClientListByServerOptions contains the optional parameters for the ServerVulnerabilityAssessmentsClient.ListByServer method.
type ServerVulnerabilityAssessmentsClientListByServerResponse ¶ added in v0.3.0
type ServerVulnerabilityAssessmentsClientListByServerResponse struct {
ServerVulnerabilityAssessmentListResult
}
ServerVulnerabilityAssessmentsClientListByServerResponse contains the response from method ServerVulnerabilityAssessmentsClient.ListByServer.
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) (*armruntime.Poller[ServersClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerCreate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", armsql.Server{ Location: to.Ptr("<location>"), Properties: &armsql.ServerProperties{ AdministratorLogin: to.Ptr("<administrator-login>"), AdministratorLoginPassword: to.Ptr("<administrator-login-password>"), Administrators: &armsql.ServerExternalAdministrator{ AzureADOnlyAuthentication: to.Ptr(true), Login: to.Ptr("<login>"), PrincipalType: to.Ptr(armsql.PrincipalTypeUser), Sid: to.Ptr("<sid>"), TenantID: to.Ptr("<tenant-id>"), }, PublicNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), RestrictOutboundNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), }, }, &armsql.ServersClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ServersClient) BeginDelete ¶
func (client *ServersClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, options *ServersClientBeginDeleteOptions) (*armruntime.Poller[ServersClientDeleteResponse], error)
BeginDelete - Deletes a server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerDelete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<server-name>", &armsql.ServersClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*ServersClient) BeginImportDatabase ¶
func (client *ServersClient) BeginImportDatabase(ctx context.Context, resourceGroupName string, serverName string, parameters ImportNewDatabaseDefinition, options *ServersClientBeginImportDatabaseOptions) (*armruntime.Poller[ServersClientImportDatabaseResponse], error)
BeginImportDatabase - Imports a bacpac into a new database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ImportNewDatabaseWithNetworkIsolation.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginImportDatabase(ctx, "<resource-group-name>", "<server-name>", armsql.ImportNewDatabaseDefinition{ AdministratorLogin: to.Ptr("<administrator-login>"), AdministratorLoginPassword: to.Ptr("<administrator-login-password>"), AuthenticationType: to.Ptr("<authentication-type>"), DatabaseName: to.Ptr("<database-name>"), NetworkIsolation: &armsql.NetworkIsolationSettings{ SQLServerResourceID: to.Ptr("<sqlserver-resource-id>"), StorageAccountResourceID: to.Ptr("<storage-account-resource-id>"), }, StorageKey: to.Ptr("<storage-key>"), StorageKeyType: to.Ptr(armsql.StorageKeyTypeStorageAccessKey), StorageURI: to.Ptr("<storage-uri>"), }, &armsql.ServersClientBeginImportDatabaseOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ServersClient) BeginUpdate ¶
func (client *ServersClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters ServerUpdate, options *ServersClientBeginUpdateOptions) (*armruntime.Poller[ServersClientUpdateResponse], error)
BeginUpdate - Updates a server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerUpdate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginUpdate(ctx, "<resource-group-name>", "<server-name>", armsql.ServerUpdate{ Properties: &armsql.ServerProperties{ AdministratorLogin: to.Ptr("<administrator-login>"), AdministratorLoginPassword: to.Ptr("<administrator-login-password>"), PublicNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagDisabled), RestrictOutboundNetworkAccess: to.Ptr(armsql.ServerNetworkAccessFlagEnabled), }, }, &armsql.ServersClientBeginUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
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. parameters - The name availability request parameters. options - ServersClientCheckNameAvailabilityOptions contains the optional parameters for the ServersClient.CheckNameAvailability method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CheckNameAvailabilityServerAlreadyExists.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.CheckNameAvailability(ctx, armsql.CheckNameAvailabilityRequest{ Name: to.Ptr("<name>"), Type: to.Ptr("<type>"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", &armsql.ServersClientGetOptions{Expand: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ServersClient) List ¶
func (client *ServersClient) List(options *ServersClientListOptions) *runtime.Pager[ServersClientListResponse]
List - Gets a list of all servers in the subscription. If the operation fails it returns an *azcore.ResponseError type. options - ServersClientListOptions contains the optional parameters for the ServersClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.List(&armsql.ServersClientListOptions{Expand: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*ServersClient) ListByResourceGroup ¶
func (client *ServersClient) ListByResourceGroup(resourceGroupName string, options *ServersClientListByResourceGroupOptions) *runtime.Pager[ServersClientListByResourceGroupResponse]
ListByResourceGroup - Gets a list of servers in a resource groups. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ServerListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByResourceGroup("<resource-group-name>", &armsql.ServersClientListByResourceGroupOptions{Expand: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ServersClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type ServersClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServersClientBeginCreateOrUpdateOptions contains the optional parameters for the ServersClient.BeginCreateOrUpdate method.
type ServersClientBeginDeleteOptions ¶ added in v0.3.0
type ServersClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServersClientBeginDeleteOptions contains the optional parameters for the ServersClient.BeginDelete method.
type ServersClientBeginImportDatabaseOptions ¶ added in v0.3.0
type ServersClientBeginImportDatabaseOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServersClientBeginImportDatabaseOptions contains the optional parameters for the ServersClient.BeginImportDatabase method.
type ServersClientBeginUpdateOptions ¶ added in v0.3.0
type ServersClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServersClientBeginUpdateOptions contains the optional parameters for the ServersClient.BeginUpdate method.
type ServersClientCheckNameAvailabilityOptions ¶ added in v0.3.0
type ServersClientCheckNameAvailabilityOptions struct { }
ServersClientCheckNameAvailabilityOptions contains the optional parameters for the ServersClient.CheckNameAvailability method.
type ServersClientCheckNameAvailabilityResponse ¶ added in v0.3.0
type ServersClientCheckNameAvailabilityResponse struct {
CheckNameAvailabilityResponse
}
ServersClientCheckNameAvailabilityResponse contains the response from method ServersClient.CheckNameAvailability.
type ServersClientCreateOrUpdateResponse ¶ added in v0.3.0
type ServersClientCreateOrUpdateResponse struct {
Server
}
ServersClientCreateOrUpdateResponse contains the response from method ServersClient.CreateOrUpdate.
type ServersClientDeleteResponse ¶ added in v0.3.0
type ServersClientDeleteResponse struct { }
ServersClientDeleteResponse contains the response from method ServersClient.Delete.
type ServersClientGetOptions ¶ added in v0.3.0
type ServersClientGetOptions struct { // The child resources to include in the response. Expand *string }
ServersClientGetOptions contains the optional parameters for the ServersClient.Get method.
type ServersClientGetResponse ¶ added in v0.3.0
type ServersClientGetResponse struct {
Server
}
ServersClientGetResponse contains the response from method ServersClient.Get.
type ServersClientImportDatabaseResponse ¶ added in v0.3.0
type ServersClientImportDatabaseResponse struct {
ImportExportOperationResult
}
ServersClientImportDatabaseResponse contains the response from method ServersClient.ImportDatabase.
type ServersClientListByResourceGroupOptions ¶ added in v0.3.0
type ServersClientListByResourceGroupOptions struct { // The child resources to include in the response. Expand *string }
ServersClientListByResourceGroupOptions contains the optional parameters for the ServersClient.ListByResourceGroup method.
type ServersClientListByResourceGroupResponse ¶ added in v0.3.0
type ServersClientListByResourceGroupResponse struct {
ServerListResult
}
ServersClientListByResourceGroupResponse contains the response from method ServersClient.ListByResourceGroup.
type ServersClientListOptions ¶ added in v0.3.0
type ServersClientListOptions struct { // The child resources to include in the response. Expand *string }
ServersClientListOptions contains the optional parameters for the ServersClient.List method.
type ServersClientListResponse ¶ added in v0.3.0
type ServersClientListResponse struct {
ServerListResult
}
ServersClientListResponse contains the response from method ServersClient.List.
type ServersClientUpdateResponse ¶ added in v0.3.0
type ServersClientUpdateResponse struct {
Server
}
ServersClientUpdateResponse contains the response from method ServersClient.Update.
type ServiceObjective ¶
type ServiceObjective struct { // Represents the properties of the resource. Properties *ServiceObjectiveProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
ServiceObjective - Represents a database service objective.
type ServiceObjectiveCapability ¶
type ServiceObjectiveCapability struct { // The reason for the capability not being available. Reason *string `json:"reason,omitempty"` // READ-ONLY; The compute model ComputeModel *string `json:"computeModel,omitempty" azure:"ro"` // READ-ONLY; The unique ID of the service objective. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The included (free) max size. IncludedMaxSize *MaxSizeCapability `json:"includedMaxSize,omitempty" azure:"ro"` // READ-ONLY; The service objective name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The performance level. PerformanceLevel *PerformanceLevelCapability `json:"performanceLevel,omitempty" azure:"ro"` // READ-ONLY; The sku. SKU *SKU `json:"sku,omitempty" azure:"ro"` // READ-ONLY; The status of the capability. Status *CapabilityStatus `json:"status,omitempty" azure:"ro"` // READ-ONLY; Supported time range for auto pause delay SupportedAutoPauseDelay *AutoPauseDelayTimeRange `json:"supportedAutoPauseDelay,omitempty" azure:"ro"` // READ-ONLY; List of supported license types. SupportedLicenseTypes []*LicenseTypeCapability `json:"supportedLicenseTypes,omitempty" azure:"ro"` // READ-ONLY; List of supported maintenance configurations SupportedMaintenanceConfigurations []*MaintenanceConfigurationCapability `json:"supportedMaintenanceConfigurations,omitempty" azure:"ro"` // READ-ONLY; The list of supported maximum database sizes. SupportedMaxSizes []*MaxSizeRangeCapability `json:"supportedMaxSizes,omitempty" azure:"ro"` // READ-ONLY; List of supported min capacities SupportedMinCapacities []*MinCapacityCapability `json:"supportedMinCapacities,omitempty" azure:"ro"` // READ-ONLY; Whether or not zone redundancy is supported for the service objective. ZoneRedundant *bool `json:"zoneRedundant,omitempty" azure:"ro"` }
ServiceObjectiveCapability - The service objectives capability.
func (ServiceObjectiveCapability) MarshalJSON ¶
func (s ServiceObjectiveCapability) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceObjectiveCapability.
type ServiceObjectiveListResult ¶
type ServiceObjectiveListResult struct { // REQUIRED; The list of database service objectives. Value []*ServiceObjective `json:"value,omitempty"` }
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.
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 `json:"description,omitempty" azure:"ro"` // READ-ONLY; Gets whether the service level objective is enabled. Enabled *bool `json:"enabled,omitempty" azure:"ro"` // READ-ONLY; Gets whether the service level objective is the default service objective. IsDefault *bool `json:"isDefault,omitempty" azure:"ro"` // READ-ONLY; Gets whether the service level objective is a system service objective. IsSystem *bool `json:"isSystem,omitempty" azure:"ro"` // READ-ONLY; The name for the service objective. ServiceObjectiveName *string `json:"serviceObjectiveName,omitempty" azure:"ro"` }
ServiceObjectiveProperties - Represents the properties of a database service objective.
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ServiceObjectiveGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServiceObjectivesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<service-objective-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*ServiceObjectivesClient) ListByServer ¶
func (client *ServiceObjectivesClient) ListByServer(resourceGroupName string, serverName string, options *ServiceObjectivesClientListByServerOptions) *runtime.Pager[ServiceObjectivesClientListByServerResponse]
ListByServer - Returns database service objectives. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/examples/ServiceObjectiveList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewServiceObjectivesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<resource-group-name>", "<server-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ServiceObjectivesClientGetOptions ¶ added in v0.3.0
type ServiceObjectivesClientGetOptions struct { }
ServiceObjectivesClientGetOptions contains the optional parameters for the ServiceObjectivesClient.Get method.
type ServiceObjectivesClientGetResponse ¶ added in v0.3.0
type ServiceObjectivesClientGetResponse struct {
ServiceObjective
}
ServiceObjectivesClientGetResponse contains the response from method ServiceObjectivesClient.Get.
type ServiceObjectivesClientListByServerOptions ¶ added in v0.3.0
type ServiceObjectivesClientListByServerOptions struct { }
ServiceObjectivesClientListByServerOptions contains the optional parameters for the ServiceObjectivesClient.ListByServer method.
type ServiceObjectivesClientListByServerResponse ¶ added in v0.3.0
type ServiceObjectivesClientListByServerResponse struct {
ServiceObjectiveListResult
}
ServiceObjectivesClientListByServerResponse contains the response from method ServiceObjectivesClient.ListByServer.
type ServicePrincipal ¶ added in v0.3.0
type ServicePrincipal struct { // Service principal type. Type *ServicePrincipalType `json:"type,omitempty"` // READ-ONLY; The Azure Active Directory application client id. ClientID *string `json:"clientId,omitempty" azure:"ro"` // READ-ONLY; The Azure Active Directory application object id. PrincipalID *string `json:"principalId,omitempty" azure:"ro"` // READ-ONLY; The Azure Active Directory tenant id. TenantID *string `json:"tenantId,omitempty" azure:"ro"` }
ServicePrincipal - The managed instance's service principal configuration for a resource.
type ServicePrincipalType ¶ added in v0.3.0
type ServicePrincipalType string
ServicePrincipalType - Service principal type.
const ( ServicePrincipalTypeNone ServicePrincipalType = "None" ServicePrincipalTypeSystemAssigned ServicePrincipalType = "SystemAssigned" )
func PossibleServicePrincipalTypeValues ¶ added in v0.3.0
func PossibleServicePrincipalTypeValues() []ServicePrincipalType
PossibleServicePrincipalTypeValues returns the possible values for the ServicePrincipalType const type.
type ShortTermRetentionPolicyName ¶
type ShortTermRetentionPolicyName string
const (
ShortTermRetentionPolicyNameDefault ShortTermRetentionPolicyName = "default"
)
func PossibleShortTermRetentionPolicyNameValues ¶
func PossibleShortTermRetentionPolicyNameValues() []ShortTermRetentionPolicyName
PossibleShortTermRetentionPolicyNameValues returns the possible values for the ShortTermRetentionPolicyName const type.
type SloUsageMetric ¶
type SloUsageMetric struct { // READ-ONLY; Gets or sets inRangeTimeRatio for SLO usage metric. InRangeTimeRatio *float64 `json:"inRangeTimeRatio,omitempty" azure:"ro"` // READ-ONLY; The serviceLevelObjective for SLO usage metric. ServiceLevelObjective *ServiceObjectiveName `json:"serviceLevelObjective,omitempty" azure:"ro"` // READ-ONLY; The serviceLevelObjectiveId for SLO usage metric. ServiceLevelObjectiveID *string `json:"serviceLevelObjectiveId,omitempty" azure:"ro"` }
SloUsageMetric - A Slo Usage Metric.
type StorageCapability ¶
type StorageCapability struct { // The reason for the capability not being available. Reason *string `json:"reason,omitempty"` // READ-ONLY; The status of the capability. Status *CapabilityStatus `json:"status,omitempty" azure:"ro"` // READ-ONLY; The storage account type for the database's backups. StorageAccountType *StorageCapabilityStorageAccountType `json:"storageAccountType,omitempty" azure:"ro"` }
StorageCapability - The storage account type capability.
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 `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
SubscriptionUsage - Usage Metric of a Subscription in a Location.
type SubscriptionUsageListResult ¶
type SubscriptionUsageListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*SubscriptionUsage `json:"value,omitempty" azure:"ro"` }
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.
type SubscriptionUsageProperties ¶
type SubscriptionUsageProperties struct { // READ-ONLY; Current value of the metric. CurrentValue *float64 `json:"currentValue,omitempty" azure:"ro"` // READ-ONLY; User-readable name of the metric. DisplayName *string `json:"displayName,omitempty" azure:"ro"` // READ-ONLY; Boundary value of the metric. Limit *float64 `json:"limit,omitempty" azure:"ro"` // READ-ONLY; Unit of the metric. Unit *string `json:"unit,omitempty" azure:"ro"` }
SubscriptionUsageProperties - Properties of a subscription usage.
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. 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SubscriptionUsageGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSubscriptionUsagesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<location-name>", "<usage-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*SubscriptionUsagesClient) ListByLocation ¶
func (client *SubscriptionUsagesClient) ListByLocation(locationName string, options *SubscriptionUsagesClientListByLocationOptions) *runtime.Pager[SubscriptionUsagesClientListByLocationResponse]
ListByLocation - Gets all subscription usage metrics in a given location. If the operation fails it returns an *azcore.ResponseError type. locationName - The name of the region where the resource is located. options - SubscriptionUsagesClientListByLocationOptions contains the optional parameters for the SubscriptionUsagesClient.ListByLocation method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SubscriptionUsageListByLocation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSubscriptionUsagesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByLocation("<location-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type SubscriptionUsagesClientGetOptions ¶ added in v0.3.0
type SubscriptionUsagesClientGetOptions struct { }
SubscriptionUsagesClientGetOptions contains the optional parameters for the SubscriptionUsagesClient.Get method.
type SubscriptionUsagesClientGetResponse ¶ added in v0.3.0
type SubscriptionUsagesClientGetResponse struct {
SubscriptionUsage
}
SubscriptionUsagesClientGetResponse contains the response from method SubscriptionUsagesClient.Get.
type SubscriptionUsagesClientListByLocationOptions ¶ added in v0.3.0
type SubscriptionUsagesClientListByLocationOptions struct { }
SubscriptionUsagesClientListByLocationOptions contains the optional parameters for the SubscriptionUsagesClient.ListByLocation method.
type SubscriptionUsagesClientListByLocationResponse ¶ added in v0.3.0
type SubscriptionUsagesClientListByLocationResponse struct {
SubscriptionUsageListResult
}
SubscriptionUsagesClientListByLocationResponse contains the response from method SubscriptionUsagesClient.ListByLocation.
type SyncAgent ¶
type SyncAgent struct { // Resource properties. Properties *SyncAgentProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
SyncAgent - An Azure SQL Database sync agent.
type SyncAgentKeyProperties ¶
type SyncAgentKeyProperties struct { // READ-ONLY; Key of sync agent. SyncAgentKey *string `json:"syncAgentKey,omitempty" azure:"ro"` }
SyncAgentKeyProperties - Properties of an Azure SQL Database sync agent key.
type SyncAgentLinkedDatabase ¶
type SyncAgentLinkedDatabase struct { // Resource properties. Properties *SyncAgentLinkedDatabaseProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
SyncAgentLinkedDatabase - An Azure SQL Database sync agent linked database.
type SyncAgentLinkedDatabaseListResult ¶
type SyncAgentLinkedDatabaseListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*SyncAgentLinkedDatabase `json:"value,omitempty" azure:"ro"` }
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.
type SyncAgentLinkedDatabaseProperties ¶
type SyncAgentLinkedDatabaseProperties struct { // READ-ONLY; Id of the sync agent linked database. DatabaseID *string `json:"databaseId,omitempty" azure:"ro"` // READ-ONLY; Database name of the sync agent linked database. DatabaseName *string `json:"databaseName,omitempty" azure:"ro"` // READ-ONLY; Type of the sync agent linked database. DatabaseType *SyncMemberDbType `json:"databaseType,omitempty" azure:"ro"` // READ-ONLY; Description of the sync agent linked database. Description *string `json:"description,omitempty" azure:"ro"` // READ-ONLY; Server name of the sync agent linked database. ServerName *string `json:"serverName,omitempty" azure:"ro"` // READ-ONLY; User name of the sync agent linked database. UserName *string `json:"userName,omitempty" azure:"ro"` }
SyncAgentLinkedDatabaseProperties - Properties of an Azure SQL Database sync agent linked database.
type SyncAgentListResult ¶
type SyncAgentListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*SyncAgent `json:"value,omitempty" azure:"ro"` }
SyncAgentListResult - A list of sync agents.
func (SyncAgentListResult) MarshalJSON ¶
func (s SyncAgentListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncAgentListResult.
type SyncAgentProperties ¶
type SyncAgentProperties struct { // ARM resource id of the sync database in the sync agent. SyncDatabaseID *string `json:"syncDatabaseId,omitempty"` // READ-ONLY; Expiration time of the sync agent version. ExpiryTime *time.Time `json:"expiryTime,omitempty" azure:"ro"` // READ-ONLY; If the sync agent version is up to date. IsUpToDate *bool `json:"isUpToDate,omitempty" azure:"ro"` // READ-ONLY; Last alive time of the sync agent. LastAliveTime *time.Time `json:"lastAliveTime,omitempty" azure:"ro"` // READ-ONLY; Name of the sync agent. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; State of the sync agent. State *SyncAgentState `json:"state,omitempty" azure:"ro"` // READ-ONLY; Version of the sync agent. Version *string `json:"version,omitempty" azure:"ro"` }
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) (*armruntime.Poller[SyncAgentsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a sync agent. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncAgentCreate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSyncAgentsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<sync-agent-name>", armsql.SyncAgent{ Properties: &armsql.SyncAgentProperties{ SyncDatabaseID: to.Ptr("<sync-database-id>"), }, }, &armsql.SyncAgentsClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*SyncAgentsClient) BeginDelete ¶
func (client *SyncAgentsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, syncAgentName string, options *SyncAgentsClientBeginDeleteOptions) (*armruntime.Poller[SyncAgentsClientDeleteResponse], error)
BeginDelete - Deletes a sync agent. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncAgentDelete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSyncAgentsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<server-name>", "<sync-agent-name>", &armsql.SyncAgentsClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncAgentGenerateKey.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSyncAgentsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.GenerateKey(ctx, "<resource-group-name>", "<server-name>", "<sync-agent-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncAgentGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSyncAgentsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<sync-agent-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*SyncAgentsClient) ListByServer ¶
func (client *SyncAgentsClient) ListByServer(resourceGroupName string, serverName string, options *SyncAgentsClientListByServerOptions) *runtime.Pager[SyncAgentsClientListByServerResponse]
ListByServer - Lists sync agents in a server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncAgentListByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSyncAgentsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<resource-group-name>", "<server-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*SyncAgentsClient) ListLinkedDatabases ¶
func (client *SyncAgentsClient) ListLinkedDatabases(resourceGroupName string, serverName string, syncAgentName string, options *SyncAgentsClientListLinkedDatabasesOptions) *runtime.Pager[SyncAgentsClientListLinkedDatabasesResponse]
ListLinkedDatabases - Lists databases linked to a sync agent. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListLinkedDatabases method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncAgentGetLinkedDatabases.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSyncAgentsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListLinkedDatabases("<resource-group-name>", "<server-name>", "<sync-agent-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type SyncAgentsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type SyncAgentsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncAgentsClientBeginCreateOrUpdateOptions contains the optional parameters for the SyncAgentsClient.BeginCreateOrUpdate method.
type SyncAgentsClientBeginDeleteOptions ¶ added in v0.3.0
type SyncAgentsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncAgentsClientBeginDeleteOptions contains the optional parameters for the SyncAgentsClient.BeginDelete method.
type SyncAgentsClientCreateOrUpdateResponse ¶ added in v0.3.0
type SyncAgentsClientCreateOrUpdateResponse struct {
SyncAgent
}
SyncAgentsClientCreateOrUpdateResponse contains the response from method SyncAgentsClient.CreateOrUpdate.
type SyncAgentsClientDeleteResponse ¶ added in v0.3.0
type SyncAgentsClientDeleteResponse struct { }
SyncAgentsClientDeleteResponse contains the response from method SyncAgentsClient.Delete.
type SyncAgentsClientGenerateKeyOptions ¶ added in v0.3.0
type SyncAgentsClientGenerateKeyOptions struct { }
SyncAgentsClientGenerateKeyOptions contains the optional parameters for the SyncAgentsClient.GenerateKey method.
type SyncAgentsClientGenerateKeyResponse ¶ added in v0.3.0
type SyncAgentsClientGenerateKeyResponse struct {
SyncAgentKeyProperties
}
SyncAgentsClientGenerateKeyResponse contains the response from method SyncAgentsClient.GenerateKey.
type SyncAgentsClientGetOptions ¶ added in v0.3.0
type SyncAgentsClientGetOptions struct { }
SyncAgentsClientGetOptions contains the optional parameters for the SyncAgentsClient.Get method.
type SyncAgentsClientGetResponse ¶ added in v0.3.0
type SyncAgentsClientGetResponse struct {
SyncAgent
}
SyncAgentsClientGetResponse contains the response from method SyncAgentsClient.Get.
type SyncAgentsClientListByServerOptions ¶ added in v0.3.0
type SyncAgentsClientListByServerOptions struct { }
SyncAgentsClientListByServerOptions contains the optional parameters for the SyncAgentsClient.ListByServer method.
type SyncAgentsClientListByServerResponse ¶ added in v0.3.0
type SyncAgentsClientListByServerResponse struct {
SyncAgentListResult
}
SyncAgentsClientListByServerResponse contains the response from method SyncAgentsClient.ListByServer.
type SyncAgentsClientListLinkedDatabasesOptions ¶ added in v0.3.0
type SyncAgentsClientListLinkedDatabasesOptions struct { }
SyncAgentsClientListLinkedDatabasesOptions contains the optional parameters for the SyncAgentsClient.ListLinkedDatabases method.
type SyncAgentsClientListLinkedDatabasesResponse ¶ added in v0.3.0
type SyncAgentsClientListLinkedDatabasesResponse struct {
SyncAgentLinkedDatabaseListResult
}
SyncAgentsClientListLinkedDatabasesResponse contains the response from method SyncAgentsClient.ListLinkedDatabases.
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 `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*SyncDatabaseIDProperties `json:"value,omitempty" azure:"ro"` }
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.
type SyncDatabaseIDProperties ¶
type SyncDatabaseIDProperties struct { // READ-ONLY; ARM resource id of sync database. ID *string `json:"id,omitempty" azure:"ro"` }
SyncDatabaseIDProperties - Properties of the sync database id.
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 `json:"lastUpdateTime,omitempty" azure:"ro"` // READ-ONLY; List of tables in the database full schema. Tables []*SyncFullSchemaTable `json:"tables,omitempty" azure:"ro"` }
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 `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*SyncFullSchemaProperties `json:"value,omitempty" azure:"ro"` }
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.
type SyncFullSchemaTable ¶
type SyncFullSchemaTable struct { // READ-ONLY; List of columns in the table of database full schema. Columns []*SyncFullSchemaTableColumn `json:"columns,omitempty" azure:"ro"` // READ-ONLY; Error id of the table. ErrorID *string `json:"errorId,omitempty" azure:"ro"` // READ-ONLY; If there is error in the table. HasError *bool `json:"hasError,omitempty" azure:"ro"` // READ-ONLY; Name of the table. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Quoted name of the table. QuotedName *string `json:"quotedName,omitempty" azure:"ro"` }
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.
type SyncFullSchemaTableColumn ¶
type SyncFullSchemaTableColumn struct { // READ-ONLY; Data size of the column. DataSize *string `json:"dataSize,omitempty" azure:"ro"` // READ-ONLY; Data type of the column. DataType *string `json:"dataType,omitempty" azure:"ro"` // READ-ONLY; Error id of the column. ErrorID *string `json:"errorId,omitempty" azure:"ro"` // READ-ONLY; If there is error in the table. HasError *bool `json:"hasError,omitempty" azure:"ro"` // READ-ONLY; If it is the primary key of the table. IsPrimaryKey *bool `json:"isPrimaryKey,omitempty" azure:"ro"` // READ-ONLY; Name of the column. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Quoted name of the column. QuotedName *string `json:"quotedName,omitempty" azure:"ro"` }
SyncFullSchemaTableColumn - Properties of the column in the table of database full schema.
type SyncGroup ¶
type SyncGroup struct { // Resource properties. Properties *SyncGroupProperties `json:"properties,omitempty"` // The name and capacity of the SKU. SKU *SKU `json:"sku,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
SyncGroup - An Azure SQL Database sync group.
func (SyncGroup) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type SyncGroup.
type SyncGroupListResult ¶
type SyncGroupListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*SyncGroup `json:"value,omitempty" azure:"ro"` }
SyncGroupListResult - A list of sync groups.
func (SyncGroupListResult) MarshalJSON ¶
func (s SyncGroupListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncGroupListResult.
type SyncGroupLogListResult ¶
type SyncGroupLogListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*SyncGroupLogProperties `json:"value,omitempty" azure:"ro"` }
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.
type SyncGroupLogProperties ¶
type SyncGroupLogProperties struct { // READ-ONLY; Details of the sync group log. Details *string `json:"details,omitempty" azure:"ro"` // READ-ONLY; OperationStatus of the sync group log. OperationStatus *string `json:"operationStatus,omitempty" azure:"ro"` // READ-ONLY; Source of the sync group log. Source *string `json:"source,omitempty" azure:"ro"` // READ-ONLY; Timestamp of the sync group log. Timestamp *time.Time `json:"timestamp,omitempty" azure:"ro"` // READ-ONLY; TracingId of the sync group log. TracingID *string `json:"tracingId,omitempty" azure:"ro"` // READ-ONLY; Type of the sync group log. Type *SyncGroupLogType `json:"type,omitempty" azure:"ro"` }
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 `json:"conflictLoggingRetentionInDays,omitempty"` // Conflict resolution policy of the sync group. ConflictResolutionPolicy *SyncConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"` // If conflict logging is enabled. EnableConflictLogging *bool `json:"enableConflictLogging,omitempty"` // Password for the sync group hub database credential. HubDatabasePassword *string `json:"hubDatabasePassword,omitempty"` // User name for the sync group hub database credential. HubDatabaseUserName *string `json:"hubDatabaseUserName,omitempty"` // Sync interval of the sync group. Interval *int32 `json:"interval,omitempty"` // Sync schema of the sync group. Schema *SyncGroupSchema `json:"schema,omitempty"` // ARM resource id of the sync database in the sync group. SyncDatabaseID *string `json:"syncDatabaseId,omitempty"` // If use private link connection is enabled. UsePrivateLinkConnection *bool `json:"usePrivateLinkConnection,omitempty"` // READ-ONLY; Last sync time of the sync group. LastSyncTime *time.Time `json:"lastSyncTime,omitempty" azure:"ro"` // READ-ONLY; Private endpoint name of the sync group if use private link connection is enabled. PrivateEndpointName *string `json:"privateEndpointName,omitempty" azure:"ro"` // READ-ONLY; Sync state of the sync group. SyncState *SyncGroupState `json:"syncState,omitempty" azure:"ro"` }
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 `json:"masterSyncMemberName,omitempty"` // List of tables in sync group schema. Tables []*SyncGroupSchemaTable `json:"tables,omitempty"` }
SyncGroupSchema - Properties of sync group schema.
func (SyncGroupSchema) MarshalJSON ¶
func (s SyncGroupSchema) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SyncGroupSchema.
type SyncGroupSchemaTable ¶
type SyncGroupSchemaTable struct { // List of columns in sync group schema. Columns []*SyncGroupSchemaTableColumn `json:"columns,omitempty"` // Quoted name of sync group schema table. QuotedName *string `json:"quotedName,omitempty"` }
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.
type SyncGroupSchemaTableColumn ¶
type SyncGroupSchemaTableColumn struct { // Data size of the column. DataSize *string `json:"dataSize,omitempty"` // Data type of the column. DataType *string `json:"dataType,omitempty"` // Quoted name of sync group table column. QuotedName *string `json:"quotedName,omitempty"` }
SyncGroupSchemaTableColumn - Properties of column in sync group table.
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) (*armruntime.Poller[SyncGroupsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a sync group. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupCreate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSyncGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<sync-group-name>", armsql.SyncGroup{ Properties: &armsql.SyncGroupProperties{ ConflictResolutionPolicy: to.Ptr(armsql.SyncConflictResolutionPolicyHubWin), HubDatabaseUserName: to.Ptr("<hub-database-user-name>"), Interval: to.Ptr[int32](-1), SyncDatabaseID: to.Ptr("<sync-database-id>"), UsePrivateLinkConnection: to.Ptr(true), }, }, &armsql.SyncGroupsClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*SyncGroupsClient) BeginDelete ¶
func (client *SyncGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, options *SyncGroupsClientBeginDeleteOptions) (*armruntime.Poller[SyncGroupsClientDeleteResponse], error)
BeginDelete - Deletes a sync group. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupDelete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSyncGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<sync-group-name>", &armsql.SyncGroupsClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*SyncGroupsClient) BeginRefreshHubSchema ¶
func (client *SyncGroupsClient) BeginRefreshHubSchema(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, options *SyncGroupsClientBeginRefreshHubSchemaOptions) (*armruntime.Poller[SyncGroupsClientRefreshHubSchemaResponse], error)
BeginRefreshHubSchema - Refreshes a hub database schema. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupRefreshHubSchema.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSyncGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginRefreshHubSchema(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<sync-group-name>", &armsql.SyncGroupsClientBeginRefreshHubSchemaOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*SyncGroupsClient) BeginUpdate ¶
func (client *SyncGroupsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, parameters SyncGroup, options *SyncGroupsClientBeginUpdateOptions) (*armruntime.Poller[SyncGroupsClientUpdateResponse], error)
BeginUpdate - Updates a sync group. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupPatch.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSyncGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginUpdate(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<sync-group-name>", armsql.SyncGroup{ Properties: &armsql.SyncGroupProperties{ ConflictResolutionPolicy: to.Ptr(armsql.SyncConflictResolutionPolicyHubWin), HubDatabasePassword: to.Ptr("<hub-database-password>"), HubDatabaseUserName: to.Ptr("<hub-database-user-name>"), Interval: to.Ptr[int32](-1), SyncDatabaseID: to.Ptr("<sync-database-id>"), UsePrivateLinkConnection: to.Ptr(true), }, }, &armsql.SyncGroupsClientBeginUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupCancelSync.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSyncGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.CancelSync(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<sync-group-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSyncGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<sync-group-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*SyncGroupsClient) ListByDatabase ¶
func (client *SyncGroupsClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, options *SyncGroupsClientListByDatabaseOptions) *runtime.Pager[SyncGroupsClientListByDatabaseResponse]
ListByDatabase - Lists sync groups under a hub database. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupListByDatabase.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSyncGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<server-name>", "<database-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*SyncGroupsClient) ListHubSchemas ¶
func (client *SyncGroupsClient) ListHubSchemas(resourceGroupName string, serverName string, databaseName string, syncGroupName string, options *SyncGroupsClientListHubSchemasOptions) *runtime.Pager[SyncGroupsClientListHubSchemasResponse]
ListHubSchemas - Gets a collection of hub database schemas. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListHubSchemas method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupGetHubSchema.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSyncGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListHubSchemas("<resource-group-name>", "<server-name>", "<database-name>", "<sync-group-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*SyncGroupsClient) ListLogs ¶
func (client *SyncGroupsClient) ListLogs(resourceGroupName string, serverName string, databaseName string, syncGroupName string, startTime string, endTime string, typeParam SyncGroupsType, options *SyncGroupsClientListLogsOptions) *runtime.Pager[SyncGroupsClientListLogsResponse]
ListLogs - Gets a collection of sync group logs. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListLogs method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupGetLog.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSyncGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListLogs("<resource-group-name>", "<server-name>", "<database-name>", "<sync-group-name>", "<start-time>", "<end-time>", armsql.SyncGroupsTypeAll, &armsql.SyncGroupsClientListLogsOptions{ContinuationToken: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*SyncGroupsClient) ListSyncDatabaseIDs ¶
func (client *SyncGroupsClient) ListSyncDatabaseIDs(locationName string, options *SyncGroupsClientListSyncDatabaseIDsOptions) *runtime.Pager[SyncGroupsClientListSyncDatabaseIDsResponse]
ListSyncDatabaseIDs - Gets a collection of sync database ids. If the operation fails it returns an *azcore.ResponseError type. locationName - The name of the region where the resource is located. options - SyncGroupsClientListSyncDatabaseIDsOptions contains the optional parameters for the SyncGroupsClient.ListSyncDatabaseIDs method.
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncGroupTriggerSync.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSyncGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } _, err = client.TriggerSync(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<sync-group-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } }
Output:
type SyncGroupsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type SyncGroupsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the SyncGroupsClient.BeginCreateOrUpdate method.
type SyncGroupsClientBeginDeleteOptions ¶ added in v0.3.0
type SyncGroupsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncGroupsClientBeginDeleteOptions contains the optional parameters for the SyncGroupsClient.BeginDelete method.
type SyncGroupsClientBeginRefreshHubSchemaOptions ¶ added in v0.3.0
type SyncGroupsClientBeginRefreshHubSchemaOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncGroupsClientBeginRefreshHubSchemaOptions contains the optional parameters for the SyncGroupsClient.BeginRefreshHubSchema method.
type SyncGroupsClientBeginUpdateOptions ¶ added in v0.3.0
type SyncGroupsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncGroupsClientBeginUpdateOptions contains the optional parameters for the SyncGroupsClient.BeginUpdate method.
type SyncGroupsClientCancelSyncOptions ¶ added in v0.3.0
type SyncGroupsClientCancelSyncOptions struct { }
SyncGroupsClientCancelSyncOptions contains the optional parameters for the SyncGroupsClient.CancelSync method.
type SyncGroupsClientCancelSyncResponse ¶ added in v0.3.0
type SyncGroupsClientCancelSyncResponse struct { }
SyncGroupsClientCancelSyncResponse contains the response from method SyncGroupsClient.CancelSync.
type SyncGroupsClientCreateOrUpdateResponse ¶ added in v0.3.0
type SyncGroupsClientCreateOrUpdateResponse struct {
SyncGroup
}
SyncGroupsClientCreateOrUpdateResponse contains the response from method SyncGroupsClient.CreateOrUpdate.
type SyncGroupsClientDeleteResponse ¶ added in v0.3.0
type SyncGroupsClientDeleteResponse struct { }
SyncGroupsClientDeleteResponse contains the response from method SyncGroupsClient.Delete.
type SyncGroupsClientGetOptions ¶ added in v0.3.0
type SyncGroupsClientGetOptions struct { }
SyncGroupsClientGetOptions contains the optional parameters for the SyncGroupsClient.Get method.
type SyncGroupsClientGetResponse ¶ added in v0.3.0
type SyncGroupsClientGetResponse struct {
SyncGroup
}
SyncGroupsClientGetResponse contains the response from method SyncGroupsClient.Get.
type SyncGroupsClientListByDatabaseOptions ¶ added in v0.3.0
type SyncGroupsClientListByDatabaseOptions struct { }
SyncGroupsClientListByDatabaseOptions contains the optional parameters for the SyncGroupsClient.ListByDatabase method.
type SyncGroupsClientListByDatabaseResponse ¶ added in v0.3.0
type SyncGroupsClientListByDatabaseResponse struct {
SyncGroupListResult
}
SyncGroupsClientListByDatabaseResponse contains the response from method SyncGroupsClient.ListByDatabase.
type SyncGroupsClientListHubSchemasOptions ¶ added in v0.3.0
type SyncGroupsClientListHubSchemasOptions struct { }
SyncGroupsClientListHubSchemasOptions contains the optional parameters for the SyncGroupsClient.ListHubSchemas method.
type SyncGroupsClientListHubSchemasResponse ¶ added in v0.3.0
type SyncGroupsClientListHubSchemasResponse struct {
SyncFullSchemaPropertiesListResult
}
SyncGroupsClientListHubSchemasResponse contains the response from method SyncGroupsClient.ListHubSchemas.
type SyncGroupsClientListLogsOptions ¶ added in v0.3.0
type SyncGroupsClientListLogsOptions struct { // The continuation token for this operation. ContinuationToken *string }
SyncGroupsClientListLogsOptions contains the optional parameters for the SyncGroupsClient.ListLogs method.
type SyncGroupsClientListLogsResponse ¶ added in v0.3.0
type SyncGroupsClientListLogsResponse struct {
SyncGroupLogListResult
}
SyncGroupsClientListLogsResponse contains the response from method SyncGroupsClient.ListLogs.
type SyncGroupsClientListSyncDatabaseIDsOptions ¶ added in v0.3.0
type SyncGroupsClientListSyncDatabaseIDsOptions struct { }
SyncGroupsClientListSyncDatabaseIDsOptions contains the optional parameters for the SyncGroupsClient.ListSyncDatabaseIDs method.
type SyncGroupsClientListSyncDatabaseIDsResponse ¶ added in v0.3.0
type SyncGroupsClientListSyncDatabaseIDsResponse struct {
SyncDatabaseIDListResult
}
SyncGroupsClientListSyncDatabaseIDsResponse contains the response from method SyncGroupsClient.ListSyncDatabaseIDs.
type SyncGroupsClientRefreshHubSchemaResponse ¶ added in v0.3.0
type SyncGroupsClientRefreshHubSchemaResponse struct { }
SyncGroupsClientRefreshHubSchemaResponse contains the response from method SyncGroupsClient.RefreshHubSchema.
type SyncGroupsClientTriggerSyncOptions ¶ added in v0.3.0
type SyncGroupsClientTriggerSyncOptions struct { }
SyncGroupsClientTriggerSyncOptions contains the optional parameters for the SyncGroupsClient.TriggerSync method.
type SyncGroupsClientTriggerSyncResponse ¶ added in v0.3.0
type SyncGroupsClientTriggerSyncResponse struct { }
SyncGroupsClientTriggerSyncResponse contains the response from method SyncGroupsClient.TriggerSync.
type SyncGroupsClientUpdateResponse ¶ added in v0.3.0
type SyncGroupsClientUpdateResponse struct {
SyncGroup
}
SyncGroupsClientUpdateResponse contains the response from method SyncGroupsClient.Update.
type SyncGroupsType ¶ added in v0.3.0
type SyncGroupsType string
const ( SyncGroupsTypeAll SyncGroupsType = "All" SyncGroupsTypeError SyncGroupsType = "Error" SyncGroupsTypeSuccess SyncGroupsType = "Success" SyncGroupsTypeWarning SyncGroupsType = "Warning" )
func PossibleSyncGroupsTypeValues ¶ added in v0.3.0
func PossibleSyncGroupsTypeValues() []SyncGroupsType
PossibleSyncGroupsTypeValues returns the possible values for the SyncGroupsType const type.
type SyncMember ¶
type SyncMember struct { // Resource properties. Properties *SyncMemberProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
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.
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 `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*SyncMember `json:"value,omitempty" azure:"ro"` }
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.
type SyncMemberProperties ¶
type SyncMemberProperties struct { // Database name of the member database in the sync member. DatabaseName *string `json:"databaseName,omitempty"` // Database type of the sync member. DatabaseType *SyncMemberDbType `json:"databaseType,omitempty"` // Password of the member database in the sync member. Password *string `json:"password,omitempty"` // SQL Server database id of the sync member. SQLServerDatabaseID *string `json:"sqlServerDatabaseId,omitempty"` // Server name of the member database in the sync member ServerName *string `json:"serverName,omitempty"` // ARM resource id of the sync agent in the sync member. SyncAgentID *string `json:"syncAgentId,omitempty"` // Sync direction of the sync member. SyncDirection *SyncDirection `json:"syncDirection,omitempty"` // ARM resource id of the sync member logical database, for sync members in Azure. SyncMemberAzureDatabaseResourceID *string `json:"syncMemberAzureDatabaseResourceId,omitempty"` // Whether to use private link connection. UsePrivateLinkConnection *bool `json:"usePrivateLinkConnection,omitempty"` // User name of the member database in the sync member. UserName *string `json:"userName,omitempty"` // READ-ONLY; Private endpoint name of the sync member if use private link connection is enabled, for sync members in Azure. PrivateEndpointName *string `json:"privateEndpointName,omitempty" azure:"ro"` // READ-ONLY; Sync state of the sync member. SyncState *SyncMemberState `json:"syncState,omitempty" azure:"ro"` }
SyncMemberProperties - Properties of a sync member.
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) (*armruntime.Poller[SyncMembersClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a sync member. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberCreate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSyncMembersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<sync-group-name>", "<sync-member-name>", armsql.SyncMember{ Properties: &armsql.SyncMemberProperties{ DatabaseName: to.Ptr("<database-name>"), DatabaseType: to.Ptr(armsql.SyncMemberDbTypeAzureSQLDatabase), ServerName: to.Ptr("<server-name>"), SyncDirection: to.Ptr(armsql.SyncDirectionBidirectional), SyncMemberAzureDatabaseResourceID: to.Ptr("<sync-member-azure-database-resource-id>"), UsePrivateLinkConnection: to.Ptr(true), UserName: to.Ptr("<user-name>"), }, }, &armsql.SyncMembersClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*SyncMembersClient) BeginDelete ¶
func (client *SyncMembersClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, options *SyncMembersClientBeginDeleteOptions) (*armruntime.Poller[SyncMembersClientDeleteResponse], error)
BeginDelete - Deletes a sync member. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberDelete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSyncMembersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<sync-group-name>", "<sync-member-name>", &armsql.SyncMembersClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*SyncMembersClient) BeginRefreshMemberSchema ¶
func (client *SyncMembersClient) BeginRefreshMemberSchema(ctx context.Context, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, options *SyncMembersClientBeginRefreshMemberSchemaOptions) (*armruntime.Poller[SyncMembersClientRefreshMemberSchemaResponse], error)
BeginRefreshMemberSchema - Refreshes a sync member database schema. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberRefreshSchema.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSyncMembersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginRefreshMemberSchema(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<sync-group-name>", "<sync-member-name>", &armsql.SyncMembersClientBeginRefreshMemberSchemaOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
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) (*armruntime.Poller[SyncMembersClientUpdateResponse], error)
BeginUpdate - Updates an existing sync member. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberPatch.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSyncMembersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginUpdate(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<sync-group-name>", "<sync-member-name>", armsql.SyncMember{ Properties: &armsql.SyncMemberProperties{ DatabaseName: to.Ptr("<database-name>"), DatabaseType: to.Ptr(armsql.SyncMemberDbTypeAzureSQLDatabase), ServerName: to.Ptr("<server-name>"), SyncDirection: to.Ptr(armsql.SyncDirectionBidirectional), SyncMemberAzureDatabaseResourceID: to.Ptr("<sync-member-azure-database-resource-id>"), UsePrivateLinkConnection: to.Ptr(true), UserName: to.Ptr("<user-name>"), }, }, &armsql.SyncMembersClientBeginUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSyncMembersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<sync-group-name>", "<sync-member-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*SyncMembersClient) ListBySyncGroup ¶
func (client *SyncMembersClient) ListBySyncGroup(resourceGroupName string, serverName string, databaseName string, syncGroupName string, options *SyncMembersClientListBySyncGroupOptions) *runtime.Pager[SyncMembersClientListBySyncGroupResponse]
ListBySyncGroup - Lists sync members in the given sync group. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListBySyncGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberListBySyncGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSyncMembersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListBySyncGroup("<resource-group-name>", "<server-name>", "<database-name>", "<sync-group-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*SyncMembersClient) ListMemberSchemas ¶
func (client *SyncMembersClient) ListMemberSchemas(resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, options *SyncMembersClientListMemberSchemasOptions) *runtime.Pager[SyncMembersClientListMemberSchemasResponse]
ListMemberSchemas - Gets a sync member database schema. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListMemberSchemas method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SyncMemberGetSchema.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewSyncMembersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListMemberSchemas("<resource-group-name>", "<server-name>", "<database-name>", "<sync-group-name>", "<sync-member-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type SyncMembersClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type SyncMembersClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncMembersClientBeginCreateOrUpdateOptions contains the optional parameters for the SyncMembersClient.BeginCreateOrUpdate method.
type SyncMembersClientBeginDeleteOptions ¶ added in v0.3.0
type SyncMembersClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncMembersClientBeginDeleteOptions contains the optional parameters for the SyncMembersClient.BeginDelete method.
type SyncMembersClientBeginRefreshMemberSchemaOptions ¶ added in v0.3.0
type SyncMembersClientBeginRefreshMemberSchemaOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncMembersClientBeginRefreshMemberSchemaOptions contains the optional parameters for the SyncMembersClient.BeginRefreshMemberSchema method.
type SyncMembersClientBeginUpdateOptions ¶ added in v0.3.0
type SyncMembersClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SyncMembersClientBeginUpdateOptions contains the optional parameters for the SyncMembersClient.BeginUpdate method.
type SyncMembersClientCreateOrUpdateResponse ¶ added in v0.3.0
type SyncMembersClientCreateOrUpdateResponse struct {
SyncMember
}
SyncMembersClientCreateOrUpdateResponse contains the response from method SyncMembersClient.CreateOrUpdate.
type SyncMembersClientDeleteResponse ¶ added in v0.3.0
type SyncMembersClientDeleteResponse struct { }
SyncMembersClientDeleteResponse contains the response from method SyncMembersClient.Delete.
type SyncMembersClientGetOptions ¶ added in v0.3.0
type SyncMembersClientGetOptions struct { }
SyncMembersClientGetOptions contains the optional parameters for the SyncMembersClient.Get method.
type SyncMembersClientGetResponse ¶ added in v0.3.0
type SyncMembersClientGetResponse struct {
SyncMember
}
SyncMembersClientGetResponse contains the response from method SyncMembersClient.Get.
type SyncMembersClientListBySyncGroupOptions ¶ added in v0.3.0
type SyncMembersClientListBySyncGroupOptions struct { }
SyncMembersClientListBySyncGroupOptions contains the optional parameters for the SyncMembersClient.ListBySyncGroup method.
type SyncMembersClientListBySyncGroupResponse ¶ added in v0.3.0
type SyncMembersClientListBySyncGroupResponse struct {
SyncMemberListResult
}
SyncMembersClientListBySyncGroupResponse contains the response from method SyncMembersClient.ListBySyncGroup.
type SyncMembersClientListMemberSchemasOptions ¶ added in v0.3.0
type SyncMembersClientListMemberSchemasOptions struct { }
SyncMembersClientListMemberSchemasOptions contains the optional parameters for the SyncMembersClient.ListMemberSchemas method.
type SyncMembersClientListMemberSchemasResponse ¶ added in v0.3.0
type SyncMembersClientListMemberSchemasResponse struct {
SyncFullSchemaPropertiesListResult
}
SyncMembersClientListMemberSchemasResponse contains the response from method SyncMembersClient.ListMemberSchemas.
type SyncMembersClientRefreshMemberSchemaResponse ¶ added in v0.3.0
type SyncMembersClientRefreshMemberSchemaResponse struct { }
SyncMembersClientRefreshMemberSchemaResponse contains the response from method SyncMembersClient.RefreshMemberSchema.
type SyncMembersClientUpdateResponse ¶ added in v0.3.0
type SyncMembersClientUpdateResponse struct {
SyncMember
}
SyncMembersClientUpdateResponse contains the response from method SyncMembersClient.Update.
type SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time `json:"createdAt,omitempty"` // The identity that created the resource. CreatedBy *string `json:"createdBy,omitempty"` // The type of identity that created the resource. CreatedByType *CreatedByType `json:"createdByType,omitempty"` // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` // The identity that last modified the resource. LastModifiedBy *string `json:"lastModifiedBy,omitempty"` // The type of identity that last modified the resource. LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` }
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 `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
TdeCertificate - A TDE certificate that can be uploaded into a server.
type TdeCertificateProperties ¶
type TdeCertificateProperties struct { // REQUIRED; The base64 encoded certificate private blob. PrivateBlob *string `json:"privateBlob,omitempty"` // The certificate password. CertPassword *string `json:"certPassword,omitempty"` }
TdeCertificateProperties - Properties of a TDE certificate.
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) (*armruntime.Poller[TdeCertificatesClientCreateResponse], error)
BeginCreate - Creates a TDE certificate for a given server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/SqlTdeCertificateCreate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewTdeCertificatesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreate(ctx, "<resource-group-name>", "<server-name>", armsql.TdeCertificate{ Properties: &armsql.TdeCertificateProperties{ PrivateBlob: to.Ptr("<private-blob>"), }, }, &armsql.TdeCertificatesClientBeginCreateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
type TdeCertificatesClientBeginCreateOptions ¶ added in v0.3.0
type TdeCertificatesClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
TdeCertificatesClientBeginCreateOptions contains the optional parameters for the TdeCertificatesClient.BeginCreate method.
type TdeCertificatesClientCreateResponse ¶ added in v0.3.0
type TdeCertificatesClientCreateResponse struct { }
TdeCertificatesClientCreateResponse contains the response from method TdeCertificatesClient.Create.
type TimeZone ¶
type TimeZone struct { // Resource properties. Properties *TimeZoneProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
TimeZone - Time Zone.
type TimeZoneListResult ¶
type TimeZoneListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*TimeZone `json:"value,omitempty" azure:"ro"` }
TimeZoneListResult - A list of time zones.
func (TimeZoneListResult) MarshalJSON ¶
func (t TimeZoneListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TimeZoneListResult.
type TimeZoneProperties ¶
type TimeZoneProperties struct { // READ-ONLY; The time zone display name DisplayName *string `json:"displayName,omitempty" azure:"ro"` // READ-ONLY; The time zone id TimeZoneID *string `json:"timeZoneId,omitempty" azure:"ro"` }
TimeZoneProperties - The properties of a time zone.
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. options - TimeZonesClientGetOptions contains the optional parameters for the TimeZonesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceTimeZoneGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewTimeZonesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<location-name>", "<time-zone-id>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*TimeZonesClient) ListByLocation ¶
func (client *TimeZonesClient) ListByLocation(locationName string, options *TimeZonesClientListByLocationOptions) *runtime.Pager[TimeZonesClientListByLocationResponse]
ListByLocation - Gets a list of managed instance time zones by location. If the operation fails it returns an *azcore.ResponseError type. options - TimeZonesClientListByLocationOptions contains the optional parameters for the TimeZonesClient.ListByLocation method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/ManagedInstanceTimeZoneListByLocation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewTimeZonesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByLocation("<location-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type TimeZonesClientGetOptions ¶ added in v0.3.0
type TimeZonesClientGetOptions struct { }
TimeZonesClientGetOptions contains the optional parameters for the TimeZonesClient.Get method.
type TimeZonesClientGetResponse ¶ added in v0.3.0
type TimeZonesClientGetResponse struct {
TimeZone
}
TimeZonesClientGetResponse contains the response from method TimeZonesClient.Get.
type TimeZonesClientListByLocationOptions ¶ added in v0.3.0
type TimeZonesClientListByLocationOptions struct { }
TimeZonesClientListByLocationOptions contains the optional parameters for the TimeZonesClient.ListByLocation method.
type TimeZonesClientListByLocationResponse ¶ added in v0.3.0
type TimeZonesClientListByLocationResponse struct {
TimeZoneListResult
}
TimeZonesClientListByLocationResponse contains the response from method TimeZonesClient.ListByLocation.
type TopQueries ¶
type TopQueries struct { // List of top resource consuming queries with appropriate metric data Queries []*QueryStatisticsProperties `json:"queries,omitempty"` // READ-ONLY; Aggregation function used to calculate query metrics. AggregationFunction *string `json:"aggregationFunction,omitempty" azure:"ro"` // READ-ONLY; The end time for the metric (ISO-8601 format). EndTime *string `json:"endTime,omitempty" azure:"ro"` // READ-ONLY; Interval type (length). IntervalType *QueryTimeGrainType `json:"intervalType,omitempty" azure:"ro"` // READ-ONLY; Requested number of top queries. NumberOfQueries *int32 `json:"numberOfQueries,omitempty" azure:"ro"` // READ-ONLY; Metric used to rank queries. ObservationMetric *string `json:"observationMetric,omitempty" azure:"ro"` // READ-ONLY; The start time for the metric (ISO-8601 format). StartTime *string `json:"startTime,omitempty" azure:"ro"` }
func (TopQueries) MarshalJSON ¶
func (t TopQueries) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TopQueries.
type TopQueriesListResult ¶
type TopQueriesListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*TopQueries `json:"value,omitempty" azure:"ro"` }
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.
type TrackedResource ¶
type TrackedResource struct { // REQUIRED; Resource location. Location *string `json:"location,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
TrackedResource - ARM tracked top level resource.
func (TrackedResource) MarshalJSON ¶
func (t TrackedResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller 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 `json:"state,omitempty"` }
TransparentDataEncryptionProperties - Properties of a transparent data encryption.
type TransparentDataEncryptionState ¶
type TransparentDataEncryptionState string
TransparentDataEncryptionState - Specifies the state of the transparent data encryption.
const ( TransparentDataEncryptionStateEnabled TransparentDataEncryptionState = "Enabled" TransparentDataEncryptionStateDisabled TransparentDataEncryptionState = "Disabled" )
func PossibleTransparentDataEncryptionStateValues ¶
func PossibleTransparentDataEncryptionStateValues() []TransparentDataEncryptionState
PossibleTransparentDataEncryptionStateValues returns the possible values for the TransparentDataEncryptionState const type.
type TransparentDataEncryptionsClient ¶
type TransparentDataEncryptionsClient struct {
// contains filtered or unexported fields
}
TransparentDataEncryptionsClient contains the methods for the TransparentDataEncryptions group. Don't use this type directly, use NewTransparentDataEncryptionsClient() instead.
func NewTransparentDataEncryptionsClient ¶
func NewTransparentDataEncryptionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TransparentDataEncryptionsClient, error)
NewTransparentDataEncryptionsClient creates a new instance of TransparentDataEncryptionsClient with the specified values. subscriptionID - The subscription ID that identifies an Azure subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*TransparentDataEncryptionsClient) CreateOrUpdate ¶
func (client *TransparentDataEncryptionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, tdeName TransparentDataEncryptionName, parameters LogicalDatabaseTransparentDataEncryption, options *TransparentDataEncryptionsClientCreateOrUpdateOptions) (TransparentDataEncryptionsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Updates a logical database's transparent data encryption configuration. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. serverName - The name of the server. databaseName - The name of the logical database for which the security alert policy is defined. tdeName - The name of the transparent data encryption configuration. parameters - The database transparent data encryption. options - TransparentDataEncryptionsClientCreateOrUpdateOptions contains the optional parameters for the TransparentDataEncryptionsClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/TransparentDataEncryptionUpdate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewTransparentDataEncryptionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.CreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<database-name>", 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) return } // TODO: use response item _ = res }
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. resourceGroupName - The name of the resource group that contains the resource. You 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/TransparentDataEncryptionGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewTransparentDataEncryptionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", armsql.TransparentDataEncryptionNameCurrent, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*TransparentDataEncryptionsClient) ListByDatabase ¶
func (client *TransparentDataEncryptionsClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, options *TransparentDataEncryptionsClientListByDatabaseOptions) *runtime.Pager[TransparentDataEncryptionsClientListByDatabaseResponse]
ListByDatabase - Gets a list of the logical database's transparent data encryption. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/TransparentDataEncryptionList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewTransparentDataEncryptionsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<server-name>", "<database-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type TransparentDataEncryptionsClientCreateOrUpdateOptions ¶ added in v0.3.0
type TransparentDataEncryptionsClientCreateOrUpdateOptions struct { }
TransparentDataEncryptionsClientCreateOrUpdateOptions contains the optional parameters for the TransparentDataEncryptionsClient.CreateOrUpdate method.
type TransparentDataEncryptionsClientCreateOrUpdateResponse ¶ added in v0.3.0
type TransparentDataEncryptionsClientCreateOrUpdateResponse struct {
LogicalDatabaseTransparentDataEncryption
}
TransparentDataEncryptionsClientCreateOrUpdateResponse contains the response from method TransparentDataEncryptionsClient.CreateOrUpdate.
type TransparentDataEncryptionsClientGetOptions ¶ added in v0.3.0
type TransparentDataEncryptionsClientGetOptions struct { }
TransparentDataEncryptionsClientGetOptions contains the optional parameters for the TransparentDataEncryptionsClient.Get method.
type TransparentDataEncryptionsClientGetResponse ¶ added in v0.3.0
type TransparentDataEncryptionsClientGetResponse struct {
LogicalDatabaseTransparentDataEncryption
}
TransparentDataEncryptionsClientGetResponse contains the response from method TransparentDataEncryptionsClient.Get.
type TransparentDataEncryptionsClientListByDatabaseOptions ¶ added in v0.3.0
type TransparentDataEncryptionsClientListByDatabaseOptions struct { }
TransparentDataEncryptionsClientListByDatabaseOptions contains the optional parameters for the TransparentDataEncryptionsClient.ListByDatabase method.
type TransparentDataEncryptionsClientListByDatabaseResponse ¶ added in v0.3.0
type TransparentDataEncryptionsClientListByDatabaseResponse struct {
LogicalDatabaseTransparentDataEncryptionListResult
}
TransparentDataEncryptionsClientListByDatabaseResponse contains the response from method TransparentDataEncryptionsClient.ListByDatabase.
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 `json:"properties,omitempty"` }
UpdateLongTermRetentionBackupParameters - Contains the information necessary to perform long term retention backup update operation.
type UpdateLongTermRetentionBackupParametersProperties ¶
type UpdateLongTermRetentionBackupParametersProperties struct { // The storage redundancy type of the copied backup RequestedBackupStorageRedundancy *BackupStorageRedundancy `json:"requestedBackupStorageRedundancy,omitempty"` }
UpdateLongTermRetentionBackupParametersProperties - Contains the properties to perform long term retention backup copy operation.
type UpdateManagedInstanceDNSServersOperation ¶
type UpdateManagedInstanceDNSServersOperation struct { // Resource properties. Properties *DNSRefreshConfigurationProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
UpdateManagedInstanceDNSServersOperation - A recoverable managed database resource.
type UpsertManagedServerOperationStep ¶
type UpsertManagedServerOperationStep struct { Name *string `json:"name,omitempty"` Order *int32 `json:"order,omitempty"` Status *UpsertManagedServerOperationStepStatus `json:"status,omitempty"` }
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 `json:"currentValue,omitempty" azure:"ro"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Usage limit. Limit *int32 `json:"limit,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *Name `json:"name,omitempty" azure:"ro"` // READ-ONLY; Usage requested limit. RequestedLimit *int32 `json:"requestedLimit,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` // READ-ONLY; Usage unit. Unit *string `json:"unit,omitempty" azure:"ro"` }
Usage - ARM usage.
type UsageListResult ¶
type UsageListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*Usage `json:"value,omitempty" azure:"ro"` }
UsageListResult - A list of usages.
func (UsageListResult) MarshalJSON ¶
func (u UsageListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller 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) ListByInstancePool ¶
func (client *UsagesClient) ListByInstancePool(resourceGroupName string, instancePoolName string, options *UsagesClientListByInstancePoolOptions) *runtime.Pager[UsagesClientListByInstancePoolResponse]
ListByInstancePool - Gets all instance pool usage metrics If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByInstancePool method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListInstancePoolUsageExpanded.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewUsagesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByInstancePool("<resource-group-name>", "<instance-pool-name>", &armsql.UsagesClientListByInstancePoolOptions{ExpandChildren: to.Ptr(true)}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type UsagesClientListByInstancePoolOptions ¶ added in v0.3.0
type UsagesClientListByInstancePoolOptions struct { // Optional request parameter to include managed instance usages within the instance pool. ExpandChildren *bool }
UsagesClientListByInstancePoolOptions contains the optional parameters for the UsagesClient.ListByInstancePool method.
type UsagesClientListByInstancePoolResponse ¶ added in v0.3.0
type UsagesClientListByInstancePoolResponse struct {
UsageListResult
}
UsagesClientListByInstancePoolResponse contains the response from method UsagesClient.ListByInstancePool.
type UserIdentity ¶
type UserIdentity struct { // READ-ONLY; The Azure Active Directory client id. ClientID *string `json:"clientId,omitempty" azure:"ro"` // READ-ONLY; The Azure Active Directory principal id. PrincipalID *string `json:"principalId,omitempty" azure:"ro"` }
UserIdentity - Azure Active Directory identity configuration for a resource.
type VirtualCluster ¶
type VirtualCluster struct { // REQUIRED; Resource location. Location *string `json:"location,omitempty"` // Resource properties. Properties *VirtualClusterProperties `json:"properties,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
VirtualCluster - An Azure SQL virtual cluster.
func (VirtualCluster) MarshalJSON ¶
func (v VirtualCluster) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualCluster.
type VirtualClusterListResult ¶
type VirtualClusterListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*VirtualCluster `json:"value,omitempty" azure:"ro"` }
VirtualClusterListResult - A list of virtual clusters.
func (VirtualClusterListResult) MarshalJSON ¶
func (v VirtualClusterListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualClusterListResult.
type VirtualClusterProperties ¶
type VirtualClusterProperties struct { // If the service has different generations of hardware, for the same SKU, then that can be captured here. Family *string `json:"family,omitempty"` // Specifies maintenance configuration id to apply to this virtual cluster. MaintenanceConfigurationID *string `json:"maintenanceConfigurationId,omitempty"` // READ-ONLY; List of resources in this virtual cluster. ChildResources []*string `json:"childResources,omitempty" azure:"ro"` // READ-ONLY; Subnet resource ID for the virtual cluster. SubnetID *string `json:"subnetId,omitempty" azure:"ro"` }
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.
type VirtualClusterUpdate ¶
type VirtualClusterUpdate struct { // Resource properties. Properties *VirtualClusterProperties `json:"properties,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` }
VirtualClusterUpdate - An update request for an Azure SQL Database virtual cluster.
func (VirtualClusterUpdate) MarshalJSON ¶
func (v VirtualClusterUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualClusterUpdate.
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) (*armruntime.Poller[VirtualClustersClientDeleteResponse], error)
BeginDelete - Deletes a virtual cluster. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualClusterDelete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewVirtualClustersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<virtual-cluster-name>", &armsql.VirtualClustersClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
Output:
func (*VirtualClustersClient) BeginUpdate ¶
func (client *VirtualClustersClient) BeginUpdate(ctx context.Context, resourceGroupName string, virtualClusterName string, parameters VirtualClusterUpdate, options *VirtualClustersClientBeginUpdateOptions) (*armruntime.Poller[VirtualClustersClientUpdateResponse], error)
BeginUpdate - Updates a virtual cluster. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualClusterUpdate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewVirtualClustersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginUpdate(ctx, "<resource-group-name>", "<virtual-cluster-name>", armsql.VirtualClusterUpdate{ Properties: &armsql.VirtualClusterProperties{ MaintenanceConfigurationID: to.Ptr("<maintenance-configuration-id>"), }, }, &armsql.VirtualClustersClientBeginUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
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. resourceGroupName - 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualClusterGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewVirtualClustersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<virtual-cluster-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*VirtualClustersClient) List ¶
func (client *VirtualClustersClient) List(options *VirtualClustersClientListOptions) *runtime.Pager[VirtualClustersClientListResponse]
List - Gets a list of all virtualClusters in the subscription. If the operation fails it returns an *azcore.ResponseError type. options - VirtualClustersClientListOptions contains the optional parameters for the VirtualClustersClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualClusterList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewVirtualClustersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.List(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*VirtualClustersClient) ListByResourceGroup ¶
func (client *VirtualClustersClient) ListByResourceGroup(resourceGroupName string, options *VirtualClustersClientListByResourceGroupOptions) *runtime.Pager[VirtualClustersClientListByResourceGroupResponse]
ListByResourceGroup - Gets a list of virtual clusters in a resource group. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - 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.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualClusterListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewVirtualClustersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByResourceGroup("<resource-group-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*VirtualClustersClient) UpdateDNSServers ¶
func (client *VirtualClustersClient) UpdateDNSServers(ctx context.Context, resourceGroupName string, virtualClusterName string, options *VirtualClustersClientUpdateDNSServersOptions) (VirtualClustersClientUpdateDNSServersResponse, error)
UpdateDNSServers - Synchronizes the DNS server settings used by the managed instances inside the given virtual cluster. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. virtualClusterName - The name of the virtual cluster. options - VirtualClustersClientUpdateDNSServersOptions contains the optional parameters for the VirtualClustersClient.UpdateDNSServers method.
type VirtualClustersClientBeginDeleteOptions ¶ added in v0.3.0
type VirtualClustersClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualClustersClientBeginDeleteOptions contains the optional parameters for the VirtualClustersClient.BeginDelete method.
type VirtualClustersClientBeginUpdateOptions ¶ added in v0.3.0
type VirtualClustersClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualClustersClientBeginUpdateOptions contains the optional parameters for the VirtualClustersClient.BeginUpdate method.
type VirtualClustersClientDeleteResponse ¶ added in v0.3.0
type VirtualClustersClientDeleteResponse struct { }
VirtualClustersClientDeleteResponse contains the response from method VirtualClustersClient.Delete.
type VirtualClustersClientGetOptions ¶ added in v0.3.0
type VirtualClustersClientGetOptions struct { }
VirtualClustersClientGetOptions contains the optional parameters for the VirtualClustersClient.Get method.
type VirtualClustersClientGetResponse ¶ added in v0.3.0
type VirtualClustersClientGetResponse struct {
VirtualCluster
}
VirtualClustersClientGetResponse contains the response from method VirtualClustersClient.Get.
type VirtualClustersClientListByResourceGroupOptions ¶ added in v0.3.0
type VirtualClustersClientListByResourceGroupOptions struct { }
VirtualClustersClientListByResourceGroupOptions contains the optional parameters for the VirtualClustersClient.ListByResourceGroup method.
type VirtualClustersClientListByResourceGroupResponse ¶ added in v0.3.0
type VirtualClustersClientListByResourceGroupResponse struct {
VirtualClusterListResult
}
VirtualClustersClientListByResourceGroupResponse contains the response from method VirtualClustersClient.ListByResourceGroup.
type VirtualClustersClientListOptions ¶ added in v0.3.0
type VirtualClustersClientListOptions struct { }
VirtualClustersClientListOptions contains the optional parameters for the VirtualClustersClient.List method.
type VirtualClustersClientListResponse ¶ added in v0.3.0
type VirtualClustersClientListResponse struct {
VirtualClusterListResult
}
VirtualClustersClientListResponse contains the response from method VirtualClustersClient.List.
type VirtualClustersClientUpdateDNSServersOptions ¶ added in v0.3.0
type VirtualClustersClientUpdateDNSServersOptions struct { }
VirtualClustersClientUpdateDNSServersOptions contains the optional parameters for the VirtualClustersClient.UpdateDNSServers method.
type VirtualClustersClientUpdateDNSServersResponse ¶ added in v0.3.0
type VirtualClustersClientUpdateDNSServersResponse struct {
UpdateManagedInstanceDNSServersOperation
}
VirtualClustersClientUpdateDNSServersResponse contains the response from method VirtualClustersClient.UpdateDNSServers.
type VirtualClustersClientUpdateResponse ¶ added in v0.3.0
type VirtualClustersClientUpdateResponse struct {
VirtualCluster
}
VirtualClustersClientUpdateResponse contains the response from method VirtualClustersClient.Update.
type VirtualNetworkRule ¶
type VirtualNetworkRule struct { // Resource properties. Properties *VirtualNetworkRuleProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
VirtualNetworkRule - A virtual network rule.
type VirtualNetworkRuleListResult ¶
type VirtualNetworkRuleListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*VirtualNetworkRule `json:"value,omitempty" azure:"ro"` }
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.
type VirtualNetworkRuleProperties ¶
type VirtualNetworkRuleProperties struct { // REQUIRED; The ARM resource id of the virtual network subnet. VirtualNetworkSubnetID *string `json:"virtualNetworkSubnetId,omitempty"` // Create firewall rule before the virtual network has vnet service endpoint enabled. IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty"` // READ-ONLY; Virtual Network Rule State State *VirtualNetworkRuleState `json:"state,omitempty" azure:"ro"` }
VirtualNetworkRuleProperties - Properties of a virtual network rule.
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) (*armruntime.Poller[VirtualNetworkRulesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates an existing virtual network rule. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualNetworkRulesCreateOrUpdate.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewVirtualNetworkRulesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<virtual-network-rule-name>", armsql.VirtualNetworkRule{ Properties: &armsql.VirtualNetworkRuleProperties{ IgnoreMissingVnetServiceEndpoint: to.Ptr(false), VirtualNetworkSubnetID: to.Ptr("<virtual-network-subnet-id>"), }, }, &armsql.VirtualNetworkRulesClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*VirtualNetworkRulesClient) BeginDelete ¶
func (client *VirtualNetworkRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, options *VirtualNetworkRulesClientBeginDeleteOptions) (*armruntime.Poller[VirtualNetworkRulesClientDeleteResponse], error)
BeginDelete - Deletes the virtual network rule with the given name. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualNetworkRulesDelete.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewVirtualNetworkRulesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<server-name>", "<virtual-network-rule-name>", &armsql.VirtualNetworkRulesClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
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. resourceGroupName - The name of the resource group 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualNetworkRulesGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewVirtualNetworkRulesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<virtual-network-rule-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*VirtualNetworkRulesClient) ListByServer ¶
func (client *VirtualNetworkRulesClient) ListByServer(resourceGroupName string, serverName string, options *VirtualNetworkRulesClientListByServerOptions) *runtime.Pager[VirtualNetworkRulesClientListByServerResponse]
ListByServer - Gets a list of virtual network rules in a server. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group 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.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/VirtualNetworkRulesList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewVirtualNetworkRulesClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByServer("<resource-group-name>", "<server-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type VirtualNetworkRulesClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type VirtualNetworkRulesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualNetworkRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkRulesClient.BeginCreateOrUpdate method.
type VirtualNetworkRulesClientBeginDeleteOptions ¶ added in v0.3.0
type VirtualNetworkRulesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualNetworkRulesClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkRulesClient.BeginDelete method.
type VirtualNetworkRulesClientCreateOrUpdateResponse ¶ added in v0.3.0
type VirtualNetworkRulesClientCreateOrUpdateResponse struct {
VirtualNetworkRule
}
VirtualNetworkRulesClientCreateOrUpdateResponse contains the response from method VirtualNetworkRulesClient.CreateOrUpdate.
type VirtualNetworkRulesClientDeleteResponse ¶ added in v0.3.0
type VirtualNetworkRulesClientDeleteResponse struct { }
VirtualNetworkRulesClientDeleteResponse contains the response from method VirtualNetworkRulesClient.Delete.
type VirtualNetworkRulesClientGetOptions ¶ added in v0.3.0
type VirtualNetworkRulesClientGetOptions struct { }
VirtualNetworkRulesClientGetOptions contains the optional parameters for the VirtualNetworkRulesClient.Get method.
type VirtualNetworkRulesClientGetResponse ¶ added in v0.3.0
type VirtualNetworkRulesClientGetResponse struct {
VirtualNetworkRule
}
VirtualNetworkRulesClientGetResponse contains the response from method VirtualNetworkRulesClient.Get.
type VirtualNetworkRulesClientListByServerOptions ¶ added in v0.3.0
type VirtualNetworkRulesClientListByServerOptions struct { }
VirtualNetworkRulesClientListByServerOptions contains the optional parameters for the VirtualNetworkRulesClient.ListByServer method.
type VirtualNetworkRulesClientListByServerResponse ¶ added in v0.3.0
type VirtualNetworkRulesClientListByServerResponse struct {
VirtualNetworkRuleListResult
}
VirtualNetworkRulesClientListByServerResponse contains the response from method VirtualNetworkRulesClient.ListByServer.
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 ( VulnerabilityAssessmentPolicyBaselineNameMaster VulnerabilityAssessmentPolicyBaselineName = "master" VulnerabilityAssessmentPolicyBaselineNameDefault VulnerabilityAssessmentPolicyBaselineName = "default" )
func PossibleVulnerabilityAssessmentPolicyBaselineNameValues ¶
func PossibleVulnerabilityAssessmentPolicyBaselineNameValues() []VulnerabilityAssessmentPolicyBaselineName
PossibleVulnerabilityAssessmentPolicyBaselineNameValues returns the possible values for the VulnerabilityAssessmentPolicyBaselineName const type.
type VulnerabilityAssessmentRecurringScansProperties ¶
type VulnerabilityAssessmentRecurringScansProperties struct { // Specifies that the schedule scan notification will be is sent to the subscription administrators. EmailSubscriptionAdmins *bool `json:"emailSubscriptionAdmins,omitempty"` // Specifies an array of e-mail addresses to which the scan notification is sent. Emails []*string `json:"emails,omitempty"` // Recurring scans state. IsEnabled *bool `json:"isEnabled,omitempty"` }
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.
type VulnerabilityAssessmentScanError ¶
type VulnerabilityAssessmentScanError struct { // READ-ONLY; The error code. Code *string `json:"code,omitempty" azure:"ro"` // READ-ONLY; The error message. Message *string `json:"message,omitempty" azure:"ro"` }
VulnerabilityAssessmentScanError - Properties of a vulnerability assessment scan error.
type VulnerabilityAssessmentScanRecord ¶
type VulnerabilityAssessmentScanRecord struct { // Resource properties. Properties *VulnerabilityAssessmentScanRecordProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
VulnerabilityAssessmentScanRecord - A vulnerability assessment scan record.
type VulnerabilityAssessmentScanRecordListResult ¶
type VulnerabilityAssessmentScanRecordListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*VulnerabilityAssessmentScanRecord `json:"value,omitempty" azure:"ro"` }
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.
type VulnerabilityAssessmentScanRecordProperties ¶
type VulnerabilityAssessmentScanRecordProperties struct { // READ-ONLY; The scan end time (UTC). EndTime *time.Time `json:"endTime,omitempty" azure:"ro"` // READ-ONLY; The scan errors. Errors []*VulnerabilityAssessmentScanError `json:"errors,omitempty" azure:"ro"` // READ-ONLY; The number of failed security checks. NumberOfFailedSecurityChecks *int32 `json:"numberOfFailedSecurityChecks,omitempty" azure:"ro"` // READ-ONLY; The scan ID. ScanID *string `json:"scanId,omitempty" azure:"ro"` // READ-ONLY; The scan start time (UTC). StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` // READ-ONLY; The scan status. State *VulnerabilityAssessmentScanState `json:"state,omitempty" azure:"ro"` // READ-ONLY; The scan results storage container path. StorageContainerPath *string `json:"storageContainerPath,omitempty" azure:"ro"` // READ-ONLY; The scan trigger type. TriggerType *VulnerabilityAssessmentScanTriggerType `json:"triggerType,omitempty" azure:"ro"` }
VulnerabilityAssessmentScanRecordProperties - Properties of a vulnerability assessment scan record.
func (VulnerabilityAssessmentScanRecordProperties) MarshalJSON ¶
func (v VulnerabilityAssessmentScanRecordProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VulnerabilityAssessmentScanRecordProperties.
func (*VulnerabilityAssessmentScanRecordProperties) UnmarshalJSON ¶
func (v *VulnerabilityAssessmentScanRecordProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VulnerabilityAssessmentScanRecordProperties.
type VulnerabilityAssessmentScanState ¶
type VulnerabilityAssessmentScanState string
VulnerabilityAssessmentScanState - The scan status.
const ( VulnerabilityAssessmentScanStateFailed VulnerabilityAssessmentScanState = "Failed" VulnerabilityAssessmentScanStateFailedToRun VulnerabilityAssessmentScanState = "FailedToRun" VulnerabilityAssessmentScanStateInProgress VulnerabilityAssessmentScanState = "InProgress" VulnerabilityAssessmentScanStatePassed VulnerabilityAssessmentScanState = "Passed" )
func PossibleVulnerabilityAssessmentScanStateValues ¶
func PossibleVulnerabilityAssessmentScanStateValues() []VulnerabilityAssessmentScanState
PossibleVulnerabilityAssessmentScanStateValues returns the possible values for the VulnerabilityAssessmentScanState const type.
type VulnerabilityAssessmentScanTriggerType ¶
type VulnerabilityAssessmentScanTriggerType string
VulnerabilityAssessmentScanTriggerType - The scan trigger type.
const ( VulnerabilityAssessmentScanTriggerTypeOnDemand VulnerabilityAssessmentScanTriggerType = "OnDemand" VulnerabilityAssessmentScanTriggerTypeRecurring VulnerabilityAssessmentScanTriggerType = "Recurring" )
func PossibleVulnerabilityAssessmentScanTriggerTypeValues ¶
func PossibleVulnerabilityAssessmentScanTriggerTypeValues() []VulnerabilityAssessmentScanTriggerType
PossibleVulnerabilityAssessmentScanTriggerTypeValues returns the possible values for the VulnerabilityAssessmentScanTriggerType const type.
type WorkloadClassifier ¶
type WorkloadClassifier struct { // Resource properties. Properties *WorkloadClassifierProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
WorkloadClassifier - Workload classifier operations for a data warehouse
type WorkloadClassifierListResult ¶
type WorkloadClassifierListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*WorkloadClassifier `json:"value,omitempty" azure:"ro"` }
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.
type WorkloadClassifierProperties ¶
type WorkloadClassifierProperties struct { // REQUIRED; The workload classifier member name. MemberName *string `json:"memberName,omitempty"` // The workload classifier context. Context *string `json:"context,omitempty"` // The workload classifier end time for classification. EndTime *string `json:"endTime,omitempty"` // The workload classifier importance. Importance *string `json:"importance,omitempty"` // The workload classifier label. Label *string `json:"label,omitempty"` // The workload classifier start time for classification. StartTime *string `json:"startTime,omitempty"` }
WorkloadClassifierProperties - Workload classifier definition. For more information look at sys.workloadmanagementworkload_classifiers (DMV).
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) (*armruntime.Poller[WorkloadClassifiersClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a workload classifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateWorkloadClassifierMax.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewWorkloadClassifiersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<workload-group-name>", "<workload-classifier-name>", armsql.WorkloadClassifier{ Properties: &armsql.WorkloadClassifierProperties{ Context: to.Ptr("<context>"), EndTime: to.Ptr("<end-time>"), Importance: to.Ptr("<importance>"), Label: to.Ptr("<label>"), MemberName: to.Ptr("<member-name>"), StartTime: to.Ptr("<start-time>"), }, }, &armsql.WorkloadClassifiersClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*WorkloadClassifiersClient) BeginDelete ¶
func (client *WorkloadClassifiersClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, workloadClassifierName string, options *WorkloadClassifiersClientBeginDeleteOptions) (*armruntime.Poller[WorkloadClassifiersClientDeleteResponse], error)
BeginDelete - Deletes a workload classifier. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteWorkloadClassifier.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewWorkloadClassifiersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<workload-group-name>", "<workload-classifier-name>", &armsql.WorkloadClassifiersClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetWorkloadClassifier.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewWorkloadClassifiersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<workload-group-name>", "<workload-classifier-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*WorkloadClassifiersClient) ListByWorkloadGroup ¶
func (client *WorkloadClassifiersClient) ListByWorkloadGroup(resourceGroupName string, serverName string, databaseName string, workloadGroupName string, options *WorkloadClassifiersClientListByWorkloadGroupOptions) *runtime.Pager[WorkloadClassifiersClientListByWorkloadGroupResponse]
ListByWorkloadGroup - Gets the list of workload classifiers for a workload group If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListByWorkloadGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetWorkloadClassifierList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewWorkloadClassifiersClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByWorkloadGroup("<resource-group-name>", "<server-name>", "<database-name>", "<workload-group-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type WorkloadClassifiersClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type WorkloadClassifiersClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
WorkloadClassifiersClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkloadClassifiersClient.BeginCreateOrUpdate method.
type WorkloadClassifiersClientBeginDeleteOptions ¶ added in v0.3.0
type WorkloadClassifiersClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
WorkloadClassifiersClientBeginDeleteOptions contains the optional parameters for the WorkloadClassifiersClient.BeginDelete method.
type WorkloadClassifiersClientCreateOrUpdateResponse ¶ added in v0.3.0
type WorkloadClassifiersClientCreateOrUpdateResponse struct {
WorkloadClassifier
}
WorkloadClassifiersClientCreateOrUpdateResponse contains the response from method WorkloadClassifiersClient.CreateOrUpdate.
type WorkloadClassifiersClientDeleteResponse ¶ added in v0.3.0
type WorkloadClassifiersClientDeleteResponse struct { }
WorkloadClassifiersClientDeleteResponse contains the response from method WorkloadClassifiersClient.Delete.
type WorkloadClassifiersClientGetOptions ¶ added in v0.3.0
type WorkloadClassifiersClientGetOptions struct { }
WorkloadClassifiersClientGetOptions contains the optional parameters for the WorkloadClassifiersClient.Get method.
type WorkloadClassifiersClientGetResponse ¶ added in v0.3.0
type WorkloadClassifiersClientGetResponse struct {
WorkloadClassifier
}
WorkloadClassifiersClientGetResponse contains the response from method WorkloadClassifiersClient.Get.
type WorkloadClassifiersClientListByWorkloadGroupOptions ¶ added in v0.3.0
type WorkloadClassifiersClientListByWorkloadGroupOptions struct { }
WorkloadClassifiersClientListByWorkloadGroupOptions contains the optional parameters for the WorkloadClassifiersClient.ListByWorkloadGroup method.
type WorkloadClassifiersClientListByWorkloadGroupResponse ¶ added in v0.3.0
type WorkloadClassifiersClientListByWorkloadGroupResponse struct {
WorkloadClassifierListResult
}
WorkloadClassifiersClientListByWorkloadGroupResponse contains the response from method WorkloadClassifiersClient.ListByWorkloadGroup.
type WorkloadGroup ¶
type WorkloadGroup struct { // Resource properties. Properties *WorkloadGroupProperties `json:"properties,omitempty"` // READ-ONLY; Resource ID. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource name. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Resource type. Type *string `json:"type,omitempty" azure:"ro"` }
WorkloadGroup - Workload group operations for a data warehouse
type WorkloadGroupListResult ¶
type WorkloadGroupListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` // READ-ONLY; Array of results. Value []*WorkloadGroup `json:"value,omitempty" azure:"ro"` }
WorkloadGroupListResult - A list of workload groups.
func (WorkloadGroupListResult) MarshalJSON ¶
func (w WorkloadGroupListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type WorkloadGroupListResult.
type WorkloadGroupProperties ¶
type WorkloadGroupProperties struct { // REQUIRED; The workload group cap percentage resource. MaxResourcePercent *int32 `json:"maxResourcePercent,omitempty"` // REQUIRED; The workload group minimum percentage resource. MinResourcePercent *int32 `json:"minResourcePercent,omitempty"` // REQUIRED; The workload group request minimum grant percentage. MinResourcePercentPerRequest *float64 `json:"minResourcePercentPerRequest,omitempty"` // The workload group importance level. Importance *string `json:"importance,omitempty"` // The workload group request maximum grant percentage. MaxResourcePercentPerRequest *float64 `json:"maxResourcePercentPerRequest,omitempty"` // The workload group query execution timeout. QueryExecutionTimeout *int32 `json:"queryExecutionTimeout,omitempty"` }
WorkloadGroupProperties - Workload group definition. For more information look at sys.workloadmanagementworkload_groups (DMV).
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) (*armruntime.Poller[WorkloadGroupsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a workload group. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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 ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/CreateOrUpdateWorkloadGroupMax.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewWorkloadGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginCreateOrUpdate(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<workload-group-name>", armsql.WorkloadGroup{ Properties: &armsql.WorkloadGroupProperties{ Importance: to.Ptr("<importance>"), 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), }, }, &armsql.WorkloadGroupsClientBeginCreateOrUpdateOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } res, err := poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } // TODO: use response item _ = res }
Output:
func (*WorkloadGroupsClient) BeginDelete ¶
func (client *WorkloadGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverName string, databaseName string, workloadGroupName string, options *WorkloadGroupsClientBeginDeleteOptions) (*armruntime.Poller[WorkloadGroupsClientDeleteResponse], error)
BeginDelete - Deletes a workload group. If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/DeleteWorkloadGroup.json
package main import ( "context" "log" "time" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewWorkloadGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } poller, err := client.BeginDelete(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<workload-group-name>", &armsql.WorkloadGroupsClientBeginDeleteOptions{ResumeToken: ""}) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } _, err = poller.PollUntilDone(ctx, 30*time.Second) if err != nil { log.Fatalf("failed to pull the result: %v", err) return } }
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. resourceGroupName - The name of the resource group that contains the resource. You can 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/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetWorkloadGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewWorkloadGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } res, err := client.Get(ctx, "<resource-group-name>", "<server-name>", "<database-name>", "<workload-group-name>", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) return } // TODO: use response item _ = res }
Output:
func (*WorkloadGroupsClient) ListByDatabase ¶
func (client *WorkloadGroupsClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, options *WorkloadGroupsClientListByDatabaseOptions) *runtime.Pager[WorkloadGroupsClientListByDatabaseResponse]
ListByDatabase - Gets the list of workload groups If the operation fails it returns an *azcore.ResponseError type. resourceGroupName - The name of the resource group that contains the resource. You can 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.ListByDatabase method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/examples/GetWorkloadGroupList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/sql/armsql" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) return } ctx := context.Background() client, err := armsql.NewWorkloadGroupsClient("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) return } pager := client.ListByDatabase("<resource-group-name>", "<server-name>", "<database-name>", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) return } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type WorkloadGroupsClientBeginCreateOrUpdateOptions ¶ added in v0.3.0
type WorkloadGroupsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
WorkloadGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkloadGroupsClient.BeginCreateOrUpdate method.
type WorkloadGroupsClientBeginDeleteOptions ¶ added in v0.3.0
type WorkloadGroupsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
WorkloadGroupsClientBeginDeleteOptions contains the optional parameters for the WorkloadGroupsClient.BeginDelete method.
type WorkloadGroupsClientCreateOrUpdateResponse ¶ added in v0.3.0
type WorkloadGroupsClientCreateOrUpdateResponse struct {
WorkloadGroup
}
WorkloadGroupsClientCreateOrUpdateResponse contains the response from method WorkloadGroupsClient.CreateOrUpdate.
type WorkloadGroupsClientDeleteResponse ¶ added in v0.3.0
type WorkloadGroupsClientDeleteResponse struct { }
WorkloadGroupsClientDeleteResponse contains the response from method WorkloadGroupsClient.Delete.
type WorkloadGroupsClientGetOptions ¶ added in v0.3.0
type WorkloadGroupsClientGetOptions struct { }
WorkloadGroupsClientGetOptions contains the optional parameters for the WorkloadGroupsClient.Get method.
type WorkloadGroupsClientGetResponse ¶ added in v0.3.0
type WorkloadGroupsClientGetResponse struct {
WorkloadGroup
}
WorkloadGroupsClientGetResponse contains the response from method WorkloadGroupsClient.Get.
type WorkloadGroupsClientListByDatabaseOptions ¶ added in v0.3.0
type WorkloadGroupsClientListByDatabaseOptions struct { }
WorkloadGroupsClientListByDatabaseOptions contains the optional parameters for the WorkloadGroupsClient.ListByDatabase method.
type WorkloadGroupsClientListByDatabaseResponse ¶ added in v0.3.0
type WorkloadGroupsClientListByDatabaseResponse struct {
WorkloadGroupListResult
}
WorkloadGroupsClientListByDatabaseResponse contains the response from method WorkloadGroupsClient.ListByDatabase.
Source Files
¶
- build.go
- zz_generated_agent_client.go
- zz_generated_backupshorttermretentionpolicies_client.go
- zz_generated_capabilities_client.go
- zz_generated_constants.go
- zz_generated_databaseadvisors_client.go
- zz_generated_databaseautomatictuning_client.go
- zz_generated_databaseblobauditingpolicies_client.go
- zz_generated_databasecolumns_client.go
- zz_generated_databaseextensions_client.go
- zz_generated_databaseoperations_client.go
- zz_generated_databaserecommendedactions_client.go
- zz_generated_databases_client.go
- zz_generated_databaseschemas_client.go
- zz_generated_databasesecurityalertpolicies_client.go
- zz_generated_databasetables_client.go
- zz_generated_databaseusages_client.go
- zz_generated_databasevulnerabilityassessmentrulebaselines_client.go
- zz_generated_databasevulnerabilityassessments_client.go
- zz_generated_databasevulnerabilityassessmentscans_client.go
- zz_generated_datamaskingpolicies_client.go
- zz_generated_datamaskingrules_client.go
- zz_generated_datawarehouseuseractivities_client.go
- zz_generated_deletedservers_client.go
- zz_generated_distributedavailabilitygroups_client.go
- zz_generated_elasticpoolactivities_client.go
- zz_generated_elasticpooldatabaseactivities_client.go
- zz_generated_elasticpooloperations_client.go
- zz_generated_elasticpools_client.go
- zz_generated_encryptionprotectors_client.go
- zz_generated_endpointcertificates_client.go
- zz_generated_extendeddatabaseblobauditingpolicies_client.go
- zz_generated_extendedserverblobauditingpolicies_client.go
- zz_generated_failovergroups_client.go
- zz_generated_firewallrules_client.go
- zz_generated_geobackuppolicies_client.go
- zz_generated_instancefailovergroups_client.go
- zz_generated_instancepools_client.go
- zz_generated_ipv6firewallrules_client.go
- zz_generated_jobagents_client.go
- zz_generated_jobcredentials_client.go
- zz_generated_jobexecutions_client.go
- zz_generated_jobs_client.go
- zz_generated_jobstepexecutions_client.go
- zz_generated_jobsteps_client.go
- zz_generated_jobtargetexecutions_client.go
- zz_generated_jobtargetgroups_client.go
- zz_generated_jobversions_client.go
- zz_generated_ledgerdigestuploads_client.go
- zz_generated_longtermretentionbackups_client.go
- zz_generated_longtermretentionmanagedinstancebackups_client.go
- zz_generated_longtermretentionpolicies_client.go
- zz_generated_maintenancewindowoptions_client.go
- zz_generated_maintenancewindows_client.go
- zz_generated_managedbackupshorttermretentionpolicies_client.go
- zz_generated_manageddatabasecolumns_client.go
- zz_generated_manageddatabasequeries_client.go
- zz_generated_manageddatabaserecommendedsensitivitylabels_client.go
- zz_generated_manageddatabaserestoredetails_client.go
- zz_generated_manageddatabases_client.go
- zz_generated_manageddatabaseschemas_client.go
- zz_generated_manageddatabasesecurityalertpolicies_client.go
- zz_generated_manageddatabasesecurityevents_client.go
- zz_generated_manageddatabasesensitivitylabels_client.go
- zz_generated_manageddatabasetables_client.go
- zz_generated_manageddatabasetransparentdataencryption_client.go
- zz_generated_manageddatabasevulnerabilityassessmentrulebaselines_client.go
- zz_generated_manageddatabasevulnerabilityassessments_client.go
- zz_generated_manageddatabasevulnerabilityassessmentscans_client.go
- zz_generated_managedinstanceadministrators_client.go
- zz_generated_managedinstanceazureadonlyauthentications_client.go
- zz_generated_managedinstanceencryptionprotectors_client.go
- zz_generated_managedinstancekeys_client.go
- zz_generated_managedinstancelongtermretentionpolicies_client.go
- zz_generated_managedinstanceoperations_client.go
- zz_generated_managedinstanceprivateendpointconnections_client.go
- zz_generated_managedinstanceprivatelinkresources_client.go
- zz_generated_managedinstances_client.go
- zz_generated_managedinstancetdecertificates_client.go
- zz_generated_managedinstancevulnerabilityassessments_client.go
- zz_generated_managedrestorabledroppeddatabasebackupshorttermretentionpolicies_client.go
- zz_generated_managedserverdnsaliases_client.go
- zz_generated_managedserversecurityalertpolicies_client.go
- zz_generated_models.go
- zz_generated_models_serde.go
- zz_generated_operations_client.go
- zz_generated_outboundfirewallrules_client.go
- zz_generated_privateendpointconnections_client.go
- zz_generated_privatelinkresources_client.go
- zz_generated_recommendedsensitivitylabels_client.go
- zz_generated_recoverabledatabases_client.go
- zz_generated_recoverablemanageddatabases_client.go
- zz_generated_replicationlinks_client.go
- zz_generated_response_types.go
- zz_generated_restorabledroppeddatabases_client.go
- zz_generated_restorabledroppedmanageddatabases_client.go
- zz_generated_restorepoints_client.go
- zz_generated_sensitivitylabels_client.go
- zz_generated_serveradvisors_client.go
- zz_generated_serverautomatictuning_client.go
- zz_generated_serverazureadadministrators_client.go
- zz_generated_serverazureadonlyauthentications_client.go
- zz_generated_serverblobauditingpolicies_client.go
- zz_generated_servercommunicationlinks_client.go
- zz_generated_serverconnectionpolicies_client.go
- zz_generated_serverdevopsauditsettings_client.go
- zz_generated_serverdnsaliases_client.go
- zz_generated_serverkeys_client.go
- zz_generated_serveroperations_client.go
- zz_generated_servers_client.go
- zz_generated_serversecurityalertpolicies_client.go
- zz_generated_servertrustcertificates_client.go
- zz_generated_servertrustgroups_client.go
- zz_generated_serverusages_client.go
- zz_generated_servervulnerabilityassessments_client.go
- zz_generated_serviceobjectives_client.go
- zz_generated_subscriptionusages_client.go
- zz_generated_syncagents_client.go
- zz_generated_syncgroups_client.go
- zz_generated_syncmembers_client.go
- zz_generated_tdecertificates_client.go
- zz_generated_time_rfc3339.go
- zz_generated_timezones_client.go
- zz_generated_transparentdataencryptions_client.go
- zz_generated_usages_client.go
- zz_generated_virtualclusters_client.go
- zz_generated_virtualnetworkrules_client.go
- zz_generated_workloadclassifiers_client.go
- zz_generated_workloadgroups_client.go