clients

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ProviderTypeAzure is used to specify the provider configuration for Azure resources.
	ProviderTypeAzure = "AzureResourceManager"
	// ProviderTypeAWS is used to specify the provider configuration for AWS resources.
	ProviderTypeAWS = "AWS"
	// ProviderTypeDeployments is used to specify the provider configuration for Bicep modules.
	ProviderTypeDeployments = "Microsoft.Resources"
	// ProviderTypeRadius is used to specify the provider configuration for Radius resources.
	ProviderTypeRadius = "Radius"
)
View Source
const (
	// ModuleName is used for telemetry if needed.
	ModuleName = "radius"

	// ModuleVersion is used for telemetry if needed.
	ModuleVersion = "public-preview"
)

Variables

View Source
var (
	// DeploymentsClientAPIVersion is the API version of the UCP deployment client.
	DeploymentsClientAPIVersion = "2020-10-01"

	// DeploymentOperationsClientAPIVersion is the API version of the UCP deployment operations client.
	DeploymentOperationsClientAPIVersion = "2020-10-01"
)

Functions

func DeploymentEngineURL

func DeploymentEngineURL(baseURI string, resourceID string) string

DeploymentEngineURL takes a base URI and a resource ID and returns a URL string by combining the two.

Types

type AWS

type AWS struct {
	Type  string `json:"type,omitempty"`
	Value Value  `json:"value,omitempty"`
}

type Az

type Az struct {
	Type  string `json:"type,omitempty"`
	Value Value  `json:"value,omitempty"`
}

type ClientCreateOrUpdateResponse

type ClientCreateOrUpdateResponse struct {
	armresources.DeploymentExtended
}

ClientCreateOrUpdateResponse contains the response from method Client.CreateOrUpdate.

type Deployment

type Deployment struct {
	// Location - The location to store the deployment data.
	Location *string `json:"location,omitempty"`
	// Properties - The deployment properties.
	Properties *DeploymentProperties `json:"properties,omitempty"`
	// Tags - Deployment tags
	Tags map[string]*string `json:"tags"`
}

type DeploymentProperties

type DeploymentProperties struct {
	// Template - The template content. You use this element when you want to pass the template syntax directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON string. Use either the templateLink property or the template property, but not both.
	Template any `json:"template,omitempty"`
	// TemplateLink - The URI of the template. Use either the templateLink property or the template property, but not both.
	TemplateLink *armresources.TemplateLink `json:"templateLink,omitempty"`
	//ProviderConfig specifies the scope for resources
	ProviderConfig any `json:"providerconfig,omitempty"`
	// Parameters - Name and value pairs that define the deployment parameters for the template. You use this element when you want to provide the parameter values directly in the request rather than link to an existing parameter file. Use either the parametersLink property or the parameters property, but not both. It can be a JObject or a well formed JSON string.
	Parameters any `json:"parameters,omitempty"`
	// ParametersLink - The URI of parameters file. You use this element to link to an existing parameters file. Use either the parametersLink property or the parameters property, but not both.
	ParametersLink *armresources.ParametersLink `json:"parametersLink,omitempty"`
	// Mode - The mode that is used to deploy resources. This value can be either Incremental or Complete. In Incremental mode, resources are deployed without deleting existing resources that are not included in the template. In Complete mode, resources are deployed and existing resources in the resource group that are not included in the template are deleted. Be careful when using Complete mode as you may unintentionally delete resources. Possible values include: 'DeploymentModeIncremental', 'DeploymentModeComplete'
	Mode armresources.DeploymentMode `json:"mode,omitempty"`
	// DebugSetting - The debug setting of the deployment.
	DebugSetting *armresources.DebugSetting `json:"debugSetting,omitempty"`
	// OnErrorDeployment - The deployment on error behavior.
	OnErrorDeployment *armresources.OnErrorDeployment `json:"onErrorDeployment,omitempty"`
	// ExpressionEvaluationOptions - Specifies whether template expressions are evaluated within the scope of the parent template or nested template. Only applicable to nested templates. If not specified, default value is outer.
	ExpressionEvaluationOptions *armresources.ExpressionEvaluationOptions `json:"expressionEvaluationOptions,omitempty"`
}

DeploymentProperties deployment properties.

type Deployments

type Deployments struct {
	Type  string `json:"type,omitempty"`
	Value Value  `json:"value,omitempty"`
}

type Options

type Options struct {
	// Cred represents a credential for OAuth token.
	Cred azcore.TokenCredential

	// BaseURI represents the base URI for the client.
	BaseURI string

	// ARMClientOptions represents the client options for ARM clients.
	ARMClientOptions *arm.ClientOptions
}

Options represents the client option for azure sdk client including authentication.

type ProviderConfig

type ProviderConfig struct {
	Radius      *Radius      `json:"radius,omitempty"`
	Az          *Az          `json:"az,omitempty"`
	AWS         *AWS         `json:"aws,omitempty"`
	Deployments *Deployments `json:"deployments,omitempty"`
}

func NewDefaultProviderConfig

func NewDefaultProviderConfig(resourceGroup string) ProviderConfig

NewDefaultProviderConfig creates a ProviderConfig instance with two fields, Deployments and Radius, and sets their values based on the resourceGroup parameter. The default config will include configuration for Radius resources, Kubernetes resources, and Bicep modules. AWS and Azure resources must be added separately.

type Radius

type Radius struct {
	Type  string `json:"type,omitempty"`
	Value Value  `json:"value,omitempty"`
}

type ResourceDeploymentOperationsClient

type ResourceDeploymentOperationsClient struct {
	// contains filtered or unexported fields
}

ResourceDeploymentOperationsClient is an operations client which takes in a resourceID as the destination to query. It is used by both Azure and UCP clients.

func NewResourceDeploymentOperationsClient

func NewResourceDeploymentOperationsClient(options *Options) (*ResourceDeploymentOperationsClient, error)

NewResourceDeploymentOperationsClient creates a new ResourceDeploymentOperationsClient with the provided options and returns it, or returns an error if the client creation fails.

func (*ResourceDeploymentOperationsClient) List

func (client *ResourceDeploymentOperationsClient) List(ctx context.Context, resourceGroupName string, deploymentName string, resourceID string, apiVersion string, top *int32) (*armresources.DeploymentOperationsListResult, error)

List retrieves a list of deployment operations for a given resource ID and API version. It returns an error if the list retrieval fails. Parameters: resourceId - the resourceId to deploy to. NOTE, must start with a '/'. Ex: "/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations top - the number of results to return.

func (*ResourceDeploymentOperationsClient) NewListPager

NewListPager creates a pager to iterate over the list of deployment operations for a given resource.

type ResourceDeploymentsClient

type ResourceDeploymentsClient struct {
	// contains filtered or unexported fields
}

ResourceDeploymentsClient is a deployments client for Azure Resource Manager. It is used by both Azure and UCP clients.

func NewResourceDeploymentsClient

func NewResourceDeploymentsClient(options *Options) (*ResourceDeploymentsClient, error)

NewResourceDeploymentsClient creates a new ResourceDeploymentsClient with the provided options and returns an error if the options are invalid.

func (*ResourceDeploymentsClient) CreateOrUpdate

func (client *ResourceDeploymentsClient) CreateOrUpdate(ctx context.Context, parameters Deployment, resourceID, apiVersion string) (*runtime.Poller[ClientCreateOrUpdateResponse], error)

CreateOrUpdate creates a request to create or update a deployment and returns a poller to track the progress of the operation.

type Value

type Value struct {
	Scope string `json:"scope,omitempty"`
}

Jump to

Keyboard shortcuts

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