services

package
v0.20240819.1075239 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: MPL-2.0 Imports: 15 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/apicenter/2024-03-15-preview/services Documentation

The services SDK allows for interaction with the Azure Resource Manager Service apicenter (API Version 2024-03-15-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/apicenter/2024-03-15-preview/services"

Client Initialization

client := services.NewServicesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ServicesClient.CreateOrUpdate

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

payload := services.Service{
	// ...
}


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

Example Usage: ServicesClient.Delete

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

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

Example Usage: ServicesClient.ExportMetadataSchema

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

payload := services.MetadataSchemaExportRequest{
	// ...
}


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

Example Usage: ServicesClient.Get

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

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: ServicesClient.ListByResourceGroup

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

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

Example Usage: ServicesClient.ListBySubscription

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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

Example Usage: ServicesClient.Update

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

payload := services.ServiceUpdate{
	// ...
}


read, err := client.Update(ctx, id, payload)
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 PossibleValuesForMetadataAssignmentEntity

func PossibleValuesForMetadataAssignmentEntity() []string

func PossibleValuesForMetadataSchemaExportFormat

func PossibleValuesForMetadataSchemaExportFormat() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

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 CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Service
}

type DeleteOperationResponse

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

type ExportMetadataSchemaOperationResponse

type ExportMetadataSchemaOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *MetadataSchemaExportResult
}

type GetOperationResponse

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

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Service
}

type ListByResourceGroupCustomPager added in v0.20240628.1153531

type ListByResourceGroupCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListByResourceGroupCustomPager) NextPageLink() *odata.Link

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Service
}

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Service
}

type ListBySubscriptionCustomPager added in v0.20240628.1153531

type ListBySubscriptionCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListBySubscriptionCustomPager) NextPageLink() *odata.Link

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Service
}

type MetadataAssignmentEntity

type MetadataAssignmentEntity string
const (
	MetadataAssignmentEntityApi         MetadataAssignmentEntity = "api"
	MetadataAssignmentEntityDeployment  MetadataAssignmentEntity = "deployment"
	MetadataAssignmentEntityEnvironment MetadataAssignmentEntity = "environment"
)

func (*MetadataAssignmentEntity) UnmarshalJSON

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

type MetadataSchemaExportFormat

type MetadataSchemaExportFormat string
const (
	MetadataSchemaExportFormatInline MetadataSchemaExportFormat = "inline"
	MetadataSchemaExportFormatLink   MetadataSchemaExportFormat = "link"
)

func (*MetadataSchemaExportFormat) UnmarshalJSON

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

type MetadataSchemaExportRequest

type MetadataSchemaExportRequest struct {
	AssignedTo *MetadataAssignmentEntity `json:"assignedTo,omitempty"`
}

type MetadataSchemaExportResult

type MetadataSchemaExportResult struct {
	Format *MetadataSchemaExportFormat `json:"format,omitempty"`
	Value  *string                     `json:"value,omitempty"`
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
)

func (*ProvisioningState) UnmarshalJSON

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

type Service

type Service struct {
	Id         *string                                  `json:"id,omitempty"`
	Identity   *identity.LegacySystemAndUserAssignedMap `json:"identity,omitempty"`
	Location   string                                   `json:"location"`
	Name       *string                                  `json:"name,omitempty"`
	Properties *ServiceProperties                       `json:"properties,omitempty"`
	SystemData *systemdata.SystemData                   `json:"systemData,omitempty"`
	Tags       *map[string]string                       `json:"tags,omitempty"`
	Type       *string                                  `json:"type,omitempty"`
}

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) FromParseResult

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

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 ServiceOperationPredicate

type ServiceOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (ServiceOperationPredicate) Matches

func (p ServiceOperationPredicate) Matches(input Service) bool

type ServiceProperties

type ServiceProperties struct {
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
	Restore           *bool              `json:"restore,omitempty"`
}

type ServiceUpdate

type ServiceUpdate struct {
	Identity   *identity.LegacySystemAndUserAssignedMap `json:"identity,omitempty"`
	Properties *ServiceUpdateProperties                 `json:"properties,omitempty"`
	Tags       *map[string]string                       `json:"tags,omitempty"`
}

type ServiceUpdateProperties

type ServiceUpdateProperties struct {
	Restore *bool `json:"restore,omitempty"`
}

type ServicesClient

type ServicesClient struct {
	Client *resourcemanager.Client
}

func NewServicesClientWithBaseURI

func NewServicesClientWithBaseURI(sdkApi sdkEnv.Api) (*ServicesClient, error)

func (ServicesClient) CreateOrUpdate

func (c ServicesClient) CreateOrUpdate(ctx context.Context, id ServiceId, input Service) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (ServicesClient) Delete

func (c ServicesClient) Delete(ctx context.Context, id ServiceId) (result DeleteOperationResponse, err error)

Delete ...

func (ServicesClient) ExportMetadataSchema

ExportMetadataSchema ...

func (ServicesClient) ExportMetadataSchemaThenPoll

func (c ServicesClient) ExportMetadataSchemaThenPoll(ctx context.Context, id ServiceId, input MetadataSchemaExportRequest) error

ExportMetadataSchemaThenPoll performs ExportMetadataSchema then polls until it's completed

func (ServicesClient) Get

func (c ServicesClient) Get(ctx context.Context, id ServiceId) (result GetOperationResponse, err error)

Get ...

func (ServicesClient) ListByResourceGroup

ListByResourceGroup ...

func (ServicesClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (ServicesClient) ListByResourceGroupCompleteMatchingPredicate

func (c ServicesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ServiceOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ServicesClient) ListBySubscription

ListBySubscription ...

func (ServicesClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (ServicesClient) ListBySubscriptionCompleteMatchingPredicate

func (c ServicesClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ServiceOperationPredicate) (result ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ServicesClient) Update

func (c ServicesClient) Update(ctx context.Context, id ServiceId, input ServiceUpdate) (result UpdateOperationResponse, err error)

Update ...

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Service
}

Jump to

Keyboard shortcuts

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