alicloudroscdkossdeployment

package module
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

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 BucketDeployment_IsConstruct

func BucketDeployment_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct.

func NewBucketDeployment_Override

func NewBucketDeployment_Override(b BucketDeployment, scope alicloudroscdkcore.Construct, id *string, props *BucketDeploymentProps, enableResourcePropertyConstraint *bool)

func NewSource_Override

func NewSource_Override(s Source)

Types

type BucketDeployment

type BucketDeployment interface {
	alicloudroscdkcore.Resource
	// Attribute cr: Custom resource to trigger the bucket deployment.
	Cr() alicloudroscdkros.RosCustomResource
	// Attribute fcFunction: FC function to use to forward content to the destination bucket.
	FcFunction() alicloudroscdkfc.Function
	// Attribute fcService: FC service to use to forward content to the destination bucket.
	FcService() alicloudroscdkfc.Service
	HandlerRoleArn() interface{}
	// The construct tree node associated with this construct.
	Node() alicloudroscdkcore.ConstructNode
	// 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)
	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
}

`BucketDeployment` populates an OSS bucket with the contents of .zip files from other OSS buckets or from local disk.

func NewBucketDeployment

func NewBucketDeployment(scope alicloudroscdkcore.Construct, id *string, props *BucketDeploymentProps, enableResourcePropertyConstraint *bool) BucketDeployment

type BucketDeploymentProps

type BucketDeploymentProps struct {
	// The OSS bucket to sync the contents of the zip file to.
	DestinationBucket interface{} `field:"required" json:"destinationBucket" yaml:"destinationBucket"`
	// The sources from which to deploy the contents of this bucket.
	Sources *[]ISource `field:"required" json:"sources" yaml:"sources"`
	// Whether log monitoring is enabled.
	//
	// Enabling log monitoring allows you to record the details of your deployment,
	// which makes it easier to troubleshoot when something goes wrong.
	//
	// Enabling logging monitoring incurs an additional logging service fee.
	LogMonitoring *bool `field:"optional" json:"logMonitoring" yaml:"logMonitoring"`
	// If this is set to false, the bucket temporarily storing the asset or data will be deleted after the asset or data is deployed to the destination bucket.
	//
	// Otherwise, the temporary bucket will be deleted when the stack is destroyed.
	RetainOnCreate *bool `field:"optional" json:"retainOnCreate" yaml:"retainOnCreate"`
	// The ARN of the execution role associated with this function.
	RoleArn interface{} `field:"optional" json:"roleArn" yaml:"roleArn"`
	// The timeout period in seconds for the function to run.
	Timeout *float64 `field:"optional" json:"timeout" yaml:"timeout"`
}

type ISource

type ISource interface {
	// Binds the source to a bucket deployment.
	Bind(scope alicloudroscdkcore.Construct) *SourceConfig
}

Represents a source for bucket deployments.

func Source_Asset

func Source_Asset(path *string, options *alicloudroscdkossassets.AssetOptions, objectPrefix *string) ISource

Uses a local file path as the source of the target bucket contents.

ROS CDK will create a temporary bucket and upload the files you want to upload to it. Make sure that the region id you specify in synth and deploy is the same region id as the destination upload bucket.

If the local asset is a .zip archive, make sure you trust the producer of the archive.

func Source_Bucket

func Source_Bucket(bucket interface{}, objectKey interface{}) ISource

Uses a file stored in an OSS bucket as the source for the destination bucket contents.

Make sure you trust the producer of the archive. The source bucket and the destination bucket must be in the same region.

func Source_Data

func Source_Data(objectKey *string, data *string) ISource

Deploys an object with the specified string contents into the bucket.

To store a JSON object use `Source.jsonData()`.

func Source_JsonData

func Source_JsonData(objectKey *string, obj interface{}) ISource

Deploys an object with the specified JSON object into the bucket.

type Source

type Source interface {
}

Specifies bucket deployment source.

Usage:

Source.bucket(bucketName, objectKey)
Source.asset('/local/path/to/directory')
Source.asset('/local/path/to/a/file.zip')
Source.data('hello/world/file.txt', 'Hello, world!')
Source.jsonData('config.json', { key: value })

func NewSource

func NewSource() Source

type SourceConfig

type SourceConfig struct {
	// The name of source bucket to deploy from.
	Bucket interface{} `field:"required" json:"bucket" yaml:"bucket"`
	// An object key in the source bucket to deploy from.
	ObjectKey interface{} `field:"required" json:"objectKey" yaml:"objectKey"`
	// The name of source local file to deploy from.
	FileName *string `field:"optional" json:"fileName" yaml:"fileName"`
}

Source information.

Directories

Path Synopsis
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.

Jump to

Keyboard shortcuts

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