Documentation ¶
Index ¶
- type CitusVersion
- type CloudError
- type CloudErrorBody
- type ConfigurationDataType
- type ConfigurationsClient
- func (client *ConfigurationsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverGroupName string, ...) (*runtime.Poller[ConfigurationsClientUpdateResponse], error)
- func (client *ConfigurationsClient) Get(ctx context.Context, resourceGroupName string, serverGroupName string, ...) (ConfigurationsClientGetResponse, error)
- func (client *ConfigurationsClient) NewListByServerGroupPager(resourceGroupName string, serverGroupName string, ...) *runtime.Pager[ConfigurationsClientListByServerGroupResponse]
- func (client *ConfigurationsClient) NewListByServerPager(resourceGroupName string, serverGroupName string, serverName string, ...) *runtime.Pager[ConfigurationsClientListByServerResponse]
- type ConfigurationsClientBeginUpdateOptions
- type ConfigurationsClientGetOptions
- type ConfigurationsClientGetResponse
- type ConfigurationsClientListByServerGroupOptions
- type ConfigurationsClientListByServerGroupResponse
- type ConfigurationsClientListByServerOptions
- type ConfigurationsClientListByServerResponse
- type ConfigurationsClientUpdateResponse
- type CreateMode
- type CreatedByType
- type FirewallRule
- type FirewallRuleListResult
- type FirewallRuleProperties
- type FirewallRulesClient
- func (client *FirewallRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverGroupName string, ...) (*runtime.Poller[FirewallRulesClientCreateOrUpdateResponse], error)
- func (client *FirewallRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverGroupName string, ...) (*runtime.Poller[FirewallRulesClientDeleteResponse], error)
- func (client *FirewallRulesClient) Get(ctx context.Context, resourceGroupName string, serverGroupName string, ...) (FirewallRulesClientGetResponse, error)
- func (client *FirewallRulesClient) NewListByServerGroupPager(resourceGroupName string, serverGroupName string, ...) *runtime.Pager[FirewallRulesClientListByServerGroupResponse]
- type FirewallRulesClientBeginCreateOrUpdateOptions
- type FirewallRulesClientBeginDeleteOptions
- type FirewallRulesClientCreateOrUpdateResponse
- type FirewallRulesClientDeleteResponse
- type FirewallRulesClientGetOptions
- type FirewallRulesClientGetResponse
- type FirewallRulesClientListByServerGroupOptions
- type FirewallRulesClientListByServerGroupResponse
- type MaintenanceWindow
- type NameAvailability
- type NameAvailabilityRequest
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationOrigin
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type PostgreSQLVersion
- type ProxyResource
- type Resource
- type ResourceProviderType
- type Role
- type RoleListResult
- type RoleProperties
- type RolesClient
- func (client *RolesClient) BeginCreate(ctx context.Context, resourceGroupName string, serverGroupName string, ...) (*runtime.Poller[RolesClientCreateResponse], error)
- func (client *RolesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverGroupName string, ...) (*runtime.Poller[RolesClientDeleteResponse], error)
- func (client *RolesClient) NewListByServerGroupPager(resourceGroupName string, serverGroupName string, ...) *runtime.Pager[RolesClientListByServerGroupResponse]
- type RolesClientBeginCreateOptions
- type RolesClientBeginDeleteOptions
- type RolesClientCreateResponse
- type RolesClientDeleteResponse
- type RolesClientListByServerGroupOptions
- type RolesClientListByServerGroupResponse
- type ServerConfiguration
- type ServerConfigurationListResult
- type ServerConfigurationProperties
- type ServerEdition
- type ServerGroup
- type ServerGroupConfiguration
- type ServerGroupConfigurationListResult
- type ServerGroupConfigurationProperties
- type ServerGroupForUpdate
- type ServerGroupListResult
- type ServerGroupProperties
- type ServerGroupPropertiesDelegatedSubnetArguments
- type ServerGroupPropertiesForUpdate
- type ServerGroupPropertiesPrivateDNSZoneArguments
- type ServerGroupServer
- type ServerGroupServerListResult
- type ServerGroupServerProperties
- type ServerGroupsClient
- func (client *ServerGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverGroupName string, ...) (*runtime.Poller[ServerGroupsClientCreateOrUpdateResponse], error)
- func (client *ServerGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverGroupName string, ...) (*runtime.Poller[ServerGroupsClientDeleteResponse], error)
- func (client *ServerGroupsClient) BeginRestart(ctx context.Context, resourceGroupName string, serverGroupName string, ...) (*runtime.Poller[ServerGroupsClientRestartResponse], error)
- func (client *ServerGroupsClient) BeginStart(ctx context.Context, resourceGroupName string, serverGroupName string, ...) (*runtime.Poller[ServerGroupsClientStartResponse], error)
- func (client *ServerGroupsClient) BeginStop(ctx context.Context, resourceGroupName string, serverGroupName string, ...) (*runtime.Poller[ServerGroupsClientStopResponse], error)
- func (client *ServerGroupsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverGroupName string, ...) (*runtime.Poller[ServerGroupsClientUpdateResponse], error)
- func (client *ServerGroupsClient) CheckNameAvailability(ctx context.Context, nameAvailabilityRequest NameAvailabilityRequest, ...) (ServerGroupsClientCheckNameAvailabilityResponse, error)
- func (client *ServerGroupsClient) Get(ctx context.Context, resourceGroupName string, serverGroupName string, ...) (ServerGroupsClientGetResponse, error)
- func (client *ServerGroupsClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[ServerGroupsClientListByResourceGroupResponse]
- func (client *ServerGroupsClient) NewListPager(options *ServerGroupsClientListOptions) *runtime.Pager[ServerGroupsClientListResponse]
- type ServerGroupsClientBeginCreateOrUpdateOptions
- type ServerGroupsClientBeginDeleteOptions
- type ServerGroupsClientBeginRestartOptions
- type ServerGroupsClientBeginStartOptions
- type ServerGroupsClientBeginStopOptions
- type ServerGroupsClientBeginUpdateOptions
- type ServerGroupsClientCheckNameAvailabilityOptions
- type ServerGroupsClientCheckNameAvailabilityResponse
- type ServerGroupsClientCreateOrUpdateResponse
- type ServerGroupsClientDeleteResponse
- type ServerGroupsClientGetOptions
- type ServerGroupsClientGetResponse
- type ServerGroupsClientListByResourceGroupOptions
- type ServerGroupsClientListByResourceGroupResponse
- type ServerGroupsClientListOptions
- type ServerGroupsClientListResponse
- type ServerGroupsClientRestartResponse
- type ServerGroupsClientStartResponse
- type ServerGroupsClientStopResponse
- type ServerGroupsClientUpdateResponse
- type ServerHaState
- type ServerNameItem
- type ServerProperties
- type ServerRole
- type ServerRoleGroup
- type ServerRoleGroupConfiguration
- type ServerState
- type ServersClient
- func (client *ServersClient) Get(ctx context.Context, resourceGroupName string, serverGroupName string, ...) (ServersClientGetResponse, error)
- func (client *ServersClient) NewListByServerGroupPager(resourceGroupName string, serverGroupName string, ...) *runtime.Pager[ServersClientListByServerGroupResponse]
- type ServersClientGetOptions
- type ServersClientGetResponse
- type ServersClientListByServerGroupOptions
- type ServersClientListByServerGroupResponse
- type SystemData
- type TrackedResource
Examples ¶
- ConfigurationsClient.BeginUpdate
- ConfigurationsClient.Get
- ConfigurationsClient.NewListByServerGroupPager
- ConfigurationsClient.NewListByServerPager
- FirewallRulesClient.BeginCreateOrUpdate
- FirewallRulesClient.BeginDelete
- FirewallRulesClient.Get
- FirewallRulesClient.NewListByServerGroupPager
- OperationsClient.NewListPager
- RolesClient.BeginCreate
- RolesClient.BeginDelete
- RolesClient.NewListByServerGroupPager
- ServerGroupsClient.BeginCreateOrUpdate
- ServerGroupsClient.BeginDelete
- ServerGroupsClient.BeginRestart
- ServerGroupsClient.BeginStart
- ServerGroupsClient.BeginStop
- ServerGroupsClient.BeginUpdate
- ServerGroupsClient.CheckNameAvailability
- ServerGroupsClient.Get
- ServerGroupsClient.NewListByResourceGroupPager
- ServerGroupsClient.NewListPager
- ServersClient.Get
- ServersClient.NewListByServerGroupPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CitusVersion ¶
type CitusVersion string
CitusVersion - The Citus version.
const ( CitusVersionEight3 CitusVersion = "8.3" CitusVersionNine0 CitusVersion = "9.0" CitusVersionNine1 CitusVersion = "9.1" CitusVersionNine2 CitusVersion = "9.2" CitusVersionNine3 CitusVersion = "9.3" CitusVersionNine4 CitusVersion = "9.4" CitusVersionNine5 CitusVersion = "9.5" )
func PossibleCitusVersionValues ¶
func PossibleCitusVersionValues() []CitusVersion
PossibleCitusVersionValues returns the possible values for the CitusVersion const type.
type CloudError ¶
type CloudError struct { // The error. Error *CloudErrorBody `json:"error,omitempty"` }
CloudError - An error response from the Batch service.
type CloudErrorBody ¶
type CloudErrorBody struct { // An identifier for the error. Codes are invariant and are intended to be consumed programmatically. Code *string `json:"code,omitempty"` // A list of additional details about the error. Details []*CloudErrorBody `json:"details,omitempty"` // A message describing the error, intended to be suitable for display in a user interface. Message *string `json:"message,omitempty"` // The target of the particular error. For example, the name of the property in error. Target *string `json:"target,omitempty"` }
CloudErrorBody - An error response from the Batch service.
type ConfigurationDataType ¶
type ConfigurationDataType string
ConfigurationDataType - Data type of the configuration.
const ( ConfigurationDataTypeBoolean ConfigurationDataType = "Boolean" ConfigurationDataTypeEnumeration ConfigurationDataType = "Enumeration" ConfigurationDataTypeInteger ConfigurationDataType = "Integer" ConfigurationDataTypeNumeric ConfigurationDataType = "Numeric" )
func PossibleConfigurationDataTypeValues ¶
func PossibleConfigurationDataTypeValues() []ConfigurationDataType
PossibleConfigurationDataTypeValues returns the possible values for the ConfigurationDataType const type.
type ConfigurationsClient ¶
type ConfigurationsClient struct {
// contains filtered or unexported fields
}
ConfigurationsClient contains the methods for the Configurations group. Don't use this type directly, use NewConfigurationsClient() instead.
func NewConfigurationsClient ¶
func NewConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConfigurationsClient, error)
NewConfigurationsClient creates a new instance of ConfigurationsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ConfigurationsClient) BeginUpdate ¶
func (client *ConfigurationsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverGroupName string, configurationName string, parameters ServerGroupConfiguration, options *ConfigurationsClientBeginUpdateOptions) (*runtime.Poller[ConfigurationsClientUpdateResponse], error)
BeginUpdate - Updates configuration of server role groups in a server group If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-05-privatepreview resourceGroupName - The name of the resource group. The name is case insensitive. serverGroupName - The name of the server group. configurationName - The name of the server group configuration. parameters - The required parameters for updating a server group configuration. options - ConfigurationsClientBeginUpdateOptions contains the optional parameters for the ConfigurationsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2020-10-05-privatepreview/examples/ConfigurationUpdate.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/postgresqlhsc/armpostgresqlhsc" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpostgresqlhsc.NewConfigurationsClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdate(ctx, "TestResourceGroup", "hsctestsg", "array_nulls", armpostgresqlhsc.ServerGroupConfiguration{ Properties: &armpostgresqlhsc.ServerGroupConfigurationProperties{ ServerRoleGroupConfigurations: []*armpostgresqlhsc.ServerRoleGroupConfiguration{ { Role: to.Ptr(armpostgresqlhsc.ServerRoleCoordinator), Value: to.Ptr("on"), }, { Role: to.Ptr(armpostgresqlhsc.ServerRoleWorker), Value: to.Ptr("off"), }}, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*ConfigurationsClient) Get ¶
func (client *ConfigurationsClient) Get(ctx context.Context, resourceGroupName string, serverGroupName string, configurationName string, options *ConfigurationsClientGetOptions) (ConfigurationsClientGetResponse, error)
Get - Gets information about single server group configuration. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-05-privatepreview resourceGroupName - The name of the resource group. The name is case insensitive. serverGroupName - The name of the server group. configurationName - The name of the server group configuration. options - ConfigurationsClientGetOptions contains the optional parameters for the ConfigurationsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2020-10-05-privatepreview/examples/ConfigurationGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresqlhsc/armpostgresqlhsc" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpostgresqlhsc.NewConfigurationsClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "TestResourceGroup", "hsctestsg", "array_nulls", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*ConfigurationsClient) NewListByServerGroupPager ¶ added in v0.4.0
func (client *ConfigurationsClient) NewListByServerGroupPager(resourceGroupName string, serverGroupName string, options *ConfigurationsClientListByServerGroupOptions) *runtime.Pager[ConfigurationsClientListByServerGroupResponse]
NewListByServerGroupPager - List all the configurations of a server group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-05-privatepreview resourceGroupName - The name of the resource group. The name is case insensitive. serverGroupName - The name of the server group. options - ConfigurationsClientListByServerGroupOptions contains the optional parameters for the ConfigurationsClient.ListByServerGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2020-10-05-privatepreview/examples/ConfigurationListByServerGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresqlhsc/armpostgresqlhsc" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpostgresqlhsc.NewConfigurationsClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByServerGroupPager("TestResourceGroup", "hsctestsg", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*ConfigurationsClient) NewListByServerPager ¶ added in v0.4.0
func (client *ConfigurationsClient) NewListByServerPager(resourceGroupName string, serverGroupName string, serverName string, options *ConfigurationsClientListByServerOptions) *runtime.Pager[ConfigurationsClientListByServerResponse]
NewListByServerPager - List all the configurations of a server in server group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-05-privatepreview resourceGroupName - The name of the resource group. The name is case insensitive. serverGroupName - The name of the server group. serverName - The name of the server. options - ConfigurationsClientListByServerOptions contains the optional parameters for the ConfigurationsClient.ListByServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2020-10-05-privatepreview/examples/ConfigurationListByServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresqlhsc/armpostgresqlhsc" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpostgresqlhsc.NewConfigurationsClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByServerPager("TestResourceGroup", "hsctestsg", "testserver", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ConfigurationsClientBeginUpdateOptions ¶ added in v0.2.0
type ConfigurationsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ConfigurationsClientBeginUpdateOptions contains the optional parameters for the ConfigurationsClient.BeginUpdate method.
type ConfigurationsClientGetOptions ¶ added in v0.2.0
type ConfigurationsClientGetOptions struct { }
ConfigurationsClientGetOptions contains the optional parameters for the ConfigurationsClient.Get method.
type ConfigurationsClientGetResponse ¶ added in v0.2.0
type ConfigurationsClientGetResponse struct {
ServerGroupConfiguration
}
ConfigurationsClientGetResponse contains the response from method ConfigurationsClient.Get.
type ConfigurationsClientListByServerGroupOptions ¶ added in v0.2.0
type ConfigurationsClientListByServerGroupOptions struct { }
ConfigurationsClientListByServerGroupOptions contains the optional parameters for the ConfigurationsClient.ListByServerGroup method.
type ConfigurationsClientListByServerGroupResponse ¶ added in v0.2.0
type ConfigurationsClientListByServerGroupResponse struct {
ServerGroupConfigurationListResult
}
ConfigurationsClientListByServerGroupResponse contains the response from method ConfigurationsClient.ListByServerGroup.
type ConfigurationsClientListByServerOptions ¶ added in v0.2.0
type ConfigurationsClientListByServerOptions struct { }
ConfigurationsClientListByServerOptions contains the optional parameters for the ConfigurationsClient.ListByServer method.
type ConfigurationsClientListByServerResponse ¶ added in v0.2.0
type ConfigurationsClientListByServerResponse struct {
ServerConfigurationListResult
}
ConfigurationsClientListByServerResponse contains the response from method ConfigurationsClient.ListByServer.
type ConfigurationsClientUpdateResponse ¶ added in v0.2.0
type ConfigurationsClientUpdateResponse struct {
ServerGroupConfiguration
}
ConfigurationsClientUpdateResponse contains the response from method ConfigurationsClient.Update.
type CreateMode ¶
type CreateMode string
CreateMode - The mode to create a new server group.
const ( CreateModeDefault CreateMode = "Default" CreateModePointInTimeRestore CreateMode = "PointInTimeRestore" CreateModeReadReplica CreateMode = "ReadReplica" )
func PossibleCreateModeValues ¶
func PossibleCreateModeValues() []CreateMode
PossibleCreateModeValues returns the possible values for the CreateMode const type.
type CreatedByType ¶
type CreatedByType string
CreatedByType - The type of identity that created the resource.
const ( CreatedByTypeApplication CreatedByType = "Application" CreatedByTypeKey CreatedByType = "Key" CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" CreatedByTypeUser CreatedByType = "User" )
func PossibleCreatedByTypeValues ¶
func PossibleCreatedByTypeValues() []CreatedByType
PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
type FirewallRule ¶
type FirewallRule struct { // REQUIRED; The properties of a firewall rule. Properties *FirewallRuleProperties `json:"properties,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The system metadata relating to this resource SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
FirewallRule - Represents a server group firewall rule.
type FirewallRuleListResult ¶
type FirewallRuleListResult struct { // The list of firewall rules in a server group. Value []*FirewallRule `json:"value,omitempty"` }
FirewallRuleListResult - A list of firewall rules.
type FirewallRuleProperties ¶
type FirewallRuleProperties struct { // REQUIRED; The end IP address of the server group firewall rule. Must be IPv4 format. EndIPAddress *string `json:"endIpAddress,omitempty"` // REQUIRED; The start IP address of the server group firewall rule. Must be IPv4 format. StartIPAddress *string `json:"startIpAddress,omitempty"` }
FirewallRuleProperties - The properties of a server group firewall rule.
type FirewallRulesClient ¶
type FirewallRulesClient struct {
// contains filtered or unexported fields
}
FirewallRulesClient contains the methods for the FirewallRules group. Don't use this type directly, use NewFirewallRulesClient() instead.
func NewFirewallRulesClient ¶
func NewFirewallRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallRulesClient, error)
NewFirewallRulesClient creates a new instance of FirewallRulesClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*FirewallRulesClient) BeginCreateOrUpdate ¶
func (client *FirewallRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverGroupName string, firewallRuleName string, parameters FirewallRule, options *FirewallRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[FirewallRulesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates a new firewall rule or updates an existing firewall rule. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-05-privatepreview resourceGroupName - The name of the resource group. The name is case insensitive. serverGroupName - The name of the server group. firewallRuleName - The name of the server group firewall rule. parameters - The required parameters for creating or updating a firewall rule. options - FirewallRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallRulesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2020-10-05-privatepreview/examples/FirewallRuleCreate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresqlhsc/armpostgresqlhsc" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpostgresqlhsc.NewFirewallRulesClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, "TestGroup", "pgtestsvc4", "rule1", armpostgresqlhsc.FirewallRule{ Properties: &armpostgresqlhsc.FirewallRuleProperties{ EndIPAddress: to.Ptr("255.255.255.255"), StartIPAddress: to.Ptr("0.0.0.0"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*FirewallRulesClient) BeginDelete ¶
func (client *FirewallRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverGroupName string, firewallRuleName string, options *FirewallRulesClientBeginDeleteOptions) (*runtime.Poller[FirewallRulesClientDeleteResponse], error)
BeginDelete - Deletes a server group firewall rule. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-05-privatepreview resourceGroupName - The name of the resource group. The name is case insensitive. serverGroupName - The name of the server group. firewallRuleName - The name of the server group firewall rule. options - FirewallRulesClientBeginDeleteOptions contains the optional parameters for the FirewallRulesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2020-10-05-privatepreview/examples/FirewallRuleDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresqlhsc/armpostgresqlhsc" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpostgresqlhsc.NewFirewallRulesClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "TestGroup", "pgtestsvc4", "rule1", 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 (*FirewallRulesClient) Get ¶
func (client *FirewallRulesClient) Get(ctx context.Context, resourceGroupName string, serverGroupName string, firewallRuleName string, options *FirewallRulesClientGetOptions) (FirewallRulesClientGetResponse, error)
Get - Gets information about a server group firewall rule. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-05-privatepreview resourceGroupName - The name of the resource group. The name is case insensitive. serverGroupName - The name of the server group. firewallRuleName - The name of the server group firewall rule. options - FirewallRulesClientGetOptions contains the optional parameters for the FirewallRulesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2020-10-05-privatepreview/examples/FirewallRuleGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresqlhsc/armpostgresqlhsc" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpostgresqlhsc.NewFirewallRulesClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "TestGroup", "pgtestsvc4", "rule1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*FirewallRulesClient) NewListByServerGroupPager ¶ added in v0.4.0
func (client *FirewallRulesClient) NewListByServerGroupPager(resourceGroupName string, serverGroupName string, options *FirewallRulesClientListByServerGroupOptions) *runtime.Pager[FirewallRulesClientListByServerGroupResponse]
NewListByServerGroupPager - List all the firewall rules in a given server group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-05-privatepreview resourceGroupName - The name of the resource group. The name is case insensitive. serverGroupName - The name of the server group. options - FirewallRulesClientListByServerGroupOptions contains the optional parameters for the FirewallRulesClient.ListByServerGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2020-10-05-privatepreview/examples/FirewallRuleListByServerGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresqlhsc/armpostgresqlhsc" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpostgresqlhsc.NewFirewallRulesClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByServerGroupPager("TestGroup", "pgtestsvc4", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type FirewallRulesClientBeginCreateOrUpdateOptions ¶ added in v0.2.0
type FirewallRulesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
FirewallRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallRulesClient.BeginCreateOrUpdate method.
type FirewallRulesClientBeginDeleteOptions ¶ added in v0.2.0
type FirewallRulesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
FirewallRulesClientBeginDeleteOptions contains the optional parameters for the FirewallRulesClient.BeginDelete method.
type FirewallRulesClientCreateOrUpdateResponse ¶ added in v0.2.0
type FirewallRulesClientCreateOrUpdateResponse struct {
FirewallRule
}
FirewallRulesClientCreateOrUpdateResponse contains the response from method FirewallRulesClient.CreateOrUpdate.
type FirewallRulesClientDeleteResponse ¶ added in v0.2.0
type FirewallRulesClientDeleteResponse struct { }
FirewallRulesClientDeleteResponse contains the response from method FirewallRulesClient.Delete.
type FirewallRulesClientGetOptions ¶ added in v0.2.0
type FirewallRulesClientGetOptions struct { }
FirewallRulesClientGetOptions contains the optional parameters for the FirewallRulesClient.Get method.
type FirewallRulesClientGetResponse ¶ added in v0.2.0
type FirewallRulesClientGetResponse struct {
FirewallRule
}
FirewallRulesClientGetResponse contains the response from method FirewallRulesClient.Get.
type FirewallRulesClientListByServerGroupOptions ¶ added in v0.2.0
type FirewallRulesClientListByServerGroupOptions struct { }
FirewallRulesClientListByServerGroupOptions contains the optional parameters for the FirewallRulesClient.ListByServerGroup method.
type FirewallRulesClientListByServerGroupResponse ¶ added in v0.2.0
type FirewallRulesClientListByServerGroupResponse struct {
FirewallRuleListResult
}
FirewallRulesClientListByServerGroupResponse contains the response from method FirewallRulesClient.ListByServerGroup.
type MaintenanceWindow ¶
type MaintenanceWindow struct { // indicates whether custom window is enabled or disabled CustomWindow *string `json:"customWindow,omitempty"` // day of week for maintenance window DayOfWeek *int32 `json:"dayOfWeek,omitempty"` // start hour for maintenance window StartHour *int32 `json:"startHour,omitempty"` // start minute for maintenance window StartMinute *int32 `json:"startMinute,omitempty"` }
MaintenanceWindow - Maintenance window of a server group.
type NameAvailability ¶
type NameAvailability struct { // Error Message. Message *string `json:"message,omitempty"` // name of the PostgreSQL server. Name *string `json:"name,omitempty"` // Indicates whether the resource name is available. NameAvailable *bool `json:"nameAvailable,omitempty"` // type of the server Type *string `json:"type,omitempty"` }
NameAvailability - Represents a resource name availability.
type NameAvailabilityRequest ¶
type NameAvailabilityRequest struct { // REQUIRED; Resource name to verify. Name *string `json:"name,omitempty"` // REQUIRED; Resource type used for verification. Type *string `json:"type,omitempty"` }
NameAvailabilityRequest - Request from client to check resource name availability.
type Operation ¶
type Operation struct { // Indicates whether the operation is a data action IsDataAction *bool `json:"isDataAction,omitempty"` // READ-ONLY; The localized display information for this particular operation or action. Display *OperationDisplay `json:"display,omitempty" azure:"ro"` // READ-ONLY; The name of the operation being performed on this particular object. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The intended executor of the operation. Origin *OperationOrigin `json:"origin,omitempty" azure:"ro"` // READ-ONLY; Additional descriptions for the operation. Properties map[string]interface{} `json:"properties,omitempty" azure:"ro"` }
Operation - REST API operation definition.
type OperationDisplay ¶
type OperationDisplay struct { // READ-ONLY; Operation description. Description *string `json:"description,omitempty" azure:"ro"` // READ-ONLY; Localized friendly name for the operation. Operation *string `json:"operation,omitempty" azure:"ro"` // READ-ONLY; Operation resource provider name. Provider *string `json:"provider,omitempty" azure:"ro"` // READ-ONLY; Resource on which the operation is performed. Resource *string `json:"resource,omitempty" azure:"ro"` }
OperationDisplay - Display metadata associated with the operation.
type OperationListResult ¶
type OperationListResult struct { // Collection of available operation details Value []*Operation `json:"value,omitempty"` // READ-ONLY; URL client should use to fetch the next page (per server side paging). It's null for now, added for future use. NextLink *string `json:"nextLink,omitempty" azure:"ro"` }
OperationListResult - A list of resource provider operations.
type OperationOrigin ¶
type OperationOrigin string
OperationOrigin - The intended executor of the operation.
const ( OperationOriginNotSpecified OperationOrigin = "NotSpecified" 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 REST API operations. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-05-privatepreview options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2020-10-05-privatepreview/examples/OperationList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresqlhsc/armpostgresqlhsc" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpostgresqlhsc.NewOperationsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type OperationsClientListOptions ¶ added in v0.2.0
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
type OperationsClientListResponse ¶ added in v0.2.0
type OperationsClientListResponse struct {
OperationListResult
}
OperationsClientListResponse contains the response from method OperationsClient.List.
type PostgreSQLVersion ¶
type PostgreSQLVersion string
PostgreSQLVersion - The PostgreSQL version.
const ( PostgreSQLVersionEleven PostgreSQLVersion = "11" PostgreSQLVersionTwelve PostgreSQLVersion = "12" )
func PossiblePostgreSQLVersionValues ¶
func PossiblePostgreSQLVersionValues() []PostgreSQLVersion
PossiblePostgreSQLVersionValues returns the possible values for the PostgreSQLVersion const type.
type ProxyResource ¶
type ProxyResource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
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 `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
Resource - Common fields that are returned in the response for all Azure Resource Manager resources
type ResourceProviderType ¶
type ResourceProviderType string
ResourceProviderType - The resource provider type of server group.
const ( ResourceProviderTypeMarlin ResourceProviderType = "Marlin" ResourceProviderTypeMeru ResourceProviderType = "Meru" )
func PossibleResourceProviderTypeValues ¶
func PossibleResourceProviderTypeValues() []ResourceProviderType
PossibleResourceProviderTypeValues returns the possible values for the ResourceProviderType const type.
type Role ¶
type Role struct { // The properties of a role. Properties *RoleProperties `json:"properties,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The system metadata relating to this resource SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
Role - Represents a server group role.
type RoleListResult ¶
type RoleListResult struct { // The list of roles in a server group. Value []*Role `json:"value,omitempty"` }
RoleListResult - A list of roles.
type RoleProperties ¶
type RoleProperties struct { // REQUIRED; The password of the server group role. Password *string `json:"password,omitempty"` }
RoleProperties - The properties of a server group role.
type RolesClient ¶
type RolesClient struct {
// contains filtered or unexported fields
}
RolesClient contains the methods for the Roles group. Don't use this type directly, use NewRolesClient() instead.
func NewRolesClient ¶
func NewRolesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RolesClient, error)
NewRolesClient creates a new instance of RolesClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*RolesClient) BeginCreate ¶
func (client *RolesClient) BeginCreate(ctx context.Context, resourceGroupName string, serverGroupName string, roleName string, parameters Role, options *RolesClientBeginCreateOptions) (*runtime.Poller[RolesClientCreateResponse], error)
BeginCreate - Creates a new role or updates an existing role. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-05-privatepreview resourceGroupName - The name of the resource group. The name is case insensitive. serverGroupName - The name of the server group. roleName - The name of the server group role name. parameters - The required parameters for creating or updating a role. options - RolesClientBeginCreateOptions contains the optional parameters for the RolesClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2020-10-05-privatepreview/examples/RoleCreate.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/postgresqlhsc/armpostgresqlhsc" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpostgresqlhsc.NewRolesClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreate(ctx, "TestGroup", "pgtestsvc4", "role1", armpostgresqlhsc.Role{ Properties: &armpostgresqlhsc.RoleProperties{ Password: to.Ptr("secret"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*RolesClient) BeginDelete ¶
func (client *RolesClient) BeginDelete(ctx context.Context, resourceGroupName string, serverGroupName string, roleName string, options *RolesClientBeginDeleteOptions) (*runtime.Poller[RolesClientDeleteResponse], error)
BeginDelete - Deletes a server group role. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-05-privatepreview resourceGroupName - The name of the resource group. The name is case insensitive. serverGroupName - The name of the server group. roleName - The name of the server group role name. options - RolesClientBeginDeleteOptions contains the optional parameters for the RolesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2020-10-05-privatepreview/examples/RoleDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresqlhsc/armpostgresqlhsc" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpostgresqlhsc.NewRolesClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "TestGroup", "pgtestsvc4", "role1", 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 (*RolesClient) NewListByServerGroupPager ¶ added in v0.4.0
func (client *RolesClient) NewListByServerGroupPager(resourceGroupName string, serverGroupName string, options *RolesClientListByServerGroupOptions) *runtime.Pager[RolesClientListByServerGroupResponse]
NewListByServerGroupPager - List all the roles in a given server group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-05-privatepreview resourceGroupName - The name of the resource group. The name is case insensitive. serverGroupName - The name of the server group. options - RolesClientListByServerGroupOptions contains the optional parameters for the RolesClient.ListByServerGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2020-10-05-privatepreview/examples/RoleListByServerGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresqlhsc/armpostgresqlhsc" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpostgresqlhsc.NewRolesClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByServerGroupPager("TestGroup", "pgtestsvc4", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type RolesClientBeginCreateOptions ¶ added in v0.2.0
type RolesClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
RolesClientBeginCreateOptions contains the optional parameters for the RolesClient.BeginCreate method.
type RolesClientBeginDeleteOptions ¶ added in v0.2.0
type RolesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
RolesClientBeginDeleteOptions contains the optional parameters for the RolesClient.BeginDelete method.
type RolesClientCreateResponse ¶ added in v0.2.0
type RolesClientCreateResponse struct {
Role
}
RolesClientCreateResponse contains the response from method RolesClient.Create.
type RolesClientDeleteResponse ¶ added in v0.2.0
type RolesClientDeleteResponse struct { }
RolesClientDeleteResponse contains the response from method RolesClient.Delete.
type RolesClientListByServerGroupOptions ¶ added in v0.2.0
type RolesClientListByServerGroupOptions struct { }
RolesClientListByServerGroupOptions contains the optional parameters for the RolesClient.ListByServerGroup method.
type RolesClientListByServerGroupResponse ¶ added in v0.2.0
type RolesClientListByServerGroupResponse struct {
RoleListResult
}
RolesClientListByServerGroupResponse contains the response from method RolesClient.ListByServerGroup.
type ServerConfiguration ¶
type ServerConfiguration struct { // The properties of a configuration. Properties *ServerConfigurationProperties `json:"properties,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The system metadata relating to this resource SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
ServerConfiguration - Represents a configuration.
type ServerConfigurationListResult ¶
type ServerConfigurationListResult struct { // The list of server configurations. Value []*ServerConfiguration `json:"value,omitempty"` // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` }
ServerConfigurationListResult - A list of server configurations.
type ServerConfigurationProperties ¶
type ServerConfigurationProperties struct { // REQUIRED; Value of the configuration. Value *string `json:"value,omitempty"` // READ-ONLY; Allowed values of the configuration. AllowedValues *string `json:"allowedValues,omitempty" azure:"ro"` // READ-ONLY; Data type of the configuration. DataType *ConfigurationDataType `json:"dataType,omitempty" azure:"ro"` // READ-ONLY; Default value of the configuration. DefaultValue *string `json:"defaultValue,omitempty" azure:"ro"` // READ-ONLY; Description of the configuration. Description *string `json:"description,omitempty" azure:"ro"` // READ-ONLY; Source of the configuration. Source *string `json:"source,omitempty" azure:"ro"` }
ServerConfigurationProperties - The properties of a configuration.
type ServerEdition ¶
type ServerEdition string
ServerEdition - The edition of a server (default: GeneralPurpose).
const ( ServerEditionGeneralPurpose ServerEdition = "GeneralPurpose" ServerEditionMemoryOptimized ServerEdition = "MemoryOptimized" )
func PossibleServerEditionValues ¶
func PossibleServerEditionValues() []ServerEdition
PossibleServerEditionValues returns the possible values for the ServerEdition const type.
type ServerGroup ¶
type ServerGroup struct { // REQUIRED; The geo-location where the resource lives Location *string `json:"location,omitempty"` // Properties of the server group create. Properties *ServerGroupProperties `json:"properties,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The system metadata relating to this resource SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
ServerGroup - Represents a server group for create.
func (ServerGroup) MarshalJSON ¶
func (s ServerGroup) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerGroup.
type ServerGroupConfiguration ¶
type ServerGroupConfiguration struct { // The properties of server group configuration. Properties *ServerGroupConfigurationProperties `json:"properties,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The system metadata relating to this resource SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
ServerGroupConfiguration - Represents the configuration list of server role groups in a server group.
func (ServerGroupConfiguration) MarshalJSON ¶
func (s ServerGroupConfiguration) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerGroupConfiguration.
type ServerGroupConfigurationListResult ¶
type ServerGroupConfigurationListResult struct { // The list of server group configurations. Value []*ServerGroupConfiguration `json:"value,omitempty"` // READ-ONLY; Link to retrieve next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` }
ServerGroupConfigurationListResult - A list of server group configurations.
type ServerGroupConfigurationProperties ¶
type ServerGroupConfigurationProperties struct { // REQUIRED; The list of server role group configuration values. ServerRoleGroupConfigurations []*ServerRoleGroupConfiguration `json:"serverRoleGroupConfigurations,omitempty"` // READ-ONLY; Allowed values of the configuration. AllowedValues *string `json:"allowedValues,omitempty" azure:"ro"` // READ-ONLY; Data type of the configuration. DataType *ConfigurationDataType `json:"dataType,omitempty" azure:"ro"` // READ-ONLY; Description of the configuration. Description *string `json:"description,omitempty" azure:"ro"` }
ServerGroupConfigurationProperties - The properties of server group configuration.
func (ServerGroupConfigurationProperties) MarshalJSON ¶
func (s ServerGroupConfigurationProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerGroupConfigurationProperties.
type ServerGroupForUpdate ¶
type ServerGroupForUpdate struct { // The location the resource resides in. Location *string `json:"location,omitempty"` // Properties of the server group. Properties *ServerGroupPropertiesForUpdate `json:"properties,omitempty"` // Application-specific metadata in the form of key-value pairs. Tags map[string]*string `json:"tags,omitempty"` }
ServerGroupForUpdate - Represents a server group for update.
func (ServerGroupForUpdate) MarshalJSON ¶
func (s ServerGroupForUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerGroupForUpdate.
type ServerGroupListResult ¶
type ServerGroupListResult struct { // The list of server groups Value []*ServerGroup `json:"value,omitempty"` // READ-ONLY; The link used to get the next page of operations. NextLink *string `json:"nextLink,omitempty" azure:"ro"` }
ServerGroupListResult - A list of server groups.
type ServerGroupProperties ¶
type ServerGroupProperties struct { // The administrator's login name of servers in server group. Can only be specified when the server is being created (and // is required for creation). AdministratorLogin *string `json:"administratorLogin,omitempty"` // The password of the administrator login. AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` // Availability Zone information of the server group. AvailabilityZone *string `json:"availabilityZone,omitempty"` // The backup retention days for server group. BackupRetentionDays *int32 `json:"backupRetentionDays,omitempty"` // The Citus version of server group. CitusVersion *CitusVersion `json:"citusVersion,omitempty"` // The mode to create a new server group. CreateMode *CreateMode `json:"createMode,omitempty"` // The delegated subnet arguments for a server group. DelegatedSubnetArguments *ServerGroupPropertiesDelegatedSubnetArguments `json:"delegatedSubnetArguments,omitempty"` // If Citus MX is enabled or not for the server group. EnableMx *bool `json:"enableMx,omitempty"` // If shards on coordinator is enabled or not for the server group. EnableShardsOnCoordinator *bool `json:"enableShardsOnCoordinator,omitempty"` // If ZFS compression is enabled or not for the server group. EnableZfs *bool `json:"enableZfs,omitempty"` // Maintenance window of a server group. MaintenanceWindow *MaintenanceWindow `json:"maintenanceWindow,omitempty"` // Restore point creation time (ISO8601 format), specifying the time to restore from. It's required when 'createMode' is 'PointInTimeRestore' PointInTimeUTC *time.Time `json:"pointInTimeUTC,omitempty"` // The PostgreSQL version of server group. PostgresqlVersion *PostgreSQLVersion `json:"postgresqlVersion,omitempty"` // The private dns zone arguments for a server group. PrivateDNSZoneArguments *ServerGroupPropertiesPrivateDNSZoneArguments `json:"privateDnsZoneArguments,omitempty"` // The list of server role groups. ServerRoleGroups []*ServerRoleGroup `json:"serverRoleGroups,omitempty"` // The source server group location to restore from. It's required when 'createMode' is 'PointInTimeRestore' or 'ReadReplica' SourceLocation *string `json:"sourceLocation,omitempty"` // The source resource group name to restore from. It's required when 'createMode' is 'PointInTimeRestore' or 'ReadReplica' SourceResourceGroupName *string `json:"sourceResourceGroupName,omitempty"` // The source server group name to restore from. It's required when 'createMode' is 'PointInTimeRestore' or 'ReadReplica' SourceServerGroupName *string `json:"sourceServerGroupName,omitempty"` // The source subscription id to restore from. It's required when 'createMode' is 'PointInTimeRestore' or 'ReadReplica' SourceSubscriptionID *string `json:"sourceSubscriptionId,omitempty"` // Standby Availability Zone information of the server group. StandbyAvailabilityZone *string `json:"standbyAvailabilityZone,omitempty"` // READ-ONLY; The earliest restore point time (ISO8601 format) for server group. EarliestRestoreTime *time.Time `json:"earliestRestoreTime,omitempty" azure:"ro"` // READ-ONLY; The array of read replica server groups. ReadReplicas []*string `json:"readReplicas,omitempty" azure:"ro"` // READ-ONLY; The resource provider type of server group. ResourceProviderType *ResourceProviderType `json:"resourceProviderType,omitempty" azure:"ro"` // READ-ONLY; The source server group id for read replica server groups. SourceServerGroup *string `json:"sourceServerGroup,omitempty" azure:"ro"` // READ-ONLY; A state of a server group that is visible to user. State *ServerState `json:"state,omitempty" azure:"ro"` }
ServerGroupProperties - The properties used to create a new server group.
func (ServerGroupProperties) MarshalJSON ¶
func (s ServerGroupProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerGroupProperties.
func (*ServerGroupProperties) UnmarshalJSON ¶
func (s *ServerGroupProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServerGroupProperties.
type ServerGroupPropertiesDelegatedSubnetArguments ¶
type ServerGroupPropertiesDelegatedSubnetArguments struct { // delegated subnet arm resource id. SubnetArmResourceID *string `json:"subnetArmResourceId,omitempty"` }
ServerGroupPropertiesDelegatedSubnetArguments - The delegated subnet arguments for a server group.
type ServerGroupPropertiesForUpdate ¶
type ServerGroupPropertiesForUpdate struct { // The password of the administrator login. AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` // Availability Zone information of the server group. AvailabilityZone *string `json:"availabilityZone,omitempty"` // The backup retention days for server group. BackupRetentionDays *int32 `json:"backupRetentionDays,omitempty"` // The Citus version of server group. CitusVersion *CitusVersion `json:"citusVersion,omitempty"` // If shards on coordinator is enabled or not for the server group. EnableShardsOnCoordinator *bool `json:"enableShardsOnCoordinator,omitempty"` // Maintenance window of a server group. MaintenanceWindow *MaintenanceWindow `json:"maintenanceWindow,omitempty"` // The PostgreSQL version of server group. PostgresqlVersion *PostgreSQLVersion `json:"postgresqlVersion,omitempty"` // The list of server role groups. ServerRoleGroups []*ServerRoleGroup `json:"serverRoleGroups,omitempty"` // Standby Availability Zone information of the server group. StandbyAvailabilityZone *string `json:"standbyAvailabilityZone,omitempty"` }
ServerGroupPropertiesForUpdate - The properties used to update a server group.
func (ServerGroupPropertiesForUpdate) MarshalJSON ¶
func (s ServerGroupPropertiesForUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerGroupPropertiesForUpdate.
type ServerGroupPropertiesPrivateDNSZoneArguments ¶
type ServerGroupPropertiesPrivateDNSZoneArguments struct { // private dns zone arm resource id. PrivateDNSZoneArmResourceID *string `json:"privateDnsZoneArmResourceId,omitempty"` }
ServerGroupPropertiesPrivateDNSZoneArguments - The private dns zone arguments for a server group.
type ServerGroupServer ¶
type ServerGroupServer struct { // The properties of a server in a server group. Properties *ServerGroupServerProperties `json:"properties,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The system metadata relating to this resource SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
ServerGroupServer - Represents a server in a server group.
type ServerGroupServerListResult ¶
type ServerGroupServerListResult struct { // The list of servers in a server group. Value []*ServerGroupServer `json:"value,omitempty"` }
ServerGroupServerListResult - A list of servers in a server group.
type ServerGroupServerProperties ¶
type ServerGroupServerProperties struct { // The administrator's login name of a servers in server group. AdministratorLogin *string `json:"administratorLogin,omitempty"` // Availability Zone information of the server group. AvailabilityZone *string `json:"availabilityZone,omitempty"` // The Citus version of server. CitusVersion *CitusVersion `json:"citusVersion,omitempty"` // If high availability is enabled or not for the server. EnableHa *bool `json:"enableHa,omitempty"` // The PostgreSQL version of server. PostgresqlVersion *PostgreSQLVersion `json:"postgresqlVersion,omitempty"` // The role of server in the server group. Role *ServerRole `json:"role,omitempty"` // The edition of a server (default: GeneralPurpose). ServerEdition *ServerEdition `json:"serverEdition,omitempty"` // Standby Availability Zone information of the server group. StandbyAvailabilityZone *string `json:"standbyAvailabilityZone,omitempty"` // The storage of a server in MB (max: 2097152 = 2TiB). StorageQuotaInMb *int64 `json:"storageQuotaInMb,omitempty"` // The vCores count of a server (max: 64). VCores *int64 `json:"vCores,omitempty"` // READ-ONLY; If public IP is requested or not for a server. EnablePublicIP *bool `json:"enablePublicIp,omitempty" azure:"ro"` // READ-ONLY; The fully qualified domain name of a server. FullyQualifiedDomainName *string `json:"fullyQualifiedDomainName,omitempty" azure:"ro"` // READ-ONLY; A state of a server group that is visible to user for HA feature. HaState *ServerHaState `json:"haState,omitempty" azure:"ro"` // READ-ONLY; A state of a server that is visible to user. State *ServerState `json:"state,omitempty" azure:"ro"` }
ServerGroupServerProperties - The properties of a server in server group.
type ServerGroupsClient ¶
type ServerGroupsClient struct {
// contains filtered or unexported fields
}
ServerGroupsClient contains the methods for the ServerGroups group. Don't use this type directly, use NewServerGroupsClient() instead.
func NewServerGroupsClient ¶
func NewServerGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServerGroupsClient, error)
NewServerGroupsClient creates a new instance of ServerGroupsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ServerGroupsClient) BeginCreateOrUpdate ¶
func (client *ServerGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serverGroupName string, parameters ServerGroup, options *ServerGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[ServerGroupsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates a new server group with servers. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-05-privatepreview resourceGroupName - The name of the resource group. The name is case insensitive. serverGroupName - The name of the server group. parameters - The required parameters for creating or updating a server group. options - ServerGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerGroupsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2020-10-05-privatepreview/examples/ServerGroupCreate.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/postgresqlhsc/armpostgresqlhsc" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpostgresqlhsc.NewServerGroupsClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, "TestGroup", "hsctestsg", armpostgresqlhsc.ServerGroup{ Location: to.Ptr("westus"), Tags: map[string]*string{ "ElasticServer": to.Ptr("1"), }, Properties: &armpostgresqlhsc.ServerGroupProperties{ AdministratorLogin: to.Ptr("citus"), AdministratorLoginPassword: to.Ptr("password"), AvailabilityZone: to.Ptr("1"), BackupRetentionDays: to.Ptr[int32](35), CitusVersion: to.Ptr(armpostgresqlhsc.CitusVersionNine5), DelegatedSubnetArguments: &armpostgresqlhsc.ServerGroupPropertiesDelegatedSubnetArguments{ SubnetArmResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-vnet-subnet"), }, EnableMx: to.Ptr(true), EnableZfs: to.Ptr(false), PostgresqlVersion: to.Ptr(armpostgresqlhsc.PostgreSQLVersionTwelve), PrivateDNSZoneArguments: &armpostgresqlhsc.ServerGroupPropertiesPrivateDNSZoneArguments{ PrivateDNSZoneArmResourceID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/privateDnsZones/test-private-dns-zone"), }, ServerRoleGroups: []*armpostgresqlhsc.ServerRoleGroup{ { EnableHa: to.Ptr(true), ServerEdition: to.Ptr(armpostgresqlhsc.ServerEditionGeneralPurpose), StorageQuotaInMb: to.Ptr[int64](524288), VCores: to.Ptr[int64](4), Name: to.Ptr(""), Role: to.Ptr(armpostgresqlhsc.ServerRoleCoordinator), ServerCount: to.Ptr[int32](1), }, { EnableHa: to.Ptr(false), ServerEdition: to.Ptr(armpostgresqlhsc.ServerEditionMemoryOptimized), StorageQuotaInMb: to.Ptr[int64](524288), VCores: to.Ptr[int64](4), Name: to.Ptr(""), Role: to.Ptr(armpostgresqlhsc.ServerRoleWorker), ServerCount: to.Ptr[int32](3), }}, StandbyAvailabilityZone: to.Ptr("2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*ServerGroupsClient) BeginDelete ¶
func (client *ServerGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, serverGroupName string, options *ServerGroupsClientBeginDeleteOptions) (*runtime.Poller[ServerGroupsClientDeleteResponse], error)
BeginDelete - Deletes a server group together with servers in it. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-05-privatepreview resourceGroupName - The name of the resource group. The name is case insensitive. serverGroupName - The name of the server group. options - ServerGroupsClientBeginDeleteOptions contains the optional parameters for the ServerGroupsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2020-10-05-privatepreview/examples/ServerGroupDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresqlhsc/armpostgresqlhsc" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpostgresqlhsc.NewServerGroupsClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "TestGroup", "testservergroup", 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 (*ServerGroupsClient) BeginRestart ¶
func (client *ServerGroupsClient) BeginRestart(ctx context.Context, resourceGroupName string, serverGroupName string, options *ServerGroupsClientBeginRestartOptions) (*runtime.Poller[ServerGroupsClientRestartResponse], error)
BeginRestart - Restarts the server group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-05-privatepreview resourceGroupName - The name of the resource group. The name is case insensitive. serverGroupName - The name of the server group. options - ServerGroupsClientBeginRestartOptions contains the optional parameters for the ServerGroupsClient.BeginRestart method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2020-10-05-privatepreview/examples/ServerGroupRestart.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresqlhsc/armpostgresqlhsc" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpostgresqlhsc.NewServerGroupsClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginRestart(ctx, "TestGroup", "hsctestsg1", 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 (*ServerGroupsClient) BeginStart ¶
func (client *ServerGroupsClient) BeginStart(ctx context.Context, resourceGroupName string, serverGroupName string, options *ServerGroupsClientBeginStartOptions) (*runtime.Poller[ServerGroupsClientStartResponse], error)
BeginStart - Starts the server group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-05-privatepreview resourceGroupName - The name of the resource group. The name is case insensitive. serverGroupName - The name of the server group. options - ServerGroupsClientBeginStartOptions contains the optional parameters for the ServerGroupsClient.BeginStart method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2020-10-05-privatepreview/examples/ServerGroupStart.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresqlhsc/armpostgresqlhsc" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpostgresqlhsc.NewServerGroupsClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginStart(ctx, "TestGroup", "hsctestsg1", 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 (*ServerGroupsClient) BeginStop ¶
func (client *ServerGroupsClient) BeginStop(ctx context.Context, resourceGroupName string, serverGroupName string, options *ServerGroupsClientBeginStopOptions) (*runtime.Poller[ServerGroupsClientStopResponse], error)
BeginStop - Stops the server group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-05-privatepreview resourceGroupName - The name of the resource group. The name is case insensitive. serverGroupName - The name of the server group. options - ServerGroupsClientBeginStopOptions contains the optional parameters for the ServerGroupsClient.BeginStop method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2020-10-05-privatepreview/examples/ServerGroupStop.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresqlhsc/armpostgresqlhsc" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpostgresqlhsc.NewServerGroupsClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginStop(ctx, "TestGroup", "hsctestsg1", 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 (*ServerGroupsClient) BeginUpdate ¶
func (client *ServerGroupsClient) BeginUpdate(ctx context.Context, resourceGroupName string, serverGroupName string, parameters ServerGroupForUpdate, options *ServerGroupsClientBeginUpdateOptions) (*runtime.Poller[ServerGroupsClientUpdateResponse], error)
BeginUpdate - Updates an existing server group. The request body can contain one to many of the properties present in the normal server group definition. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-05-privatepreview resourceGroupName - The name of the resource group. The name is case insensitive. serverGroupName - The name of the server group. parameters - The parameters for updating a server group. options - ServerGroupsClientBeginUpdateOptions contains the optional parameters for the ServerGroupsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2020-10-05-privatepreview/examples/ServerGroupAddNode.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/postgresqlhsc/armpostgresqlhsc" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpostgresqlhsc.NewServerGroupsClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdate(ctx, "TestGroup", "hsctestsg", armpostgresqlhsc.ServerGroupForUpdate{ Location: to.Ptr("westus"), Properties: &armpostgresqlhsc.ServerGroupPropertiesForUpdate{ ServerRoleGroups: []*armpostgresqlhsc.ServerRoleGroup{ { Name: to.Ptr(""), Role: to.Ptr(armpostgresqlhsc.ServerRoleWorker), ServerCount: to.Ptr[int32](10), }}, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*ServerGroupsClient) CheckNameAvailability ¶
func (client *ServerGroupsClient) CheckNameAvailability(ctx context.Context, nameAvailabilityRequest NameAvailabilityRequest, options *ServerGroupsClientCheckNameAvailabilityOptions) (ServerGroupsClientCheckNameAvailabilityResponse, error)
CheckNameAvailability - Check the availability of name for resource If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-05-privatepreview nameAvailabilityRequest - The required parameters for checking if resource name is available. options - ServerGroupsClientCheckNameAvailabilityOptions contains the optional parameters for the ServerGroupsClient.CheckNameAvailability method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2020-10-05-privatepreview/examples/CheckNameAvailability.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/postgresqlhsc/armpostgresqlhsc" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpostgresqlhsc.NewServerGroupsClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.CheckNameAvailability(ctx, armpostgresqlhsc.NameAvailabilityRequest{ Name: to.Ptr("name1"), Type: to.Ptr("Microsoft.DBforPostgreSQL/serverGroupsv2"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*ServerGroupsClient) Get ¶
func (client *ServerGroupsClient) Get(ctx context.Context, resourceGroupName string, serverGroupName string, options *ServerGroupsClientGetOptions) (ServerGroupsClientGetResponse, error)
Get - Gets information about a server group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-05-privatepreview resourceGroupName - The name of the resource group. The name is case insensitive. serverGroupName - The name of the server group. options - ServerGroupsClientGetOptions contains the optional parameters for the ServerGroupsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2020-10-05-privatepreview/examples/ServerGroupGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresqlhsc/armpostgresqlhsc" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpostgresqlhsc.NewServerGroupsClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "TestGroup", "hsctestsg1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*ServerGroupsClient) NewListByResourceGroupPager ¶ added in v0.4.0
func (client *ServerGroupsClient) NewListByResourceGroupPager(resourceGroupName string, options *ServerGroupsClientListByResourceGroupOptions) *runtime.Pager[ServerGroupsClientListByResourceGroupResponse]
NewListByResourceGroupPager - List all the server groups in a given resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-05-privatepreview resourceGroupName - The name of the resource group. The name is case insensitive. options - ServerGroupsClientListByResourceGroupOptions contains the optional parameters for the ServerGroupsClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2020-10-05-privatepreview/examples/ServerGroupListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresqlhsc/armpostgresqlhsc" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpostgresqlhsc.NewServerGroupsClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourceGroupPager("TestGroup", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*ServerGroupsClient) NewListPager ¶ added in v0.4.0
func (client *ServerGroupsClient) NewListPager(options *ServerGroupsClientListOptions) *runtime.Pager[ServerGroupsClientListResponse]
NewListPager - List all the server groups in a given subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-05-privatepreview options - ServerGroupsClientListOptions contains the optional parameters for the ServerGroupsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2020-10-05-privatepreview/examples/ServerGroupList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresqlhsc/armpostgresqlhsc" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpostgresqlhsc.NewServerGroupsClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ServerGroupsClientBeginCreateOrUpdateOptions ¶ added in v0.2.0
type ServerGroupsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServerGroupsClient.BeginCreateOrUpdate method.
type ServerGroupsClientBeginDeleteOptions ¶ added in v0.2.0
type ServerGroupsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerGroupsClientBeginDeleteOptions contains the optional parameters for the ServerGroupsClient.BeginDelete method.
type ServerGroupsClientBeginRestartOptions ¶ added in v0.2.0
type ServerGroupsClientBeginRestartOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerGroupsClientBeginRestartOptions contains the optional parameters for the ServerGroupsClient.BeginRestart method.
type ServerGroupsClientBeginStartOptions ¶ added in v0.2.0
type ServerGroupsClientBeginStartOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerGroupsClientBeginStartOptions contains the optional parameters for the ServerGroupsClient.BeginStart method.
type ServerGroupsClientBeginStopOptions ¶ added in v0.2.0
type ServerGroupsClientBeginStopOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerGroupsClientBeginStopOptions contains the optional parameters for the ServerGroupsClient.BeginStop method.
type ServerGroupsClientBeginUpdateOptions ¶ added in v0.2.0
type ServerGroupsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ServerGroupsClientBeginUpdateOptions contains the optional parameters for the ServerGroupsClient.BeginUpdate method.
type ServerGroupsClientCheckNameAvailabilityOptions ¶ added in v0.2.0
type ServerGroupsClientCheckNameAvailabilityOptions struct { }
ServerGroupsClientCheckNameAvailabilityOptions contains the optional parameters for the ServerGroupsClient.CheckNameAvailability method.
type ServerGroupsClientCheckNameAvailabilityResponse ¶ added in v0.2.0
type ServerGroupsClientCheckNameAvailabilityResponse struct {
NameAvailability
}
ServerGroupsClientCheckNameAvailabilityResponse contains the response from method ServerGroupsClient.CheckNameAvailability.
type ServerGroupsClientCreateOrUpdateResponse ¶ added in v0.2.0
type ServerGroupsClientCreateOrUpdateResponse struct {
ServerGroup
}
ServerGroupsClientCreateOrUpdateResponse contains the response from method ServerGroupsClient.CreateOrUpdate.
type ServerGroupsClientDeleteResponse ¶ added in v0.2.0
type ServerGroupsClientDeleteResponse struct { }
ServerGroupsClientDeleteResponse contains the response from method ServerGroupsClient.Delete.
type ServerGroupsClientGetOptions ¶ added in v0.2.0
type ServerGroupsClientGetOptions struct { }
ServerGroupsClientGetOptions contains the optional parameters for the ServerGroupsClient.Get method.
type ServerGroupsClientGetResponse ¶ added in v0.2.0
type ServerGroupsClientGetResponse struct {
ServerGroup
}
ServerGroupsClientGetResponse contains the response from method ServerGroupsClient.Get.
type ServerGroupsClientListByResourceGroupOptions ¶ added in v0.2.0
type ServerGroupsClientListByResourceGroupOptions struct { }
ServerGroupsClientListByResourceGroupOptions contains the optional parameters for the ServerGroupsClient.ListByResourceGroup method.
type ServerGroupsClientListByResourceGroupResponse ¶ added in v0.2.0
type ServerGroupsClientListByResourceGroupResponse struct {
ServerGroupListResult
}
ServerGroupsClientListByResourceGroupResponse contains the response from method ServerGroupsClient.ListByResourceGroup.
type ServerGroupsClientListOptions ¶ added in v0.2.0
type ServerGroupsClientListOptions struct { }
ServerGroupsClientListOptions contains the optional parameters for the ServerGroupsClient.List method.
type ServerGroupsClientListResponse ¶ added in v0.2.0
type ServerGroupsClientListResponse struct {
ServerGroupListResult
}
ServerGroupsClientListResponse contains the response from method ServerGroupsClient.List.
type ServerGroupsClientRestartResponse ¶ added in v0.2.0
type ServerGroupsClientRestartResponse struct { }
ServerGroupsClientRestartResponse contains the response from method ServerGroupsClient.Restart.
type ServerGroupsClientStartResponse ¶ added in v0.2.0
type ServerGroupsClientStartResponse struct { }
ServerGroupsClientStartResponse contains the response from method ServerGroupsClient.Start.
type ServerGroupsClientStopResponse ¶ added in v0.2.0
type ServerGroupsClientStopResponse struct { }
ServerGroupsClientStopResponse contains the response from method ServerGroupsClient.Stop.
type ServerGroupsClientUpdateResponse ¶ added in v0.2.0
type ServerGroupsClientUpdateResponse struct {
ServerGroup
}
ServerGroupsClientUpdateResponse contains the response from method ServerGroupsClient.Update.
type ServerHaState ¶
type ServerHaState string
ServerHaState - A state of a server role group/server that is visible to user for HA feature.
const ( ServerHaStateCreatingStandby ServerHaState = "CreatingStandby" ServerHaStateFailingOver ServerHaState = "FailingOver" ServerHaStateHealthy ServerHaState = "Healthy" ServerHaStateNotEnabled ServerHaState = "NotEnabled" ServerHaStateNotSync ServerHaState = "NotSync" ServerHaStateRemovingStandby ServerHaState = "RemovingStandby" ServerHaStateReplicatingData ServerHaState = "ReplicatingData" )
func PossibleServerHaStateValues ¶
func PossibleServerHaStateValues() []ServerHaState
PossibleServerHaStateValues returns the possible values for the ServerHaState const type.
type ServerNameItem ¶
type ServerNameItem struct { // The name of a server. Name *string `json:"name,omitempty"` // READ-ONLY; The fully qualified domain name of a server. FullyQualifiedDomainName *string `json:"fullyQualifiedDomainName,omitempty" azure:"ro"` }
ServerNameItem - The name object for a server.
type ServerProperties ¶
type ServerProperties struct { // If high availability is enabled or not for the server. EnableHa *bool `json:"enableHa,omitempty"` // The edition of a server (default: GeneralPurpose). ServerEdition *ServerEdition `json:"serverEdition,omitempty"` // The storage of a server in MB (max: 2097152 = 2TiB). StorageQuotaInMb *int64 `json:"storageQuotaInMb,omitempty"` // The vCores count of a server (max: 64). VCores *int64 `json:"vCores,omitempty"` // READ-ONLY; If public IP is requested or not for a server. EnablePublicIP *bool `json:"enablePublicIp,omitempty" azure:"ro"` }
ServerProperties - The properties of a server.
type ServerRole ¶
type ServerRole string
ServerRole - The role of a server.
const ( ServerRoleCoordinator ServerRole = "Coordinator" ServerRoleWorker ServerRole = "Worker" )
func PossibleServerRoleValues ¶
func PossibleServerRoleValues() []ServerRole
PossibleServerRoleValues returns the possible values for the ServerRole const type.
type ServerRoleGroup ¶
type ServerRoleGroup struct { // If high availability is enabled or not for the server. EnableHa *bool `json:"enableHa,omitempty"` // The name of the server role group. Name *string `json:"name,omitempty"` // The role of servers in the server role group. Role *ServerRole `json:"role,omitempty"` // The number of servers in the server role group. ServerCount *int32 `json:"serverCount,omitempty"` // The edition of a server (default: GeneralPurpose). ServerEdition *ServerEdition `json:"serverEdition,omitempty"` // The storage of a server in MB (max: 2097152 = 2TiB). StorageQuotaInMb *int64 `json:"storageQuotaInMb,omitempty"` // The vCores count of a server (max: 64). VCores *int64 `json:"vCores,omitempty"` // READ-ONLY; If public IP is requested or not for a server. EnablePublicIP *bool `json:"enablePublicIp,omitempty" azure:"ro"` // READ-ONLY; The list of server names in the server role group. ServerNames []*ServerNameItem `json:"serverNames,omitempty" azure:"ro"` }
ServerRoleGroup - Represents a server role group.
func (ServerRoleGroup) MarshalJSON ¶
func (s ServerRoleGroup) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServerRoleGroup.
type ServerRoleGroupConfiguration ¶
type ServerRoleGroupConfiguration struct { // REQUIRED; The role of servers in the server role group. Role *ServerRole `json:"role,omitempty"` // REQUIRED; Value of the configuration. Value *string `json:"value,omitempty"` // READ-ONLY; Default value of the configuration. DefaultValue *string `json:"defaultValue,omitempty" azure:"ro"` // READ-ONLY; Source of the configuration. Source *string `json:"source,omitempty" azure:"ro"` }
ServerRoleGroupConfiguration - Represents server role group configuration value.
type ServerState ¶
type ServerState string
ServerState - A state of a server group/server that is visible to user.
const ( ServerStateDisabled ServerState = "Disabled" ServerStateDropping ServerState = "Dropping" ServerStateProvisioning ServerState = "Provisioning" ServerStateReady ServerState = "Ready" ServerStateStarting ServerState = "Starting" ServerStateStopped ServerState = "Stopped" ServerStateStopping ServerState = "Stopping" ServerStateUpdating ServerState = "Updating" )
func PossibleServerStateValues ¶
func PossibleServerStateValues() []ServerState
PossibleServerStateValues returns the possible values for the ServerState const type.
type ServersClient ¶
type ServersClient struct {
// contains filtered or unexported fields
}
ServersClient contains the methods for the Servers group. Don't use this type directly, use NewServersClient() instead.
func NewServersClient ¶
func NewServersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServersClient, error)
NewServersClient creates a new instance of ServersClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ServersClient) Get ¶
func (client *ServersClient) Get(ctx context.Context, resourceGroupName string, serverGroupName string, serverName string, options *ServersClientGetOptions) (ServersClientGetResponse, error)
Get - Gets information about a server in server group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-05-privatepreview resourceGroupName - The name of the resource group. The name is case insensitive. serverGroupName - The name of the server group. serverName - The name of the server. options - ServersClientGetOptions contains the optional parameters for the ServersClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2020-10-05-privatepreview/examples/ServerGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresqlhsc/armpostgresqlhsc" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpostgresqlhsc.NewServersClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "TestGroup", "hsctestsg1", "hsctestsg1-c", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*ServersClient) NewListByServerGroupPager ¶ added in v0.4.0
func (client *ServersClient) NewListByServerGroupPager(resourceGroupName string, serverGroupName string, options *ServersClientListByServerGroupOptions) *runtime.Pager[ServersClientListByServerGroupResponse]
NewListByServerGroupPager - Lists servers of a server group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-10-05-privatepreview resourceGroupName - The name of the resource group. The name is case insensitive. serverGroupName - The name of the server group. options - ServersClientListByServerGroupOptions contains the optional parameters for the ServersClient.ListByServerGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/postgresqlhsc/resource-manager/Microsoft.DBforPostgreSQL/preview/2020-10-05-privatepreview/examples/ServerListByServerGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/postgresqlhsc/armpostgresqlhsc" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpostgresqlhsc.NewServersClient("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByServerGroupPager("TestGroup", "hsctestsg1", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type ServersClientGetOptions ¶ added in v0.2.0
type ServersClientGetOptions struct { }
ServersClientGetOptions contains the optional parameters for the ServersClient.Get method.
type ServersClientGetResponse ¶ added in v0.2.0
type ServersClientGetResponse struct {
ServerGroupServer
}
ServersClientGetResponse contains the response from method ServersClient.Get.
type ServersClientListByServerGroupOptions ¶ added in v0.2.0
type ServersClientListByServerGroupOptions struct { }
ServersClientListByServerGroupOptions contains the optional parameters for the ServersClient.ListByServerGroup method.
type ServersClientListByServerGroupResponse ¶ added in v0.2.0
type ServersClientListByServerGroupResponse struct {
ServerGroupServerListResult
}
ServersClientListByServerGroupResponse contains the response from method ServersClient.ListByServerGroup.
type SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time `json:"createdAt,omitempty"` // The identity that created the resource. CreatedBy *string `json:"createdBy,omitempty"` // The type of identity that created the resource. CreatedByType *CreatedByType `json:"createdByType,omitempty"` // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` // The identity that last modified the resource. LastModifiedBy *string `json:"lastModifiedBy,omitempty"` // The type of identity that last modified the resource. LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` }
SystemData - Metadata pertaining to creation and last modification of the resource.
func (SystemData) MarshalJSON ¶
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶
func (s *SystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.
type TrackedResource ¶
type TrackedResource struct { // REQUIRED; The geo-location where the resource lives Location *string `json:"location,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
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.
Source Files ¶
- build.go
- zz_generated_configurations_client.go
- zz_generated_constants.go
- zz_generated_firewallrules_client.go
- zz_generated_models.go
- zz_generated_models_serde.go
- zz_generated_operations_client.go
- zz_generated_response_types.go
- zz_generated_roles_client.go
- zz_generated_servergroups_client.go
- zz_generated_servers_client.go
- zz_generated_time_rfc3339.go