slice

package
v0.20230731.1101513 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/mobilenetwork/2022-11-01/slice Documentation

The slice SDK allows for interaction with the Azure Resource Manager Service mobilenetwork (API Version 2022-11-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/2022-11-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

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateSliceID

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

ValidateSliceID checks that 'input' can be parsed as a Slice ID

Types

type CreateOrUpdateOperationResponse

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

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        *Slice
}

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 added in v0.20230713.1092427

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(api environments.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

func (c SliceClient) CreateOrUpdateThenPoll(ctx context.Context, id SliceId, input Slice) error

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

func ParseSliceID(input string) (*SliceId, error)

ParseSliceID parses 'input' into a SliceId

func ParseSliceIDInsensitively

func ParseSliceIDInsensitively(input string) (*SliceId, error)

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

func (id SliceId) ID() string

ID returns the formatted Slice ID

func (SliceId) Segments

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

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

func (SliceId) String

func (id SliceId) String() string

String returns a human-readable description of this Slice ID

type SlicePropertiesFormat

type SlicePropertiesFormat struct {
	Description       *string            `json:"description,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
	Snssai            Snssai             `json:"snssai"`
}

type Snssai

type Snssai struct {
	Sd  *string `json:"sd,omitempty"`
	Sst int64   `json:"sst"`
}

type TagsObject

type TagsObject struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

type UpdateTagsOperationResponse

type UpdateTagsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Slice
}

Jump to

Keyboard shortcuts

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