environments

package
v0.20230823.1052657 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: MPL-2.0 Imports: 10 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/environments Documentation

The environments SDK allows for interaction with the Azure Resource Manager Service devtestlab (API Version 2018-09-15).

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/devtestlab/2018-09-15/environments"

Client Initialization

client := environments.NewEnvironmentsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: EnvironmentsClient.CreateOrUpdate

ctx := context.TODO()
id := environments.NewEnvironmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "userValue", "environmentValue")

payload := environments.DtlEnvironment{
	// ...
}


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

Example Usage: EnvironmentsClient.Delete

ctx := context.TODO()
id := environments.NewEnvironmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "userValue", "environmentValue")

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

Example Usage: EnvironmentsClient.Get

ctx := context.TODO()
id := environments.NewEnvironmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "userValue", "environmentValue")

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

Example Usage: EnvironmentsClient.List

ctx := context.TODO()
id := environments.NewUserID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "userValue")

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

Example Usage: EnvironmentsClient.Update

ctx := context.TODO()
id := environments.NewEnvironmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "userValue", "environmentValue")

payload := environments.UpdateResource{
	// ...
}


read, err := client.Update(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 ValidateEnvironmentID

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

ValidateEnvironmentID checks that 'input' can be parsed as a Environment ID

func ValidateUserID

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

ValidateUserID checks that 'input' can be parsed as a User ID

Types

type ArmTemplateParameterProperties

type ArmTemplateParameterProperties struct {
	Name  *string `json:"name,omitempty"`
	Value *string `json:"value,omitempty"`
}

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 DtlEnvironment

type DtlEnvironment struct {
	Id         *string               `json:"id,omitempty"`
	Location   *string               `json:"location,omitempty"`
	Name       *string               `json:"name,omitempty"`
	Properties EnvironmentProperties `json:"properties"`
	Tags       *map[string]string    `json:"tags,omitempty"`
	Type       *string               `json:"type,omitempty"`
}

type DtlEnvironmentOperationPredicate

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

func (DtlEnvironmentOperationPredicate) Matches

type EnvironmentDeploymentProperties

type EnvironmentDeploymentProperties struct {
	ArmTemplateId *string                           `json:"armTemplateId,omitempty"`
	Parameters    *[]ArmTemplateParameterProperties `json:"parameters,omitempty"`
}

type EnvironmentId

type EnvironmentId struct {
	SubscriptionId    string
	ResourceGroupName string
	LabName           string
	UserName          string
	EnvironmentName   string
}

EnvironmentId is a struct representing the Resource ID for a Environment

func NewEnvironmentID

func NewEnvironmentID(subscriptionId string, resourceGroupName string, labName string, userName string, environmentName string) EnvironmentId

NewEnvironmentID returns a new EnvironmentId struct

func ParseEnvironmentID

func ParseEnvironmentID(input string) (*EnvironmentId, error)

ParseEnvironmentID parses 'input' into a EnvironmentId

func ParseEnvironmentIDInsensitively

func ParseEnvironmentIDInsensitively(input string) (*EnvironmentId, error)

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

func (EnvironmentId) ID

func (id EnvironmentId) ID() string

ID returns the formatted Environment ID

func (EnvironmentId) Segments

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

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

func (EnvironmentId) String

func (id EnvironmentId) String() string

String returns a human-readable description of this Environment ID

type EnvironmentProperties

type EnvironmentProperties struct {
	ArmTemplateDisplayName *string                          `json:"armTemplateDisplayName,omitempty"`
	CreatedByUser          *string                          `json:"createdByUser,omitempty"`
	DeploymentProperties   *EnvironmentDeploymentProperties `json:"deploymentProperties,omitempty"`
	ProvisioningState      *string                          `json:"provisioningState,omitempty"`
	ResourceGroupId        *string                          `json:"resourceGroupId,omitempty"`
	UniqueIdentifier       *string                          `json:"uniqueIdentifier,omitempty"`
}

type EnvironmentsClient

type EnvironmentsClient struct {
	Client *resourcemanager.Client
}

func NewEnvironmentsClientWithBaseURI

func NewEnvironmentsClientWithBaseURI(sdkApi sdkEnv.Api) (*EnvironmentsClient, error)

func (EnvironmentsClient) CreateOrUpdate

CreateOrUpdate ...

func (EnvironmentsClient) CreateOrUpdateThenPoll

func (c EnvironmentsClient) CreateOrUpdateThenPoll(ctx context.Context, id EnvironmentId, input DtlEnvironment) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (EnvironmentsClient) Delete

Delete ...

func (EnvironmentsClient) DeleteThenPoll

func (c EnvironmentsClient) DeleteThenPoll(ctx context.Context, id EnvironmentId) error

DeleteThenPoll performs Delete then polls until it's completed

func (EnvironmentsClient) Get

Get ...

func (EnvironmentsClient) List

List ...

func (EnvironmentsClient) ListComplete

ListComplete retrieves all the results into a single object

func (EnvironmentsClient) ListCompleteMatchingPredicate

func (c EnvironmentsClient) ListCompleteMatchingPredicate(ctx context.Context, id UserId, options ListOperationOptions, predicate DtlEnvironmentOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (EnvironmentsClient) Update

Update ...

type GetOperationOptions

type GetOperationOptions struct {
	Expand *string
}

func DefaultGetOperationOptions

func DefaultGetOperationOptions() GetOperationOptions

func (GetOperationOptions) ToHeaders added in v0.20230815.1165905

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

func (GetOperationOptions) ToOData added in v0.20230815.1165905

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

func (GetOperationOptions) ToQuery added in v0.20230815.1165905

func (o GetOperationOptions) ToQuery() *client.QueryParams

type GetOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	Items []DtlEnvironment
}

type ListOperationOptions

type ListOperationOptions struct {
	Expand  *string
	Filter  *string
	Orderby *string
	Top     *int64
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders added in v0.20230815.1165905

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

func (ListOperationOptions) ToOData added in v0.20230815.1165905

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

func (ListOperationOptions) ToQuery added in v0.20230815.1165905

type ListOperationResponse

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

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DtlEnvironment
}

type UpdateResource

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

type UserId

type UserId struct {
	SubscriptionId    string
	ResourceGroupName string
	LabName           string
	UserName          string
}

UserId is a struct representing the Resource ID for a User

func NewUserID

func NewUserID(subscriptionId string, resourceGroupName string, labName string, userName string) UserId

NewUserID returns a new UserId struct

func ParseUserID

func ParseUserID(input string) (*UserId, error)

ParseUserID parses 'input' into a UserId

func ParseUserIDInsensitively

func ParseUserIDInsensitively(input string) (*UserId, error)

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

func (UserId) ID

func (id UserId) ID() string

ID returns the formatted User ID

func (UserId) Segments

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

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

func (UserId) String

func (id UserId) String() string

String returns a human-readable description of this User ID

Jump to

Keyboard shortcuts

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