Documentation ¶
Index ¶
- Constants
- Variables
- func DeploymentEngineURL(baseURI string, resourceID string) string
- type AWS
- type Az
- type ClientCreateOrUpdateResponse
- type Deployment
- type DeploymentProperties
- type Deployments
- type Options
- type ProviderConfig
- type Radius
- type ResourceDeploymentOperationsClient
- func (client *ResourceDeploymentOperationsClient) List(ctx context.Context, resourceGroupName string, deploymentName string, ...) (*armresources.DeploymentOperationsListResult, error)
- func (client *ResourceDeploymentOperationsClient) NewListPager(resourceID string, apiVersion string, ...) *runtime.Pager[armresources.DeploymentOperationsClientListResponse]
- type ResourceDeploymentsClient
- type Value
Constants ¶
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" )
const ( // ModuleName is used for telemetry if needed. ModuleName = "radius" // ModuleVersion is used for telemetry if needed. ModuleVersion = "public-preview" )
Variables ¶
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 ¶
DeploymentEngineURL takes a base URI and a resource ID and returns a URL string by combining the two.
Types ¶
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 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 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 ¶
func (client *ResourceDeploymentOperationsClient) NewListPager(resourceID string, apiVersion string, options *armresources.DeploymentOperationsClientListOptions) *runtime.Pager[armresources.DeploymentOperationsClientListResponse]
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.