apps

package
v0.20240221.1182059 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MPL-2.0 Imports: 14 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/iotcentral/2021-11-01-preview/apps Documentation

The apps SDK allows for interaction with the Azure Resource Manager Service iotcentral (API Version 2021-11-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/iotcentral/2021-11-01-preview/apps"

Client Initialization

client := apps.NewAppsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AppsClient.CheckNameAvailability

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

payload := apps.OperationInputs{
	// ...
}


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

Example Usage: AppsClient.CheckSubdomainAvailability

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

payload := apps.OperationInputs{
	// ...
}


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

Example Usage: AppsClient.CreateOrUpdate

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

payload := apps.App{
	// ...
}


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

Example Usage: AppsClient.Delete

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

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

Example Usage: AppsClient.Get

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

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: AppsClient.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: AppsClient.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: AppsClient.ListTemplates

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

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

Example Usage: AppsClient.Update

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

payload := apps.AppPatch{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForAppSku

func PossibleValuesForAppSku() []string

func PossibleValuesForAppState

func PossibleValuesForAppState() []string

func PossibleValuesForIPRuleAction

func PossibleValuesForIPRuleAction() []string

func PossibleValuesForNetworkAction

func PossibleValuesForNetworkAction() []string

func PossibleValuesForPrivateEndpointConnectionProvisioningState

func PossibleValuesForPrivateEndpointConnectionProvisioningState() []string

func PossibleValuesForPrivateEndpointServiceConnectionStatus

func PossibleValuesForPrivateEndpointServiceConnectionStatus() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForPublicNetworkAccess

func PossibleValuesForPublicNetworkAccess() []string

func ValidateIotAppID

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

ValidateIotAppID checks that 'input' can be parsed as a Iot App ID

Types

type App

type App struct {
	Id         *string                  `json:"id,omitempty"`
	Identity   *identity.SystemAssigned `json:"identity,omitempty"`
	Location   string                   `json:"location"`
	Name       *string                  `json:"name,omitempty"`
	Properties *AppProperties           `json:"properties,omitempty"`
	Sku        AppSkuInfo               `json:"sku"`
	SystemData *systemdata.SystemData   `json:"systemData,omitempty"`
	Tags       *map[string]string       `json:"tags,omitempty"`
	Type       *string                  `json:"type,omitempty"`
}

type AppAvailabilityInfo

type AppAvailabilityInfo struct {
	Message       *string `json:"message,omitempty"`
	NameAvailable *bool   `json:"nameAvailable,omitempty"`
	Reason        *string `json:"reason,omitempty"`
}

type AppOperationPredicate

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

func (AppOperationPredicate) Matches

func (p AppOperationPredicate) Matches(input App) bool

type AppPatch

type AppPatch struct {
	Identity   *identity.SystemAssigned `json:"identity,omitempty"`
	Properties *AppProperties           `json:"properties,omitempty"`
	Sku        *AppSkuInfo              `json:"sku,omitempty"`
	Tags       *map[string]string       `json:"tags,omitempty"`
}

type AppProperties

type AppProperties struct {
	ApplicationId              *string                      `json:"applicationId,omitempty"`
	DisplayName                *string                      `json:"displayName,omitempty"`
	NetworkRuleSets            *NetworkRuleSets             `json:"networkRuleSets,omitempty"`
	PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
	ProvisioningState          *ProvisioningState           `json:"provisioningState,omitempty"`
	PublicNetworkAccess        *PublicNetworkAccess         `json:"publicNetworkAccess,omitempty"`
	State                      *AppState                    `json:"state,omitempty"`
	Subdomain                  *string                      `json:"subdomain,omitempty"`
	Template                   *string                      `json:"template,omitempty"`
}

type AppSku

type AppSku string
const (
	AppSkuSTOne  AppSku = "ST1"
	AppSkuSTTwo  AppSku = "ST2"
	AppSkuSTZero AppSku = "ST0"
)

func (*AppSku) UnmarshalJSON

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

type AppSkuInfo

type AppSkuInfo struct {
	Name AppSku `json:"name"`
}

type AppState

type AppState string
const (
	AppStateCreated   AppState = "created"
	AppStateSuspended AppState = "suspended"
)

func (*AppState) UnmarshalJSON

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

type AppTemplate

type AppTemplate struct {
	Description     *string                 `json:"description,omitempty"`
	Industry        *string                 `json:"industry,omitempty"`
	Locations       *[]AppTemplateLocations `json:"locations,omitempty"`
	ManifestId      *string                 `json:"manifestId,omitempty"`
	ManifestVersion *string                 `json:"manifestVersion,omitempty"`
	Name            *string                 `json:"name,omitempty"`
	Order           *float64                `json:"order,omitempty"`
	Title           *string                 `json:"title,omitempty"`
}

type AppTemplateLocations

type AppTemplateLocations struct {
	DisplayName *string `json:"displayName,omitempty"`
	Id          *string `json:"id,omitempty"`
}

type AppTemplateOperationPredicate

type AppTemplateOperationPredicate struct {
	Description     *string
	Industry        *string
	ManifestId      *string
	ManifestVersion *string
	Name            *string
	Order           *float64
	Title           *string
}

func (AppTemplateOperationPredicate) Matches

type AppsClient

type AppsClient struct {
	Client *resourcemanager.Client
}

func NewAppsClientWithBaseURI

func NewAppsClientWithBaseURI(sdkApi sdkEnv.Api) (*AppsClient, error)

func (AppsClient) CheckNameAvailability

func (c AppsClient) CheckNameAvailability(ctx context.Context, id commonids.SubscriptionId, input OperationInputs) (result CheckNameAvailabilityOperationResponse, err error)

CheckNameAvailability ...

func (AppsClient) CheckSubdomainAvailability

func (c AppsClient) CheckSubdomainAvailability(ctx context.Context, id commonids.SubscriptionId, input OperationInputs) (result CheckSubdomainAvailabilityOperationResponse, err error)

CheckSubdomainAvailability ...

func (AppsClient) CreateOrUpdate

func (c AppsClient) CreateOrUpdate(ctx context.Context, id IotAppId, input App) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (AppsClient) CreateOrUpdateThenPoll

func (c AppsClient) CreateOrUpdateThenPoll(ctx context.Context, id IotAppId, input App) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (AppsClient) Delete

func (c AppsClient) Delete(ctx context.Context, id IotAppId) (result DeleteOperationResponse, err error)

Delete ...

func (AppsClient) DeleteThenPoll

func (c AppsClient) DeleteThenPoll(ctx context.Context, id IotAppId) error

DeleteThenPoll performs Delete then polls until it's completed

func (AppsClient) Get

func (c AppsClient) Get(ctx context.Context, id IotAppId) (result GetOperationResponse, err error)

Get ...

func (AppsClient) ListByResourceGroup

func (c AppsClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error)

ListByResourceGroup ...

func (AppsClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (AppsClient) ListByResourceGroupCompleteMatchingPredicate

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

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (AppsClient) ListBySubscription

func (c AppsClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error)

ListBySubscription ...

func (AppsClient) ListBySubscriptionComplete

func (c AppsClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error)

ListBySubscriptionComplete retrieves all the results into a single object

func (AppsClient) ListBySubscriptionCompleteMatchingPredicate

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

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (AppsClient) ListTemplates

ListTemplates ...

func (AppsClient) ListTemplatesComplete

ListTemplatesComplete retrieves all the results into a single object

func (AppsClient) ListTemplatesCompleteMatchingPredicate

func (c AppsClient) ListTemplatesCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate AppTemplateOperationPredicate) (result ListTemplatesCompleteResult, err error)

ListTemplatesCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (AppsClient) Update

func (c AppsClient) Update(ctx context.Context, id IotAppId, input AppPatch) (result UpdateOperationResponse, err error)

Update ...

func (AppsClient) UpdateThenPoll

func (c AppsClient) UpdateThenPoll(ctx context.Context, id IotAppId, input AppPatch) error

UpdateThenPoll performs Update then polls until it's completed

type CheckNameAvailabilityOperationResponse

type CheckNameAvailabilityOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AppAvailabilityInfo
}

type CheckSubdomainAvailabilityOperationResponse

type CheckSubdomainAvailabilityOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AppAvailabilityInfo
}

type CreateOrUpdateOperationResponse

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

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

type IPRuleAction

type IPRuleAction string
const (
	IPRuleActionAllow IPRuleAction = "Allow"
)

func (*IPRuleAction) UnmarshalJSON

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

type IotAppId

type IotAppId struct {
	SubscriptionId    string
	ResourceGroupName string
	IotAppName        string
}

IotAppId is a struct representing the Resource ID for a Iot App

func NewIotAppID

func NewIotAppID(subscriptionId string, resourceGroupName string, iotAppName string) IotAppId

NewIotAppID returns a new IotAppId struct

func ParseIotAppID

func ParseIotAppID(input string) (*IotAppId, error)

ParseIotAppID parses 'input' into a IotAppId

func ParseIotAppIDInsensitively

func ParseIotAppIDInsensitively(input string) (*IotAppId, error)

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

func (*IotAppId) FromParseResult

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

func (IotAppId) ID

func (id IotAppId) ID() string

ID returns the formatted Iot App ID

func (IotAppId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Iot App ID

func (IotAppId) String

func (id IotAppId) String() string

String returns a human-readable description of this Iot App ID

type ListByResourceGroupCompleteResult

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

type ListByResourceGroupOperationResponse

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

type ListBySubscriptionCompleteResult

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

type ListBySubscriptionOperationResponse

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

type ListTemplatesCompleteResult

type ListTemplatesCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []AppTemplate
}

type ListTemplatesOperationResponse

type ListTemplatesOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]AppTemplate
}

type NetworkAction

type NetworkAction string
const (
	NetworkActionAllow NetworkAction = "Allow"
	NetworkActionDeny  NetworkAction = "Deny"
)

func (*NetworkAction) UnmarshalJSON

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

type NetworkRuleSetIPRule

type NetworkRuleSetIPRule struct {
	Action     *IPRuleAction `json:"action,omitempty"`
	FilterName *string       `json:"filterName,omitempty"`
	IPMask     *string       `json:"ipMask,omitempty"`
}

type NetworkRuleSets

type NetworkRuleSets struct {
	ApplyToDevices    *bool                   `json:"applyToDevices,omitempty"`
	ApplyToIoTCentral *bool                   `json:"applyToIoTCentral,omitempty"`
	DefaultAction     *NetworkAction          `json:"defaultAction,omitempty"`
	IPRules           *[]NetworkRuleSetIPRule `json:"ipRules,omitempty"`
}

type OperationInputs

type OperationInputs struct {
	Name string  `json:"name"`
	Type *string `json:"type,omitempty"`
}

type PrivateEndpoint

type PrivateEndpoint struct {
	Id *string `json:"id,omitempty"`
}

type PrivateEndpointConnection

type PrivateEndpointConnection struct {
	Id         *string                              `json:"id,omitempty"`
	Name       *string                              `json:"name,omitempty"`
	Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData               `json:"systemData,omitempty"`
	Type       *string                              `json:"type,omitempty"`
}

type PrivateEndpointConnectionProperties

type PrivateEndpointConnectionProperties struct {
	GroupIds                          *[]string                                   `json:"groupIds,omitempty"`
	PrivateEndpoint                   *PrivateEndpoint                            `json:"privateEndpoint,omitempty"`
	PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState           `json:"privateLinkServiceConnectionState"`
	ProvisioningState                 *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"`
}

type PrivateEndpointConnectionProvisioningState

type PrivateEndpointConnectionProvisioningState string
const (
	PrivateEndpointConnectionProvisioningStateCreating  PrivateEndpointConnectionProvisioningState = "Creating"
	PrivateEndpointConnectionProvisioningStateDeleting  PrivateEndpointConnectionProvisioningState = "Deleting"
	PrivateEndpointConnectionProvisioningStateFailed    PrivateEndpointConnectionProvisioningState = "Failed"
	PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded"
)

func (*PrivateEndpointConnectionProvisioningState) UnmarshalJSON

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

type PrivateEndpointServiceConnectionStatus

type PrivateEndpointServiceConnectionStatus string
const (
	PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved"
	PrivateEndpointServiceConnectionStatusPending  PrivateEndpointServiceConnectionStatus = "Pending"
	PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected"
)

func (*PrivateEndpointServiceConnectionStatus) UnmarshalJSON

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

type PrivateLinkServiceConnectionState

type PrivateLinkServiceConnectionState struct {
	ActionsRequired *string                                 `json:"actionsRequired,omitempty"`
	Description     *string                                 `json:"description,omitempty"`
	Status          *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"`
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateCreating  ProvisioningState = "Creating"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

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

type PublicNetworkAccess

type PublicNetworkAccess string
const (
	PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled"
	PublicNetworkAccessEnabled  PublicNetworkAccess = "Enabled"
)

func (*PublicNetworkAccess) UnmarshalJSON

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

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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