Documentation ¶
Index ¶
- Constants
- func ResourceProviderIDFromResourceID(id resources.ID) (resources.ID, error)
- func ResourceProviderLocationIDFromResourceID(id resources.ID, location string) (resources.ID, error)
- func ResourceProviderSummaryIDFromParts(scope string, name string) (resources.ID, error)
- func ResourceTypeIDFromResourceID(id resources.ID) (resources.ID, error)
- type APIVersion
- type APIVersionProperties
- type AWSAccessKeyCredentialProperties
- type AWSCredential
- type AWSCredentialProperties
- type AWSCredentialResourceProperties
- type AWSIRSACredentialProperties
- type AWSPlane
- type AWSPlaneProperties
- type AWSResource
- func (a *AWSResource) GetBaseResource() *v1.BaseResource
- func (a *AWSResource) GetSystemData() *v1.SystemData
- func (a *AWSResource) ProvisioningState() v1.ProvisioningState
- func (a *AWSResource) ResourceTypeName() string
- func (a *AWSResource) SetProvisioningState(state v1.ProvisioningState)
- func (a *AWSResource) UpdateMetadata(ctx *v1.ARMRequestContext, oldResource *v1.BaseResource)
- type AzureCredential
- type AzureCredentialProperties
- type AzureCredentialResourceProperties
- type AzurePlane
- type AzurePlaneProperties
- type AzureServicePrincipalCredentialProperties
- type AzureWorkloadIdentityCredentialProperties
- type CredentialStorageProperties
- type GenericPlane
- type GenericResource
- type GenericResourceProperties
- type InternalCredentialStorageProperties
- type Location
- type LocationAPIVersionConfiguration
- type LocationProperties
- type LocationResourceTypeConfiguration
- type RadiusPlane
- type RadiusPlaneProperties
- type ResourceGroup
- type ResourceProvider
- type ResourceProviderProperties
- type ResourceProviderSummary
- type ResourceProviderSummaryProperties
- type ResourceProviderSummaryPropertiesAPIVersion
- type ResourceProviderSummaryPropertiesLocation
- type ResourceProviderSummaryPropertiesResourceType
- type ResourceType
- type ResourceTypeProperties
Constants ¶
const ( // InternalStorageKind represents ucp credential storage type for internal credential type InternalStorageKind = "Internal" // AzureServicePrincipalCredentialKind represents ucp credential kind for Azure service principal credentials. AzureServicePrincipalCredentialKind = "ServicePrincipal" // AzureWorkloadIdentityCredentialKind represents ucp credential kind for Azure workload identity credentials. AzureWorkloadIdentityCredentialKind = "WorkloadIdentity" // AWSAccessKeyCredentialKind represents ucp credential kind for aws access key credentials. AWSAccessKeyCredentialKind = "AccessKey" // AWSIRSACredentialKind represents ucp credential kind for aws irsa credentials. AWSIRSACredentialKind = "IRSA" )
const ( // OperationProcess is the operation type for processing a tracked resource. OperationProcess = "PROCESS" // GenericResourceType is the resource type for a generic resource. GenericResourceType = "System.Resources/resources" )
const ( // LocationResourceType is the resource type for a resource provider location LocationResourceType = "System.Resources/resourceProviders/locations" // LocationUnqualifiedResourceType is the unqualified resource type for a resource provider location. LocationUnqualifiedResourceType = "locations" )
const ( // ResourceTypesResourceType is the resource type for a resource type. ResourceTypeResourceType = "System.Resources/resourceProviders/resourceTypes" // ResourceTypeResourceUnqualifiedResourceType is the unqualified resource type for a resource type. ResourceTypeResourceUnqualifiedResourceType = "resourceTypes" )
const (
// APIVersionResourceType is the resource type for an API version.
APIVersionResourceType = "System.Resources/resourceProviders/resourceTypes/apiVersions"
)
const (
// AWSPlaneResourceType is the type of the AWS plane.
AWSPlaneResourceType = "System.AWS/planes"
)
const (
// AzurePlaneResourceType is the type of the Azure plane.
AzurePlaneResourceType = "System.Azure/planes"
)
const (
// RadiusPlaneResourceType is the type of the Radius plane.
RadiusPlaneResourceType = "System.Radius/planes"
)
const (
// ResourceGroupResourceType is the type of a resource group.
ResourceGroupResourceType = "System.Resources/resourceGroups"
)
const (
// ResourceProviderResourceType is the resource type for a resource provider.
ResourceProviderResourceType = "System.Resources/resourceProviders"
)
const ( // ResourceProviderResourceSummaryType is the resource type for the summary of a resource provider. // // These are **READONLY** virtual resources served from URLs like: // // /planes/radius/local/providers/ // /planes/radius/local/providers/Applications.Test ResourceProviderSummaryResourceType = "System.Resources/resourceProviderSummaries" )
Variables ¶
This section is empty.
Functions ¶
func ResourceProviderIDFromResourceID ¶ added in v0.41.0
ResourceProviderIDFromResourceID converts an inbound resource id to the resource ID of the resource provider.
func ResourceProviderLocationIDFromResourceID ¶ added in v0.41.0
func ResourceProviderLocationIDFromResourceID(id resources.ID, location string) (resources.ID, error)
ResourceProviderLocationIDFromResourceID converts an inbound resource id to the resource ID of the resource provider's location.
func ResourceProviderSummaryIDFromParts ¶ added in v0.39.0
ResourceProviderSummaryIDFromParts returns the resource id for a resource provider summary.
Since ResourceProviderSummary is a virtual resource, the resource id is different from the URL used to access it.
Types ¶
type APIVersion ¶ added in v0.39.0
type APIVersion struct { v1.BaseResource // Properties stores the properties of the API version. Properties APIVersionProperties `json:"properties"` }
APIVersion represents an API version of a resource type.
func (*APIVersion) ResourceTypeName ¶ added in v0.39.0
func (r *APIVersion) ResourceTypeName() string
ResourceTypeName gives the type of the resource.
type APIVersionProperties ¶ added in v0.39.0
type APIVersionProperties struct { }
APIVersion stores the properties of an API version.
type AWSAccessKeyCredentialProperties ¶ added in v0.36.0
type AWSAccessKeyCredentialProperties struct { // AccessKeyID contains aws access key for iam. AccessKeyID string `json:"accessKeyId"` // SecretAccessKey contains secret access key for iam. SecretAccessKey string `json:"secretAccessKey,omitempty"` }
AWSAccessKeyCredentialProperties contains ucp AWS access key credential properties.
type AWSCredential ¶
type AWSCredential struct { v1.BaseResource Properties *AWSCredentialResourceProperties `json:"properties,omitempty"` }
Credential represents UCP Credential.
func (*AWSCredential) ResourceTypeName ¶
func (c *AWSCredential) ResourceTypeName() string
ResourceTypeName gives the type of ucp resource.
type AWSCredentialProperties ¶
type AWSCredentialProperties struct { // Kind is the kind of AWS credential. Kind string `json:"kind,omitempty"` // AccessKeyCredential represents the access key credential properties. AccessKeyCredential *AWSAccessKeyCredentialProperties `json:"accesskey,omitempty"` // IRSACredential represents the irsa credential properties. IRSACredential *AWSIRSACredentialProperties `json:"irsa,omitempty"` }
AWSCredentialProperties contains ucp AWS credential properties.
type AWSCredentialResourceProperties ¶
type AWSCredentialResourceProperties struct { // Kind is the kind of aws credential resource. Kind string `json:"kind,omitempty"` // AWSCredential is the aws iam credentials. AWSCredential *AWSCredentialProperties `json:"awsCredential,omitempty"` // Storage contains the properties of the storage associated with the kind. Storage *CredentialStorageProperties `json:"storage,omitempty"` }
AWS Credential Properties represents UCP Credential Properties.
type AWSIRSACredentialProperties ¶ added in v0.36.0
type AWSIRSACredentialProperties struct { // RoleARN contains aws role arn for irsa. RoleARN string `json:"roleARN"` }
AWSIRSACredentialProperties contains ucp AWS IRSA credential properties.
type AWSPlane ¶ added in v0.34.0
type AWSPlane struct { v1.BaseResource // Properties is the properties of the resource. Properties AWSPlaneProperties `json:"properties"` }
AWSPlane is the representation of an AWS plane.
func (AWSPlane) ResourceTypeName ¶ added in v0.34.0
ResourceTypeName returns the type of the Plane as a string.
type AWSPlaneProperties ¶ added in v0.34.0
type AWSPlaneProperties struct { }
AwsPlaneProperties is the properties of an AWS plane.
type AWSResource ¶
type AWSResource struct { }
AWSResource represents any AWS Resource. AWSResource is not a tracked resource, so it does not implement ResourceDataModel. However need to implement the methods to satisfy the interface.
func (*AWSResource) GetBaseResource ¶
func (a *AWSResource) GetBaseResource() *v1.BaseResource
GetBaseResource is not implemented for AWS proxy resource.
func (*AWSResource) GetSystemData ¶
func (a *AWSResource) GetSystemData() *v1.SystemData
GetSystemData is not implemented for AWS proxy resource.
func (*AWSResource) ProvisioningState ¶
func (a *AWSResource) ProvisioningState() v1.ProvisioningState
ProvisioningState is not implemented for AWS proxy resource.
func (*AWSResource) ResourceTypeName ¶
func (a *AWSResource) ResourceTypeName() string
ResourceTypeName returns the resource type name.
func (*AWSResource) SetProvisioningState ¶
func (a *AWSResource) SetProvisioningState(state v1.ProvisioningState)
SetProvisioningState is not implemented for AWS proxy resource.
func (*AWSResource) UpdateMetadata ¶
func (a *AWSResource) UpdateMetadata(ctx *v1.ARMRequestContext, oldResource *v1.BaseResource)
UpdateMetadata is not implemented for AWS proxy resource.
type AzureCredential ¶
type AzureCredential struct { v1.BaseResource Properties *AzureCredentialResourceProperties `json:"properties,omitempty"` }
Credential represents UCP Credential.
func (*AzureCredential) ResourceTypeName ¶
func (c *AzureCredential) ResourceTypeName() string
ResourceTypeName gives the type of ucp resource.
type AzureCredentialProperties ¶
type AzureCredentialProperties struct { // Kind is the kind of Azure credential. Kind string `json:"kind,omitempty"` // ServicePrincipal represents the service principal properties. ServicePrincipal *AzureServicePrincipalCredentialProperties `json:"servicePrincipal,omitempty"` // WorkloadIdentity represents the workload identity properties. WorkloadIdentity *AzureWorkloadIdentityCredentialProperties `json:"workloadIdentity,omitempty"` }
type AzureCredentialResourceProperties ¶
type AzureCredentialResourceProperties struct { // Kind is the kind of Azure credential resource. Kind string `json:"kind,omitempty"` // AzureCredential is the Azure credentials. AzureCredential *AzureCredentialProperties `json:"azureCredential,omitempty"` // Storage contains the properties of the storage associated with the kind. Storage *CredentialStorageProperties `json:"storage,omitempty"` }
Azure Credential Properties represents UCP Credential Properties.
type AzurePlane ¶ added in v0.34.0
type AzurePlane struct { v1.BaseResource // Properties is the properties of the resource. Properties AzurePlaneProperties `json:"properties"` }
AzurePlane is the representation of an Azure plane.
func (AzurePlane) ResourceTypeName ¶ added in v0.34.0
func (p AzurePlane) ResourceTypeName() string
ResourceTypeName returns the type of the Plane as a string.
type AzurePlaneProperties ¶ added in v0.34.0
type AzurePlaneProperties struct {
URL string
}
AzurePlaneProperties is the properties of an Azure plane.
type AzureServicePrincipalCredentialProperties ¶ added in v0.35.0
type AzureServicePrincipalCredentialProperties struct { // TenantID represents the tenantId of azure service principal credential. TenantID string `json:"tenantId"` // ClientID represents the clientId of azure service principal credential. ClientID string `json:"clientId"` // ClientSecret represents the client secret of service principal credential. ClientSecret string `json:"clientSecret,omitempty"` }
AzureServicePrincipalCredentialProperties contains ucp Azure service principal credential properties.
type AzureWorkloadIdentityCredentialProperties ¶ added in v0.35.0
type AzureWorkloadIdentityCredentialProperties struct { // TenantID represents the tenantId of azure workload identity credential. TenantID string `json:"tenantId"` // ClientID represents the clientId of azure service principal credential. ClientID string `json:"clientId"` }
AzureWorkloadIdentityCredentialProperties contains ucp Azure workload identity credential properties.
type CredentialStorageProperties ¶
type CredentialStorageProperties struct { // Kind represents ucp credential storage kind. Kind string `json:"kind"` // InternalCredential represents ucp internal credential storage properties. InternalCredential *InternalCredentialStorageProperties `json:"internalCredential,omitempty"` }
CredentialStorageProperties contains ucp credential storage properties.
type GenericPlane ¶ added in v0.34.0
type GenericPlane struct { v1.BaseResource // Properties is the properties of the resource. Properties any `json:"properties"` }
GenericPlane is the representation used for serializing planes when queried generically.
func (GenericPlane) ResourceTypeName ¶ added in v0.34.0
func (p GenericPlane) ResourceTypeName() string
ResourceTypeName returns the type of the Plane as a string.
type GenericResource ¶
type GenericResource struct { v1.BaseResource // Properties stores the properties of the resource being tracked. Properties GenericResourceProperties `json:"properties"` }
GenericResource represents a stored "tracked resource" within a UCP resource group.
This type is used to store tracked resources within UCP regardless of the actual resource type. You can think of it as a "meta-resource". The top level fields like "ID", "Name", and "Type" reflect the GenericResource entry itself. The actual resource data is stored in the "Properties" field.
GenericResource are returned through the resource list APIs, but don't support PUT or DELETE operations directly. The resource ID, Name, and Type of the GenericResource are an implementation detail and are never exposed to users.
func GenericResourceFromID ¶ added in v0.29.0
func GenericResourceFromID(originalID resources.ID, trackingID resources.ID) *GenericResource
GenericResourceFromID creates a new GenericResource from the given original resource ID and tracking ID.
func (*GenericResource) ResourceTypeName ¶
func (r *GenericResource) ResourceTypeName() string
ResourceTypeName gives the type of ucp resource.
type GenericResourceProperties ¶
type GenericResourceProperties struct { // ID is the fully qualified resource ID for the resource. ID string `json:"id"` // Name is the resource name. Name string `json:"name"` // Type is the resource type. Type string `json:"type"` // APIVersion is the version of the API that can be used to query the resource. APIVersion string `json:"apiVersion"` // OperationID is the last operation that updated this entry. This is used when an operation // is enqueued as a way to force a different Etag to be returned. This data doesn't need to be // read or used, it's just acting as a "salt" for the Etag. OperationID string `json:"operationId"` }
GenericResourceProperties stores the properties of the resource being tracked.
Right now we only track the basic identifiers. This is enough for UCP to remebmer which resources exist, but not to act as a cache. We may want to add more fields in the future as we support additional scenarios.
type InternalCredentialStorageProperties ¶
type InternalCredentialStorageProperties struct { // SecretName is the name of secret stored in ucp for the crendentials. SecretName string `json:"secretName"` }
InternalCredentialStorageProperties contains ucp internal credential storage properties.
type Location ¶ added in v0.39.0
type Location struct { v1.BaseResource // Properties stores the properties of the location. Properties LocationProperties `json:"properties"` }
Location represents a location.
func (*Location) ResourceTypeName ¶ added in v0.39.0
ResourceTypeName gives the type of the resource.
type LocationAPIVersionConfiguration ¶ added in v0.39.0
type LocationAPIVersionConfiguration struct { }
LocationAPIVersionConfiguration represents the configuration for an API version in a location.
type LocationProperties ¶ added in v0.39.0
type LocationProperties struct { // Address is the address (url) of the resource provider. Address *string `json:"address,omitempty"` // ResourceTypes defines the configuration for resource types supported in this location. ResourceTypes map[string]LocationResourceTypeConfiguration `json:"resourceTypes,omitempty"` }
LocationProperties stores the properties of the location
type LocationResourceTypeConfiguration ¶ added in v0.39.0
type LocationResourceTypeConfiguration struct { // APIVersions defines the configuration for API versions supported for this resource type in this location. APIVersions map[string]LocationAPIVersionConfiguration `json:"apiVersions,omitempty"` }
LocationResourceTypeConfiguration represents the configuration for resource type in a location.
type RadiusPlane ¶ added in v0.34.0
type RadiusPlane struct { v1.BaseResource // Properties is the properties of the resource. Properties RadiusPlaneProperties `json:"properties"` }
RadiusPlane is the representation of a Radius plane.
func (RadiusPlane) LookupResourceProvider ¶ added in v0.34.0
func (plane RadiusPlane) LookupResourceProvider(key string) string
LookupResourceProvider checks if the input provider is in the list of configured providers.
func (RadiusPlane) ResourceTypeName ¶ added in v0.34.0
func (p RadiusPlane) ResourceTypeName() string
ResourceTypeName returns the type of the Plane as a string.
type RadiusPlaneProperties ¶ added in v0.34.0
type RadiusPlaneProperties struct { // ResourceProviders is a map of the support resource providers. ResourceProviders map[string]string `json:"resourceProviders"` }
RadiusPlaneProperties is the properties of a Radius plane.
type ResourceGroup ¶
type ResourceGroup struct {
v1.BaseResource
}
ResourceGroup represents UCP ResourceGroup.
func (ResourceGroup) ResourceTypeName ¶
func (p ResourceGroup) ResourceTypeName() string
ResourceTypeName returns a string representing the resource type name of the ResourceGroup object.
type ResourceProvider ¶ added in v0.39.0
type ResourceProvider struct { v1.BaseResource // Properties stores the properties of the resource provider. Properties ResourceProviderProperties `json:"properties"` }
ResourceProvider represents a resource provider (namespace + set of types).
func (*ResourceProvider) ResourceTypeName ¶ added in v0.39.0
func (r *ResourceProvider) ResourceTypeName() string
ResourceTypeName gives the type of the resource.
type ResourceProviderProperties ¶ added in v0.39.0
type ResourceProviderProperties struct { }
ResourceProviderProperties stores the properties of a resource provider.
type ResourceProviderSummary ¶ added in v0.39.0
type ResourceProviderSummary struct { v1.BaseResource // Properties stores the properties of the resource provider summary. Properties ResourceProviderSummaryProperties `json:"properties"` }
ResourceProviderSummary represents the common set of fields for a resource provider.
func (*ResourceProviderSummary) ResourceTypeName ¶ added in v0.39.0
func (r *ResourceProviderSummary) ResourceTypeName() string
ResourceTypeName gives the type of the resource.
type ResourceProviderSummaryProperties ¶ added in v0.39.0
type ResourceProviderSummaryProperties struct { // Locations is the list of locations where the resource provider is available. Locations map[string]ResourceProviderSummaryPropertiesLocation `json:"locations,omitempty"` // ResourceTypes is the list of resource types available in the resource provider. ResourceTypes map[string]ResourceProviderSummaryPropertiesResourceType `json:"resourceTypes,omitempty"` }
ResourceProviderSummaryProperties stores the properties of a resource provider summary.
type ResourceProviderSummaryPropertiesAPIVersion ¶ added in v0.39.0
type ResourceProviderSummaryPropertiesAPIVersion struct { }
ResourceProviderSummaryAPIVersion represents an API version available in a resource provider.
type ResourceProviderSummaryPropertiesLocation ¶ added in v0.39.0
type ResourceProviderSummaryPropertiesLocation struct { }
ResourceProviderSummaryLocation represents a location where a resource provider is available.
type ResourceProviderSummaryPropertiesResourceType ¶ added in v0.39.0
type ResourceProviderSummaryPropertiesResourceType struct { // DefaultAPIVersion is the default API version for the resource type. DefaultAPIVersion *string `json:"defaultApiVersion,omitempty"` // APIVersions is the list of API versions available for the resource type. APIVersions map[string]ResourceProviderSummaryPropertiesAPIVersion `json:"apiVersions,omitempty"` }
ResourceProviderSummaryResourceType represents a resource type available in a resource provider.
type ResourceType ¶ added in v0.29.0
type ResourceType struct { v1.BaseResource // Properties stores the properties of the resource type. Properties ResourceTypeProperties `json:"properties"` }
ResourceType represents a resource type.
func (*ResourceType) ResourceTypeName ¶ added in v0.39.0
func (r *ResourceType) ResourceTypeName() string
ResourceTypeName gives the type of the resource.
type ResourceTypeProperties ¶ added in v0.39.0
type ResourceTypeProperties struct { // DefaultAPIVersion is the default API version for this resource type. DefaultAPIVersion *string `json:"defaultApiVersion"` }
ResourceTypeProperties stores the properties of a resource type.