servertrustgroups

package
v0.20240320.1105218 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/servertrustgroups Documentation

The servertrustgroups SDK allows for interaction with the Azure Resource Manager Service sql (API Version 2023-05-01-preview).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-05-01-preview/servertrustgroups"

Client Initialization

client := servertrustgroups.NewServerTrustGroupsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ServerTrustGroupsClient.CreateOrUpdate

ctx := context.TODO()
id := servertrustgroups.NewServerTrustGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "serverTrustGroupValue")

payload := servertrustgroups.ServerTrustGroup{
	// ...
}


if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: ServerTrustGroupsClient.Delete

ctx := context.TODO()
id := servertrustgroups.NewServerTrustGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "serverTrustGroupValue")

if err := client.DeleteThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: ServerTrustGroupsClient.Get

ctx := context.TODO()
id := servertrustgroups.NewServerTrustGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "serverTrustGroupValue")

read, err := client.Get(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ServerTrustGroupsClient.ListByInstance

ctx := context.TODO()
id := commonids.NewSqlManagedInstanceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedInstanceValue")

// alternatively `client.ListByInstance(ctx, id)` can be used to do batched pagination
items, err := client.ListByInstanceComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: ServerTrustGroupsClient.ListByLocation

ctx := context.TODO()
id := servertrustgroups.NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue")

// alternatively `client.ListByLocation(ctx, id)` can be used to do batched pagination
items, err := client.ListByLocationComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForTrustScopes

func PossibleValuesForTrustScopes() []string

func ValidateProviderLocationID

func ValidateProviderLocationID(input interface{}, key string) (warnings []string, errors []error)

ValidateProviderLocationID checks that 'input' can be parsed as a Provider Location ID

func ValidateServerTrustGroupID

func ValidateServerTrustGroupID(input interface{}, key string) (warnings []string, errors []error)

ValidateServerTrustGroupID checks that 'input' can be parsed as a Server Trust Group ID

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ServerTrustGroup
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ServerTrustGroup
}

type ListByInstanceCompleteResult

type ListByInstanceCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ServerTrustGroup
}

type ListByInstanceOperationResponse

type ListByInstanceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ServerTrustGroup
}

type ListByLocationCompleteResult

type ListByLocationCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ServerTrustGroup
}

type ListByLocationOperationResponse

type ListByLocationOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ServerTrustGroup
}

type ProviderLocationId

type ProviderLocationId struct {
	SubscriptionId    string
	ResourceGroupName string
	LocationName      string
}

ProviderLocationId is a struct representing the Resource ID for a Provider Location

func NewProviderLocationID

func NewProviderLocationID(subscriptionId string, resourceGroupName string, locationName string) ProviderLocationId

NewProviderLocationID returns a new ProviderLocationId struct

func ParseProviderLocationID

func ParseProviderLocationID(input string) (*ProviderLocationId, error)

ParseProviderLocationID parses 'input' into a ProviderLocationId

func ParseProviderLocationIDInsensitively

func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, error)

ParseProviderLocationIDInsensitively parses 'input' case-insensitively into a ProviderLocationId note: this method should only be used for API response data and not user input

func (*ProviderLocationId) FromParseResult

func (id *ProviderLocationId) FromParseResult(input resourceids.ParseResult) error

func (ProviderLocationId) ID

func (id ProviderLocationId) ID() string

ID returns the formatted Provider Location ID

func (ProviderLocationId) Segments

func (id ProviderLocationId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Provider Location ID

func (ProviderLocationId) String

func (id ProviderLocationId) String() string

String returns a human-readable description of this Provider Location ID

type ServerInfo

type ServerInfo struct {
	ServerId string `json:"serverId"`
}

type ServerTrustGroup

type ServerTrustGroup struct {
	Id         *string                     `json:"id,omitempty"`
	Name       *string                     `json:"name,omitempty"`
	Properties *ServerTrustGroupProperties `json:"properties,omitempty"`
	Type       *string                     `json:"type,omitempty"`
}

type ServerTrustGroupId

type ServerTrustGroupId struct {
	SubscriptionId       string
	ResourceGroupName    string
	LocationName         string
	ServerTrustGroupName string
}

ServerTrustGroupId is a struct representing the Resource ID for a Server Trust Group

func NewServerTrustGroupID

func NewServerTrustGroupID(subscriptionId string, resourceGroupName string, locationName string, serverTrustGroupName string) ServerTrustGroupId

NewServerTrustGroupID returns a new ServerTrustGroupId struct

func ParseServerTrustGroupID

func ParseServerTrustGroupID(input string) (*ServerTrustGroupId, error)

ParseServerTrustGroupID parses 'input' into a ServerTrustGroupId

func ParseServerTrustGroupIDInsensitively

func ParseServerTrustGroupIDInsensitively(input string) (*ServerTrustGroupId, error)

ParseServerTrustGroupIDInsensitively parses 'input' case-insensitively into a ServerTrustGroupId note: this method should only be used for API response data and not user input

func (*ServerTrustGroupId) FromParseResult

func (id *ServerTrustGroupId) FromParseResult(input resourceids.ParseResult) error

func (ServerTrustGroupId) ID

func (id ServerTrustGroupId) ID() string

ID returns the formatted Server Trust Group ID

func (ServerTrustGroupId) Segments

func (id ServerTrustGroupId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Server Trust Group ID

func (ServerTrustGroupId) String

func (id ServerTrustGroupId) String() string

String returns a human-readable description of this Server Trust Group ID

type ServerTrustGroupOperationPredicate

type ServerTrustGroupOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (ServerTrustGroupOperationPredicate) Matches

type ServerTrustGroupProperties

type ServerTrustGroupProperties struct {
	GroupMembers []ServerInfo  `json:"groupMembers"`
	TrustScopes  []TrustScopes `json:"trustScopes"`
}

type ServerTrustGroupsClient

type ServerTrustGroupsClient struct {
	Client *resourcemanager.Client
}

func NewServerTrustGroupsClientWithBaseURI

func NewServerTrustGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerTrustGroupsClient, error)

func (ServerTrustGroupsClient) CreateOrUpdate

CreateOrUpdate ...

func (ServerTrustGroupsClient) CreateOrUpdateThenPoll

func (c ServerTrustGroupsClient) CreateOrUpdateThenPoll(ctx context.Context, id ServerTrustGroupId, input ServerTrustGroup) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (ServerTrustGroupsClient) Delete

Delete ...

func (ServerTrustGroupsClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (ServerTrustGroupsClient) Get

Get ...

func (ServerTrustGroupsClient) ListByInstance

ListByInstance ...

func (ServerTrustGroupsClient) ListByInstanceComplete

ListByInstanceComplete retrieves all the results into a single object

func (ServerTrustGroupsClient) ListByInstanceCompleteMatchingPredicate

func (c ServerTrustGroupsClient) ListByInstanceCompleteMatchingPredicate(ctx context.Context, id commonids.SqlManagedInstanceId, predicate ServerTrustGroupOperationPredicate) (result ListByInstanceCompleteResult, err error)

ListByInstanceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ServerTrustGroupsClient) ListByLocation

ListByLocation ...

func (ServerTrustGroupsClient) ListByLocationComplete

ListByLocationComplete retrieves all the results into a single object

func (ServerTrustGroupsClient) ListByLocationCompleteMatchingPredicate

func (c ServerTrustGroupsClient) ListByLocationCompleteMatchingPredicate(ctx context.Context, id ProviderLocationId, predicate ServerTrustGroupOperationPredicate) (result ListByLocationCompleteResult, err error)

ListByLocationCompleteMatchingPredicate retrieves all the results and then applies the predicate

type TrustScopes

type TrustScopes string
const (
	TrustScopesGlobalTransactions TrustScopes = "GlobalTransactions"
	TrustScopesServiceBroker      TrustScopes = "ServiceBroker"
)

func (*TrustScopes) UnmarshalJSON

func (s *TrustScopes) UnmarshalJSON(bytes []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL