solution

package
v0.20241126.2320 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/operationsmanagement/2015-11-01-preview/solution Documentation

The solution SDK allows for interaction with Azure Resource Manager operationsmanagement (API Version 2015-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/operationsmanagement/2015-11-01-preview/solution"

Client Initialization

client := solution.NewSolutionClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SolutionClient.CreateOrUpdate

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

payload := solution.Solution{
	// ...
}


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

Example Usage: SolutionClient.Delete

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

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

Example Usage: SolutionClient.Get

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

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

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

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

Example Usage: SolutionClient.ListBySubscription

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

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

Example Usage: SolutionClient.Update

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

payload := solution.SolutionPatch{
	// ...
}


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 ValidateSolutionID

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

ValidateSolutionID checks that 'input' can be parsed as a Solution ID

Types

type CreateOrUpdateOperationResponse

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

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

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SolutionPropertiesList
}

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SolutionPropertiesList
}

type Solution

type Solution struct {
	Id         *string             `json:"id,omitempty"`
	Location   *string             `json:"location,omitempty"`
	Name       *string             `json:"name,omitempty"`
	Plan       *SolutionPlan       `json:"plan,omitempty"`
	Properties *SolutionProperties `json:"properties,omitempty"`
	Tags       *map[string]string  `json:"tags,omitempty"`
	Type       *string             `json:"type,omitempty"`
}

type SolutionClient

type SolutionClient struct {
	Client *resourcemanager.Client
}

func NewSolutionClientWithBaseURI

func NewSolutionClientWithBaseURI(sdkApi sdkEnv.Api) (*SolutionClient, error)

func (SolutionClient) CreateOrUpdate

func (c SolutionClient) CreateOrUpdate(ctx context.Context, id SolutionId, input Solution) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (SolutionClient) CreateOrUpdateThenPoll

func (c SolutionClient) CreateOrUpdateThenPoll(ctx context.Context, id SolutionId, input Solution) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (SolutionClient) Delete

func (c SolutionClient) Delete(ctx context.Context, id SolutionId) (result DeleteOperationResponse, err error)

Delete ...

func (SolutionClient) DeleteThenPoll

func (c SolutionClient) DeleteThenPoll(ctx context.Context, id SolutionId) error

DeleteThenPoll performs Delete then polls until it's completed

func (SolutionClient) Get

func (c SolutionClient) Get(ctx context.Context, id SolutionId) (result GetOperationResponse, err error)

Get ...

func (SolutionClient) ListByResourceGroup

ListByResourceGroup ...

func (SolutionClient) ListBySubscription

ListBySubscription ...

func (SolutionClient) Update

func (c SolutionClient) Update(ctx context.Context, id SolutionId, input SolutionPatch) (result UpdateOperationResponse, err error)

Update ...

func (SolutionClient) UpdateThenPoll

func (c SolutionClient) UpdateThenPoll(ctx context.Context, id SolutionId, input SolutionPatch) error

UpdateThenPoll performs Update then polls until it's completed

type SolutionId

type SolutionId struct {
	SubscriptionId    string
	ResourceGroupName string
	SolutionName      string
}

SolutionId is a struct representing the Resource ID for a Solution

func NewSolutionID

func NewSolutionID(subscriptionId string, resourceGroupName string, solutionName string) SolutionId

NewSolutionID returns a new SolutionId struct

func ParseSolutionID

func ParseSolutionID(input string) (*SolutionId, error)

ParseSolutionID parses 'input' into a SolutionId

func ParseSolutionIDInsensitively

func ParseSolutionIDInsensitively(input string) (*SolutionId, error)

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

func (*SolutionId) FromParseResult

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

func (SolutionId) ID

func (id SolutionId) ID() string

ID returns the formatted Solution ID

func (SolutionId) Segments

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

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

func (SolutionId) String

func (id SolutionId) String() string

String returns a human-readable description of this Solution ID

type SolutionPatch

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

type SolutionPlan

type SolutionPlan struct {
	Name          *string `json:"name,omitempty"`
	Product       *string `json:"product,omitempty"`
	PromotionCode *string `json:"promotionCode,omitempty"`
	Publisher     *string `json:"publisher,omitempty"`
}

type SolutionProperties

type SolutionProperties struct {
	ContainedResources  *[]string `json:"containedResources,omitempty"`
	ProvisioningState   *string   `json:"provisioningState,omitempty"`
	ReferencedResources *[]string `json:"referencedResources,omitempty"`
	WorkspaceResourceId string    `json:"workspaceResourceId"`
}

type SolutionPropertiesList

type SolutionPropertiesList struct {
	Value *[]Solution `json:"value,omitempty"`
}

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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