group

package
v0.20230427.1141117 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: MPL-2.0 Imports: 8 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2021-08-01/group Documentation

The group SDK allows for interaction with the Azure Resource Manager Service apimanagement (API Version 2021-08-01).

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-sdk/resource-manager/apimanagement/2021-08-01/group"

Client Initialization

client := group.NewGroupClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: GroupClient.CreateOrUpdate

ctx := context.TODO()
id := group.NewGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "groupIdValue")

payload := group.GroupCreateParameters{
	// ...
}


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

Example Usage: GroupClient.Delete

ctx := context.TODO()
id := group.NewGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "groupIdValue")

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

Example Usage: GroupClient.Get

ctx := context.TODO()
id := group.NewGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "groupIdValue")

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: GroupClient.GetEntityTag

ctx := context.TODO()
id := group.NewGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "groupIdValue")

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

Example Usage: GroupClient.ListByService

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

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

Example Usage: GroupClient.Update

ctx := context.TODO()
id := group.NewGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "groupIdValue")

payload := group.GroupUpdateParameters{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForGroupType

func PossibleValuesForGroupType() []string

func ValidateGroupID

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

ValidateGroupID checks that 'input' can be parsed as a Group ID

func ValidateServiceID

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

ValidateServiceID checks that 'input' can be parsed as a Service ID

Types

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch *string
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *GroupContract
}

type DeleteOperationOptions

type DeleteOperationOptions struct {
	IfMatch *string
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type GetEntityTagOperationResponse

type GetEntityTagOperationResponse struct {
	HttpResponse *http.Response
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *GroupContract
}

type GroupClient

type GroupClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewGroupClientWithBaseURI

func NewGroupClientWithBaseURI(endpoint string) GroupClient

func (GroupClient) CreateOrUpdate

CreateOrUpdate ...

func (GroupClient) Delete

func (c GroupClient) Delete(ctx context.Context, id GroupId, options DeleteOperationOptions) (result DeleteOperationResponse, err error)

Delete ...

func (GroupClient) Get

func (c GroupClient) Get(ctx context.Context, id GroupId) (result GetOperationResponse, err error)

Get ...

func (GroupClient) GetEntityTag

func (c GroupClient) GetEntityTag(ctx context.Context, id GroupId) (result GetEntityTagOperationResponse, err error)

GetEntityTag ...

func (GroupClient) ListByService

ListByService ...

func (GroupClient) ListByServiceComplete

ListByServiceComplete retrieves all of the results into a single object

func (GroupClient) ListByServiceCompleteMatchingPredicate

func (c GroupClient) ListByServiceCompleteMatchingPredicate(ctx context.Context, id ServiceId, options ListByServiceOperationOptions, predicate GroupContractOperationPredicate) (resp ListByServiceCompleteResult, err error)

ListByServiceCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (GroupClient) Update

Update ...

type GroupContract

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

type GroupContractOperationPredicate

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

func (GroupContractOperationPredicate) Matches

type GroupContractProperties

type GroupContractProperties struct {
	BuiltIn     *bool      `json:"builtIn,omitempty"`
	Description *string    `json:"description,omitempty"`
	DisplayName string     `json:"displayName"`
	ExternalId  *string    `json:"externalId,omitempty"`
	Type        *GroupType `json:"type,omitempty"`
}

type GroupCreateParameters

type GroupCreateParameters struct {
	Properties *GroupCreateParametersProperties `json:"properties,omitempty"`
}

type GroupCreateParametersProperties

type GroupCreateParametersProperties struct {
	Description *string    `json:"description,omitempty"`
	DisplayName string     `json:"displayName"`
	ExternalId  *string    `json:"externalId,omitempty"`
	Type        *GroupType `json:"type,omitempty"`
}

type GroupId

type GroupId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	GroupId           string
}

GroupId is a struct representing the Resource ID for a Group

func NewGroupID

func NewGroupID(subscriptionId string, resourceGroupName string, serviceName string, groupId string) GroupId

NewGroupID returns a new GroupId struct

func ParseGroupID

func ParseGroupID(input string) (*GroupId, error)

ParseGroupID parses 'input' into a GroupId

func ParseGroupIDInsensitively

func ParseGroupIDInsensitively(input string) (*GroupId, error)

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

func (GroupId) ID

func (id GroupId) ID() string

ID returns the formatted Group ID

func (GroupId) Segments

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

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

func (GroupId) String

func (id GroupId) String() string

String returns a human-readable description of this Group ID

type GroupType

type GroupType string
const (
	GroupTypeCustom   GroupType = "custom"
	GroupTypeExternal GroupType = "external"
	GroupTypeSystem   GroupType = "system"
)

type GroupUpdateParameters

type GroupUpdateParameters struct {
	Properties *GroupUpdateParametersProperties `json:"properties,omitempty"`
}

type GroupUpdateParametersProperties

type GroupUpdateParametersProperties struct {
	Description *string    `json:"description,omitempty"`
	DisplayName *string    `json:"displayName,omitempty"`
	ExternalId  *string    `json:"externalId,omitempty"`
	Type        *GroupType `json:"type,omitempty"`
}

type ListByServiceCompleteResult

type ListByServiceCompleteResult struct {
	Items []GroupContract
}

type ListByServiceOperationOptions

type ListByServiceOperationOptions struct {
	Filter *string
	Skip   *int64
	Top    *int64
}

func DefaultListByServiceOperationOptions

func DefaultListByServiceOperationOptions() ListByServiceOperationOptions

type ListByServiceOperationResponse

type ListByServiceOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]GroupContract
	// contains filtered or unexported fields
}

func (ListByServiceOperationResponse) HasMore

func (ListByServiceOperationResponse) LoadMore

type ServiceId

type ServiceId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
}

ServiceId is a struct representing the Resource ID for a Service

func NewServiceID

func NewServiceID(subscriptionId string, resourceGroupName string, serviceName string) ServiceId

NewServiceID returns a new ServiceId struct

func ParseServiceID

func ParseServiceID(input string) (*ServiceId, error)

ParseServiceID parses 'input' into a ServiceId

func ParseServiceIDInsensitively

func ParseServiceIDInsensitively(input string) (*ServiceId, error)

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

func (ServiceId) ID

func (id ServiceId) ID() string

ID returns the formatted Service ID

func (ServiceId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Service ID

func (ServiceId) String

func (id ServiceId) String() string

String returns a human-readable description of this Service ID

type UpdateOperationOptions

type UpdateOperationOptions struct {
	IfMatch *string
}

func DefaultUpdateOperationOptions

func DefaultUpdateOperationOptions() UpdateOperationOptions

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *GroupContract
}

Jump to

Keyboard shortcuts

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