environments

package
v0.20241212.1154051 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MPL-2.0 Imports: 12 Imported by: 1

README

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

The environments SDK allows for interaction with Azure Resource Manager 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/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", "serviceName", "workspaceName", "environmentName")

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


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

ctx := context.TODO()
id := environments.NewEnvironmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "workspaceName", "environmentName")

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

ctx := context.TODO()
id := environments.NewEnvironmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "workspaceName", "environmentName")

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

ctx := context.TODO()
id := environments.NewEnvironmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "workspaceName", "environmentName")

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: EnvironmentsClient.List

ctx := context.TODO()
id := environments.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceName", "workspaceName")

// 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
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForEnvironmentKind

func PossibleValuesForEnvironmentKind() []string

func PossibleValuesForEnvironmentServerType

func PossibleValuesForEnvironmentServerType() []string

func ValidateEnvironmentID

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

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

func ValidateWorkspaceID

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

ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID

Types

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type Environment

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

type EnvironmentId

type EnvironmentId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	WorkspaceName     string
	EnvironmentName   string
}

EnvironmentId is a struct representing the Resource ID for a Environment

func NewEnvironmentID

func NewEnvironmentID(subscriptionId string, resourceGroupName string, serviceName string, workspaceName 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) FromParseResult

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

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 EnvironmentKind

type EnvironmentKind string
const (
	EnvironmentKindDevelopment EnvironmentKind = "development"
	EnvironmentKindProduction  EnvironmentKind = "production"
	EnvironmentKindStaging     EnvironmentKind = "staging"
	EnvironmentKindTesting     EnvironmentKind = "testing"
)

func (*EnvironmentKind) UnmarshalJSON

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

type EnvironmentOperationPredicate

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

func (EnvironmentOperationPredicate) Matches

type EnvironmentProperties

type EnvironmentProperties struct {
	CustomProperties *interface{}       `json:"customProperties,omitempty"`
	Description      *string            `json:"description,omitempty"`
	Kind             EnvironmentKind    `json:"kind"`
	Onboarding       *Onboarding        `json:"onboarding,omitempty"`
	Server           *EnvironmentServer `json:"server,omitempty"`
	Title            string             `json:"title"`
}

type EnvironmentServer

type EnvironmentServer struct {
	ManagementPortalUri *[]string              `json:"managementPortalUri,omitempty"`
	Type                *EnvironmentServerType `json:"type,omitempty"`
}

type EnvironmentServerType

type EnvironmentServerType string
const (
	EnvironmentServerTypeAWSAPIGateway         EnvironmentServerType = "AWS API Gateway"
	EnvironmentServerTypeApigeeAPIManagement   EnvironmentServerType = "Apigee API Management"
	EnvironmentServerTypeAzureAPIManagement    EnvironmentServerType = "Azure API Management"
	EnvironmentServerTypeAzureComputeService   EnvironmentServerType = "Azure compute service"
	EnvironmentServerTypeKongAPIGateway        EnvironmentServerType = "Kong API Gateway"
	EnvironmentServerTypeKubernetes            EnvironmentServerType = "Kubernetes"
	EnvironmentServerTypeMuleSoftAPIManagement EnvironmentServerType = "MuleSoft API Management"
)

func (*EnvironmentServerType) UnmarshalJSON

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

type EnvironmentsClient

type EnvironmentsClient struct {
	Client *resourcemanager.Client
}

func NewEnvironmentsClientWithBaseURI

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

func (EnvironmentsClient) CreateOrUpdate

func (c EnvironmentsClient) CreateOrUpdate(ctx context.Context, id EnvironmentId, input Environment) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (EnvironmentsClient) Delete

Delete ...

func (EnvironmentsClient) Get

Get ...

func (EnvironmentsClient) Head

Head ...

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 WorkspaceId, options ListOperationOptions, predicate EnvironmentOperationPredicate) (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        *Environment
}

type HeadOperationResponse

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

type ListCompleteResult

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

type ListCustomPager added in v0.20240628.1153531

type ListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListCustomPager) NextPageLink() *odata.Link

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        *[]Environment
}

type Onboarding

type Onboarding struct {
	DeveloperPortalUri *[]string `json:"developerPortalUri,omitempty"`
	Instructions       *string   `json:"instructions,omitempty"`
}

type WorkspaceId

type WorkspaceId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	WorkspaceName     string
}

WorkspaceId is a struct representing the Resource ID for a Workspace

func NewWorkspaceID

func NewWorkspaceID(subscriptionId string, resourceGroupName string, serviceName string, workspaceName string) WorkspaceId

NewWorkspaceID returns a new WorkspaceId struct

func ParseWorkspaceID

func ParseWorkspaceID(input string) (*WorkspaceId, error)

ParseWorkspaceID parses 'input' into a WorkspaceId

func ParseWorkspaceIDInsensitively

func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error)

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

func (*WorkspaceId) FromParseResult

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

func (WorkspaceId) ID

func (id WorkspaceId) ID() string

ID returns the formatted Workspace ID

func (WorkspaceId) Segments

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

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

func (WorkspaceId) String

func (id WorkspaceId) String() string

String returns a human-readable description of this Workspace ID

Jump to

Keyboard shortcuts

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