deployments

package
v0.20240624.1113120 Latest Latest
Warning

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

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

README

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

The deployments 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-sdk/resource-manager/apicenter/2024-03-15-preview/deployments"

Client Initialization

client := deployments.NewDeploymentsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DeploymentsClient.CreateOrUpdate

ctx := context.TODO()
id := deployments.NewDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "workspaceValue", "apiValue", "deploymentValue")

payload := deployments.Deployment{
	// ...
}


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: DeploymentsClient.Delete

ctx := context.TODO()
id := deployments.NewDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "workspaceValue", "apiValue", "deploymentValue")

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: DeploymentsClient.Get

ctx := context.TODO()
id := deployments.NewDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "workspaceValue", "apiValue", "deploymentValue")

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: DeploymentsClient.Head

ctx := context.TODO()
id := deployments.NewDeploymentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "workspaceValue", "apiValue", "deploymentValue")

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

Example Usage: DeploymentsClient.List

ctx := context.TODO()
id := deployments.NewApiID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "workspaceValue", "apiValue")

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForDeploymentState

func PossibleValuesForDeploymentState() []string

func ValidateApiID

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

ValidateApiID checks that 'input' can be parsed as a Api ID

func ValidateDeploymentID

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

ValidateDeploymentID checks that 'input' can be parsed as a Deployment ID

Types

type ApiId

type ApiId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	WorkspaceName     string
	ApiName           string
}

ApiId is a struct representing the Resource ID for a Api

func NewApiID

func NewApiID(subscriptionId string, resourceGroupName string, serviceName string, workspaceName string, apiName string) ApiId

NewApiID returns a new ApiId struct

func ParseApiID

func ParseApiID(input string) (*ApiId, error)

ParseApiID parses 'input' into a ApiId

func ParseApiIDInsensitively

func ParseApiIDInsensitively(input string) (*ApiId, error)

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

func (*ApiId) FromParseResult

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

func (ApiId) ID

func (id ApiId) ID() string

ID returns the formatted Api ID

func (ApiId) Segments

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

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

func (ApiId) String

func (id ApiId) String() string

String returns a human-readable description of this Api ID

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type Deployment

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

type DeploymentId

type DeploymentId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	WorkspaceName     string
	ApiName           string
	DeploymentName    string
}

DeploymentId is a struct representing the Resource ID for a Deployment

func NewDeploymentID

func NewDeploymentID(subscriptionId string, resourceGroupName string, serviceName string, workspaceName string, apiName string, deploymentName string) DeploymentId

NewDeploymentID returns a new DeploymentId struct

func ParseDeploymentID

func ParseDeploymentID(input string) (*DeploymentId, error)

ParseDeploymentID parses 'input' into a DeploymentId

func ParseDeploymentIDInsensitively

func ParseDeploymentIDInsensitively(input string) (*DeploymentId, error)

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

func (*DeploymentId) FromParseResult

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

func (DeploymentId) ID

func (id DeploymentId) ID() string

ID returns the formatted Deployment ID

func (DeploymentId) Segments

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

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

func (DeploymentId) String

func (id DeploymentId) String() string

String returns a human-readable description of this Deployment ID

type DeploymentOperationPredicate

type DeploymentOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (DeploymentOperationPredicate) Matches

func (p DeploymentOperationPredicate) Matches(input Deployment) bool

type DeploymentProperties

type DeploymentProperties struct {
	CustomProperties *interface{}      `json:"customProperties,omitempty"`
	DefinitionId     *string           `json:"definitionId,omitempty"`
	Description      *string           `json:"description,omitempty"`
	EnvironmentId    *string           `json:"environmentId,omitempty"`
	Server           *DeploymentServer `json:"server,omitempty"`
	State            *DeploymentState  `json:"state,omitempty"`
	Title            *string           `json:"title,omitempty"`
}

type DeploymentServer

type DeploymentServer struct {
	RuntimeUri *[]string `json:"runtimeUri,omitempty"`
}

type DeploymentState

type DeploymentState string
const (
	DeploymentStateActive   DeploymentState = "active"
	DeploymentStateInactive DeploymentState = "inactive"
)

func (*DeploymentState) UnmarshalJSON

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

type DeploymentsClient

type DeploymentsClient struct {
	Client *resourcemanager.Client
}

func NewDeploymentsClientWithBaseURI

func NewDeploymentsClientWithBaseURI(sdkApi sdkEnv.Api) (*DeploymentsClient, error)

func (DeploymentsClient) CreateOrUpdate

func (c DeploymentsClient) CreateOrUpdate(ctx context.Context, id DeploymentId, input Deployment) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (DeploymentsClient) Delete

Delete ...

func (DeploymentsClient) Get

Get ...

func (DeploymentsClient) Head

Head ...

func (DeploymentsClient) List

List ...

func (DeploymentsClient) ListComplete

ListComplete retrieves all the results into a single object

func (DeploymentsClient) ListCompleteMatchingPredicate

func (c DeploymentsClient) ListCompleteMatchingPredicate(ctx context.Context, id ApiId, options ListOperationOptions, predicate DeploymentOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type GetOperationResponse

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

type HeadOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Deployment
}

type ListOperationOptions

type ListOperationOptions struct {
	Filter *string
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders

func (o ListOperationOptions) ToHeaders() *client.Headers

func (ListOperationOptions) ToOData

func (o ListOperationOptions) ToOData() *odata.Query

func (ListOperationOptions) ToQuery

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Deployment
}

Jump to

Keyboard shortcuts

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