Documentation ¶
Index ¶
- type AccountProvisioningMode
- type ActiveDirectoryConnectorDNSDetails
- type ActiveDirectoryConnectorDomainDetails
- type ActiveDirectoryConnectorListResult
- type ActiveDirectoryConnectorProperties
- type ActiveDirectoryConnectorResource
- type ActiveDirectoryConnectorSpec
- type ActiveDirectoryConnectorStatus
- type ActiveDirectoryConnectorsClient
- func (client *ActiveDirectoryConnectorsClient) BeginCreate(ctx context.Context, resourceGroupName string, dataControllerName string, ...) (*runtime.Poller[ActiveDirectoryConnectorsClientCreateResponse], error)
- func (client *ActiveDirectoryConnectorsClient) BeginDelete(ctx context.Context, resourceGroupName string, dataControllerName string, ...) (*runtime.Poller[ActiveDirectoryConnectorsClientDeleteResponse], error)
- func (client *ActiveDirectoryConnectorsClient) Get(ctx context.Context, resourceGroupName string, dataControllerName string, ...) (ActiveDirectoryConnectorsClientGetResponse, error)
- func (client *ActiveDirectoryConnectorsClient) NewListPager(resourceGroupName string, dataControllerName string, ...) *runtime.Pager[ActiveDirectoryConnectorsClientListResponse]
- type ActiveDirectoryConnectorsClientBeginCreateOptions
- type ActiveDirectoryConnectorsClientBeginDeleteOptions
- type ActiveDirectoryConnectorsClientCreateResponse
- type ActiveDirectoryConnectorsClientDeleteResponse
- type ActiveDirectoryConnectorsClientGetOptions
- type ActiveDirectoryConnectorsClientGetResponse
- type ActiveDirectoryConnectorsClientListOptions
- type ActiveDirectoryConnectorsClientListResponse
- type ActiveDirectoryDomainController
- type ActiveDirectoryDomainControllers
- type ActiveDirectoryInformation
- type ArcSQLManagedInstanceLicenseType
- type ArcSQLServerLicenseType
- type BasicLoginInformation
- type ClientFactory
- func (c *ClientFactory) NewActiveDirectoryConnectorsClient() *ActiveDirectoryConnectorsClient
- func (c *ClientFactory) NewDataControllersClient() *DataControllersClient
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewPostgresInstancesClient() *PostgresInstancesClient
- func (c *ClientFactory) NewSQLManagedInstancesClient() *SQLManagedInstancesClient
- func (c *ClientFactory) NewSQLServerInstancesClient() *SQLServerInstancesClient
- type CommonSKU
- type ConnectionStatus
- type CreatedByType
- type DataControllerProperties
- type DataControllerResource
- type DataControllerUpdate
- type DataControllersClient
- func (client *DataControllersClient) BeginDeleteDataController(ctx context.Context, resourceGroupName string, dataControllerName string, ...) (*runtime.Poller[DataControllersClientDeleteDataControllerResponse], error)
- func (client *DataControllersClient) BeginPatchDataController(ctx context.Context, resourceGroupName string, dataControllerName string, ...) (*runtime.Poller[DataControllersClientPatchDataControllerResponse], error)
- func (client *DataControllersClient) BeginPutDataController(ctx context.Context, resourceGroupName string, dataControllerName string, ...) (*runtime.Poller[DataControllersClientPutDataControllerResponse], error)
- func (client *DataControllersClient) GetDataController(ctx context.Context, resourceGroupName string, dataControllerName string, ...) (DataControllersClientGetDataControllerResponse, error)
- func (client *DataControllersClient) NewListInGroupPager(resourceGroupName string, options *DataControllersClientListInGroupOptions) *runtime.Pager[DataControllersClientListInGroupResponse]
- func (client *DataControllersClient) NewListInSubscriptionPager(options *DataControllersClientListInSubscriptionOptions) *runtime.Pager[DataControllersClientListInSubscriptionResponse]
- type DataControllersClientBeginDeleteDataControllerOptions
- type DataControllersClientBeginPatchDataControllerOptions
- type DataControllersClientBeginPutDataControllerOptions
- type DataControllersClientDeleteDataControllerResponse
- type DataControllersClientGetDataControllerOptions
- type DataControllersClientGetDataControllerResponse
- type DataControllersClientListInGroupOptions
- type DataControllersClientListInGroupResponse
- type DataControllersClientListInSubscriptionOptions
- type DataControllersClientListInSubscriptionResponse
- type DataControllersClientPatchDataControllerResponse
- type DataControllersClientPutDataControllerResponse
- type DefenderStatus
- type EditionType
- type ErrorResponse
- type ErrorResponseBody
- type ExtendedLocation
- type ExtendedLocationTypes
- type HostType
- type Infrastructure
- type K8SResourceRequirements
- type K8SScheduling
- type K8SSchedulingOptions
- type KeytabInformation
- type LogAnalyticsWorkspaceConfig
- type OnPremiseProperty
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationOrigin
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type PageOfDataControllerResource
- type PostgresInstance
- type PostgresInstanceListResult
- type PostgresInstanceProperties
- type PostgresInstanceSKU
- type PostgresInstanceUpdate
- type PostgresInstancesClient
- func (client *PostgresInstancesClient) BeginCreate(ctx context.Context, resourceGroupName string, postgresInstanceName string, ...) (*runtime.Poller[PostgresInstancesClientCreateResponse], error)
- func (client *PostgresInstancesClient) BeginDelete(ctx context.Context, resourceGroupName string, postgresInstanceName string, ...) (*runtime.Poller[PostgresInstancesClientDeleteResponse], error)
- func (client *PostgresInstancesClient) Get(ctx context.Context, resourceGroupName string, postgresInstanceName string, ...) (PostgresInstancesClientGetResponse, error)
- func (client *PostgresInstancesClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[PostgresInstancesClientListByResourceGroupResponse]
- func (client *PostgresInstancesClient) NewListPager(options *PostgresInstancesClientListOptions) *runtime.Pager[PostgresInstancesClientListResponse]
- func (client *PostgresInstancesClient) Update(ctx context.Context, resourceGroupName string, postgresInstanceName string, ...) (PostgresInstancesClientUpdateResponse, error)
- type PostgresInstancesClientBeginCreateOptions
- type PostgresInstancesClientBeginDeleteOptions
- type PostgresInstancesClientCreateResponse
- type PostgresInstancesClientDeleteResponse
- type PostgresInstancesClientGetOptions
- type PostgresInstancesClientGetResponse
- type PostgresInstancesClientListByResourceGroupOptions
- type PostgresInstancesClientListByResourceGroupResponse
- type PostgresInstancesClientListOptions
- type PostgresInstancesClientListResponse
- type PostgresInstancesClientUpdateOptions
- type PostgresInstancesClientUpdateResponse
- type ProxyResource
- type Resource
- type SQLManagedInstance
- type SQLManagedInstanceK8SRaw
- type SQLManagedInstanceK8SSpec
- type SQLManagedInstanceListResult
- type SQLManagedInstanceProperties
- type SQLManagedInstanceSKU
- type SQLManagedInstanceSKUTier
- type SQLManagedInstanceUpdate
- type SQLManagedInstancesClient
- func (client *SQLManagedInstancesClient) BeginCreate(ctx context.Context, resourceGroupName string, sqlManagedInstanceName string, ...) (*runtime.Poller[SQLManagedInstancesClientCreateResponse], error)
- func (client *SQLManagedInstancesClient) BeginDelete(ctx context.Context, resourceGroupName string, sqlManagedInstanceName string, ...) (*runtime.Poller[SQLManagedInstancesClientDeleteResponse], error)
- func (client *SQLManagedInstancesClient) Get(ctx context.Context, resourceGroupName string, sqlManagedInstanceName string, ...) (SQLManagedInstancesClientGetResponse, error)
- func (client *SQLManagedInstancesClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[SQLManagedInstancesClientListByResourceGroupResponse]
- func (client *SQLManagedInstancesClient) NewListPager(options *SQLManagedInstancesClientListOptions) *runtime.Pager[SQLManagedInstancesClientListResponse]
- func (client *SQLManagedInstancesClient) Update(ctx context.Context, resourceGroupName string, sqlManagedInstanceName string, ...) (SQLManagedInstancesClientUpdateResponse, error)
- type SQLManagedInstancesClientBeginCreateOptions
- type SQLManagedInstancesClientBeginDeleteOptions
- type SQLManagedInstancesClientCreateResponse
- type SQLManagedInstancesClientDeleteResponse
- type SQLManagedInstancesClientGetOptions
- type SQLManagedInstancesClientGetResponse
- type SQLManagedInstancesClientListByResourceGroupOptions
- type SQLManagedInstancesClientListByResourceGroupResponse
- type SQLManagedInstancesClientListOptions
- type SQLManagedInstancesClientListResponse
- type SQLManagedInstancesClientUpdateOptions
- type SQLManagedInstancesClientUpdateResponse
- type SQLServerInstance
- type SQLServerInstanceListResult
- type SQLServerInstanceProperties
- type SQLServerInstanceUpdate
- type SQLServerInstancesClient
- func (client *SQLServerInstancesClient) BeginCreate(ctx context.Context, resourceGroupName string, sqlServerInstanceName string, ...) (*runtime.Poller[SQLServerInstancesClientCreateResponse], error)
- func (client *SQLServerInstancesClient) BeginDelete(ctx context.Context, resourceGroupName string, sqlServerInstanceName string, ...) (*runtime.Poller[SQLServerInstancesClientDeleteResponse], error)
- func (client *SQLServerInstancesClient) Get(ctx context.Context, resourceGroupName string, sqlServerInstanceName string, ...) (SQLServerInstancesClientGetResponse, error)
- func (client *SQLServerInstancesClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[SQLServerInstancesClientListByResourceGroupResponse]
- func (client *SQLServerInstancesClient) NewListPager(options *SQLServerInstancesClientListOptions) *runtime.Pager[SQLServerInstancesClientListResponse]
- func (client *SQLServerInstancesClient) Update(ctx context.Context, resourceGroupName string, sqlServerInstanceName string, ...) (SQLServerInstancesClientUpdateResponse, error)
- type SQLServerInstancesClientBeginCreateOptions
- type SQLServerInstancesClientBeginDeleteOptions
- type SQLServerInstancesClientCreateResponse
- type SQLServerInstancesClientDeleteResponse
- type SQLServerInstancesClientGetOptions
- type SQLServerInstancesClientGetResponse
- type SQLServerInstancesClientListByResourceGroupOptions
- type SQLServerInstancesClientListByResourceGroupResponse
- type SQLServerInstancesClientListOptions
- type SQLServerInstancesClientListResponse
- type SQLServerInstancesClientUpdateOptions
- type SQLServerInstancesClientUpdateResponse
- type SQLVersion
- type SystemData
- type TrackedResource
- type UploadServicePrincipal
- type UploadWatermark
Examples ¶
- ActiveDirectoryConnectorsClient.BeginCreate
- ActiveDirectoryConnectorsClient.BeginDelete
- ActiveDirectoryConnectorsClient.Get
- ActiveDirectoryConnectorsClient.NewListPager
- DataControllersClient.BeginDeleteDataController
- DataControllersClient.BeginPatchDataController
- DataControllersClient.BeginPutDataController
- DataControllersClient.GetDataController
- DataControllersClient.NewListInGroupPager
- DataControllersClient.NewListInSubscriptionPager
- OperationsClient.NewListPager
- PostgresInstancesClient.BeginCreate
- PostgresInstancesClient.BeginDelete
- PostgresInstancesClient.Get
- PostgresInstancesClient.NewListByResourceGroupPager
- PostgresInstancesClient.NewListPager
- PostgresInstancesClient.Update
- SQLManagedInstancesClient.BeginCreate
- SQLManagedInstancesClient.BeginDelete
- SQLManagedInstancesClient.Get
- SQLManagedInstancesClient.NewListByResourceGroupPager
- SQLManagedInstancesClient.NewListPager
- SQLManagedInstancesClient.Update
- SQLServerInstancesClient.BeginCreate
- SQLServerInstancesClient.BeginDelete
- SQLServerInstancesClient.Get
- SQLServerInstancesClient.NewListByResourceGroupPager
- SQLServerInstancesClient.NewListPager
- SQLServerInstancesClient.Update
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountProvisioningMode ¶ added in v0.4.0
type AccountProvisioningMode string
AccountProvisioningMode - The service account provisioning mode for this Active Directory connector.
const ( AccountProvisioningModeAutomatic AccountProvisioningMode = "automatic" AccountProvisioningModeManual AccountProvisioningMode = "manual" )
func PossibleAccountProvisioningModeValues ¶ added in v0.4.0
func PossibleAccountProvisioningModeValues() []AccountProvisioningMode
PossibleAccountProvisioningModeValues returns the possible values for the AccountProvisioningMode const type.
type ActiveDirectoryConnectorDNSDetails ¶ added in v0.3.0
type ActiveDirectoryConnectorDNSDetails struct { // REQUIRED; List of Active Directory DNS server IP addresses. NameserverIPAddresses []*string // DNS domain name for which DNS lookups should be forwarded to the Active Directory DNS servers. DomainName *string // Flag indicating whether to prefer Kubernetes DNS server response over AD DNS server response for IP address lookups. PreferK8SDNSForPtrLookups *bool // Replica count for DNS proxy service. Default value is 1. Replicas *int64 }
ActiveDirectoryConnectorDNSDetails - DNS server details
func (ActiveDirectoryConnectorDNSDetails) MarshalJSON ¶ added in v0.3.0
func (a ActiveDirectoryConnectorDNSDetails) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ActiveDirectoryConnectorDNSDetails.
func (*ActiveDirectoryConnectorDNSDetails) UnmarshalJSON ¶ added in v0.6.0
func (a *ActiveDirectoryConnectorDNSDetails) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ActiveDirectoryConnectorDNSDetails.
type ActiveDirectoryConnectorDomainDetails ¶ added in v0.3.0
type ActiveDirectoryConnectorDomainDetails struct { // REQUIRED; null DomainControllers *ActiveDirectoryDomainControllers // REQUIRED; Name (uppercase) of the Active Directory domain that this AD connector will be associated with. Realm *string // NETBIOS name of the Active Directory domain. NetbiosDomainName *string // The distinguished name of the Active Directory Organizational Unit. OuDistinguishedName *string // The service account provisioning mode for this Active Directory connector. ServiceAccountProvisioning *AccountProvisioningMode }
ActiveDirectoryConnectorDomainDetails - Active Directory domain details
func (ActiveDirectoryConnectorDomainDetails) MarshalJSON ¶ added in v0.6.0
func (a ActiveDirectoryConnectorDomainDetails) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ActiveDirectoryConnectorDomainDetails.
func (*ActiveDirectoryConnectorDomainDetails) UnmarshalJSON ¶ added in v0.6.0
func (a *ActiveDirectoryConnectorDomainDetails) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ActiveDirectoryConnectorDomainDetails.
type ActiveDirectoryConnectorListResult ¶ added in v0.3.0
type ActiveDirectoryConnectorListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*ActiveDirectoryConnectorResource }
ActiveDirectoryConnectorListResult - A list of active directory connectors
func (ActiveDirectoryConnectorListResult) MarshalJSON ¶ added in v0.3.0
func (a ActiveDirectoryConnectorListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ActiveDirectoryConnectorListResult.
func (*ActiveDirectoryConnectorListResult) UnmarshalJSON ¶ added in v0.6.0
func (a *ActiveDirectoryConnectorListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ActiveDirectoryConnectorListResult.
type ActiveDirectoryConnectorProperties ¶ added in v0.3.0
type ActiveDirectoryConnectorProperties struct { // REQUIRED; null Spec *ActiveDirectoryConnectorSpec // Username and password for domain service account authentication. DomainServiceAccountLoginInformation *BasicLoginInformation // null Status *ActiveDirectoryConnectorStatus // READ-ONLY; The provisioning state of the Active Directory connector resource. ProvisioningState *string }
ActiveDirectoryConnectorProperties - The properties of an Active Directory connector resource
func (ActiveDirectoryConnectorProperties) MarshalJSON ¶ added in v0.6.0
func (a ActiveDirectoryConnectorProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ActiveDirectoryConnectorProperties.
func (*ActiveDirectoryConnectorProperties) UnmarshalJSON ¶ added in v0.6.0
func (a *ActiveDirectoryConnectorProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ActiveDirectoryConnectorProperties.
type ActiveDirectoryConnectorResource ¶ added in v0.3.0
type ActiveDirectoryConnectorResource struct { // REQUIRED; null Properties *ActiveDirectoryConnectorProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ActiveDirectoryConnectorResource - Active directory connector resource
func (ActiveDirectoryConnectorResource) MarshalJSON ¶ added in v0.6.0
func (a ActiveDirectoryConnectorResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ActiveDirectoryConnectorResource.
func (*ActiveDirectoryConnectorResource) UnmarshalJSON ¶ added in v0.6.0
func (a *ActiveDirectoryConnectorResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ActiveDirectoryConnectorResource.
type ActiveDirectoryConnectorSpec ¶ added in v0.3.0
type ActiveDirectoryConnectorSpec struct { // REQUIRED; null ActiveDirectory *ActiveDirectoryConnectorDomainDetails // REQUIRED; null DNS *ActiveDirectoryConnectorDNSDetails }
ActiveDirectoryConnectorSpec - The specifications of the AD Kubernetes resource.
func (ActiveDirectoryConnectorSpec) MarshalJSON ¶ added in v0.6.0
func (a ActiveDirectoryConnectorSpec) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ActiveDirectoryConnectorSpec.
func (*ActiveDirectoryConnectorSpec) UnmarshalJSON ¶ added in v0.6.0
func (a *ActiveDirectoryConnectorSpec) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ActiveDirectoryConnectorSpec.
type ActiveDirectoryConnectorStatus ¶ added in v0.3.0
type ActiveDirectoryConnectorStatus struct { // OPTIONAL; Contains additional key/value pairs not defined in the schema. AdditionalProperties map[string]any // The time that the custom resource was last updated. LastUpdateTime *string // The version of the replicaSet associated with the AD connector custom resource. ObservedGeneration *int64 // The state of the AD connector custom resource. State *string }
ActiveDirectoryConnectorStatus - The status of the Kubernetes custom resource.
func (ActiveDirectoryConnectorStatus) MarshalJSON ¶ added in v0.3.0
func (a ActiveDirectoryConnectorStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ActiveDirectoryConnectorStatus.
func (*ActiveDirectoryConnectorStatus) UnmarshalJSON ¶ added in v0.3.0
func (a *ActiveDirectoryConnectorStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ActiveDirectoryConnectorStatus.
type ActiveDirectoryConnectorsClient ¶ added in v0.3.0
type ActiveDirectoryConnectorsClient struct {
// contains filtered or unexported fields
}
ActiveDirectoryConnectorsClient contains the methods for the ActiveDirectoryConnectors group. Don't use this type directly, use NewActiveDirectoryConnectorsClient() instead.
func NewActiveDirectoryConnectorsClient ¶ added in v0.3.0
func NewActiveDirectoryConnectorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ActiveDirectoryConnectorsClient, error)
NewActiveDirectoryConnectorsClient creates a new instance of ActiveDirectoryConnectorsClient with the specified values.
- subscriptionID - The ID of the Azure subscription
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ActiveDirectoryConnectorsClient) BeginCreate ¶ added in v0.3.0
func (client *ActiveDirectoryConnectorsClient) BeginCreate(ctx context.Context, resourceGroupName string, dataControllerName string, activeDirectoryConnectorName string, activeDirectoryConnectorResource ActiveDirectoryConnectorResource, options *ActiveDirectoryConnectorsClientBeginCreateOptions) (*runtime.Poller[ActiveDirectoryConnectorsClientCreateResponse], error)
BeginCreate - Creates or replaces an Active Directory connector resource. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-03-01-preview
- resourceGroupName - The name of the Azure resource group
- dataControllerName - The name of the data controller
- activeDirectoryConnectorName - The name of the Active Directory connector instance
- activeDirectoryConnectorResource - desc
- options - ActiveDirectoryConnectorsClientBeginCreateOptions contains the optional parameters for the ActiveDirectoryConnectorsClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/CreateOrUpdateActiveDirectoryConnector.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/azurearcdata/armazurearcdata" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurearcdata.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewActiveDirectoryConnectorsClient().BeginCreate(ctx, "testrg", "testdataController", "testADConnector", armazurearcdata.ActiveDirectoryConnectorResource{ Properties: &armazurearcdata.ActiveDirectoryConnectorProperties{ Spec: &armazurearcdata.ActiveDirectoryConnectorSpec{ ActiveDirectory: &armazurearcdata.ActiveDirectoryConnectorDomainDetails{ DomainControllers: &armazurearcdata.ActiveDirectoryDomainControllers{ PrimaryDomainController: &armazurearcdata.ActiveDirectoryDomainController{ Hostname: to.Ptr("dc1.contoso.local"), }, SecondaryDomainControllers: []*armazurearcdata.ActiveDirectoryDomainController{ { Hostname: to.Ptr("dc2.contoso.local"), }, { Hostname: to.Ptr("dc3.contoso.local"), }}, }, Realm: to.Ptr("CONTOSO.LOCAL"), ServiceAccountProvisioning: to.Ptr(armazurearcdata.AccountProvisioningModeManual), }, DNS: &armazurearcdata.ActiveDirectoryConnectorDNSDetails{ NameserverIPAddresses: []*string{ to.Ptr("11.11.111.111"), to.Ptr("22.22.222.222")}, PreferK8SDNSForPtrLookups: to.Ptr(false), Replicas: to.Ptr[int64](1), }, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ActiveDirectoryConnectorResource = armazurearcdata.ActiveDirectoryConnectorResource{ // Name: to.Ptr("testADConnector"), // Type: to.Ptr("Microsoft.AzureArcData/dataControllers/activeDirectoryConnectors"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/dataControllers/testdataController/activeDirectoryConnectors/testADConnector"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Properties: &armazurearcdata.ActiveDirectoryConnectorProperties{ // Spec: &armazurearcdata.ActiveDirectoryConnectorSpec{ // ActiveDirectory: &armazurearcdata.ActiveDirectoryConnectorDomainDetails{ // DomainControllers: &armazurearcdata.ActiveDirectoryDomainControllers{ // PrimaryDomainController: &armazurearcdata.ActiveDirectoryDomainController{ // Hostname: to.Ptr("dc1.contoso.local"), // }, // SecondaryDomainControllers: []*armazurearcdata.ActiveDirectoryDomainController{ // { // Hostname: to.Ptr("dc2.contoso.local"), // }, // { // Hostname: to.Ptr("dc3.contoso.local"), // }}, // }, // NetbiosDomainName: to.Ptr("CONTOSO"), // Realm: to.Ptr("CONTOSO.LOCAL"), // ServiceAccountProvisioning: to.Ptr(armazurearcdata.AccountProvisioningModeManual), // }, // DNS: &armazurearcdata.ActiveDirectoryConnectorDNSDetails{ // DomainName: to.Ptr("contoso.local"), // NameserverIPAddresses: []*string{ // to.Ptr("11.11.111.111"), // to.Ptr("22.22.222.222")}, // PreferK8SDNSForPtrLookups: to.Ptr(false), // Replicas: to.Ptr[int64](1), // }, // }, // }, // } }
Output:
func (*ActiveDirectoryConnectorsClient) BeginDelete ¶ added in v0.3.0
func (client *ActiveDirectoryConnectorsClient) BeginDelete(ctx context.Context, resourceGroupName string, dataControllerName string, activeDirectoryConnectorName string, options *ActiveDirectoryConnectorsClientBeginDeleteOptions) (*runtime.Poller[ActiveDirectoryConnectorsClientDeleteResponse], error)
BeginDelete - Deletes an Active Directory connector resource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-03-01-preview
- resourceGroupName - The name of the Azure resource group
- dataControllerName - The name of the data controller
- activeDirectoryConnectorName - The name of the Active Directory connector instance
- options - ActiveDirectoryConnectorsClientBeginDeleteOptions contains the optional parameters for the ActiveDirectoryConnectorsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/DeleteActiveDirectoryConnector.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurearcdata/armazurearcdata" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurearcdata.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewActiveDirectoryConnectorsClient().BeginDelete(ctx, "testrg", "testdataController", "testADConnector", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ActiveDirectoryConnectorsClient) Get ¶ added in v0.3.0
func (client *ActiveDirectoryConnectorsClient) Get(ctx context.Context, resourceGroupName string, dataControllerName string, activeDirectoryConnectorName string, options *ActiveDirectoryConnectorsClientGetOptions) (ActiveDirectoryConnectorsClientGetResponse, error)
Get - Retrieves an Active Directory connector resource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-03-01-preview
- resourceGroupName - The name of the Azure resource group
- dataControllerName - The name of the data controller
- activeDirectoryConnectorName - The name of the Active Directory connector instance
- options - ActiveDirectoryConnectorsClientGetOptions contains the optional parameters for the ActiveDirectoryConnectorsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/GetActiveDirectoryConnector.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurearcdata/armazurearcdata" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurearcdata.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewActiveDirectoryConnectorsClient().Get(ctx, "testrg", "testdataController", "testADConnector", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ActiveDirectoryConnectorResource = armazurearcdata.ActiveDirectoryConnectorResource{ // Name: to.Ptr("testADConnector"), // Type: to.Ptr("Microsoft.AzureArcData/dataControllers/activeDirectoryConnectors"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/dataControllers/testdataController/activeDirectoryConnectors/testADConnector"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Properties: &armazurearcdata.ActiveDirectoryConnectorProperties{ // Spec: &armazurearcdata.ActiveDirectoryConnectorSpec{ // ActiveDirectory: &armazurearcdata.ActiveDirectoryConnectorDomainDetails{ // DomainControllers: &armazurearcdata.ActiveDirectoryDomainControllers{ // PrimaryDomainController: &armazurearcdata.ActiveDirectoryDomainController{ // Hostname: to.Ptr("dc1.contoso.local"), // }, // SecondaryDomainControllers: []*armazurearcdata.ActiveDirectoryDomainController{ // { // Hostname: to.Ptr("dc2.contoso.local"), // }, // { // Hostname: to.Ptr("dc3.contoso.local"), // }}, // }, // NetbiosDomainName: to.Ptr("CONTOSO"), // Realm: to.Ptr("CONTOSO.LOCAL"), // ServiceAccountProvisioning: to.Ptr(armazurearcdata.AccountProvisioningModeManual), // }, // DNS: &armazurearcdata.ActiveDirectoryConnectorDNSDetails{ // DomainName: to.Ptr("contoso.local"), // NameserverIPAddresses: []*string{ // to.Ptr("11.11.111.111"), // to.Ptr("22.22.222.222")}, // PreferK8SDNSForPtrLookups: to.Ptr(false), // Replicas: to.Ptr[int64](1), // }, // }, // }, // } }
Output:
func (*ActiveDirectoryConnectorsClient) NewListPager ¶ added in v0.4.0
func (client *ActiveDirectoryConnectorsClient) NewListPager(resourceGroupName string, dataControllerName string, options *ActiveDirectoryConnectorsClientListOptions) *runtime.Pager[ActiveDirectoryConnectorsClientListResponse]
NewListPager - List the active directory connectors associated with the given data controller.
Generated from API version 2022-03-01-preview
- resourceGroupName - The name of the Azure resource group
- dataControllerName - The name of the data controller
- options - ActiveDirectoryConnectorsClientListOptions contains the optional parameters for the ActiveDirectoryConnectorsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/ListByDataControllerActiveDirectoryConnector.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurearcdata/armazurearcdata" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurearcdata.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewActiveDirectoryConnectorsClient().NewListPager("testrg", "testdataController", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ActiveDirectoryConnectorListResult = armazurearcdata.ActiveDirectoryConnectorListResult{ // Value: []*armazurearcdata.ActiveDirectoryConnectorResource{ // { // Name: to.Ptr("testADConnector1"), // Type: to.Ptr("Microsoft.AzureArcData/dataControllers/activeDirectoryConnectors"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/dataControllers/testdataController/activeDirectoryConnectors/testADConnector1"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Properties: &armazurearcdata.ActiveDirectoryConnectorProperties{ // Spec: &armazurearcdata.ActiveDirectoryConnectorSpec{ // ActiveDirectory: &armazurearcdata.ActiveDirectoryConnectorDomainDetails{ // DomainControllers: &armazurearcdata.ActiveDirectoryDomainControllers{ // PrimaryDomainController: &armazurearcdata.ActiveDirectoryDomainController{ // Hostname: to.Ptr("dc1.contoso.local"), // }, // SecondaryDomainControllers: []*armazurearcdata.ActiveDirectoryDomainController{ // { // Hostname: to.Ptr("dc2.contoso.local"), // }, // { // Hostname: to.Ptr("dc3.contoso.local"), // }}, // }, // NetbiosDomainName: to.Ptr("CONTOSO"), // Realm: to.Ptr("CONTOSO.LOCAL"), // ServiceAccountProvisioning: to.Ptr(armazurearcdata.AccountProvisioningModeManual), // }, // DNS: &armazurearcdata.ActiveDirectoryConnectorDNSDetails{ // DomainName: to.Ptr("contoso.local"), // NameserverIPAddresses: []*string{ // to.Ptr("11.11.111.111"), // to.Ptr("22.22.222.222")}, // PreferK8SDNSForPtrLookups: to.Ptr(false), // Replicas: to.Ptr[int64](1), // }, // }, // }, // }, // { // Name: to.Ptr("testADConnector2"), // Type: to.Ptr("Microsoft.AzureArcData/dataControllers/activeDirectoryConnectors"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/dataControllers/testdataController/activeDirectoryConnectors/testADConnector2"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Properties: &armazurearcdata.ActiveDirectoryConnectorProperties{ // Spec: &armazurearcdata.ActiveDirectoryConnectorSpec{ // ActiveDirectory: &armazurearcdata.ActiveDirectoryConnectorDomainDetails{ // DomainControllers: &armazurearcdata.ActiveDirectoryDomainControllers{ // PrimaryDomainController: &armazurearcdata.ActiveDirectoryDomainController{ // Hostname: to.Ptr("dc4.contoso.local"), // }, // SecondaryDomainControllers: []*armazurearcdata.ActiveDirectoryDomainController{ // { // Hostname: to.Ptr("dc5.contoso.local"), // }, // { // Hostname: to.Ptr("dc6.contoso.local"), // }}, // }, // NetbiosDomainName: to.Ptr("CONTOSO"), // Realm: to.Ptr("CONTOSO.LOCAL"), // ServiceAccountProvisioning: to.Ptr(armazurearcdata.AccountProvisioningModeManual), // }, // DNS: &armazurearcdata.ActiveDirectoryConnectorDNSDetails{ // DomainName: to.Ptr("contoso.local"), // NameserverIPAddresses: []*string{ // to.Ptr("11.11.111.111"), // to.Ptr("22.22.222.222")}, // PreferK8SDNSForPtrLookups: to.Ptr(false), // Replicas: to.Ptr[int64](1), // }, // }, // }, // }}, // } } }
Output:
type ActiveDirectoryConnectorsClientBeginCreateOptions ¶ added in v0.3.0
type ActiveDirectoryConnectorsClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ActiveDirectoryConnectorsClientBeginCreateOptions contains the optional parameters for the ActiveDirectoryConnectorsClient.BeginCreate method.
type ActiveDirectoryConnectorsClientBeginDeleteOptions ¶ added in v0.3.0
type ActiveDirectoryConnectorsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ActiveDirectoryConnectorsClientBeginDeleteOptions contains the optional parameters for the ActiveDirectoryConnectorsClient.BeginDelete method.
type ActiveDirectoryConnectorsClientCreateResponse ¶ added in v0.3.0
type ActiveDirectoryConnectorsClientCreateResponse struct { // Active directory connector resource ActiveDirectoryConnectorResource }
ActiveDirectoryConnectorsClientCreateResponse contains the response from method ActiveDirectoryConnectorsClient.BeginCreate.
type ActiveDirectoryConnectorsClientDeleteResponse ¶ added in v0.3.0
type ActiveDirectoryConnectorsClientDeleteResponse struct { }
ActiveDirectoryConnectorsClientDeleteResponse contains the response from method ActiveDirectoryConnectorsClient.BeginDelete.
type ActiveDirectoryConnectorsClientGetOptions ¶ added in v0.3.0
type ActiveDirectoryConnectorsClientGetOptions struct { }
ActiveDirectoryConnectorsClientGetOptions contains the optional parameters for the ActiveDirectoryConnectorsClient.Get method.
type ActiveDirectoryConnectorsClientGetResponse ¶ added in v0.3.0
type ActiveDirectoryConnectorsClientGetResponse struct { // Active directory connector resource ActiveDirectoryConnectorResource }
ActiveDirectoryConnectorsClientGetResponse contains the response from method ActiveDirectoryConnectorsClient.Get.
type ActiveDirectoryConnectorsClientListOptions ¶ added in v0.3.0
type ActiveDirectoryConnectorsClientListOptions struct { }
ActiveDirectoryConnectorsClientListOptions contains the optional parameters for the ActiveDirectoryConnectorsClient.NewListPager method.
type ActiveDirectoryConnectorsClientListResponse ¶ added in v0.3.0
type ActiveDirectoryConnectorsClientListResponse struct { // A list of active directory connectors ActiveDirectoryConnectorListResult }
ActiveDirectoryConnectorsClientListResponse contains the response from method ActiveDirectoryConnectorsClient.NewListPager.
type ActiveDirectoryDomainController ¶ added in v0.3.0
type ActiveDirectoryDomainController struct { // REQUIRED; Fully-qualified domain name of a domain controller in the AD domain. Hostname *string }
ActiveDirectoryDomainController - Information about a domain controller in the AD domain.
func (ActiveDirectoryDomainController) MarshalJSON ¶ added in v0.6.0
func (a ActiveDirectoryDomainController) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ActiveDirectoryDomainController.
func (*ActiveDirectoryDomainController) UnmarshalJSON ¶ added in v0.6.0
func (a *ActiveDirectoryDomainController) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ActiveDirectoryDomainController.
type ActiveDirectoryDomainControllers ¶ added in v0.3.0
type ActiveDirectoryDomainControllers struct { // Information about the Primary Domain Controller (PDC) in the AD domain. PrimaryDomainController *ActiveDirectoryDomainController // null SecondaryDomainControllers []*ActiveDirectoryDomainController }
ActiveDirectoryDomainControllers - Details about the Active Directory domain controllers associated with this AD connector instance
func (ActiveDirectoryDomainControllers) MarshalJSON ¶ added in v0.3.0
func (a ActiveDirectoryDomainControllers) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ActiveDirectoryDomainControllers.
func (*ActiveDirectoryDomainControllers) UnmarshalJSON ¶ added in v0.6.0
func (a *ActiveDirectoryDomainControllers) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ActiveDirectoryDomainControllers.
type ActiveDirectoryInformation ¶ added in v0.3.0
type ActiveDirectoryInformation struct { // Keytab information that is used for the Sql Managed Instance when Active Directory authentication is used. KeytabInformation *KeytabInformation }
ActiveDirectoryInformation - Active Directory information that related to the resource.
func (ActiveDirectoryInformation) MarshalJSON ¶ added in v0.6.0
func (a ActiveDirectoryInformation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ActiveDirectoryInformation.
func (*ActiveDirectoryInformation) UnmarshalJSON ¶ added in v0.6.0
func (a *ActiveDirectoryInformation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ActiveDirectoryInformation.
type ArcSQLManagedInstanceLicenseType ¶
type ArcSQLManagedInstanceLicenseType string
ArcSQLManagedInstanceLicenseType - The license type to apply for this managed instance.
const ( ArcSQLManagedInstanceLicenseTypeBasePrice ArcSQLManagedInstanceLicenseType = "BasePrice" ArcSQLManagedInstanceLicenseTypeDisasterRecovery ArcSQLManagedInstanceLicenseType = "DisasterRecovery" ArcSQLManagedInstanceLicenseTypeLicenseIncluded ArcSQLManagedInstanceLicenseType = "LicenseIncluded" )
func PossibleArcSQLManagedInstanceLicenseTypeValues ¶
func PossibleArcSQLManagedInstanceLicenseTypeValues() []ArcSQLManagedInstanceLicenseType
PossibleArcSQLManagedInstanceLicenseTypeValues returns the possible values for the ArcSQLManagedInstanceLicenseType const type.
type ArcSQLServerLicenseType ¶
type ArcSQLServerLicenseType string
ArcSQLServerLicenseType - SQL Server license type.
const ( ArcSQLServerLicenseTypeFree ArcSQLServerLicenseType = "Free" ArcSQLServerLicenseTypeHADR ArcSQLServerLicenseType = "HADR" ArcSQLServerLicenseTypePaid ArcSQLServerLicenseType = "Paid" ArcSQLServerLicenseTypeUndefined ArcSQLServerLicenseType = "Undefined" )
func PossibleArcSQLServerLicenseTypeValues ¶
func PossibleArcSQLServerLicenseTypeValues() []ArcSQLServerLicenseType
PossibleArcSQLServerLicenseTypeValues returns the possible values for the ArcSQLServerLicenseType const type.
type BasicLoginInformation ¶
type BasicLoginInformation struct { // Login password. Password *string // Login username. Username *string }
BasicLoginInformation - Username and password for basic login authentication.
func (BasicLoginInformation) MarshalJSON ¶ added in v0.6.0
func (b BasicLoginInformation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type BasicLoginInformation.
func (*BasicLoginInformation) UnmarshalJSON ¶ added in v0.6.0
func (b *BasicLoginInformation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type BasicLoginInformation.
type ClientFactory ¶ added in v0.6.0
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶ added in v0.6.0
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- subscriptionID - The ID of the Azure subscription
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewActiveDirectoryConnectorsClient ¶ added in v0.6.0
func (c *ClientFactory) NewActiveDirectoryConnectorsClient() *ActiveDirectoryConnectorsClient
NewActiveDirectoryConnectorsClient creates a new instance of ActiveDirectoryConnectorsClient.
func (*ClientFactory) NewDataControllersClient ¶ added in v0.6.0
func (c *ClientFactory) NewDataControllersClient() *DataControllersClient
NewDataControllersClient creates a new instance of DataControllersClient.
func (*ClientFactory) NewOperationsClient ¶ added in v0.6.0
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewPostgresInstancesClient ¶ added in v0.6.0
func (c *ClientFactory) NewPostgresInstancesClient() *PostgresInstancesClient
NewPostgresInstancesClient creates a new instance of PostgresInstancesClient.
func (*ClientFactory) NewSQLManagedInstancesClient ¶ added in v0.6.0
func (c *ClientFactory) NewSQLManagedInstancesClient() *SQLManagedInstancesClient
NewSQLManagedInstancesClient creates a new instance of SQLManagedInstancesClient.
func (*ClientFactory) NewSQLServerInstancesClient ¶ added in v0.6.0
func (c *ClientFactory) NewSQLServerInstancesClient() *SQLServerInstancesClient
NewSQLServerInstancesClient creates a new instance of SQLServerInstancesClient.
type CommonSKU ¶ added in v0.3.0
type CommonSKU struct { // REQUIRED; The name of the SKU. It is typically a letter+number code Name *string // If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the // resource this may be omitted. Capacity *int32 // Whether dev/test is enabled. When the dev field is set to true, the resource is used for dev/test purpose. Dev *bool // If the service has different generations of hardware, for the same SKU, then that can be captured here. Family *string // The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. Size *string }
CommonSKU - The resource model definition representing SKU for ARM resources
func (CommonSKU) MarshalJSON ¶ added in v0.6.0
MarshalJSON implements the json.Marshaller interface for type CommonSKU.
func (*CommonSKU) UnmarshalJSON ¶ added in v0.6.0
UnmarshalJSON implements the json.Unmarshaller interface for type CommonSKU.
type ConnectionStatus ¶
type ConnectionStatus string
ConnectionStatus - The cloud connectivity status.
const ( ConnectionStatusConnected ConnectionStatus = "Connected" ConnectionStatusDisconnected ConnectionStatus = "Disconnected" ConnectionStatusRegistered ConnectionStatus = "Registered" ConnectionStatusUnknown ConnectionStatus = "Unknown" )
func PossibleConnectionStatusValues ¶
func PossibleConnectionStatusValues() []ConnectionStatus
PossibleConnectionStatusValues returns the possible values for the ConnectionStatus 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 DataControllerProperties ¶
type DataControllerProperties struct { // Deprecated. Azure Arc Data Services data controller no longer expose any endpoint. All traffic are exposed through Kubernetes // native API. BasicLoginInformation *BasicLoginInformation // If a CustomLocation is provided, this contains the ARM id of the connected cluster the custom location belongs to. ClusterID *string // If a CustomLocation is provided, this contains the ARM id of the extension the custom location belongs to. ExtensionID *string // The infrastructure the data controller is running on. Infrastructure *Infrastructure // The raw kubernetes information K8SRaw any // Last uploaded date from Kubernetes cluster. Defaults to current date time LastUploadedDate *time.Time // Log analytics workspace id and primary key LogAnalyticsWorkspaceConfig *LogAnalyticsWorkspaceConfig // Login credential for logs dashboard on the Kubernetes cluster. LogsDashboardCredential *BasicLoginInformation // Login credential for metrics dashboard on the Kubernetes cluster. MetricsDashboardCredential *BasicLoginInformation // Properties from the Kubernetes data controller OnPremiseProperty *OnPremiseProperty // Deprecated. Service principal is deprecated in favor of Arc Kubernetes service extension managed identity. UploadServicePrincipal *UploadServicePrincipal // Properties on upload watermark. Mostly timestamp for each upload data type UploadWatermark *UploadWatermark // READ-ONLY; The provisioning state of the Arc Data Controller resource. ProvisioningState *string }
DataControllerProperties - The data controller properties.
func (DataControllerProperties) MarshalJSON ¶
func (d DataControllerProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DataControllerProperties.
func (*DataControllerProperties) UnmarshalJSON ¶
func (d *DataControllerProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DataControllerProperties.
type DataControllerResource ¶
type DataControllerResource struct { // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; The data controller's properties Properties *DataControllerProperties // The extendedLocation of the resource. ExtendedLocation *ExtendedLocation // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
DataControllerResource - Data controller resource
func (DataControllerResource) MarshalJSON ¶
func (d DataControllerResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DataControllerResource.
func (*DataControllerResource) UnmarshalJSON ¶ added in v0.6.0
func (d *DataControllerResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DataControllerResource.
type DataControllerUpdate ¶
type DataControllerUpdate struct { // The data controller's properties Properties *DataControllerProperties // Resource tags Tags map[string]*string }
DataControllerUpdate - Used for updating a data controller resource.
func (DataControllerUpdate) MarshalJSON ¶
func (d DataControllerUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DataControllerUpdate.
func (*DataControllerUpdate) UnmarshalJSON ¶ added in v0.6.0
func (d *DataControllerUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type DataControllerUpdate.
type DataControllersClient ¶
type DataControllersClient struct {
// contains filtered or unexported fields
}
DataControllersClient contains the methods for the DataControllers group. Don't use this type directly, use NewDataControllersClient() instead.
func NewDataControllersClient ¶
func NewDataControllersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataControllersClient, error)
NewDataControllersClient creates a new instance of DataControllersClient with the specified values.
- subscriptionID - The ID of the Azure subscription
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*DataControllersClient) BeginDeleteDataController ¶
func (client *DataControllersClient) BeginDeleteDataController(ctx context.Context, resourceGroupName string, dataControllerName string, options *DataControllersClientBeginDeleteDataControllerOptions) (*runtime.Poller[DataControllersClientDeleteDataControllerResponse], error)
BeginDeleteDataController - Deletes a dataController resource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-03-01-preview
- resourceGroupName - The name of the Azure resource group
- dataControllerName - The name of the data controller
- options - DataControllersClientBeginDeleteDataControllerOptions contains the optional parameters for the DataControllersClient.BeginDeleteDataController method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/DeleteDataController.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurearcdata/armazurearcdata" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurearcdata.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDataControllersClient().BeginDeleteDataController(ctx, "testrg", "testdataController", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*DataControllersClient) BeginPatchDataController ¶ added in v0.5.0
func (client *DataControllersClient) BeginPatchDataController(ctx context.Context, resourceGroupName string, dataControllerName string, dataControllerResource DataControllerUpdate, options *DataControllersClientBeginPatchDataControllerOptions) (*runtime.Poller[DataControllersClientPatchDataControllerResponse], error)
BeginPatchDataController - Updates a dataController resource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-03-01-preview
- resourceGroupName - The name of the Azure resource group
- dataControllerName - The name of the data controller
- dataControllerResource - The update data controller resource
- options - DataControllersClientBeginPatchDataControllerOptions contains the optional parameters for the DataControllersClient.BeginPatchDataController method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/UpdateDataController.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/azurearcdata/armazurearcdata" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurearcdata.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDataControllersClient().BeginPatchDataController(ctx, "testrg", "testdataController1", armazurearcdata.DataControllerUpdate{ Tags: map[string]*string{ "mytag": to.Ptr("myval"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DataControllerResource = armazurearcdata.DataControllerResource{ // Name: to.Ptr("testdataController1"), // Type: to.Ptr("Microsoft.AzureArcData/dataControllers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/dataControllers/testdataController1"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Tags: map[string]*string{ // "mytag": to.Ptr("myval"), // }, // ExtendedLocation: &armazurearcdata.ExtendedLocation{ // Name: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.ExtendedLocation/customLocations/arclocation"), // Type: to.Ptr(armazurearcdata.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurearcdata.DataControllerProperties{ // BasicLoginInformation: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // ClusterID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s"), // ExtensionID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s/providers/Microsoft.KubernetesConfiguration/extensions/extension"), // Infrastructure: to.Ptr(armazurearcdata.InfrastructureOnpremises), // LogAnalyticsWorkspaceConfig: &armazurearcdata.LogAnalyticsWorkspaceConfig{ // WorkspaceID: to.Ptr("00000000-1111-2222-3333-444444444444"), // }, // LogsDashboardCredential: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // MetricsDashboardCredential: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // OnPremiseProperty: &armazurearcdata.OnPremiseProperty{ // ID: to.Ptr("12345678-1234-1234-ab12-1a2b3c4d5e6f"), // PublicSigningKey: to.Ptr("publicOnPremSigningKey"), // SigningCertificateThumbprint: to.Ptr("Unique thumbprint returned to customer to verify the certificate they uploaded"), // }, // UploadServicePrincipal: &armazurearcdata.UploadServicePrincipal{ // Authority: to.Ptr("https://login.microsoftonline.com/"), // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), // }, // UploadWatermark: &armazurearcdata.UploadWatermark{ // Logs: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // Metrics: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // Usages: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // }, // }, // } }
Output:
func (*DataControllersClient) BeginPutDataController ¶
func (client *DataControllersClient) BeginPutDataController(ctx context.Context, resourceGroupName string, dataControllerName string, dataControllerResource DataControllerResource, options *DataControllersClientBeginPutDataControllerOptions) (*runtime.Poller[DataControllersClientPutDataControllerResponse], error)
BeginPutDataController - Creates or replaces a dataController resource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-03-01-preview
- resourceGroupName - The name of the Azure resource group
- dataControllerName - The name of the data controller
- dataControllerResource - desc
- options - DataControllersClientBeginPutDataControllerOptions contains the optional parameters for the DataControllersClient.BeginPutDataController method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/CreateOrUpdateDataController.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/azurearcdata/armazurearcdata" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurearcdata.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewDataControllersClient().BeginPutDataController(ctx, "testrg", "testdataController", armazurearcdata.DataControllerResource{ Location: to.Ptr("northeurope"), Tags: map[string]*string{ "mytag": to.Ptr("myval"), }, ExtendedLocation: &armazurearcdata.ExtendedLocation{ Name: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.ExtendedLocation/customLocations/arclocation"), Type: to.Ptr(armazurearcdata.ExtendedLocationTypesCustomLocation), }, Properties: &armazurearcdata.DataControllerProperties{ BasicLoginInformation: &armazurearcdata.BasicLoginInformation{ Password: to.Ptr("********"), Username: to.Ptr("username"), }, ClusterID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s"), ExtensionID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s/providers/Microsoft.KubernetesConfiguration/extensions/extension"), Infrastructure: to.Ptr(armazurearcdata.InfrastructureOnpremises), LogAnalyticsWorkspaceConfig: &armazurearcdata.LogAnalyticsWorkspaceConfig{ PrimaryKey: to.Ptr("********"), WorkspaceID: to.Ptr("00000000-1111-2222-3333-444444444444"), }, LogsDashboardCredential: &armazurearcdata.BasicLoginInformation{ Password: to.Ptr("********"), Username: to.Ptr("username"), }, MetricsDashboardCredential: &armazurearcdata.BasicLoginInformation{ Password: to.Ptr("********"), Username: to.Ptr("username"), }, OnPremiseProperty: &armazurearcdata.OnPremiseProperty{ ID: to.Ptr("12345678-1234-1234-ab12-1a2b3c4d5e6f"), PublicSigningKey: to.Ptr("publicOnPremSigningKey"), }, UploadServicePrincipal: &armazurearcdata.UploadServicePrincipal{ Authority: to.Ptr("https://login.microsoftonline.com/"), ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), ClientSecret: to.Ptr("********"), TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), }, UploadWatermark: &armazurearcdata.UploadWatermark{ Logs: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t }()), Metrics: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t }()), Usages: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t }()), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DataControllerResource = armazurearcdata.DataControllerResource{ // Name: to.Ptr("testdataController"), // Type: to.Ptr("Microsoft.AzureArcData/dataControllers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/dataControllers/testdataController"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Tags: map[string]*string{ // "mytag": to.Ptr("myval"), // }, // ExtendedLocation: &armazurearcdata.ExtendedLocation{ // Name: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.ExtendedLocation/customLocations/arclocation"), // Type: to.Ptr(armazurearcdata.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurearcdata.DataControllerProperties{ // BasicLoginInformation: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // ClusterID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s"), // ExtensionID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s/providers/Microsoft.KubernetesConfiguration/extensions/extension"), // Infrastructure: to.Ptr(armazurearcdata.InfrastructureOnpremises), // LogAnalyticsWorkspaceConfig: &armazurearcdata.LogAnalyticsWorkspaceConfig{ // WorkspaceID: to.Ptr("00000000-1111-2222-3333-444444444444"), // }, // LogsDashboardCredential: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // MetricsDashboardCredential: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // OnPremiseProperty: &armazurearcdata.OnPremiseProperty{ // ID: to.Ptr("12345678-1234-1234-ab12-1a2b3c4d5e6f"), // PublicSigningKey: to.Ptr("publicOnPremSigningKey"), // SigningCertificateThumbprint: to.Ptr("Unique thumbprint returned to customer to verify the certificate being uploaded"), // }, // UploadServicePrincipal: &armazurearcdata.UploadServicePrincipal{ // Authority: to.Ptr("https://login.microsoftonline.com/"), // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), // }, // UploadWatermark: &armazurearcdata.UploadWatermark{ // Logs: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // Metrics: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // Usages: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // }, // }, // } }
Output:
func (*DataControllersClient) GetDataController ¶
func (client *DataControllersClient) GetDataController(ctx context.Context, resourceGroupName string, dataControllerName string, options *DataControllersClientGetDataControllerOptions) (DataControllersClientGetDataControllerResponse, error)
GetDataController - Retrieves a dataController resource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-03-01-preview
- resourceGroupName - The name of the Azure resource group
- dataControllerName - The name of the data controller
- options - DataControllersClientGetDataControllerOptions contains the optional parameters for the DataControllersClient.GetDataController method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/GetDataController.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurearcdata/armazurearcdata" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurearcdata.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewDataControllersClient().GetDataController(ctx, "testrg", "testdataController", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.DataControllerResource = armazurearcdata.DataControllerResource{ // Name: to.Ptr("testdataController"), // Type: to.Ptr("Microsoft.AzureArcData/dataControllers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/dataControllers/testdataController"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Tags: map[string]*string{ // "mytag": to.Ptr("myval"), // }, // ExtendedLocation: &armazurearcdata.ExtendedLocation{ // Name: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.ExtendedLocation/customLocations/arclocation"), // Type: to.Ptr(armazurearcdata.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurearcdata.DataControllerProperties{ // BasicLoginInformation: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // ClusterID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s"), // ExtensionID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s/providers/Microsoft.KubernetesConfiguration/extensions/extension"), // Infrastructure: to.Ptr(armazurearcdata.InfrastructureOnpremises), // LogAnalyticsWorkspaceConfig: &armazurearcdata.LogAnalyticsWorkspaceConfig{ // WorkspaceID: to.Ptr("00000000-1111-2222-3333-444444444444"), // }, // LogsDashboardCredential: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // MetricsDashboardCredential: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // OnPremiseProperty: &armazurearcdata.OnPremiseProperty{ // ID: to.Ptr("12345678-1234-1234-ab12-1a2b3c4d5e6f"), // PublicSigningKey: to.Ptr("publicOnPremSigningKey"), // SigningCertificateThumbprint: to.Ptr("Unique thumbprint returned to customer to verify the certificate they uploaded"), // }, // UploadServicePrincipal: &armazurearcdata.UploadServicePrincipal{ // Authority: to.Ptr("https://login.microsoftonline.com/"), // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), // }, // UploadWatermark: &armazurearcdata.UploadWatermark{ // Logs: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // Metrics: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // Usages: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // }, // }, // } }
Output:
func (*DataControllersClient) NewListInGroupPager ¶ added in v0.4.0
func (client *DataControllersClient) NewListInGroupPager(resourceGroupName string, options *DataControllersClientListInGroupOptions) *runtime.Pager[DataControllersClientListInGroupResponse]
NewListInGroupPager - List dataController resources in the resource group
Generated from API version 2022-03-01-preview
- resourceGroupName - The name of the Azure resource group
- options - DataControllersClientListInGroupOptions contains the optional parameters for the DataControllersClient.NewListInGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/ListByResourceGroupDataController.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurearcdata/armazurearcdata" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurearcdata.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDataControllersClient().NewListInGroupPager("testrg", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PageOfDataControllerResource = armazurearcdata.PageOfDataControllerResource{ // Value: []*armazurearcdata.DataControllerResource{ // { // Name: to.Ptr("testdataController1"), // Type: to.Ptr("Microsoft.AzureArcData/dataControllers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/dataControllers/testdataController1"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Tags: map[string]*string{ // "mytag": to.Ptr("myval"), // }, // ExtendedLocation: &armazurearcdata.ExtendedLocation{ // Name: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.ExtendedLocation/customLocations/arclocation"), // Type: to.Ptr(armazurearcdata.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurearcdata.DataControllerProperties{ // BasicLoginInformation: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // ClusterID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s"), // ExtensionID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s/providers/Microsoft.KubernetesConfiguration/extensions/extension"), // Infrastructure: to.Ptr(armazurearcdata.InfrastructureOnpremises), // LogAnalyticsWorkspaceConfig: &armazurearcdata.LogAnalyticsWorkspaceConfig{ // WorkspaceID: to.Ptr("00000000-1111-2222-3333-444444444444"), // }, // LogsDashboardCredential: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // MetricsDashboardCredential: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // OnPremiseProperty: &armazurearcdata.OnPremiseProperty{ // ID: to.Ptr("12345678-1234-1234-ab12-1a2b3c4d5e6f"), // PublicSigningKey: to.Ptr("publicOnPremSigningKey"), // SigningCertificateThumbprint: to.Ptr("Unique thumbprint returned to customer to verify the certificate they uploaded"), // }, // UploadServicePrincipal: &armazurearcdata.UploadServicePrincipal{ // Authority: to.Ptr("https://login.microsoftonline.com/"), // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), // }, // UploadWatermark: &armazurearcdata.UploadWatermark{ // Logs: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // Metrics: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // Usages: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // }, // }, // }, // { // Name: to.Ptr("testdataController2"), // Type: to.Ptr("Microsoft.AzureArcData/dataControllers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/dataControllers/testdataController2"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Tags: map[string]*string{ // "mytag": to.Ptr("myval"), // }, // ExtendedLocation: &armazurearcdata.ExtendedLocation{ // Name: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.ExtendedLocation/customLocations/arclocation"), // Type: to.Ptr(armazurearcdata.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurearcdata.DataControllerProperties{ // BasicLoginInformation: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // ClusterID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s"), // ExtensionID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s/providers/Microsoft.KubernetesConfiguration/extensions/extension"), // Infrastructure: to.Ptr(armazurearcdata.InfrastructureOnpremises), // LogAnalyticsWorkspaceConfig: &armazurearcdata.LogAnalyticsWorkspaceConfig{ // WorkspaceID: to.Ptr("00000000-1111-2222-3333-444444444444"), // }, // OnPremiseProperty: &armazurearcdata.OnPremiseProperty{ // ID: to.Ptr("12345678-1234-1234-ab12-1a2b3c4d5e6f"), // PublicSigningKey: to.Ptr("publicOnPremSigningKey"), // SigningCertificateThumbprint: to.Ptr("Unique thumbprint returned to customer to verify the certificate they uploaded"), // }, // UploadServicePrincipal: &armazurearcdata.UploadServicePrincipal{ // Authority: to.Ptr("https://login.microsoftonline.com/"), // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), // }, // UploadWatermark: &armazurearcdata.UploadWatermark{ // Logs: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // Metrics: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // Usages: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // }, // }, // }}, // } } }
Output:
func (*DataControllersClient) NewListInSubscriptionPager ¶ added in v0.4.0
func (client *DataControllersClient) NewListInSubscriptionPager(options *DataControllersClientListInSubscriptionOptions) *runtime.Pager[DataControllersClientListInSubscriptionResponse]
NewListInSubscriptionPager - List dataController resources in the subscription
Generated from API version 2022-03-01-preview
- options - DataControllersClientListInSubscriptionOptions contains the optional parameters for the DataControllersClient.NewListInSubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/ListSubscriptionDataController.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurearcdata/armazurearcdata" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurearcdata.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewDataControllersClient().NewListInSubscriptionPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PageOfDataControllerResource = armazurearcdata.PageOfDataControllerResource{ // Value: []*armazurearcdata.DataControllerResource{ // { // Name: to.Ptr("testdataController1"), // Type: to.Ptr("Microsoft.AzureArcData/dataControllers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/dataControllers/testdataController1"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Tags: map[string]*string{ // "mytag": to.Ptr("myval"), // }, // ExtendedLocation: &armazurearcdata.ExtendedLocation{ // Name: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.ExtendedLocation/customLocations/arclocation"), // Type: to.Ptr(armazurearcdata.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurearcdata.DataControllerProperties{ // BasicLoginInformation: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // ClusterID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s"), // ExtensionID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s/providers/Microsoft.KubernetesConfiguration/extensions/extension"), // Infrastructure: to.Ptr(armazurearcdata.InfrastructureOnpremises), // LogAnalyticsWorkspaceConfig: &armazurearcdata.LogAnalyticsWorkspaceConfig{ // WorkspaceID: to.Ptr("00000000-1111-2222-3333-444444444444"), // }, // LogsDashboardCredential: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // MetricsDashboardCredential: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // OnPremiseProperty: &armazurearcdata.OnPremiseProperty{ // ID: to.Ptr("12345678-1234-1234-ab12-1a2b3c4d5e6f"), // PublicSigningKey: to.Ptr("publicOnPremSigningKey"), // SigningCertificateThumbprint: to.Ptr("Unique thumbprint returned to customer to verify the certificate they uploaded"), // }, // UploadServicePrincipal: &armazurearcdata.UploadServicePrincipal{ // Authority: to.Ptr("https://login.microsoftonline.com/"), // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), // }, // UploadWatermark: &armazurearcdata.UploadWatermark{ // Logs: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // Metrics: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // Usages: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // }, // }, // }, // { // Name: to.Ptr("testdataController2"), // Type: to.Ptr("Microsoft.AzureArcData/dataControllers"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/dataControllers/testdataController2"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Tags: map[string]*string{ // "mytag": to.Ptr("myval"), // }, // ExtendedLocation: &armazurearcdata.ExtendedLocation{ // Name: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.ExtendedLocation/customLocations/arclocation"), // Type: to.Ptr(armazurearcdata.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurearcdata.DataControllerProperties{ // BasicLoginInformation: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // ClusterID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s"), // ExtensionID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s/providers/Microsoft.KubernetesConfiguration/extensions/extension"), // LogAnalyticsWorkspaceConfig: &armazurearcdata.LogAnalyticsWorkspaceConfig{ // WorkspaceID: to.Ptr("00000000-1111-2222-3333-444444444444"), // }, // LogsDashboardCredential: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // MetricsDashboardCredential: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // OnPremiseProperty: &armazurearcdata.OnPremiseProperty{ // ID: to.Ptr("12345678-1234-1234-ab12-1a2b3c4d5e6f"), // PublicSigningKey: to.Ptr("publicOnPremSigningKey"), // SigningCertificateThumbprint: to.Ptr("Unique thumbprint returned to customer to verify the certificate they uploaded"), // }, // UploadServicePrincipal: &armazurearcdata.UploadServicePrincipal{ // Authority: to.Ptr("https://login.microsoftonline.com/"), // ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), // TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), // }, // UploadWatermark: &armazurearcdata.UploadWatermark{ // Logs: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // Metrics: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // Usages: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // }, // }, // }}, // } } }
Output:
type DataControllersClientBeginDeleteDataControllerOptions ¶ added in v0.2.0
type DataControllersClientBeginDeleteDataControllerOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DataControllersClientBeginDeleteDataControllerOptions contains the optional parameters for the DataControllersClient.BeginDeleteDataController method.
type DataControllersClientBeginPatchDataControllerOptions ¶ added in v0.5.0
type DataControllersClientBeginPatchDataControllerOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DataControllersClientBeginPatchDataControllerOptions contains the optional parameters for the DataControllersClient.BeginPatchDataController method.
type DataControllersClientBeginPutDataControllerOptions ¶ added in v0.2.0
type DataControllersClientBeginPutDataControllerOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
DataControllersClientBeginPutDataControllerOptions contains the optional parameters for the DataControllersClient.BeginPutDataController method.
type DataControllersClientDeleteDataControllerResponse ¶ added in v0.2.0
type DataControllersClientDeleteDataControllerResponse struct { }
DataControllersClientDeleteDataControllerResponse contains the response from method DataControllersClient.BeginDeleteDataController.
type DataControllersClientGetDataControllerOptions ¶ added in v0.2.0
type DataControllersClientGetDataControllerOptions struct { }
DataControllersClientGetDataControllerOptions contains the optional parameters for the DataControllersClient.GetDataController method.
type DataControllersClientGetDataControllerResponse ¶ added in v0.2.0
type DataControllersClientGetDataControllerResponse struct { // Data controller resource DataControllerResource }
DataControllersClientGetDataControllerResponse contains the response from method DataControllersClient.GetDataController.
type DataControllersClientListInGroupOptions ¶ added in v0.2.0
type DataControllersClientListInGroupOptions struct { }
DataControllersClientListInGroupOptions contains the optional parameters for the DataControllersClient.NewListInGroupPager method.
type DataControllersClientListInGroupResponse ¶ added in v0.2.0
type DataControllersClientListInGroupResponse struct { // A list of data controllers. PageOfDataControllerResource }
DataControllersClientListInGroupResponse contains the response from method DataControllersClient.NewListInGroupPager.
type DataControllersClientListInSubscriptionOptions ¶ added in v0.2.0
type DataControllersClientListInSubscriptionOptions struct { }
DataControllersClientListInSubscriptionOptions contains the optional parameters for the DataControllersClient.NewListInSubscriptionPager method.
type DataControllersClientListInSubscriptionResponse ¶ added in v0.2.0
type DataControllersClientListInSubscriptionResponse struct { // A list of data controllers. PageOfDataControllerResource }
DataControllersClientListInSubscriptionResponse contains the response from method DataControllersClient.NewListInSubscriptionPager.
type DataControllersClientPatchDataControllerResponse ¶ added in v0.2.0
type DataControllersClientPatchDataControllerResponse struct { // Data controller resource DataControllerResource }
DataControllersClientPatchDataControllerResponse contains the response from method DataControllersClient.BeginPatchDataController.
type DataControllersClientPutDataControllerResponse ¶ added in v0.2.0
type DataControllersClientPutDataControllerResponse struct { // Data controller resource DataControllerResource }
DataControllersClientPutDataControllerResponse contains the response from method DataControllersClient.BeginPutDataController.
type DefenderStatus ¶
type DefenderStatus string
DefenderStatus - Status of Azure Defender.
const ( DefenderStatusProtected DefenderStatus = "Protected" DefenderStatusUnknown DefenderStatus = "Unknown" DefenderStatusUnprotected DefenderStatus = "Unprotected" )
func PossibleDefenderStatusValues ¶
func PossibleDefenderStatusValues() []DefenderStatus
PossibleDefenderStatusValues returns the possible values for the DefenderStatus const type.
type EditionType ¶
type EditionType string
EditionType - SQL Server edition.
const ( EditionTypeDeveloper EditionType = "Developer" EditionTypeEnterprise EditionType = "Enterprise" EditionTypeEvaluation EditionType = "Evaluation" EditionTypeExpress EditionType = "Express" EditionTypeStandard EditionType = "Standard" EditionTypeWeb EditionType = "Web" )
func PossibleEditionTypeValues ¶
func PossibleEditionTypeValues() []EditionType
PossibleEditionTypeValues returns the possible values for the EditionType const type.
type ErrorResponse ¶
type ErrorResponse struct { // null Error *ErrorResponseBody }
ErrorResponse - An error response from the Azure Data on Azure Arc service.
func (ErrorResponse) MarshalJSON ¶ added in v0.6.0
func (e ErrorResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorResponse.
func (*ErrorResponse) UnmarshalJSON ¶ added in v0.6.0
func (e *ErrorResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.
type ErrorResponseBody ¶
type ErrorResponseBody struct { // An identifier for the error. Codes are invariant and are intended to be consumed programmatically. Code *string // A list of additional details about the error. Details []*ErrorResponseBody // A message describing the error, intended to be suitable for display in a user interface. Message *string // The target of the particular error. For example, the name of the property in error. Target *string }
ErrorResponseBody - An error response from the Batch service.
func (ErrorResponseBody) MarshalJSON ¶
func (e ErrorResponseBody) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorResponseBody.
func (*ErrorResponseBody) UnmarshalJSON ¶ added in v0.6.0
func (e *ErrorResponseBody) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponseBody.
type ExtendedLocation ¶
type ExtendedLocation struct { // The name of the extended location. Name *string // The type of the extended location. Type *ExtendedLocationTypes }
ExtendedLocation - The complex type of the extended location.
func (ExtendedLocation) MarshalJSON ¶ added in v0.6.0
func (e ExtendedLocation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExtendedLocation.
func (*ExtendedLocation) UnmarshalJSON ¶ added in v0.6.0
func (e *ExtendedLocation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExtendedLocation.
type ExtendedLocationTypes ¶
type ExtendedLocationTypes string
ExtendedLocationTypes - The type of extendedLocation.
const (
ExtendedLocationTypesCustomLocation ExtendedLocationTypes = "CustomLocation"
)
func PossibleExtendedLocationTypesValues ¶
func PossibleExtendedLocationTypesValues() []ExtendedLocationTypes
PossibleExtendedLocationTypesValues returns the possible values for the ExtendedLocationTypes const type.
type HostType ¶ added in v0.3.0
type HostType string
HostType - Type of host for Azure Arc SQL Server
func PossibleHostTypeValues ¶ added in v0.3.0
func PossibleHostTypeValues() []HostType
PossibleHostTypeValues returns the possible values for the HostType const type.
type Infrastructure ¶
type Infrastructure string
Infrastructure - The infrastructure the data controller is running on.
const ( InfrastructureAlibaba Infrastructure = "alibaba" InfrastructureAws Infrastructure = "aws" InfrastructureAzure Infrastructure = "azure" InfrastructureGcp Infrastructure = "gcp" InfrastructureOnpremises Infrastructure = "onpremises" InfrastructureOther Infrastructure = "other" )
func PossibleInfrastructureValues ¶
func PossibleInfrastructureValues() []Infrastructure
PossibleInfrastructureValues returns the possible values for the Infrastructure const type.
type K8SResourceRequirements ¶
type K8SResourceRequirements struct { // OPTIONAL; Contains additional key/value pairs not defined in the schema. AdditionalProperties map[string]any // Limits for a kubernetes resource type (e.g 'cpu', 'memory'). The 'cpu' request must be less than or equal to 'cpu' limit. // Default 'cpu' is 2, minimum is 1. Default 'memory' is '4Gi', minimum is '2Gi. // If sku.tier is GeneralPurpose, maximum 'cpu' is 24 and maximum 'memory' is '128Gi'. Limits map[string]*string // Requests for a kubernetes resource type (e.g 'cpu', 'memory'). The 'cpu' request must be less than or equal to 'cpu' limit. // Default 'cpu' is 2, minimum is 1. Default 'memory' is '4Gi', minimum is // '2Gi. If sku.tier is GeneralPurpose, maximum 'cpu' is 24 and maximum 'memory' is '128Gi'. Requests map[string]*string }
K8SResourceRequirements - The kubernetes resource limits and requests used to restrict or reserve resource usage.
func (K8SResourceRequirements) MarshalJSON ¶
func (k K8SResourceRequirements) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type K8SResourceRequirements.
func (*K8SResourceRequirements) UnmarshalJSON ¶
func (k *K8SResourceRequirements) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type K8SResourceRequirements.
type K8SScheduling ¶
type K8SScheduling struct { // OPTIONAL; Contains additional key/value pairs not defined in the schema. AdditionalProperties map[string]any // The kubernetes scheduling options. It describes restrictions used to help Kubernetes select appropriate nodes to host the // database service Default *K8SSchedulingOptions }
K8SScheduling - The kubernetes scheduling information.
func (K8SScheduling) MarshalJSON ¶
func (k K8SScheduling) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type K8SScheduling.
func (*K8SScheduling) UnmarshalJSON ¶
func (k *K8SScheduling) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type K8SScheduling.
type K8SSchedulingOptions ¶
type K8SSchedulingOptions struct { // OPTIONAL; Contains additional key/value pairs not defined in the schema. AdditionalProperties map[string]any // The kubernetes resource limits and requests used to restrict or reserve resource usage. Resources *K8SResourceRequirements }
K8SSchedulingOptions - The kubernetes scheduling options. It describes restrictions used to help Kubernetes select appropriate nodes to host the database service
func (K8SSchedulingOptions) MarshalJSON ¶
func (k K8SSchedulingOptions) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type K8SSchedulingOptions.
func (*K8SSchedulingOptions) UnmarshalJSON ¶
func (k *K8SSchedulingOptions) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type K8SSchedulingOptions.
type KeytabInformation ¶ added in v0.3.0
type KeytabInformation struct { // A base64-encoded keytab. Keytab *string }
KeytabInformation - Keytab used for authenticate with Active Directory.
func (KeytabInformation) MarshalJSON ¶ added in v0.6.0
func (k KeytabInformation) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type KeytabInformation.
func (*KeytabInformation) UnmarshalJSON ¶ added in v0.6.0
func (k *KeytabInformation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type KeytabInformation.
type LogAnalyticsWorkspaceConfig ¶
type LogAnalyticsWorkspaceConfig struct { // Primary key of the workspace PrimaryKey *string // Azure Log Analytics workspace ID WorkspaceID *string }
LogAnalyticsWorkspaceConfig - Log analytics workspace id and primary key
func (LogAnalyticsWorkspaceConfig) MarshalJSON ¶ added in v0.6.0
func (l LogAnalyticsWorkspaceConfig) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LogAnalyticsWorkspaceConfig.
func (*LogAnalyticsWorkspaceConfig) UnmarshalJSON ¶ added in v0.6.0
func (l *LogAnalyticsWorkspaceConfig) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type LogAnalyticsWorkspaceConfig.
type OnPremiseProperty ¶
type OnPremiseProperty struct { // REQUIRED; A globally unique ID identifying the associated Kubernetes cluster ID *string // REQUIRED; Certificate that contains the Kubernetes cluster public key used to verify signing PublicSigningKey *string // Unique thumbprint returned to customer to verify the certificate being uploaded SigningCertificateThumbprint *string }
OnPremiseProperty - Properties from the Kubernetes data controller
func (OnPremiseProperty) MarshalJSON ¶ added in v0.6.0
func (o OnPremiseProperty) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OnPremiseProperty.
func (*OnPremiseProperty) UnmarshalJSON ¶ added in v0.6.0
func (o *OnPremiseProperty) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OnPremiseProperty.
type Operation ¶
type Operation struct { // REQUIRED; The localized display information for this particular operation / action. Display *OperationDisplay // REQUIRED; Indicates whether the operation is a data action IsDataAction *bool // REQUIRED; The name of the operation being performed on this particular object. Name *string // READ-ONLY; The intended executor of the operation. Origin *OperationOrigin // READ-ONLY; Additional descriptions for the operation. Properties map[string]any }
Operation - Azure Data Services on Azure Arc operation definition.
func (Operation) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶ added in v0.6.0
UnmarshalJSON implements the json.Unmarshaller interface for type Operation.
type OperationDisplay ¶
type OperationDisplay struct { // REQUIRED; The localized friendly description for the operation. Description *string // REQUIRED; The localized friendly name for the operation. Operation *string // REQUIRED; The localized friendly form of the resource provider name. Provider *string // REQUIRED; The localized friendly form of the resource type related to this action/operation. Resource *string }
OperationDisplay - Display metadata associated with the operation.
func (OperationDisplay) MarshalJSON ¶ added in v0.6.0
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶ added in v0.6.0
func (o *OperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.
type OperationListResult ¶
type OperationListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*Operation }
OperationListResult - Result of the request to list Azure Data Services on Azure Arc operations.
func (OperationListResult) MarshalJSON ¶
func (o OperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationListResult.
func (*OperationListResult) UnmarshalJSON ¶ added in v0.6.0
func (o *OperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.
type OperationOrigin ¶
type OperationOrigin string
OperationOrigin - The intended executor of the operation.
const ( OperationOriginSystem OperationOrigin = "system" OperationOriginUser OperationOrigin = "user" )
func PossibleOperationOriginValues ¶
func PossibleOperationOriginValues() []OperationOrigin
PossibleOperationOriginValues returns the possible values for the OperationOrigin const type.
type OperationsClient ¶
type OperationsClient struct {
// contains filtered or unexported fields
}
OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.
func NewOperationsClient ¶
func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)
NewOperationsClient creates a new instance of OperationsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*OperationsClient) NewListPager ¶ added in v0.4.0
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Lists all of the available Azure Data Services on Azure Arc API operations.
Generated from API version 2022-03-01-preview
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/ListOperation.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurearcdata/armazurearcdata" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurearcdata.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewOperationsClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.OperationListResult = armazurearcdata.OperationListResult{ // Value: []*armazurearcdata.Operation{ // { // Name: to.Ptr("Microsoft.AzureArcData/Locations/OperationStatuses/read"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("read OperationStatuses"), // Operation: to.Ptr("read_OperationStatuses"), // Provider: to.Ptr("Microsoft.AzureArcData"), // Resource: to.Ptr("Locations/OperationStatuses"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureArcData/Locations/OperationStatuses/write"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("write OperationStatuses"), // Operation: to.Ptr("write_OperationStatuses"), // Provider: to.Ptr("Microsoft.AzureArcData"), // Resource: to.Ptr("Locations/OperationStatuses"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureArcData/dataControllers/read"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("read dataControllers"), // Operation: to.Ptr("DataControllers_ListInSubscription"), // Provider: to.Ptr("Microsoft.AzureArcData"), // Resource: to.Ptr("dataControllers"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureArcData/dataControllers/read"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("read dataControllers"), // Operation: to.Ptr("DataControllers_ListInGroup"), // Provider: to.Ptr("Microsoft.AzureArcData"), // Resource: to.Ptr("dataControllers"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureArcData/dataControllers/read"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("Retrieves a dataController resource"), // Operation: to.Ptr("DataControllers_GetDataController"), // Provider: to.Ptr("Microsoft.AzureArcData"), // Resource: to.Ptr("dataControllers"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureArcData/dataControllers/write"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("Creates or replaces a dataController resource"), // Operation: to.Ptr("DataControllers_PutDataController"), // Provider: to.Ptr("Microsoft.AzureArcData"), // Resource: to.Ptr("dataControllers"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureArcData/dataControllers/delete"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("Deletes a dataController resource"), // Operation: to.Ptr("DataControllers_DeleteDataController"), // Provider: to.Ptr("Microsoft.AzureArcData"), // Resource: to.Ptr("dataControllers"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureArcData/dataControllers/write"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("Updates a dataController resource"), // Operation: to.Ptr("DataControllers_PatchDataController"), // Provider: to.Ptr("Microsoft.AzureArcData"), // Resource: to.Ptr("dataControllers"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureArcData/sqlManagedInstances/read"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("read sqlManagedInstances"), // Operation: to.Ptr("SqlManagedInstances_List"), // Provider: to.Ptr("Microsoft.AzureArcData"), // Resource: to.Ptr("sqlManagedInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureArcData/sqlManagedInstances/read"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("Gets all sqlManagedInstances in a resource group."), // Operation: to.Ptr("SqlManagedInstances_ListByResourceGroup"), // Provider: to.Ptr("Microsoft.AzureArcData"), // Resource: to.Ptr("sqlManagedInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureArcData/sqlManagedInstances/read"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("Retrieves a SQL Managed Instance resource"), // Operation: to.Ptr("SqlManagedInstances_Get"), // Provider: to.Ptr("Microsoft.AzureArcData"), // Resource: to.Ptr("sqlManagedInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureArcData/sqlManagedInstances/write"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("Creates or replaces a SQL Managed Instance resource"), // Operation: to.Ptr("SqlManagedInstances_Create"), // Provider: to.Ptr("Microsoft.AzureArcData"), // Resource: to.Ptr("sqlManagedInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureArcData/sqlManagedInstances/delete"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("Deletes a SQL Managed Instance resource"), // Operation: to.Ptr("SqlManagedInstances_Delete"), // Provider: to.Ptr("Microsoft.AzureArcData"), // Resource: to.Ptr("sqlManagedInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureArcData/sqlManagedInstances/write"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("Updates a SQL Managed Instance resource"), // Operation: to.Ptr("SqlManagedInstances_Update"), // Provider: to.Ptr("Microsoft.AzureArcData"), // Resource: to.Ptr("sqlManagedInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureArcData/sqlServerInstances/read"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("read sqlServerInstances"), // Operation: to.Ptr("SqlServerInstances_List"), // Provider: to.Ptr("Microsoft.AzureArcData"), // Resource: to.Ptr("sqlServerInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureArcData/sqlServerInstances/read"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("Gets all sqlServerInstances in a resource group."), // Operation: to.Ptr("SqlServerInstances_ListByResourceGroup"), // Provider: to.Ptr("Microsoft.AzureArcData"), // Resource: to.Ptr("sqlServerInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureArcData/sqlServerInstances/read"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("Retrieves a SQL Server Instance resource"), // Operation: to.Ptr("SqlServerInstances_Get"), // Provider: to.Ptr("Microsoft.AzureArcData"), // Resource: to.Ptr("sqlServerInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureArcData/sqlServerInstances/write"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("Creates or replaces a SQL Server Instance resource"), // Operation: to.Ptr("SqlServerInstances_Create"), // Provider: to.Ptr("Microsoft.AzureArcData"), // Resource: to.Ptr("sqlServerInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureArcData/sqlServerInstances/delete"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("Deletes a SQL Server Instance resource"), // Operation: to.Ptr("SqlServerInstances_Delete"), // Provider: to.Ptr("Microsoft.AzureArcData"), // Resource: to.Ptr("sqlServerInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureArcData/sqlServerInstances/write"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("Updates a SQL Server Instance resource"), // Operation: to.Ptr("SqlServerInstances_Update"), // Provider: to.Ptr("Microsoft.AzureArcData"), // Resource: to.Ptr("sqlServerInstances"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureArcData/dataControllers/activeDirectoryConnectors/read"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("read activeDirectoryConnectors"), // Operation: to.Ptr("ActiveDirectoryConnectors_List"), // Provider: to.Ptr("Microsoft.AzureArcData"), // Resource: to.Ptr("dataControllers/activeDirectoryConnectors"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureArcData/dataControllers/activeDirectoryConnectors/read"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("Retrieves an active directory connector resource"), // Operation: to.Ptr("ActiveDirectoryConnectors_Get"), // Provider: to.Ptr("Microsoft.AzureArcData"), // Resource: to.Ptr("dataControllers/activeDirectoryConnectors"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureArcData/dataControllers/activeDirectoryConnectors/write"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("Creates or replaces an active directory connector resource."), // Operation: to.Ptr("ActiveDirectoryConnectors_Create"), // Provider: to.Ptr("Microsoft.AzureArcData"), // Resource: to.Ptr("dataControllers/activeDirectoryConnectors"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureArcData/dataControllers/activeDirectoryConnectors/delete"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("Deletes an active directory connector resource"), // Operation: to.Ptr("ActiveDirectoryConnectors_Delete"), // Provider: to.Ptr("Microsoft.AzureArcData"), // Resource: to.Ptr("dataControllers/activeDirectoryConnectors"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureArcData/postgresInstances/read"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("Retrieves details of Postgres Instances."), // Operation: to.Ptr("Get Postgres Instance details."), // Provider: to.Ptr("Azure Arc Data Resource Provider."), // Resource: to.Ptr("Microsoft.AzureArcData"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureArcData/postgresInstances/write"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("Create a new or change properties of existing Postgres Instances."), // Operation: to.Ptr("Create new or update existing Postgres Instances."), // Provider: to.Ptr("Azure Arc Data Resource Provider."), // Resource: to.Ptr("Microsoft.AzureArcData"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureArcData/postgresInstances/delete"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("Delete exisiting Postgres Instances."), // Operation: to.Ptr("Delete exisiting Postgres Instances."), // Provider: to.Ptr("Azure Arc Data Resource Provider."), // Resource: to.Ptr("Microsoft.AzureArcData"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureArcData/register/action"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("Register the subscription for Microsoft.AzureArcData"), // Operation: to.Ptr("Register the Microsoft.AzureArcData"), // Provider: to.Ptr("Microsoft.AzureArcData"), // Resource: to.Ptr("Microsoft.AzureArcData"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureArcData/unregister/action"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("Unregister the subscription for Microsoft.AzureArcData"), // Operation: to.Ptr("Unregister the Microsoft.AzureArcData"), // Provider: to.Ptr("Microsoft.AzureArcData"), // Resource: to.Ptr("Microsoft.AzureArcData"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureArcData/Operations/read"), // Display: &armazurearcdata.OperationDisplay{ // Description: to.Ptr("read Operations"), // Operation: to.Ptr("read_Operations"), // Provider: to.Ptr("Microsoft.AzureArcData"), // Resource: to.Ptr("Operations"), // }, // IsDataAction: to.Ptr(false), // }}, // } } }
Output:
type OperationsClientListOptions ¶ added in v0.2.0
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶ added in v0.2.0
type OperationsClientListResponse struct { // Result of the request to list Azure Data Services on Azure Arc operations. OperationListResult }
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type PageOfDataControllerResource ¶
type PageOfDataControllerResource struct { // Link to retrieve next page of results. NextLink *string // Array of results. Value []*DataControllerResource }
PageOfDataControllerResource - A list of data controllers.
func (PageOfDataControllerResource) MarshalJSON ¶
func (p PageOfDataControllerResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PageOfDataControllerResource.
func (*PageOfDataControllerResource) UnmarshalJSON ¶ added in v0.6.0
func (p *PageOfDataControllerResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PageOfDataControllerResource.
type PostgresInstance ¶ added in v0.3.0
type PostgresInstance struct { // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; null Properties *PostgresInstanceProperties // The extendedLocation of the resource. ExtendedLocation *ExtendedLocation // Resource sku. SKU *PostgresInstanceSKU // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
PostgresInstance - A Postgres Instance.
func (PostgresInstance) MarshalJSON ¶ added in v0.3.0
func (p PostgresInstance) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PostgresInstance.
func (*PostgresInstance) UnmarshalJSON ¶ added in v0.6.0
func (p *PostgresInstance) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PostgresInstance.
type PostgresInstanceListResult ¶ added in v0.3.0
type PostgresInstanceListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*PostgresInstance }
PostgresInstanceListResult - A list of PostgresInstance.
func (PostgresInstanceListResult) MarshalJSON ¶ added in v0.3.0
func (p PostgresInstanceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PostgresInstanceListResult.
func (*PostgresInstanceListResult) UnmarshalJSON ¶ added in v0.6.0
func (p *PostgresInstanceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PostgresInstanceListResult.
type PostgresInstanceProperties ¶ added in v0.3.0
type PostgresInstanceProperties struct { // The instance admin Admin *string // Username and password for basic authentication. BasicLoginInformation *BasicLoginInformation // The data controller id DataControllerID *string // The raw kubernetes information K8SRaw any // Last uploaded date from Kubernetes cluster. Defaults to current date time LastUploadedDate *time.Time // READ-ONLY; The provisioning state of the Azure Arc-enabled PostgreSQL instance. ProvisioningState *string }
PostgresInstanceProperties - Postgres Instance properties.
func (PostgresInstanceProperties) MarshalJSON ¶ added in v0.3.0
func (p PostgresInstanceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PostgresInstanceProperties.
func (*PostgresInstanceProperties) UnmarshalJSON ¶ added in v0.3.0
func (p *PostgresInstanceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PostgresInstanceProperties.
type PostgresInstanceSKU ¶ added in v0.3.0
type PostgresInstanceSKU struct { // REQUIRED; The name of the SKU. It is typically a letter+number code Name *string // If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the // resource this may be omitted. Capacity *int32 // Whether dev/test is enabled. When the dev field is set to true, the resource is used for dev/test purpose. Dev *bool // If the service has different generations of hardware, for the same SKU, then that can be captured here. Family *string // The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. Size *string // This field is required to be implemented by the Resource Provider if the service has more than one tier. Tier *string }
PostgresInstanceSKU - The resource model definition representing SKU for Azure Database for PostgresSQL - Azure Arc
func (PostgresInstanceSKU) MarshalJSON ¶ added in v0.6.0
func (p PostgresInstanceSKU) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PostgresInstanceSKU.
func (*PostgresInstanceSKU) UnmarshalJSON ¶ added in v0.6.0
func (p *PostgresInstanceSKU) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PostgresInstanceSKU.
type PostgresInstanceUpdate ¶ added in v0.3.0
type PostgresInstanceUpdate struct { // Postgres Instance properties. Properties *PostgresInstanceProperties // Resource tags. Tags map[string]*string }
PostgresInstanceUpdate - An update to a Postgres Instance.
func (PostgresInstanceUpdate) MarshalJSON ¶ added in v0.3.0
func (p PostgresInstanceUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PostgresInstanceUpdate.
func (*PostgresInstanceUpdate) UnmarshalJSON ¶ added in v0.6.0
func (p *PostgresInstanceUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PostgresInstanceUpdate.
type PostgresInstancesClient ¶ added in v0.3.0
type PostgresInstancesClient struct {
// contains filtered or unexported fields
}
PostgresInstancesClient contains the methods for the PostgresInstances group. Don't use this type directly, use NewPostgresInstancesClient() instead.
func NewPostgresInstancesClient ¶ added in v0.3.0
func NewPostgresInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PostgresInstancesClient, error)
NewPostgresInstancesClient creates a new instance of PostgresInstancesClient with the specified values.
- subscriptionID - The ID of the Azure subscription
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*PostgresInstancesClient) BeginCreate ¶ added in v0.3.0
func (client *PostgresInstancesClient) BeginCreate(ctx context.Context, resourceGroupName string, postgresInstanceName string, resource PostgresInstance, options *PostgresInstancesClientBeginCreateOptions) (*runtime.Poller[PostgresInstancesClientCreateResponse], error)
BeginCreate - Creates or replaces a postgres Instance resource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-03-01-preview
- resourceGroupName - The name of the Azure resource group
- postgresInstanceName - Name of Postgres Instance
- resource - The postgres instance
- options - PostgresInstancesClientBeginCreateOptions contains the optional parameters for the PostgresInstancesClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/CreateOrUpdatePostgresInstance.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/azurearcdata/armazurearcdata" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurearcdata.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewPostgresInstancesClient().BeginCreate(ctx, "testrg", "testpostgresInstance", armazurearcdata.PostgresInstance{ Location: to.Ptr("eastus"), ExtendedLocation: &armazurearcdata.ExtendedLocation{ Name: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.ExtendedLocation/customLocations/arclocation"), Type: to.Ptr(armazurearcdata.ExtendedLocationTypesCustomLocation), }, Properties: &armazurearcdata.PostgresInstanceProperties{ Admin: to.Ptr("admin"), BasicLoginInformation: &armazurearcdata.BasicLoginInformation{ Password: to.Ptr("********"), Username: to.Ptr("username"), }, DataControllerID: to.Ptr("dataControllerId"), K8SRaw: map[string]any{ "apiVersion": "apiVersion", "kind": "postgresql-12", "metadata": map[string]any{ "name": "pg1", "creationTimestamp": "2020-08-25T14:55:10Z", "generation": float64(1), "namespace": "test", "resourceVersion": "527780", "selfLink": "/apis/arcdata.microsoft.com/v1alpha1/namespaces/test/postgresql-12s/pg1", "uid": "1111aaaa-ffff-ffff-ffff-99999aaaaaaa", }, "spec": map[string]any{ "backups": map[string]any{ "deltaMinutes": float64(3), "fullMinutes": float64(10), "tiers": []any{ map[string]any{ "retention": map[string]any{ "maximums": []any{ "6", "512MB", }, "minimums": []any{ "3", }, }, "storage": map[string]any{ "volumeSize": "1Gi", }, }, }, }, "engine": map[string]any{ "extensions": []any{ map[string]any{ "name": "citus", }, }, }, "scale": map[string]any{ "shards": float64(3), }, "scheduling": map[string]any{ "default": map[string]any{ "resources": map[string]any{ "requests": map[string]any{ "memory": "256Mi", }, }, }, }, "service": map[string]any{ "type": "NodePort", }, "storage": map[string]any{ "data": map[string]any{ "className": "local-storage", "size": "5Gi", }, "logs": map[string]any{ "className": "local-storage", "size": "5Gi", }, }, }, "status": map[string]any{ "externalEndpoint": nil, "readyPods": "4/4", "state": "Ready", }, }, }, SKU: &armazurearcdata.PostgresInstanceSKU{ Name: to.Ptr("default"), Dev: to.Ptr(true), Tier: to.Ptr("Hyperscale"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PostgresInstance = armazurearcdata.PostgresInstance{ // Name: to.Ptr("testpostgresInstance"), // Type: to.Ptr("Microsoft.AzureArcData/PostgresInstance"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/PostgresInstance/testpostgresInstance"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Tags: map[string]*string{ // "mytag": to.Ptr("myval"), // }, // ExtendedLocation: &armazurearcdata.ExtendedLocation{ // Name: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.ExtendedLocation/customLocations/arclocation"), // Type: to.Ptr(armazurearcdata.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurearcdata.PostgresInstanceProperties{ // BasicLoginInformation: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // }, // SKU: &armazurearcdata.PostgresInstanceSKU{ // Name: to.Ptr("default"), // Dev: to.Ptr(true), // Tier: to.Ptr("Hyperscale"), // }, // } }
Output:
func (*PostgresInstancesClient) BeginDelete ¶ added in v0.3.0
func (client *PostgresInstancesClient) BeginDelete(ctx context.Context, resourceGroupName string, postgresInstanceName string, options *PostgresInstancesClientBeginDeleteOptions) (*runtime.Poller[PostgresInstancesClientDeleteResponse], error)
BeginDelete - Deletes a postgres Instance resource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-03-01-preview
- resourceGroupName - The name of the Azure resource group
- postgresInstanceName - Name of Postgres Instance
- options - PostgresInstancesClientBeginDeleteOptions contains the optional parameters for the PostgresInstancesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/DeletePostgresInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurearcdata/armazurearcdata" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurearcdata.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewPostgresInstancesClient().BeginDelete(ctx, "testrg", "testpostgresInstance", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*PostgresInstancesClient) Get ¶ added in v0.3.0
func (client *PostgresInstancesClient) Get(ctx context.Context, resourceGroupName string, postgresInstanceName string, options *PostgresInstancesClientGetOptions) (PostgresInstancesClientGetResponse, error)
Get - Retrieves a postgres Instance resource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-03-01-preview
- resourceGroupName - The name of the Azure resource group
- postgresInstanceName - Name of Postgres Instance
- options - PostgresInstancesClientGetOptions contains the optional parameters for the PostgresInstancesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/GetPostgresInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurearcdata/armazurearcdata" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurearcdata.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPostgresInstancesClient().Get(ctx, "testrg", "testpostgresInstances", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PostgresInstance = armazurearcdata.PostgresInstance{ // Name: to.Ptr("testpostgresInstances"), // Type: to.Ptr("Microsoft.AzureArcData/PostgresInstances"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/PostgresInstances/testpostgresInstances"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Tags: map[string]*string{ // "mytag": to.Ptr("myval"), // }, // ExtendedLocation: &armazurearcdata.ExtendedLocation{ // Name: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.ExtendedLocation/customLocations/arclocation"), // Type: to.Ptr(armazurearcdata.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurearcdata.PostgresInstanceProperties{ // BasicLoginInformation: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // }, // SKU: &armazurearcdata.PostgresInstanceSKU{ // Name: to.Ptr("default"), // Dev: to.Ptr(true), // Tier: to.Ptr("Hyperscale"), // }, // } }
Output:
func (*PostgresInstancesClient) NewListByResourceGroupPager ¶ added in v0.4.0
func (client *PostgresInstancesClient) NewListByResourceGroupPager(resourceGroupName string, options *PostgresInstancesClientListByResourceGroupOptions) *runtime.Pager[PostgresInstancesClientListByResourceGroupResponse]
NewListByResourceGroupPager - Get a postgres Instances list by Resource group name.
Generated from API version 2022-03-01-preview
- resourceGroupName - The name of the Azure resource group
- options - PostgresInstancesClientListByResourceGroupOptions contains the optional parameters for the PostgresInstancesClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/ListByResourceGroupPostgresInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurearcdata/armazurearcdata" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurearcdata.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewPostgresInstancesClient().NewListByResourceGroupPager("testrg", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PostgresInstanceListResult = armazurearcdata.PostgresInstanceListResult{ // Value: []*armazurearcdata.PostgresInstance{ // { // Name: to.Ptr("testpostgresInstances1"), // Type: to.Ptr("Microsoft.AzureArcData/PostgresInstances"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/PostgresInstances/testpostgresInstances1"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Tags: map[string]*string{ // "mytag": to.Ptr("myval"), // }, // ExtendedLocation: &armazurearcdata.ExtendedLocation{ // Name: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.ExtendedLocation/customLocations/arclocation"), // Type: to.Ptr(armazurearcdata.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurearcdata.PostgresInstanceProperties{ // BasicLoginInformation: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // }, // SKU: &armazurearcdata.PostgresInstanceSKU{ // Name: to.Ptr("default"), // Dev: to.Ptr(true), // Tier: to.Ptr("Hyperscale"), // }, // }, // { // Name: to.Ptr("testpostgresInstances2"), // Type: to.Ptr("Microsoft.AzureArcData/PostgresInstances"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/PostgresInstances/testpostgresInstances2"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Tags: map[string]*string{ // "mytag": to.Ptr("myval"), // }, // ExtendedLocation: &armazurearcdata.ExtendedLocation{ // Name: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.ExtendedLocation/customLocations/arclocation"), // Type: to.Ptr(armazurearcdata.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurearcdata.PostgresInstanceProperties{ // BasicLoginInformation: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // }, // SKU: &armazurearcdata.PostgresInstanceSKU{ // Name: to.Ptr("default"), // Dev: to.Ptr(true), // Tier: to.Ptr("Hyperscale"), // }, // }}, // } } }
Output:
func (*PostgresInstancesClient) NewListPager ¶ added in v0.4.0
func (client *PostgresInstancesClient) NewListPager(options *PostgresInstancesClientListOptions) *runtime.Pager[PostgresInstancesClientListResponse]
NewListPager - List postgres Instance resources in the subscription
Generated from API version 2022-03-01-preview
- options - PostgresInstancesClientListOptions contains the optional parameters for the PostgresInstancesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/ListSubscriptionPostgresInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurearcdata/armazurearcdata" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurearcdata.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewPostgresInstancesClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PostgresInstanceListResult = armazurearcdata.PostgresInstanceListResult{ // Value: []*armazurearcdata.PostgresInstance{ // { // Name: to.Ptr("testpostgresInstances1"), // Type: to.Ptr("Microsoft.AzureArcData/PostgresInstances"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/PostgresInstances/testpostgresInstances1"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Tags: map[string]*string{ // "mytag": to.Ptr("myval"), // }, // ExtendedLocation: &armazurearcdata.ExtendedLocation{ // Name: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.ExtendedLocation/customLocations/arclocation"), // Type: to.Ptr(armazurearcdata.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurearcdata.PostgresInstanceProperties{ // BasicLoginInformation: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // }, // SKU: &armazurearcdata.PostgresInstanceSKU{ // Name: to.Ptr("default"), // Dev: to.Ptr(true), // Tier: to.Ptr("Hyperscale"), // }, // }, // { // Name: to.Ptr("testpostgresInstances2"), // Type: to.Ptr("Microsoft.AzureArcData/PostgresInstances"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/PostgresInstances/testpostgresInstances2"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Tags: map[string]*string{ // "mytag": to.Ptr("myval"), // }, // ExtendedLocation: &armazurearcdata.ExtendedLocation{ // Name: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.ExtendedLocation/customLocations/arclocation"), // Type: to.Ptr(armazurearcdata.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurearcdata.PostgresInstanceProperties{ // BasicLoginInformation: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // }, // SKU: &armazurearcdata.PostgresInstanceSKU{ // Name: to.Ptr("default"), // Dev: to.Ptr(true), // Tier: to.Ptr("Hyperscale"), // }, // }}, // } } }
Output:
func (*PostgresInstancesClient) Update ¶ added in v0.3.0
func (client *PostgresInstancesClient) Update(ctx context.Context, resourceGroupName string, postgresInstanceName string, parameters PostgresInstanceUpdate, options *PostgresInstancesClientUpdateOptions) (PostgresInstancesClientUpdateResponse, error)
Update - Updates a postgres Instance resource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-03-01-preview
- resourceGroupName - The name of the Azure resource group
- postgresInstanceName - Name of Postgres Instance
- parameters - The Postgres Instance.
- options - PostgresInstancesClientUpdateOptions contains the optional parameters for the PostgresInstancesClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/UpdatePostgresInstance.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/azurearcdata/armazurearcdata" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurearcdata.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPostgresInstancesClient().Update(ctx, "testrg", "testpostgresInstance", armazurearcdata.PostgresInstanceUpdate{ Tags: map[string]*string{ "mytag": to.Ptr("myval"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PostgresInstance = armazurearcdata.PostgresInstance{ // Name: to.Ptr("testpostgresInstance"), // Type: to.Ptr("Microsoft.AzureArcData/PostgresInstance"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/PostgresInstance/testpostgresInstance"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Tags: map[string]*string{ // "mytag": to.Ptr("myval"), // }, // ExtendedLocation: &armazurearcdata.ExtendedLocation{ // Name: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.ExtendedLocation/customLocations/arclocation"), // Type: to.Ptr(armazurearcdata.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurearcdata.PostgresInstanceProperties{ // BasicLoginInformation: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // }, // SKU: &armazurearcdata.PostgresInstanceSKU{ // Name: to.Ptr("default"), // Dev: to.Ptr(true), // Tier: to.Ptr("Hyperscale"), // }, // } }
Output:
type PostgresInstancesClientBeginCreateOptions ¶ added in v0.3.0
type PostgresInstancesClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PostgresInstancesClientBeginCreateOptions contains the optional parameters for the PostgresInstancesClient.BeginCreate method.
type PostgresInstancesClientBeginDeleteOptions ¶ added in v0.3.0
type PostgresInstancesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PostgresInstancesClientBeginDeleteOptions contains the optional parameters for the PostgresInstancesClient.BeginDelete method.
type PostgresInstancesClientCreateResponse ¶ added in v0.3.0
type PostgresInstancesClientCreateResponse struct { // A Postgres Instance. PostgresInstance }
PostgresInstancesClientCreateResponse contains the response from method PostgresInstancesClient.BeginCreate.
type PostgresInstancesClientDeleteResponse ¶ added in v0.3.0
type PostgresInstancesClientDeleteResponse struct { }
PostgresInstancesClientDeleteResponse contains the response from method PostgresInstancesClient.BeginDelete.
type PostgresInstancesClientGetOptions ¶ added in v0.3.0
type PostgresInstancesClientGetOptions struct { }
PostgresInstancesClientGetOptions contains the optional parameters for the PostgresInstancesClient.Get method.
type PostgresInstancesClientGetResponse ¶ added in v0.3.0
type PostgresInstancesClientGetResponse struct { // A Postgres Instance. PostgresInstance }
PostgresInstancesClientGetResponse contains the response from method PostgresInstancesClient.Get.
type PostgresInstancesClientListByResourceGroupOptions ¶ added in v0.3.0
type PostgresInstancesClientListByResourceGroupOptions struct { }
PostgresInstancesClientListByResourceGroupOptions contains the optional parameters for the PostgresInstancesClient.NewListByResourceGroupPager method.
type PostgresInstancesClientListByResourceGroupResponse ¶ added in v0.3.0
type PostgresInstancesClientListByResourceGroupResponse struct { // A list of PostgresInstance. PostgresInstanceListResult }
PostgresInstancesClientListByResourceGroupResponse contains the response from method PostgresInstancesClient.NewListByResourceGroupPager.
type PostgresInstancesClientListOptions ¶ added in v0.3.0
type PostgresInstancesClientListOptions struct { }
PostgresInstancesClientListOptions contains the optional parameters for the PostgresInstancesClient.NewListPager method.
type PostgresInstancesClientListResponse ¶ added in v0.3.0
type PostgresInstancesClientListResponse struct { // A list of PostgresInstance. PostgresInstanceListResult }
PostgresInstancesClientListResponse contains the response from method PostgresInstancesClient.NewListPager.
type PostgresInstancesClientUpdateOptions ¶ added in v0.3.0
type PostgresInstancesClientUpdateOptions struct { }
PostgresInstancesClientUpdateOptions contains the optional parameters for the PostgresInstancesClient.Update method.
type PostgresInstancesClientUpdateResponse ¶ added in v0.3.0
type PostgresInstancesClientUpdateResponse struct { // A Postgres Instance. PostgresInstance }
PostgresInstancesClientUpdateResponse contains the response from method PostgresInstancesClient.Update.
type ProxyResource ¶ added in v0.3.0
type ProxyResource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
func (ProxyResource) MarshalJSON ¶ added in v0.6.0
func (p ProxyResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProxyResource.
func (*ProxyResource) UnmarshalJSON ¶ added in v0.6.0
func (p *ProxyResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.
type Resource ¶
type Resource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Resource - Common fields that are returned in the response for all Azure Resource Manager resources
func (Resource) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Resource.
func (*Resource) UnmarshalJSON ¶ added in v0.6.0
UnmarshalJSON implements the json.Unmarshaller interface for type Resource.
type SQLManagedInstance ¶
type SQLManagedInstance struct { // REQUIRED; The geo-location where the resource lives Location *string // REQUIRED; null Properties *SQLManagedInstanceProperties // The extendedLocation of the resource. ExtendedLocation *ExtendedLocation // Resource sku. SKU *SQLManagedInstanceSKU // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
SQLManagedInstance - A SqlManagedInstance.
func (SQLManagedInstance) MarshalJSON ¶
func (s SQLManagedInstance) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLManagedInstance.
func (*SQLManagedInstance) UnmarshalJSON ¶ added in v0.6.0
func (s *SQLManagedInstance) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLManagedInstance.
type SQLManagedInstanceK8SRaw ¶
type SQLManagedInstanceK8SRaw struct { // OPTIONAL; Contains additional key/value pairs not defined in the schema. AdditionalProperties map[string]any // The kubernetes spec information. Spec *SQLManagedInstanceK8SSpec }
SQLManagedInstanceK8SRaw - The raw kubernetes information.
func (SQLManagedInstanceK8SRaw) MarshalJSON ¶
func (s SQLManagedInstanceK8SRaw) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLManagedInstanceK8SRaw.
func (*SQLManagedInstanceK8SRaw) UnmarshalJSON ¶
func (s *SQLManagedInstanceK8SRaw) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLManagedInstanceK8SRaw.
type SQLManagedInstanceK8SSpec ¶
type SQLManagedInstanceK8SSpec struct { // OPTIONAL; Contains additional key/value pairs not defined in the schema. AdditionalProperties map[string]any // This option specifies the number of SQL Managed Instance replicas that will be deployed in your Kubernetes cluster for // high availability purposes. If sku.tier is BusinessCritical, allowed values are // '2' or '3' with default of '3'. If sku.tier is GeneralPurpose, replicas must be '1'. Replicas *int32 // The kubernetes scheduling information. Scheduling *K8SScheduling }
SQLManagedInstanceK8SSpec - The kubernetes spec information.
func (SQLManagedInstanceK8SSpec) MarshalJSON ¶
func (s SQLManagedInstanceK8SSpec) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLManagedInstanceK8SSpec.
func (*SQLManagedInstanceK8SSpec) UnmarshalJSON ¶
func (s *SQLManagedInstanceK8SSpec) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLManagedInstanceK8SSpec.
type SQLManagedInstanceListResult ¶
type SQLManagedInstanceListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*SQLManagedInstance }
SQLManagedInstanceListResult - A list of SqlManagedInstance.
func (SQLManagedInstanceListResult) MarshalJSON ¶
func (s SQLManagedInstanceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLManagedInstanceListResult.
func (*SQLManagedInstanceListResult) UnmarshalJSON ¶ added in v0.6.0
func (s *SQLManagedInstanceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLManagedInstanceListResult.
type SQLManagedInstanceProperties ¶
type SQLManagedInstanceProperties struct { // Active Directory information related to this SQL Managed Instance. ActiveDirectoryInformation *ActiveDirectoryInformation // The instance admin user Admin *string // Username and password for basic authentication. BasicLoginInformation *BasicLoginInformation // If a CustomLocation is provided, this contains the ARM id of the connected cluster the custom location belongs to. ClusterID *string // null DataControllerID *string // The instance end time EndTime *string // If a CustomLocation is provided, this contains the ARM id of the extension the custom location belongs to. ExtensionID *string // The raw kubernetes information K8SRaw *SQLManagedInstanceK8SRaw // Last uploaded date from Kubernetes cluster. Defaults to current date time LastUploadedDate *time.Time // The license type to apply for this managed instance. LicenseType *ArcSQLManagedInstanceLicenseType // The instance start time StartTime *string // READ-ONLY; The provisioning state of the Arc-enabled SQL Managed Instance resource. ProvisioningState *string }
SQLManagedInstanceProperties - Properties of sqlManagedInstance.
func (SQLManagedInstanceProperties) MarshalJSON ¶
func (s SQLManagedInstanceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLManagedInstanceProperties.
func (*SQLManagedInstanceProperties) UnmarshalJSON ¶
func (s *SQLManagedInstanceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLManagedInstanceProperties.
type SQLManagedInstanceSKU ¶
type SQLManagedInstanceSKU struct { // CONSTANT; The name of the SKU. // Field has constant value "vCore", any specified value is ignored. Name *string // The SKU capacity Capacity *int32 // Whether dev/test is enabled. When the dev field is set to true, the resource is used for dev/test purpose. Dev *bool // The SKU family Family *string // The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. Size *string // The pricing tier for the instance. Tier *SQLManagedInstanceSKUTier }
SQLManagedInstanceSKU - The resource model definition representing SKU for Azure Managed Instance - Azure Arc
func (SQLManagedInstanceSKU) MarshalJSON ¶ added in v0.6.0
func (s SQLManagedInstanceSKU) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLManagedInstanceSKU.
func (*SQLManagedInstanceSKU) UnmarshalJSON ¶ added in v0.6.0
func (s *SQLManagedInstanceSKU) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLManagedInstanceSKU.
type SQLManagedInstanceSKUTier ¶
type SQLManagedInstanceSKUTier string
SQLManagedInstanceSKUTier - The pricing tier for the instance.
const ( SQLManagedInstanceSKUTierBusinessCritical SQLManagedInstanceSKUTier = "BusinessCritical" SQLManagedInstanceSKUTierGeneralPurpose SQLManagedInstanceSKUTier = "GeneralPurpose" )
func PossibleSQLManagedInstanceSKUTierValues ¶
func PossibleSQLManagedInstanceSKUTierValues() []SQLManagedInstanceSKUTier
PossibleSQLManagedInstanceSKUTierValues returns the possible values for the SQLManagedInstanceSKUTier const type.
type SQLManagedInstanceUpdate ¶
SQLManagedInstanceUpdate - An update to a SQL Managed Instance.
func (SQLManagedInstanceUpdate) MarshalJSON ¶
func (s SQLManagedInstanceUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLManagedInstanceUpdate.
func (*SQLManagedInstanceUpdate) UnmarshalJSON ¶ added in v0.6.0
func (s *SQLManagedInstanceUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLManagedInstanceUpdate.
type SQLManagedInstancesClient ¶
type SQLManagedInstancesClient struct {
// contains filtered or unexported fields
}
SQLManagedInstancesClient contains the methods for the SQLManagedInstances group. Don't use this type directly, use NewSQLManagedInstancesClient() instead.
func NewSQLManagedInstancesClient ¶
func NewSQLManagedInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLManagedInstancesClient, error)
NewSQLManagedInstancesClient creates a new instance of SQLManagedInstancesClient with the specified values.
- subscriptionID - The ID of the Azure subscription
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*SQLManagedInstancesClient) BeginCreate ¶
func (client *SQLManagedInstancesClient) BeginCreate(ctx context.Context, resourceGroupName string, sqlManagedInstanceName string, sqlManagedInstance SQLManagedInstance, options *SQLManagedInstancesClientBeginCreateOptions) (*runtime.Poller[SQLManagedInstancesClientCreateResponse], error)
BeginCreate - Creates or replaces a SQL Managed Instance resource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-03-01-preview
- resourceGroupName - The name of the Azure resource group
- sqlManagedInstanceName - Name of SQL Managed Instance
- sqlManagedInstance - The SQL Managed Instance to be created or updated.
- options - SQLManagedInstancesClientBeginCreateOptions contains the optional parameters for the SQLManagedInstancesClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/CreateOrUpdateSqlManagedInstance.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/azurearcdata/armazurearcdata" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurearcdata.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSQLManagedInstancesClient().BeginCreate(ctx, "testrg", "testsqlManagedInstance", armazurearcdata.SQLManagedInstance{ Location: to.Ptr("northeurope"), Tags: map[string]*string{ "mytag": to.Ptr("myval"), }, ExtendedLocation: &armazurearcdata.ExtendedLocation{ Name: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.ExtendedLocation/customLocations/arclocation"), Type: to.Ptr(armazurearcdata.ExtendedLocationTypesCustomLocation), }, Properties: &armazurearcdata.SQLManagedInstanceProperties{ ActiveDirectoryInformation: &armazurearcdata.ActiveDirectoryInformation{ KeytabInformation: &armazurearcdata.KeytabInformation{ Keytab: to.Ptr("********"), }, }, Admin: to.Ptr("Admin user"), BasicLoginInformation: &armazurearcdata.BasicLoginInformation{ Password: to.Ptr("********"), Username: to.Ptr("username"), }, ClusterID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s"), EndTime: to.Ptr("Instance end time"), ExtensionID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s/providers/Microsoft.KubernetesConfiguration/extensions/extension"), K8SRaw: &armazurearcdata.SQLManagedInstanceK8SRaw{ AdditionalProperties: map[string]any{ "additionalProperty": float64(1234), }, Spec: &armazurearcdata.SQLManagedInstanceK8SSpec{ Replicas: to.Ptr[int32](1), Scheduling: &armazurearcdata.K8SScheduling{ Default: &armazurearcdata.K8SSchedulingOptions{ Resources: &armazurearcdata.K8SResourceRequirements{ Limits: map[string]*string{ "additionalProperty": to.Ptr("additionalValue"), "cpu": to.Ptr("1"), "memory": to.Ptr("8Gi"), }, Requests: map[string]*string{ "additionalProperty": to.Ptr("additionalValue"), "cpu": to.Ptr("1"), "memory": to.Ptr("8Gi"), }, }, }, }, }, }, LicenseType: to.Ptr(armazurearcdata.ArcSQLManagedInstanceLicenseTypeLicenseIncluded), StartTime: to.Ptr("Instance start time"), }, SKU: &armazurearcdata.SQLManagedInstanceSKU{ Name: to.Ptr("vCore"), Dev: to.Ptr(true), Tier: to.Ptr(armazurearcdata.SQLManagedInstanceSKUTierGeneralPurpose), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SQLManagedInstance = armazurearcdata.SQLManagedInstance{ // Name: to.Ptr("testsqlManagedInstance"), // Type: to.Ptr("Microsoft.AzureArcData/sqlManagedInstances"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/sqlManagedInstances/testsqlManagedInstance"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Tags: map[string]*string{ // "mytag": to.Ptr("myval"), // }, // ExtendedLocation: &armazurearcdata.ExtendedLocation{ // Name: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.ExtendedLocation/customLocations/arclocation"), // Type: to.Ptr(armazurearcdata.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurearcdata.SQLManagedInstanceProperties{ // ActiveDirectoryInformation: &armazurearcdata.ActiveDirectoryInformation{ // KeytabInformation: &armazurearcdata.KeytabInformation{ // }, // }, // Admin: to.Ptr("Admin user"), // BasicLoginInformation: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // ClusterID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s"), // EndTime: to.Ptr("Instance end time"), // ExtensionID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s/providers/Microsoft.KubernetesConfiguration/extensions/extension"), // K8SRaw: &armazurearcdata.SQLManagedInstanceK8SRaw{ // AdditionalProperties: map[string]any{ // "additionalProperty": float64(1234), // }, // Spec: &armazurearcdata.SQLManagedInstanceK8SSpec{ // Replicas: to.Ptr[int32](1), // Scheduling: &armazurearcdata.K8SScheduling{ // Default: &armazurearcdata.K8SSchedulingOptions{ // Resources: &armazurearcdata.K8SResourceRequirements{ // Limits: map[string]*string{ // "additionalProperty": to.Ptr("additionalValue"), // "cpu": to.Ptr("1"), // "memory": to.Ptr("8Gi"), // }, // Requests: map[string]*string{ // "additionalProperty": to.Ptr("additionalValue"), // "cpu": to.Ptr("1"), // "memory": to.Ptr("8Gi"), // }, // }, // }, // }, // }, // }, // LicenseType: to.Ptr(armazurearcdata.ArcSQLManagedInstanceLicenseTypeLicenseIncluded), // StartTime: to.Ptr("Instance start time"), // }, // SKU: &armazurearcdata.SQLManagedInstanceSKU{ // Name: to.Ptr("vCore"), // Dev: to.Ptr(true), // Tier: to.Ptr(armazurearcdata.SQLManagedInstanceSKUTierGeneralPurpose), // }, // } }
Output:
func (*SQLManagedInstancesClient) BeginDelete ¶
func (client *SQLManagedInstancesClient) BeginDelete(ctx context.Context, resourceGroupName string, sqlManagedInstanceName string, options *SQLManagedInstancesClientBeginDeleteOptions) (*runtime.Poller[SQLManagedInstancesClientDeleteResponse], error)
BeginDelete - Deletes a SQL Managed Instance resource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-03-01-preview
- resourceGroupName - The name of the Azure resource group
- sqlManagedInstanceName - Name of SQL Managed Instance
- options - SQLManagedInstancesClientBeginDeleteOptions contains the optional parameters for the SQLManagedInstancesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/DeleteSqlManagedInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurearcdata/armazurearcdata" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurearcdata.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSQLManagedInstancesClient().BeginDelete(ctx, "testrg", "testsqlManagedInstance", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*SQLManagedInstancesClient) Get ¶
func (client *SQLManagedInstancesClient) Get(ctx context.Context, resourceGroupName string, sqlManagedInstanceName string, options *SQLManagedInstancesClientGetOptions) (SQLManagedInstancesClientGetResponse, error)
Get - Retrieves a SQL Managed Instance resource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-03-01-preview
- resourceGroupName - The name of the Azure resource group
- sqlManagedInstanceName - Name of SQL Managed Instance
- options - SQLManagedInstancesClientGetOptions contains the optional parameters for the SQLManagedInstancesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/GetSqlManagedInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurearcdata/armazurearcdata" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurearcdata.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSQLManagedInstancesClient().Get(ctx, "testrg", "testsqlManagedInstance", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SQLManagedInstance = armazurearcdata.SQLManagedInstance{ // Name: to.Ptr("testsqlManagedInstance"), // Type: to.Ptr("Microsoft.AzureArcData/sqlManagedInstance"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/sqlManagedInstances/testsqlManagedInstance"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Tags: map[string]*string{ // "mytag": to.Ptr("myval"), // }, // ExtendedLocation: &armazurearcdata.ExtendedLocation{ // Name: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.ExtendedLocation/customLocations/arclocation"), // Type: to.Ptr(armazurearcdata.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurearcdata.SQLManagedInstanceProperties{ // ActiveDirectoryInformation: &armazurearcdata.ActiveDirectoryInformation{ // KeytabInformation: &armazurearcdata.KeytabInformation{ // }, // }, // Admin: to.Ptr("Admin user"), // BasicLoginInformation: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // ClusterID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s"), // EndTime: to.Ptr("Instance end time"), // ExtensionID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s/providers/Microsoft.KubernetesConfiguration/extensions/extension"), // K8SRaw: &armazurearcdata.SQLManagedInstanceK8SRaw{ // AdditionalProperties: map[string]any{ // "additionalProperty": float64(1234), // }, // Spec: &armazurearcdata.SQLManagedInstanceK8SSpec{ // Replicas: to.Ptr[int32](1), // Scheduling: &armazurearcdata.K8SScheduling{ // Default: &armazurearcdata.K8SSchedulingOptions{ // Resources: &armazurearcdata.K8SResourceRequirements{ // Limits: map[string]*string{ // "additionalProperty": to.Ptr("additionalValue"), // "cpu": to.Ptr("1"), // "memory": to.Ptr("8Gi"), // }, // Requests: map[string]*string{ // "additionalProperty": to.Ptr("additionalValue"), // "cpu": to.Ptr("1"), // "memory": to.Ptr("8Gi"), // }, // }, // }, // }, // }, // }, // LicenseType: to.Ptr(armazurearcdata.ArcSQLManagedInstanceLicenseTypeLicenseIncluded), // StartTime: to.Ptr("Instance start time"), // }, // SKU: &armazurearcdata.SQLManagedInstanceSKU{ // Name: to.Ptr("vCore"), // Dev: to.Ptr(true), // Tier: to.Ptr(armazurearcdata.SQLManagedInstanceSKUTierGeneralPurpose), // }, // } }
Output:
func (*SQLManagedInstancesClient) NewListByResourceGroupPager ¶ added in v0.4.0
func (client *SQLManagedInstancesClient) NewListByResourceGroupPager(resourceGroupName string, options *SQLManagedInstancesClientListByResourceGroupOptions) *runtime.Pager[SQLManagedInstancesClientListByResourceGroupResponse]
NewListByResourceGroupPager - Gets all sqlManagedInstances in a resource group.
Generated from API version 2022-03-01-preview
- resourceGroupName - The name of the Azure resource group
- options - SQLManagedInstancesClientListByResourceGroupOptions contains the optional parameters for the SQLManagedInstancesClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/ListByResourceGroupSqlManagedInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurearcdata/armazurearcdata" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurearcdata.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSQLManagedInstancesClient().NewListByResourceGroupPager("testrg", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SQLManagedInstanceListResult = armazurearcdata.SQLManagedInstanceListResult{ // Value: []*armazurearcdata.SQLManagedInstance{ // { // Name: to.Ptr("sqlManagedInstances1"), // Type: to.Ptr("Microsoft.AzureArcData/sqlManagedInstances"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/sqlManagedInstances/sqlManagedInstance1"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Tags: map[string]*string{ // "mytag": to.Ptr("myval"), // }, // ExtendedLocation: &armazurearcdata.ExtendedLocation{ // Name: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.ExtendedLocation/customLocations/arclocation"), // Type: to.Ptr(armazurearcdata.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurearcdata.SQLManagedInstanceProperties{ // ActiveDirectoryInformation: &armazurearcdata.ActiveDirectoryInformation{ // KeytabInformation: &armazurearcdata.KeytabInformation{ // }, // }, // Admin: to.Ptr("Admin user"), // BasicLoginInformation: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // EndTime: to.Ptr("Instance end time"), // K8SRaw: &armazurearcdata.SQLManagedInstanceK8SRaw{ // AdditionalProperties: map[string]any{ // "additionalProperty": float64(1234), // }, // Spec: &armazurearcdata.SQLManagedInstanceK8SSpec{ // Replicas: to.Ptr[int32](1), // Scheduling: &armazurearcdata.K8SScheduling{ // Default: &armazurearcdata.K8SSchedulingOptions{ // Resources: &armazurearcdata.K8SResourceRequirements{ // Limits: map[string]*string{ // "additionalProperty": to.Ptr("additionalValue"), // "cpu": to.Ptr("1"), // "memory": to.Ptr("8Gi"), // }, // Requests: map[string]*string{ // "additionalProperty": to.Ptr("additionalValue"), // "cpu": to.Ptr("1"), // "memory": to.Ptr("8Gi"), // }, // }, // }, // }, // }, // }, // LicenseType: to.Ptr(armazurearcdata.ArcSQLManagedInstanceLicenseTypeLicenseIncluded), // StartTime: to.Ptr("Instance start time"), // }, // SKU: &armazurearcdata.SQLManagedInstanceSKU{ // Name: to.Ptr("vCore"), // Dev: to.Ptr(true), // Tier: to.Ptr(armazurearcdata.SQLManagedInstanceSKUTierGeneralPurpose), // }, // }, // { // Name: to.Ptr("sqlManagedInstances2"), // Type: to.Ptr("Microsoft.AzureArcData/sqlManagedInstances"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/sqlManagedInstances/sqlManagedInstance2"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Tags: map[string]*string{ // "mytag": to.Ptr("myval"), // }, // ExtendedLocation: &armazurearcdata.ExtendedLocation{ // Name: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.ExtendedLocation/customLocations/arclocation"), // Type: to.Ptr(armazurearcdata.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurearcdata.SQLManagedInstanceProperties{ // ActiveDirectoryInformation: &armazurearcdata.ActiveDirectoryInformation{ // KeytabInformation: &armazurearcdata.KeytabInformation{ // }, // }, // Admin: to.Ptr("Admin user"), // BasicLoginInformation: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // ClusterID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s"), // EndTime: to.Ptr("Instance end time"), // ExtensionID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s/providers/Microsoft.KubernetesConfiguration/extensions/extension"), // K8SRaw: &armazurearcdata.SQLManagedInstanceK8SRaw{ // AdditionalProperties: map[string]any{ // "additionalProperty": float64(1234), // }, // Spec: &armazurearcdata.SQLManagedInstanceK8SSpec{ // Replicas: to.Ptr[int32](1), // Scheduling: &armazurearcdata.K8SScheduling{ // Default: &armazurearcdata.K8SSchedulingOptions{ // Resources: &armazurearcdata.K8SResourceRequirements{ // Limits: map[string]*string{ // "additionalProperty": to.Ptr("additionalValue"), // "cpu": to.Ptr("1"), // "memory": to.Ptr("8Gi"), // }, // Requests: map[string]*string{ // "additionalProperty": to.Ptr("additionalValue"), // "cpu": to.Ptr("1"), // "memory": to.Ptr("8Gi"), // }, // }, // }, // }, // }, // }, // LicenseType: to.Ptr(armazurearcdata.ArcSQLManagedInstanceLicenseTypeLicenseIncluded), // StartTime: to.Ptr("Instance start time"), // }, // SKU: &armazurearcdata.SQLManagedInstanceSKU{ // Name: to.Ptr("vCore"), // Dev: to.Ptr(true), // Tier: to.Ptr(armazurearcdata.SQLManagedInstanceSKUTierGeneralPurpose), // }, // }}, // } } }
Output:
func (*SQLManagedInstancesClient) NewListPager ¶ added in v0.4.0
func (client *SQLManagedInstancesClient) NewListPager(options *SQLManagedInstancesClientListOptions) *runtime.Pager[SQLManagedInstancesClientListResponse]
NewListPager - List sqlManagedInstance resources in the subscription
Generated from API version 2022-03-01-preview
- options - SQLManagedInstancesClientListOptions contains the optional parameters for the SQLManagedInstancesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/ListSubscriptionSqlManagedInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurearcdata/armazurearcdata" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurearcdata.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSQLManagedInstancesClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SQLManagedInstanceListResult = armazurearcdata.SQLManagedInstanceListResult{ // Value: []*armazurearcdata.SQLManagedInstance{ // { // Name: to.Ptr("sqlManagedInstances1"), // Type: to.Ptr("Microsoft.AzureArcData/sqlManagedInstances"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/SqlManagedInstances/sqlManagedInstance1"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Tags: map[string]*string{ // "mytag": to.Ptr("myval"), // }, // ExtendedLocation: &armazurearcdata.ExtendedLocation{ // Name: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.ExtendedLocation/customLocations/arclocation"), // Type: to.Ptr(armazurearcdata.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurearcdata.SQLManagedInstanceProperties{ // ActiveDirectoryInformation: &armazurearcdata.ActiveDirectoryInformation{ // KeytabInformation: &armazurearcdata.KeytabInformation{ // }, // }, // Admin: to.Ptr("Admin user"), // BasicLoginInformation: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // ClusterID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s"), // EndTime: to.Ptr("Instance end time"), // ExtensionID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s/providers/Microsoft.KubernetesConfiguration/extensions/extension"), // K8SRaw: &armazurearcdata.SQLManagedInstanceK8SRaw{ // AdditionalProperties: map[string]any{ // "additionalProperty": float64(1234), // }, // Spec: &armazurearcdata.SQLManagedInstanceK8SSpec{ // Replicas: to.Ptr[int32](1), // Scheduling: &armazurearcdata.K8SScheduling{ // Default: &armazurearcdata.K8SSchedulingOptions{ // Resources: &armazurearcdata.K8SResourceRequirements{ // Limits: map[string]*string{ // "additionalProperty": to.Ptr("additionalValue"), // "cpu": to.Ptr("1"), // "memory": to.Ptr("8Gi"), // }, // Requests: map[string]*string{ // "additionalProperty": to.Ptr("additionalValue"), // "cpu": to.Ptr("1"), // "memory": to.Ptr("8Gi"), // }, // }, // }, // }, // }, // }, // LicenseType: to.Ptr(armazurearcdata.ArcSQLManagedInstanceLicenseTypeLicenseIncluded), // StartTime: to.Ptr("Instance start time"), // }, // SKU: &armazurearcdata.SQLManagedInstanceSKU{ // Name: to.Ptr("vCore"), // Dev: to.Ptr(true), // Tier: to.Ptr(armazurearcdata.SQLManagedInstanceSKUTierGeneralPurpose), // }, // }, // { // Name: to.Ptr("sqlManagedInstances2"), // Type: to.Ptr("Microsoft.AzureArcData/sqlManagedInstances"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/SqlManagedInstances/sqlManagedInstance2"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Tags: map[string]*string{ // "mytag": to.Ptr("myval"), // }, // ExtendedLocation: &armazurearcdata.ExtendedLocation{ // Name: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.ExtendedLocation/customLocations/arclocation"), // Type: to.Ptr(armazurearcdata.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurearcdata.SQLManagedInstanceProperties{ // ActiveDirectoryInformation: &armazurearcdata.ActiveDirectoryInformation{ // KeytabInformation: &armazurearcdata.KeytabInformation{ // }, // }, // Admin: to.Ptr("Admin user"), // BasicLoginInformation: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // ClusterID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s"), // EndTime: to.Ptr("Instance end time"), // ExtensionID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s/providers/Microsoft.KubernetesConfiguration/extensions/extension"), // K8SRaw: &armazurearcdata.SQLManagedInstanceK8SRaw{ // AdditionalProperties: map[string]any{ // "additionalProperty": float64(1234), // }, // Spec: &armazurearcdata.SQLManagedInstanceK8SSpec{ // Replicas: to.Ptr[int32](1), // Scheduling: &armazurearcdata.K8SScheduling{ // Default: &armazurearcdata.K8SSchedulingOptions{ // Resources: &armazurearcdata.K8SResourceRequirements{ // Limits: map[string]*string{ // "additionalProperty": to.Ptr("additionalValue"), // "cpu": to.Ptr("1"), // "memory": to.Ptr("8Gi"), // }, // Requests: map[string]*string{ // "additionalProperty": to.Ptr("additionalValue"), // "cpu": to.Ptr("1"), // "memory": to.Ptr("8Gi"), // }, // }, // }, // }, // }, // }, // LicenseType: to.Ptr(armazurearcdata.ArcSQLManagedInstanceLicenseTypeLicenseIncluded), // StartTime: to.Ptr("Instance start time"), // }, // SKU: &armazurearcdata.SQLManagedInstanceSKU{ // Name: to.Ptr("vCore"), // Dev: to.Ptr(true), // Tier: to.Ptr(armazurearcdata.SQLManagedInstanceSKUTierGeneralPurpose), // }, // }}, // } } }
Output:
func (*SQLManagedInstancesClient) Update ¶
func (client *SQLManagedInstancesClient) Update(ctx context.Context, resourceGroupName string, sqlManagedInstanceName string, parameters SQLManagedInstanceUpdate, options *SQLManagedInstancesClientUpdateOptions) (SQLManagedInstancesClientUpdateResponse, error)
Update - Updates a SQL Managed Instance resource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-03-01-preview
- resourceGroupName - The name of the Azure resource group
- sqlManagedInstanceName - Name of SQL Managed Instance
- parameters - The SQL Managed Instance.
- options - SQLManagedInstancesClientUpdateOptions contains the optional parameters for the SQLManagedInstancesClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/UpdateSqlManagedInstance.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/azurearcdata/armazurearcdata" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurearcdata.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSQLManagedInstancesClient().Update(ctx, "testrg", "testsqlManagedInstance", armazurearcdata.SQLManagedInstanceUpdate{ Tags: map[string]*string{ "mytag": to.Ptr("myval"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SQLManagedInstance = armazurearcdata.SQLManagedInstance{ // Name: to.Ptr("testsqlManagedInstance"), // Type: to.Ptr("Microsoft.AzureArcData/sqlManagedInstances"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/sqlManagedInstances/testsqlManagedInstance"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // ExtendedLocation: &armazurearcdata.ExtendedLocation{ // Name: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.ExtendedLocation/customLocations/arclocation"), // Type: to.Ptr(armazurearcdata.ExtendedLocationTypesCustomLocation), // }, // Properties: &armazurearcdata.SQLManagedInstanceProperties{ // ActiveDirectoryInformation: &armazurearcdata.ActiveDirectoryInformation{ // KeytabInformation: &armazurearcdata.KeytabInformation{ // }, // }, // Admin: to.Ptr("Admin user"), // BasicLoginInformation: &armazurearcdata.BasicLoginInformation{ // Username: to.Ptr("username"), // }, // ClusterID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s"), // EndTime: to.Ptr("Instance end time"), // ExtensionID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/connectedk8s/providers/Microsoft.KubernetesConfiguration/extensions/extension"), // K8SRaw: &armazurearcdata.SQLManagedInstanceK8SRaw{ // AdditionalProperties: map[string]any{ // "additionalProperty": float64(1234), // }, // Spec: &armazurearcdata.SQLManagedInstanceK8SSpec{ // Replicas: to.Ptr[int32](1), // Scheduling: &armazurearcdata.K8SScheduling{ // Default: &armazurearcdata.K8SSchedulingOptions{ // Resources: &armazurearcdata.K8SResourceRequirements{ // Limits: map[string]*string{ // "additionalProperty": to.Ptr("additionalValue"), // "cpu": to.Ptr("1"), // "memory": to.Ptr("8Gi"), // }, // Requests: map[string]*string{ // "additionalProperty": to.Ptr("additionalValue"), // "cpu": to.Ptr("1"), // "memory": to.Ptr("8Gi"), // }, // }, // }, // }, // }, // }, // LicenseType: to.Ptr(armazurearcdata.ArcSQLManagedInstanceLicenseTypeLicenseIncluded), // StartTime: to.Ptr("Instance start time"), // }, // SKU: &armazurearcdata.SQLManagedInstanceSKU{ // Name: to.Ptr("vCore"), // Dev: to.Ptr(true), // Tier: to.Ptr(armazurearcdata.SQLManagedInstanceSKUTierGeneralPurpose), // }, // } }
Output:
type SQLManagedInstancesClientBeginCreateOptions ¶ added in v0.2.0
type SQLManagedInstancesClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLManagedInstancesClientBeginCreateOptions contains the optional parameters for the SQLManagedInstancesClient.BeginCreate method.
type SQLManagedInstancesClientBeginDeleteOptions ¶ added in v0.2.0
type SQLManagedInstancesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLManagedInstancesClientBeginDeleteOptions contains the optional parameters for the SQLManagedInstancesClient.BeginDelete method.
type SQLManagedInstancesClientCreateResponse ¶ added in v0.2.0
type SQLManagedInstancesClientCreateResponse struct { // A SqlManagedInstance. SQLManagedInstance }
SQLManagedInstancesClientCreateResponse contains the response from method SQLManagedInstancesClient.BeginCreate.
type SQLManagedInstancesClientDeleteResponse ¶ added in v0.2.0
type SQLManagedInstancesClientDeleteResponse struct { }
SQLManagedInstancesClientDeleteResponse contains the response from method SQLManagedInstancesClient.BeginDelete.
type SQLManagedInstancesClientGetOptions ¶ added in v0.2.0
type SQLManagedInstancesClientGetOptions struct { }
SQLManagedInstancesClientGetOptions contains the optional parameters for the SQLManagedInstancesClient.Get method.
type SQLManagedInstancesClientGetResponse ¶ added in v0.2.0
type SQLManagedInstancesClientGetResponse struct { // A SqlManagedInstance. SQLManagedInstance }
SQLManagedInstancesClientGetResponse contains the response from method SQLManagedInstancesClient.Get.
type SQLManagedInstancesClientListByResourceGroupOptions ¶ added in v0.2.0
type SQLManagedInstancesClientListByResourceGroupOptions struct { }
SQLManagedInstancesClientListByResourceGroupOptions contains the optional parameters for the SQLManagedInstancesClient.NewListByResourceGroupPager method.
type SQLManagedInstancesClientListByResourceGroupResponse ¶ added in v0.2.0
type SQLManagedInstancesClientListByResourceGroupResponse struct { // A list of SqlManagedInstance. SQLManagedInstanceListResult }
SQLManagedInstancesClientListByResourceGroupResponse contains the response from method SQLManagedInstancesClient.NewListByResourceGroupPager.
type SQLManagedInstancesClientListOptions ¶ added in v0.2.0
type SQLManagedInstancesClientListOptions struct { }
SQLManagedInstancesClientListOptions contains the optional parameters for the SQLManagedInstancesClient.NewListPager method.
type SQLManagedInstancesClientListResponse ¶ added in v0.2.0
type SQLManagedInstancesClientListResponse struct { // A list of SqlManagedInstance. SQLManagedInstanceListResult }
SQLManagedInstancesClientListResponse contains the response from method SQLManagedInstancesClient.NewListPager.
type SQLManagedInstancesClientUpdateOptions ¶ added in v0.2.0
type SQLManagedInstancesClientUpdateOptions struct { }
SQLManagedInstancesClientUpdateOptions contains the optional parameters for the SQLManagedInstancesClient.Update method.
type SQLManagedInstancesClientUpdateResponse ¶ added in v0.2.0
type SQLManagedInstancesClientUpdateResponse struct { // A SqlManagedInstance. SQLManagedInstance }
SQLManagedInstancesClientUpdateResponse contains the response from method SQLManagedInstancesClient.Update.
type SQLServerInstance ¶
type SQLServerInstance struct { // REQUIRED; The geo-location where the resource lives Location *string // null Properties *SQLServerInstanceProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
SQLServerInstance - A SqlServerInstance.
func (SQLServerInstance) MarshalJSON ¶
func (s SQLServerInstance) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLServerInstance.
func (*SQLServerInstance) UnmarshalJSON ¶ added in v0.6.0
func (s *SQLServerInstance) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLServerInstance.
type SQLServerInstanceListResult ¶
type SQLServerInstanceListResult struct { // READ-ONLY; Link to retrieve next page of results. NextLink *string // READ-ONLY; Array of results. Value []*SQLServerInstance }
SQLServerInstanceListResult - A list of SqlServerInstance.
func (SQLServerInstanceListResult) MarshalJSON ¶
func (s SQLServerInstanceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLServerInstanceListResult.
func (*SQLServerInstanceListResult) UnmarshalJSON ¶ added in v0.6.0
func (s *SQLServerInstanceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLServerInstanceListResult.
type SQLServerInstanceProperties ¶
type SQLServerInstanceProperties struct { // REQUIRED; ARM Resource id of the container resource (Azure Arc for Servers). ContainerResourceID *string // REQUIRED; The cloud connectivity status. Status *ConnectionStatus // Status of Azure Defender. AzureDefenderStatus *DefenderStatus // Timestamp of last Azure Defender status update. AzureDefenderStatusLastUpdated *time.Time // SQL Server collation. Collation *string // SQL Server current version. CurrentVersion *string // SQL Server edition. Edition *EditionType // Type of host for Azure Arc SQL Server HostType *HostType // SQL Server instance name. InstanceName *string // SQL Server license type. LicenseType *ArcSQLServerLicenseType // SQL Server update level. PatchLevel *string // SQL Server product ID. ProductID *string // Dynamic TCP ports used by SQL Server. TCPDynamicPorts *string // Static TCP ports used by SQL Server. TCPStaticPorts *string // The number of logical processors used by the SQL Server instance. VCore *string // SQL Server version. Version *SQLVersion // READ-ONLY; The time when the resource was created. CreateTime *string // READ-ONLY; The provisioning state of the Arc-enabled SQL Server resource. ProvisioningState *string }
SQLServerInstanceProperties - Properties of SqlServerInstance.
func (SQLServerInstanceProperties) MarshalJSON ¶
func (s SQLServerInstanceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLServerInstanceProperties.
func (*SQLServerInstanceProperties) UnmarshalJSON ¶
func (s *SQLServerInstanceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLServerInstanceProperties.
type SQLServerInstanceUpdate ¶
SQLServerInstanceUpdate - An update to a SQL Server Instance.
func (SQLServerInstanceUpdate) MarshalJSON ¶
func (s SQLServerInstanceUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SQLServerInstanceUpdate.
func (*SQLServerInstanceUpdate) UnmarshalJSON ¶ added in v0.6.0
func (s *SQLServerInstanceUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SQLServerInstanceUpdate.
type SQLServerInstancesClient ¶
type SQLServerInstancesClient struct {
// contains filtered or unexported fields
}
SQLServerInstancesClient contains the methods for the SQLServerInstances group. Don't use this type directly, use NewSQLServerInstancesClient() instead.
func NewSQLServerInstancesClient ¶
func NewSQLServerInstancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SQLServerInstancesClient, error)
NewSQLServerInstancesClient creates a new instance of SQLServerInstancesClient with the specified values.
- subscriptionID - The ID of the Azure subscription
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*SQLServerInstancesClient) BeginCreate ¶
func (client *SQLServerInstancesClient) BeginCreate(ctx context.Context, resourceGroupName string, sqlServerInstanceName string, sqlServerInstance SQLServerInstance, options *SQLServerInstancesClientBeginCreateOptions) (*runtime.Poller[SQLServerInstancesClientCreateResponse], error)
BeginCreate - Creates or replaces a SQL Server Instance resource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-03-01-preview
- resourceGroupName - The name of the Azure resource group
- sqlServerInstanceName - Name of SQL Server Instance
- sqlServerInstance - The SQL Server Instance to be created or updated.
- options - SQLServerInstancesClientBeginCreateOptions contains the optional parameters for the SQLServerInstancesClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/CreateOrUpdateSqlServerInstance.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/azurearcdata/armazurearcdata" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurearcdata.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSQLServerInstancesClient().BeginCreate(ctx, "testrg", "testsqlServerInstance", armazurearcdata.SQLServerInstance{ Location: to.Ptr("northeurope"), Tags: map[string]*string{ "mytag": to.Ptr("myval"), }, Properties: &armazurearcdata.SQLServerInstanceProperties{ AzureDefenderStatus: to.Ptr(armazurearcdata.DefenderStatusProtected), AzureDefenderStatusLastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t }()), Collation: to.Ptr("collation"), ContainerResourceID: to.Ptr("Resource id of hosting Arc Machine"), CurrentVersion: to.Ptr("2012"), Edition: to.Ptr(armazurearcdata.EditionTypeDeveloper), HostType: to.Ptr(armazurearcdata.HostTypePhysicalServer), InstanceName: to.Ptr("name of instance"), LicenseType: to.Ptr(armazurearcdata.ArcSQLServerLicenseTypeFree), PatchLevel: to.Ptr("patchlevel"), ProductID: to.Ptr("sql id"), Status: to.Ptr(armazurearcdata.ConnectionStatusRegistered), TCPDynamicPorts: to.Ptr("1433"), TCPStaticPorts: to.Ptr("1433"), VCore: to.Ptr("4"), Version: to.Ptr(armazurearcdata.SQLVersionSQLServer2012), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SQLServerInstance = armazurearcdata.SQLServerInstance{ // Name: to.Ptr("testsqlServerInstance"), // Type: to.Ptr("Microsoft.AzureArcData/SqlServerInstances"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/SqlServerInstances/testsqlServerInstance"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Tags: map[string]*string{ // "mytag": to.Ptr("myval"), // }, // Properties: &armazurearcdata.SQLServerInstanceProperties{ // AzureDefenderStatus: to.Ptr(armazurearcdata.DefenderStatusProtected), // AzureDefenderStatusLastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // Collation: to.Ptr("collation"), // ContainerResourceID: to.Ptr("Resource id of hosting Arc Machine"), // CreateTime: to.Ptr("01/01/2020 01:01:01"), // CurrentVersion: to.Ptr("2012"), // Edition: to.Ptr(armazurearcdata.EditionTypeDeveloper), // HostType: to.Ptr(armazurearcdata.HostTypePhysicalServer), // InstanceName: to.Ptr("name of instance"), // LicenseType: to.Ptr(armazurearcdata.ArcSQLServerLicenseTypeFree), // PatchLevel: to.Ptr("patchlevel"), // ProductID: to.Ptr("sql id"), // Status: to.Ptr(armazurearcdata.ConnectionStatusRegistered), // TCPDynamicPorts: to.Ptr("1433"), // TCPStaticPorts: to.Ptr("1433"), // VCore: to.Ptr("4"), // Version: to.Ptr(armazurearcdata.SQLVersionSQLServer2012), // }, // } }
Output:
func (*SQLServerInstancesClient) BeginDelete ¶
func (client *SQLServerInstancesClient) BeginDelete(ctx context.Context, resourceGroupName string, sqlServerInstanceName string, options *SQLServerInstancesClientBeginDeleteOptions) (*runtime.Poller[SQLServerInstancesClientDeleteResponse], error)
BeginDelete - Deletes a SQL Server Instance resource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-03-01-preview
- resourceGroupName - The name of the Azure resource group
- sqlServerInstanceName - Name of SQL Server Instance
- options - SQLServerInstancesClientBeginDeleteOptions contains the optional parameters for the SQLServerInstancesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/DeleteSqlServerInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurearcdata/armazurearcdata" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurearcdata.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewSQLServerInstancesClient().BeginDelete(ctx, "testrg", "testsqlServerInstance", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*SQLServerInstancesClient) Get ¶
func (client *SQLServerInstancesClient) Get(ctx context.Context, resourceGroupName string, sqlServerInstanceName string, options *SQLServerInstancesClientGetOptions) (SQLServerInstancesClientGetResponse, error)
Get - Retrieves a SQL Server Instance resource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-03-01-preview
- resourceGroupName - The name of the Azure resource group
- sqlServerInstanceName - Name of SQL Server Instance
- options - SQLServerInstancesClientGetOptions contains the optional parameters for the SQLServerInstancesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/GetSqlServerInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurearcdata/armazurearcdata" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurearcdata.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSQLServerInstancesClient().Get(ctx, "testrg", "testsqlServerInstance", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SQLServerInstance = armazurearcdata.SQLServerInstance{ // Name: to.Ptr("testsqlServerInstance"), // Type: to.Ptr("Microsoft.AzureArcData/SqlServerInstances"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/SqlServerInstances/testsqlServerInstance"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Tags: map[string]*string{ // "mytag": to.Ptr("myval"), // }, // Properties: &armazurearcdata.SQLServerInstanceProperties{ // AzureDefenderStatus: to.Ptr(armazurearcdata.DefenderStatusProtected), // AzureDefenderStatusLastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // Collation: to.Ptr("collation"), // ContainerResourceID: to.Ptr("Resource id of hosting Arc Machine"), // CreateTime: to.Ptr("01/01/2020 01:01:01"), // CurrentVersion: to.Ptr("2012"), // Edition: to.Ptr(armazurearcdata.EditionTypeDeveloper), // HostType: to.Ptr(armazurearcdata.HostTypePhysicalServer), // InstanceName: to.Ptr("name of instance"), // LicenseType: to.Ptr(armazurearcdata.ArcSQLServerLicenseTypeFree), // PatchLevel: to.Ptr("patchlevel"), // ProductID: to.Ptr("sql id"), // Status: to.Ptr(armazurearcdata.ConnectionStatusRegistered), // TCPDynamicPorts: to.Ptr("1433"), // TCPStaticPorts: to.Ptr("1433"), // VCore: to.Ptr("4"), // Version: to.Ptr(armazurearcdata.SQLVersionSQLServer2012), // }, // } }
Output:
func (*SQLServerInstancesClient) NewListByResourceGroupPager ¶ added in v0.4.0
func (client *SQLServerInstancesClient) NewListByResourceGroupPager(resourceGroupName string, options *SQLServerInstancesClientListByResourceGroupOptions) *runtime.Pager[SQLServerInstancesClientListByResourceGroupResponse]
NewListByResourceGroupPager - Gets all sqlServerInstances in a resource group.
Generated from API version 2022-03-01-preview
- resourceGroupName - The name of the Azure resource group
- options - SQLServerInstancesClientListByResourceGroupOptions contains the optional parameters for the SQLServerInstancesClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/ListByResourceGroupSqlServerInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurearcdata/armazurearcdata" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurearcdata.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSQLServerInstancesClient().NewListByResourceGroupPager("testrg", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SQLServerInstanceListResult = armazurearcdata.SQLServerInstanceListResult{ // Value: []*armazurearcdata.SQLServerInstance{ // { // Name: to.Ptr("sqlServerInstance1"), // Type: to.Ptr("Microsoft.AzureArcData/SqlServerInstances"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/SqlServerInstances/sqlServerInstance1"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Tags: map[string]*string{ // "mytag": to.Ptr("myval"), // }, // Properties: &armazurearcdata.SQLServerInstanceProperties{ // AzureDefenderStatus: to.Ptr(armazurearcdata.DefenderStatusProtected), // AzureDefenderStatusLastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // Collation: to.Ptr("collation"), // ContainerResourceID: to.Ptr("Resource id of hosting Arc Machine"), // CreateTime: to.Ptr("01/01/2020 01:01:01"), // CurrentVersion: to.Ptr("2012"), // Edition: to.Ptr(armazurearcdata.EditionTypeDeveloper), // HostType: to.Ptr(armazurearcdata.HostTypePhysicalServer), // InstanceName: to.Ptr("name of instance"), // LicenseType: to.Ptr(armazurearcdata.ArcSQLServerLicenseTypeFree), // PatchLevel: to.Ptr("patchlevel"), // ProductID: to.Ptr("sql id"), // Status: to.Ptr(armazurearcdata.ConnectionStatusRegistered), // TCPDynamicPorts: to.Ptr("1433"), // TCPStaticPorts: to.Ptr("1433"), // VCore: to.Ptr("4"), // Version: to.Ptr(armazurearcdata.SQLVersionSQLServer2012), // }, // }, // { // Name: to.Ptr("sqlServerInstance2"), // Type: to.Ptr("Microsoft.AzureArcData/SqlServerInstances"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/SqlServerInstances/sqlServerInstance2"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Tags: map[string]*string{ // "mytag": to.Ptr("myval"), // }, // Properties: &armazurearcdata.SQLServerInstanceProperties{ // AzureDefenderStatus: to.Ptr(armazurearcdata.DefenderStatusProtected), // AzureDefenderStatusLastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // Collation: to.Ptr("collation"), // ContainerResourceID: to.Ptr("Arc Machine Name"), // CreateTime: to.Ptr("01/01/2020 01:01:01"), // CurrentVersion: to.Ptr("2008 R2"), // Edition: to.Ptr(armazurearcdata.EditionTypeDeveloper), // InstanceName: to.Ptr("name of instance"), // LicenseType: to.Ptr(armazurearcdata.ArcSQLServerLicenseTypeFree), // PatchLevel: to.Ptr("patchlevel"), // ProductID: to.Ptr("sql id"), // Status: to.Ptr(armazurearcdata.ConnectionStatusConnected), // TCPDynamicPorts: to.Ptr("1433"), // TCPStaticPorts: to.Ptr("1433"), // VCore: to.Ptr("4"), // Version: to.Ptr(armazurearcdata.SQLVersionSQLServer2017), // }, // }}, // } } }
Output:
func (*SQLServerInstancesClient) NewListPager ¶ added in v0.4.0
func (client *SQLServerInstancesClient) NewListPager(options *SQLServerInstancesClientListOptions) *runtime.Pager[SQLServerInstancesClientListResponse]
NewListPager - List sqlServerInstance resources in the subscription
Generated from API version 2022-03-01-preview
- options - SQLServerInstancesClientListOptions contains the optional parameters for the SQLServerInstancesClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/ListSubscriptionSqlServerInstance.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurearcdata/armazurearcdata" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurearcdata.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewSQLServerInstancesClient().NewListPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.SQLServerInstanceListResult = armazurearcdata.SQLServerInstanceListResult{ // Value: []*armazurearcdata.SQLServerInstance{ // { // Name: to.Ptr("sqlServerInstance1"), // Type: to.Ptr("Microsoft.AzureArcData/SqlServerInstances"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/SqlServerInstances/sqlServerInstance1"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Tags: map[string]*string{ // "mytag": to.Ptr("myval"), // }, // Properties: &armazurearcdata.SQLServerInstanceProperties{ // AzureDefenderStatus: to.Ptr(armazurearcdata.DefenderStatusProtected), // AzureDefenderStatusLastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // Collation: to.Ptr("collation"), // ContainerResourceID: to.Ptr("Resource id of hosting Arc Machine"), // CreateTime: to.Ptr("01/01/2020 01:01:01"), // CurrentVersion: to.Ptr("2008 R2"), // Edition: to.Ptr(armazurearcdata.EditionTypeDeveloper), // HostType: to.Ptr(armazurearcdata.HostTypePhysicalServer), // InstanceName: to.Ptr("name of instance"), // LicenseType: to.Ptr(armazurearcdata.ArcSQLServerLicenseTypeFree), // PatchLevel: to.Ptr("patchlevel"), // ProductID: to.Ptr("sql id"), // Status: to.Ptr(armazurearcdata.ConnectionStatusRegistered), // TCPDynamicPorts: to.Ptr("1433"), // TCPStaticPorts: to.Ptr("1433"), // VCore: to.Ptr("4"), // Version: to.Ptr(armazurearcdata.SQLVersionSQLServer2012), // }, // }, // { // Name: to.Ptr("sqlServerInstance2"), // Type: to.Ptr("Microsoft.AzureArcData/SqlServerInstances"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/SqlServerInstances/sqlServerInstance2"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Tags: map[string]*string{ // "mytag": to.Ptr("myval"), // }, // Properties: &armazurearcdata.SQLServerInstanceProperties{ // AzureDefenderStatus: to.Ptr(armazurearcdata.DefenderStatusProtected), // AzureDefenderStatusLastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // Collation: to.Ptr("collation"), // ContainerResourceID: to.Ptr("Arc Machine Name"), // CreateTime: to.Ptr("01/01/2020 01:01:01"), // CurrentVersion: to.Ptr("2008 R2"), // Edition: to.Ptr(armazurearcdata.EditionTypeDeveloper), // InstanceName: to.Ptr("name of instance"), // LicenseType: to.Ptr(armazurearcdata.ArcSQLServerLicenseTypeFree), // PatchLevel: to.Ptr("patchlevel"), // ProductID: to.Ptr("sql id"), // Status: to.Ptr(armazurearcdata.ConnectionStatusConnected), // TCPDynamicPorts: to.Ptr("1433"), // TCPStaticPorts: to.Ptr("1433"), // VCore: to.Ptr("4"), // Version: to.Ptr(armazurearcdata.SQLVersionSQLServer2017), // }, // }}, // } } }
Output:
func (*SQLServerInstancesClient) Update ¶
func (client *SQLServerInstancesClient) Update(ctx context.Context, resourceGroupName string, sqlServerInstanceName string, parameters SQLServerInstanceUpdate, options *SQLServerInstancesClientUpdateOptions) (SQLServerInstancesClientUpdateResponse, error)
Update - Updates a SQL Server Instance resource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-03-01-preview
- resourceGroupName - The name of the Azure resource group
- sqlServerInstanceName - Name of SQL Server Instance
- parameters - The SQL Server Instance.
- options - SQLServerInstancesClientUpdateOptions contains the optional parameters for the SQLServerInstancesClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurearcdata/resource-manager/Microsoft.AzureArcData/preview/2022-03-01-preview/examples/UpdateSqlServerInstance.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/azurearcdata/armazurearcdata" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurearcdata.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewSQLServerInstancesClient().Update(ctx, "testrg", "testsqlServerInstance", armazurearcdata.SQLServerInstanceUpdate{ Tags: map[string]*string{ "mytag": to.Ptr("myval"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.SQLServerInstance = armazurearcdata.SQLServerInstance{ // Name: to.Ptr("testsqlServerInstance"), // Type: to.Ptr("Microsoft.AzureArcData/SqlServerInstances"), // ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureArcData/SqlServerInstances/testsqlServerInstance"), // SystemData: &armazurearcdata.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurearcdata.CreatedByTypeUser), // }, // Location: to.Ptr("northeurope"), // Tags: map[string]*string{ // "mytag": to.Ptr("myval"), // }, // Properties: &armazurearcdata.SQLServerInstanceProperties{ // AzureDefenderStatus: to.Ptr(armazurearcdata.DefenderStatusProtected), // AzureDefenderStatusLastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // Collation: to.Ptr("collation"), // ContainerResourceID: to.Ptr("Resource id of hosting Arc Machine"), // CreateTime: to.Ptr("01/01/2020 01:01:01"), // CurrentVersion: to.Ptr("2012"), // Edition: to.Ptr(armazurearcdata.EditionTypeDeveloper), // HostType: to.Ptr(armazurearcdata.HostTypePhysicalServer), // InstanceName: to.Ptr("name of instance"), // LicenseType: to.Ptr(armazurearcdata.ArcSQLServerLicenseTypeFree), // PatchLevel: to.Ptr("patchlevel"), // ProductID: to.Ptr("sql id"), // Status: to.Ptr(armazurearcdata.ConnectionStatusRegistered), // TCPDynamicPorts: to.Ptr("1433"), // TCPStaticPorts: to.Ptr("1433"), // VCore: to.Ptr("4"), // Version: to.Ptr(armazurearcdata.SQLVersionSQLServer2012), // }, // } }
Output:
type SQLServerInstancesClientBeginCreateOptions ¶ added in v0.2.0
type SQLServerInstancesClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLServerInstancesClientBeginCreateOptions contains the optional parameters for the SQLServerInstancesClient.BeginCreate method.
type SQLServerInstancesClientBeginDeleteOptions ¶ added in v0.2.0
type SQLServerInstancesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
SQLServerInstancesClientBeginDeleteOptions contains the optional parameters for the SQLServerInstancesClient.BeginDelete method.
type SQLServerInstancesClientCreateResponse ¶ added in v0.2.0
type SQLServerInstancesClientCreateResponse struct { // A SqlServerInstance. SQLServerInstance }
SQLServerInstancesClientCreateResponse contains the response from method SQLServerInstancesClient.BeginCreate.
type SQLServerInstancesClientDeleteResponse ¶ added in v0.2.0
type SQLServerInstancesClientDeleteResponse struct { }
SQLServerInstancesClientDeleteResponse contains the response from method SQLServerInstancesClient.BeginDelete.
type SQLServerInstancesClientGetOptions ¶ added in v0.2.0
type SQLServerInstancesClientGetOptions struct { }
SQLServerInstancesClientGetOptions contains the optional parameters for the SQLServerInstancesClient.Get method.
type SQLServerInstancesClientGetResponse ¶ added in v0.2.0
type SQLServerInstancesClientGetResponse struct { // A SqlServerInstance. SQLServerInstance }
SQLServerInstancesClientGetResponse contains the response from method SQLServerInstancesClient.Get.
type SQLServerInstancesClientListByResourceGroupOptions ¶ added in v0.2.0
type SQLServerInstancesClientListByResourceGroupOptions struct { }
SQLServerInstancesClientListByResourceGroupOptions contains the optional parameters for the SQLServerInstancesClient.NewListByResourceGroupPager method.
type SQLServerInstancesClientListByResourceGroupResponse ¶ added in v0.2.0
type SQLServerInstancesClientListByResourceGroupResponse struct { // A list of SqlServerInstance. SQLServerInstanceListResult }
SQLServerInstancesClientListByResourceGroupResponse contains the response from method SQLServerInstancesClient.NewListByResourceGroupPager.
type SQLServerInstancesClientListOptions ¶ added in v0.2.0
type SQLServerInstancesClientListOptions struct { }
SQLServerInstancesClientListOptions contains the optional parameters for the SQLServerInstancesClient.NewListPager method.
type SQLServerInstancesClientListResponse ¶ added in v0.2.0
type SQLServerInstancesClientListResponse struct { // A list of SqlServerInstance. SQLServerInstanceListResult }
SQLServerInstancesClientListResponse contains the response from method SQLServerInstancesClient.NewListPager.
type SQLServerInstancesClientUpdateOptions ¶ added in v0.2.0
type SQLServerInstancesClientUpdateOptions struct { }
SQLServerInstancesClientUpdateOptions contains the optional parameters for the SQLServerInstancesClient.Update method.
type SQLServerInstancesClientUpdateResponse ¶ added in v0.2.0
type SQLServerInstancesClientUpdateResponse struct { // A SqlServerInstance. SQLServerInstance }
SQLServerInstancesClientUpdateResponse contains the response from method SQLServerInstancesClient.Update.
type SQLVersion ¶
type SQLVersion string
SQLVersion - SQL Server version.
const ( SQLVersionSQLServer2012 SQLVersion = "SQL Server 2012" SQLVersionSQLServer2014 SQLVersion = "SQL Server 2014" SQLVersionSQLServer2016 SQLVersion = "SQL Server 2016" SQLVersionSQLServer2017 SQLVersion = "SQL Server 2017" SQLVersionSQLServer2019 SQLVersion = "SQL Server 2019" SQLVersionSQLServer2022 SQLVersion = "SQL Server 2022" SQLVersionUnknown SQLVersion = "Unknown" )
func PossibleSQLVersionValues ¶
func PossibleSQLVersionValues() []SQLVersion
PossibleSQLVersionValues returns the possible values for the SQLVersion const type.
type SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time // The identity that created the resource. CreatedBy *string // The type of identity that created the resource. CreatedByType *CreatedByType // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time // The identity that last modified the resource. LastModifiedBy *string // The type of identity that last modified the resource. LastModifiedByType *CreatedByType }
SystemData - Metadata pertaining to creation and last modification of the resource.
func (SystemData) MarshalJSON ¶
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶
func (s *SystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.
type TrackedResource ¶
type TrackedResource struct { // REQUIRED; The geo-location where the resource lives Location *string // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'
func (TrackedResource) MarshalJSON ¶
func (t TrackedResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TrackedResource.
func (*TrackedResource) UnmarshalJSON ¶ added in v0.6.0
func (t *TrackedResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.
type UploadServicePrincipal ¶
type UploadServicePrincipal struct { // Authority for the service principal. Example: https://login.microsoftonline.com/ Authority *string // Client ID of the service principal for uploading data. ClientID *string // Secret of the service principal ClientSecret *string // Tenant ID of the service principal. TenantID *string }
UploadServicePrincipal - Service principal for uploading billing, metrics and logs.
func (UploadServicePrincipal) MarshalJSON ¶ added in v0.6.0
func (u UploadServicePrincipal) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UploadServicePrincipal.
func (*UploadServicePrincipal) UnmarshalJSON ¶ added in v0.6.0
func (u *UploadServicePrincipal) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UploadServicePrincipal.
type UploadWatermark ¶
type UploadWatermark struct { // Last uploaded date for logs from kubernetes cluster. Defaults to current date time Logs *time.Time // Last uploaded date for metrics from kubernetes cluster. Defaults to current date time Metrics *time.Time // Last uploaded date for usages from kubernetes cluster. Defaults to current date time Usages *time.Time }
UploadWatermark - Properties on upload watermark. Mostly timestamp for each upload data type
func (UploadWatermark) MarshalJSON ¶
func (u UploadWatermark) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UploadWatermark.
func (*UploadWatermark) UnmarshalJSON ¶
func (u *UploadWatermark) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UploadWatermark.