README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2024-02-01/slice
Documentation
The slice
SDK allows for interaction with the Azure Resource Manager Service mobilenetwork
(API Version 2024-02-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/mobilenetwork/2024-02-01/slice"
Client Initialization
client := slice.NewSliceClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: SliceClient.CreateOrUpdate
ctx := context.TODO()
id := slice.NewSliceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mobileNetworkValue", "sliceValue")
payload := slice.Slice{
// ...
}
if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
// handle the error
}
Example Usage: SliceClient.Delete
ctx := context.TODO()
id := slice.NewSliceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mobileNetworkValue", "sliceValue")
if err := client.DeleteThenPoll(ctx, id); err != nil {
// handle the error
}
Example Usage: SliceClient.Get
ctx := context.TODO()
id := slice.NewSliceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mobileNetworkValue", "sliceValue")
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: SliceClient.UpdateTags
ctx := context.TODO()
id := slice.NewSliceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "mobileNetworkValue", "sliceValue")
payload := slice.TagsObject{
// ...
}
read, err := client.UpdateTags(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Documentation ¶
Index ¶
- func PossibleValuesForProvisioningState() []string
- func ValidateSliceID(input interface{}, key string) (warnings []string, errors []error)
- type CreateOrUpdateOperationResponse
- type DeleteOperationResponse
- type GetOperationResponse
- type ProvisioningState
- type Slice
- type SliceClient
- func (c SliceClient) CreateOrUpdate(ctx context.Context, id SliceId, input Slice) (result CreateOrUpdateOperationResponse, err error)
- func (c SliceClient) CreateOrUpdateThenPoll(ctx context.Context, id SliceId, input Slice) error
- func (c SliceClient) Delete(ctx context.Context, id SliceId) (result DeleteOperationResponse, err error)
- func (c SliceClient) DeleteThenPoll(ctx context.Context, id SliceId) error
- func (c SliceClient) Get(ctx context.Context, id SliceId) (result GetOperationResponse, err error)
- func (c SliceClient) UpdateTags(ctx context.Context, id SliceId, input TagsObject) (result UpdateTagsOperationResponse, err error)
- type SliceId
- type SlicePropertiesFormat
- type Snssai
- type TagsObject
- type UpdateTagsOperationResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PossibleValuesForProvisioningState ¶
func PossibleValuesForProvisioningState() []string
func ValidateSliceID ¶
ValidateSliceID checks that 'input' can be parsed as a Slice ID
Types ¶
type DeleteOperationResponse ¶
type GetOperationResponse ¶
type ProvisioningState ¶
type ProvisioningState string
const ( ProvisioningStateAccepted ProvisioningState = "Accepted" ProvisioningStateCanceled ProvisioningState = "Canceled" ProvisioningStateDeleted ProvisioningState = "Deleted" ProvisioningStateDeleting ProvisioningState = "Deleting" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateSucceeded ProvisioningState = "Succeeded" ProvisioningStateUnknown ProvisioningState = "Unknown" )
func (*ProvisioningState) UnmarshalJSON ¶
func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error
type Slice ¶
type Slice struct { Id *string `json:"id,omitempty"` Location string `json:"location"` Name *string `json:"name,omitempty"` Properties SlicePropertiesFormat `json:"properties"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Tags *map[string]string `json:"tags,omitempty"` Type *string `json:"type,omitempty"` }
type SliceClient ¶
type SliceClient struct {
Client *resourcemanager.Client
}
func NewSliceClientWithBaseURI ¶
func NewSliceClientWithBaseURI(sdkApi sdkEnv.Api) (*SliceClient, error)
func (SliceClient) CreateOrUpdate ¶
func (c SliceClient) CreateOrUpdate(ctx context.Context, id SliceId, input Slice) (result CreateOrUpdateOperationResponse, err error)
CreateOrUpdate ...
func (SliceClient) CreateOrUpdateThenPoll ¶
CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed
func (SliceClient) Delete ¶
func (c SliceClient) Delete(ctx context.Context, id SliceId) (result DeleteOperationResponse, err error)
Delete ...
func (SliceClient) DeleteThenPoll ¶
func (c SliceClient) DeleteThenPoll(ctx context.Context, id SliceId) error
DeleteThenPoll performs Delete then polls until it's completed
func (SliceClient) Get ¶
func (c SliceClient) Get(ctx context.Context, id SliceId) (result GetOperationResponse, err error)
Get ...
func (SliceClient) UpdateTags ¶
func (c SliceClient) UpdateTags(ctx context.Context, id SliceId, input TagsObject) (result UpdateTagsOperationResponse, err error)
UpdateTags ...
type SliceId ¶
type SliceId struct { SubscriptionId string ResourceGroupName string MobileNetworkName string SliceName string }
SliceId is a struct representing the Resource ID for a Slice
func NewSliceID ¶
func NewSliceID(subscriptionId string, resourceGroupName string, mobileNetworkName string, sliceName string) SliceId
NewSliceID returns a new SliceId struct
func ParseSliceID ¶
ParseSliceID parses 'input' into a SliceId
func ParseSliceIDInsensitively ¶
ParseSliceIDInsensitively parses 'input' case-insensitively into a SliceId note: this method should only be used for API response data and not user input
func (*SliceId) FromParseResult ¶
func (id *SliceId) FromParseResult(input resourceids.ParseResult) error
func (SliceId) Segments ¶
func (id SliceId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Slice ID
type SlicePropertiesFormat ¶
type SlicePropertiesFormat struct { Description *string `json:"description,omitempty"` ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"` Snssai Snssai `json:"snssai"` }