loadtests

package
v0.20240521.1173452 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: MPL-2.0 Imports: 15 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2022-12-01/loadtests Documentation

The loadtests SDK allows for interaction with the Azure Resource Manager Service loadtestservice (API Version 2022-12-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2022-12-01/loadtests"

Client Initialization

client := loadtests.NewLoadTestsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: LoadTestsClient.CreateOrUpdate

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

payload := loadtests.LoadTestResource{
	// ...
}


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

Example Usage: LoadTestsClient.Delete

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

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

Example Usage: LoadTestsClient.Get

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

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

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

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

Example Usage: LoadTestsClient.ListBySubscription

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

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

Example Usage: LoadTestsClient.ListOutboundNetworkDependenciesEndpoints

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

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

Example Usage: LoadTestsClient.Update

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

payload := loadtests.LoadTestResourceUpdate{
	// ...
}


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 PossibleValuesForResourceState

func PossibleValuesForResourceState() []string

func PossibleValuesForType

func PossibleValuesForType() []string

func ValidateLoadTestID

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

ValidateLoadTestID checks that 'input' can be parsed as a Load Test ID

Types

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type EncryptionProperties

type EncryptionProperties struct {
	Identity *EncryptionPropertiesIdentity `json:"identity,omitempty"`
	KeyUrl   *string                       `json:"keyUrl,omitempty"`
}

type EncryptionPropertiesIdentity

type EncryptionPropertiesIdentity struct {
	ResourceId *string `json:"resourceId,omitempty"`
	Type       *Type   `json:"type,omitempty"`
}

type EndpointDependency added in v0.20240403.1135041

type EndpointDependency struct {
	Description     *string           `json:"description,omitempty"`
	DomainName      string            `json:"domainName"`
	EndpointDetails *[]EndpointDetail `json:"endpointDetails,omitempty"`
}

type EndpointDetail added in v0.20240403.1135041

type EndpointDetail struct {
	Port *int64 `json:"port,omitempty"`
}

type GetOperationResponse

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

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []LoadTestResource
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]LoadTestResource
}

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []LoadTestResource
}

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]LoadTestResource
}

type ListOutboundNetworkDependenciesEndpointsCompleteResult added in v0.20240403.1135041

type ListOutboundNetworkDependenciesEndpointsCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []OutboundEnvironmentEndpoint
}

type ListOutboundNetworkDependenciesEndpointsOperationResponse added in v0.20240403.1135041

type ListOutboundNetworkDependenciesEndpointsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]OutboundEnvironmentEndpoint
}

type LoadTestId

type LoadTestId struct {
	SubscriptionId    string
	ResourceGroupName string
	LoadTestName      string
}

LoadTestId is a struct representing the Resource ID for a Load Test

func NewLoadTestID

func NewLoadTestID(subscriptionId string, resourceGroupName string, loadTestName string) LoadTestId

NewLoadTestID returns a new LoadTestId struct

func ParseLoadTestID

func ParseLoadTestID(input string) (*LoadTestId, error)

ParseLoadTestID parses 'input' into a LoadTestId

func ParseLoadTestIDInsensitively

func ParseLoadTestIDInsensitively(input string) (*LoadTestId, error)

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

func (*LoadTestId) FromParseResult

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

func (LoadTestId) ID

func (id LoadTestId) ID() string

ID returns the formatted Load Test ID

func (LoadTestId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Load Test ID

func (LoadTestId) String

func (id LoadTestId) String() string

String returns a human-readable description of this Load Test ID

type LoadTestProperties

type LoadTestProperties struct {
	DataPlaneURI      *string               `json:"dataPlaneURI,omitempty"`
	Description       *string               `json:"description,omitempty"`
	Encryption        *EncryptionProperties `json:"encryption,omitempty"`
	ProvisioningState *ResourceState        `json:"provisioningState,omitempty"`
}

type LoadTestResource

type LoadTestResource struct {
	Id         *string                                  `json:"id,omitempty"`
	Identity   *identity.LegacySystemAndUserAssignedMap `json:"identity,omitempty"`
	Location   string                                   `json:"location"`
	Name       *string                                  `json:"name,omitempty"`
	Properties *LoadTestProperties                      `json:"properties,omitempty"`
	SystemData *systemdata.SystemData                   `json:"systemData,omitempty"`
	Tags       *map[string]string                       `json:"tags,omitempty"`
	Type       *string                                  `json:"type,omitempty"`
}

type LoadTestResourceOperationPredicate

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

func (LoadTestResourceOperationPredicate) Matches

type LoadTestResourceUpdate added in v0.20240403.1135041

type LoadTestResourceUpdate struct {
	Identity   *identity.LegacySystemAndUserAssignedMap `json:"identity,omitempty"`
	Properties *LoadTestResourceUpdateProperties        `json:"properties,omitempty"`
	Tags       *map[string]string                       `json:"tags,omitempty"`
}

type LoadTestResourceUpdateProperties added in v0.20240403.1135041

type LoadTestResourceUpdateProperties struct {
	Description *string               `json:"description,omitempty"`
	Encryption  *EncryptionProperties `json:"encryption,omitempty"`
}

type LoadTestsClient

type LoadTestsClient struct {
	Client *resourcemanager.Client
}

func NewLoadTestsClientWithBaseURI

func NewLoadTestsClientWithBaseURI(sdkApi sdkEnv.Api) (*LoadTestsClient, error)

func (LoadTestsClient) CreateOrUpdate

func (c LoadTestsClient) CreateOrUpdate(ctx context.Context, id LoadTestId, input LoadTestResource) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (LoadTestsClient) CreateOrUpdateThenPoll

func (c LoadTestsClient) CreateOrUpdateThenPoll(ctx context.Context, id LoadTestId, input LoadTestResource) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (LoadTestsClient) Delete

func (c LoadTestsClient) Delete(ctx context.Context, id LoadTestId) (result DeleteOperationResponse, err error)

Delete ...

func (LoadTestsClient) DeleteThenPoll

func (c LoadTestsClient) DeleteThenPoll(ctx context.Context, id LoadTestId) error

DeleteThenPoll performs Delete then polls until it's completed

func (LoadTestsClient) Get

func (c LoadTestsClient) Get(ctx context.Context, id LoadTestId) (result GetOperationResponse, err error)

Get ...

func (LoadTestsClient) ListByResourceGroup

ListByResourceGroup ...

func (LoadTestsClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (LoadTestsClient) ListByResourceGroupCompleteMatchingPredicate

func (c LoadTestsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate LoadTestResourceOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (LoadTestsClient) ListBySubscription

ListBySubscription ...

func (LoadTestsClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (LoadTestsClient) ListBySubscriptionCompleteMatchingPredicate

func (c LoadTestsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate LoadTestResourceOperationPredicate) (result ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (LoadTestsClient) ListOutboundNetworkDependenciesEndpoints added in v0.20240403.1135041

func (c LoadTestsClient) ListOutboundNetworkDependenciesEndpoints(ctx context.Context, id LoadTestId) (result ListOutboundNetworkDependenciesEndpointsOperationResponse, err error)

ListOutboundNetworkDependenciesEndpoints ...

func (LoadTestsClient) ListOutboundNetworkDependenciesEndpointsComplete added in v0.20240403.1135041

func (c LoadTestsClient) ListOutboundNetworkDependenciesEndpointsComplete(ctx context.Context, id LoadTestId) (ListOutboundNetworkDependenciesEndpointsCompleteResult, error)

ListOutboundNetworkDependenciesEndpointsComplete retrieves all the results into a single object

func (LoadTestsClient) ListOutboundNetworkDependenciesEndpointsCompleteMatchingPredicate added in v0.20240403.1135041

func (c LoadTestsClient) ListOutboundNetworkDependenciesEndpointsCompleteMatchingPredicate(ctx context.Context, id LoadTestId, predicate OutboundEnvironmentEndpointOperationPredicate) (result ListOutboundNetworkDependenciesEndpointsCompleteResult, err error)

ListOutboundNetworkDependenciesEndpointsCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (LoadTestsClient) Update

Update ...

func (LoadTestsClient) UpdateThenPoll

func (c LoadTestsClient) UpdateThenPoll(ctx context.Context, id LoadTestId, input LoadTestResourceUpdate) error

UpdateThenPoll performs Update then polls until it's completed

type OutboundEnvironmentEndpoint added in v0.20240403.1135041

type OutboundEnvironmentEndpoint struct {
	Category  *string               `json:"category,omitempty"`
	Endpoints *[]EndpointDependency `json:"endpoints,omitempty"`
}

type OutboundEnvironmentEndpointOperationPredicate added in v0.20240403.1135041

type OutboundEnvironmentEndpointOperationPredicate struct {
	Category *string
}

func (OutboundEnvironmentEndpointOperationPredicate) Matches added in v0.20240403.1135041

type ResourceState

type ResourceState string
const (
	ResourceStateCanceled  ResourceState = "Canceled"
	ResourceStateDeleted   ResourceState = "Deleted"
	ResourceStateFailed    ResourceState = "Failed"
	ResourceStateSucceeded ResourceState = "Succeeded"
)

func (*ResourceState) UnmarshalJSON

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

type Type

type Type string
const (
	TypeSystemAssigned Type = "SystemAssigned"
	TypeUserAssigned   Type = "UserAssigned"
)

func (*Type) UnmarshalJSON

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

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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