README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/apicenter/2024-03-01/environments
Documentation
The environments
SDK allows for interaction with Azure Resource Manager apicenter
(API Version 2024-03-01
).
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-01/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 ¶
- func PossibleValuesForEnvironmentKind() []string
- func PossibleValuesForEnvironmentServerType() []string
- func ValidateEnvironmentID(input interface{}, key string) (warnings []string, errors []error)
- func ValidateWorkspaceID(input interface{}, key string) (warnings []string, errors []error)
- type CreateOrUpdateOperationResponse
- type DeleteOperationResponse
- type Environment
- type EnvironmentId
- type EnvironmentKind
- type EnvironmentOperationPredicate
- type EnvironmentProperties
- type EnvironmentServer
- type EnvironmentServerType
- type EnvironmentsClient
- func (c EnvironmentsClient) CreateOrUpdate(ctx context.Context, id EnvironmentId, input Environment) (result CreateOrUpdateOperationResponse, err error)
- func (c EnvironmentsClient) Delete(ctx context.Context, id EnvironmentId) (result DeleteOperationResponse, err error)
- func (c EnvironmentsClient) Get(ctx context.Context, id EnvironmentId) (result GetOperationResponse, err error)
- func (c EnvironmentsClient) Head(ctx context.Context, id EnvironmentId) (result HeadOperationResponse, err error)
- func (c EnvironmentsClient) List(ctx context.Context, id WorkspaceId, options ListOperationOptions) (result ListOperationResponse, err error)
- func (c EnvironmentsClient) ListComplete(ctx context.Context, id WorkspaceId, options ListOperationOptions) (ListCompleteResult, error)
- func (c EnvironmentsClient) ListCompleteMatchingPredicate(ctx context.Context, id WorkspaceId, options ListOperationOptions, ...) (result ListCompleteResult, err error)
- type GetOperationResponse
- type HeadOperationResponse
- type ListCompleteResult
- type ListCustomPager
- type ListOperationOptions
- type ListOperationResponse
- type Onboarding
- type WorkspaceId
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PossibleValuesForEnvironmentKind ¶
func PossibleValuesForEnvironmentKind() []string
func PossibleValuesForEnvironmentServerType ¶
func PossibleValuesForEnvironmentServerType() []string
func ValidateEnvironmentID ¶
ValidateEnvironmentID checks that 'input' can be parsed as a Environment ID
func ValidateWorkspaceID ¶
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 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 ¶
func (EnvironmentOperationPredicate) Matches ¶
func (p EnvironmentOperationPredicate) Matches(input Environment) bool
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 ¶
func (c EnvironmentsClient) Delete(ctx context.Context, id EnvironmentId) (result DeleteOperationResponse, err error)
Delete ...
func (EnvironmentsClient) Get ¶
func (c EnvironmentsClient) Get(ctx context.Context, id EnvironmentId) (result GetOperationResponse, err error)
Get ...
func (EnvironmentsClient) Head ¶
func (c EnvironmentsClient) Head(ctx context.Context, id EnvironmentId) (result HeadOperationResponse, err error)
Head ...
func (EnvironmentsClient) List ¶
func (c EnvironmentsClient) List(ctx context.Context, id WorkspaceId, options ListOperationOptions) (result ListOperationResponse, err error)
List ...
func (EnvironmentsClient) ListComplete ¶
func (c EnvironmentsClient) ListComplete(ctx context.Context, id WorkspaceId, options ListOperationOptions) (ListCompleteResult, error)
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 ListCompleteResult ¶
type ListCompleteResult struct { LatestHttpResponse *http.Response Items []Environment }
type ListCustomPager ¶ added in v0.20240628.1153531
func (*ListCustomPager) NextPageLink ¶ added in v0.20240628.1153531
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 ¶
func (o ListOperationOptions) ToQuery() *client.QueryParams
type ListOperationResponse ¶
type ListOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *[]Environment }
type Onboarding ¶
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) 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