Documentation ¶
Overview ¶
Aliyun SDK Copyright (C) Alibaba Cloud Computing All rights reserved. http://www.aliyun.com
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Asset_IsConstruct ¶
func Asset_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct.
func NewAsset_Override ¶
func NewAsset_Override(a Asset, scope alicloudroscdkcore.Construct, id *string, props *AssetProps)
Types ¶
type Asset ¶
type Asset interface { alicloudroscdkcore.Resource // A cryptographic hash of the asset. AssetHash() *string // The path to the asset, relative to the current Cloud Assembly. // // If asset staging is disabled, this will just be the original path. // If asset staging is enabled it will be the staged path. AssetPath() *string // Attribute that represents the name of the OSS bucket this asset exists in. BucketName() *string // Attribute which represents the OSS HTTP URL of this asset. // // For example, `https://${bucketName}.oss-${region}.aliyuncs.com/${objectKey}` HttpUrl() *string // Indicates if this asset is a single file. // // Allows constructs to ensure that the // correct file type was used. IsFile() *bool // Indicates if this asset is a zip archive. // // Allows constructs to ensure that the // correct file type was used. IsZipArchive() *bool // The construct tree node associated with this construct. Node() alicloudroscdkcore.ConstructNode // Attribute which represents the OSS object key of this asset. ObjectKey() *string // Returns a string-encoded token that resolves to the physical name that should be passed to the ROS resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by ROS // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. // Experimental. PhysicalName() *string Ref() *string Resource() alicloudroscdkcore.RosResource SetResource(val alicloudroscdkcore.RosResource) // The stack in which this resource is defined. Stack() alicloudroscdkcore.Stack AddCondition(condition alicloudroscdkcore.RosCondition) AddCount(count interface{}) AddDependency(resource alicloudroscdkcore.Resource) AddResourceDesc(desc *string) // Adds ROS template metadata to the specified resource with information that indicates which resource property is mapped to this local asset. // // Asset metadata will only be included if the stack is synthesized with the // "ros:cdk:enable-asset-metadata" context key defined, which is the default // behavior when synthesizing via the CDK Toolkit. AddResourceMetadata(resource alicloudroscdkcore.RosResource, resourceProperty *string) ApplyRemovalPolicy(policy alicloudroscdkcore.RemovalPolicy) GeneratePhysicalName() *string GetAtt(name *string) alicloudroscdkcore.IResolvable // Perform final modifications before synthesis. // // This method can be implemented by derived constructs in order to perform // final changes before synthesis. prepare() will be called after child // constructs have been prepared. // // This is an advanced framework feature. Only use this if you // understand the implications. OnPrepare() // Allows this construct to emit artifacts into the cloud assembly during synthesis. // // This method is usually implemented by framework-level constructs such as `Stack` and `Asset` // as they participate in synthesizing the cloud assembly. OnSynthesize(session constructs.ISynthesisSession) // Validate the current construct. // // This method can be implemented by derived constructs in order to perform // validation logic. It is called on all constructs before synthesis. // // Returns: An array of validation error messages, or an empty array if the construct is valid. OnValidate() *[]*string // Perform final modifications before synthesis. // // This method can be implemented by derived constructs in order to perform // final changes before synthesis. prepare() will be called after child // constructs have been prepared. // // This is an advanced framework feature. Only use this if you // understand the implications. Prepare() SetMetadata(key *string, value interface{}) // Allows this construct to emit artifacts into the cloud assembly during synthesis. // // This method is usually implemented by framework-level constructs such as `Stack` and `Asset` // as they participate in synthesizing the cloud assembly. Synthesize(session alicloudroscdkcore.ISynthesisSession) // Returns a string representation of this construct. ToString() *string // Validate the current construct. // // This method can be implemented by derived constructs in order to perform // validation logic. It is called on all constructs before synthesis. // // Returns: An array of validation error messages, or an empty array if the construct is valid. Validate() *[]*string }
An asset represents a local file or directory, which is automatically uploaded to OSS bucket and then can be referenced within a CDK application.
func NewAsset ¶
func NewAsset(scope alicloudroscdkcore.Construct, id *string, props *AssetProps) Asset
type AssetOptions ¶
type AssetOptions struct { // File paths matching the patterns will be excluded. // // See `ignoreMode` to set the matching behavior. // Has no effect on Assets bundled using the `bundling` property. Exclude *[]*string `field:"optional" json:"exclude" yaml:"exclude"` // A strategy for how to handle symlinks. FollowSymlinks alicloudroscdkcore.SymlinkFollowMode `field:"optional" json:"followSymlinks" yaml:"followSymlinks"` // The ignore behavior to use for `exclude` patterns. IgnoreMode alicloudroscdkcore.IgnoreMode `field:"optional" json:"ignoreMode" yaml:"ignoreMode"` // Specify a custom hash for this asset. // // If `assetHashType` is set it must // be set to `AssetHashType.CUSTOM`. For consistency, this custom hash will // be SHA256 hashed and encoded as hex. The resulting hash will be the asset // hash. // // NOTE: the hash is used in order to identify a specific revision of the asset, and // used for optimizing and caching deployment activities related to this asset such as // packaging, uploading to OSS bucket, etc. If you chose to customize the hash, you will // need to make sure it is updated every time the asset changes, or otherwise it is // possible that some deployments will not be invalidated. AssetHash *string `field:"optional" json:"assetHash" yaml:"assetHash"` // Specifies the type of hash to calculate for this asset. // // If `assetHash` is configured, this option must be `undefined` or // `AssetHashType.CUSTOM`. AssetHashType alicloudroscdkcore.AssetHashType `field:"optional" json:"assetHashType" yaml:"assetHashType"` // Bundle the asset by executing a command in a Docker container or a custom bundling provider. // // The asset path will be mounted at `/asset-input`. The Docker // container is responsible for putting content at `/asset-output`. // The content at `/asset-output` will be zipped and used as the // final asset. Bundling *alicloudroscdkcore.BundlingOptions `field:"optional" json:"bundling" yaml:"bundling"` // Whether or not the asset needs to exist beyond deployment time; // // i.e. // are copied over to a different location and not needed afterwards. // Setting this property to true has an impact on the lifecycle of the asset, // because we will assume that it is safe to delete after the ROS // deployment succeeds. // // For example, FC Function assets are copied over to Function during // deployment. Therefore, it is not necessary to store the asset in OSS bucket, // so we consider those deployTime assets. DeployTime *bool `field:"optional" json:"deployTime" yaml:"deployTime"` }
type AssetProps ¶
type AssetProps struct { // File paths matching the patterns will be excluded. // // See `ignoreMode` to set the matching behavior. // Has no effect on Assets bundled using the `bundling` property. Exclude *[]*string `field:"optional" json:"exclude" yaml:"exclude"` // A strategy for how to handle symlinks. FollowSymlinks alicloudroscdkcore.SymlinkFollowMode `field:"optional" json:"followSymlinks" yaml:"followSymlinks"` // The ignore behavior to use for `exclude` patterns. IgnoreMode alicloudroscdkcore.IgnoreMode `field:"optional" json:"ignoreMode" yaml:"ignoreMode"` // Specify a custom hash for this asset. // // If `assetHashType` is set it must // be set to `AssetHashType.CUSTOM`. For consistency, this custom hash will // be SHA256 hashed and encoded as hex. The resulting hash will be the asset // hash. // // NOTE: the hash is used in order to identify a specific revision of the asset, and // used for optimizing and caching deployment activities related to this asset such as // packaging, uploading to OSS bucket, etc. If you chose to customize the hash, you will // need to make sure it is updated every time the asset changes, or otherwise it is // possible that some deployments will not be invalidated. AssetHash *string `field:"optional" json:"assetHash" yaml:"assetHash"` // Specifies the type of hash to calculate for this asset. // // If `assetHash` is configured, this option must be `undefined` or // `AssetHashType.CUSTOM`. AssetHashType alicloudroscdkcore.AssetHashType `field:"optional" json:"assetHashType" yaml:"assetHashType"` // Bundle the asset by executing a command in a Docker container or a custom bundling provider. // // The asset path will be mounted at `/asset-input`. The Docker // container is responsible for putting content at `/asset-output`. // The content at `/asset-output` will be zipped and used as the // final asset. Bundling *alicloudroscdkcore.BundlingOptions `field:"optional" json:"bundling" yaml:"bundling"` // Whether or not the asset needs to exist beyond deployment time; // // i.e. // are copied over to a different location and not needed afterwards. // Setting this property to true has an impact on the lifecycle of the asset, // because we will assume that it is safe to delete after the ROS // deployment succeeds. // // For example, FC Function assets are copied over to Function during // deployment. Therefore, it is not necessary to store the asset in OSS bucket, // so we consider those deployTime assets. DeployTime *bool `field:"optional" json:"deployTime" yaml:"deployTime"` // The disk location of the asset. // // The path should refer to one of the following: // - A regular file or a .zip file, in which case the file will be uploaded as-is to OSS bucket. // - A directory, in which case it will be archived into a .zip file and uploaded to OSS bucket. Path *string `field:"required" json:"path" yaml:"path"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.