Documentation ¶
Index ¶
- func Canary_IsConstruct(x interface{}) *bool
- func Canary_IsResource(construct awscdk.IConstruct) *bool
- func CfnCanary_CFN_RESOURCE_TYPE_NAME() *string
- func CfnCanary_IsCfnElement(x interface{}) *bool
- func CfnCanary_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnCanary_IsConstruct(x interface{}) *bool
- func NewAssetCode_Override(a AssetCode, assetPath *string, options *awss3assets.AssetOptions)
- func NewCanary_Override(c Canary, scope constructs.Construct, id *string, props *CanaryProps)
- func NewCfnCanary_Override(c CfnCanary, scope awscdk.Construct, id *string, props *CfnCanaryProps)
- func NewCode_Override(c Code)
- func NewInlineCode_Override(i InlineCode, code *string)
- func NewRuntime_Override(r Runtime, name *string)
- func NewS3Code_Override(s S3Code, bucket awss3.IBucket, key *string, objectVersion *string)
- type ArtifactsBucketLocation
- type AssetCode
- func AssetCode_FromAsset(assetPath *string, options *awss3assets.AssetOptions) AssetCode
- func Code_FromAsset(assetPath *string, options *awss3assets.AssetOptions) AssetCode
- func InlineCode_FromAsset(assetPath *string, options *awss3assets.AssetOptions) AssetCode
- func NewAssetCode(assetPath *string, options *awss3assets.AssetOptions) AssetCode
- func S3Code_FromAsset(assetPath *string, options *awss3assets.AssetOptions) AssetCode
- type Canary
- type CanaryProps
- type CfnCanary
- type CfnCanaryProps
- type CfnCanary_CodeProperty
- type CfnCanary_RunConfigProperty
- type CfnCanary_ScheduleProperty
- type CfnCanary_VPCConfigProperty
- type Code
- type CodeConfig
- type CustomTestOptions
- type InlineCode
- type Runtime
- func NewRuntime(name *string) Runtime
- func Runtime_SYNTHETICS_1_0() Runtime
- func Runtime_SYNTHETICS_NODEJS_2_0() Runtime
- func Runtime_SYNTHETICS_NODEJS_2_1() Runtime
- func Runtime_SYNTHETICS_NODEJS_2_2() Runtime
- func Runtime_SYNTHETICS_NODEJS_PUPPETEER_3_0() Runtime
- func Runtime_SYNTHETICS_NODEJS_PUPPETEER_3_1() Runtime
- type S3Code
- func AssetCode_FromBucket(bucket awss3.IBucket, key *string, objectVersion *string) S3Code
- func Code_FromBucket(bucket awss3.IBucket, key *string, objectVersion *string) S3Code
- func InlineCode_FromBucket(bucket awss3.IBucket, key *string, objectVersion *string) S3Code
- func NewS3Code(bucket awss3.IBucket, key *string, objectVersion *string) S3Code
- func S3Code_FromBucket(bucket awss3.IBucket, key *string, objectVersion *string) S3Code
- type Schedule
- type Test
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Canary_IsConstruct ¶
func Canary_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func Canary_IsResource ¶
func Canary_IsResource(construct awscdk.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func CfnCanary_CFN_RESOURCE_TYPE_NAME ¶
func CfnCanary_CFN_RESOURCE_TYPE_NAME() *string
func CfnCanary_IsCfnElement ¶
func CfnCanary_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.
func CfnCanary_IsCfnResource ¶
func CfnCanary_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource. Experimental.
func CfnCanary_IsConstruct ¶
func CfnCanary_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func NewAssetCode_Override ¶
func NewAssetCode_Override(a AssetCode, assetPath *string, options *awss3assets.AssetOptions)
Experimental.
func NewCanary_Override ¶
func NewCanary_Override(c Canary, scope constructs.Construct, id *string, props *CanaryProps)
Experimental.
func NewCfnCanary_Override ¶
func NewCfnCanary_Override(c CfnCanary, scope awscdk.Construct, id *string, props *CfnCanaryProps)
Create a new `AWS::Synthetics::Canary`.
Types ¶
type ArtifactsBucketLocation ¶
type ArtifactsBucketLocation struct { // The s3 location that stores the data of each run. // Experimental. Bucket awss3.IBucket `json:"bucket"` // The S3 bucket prefix. // // Specify this if you want a more specific path within the artifacts bucket. // Experimental. Prefix *string `json:"prefix"` }
Options for specifying the s3 location that stores the data of each canary run.
The artifacts bucket location **cannot** be updated once the canary is created. Experimental.
type AssetCode ¶
type AssetCode interface { Code Bind(scope awscdk.Construct, handler *string) *CodeConfig }
Canary code from an Asset. Experimental.
func AssetCode_FromAsset ¶
func AssetCode_FromAsset(assetPath *string, options *awss3assets.AssetOptions) AssetCode
Specify code from a local path.
Path must include the folder structure `nodejs/node_modules/myCanaryFilename.js`.
Returns: `AssetCode` associated with the specified path. See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary.html#CloudWatch_Synthetics_Canaries_write_from_scratch
Experimental.
func Code_FromAsset ¶
func Code_FromAsset(assetPath *string, options *awss3assets.AssetOptions) AssetCode
Specify code from a local path.
Path must include the folder structure `nodejs/node_modules/myCanaryFilename.js`.
Returns: `AssetCode` associated with the specified path. See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary.html#CloudWatch_Synthetics_Canaries_write_from_scratch
Experimental.
func InlineCode_FromAsset ¶
func InlineCode_FromAsset(assetPath *string, options *awss3assets.AssetOptions) AssetCode
Specify code from a local path.
Path must include the folder structure `nodejs/node_modules/myCanaryFilename.js`.
Returns: `AssetCode` associated with the specified path. See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary.html#CloudWatch_Synthetics_Canaries_write_from_scratch
Experimental.
func NewAssetCode ¶
func NewAssetCode(assetPath *string, options *awss3assets.AssetOptions) AssetCode
Experimental.
func S3Code_FromAsset ¶
func S3Code_FromAsset(assetPath *string, options *awss3assets.AssetOptions) AssetCode
Specify code from a local path.
Path must include the folder structure `nodejs/node_modules/myCanaryFilename.js`.
Returns: `AssetCode` associated with the specified path. See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary.html#CloudWatch_Synthetics_Canaries_write_from_scratch
Experimental.
type Canary ¶
type Canary interface { awscdk.Resource ArtifactsBucket() awss3.IBucket CanaryId() *string CanaryName() *string CanaryState() *string Env() *awscdk.ResourceEnvironment Node() awscdk.ConstructNode PhysicalName() *string Role() awsiam.IRole Stack() awscdk.Stack ApplyRemovalPolicy(policy awscdk.RemovalPolicy) GeneratePhysicalName() *string GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string GetResourceNameAttribute(nameAttr *string) *string MetricDuration(options *awscloudwatch.MetricOptions) awscloudwatch.Metric MetricFailed(options *awscloudwatch.MetricOptions) awscloudwatch.Metric MetricSuccessPercent(options *awscloudwatch.MetricOptions) awscloudwatch.Metric OnPrepare() OnSynthesize(session constructs.ISynthesisSession) OnValidate() *[]*string Prepare() Synthesize(session awscdk.ISynthesisSession) ToString() *string Validate() *[]*string }
Define a new Canary. Experimental.
func NewCanary ¶
func NewCanary(scope constructs.Construct, id *string, props *CanaryProps) Canary
Experimental.
type CanaryProps ¶
type CanaryProps struct { // Specify the runtime version to use for the canary. // See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html // // Experimental. Runtime Runtime `json:"runtime"` // The type of test that you want your canary to run. // // Use `Test.custom()` to specify the test to run. // Experimental. Test Test `json:"test"` // The s3 location that stores the data of the canary runs. // Experimental. ArtifactsBucketLocation *ArtifactsBucketLocation `json:"artifactsBucketLocation"` // The name of the canary. // // Be sure to give it a descriptive name that distinguishes it from // other canaries in your account. // // Do not include secrets or proprietary information in your canary name. The canary name // makes up part of the canary ARN, which is included in outbound calls over the internet. // See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/servicelens_canaries_security.html // // Experimental. CanaryName *string `json:"canaryName"` // How many days should failed runs be retained. // Experimental. FailureRetentionPeriod awscdk.Duration `json:"failureRetentionPeriod"` // Canary execution role. // // This is the role that will be assumed by the canary upon execution. // It controls the permissions that the canary will have. The role must // be assumable by the AWS Lambda service principal. // // If not supplied, a role will be created with all the required permissions. // If you provide a Role, you must add the required permissions. // See: required permissions: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-synthetics-canary.html#cfn-synthetics-canary-executionrolearn // // Experimental. Role awsiam.IRole `json:"role"` // Specify the schedule for how often the canary runs. // // For example, if you set `schedule` to `rate(10 minutes)`, then the canary will run every 10 minutes. // You can set the schedule with `Schedule.rate(Duration)` (recommended) or you can specify an expression using `Schedule.expression()`. // Experimental. Schedule Schedule `json:"schedule"` // Whether or not the canary should start after creation. // Experimental. StartAfterCreation *bool `json:"startAfterCreation"` // How many days should successful runs be retained. // Experimental. SuccessRetentionPeriod awscdk.Duration `json:"successRetentionPeriod"` // How long the canary will be in a 'RUNNING' state. // // For example, if you set `timeToLive` to be 1 hour and `schedule` to be `rate(10 minutes)`, // your canary will run at 10 minute intervals for an hour, for a total of 6 times. // Experimental. TimeToLive awscdk.Duration `json:"timeToLive"` }
Properties for a canary. Experimental.
type CfnCanary ¶
type CfnCanary interface { awscdk.CfnResource awscdk.IInspectable ArtifactS3Location() *string SetArtifactS3Location(val *string) AttrId() *string AttrState() *string CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} CfnResourceType() *string Code() interface{} SetCode(val interface{}) CreationStack() *[]*string ExecutionRoleArn() *string SetExecutionRoleArn(val *string) FailureRetentionPeriod() *float64 SetFailureRetentionPeriod(val *float64) LogicalId() *string Name() *string SetName(val *string) Node() awscdk.ConstructNode Ref() *string RunConfig() interface{} SetRunConfig(val interface{}) RuntimeVersion() *string SetRuntimeVersion(val *string) Schedule() interface{} SetSchedule(val interface{}) Stack() awscdk.Stack StartCanaryAfterCreation() interface{} SetStartCanaryAfterCreation(val interface{}) SuccessRetentionPeriod() *float64 SetSuccessRetentionPeriod(val *float64) Tags() awscdk.TagManager UpdatedProperites() *map[string]interface{} VpcConfig() interface{} SetVpcConfig(val interface{}) AddDeletionOverride(path *string) AddDependsOn(target awscdk.CfnResource) AddMetadata(key *string, value interface{}) AddOverride(path *string, value interface{}) AddPropertyDeletionOverride(propertyPath *string) AddPropertyOverride(propertyPath *string, value interface{}) ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) GetAtt(attributeName *string) awscdk.Reference GetMetadata(key *string) interface{} Inspect(inspector awscdk.TreeInspector) OnPrepare() OnSynthesize(session constructs.ISynthesisSession) OnValidate() *[]*string OverrideLogicalId(newLogicalId *string) Prepare() RenderProperties(props *map[string]interface{}) *map[string]interface{} ShouldSynthesize() *bool Synthesize(session awscdk.ISynthesisSession) ToString() *string Validate() *[]*string ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::Synthetics::Canary`.
func NewCfnCanary ¶
func NewCfnCanary(scope awscdk.Construct, id *string, props *CfnCanaryProps) CfnCanary
Create a new `AWS::Synthetics::Canary`.
type CfnCanaryProps ¶
type CfnCanaryProps struct { // `AWS::Synthetics::Canary.ArtifactS3Location`. ArtifactS3Location *string `json:"artifactS3Location"` // `AWS::Synthetics::Canary.Code`. Code interface{} `json:"code"` // `AWS::Synthetics::Canary.ExecutionRoleArn`. ExecutionRoleArn *string `json:"executionRoleArn"` // `AWS::Synthetics::Canary.Name`. Name *string `json:"name"` // `AWS::Synthetics::Canary.RuntimeVersion`. RuntimeVersion *string `json:"runtimeVersion"` // `AWS::Synthetics::Canary.Schedule`. Schedule interface{} `json:"schedule"` // `AWS::Synthetics::Canary.StartCanaryAfterCreation`. StartCanaryAfterCreation interface{} `json:"startCanaryAfterCreation"` // `AWS::Synthetics::Canary.FailureRetentionPeriod`. FailureRetentionPeriod *float64 `json:"failureRetentionPeriod"` // `AWS::Synthetics::Canary.RunConfig`. RunConfig interface{} `json:"runConfig"` // `AWS::Synthetics::Canary.SuccessRetentionPeriod`. SuccessRetentionPeriod *float64 `json:"successRetentionPeriod"` // `AWS::Synthetics::Canary.Tags`. Tags *[]*awscdk.CfnTag `json:"tags"` // `AWS::Synthetics::Canary.VPCConfig`. VpcConfig interface{} `json:"vpcConfig"` }
Properties for defining a `AWS::Synthetics::Canary`.
type CfnCanary_CodeProperty ¶
type CfnCanary_CodeProperty struct { // `CfnCanary.CodeProperty.Handler`. Handler *string `json:"handler"` // `CfnCanary.CodeProperty.S3Bucket`. S3Bucket *string `json:"s3Bucket"` // `CfnCanary.CodeProperty.S3Key`. S3Key *string `json:"s3Key"` // `CfnCanary.CodeProperty.S3ObjectVersion`. S3ObjectVersion *string `json:"s3ObjectVersion"` // `CfnCanary.CodeProperty.Script`. Script *string `json:"script"` }
type CfnCanary_RunConfigProperty ¶
type CfnCanary_RunConfigProperty struct { // `CfnCanary.RunConfigProperty.ActiveTracing`. ActiveTracing interface{} `json:"activeTracing"` // `CfnCanary.RunConfigProperty.EnvironmentVariables`. EnvironmentVariables interface{} `json:"environmentVariables"` // `CfnCanary.RunConfigProperty.MemoryInMB`. MemoryInMb *float64 `json:"memoryInMb"` // `CfnCanary.RunConfigProperty.TimeoutInSeconds`. TimeoutInSeconds *float64 `json:"timeoutInSeconds"` }
type CfnCanary_VPCConfigProperty ¶
type CfnCanary_VPCConfigProperty struct { // `CfnCanary.VPCConfigProperty.SecurityGroupIds`. SecurityGroupIds *[]*string `json:"securityGroupIds"` // `CfnCanary.VPCConfigProperty.SubnetIds`. SubnetIds *[]*string `json:"subnetIds"` // `CfnCanary.VPCConfigProperty.VpcId`. VpcId *string `json:"vpcId"` }
type Code ¶
type Code interface {
Bind(scope awscdk.Construct, handler *string) *CodeConfig
}
The code the canary should execute. Experimental.
type CodeConfig ¶
type CodeConfig struct { // Inline code (mutually exclusive with `s3Location`). // Experimental. InlineCode *string `json:"inlineCode"` // The location of the code in S3 (mutually exclusive with `inlineCode`). // Experimental. S3Location *awss3.Location `json:"s3Location"` }
Configuration of the code class. Experimental.
type CustomTestOptions ¶
type CustomTestOptions struct { // The code of the canary script. // Experimental. Code Code `json:"code"` // The handler for the code. // // Must end with `.handler`. // Experimental. Handler *string `json:"handler"` }
Properties for specifying a test. Experimental.
type InlineCode ¶
type InlineCode interface { Code Bind(_scope awscdk.Construct, handler *string) *CodeConfig }
Canary code from an inline string. Experimental.
func AssetCode_FromInline ¶
func AssetCode_FromInline(code *string) InlineCode
Specify code inline.
Returns: `InlineCode` with inline code. Experimental.
func Code_FromInline ¶
func Code_FromInline(code *string) InlineCode
Specify code inline.
Returns: `InlineCode` with inline code. Experimental.
func InlineCode_FromInline ¶
func InlineCode_FromInline(code *string) InlineCode
Specify code inline.
Returns: `InlineCode` with inline code. Experimental.
func S3Code_FromInline ¶
func S3Code_FromInline(code *string) InlineCode
Specify code inline.
Returns: `InlineCode` with inline code. Experimental.
type Runtime ¶
type Runtime interface {
Name() *string
}
Runtime options for a canary. Experimental.
func Runtime_SYNTHETICS_1_0 ¶
func Runtime_SYNTHETICS_1_0() Runtime
func Runtime_SYNTHETICS_NODEJS_2_0 ¶
func Runtime_SYNTHETICS_NODEJS_2_0() Runtime
func Runtime_SYNTHETICS_NODEJS_2_1 ¶
func Runtime_SYNTHETICS_NODEJS_2_1() Runtime
func Runtime_SYNTHETICS_NODEJS_2_2 ¶
func Runtime_SYNTHETICS_NODEJS_2_2() Runtime
func Runtime_SYNTHETICS_NODEJS_PUPPETEER_3_0 ¶
func Runtime_SYNTHETICS_NODEJS_PUPPETEER_3_0() Runtime
func Runtime_SYNTHETICS_NODEJS_PUPPETEER_3_1 ¶
func Runtime_SYNTHETICS_NODEJS_PUPPETEER_3_1() Runtime
type S3Code ¶
type S3Code interface { Code Bind(_scope awscdk.Construct, _handler *string) *CodeConfig }
S3 bucket path to the code zip file. Experimental.
func AssetCode_FromBucket ¶
Specify code from an s3 bucket.
The object in the s3 bucket must be a .zip file that contains the structure `nodejs/node_modules/myCanaryFilename.js`.
Returns: `S3Code` associated with the specified S3 object. See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary.html#CloudWatch_Synthetics_Canaries_write_from_scratch
Experimental.
func Code_FromBucket ¶
Specify code from an s3 bucket.
The object in the s3 bucket must be a .zip file that contains the structure `nodejs/node_modules/myCanaryFilename.js`.
Returns: `S3Code` associated with the specified S3 object. See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary.html#CloudWatch_Synthetics_Canaries_write_from_scratch
Experimental.
func InlineCode_FromBucket ¶
Specify code from an s3 bucket.
The object in the s3 bucket must be a .zip file that contains the structure `nodejs/node_modules/myCanaryFilename.js`.
Returns: `S3Code` associated with the specified S3 object. See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary.html#CloudWatch_Synthetics_Canaries_write_from_scratch
Experimental.
func S3Code_FromBucket ¶
Specify code from an s3 bucket.
The object in the s3 bucket must be a .zip file that contains the structure `nodejs/node_modules/myCanaryFilename.js`.
Returns: `S3Code` associated with the specified S3 object. See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary.html#CloudWatch_Synthetics_Canaries_write_from_scratch
Experimental.
type Schedule ¶
type Schedule interface {
ExpressionString() *string
}
Schedule for canary runs. Experimental.
func Schedule_Expression ¶
Construct a schedule from a literal schedule expression.
The expression must be in a `rate(number units)` format. For example, `Schedule.expression('rate(10 minutes)')` Experimental.
func Schedule_Rate ¶
Construct a schedule from an interval.
Allowed values: 0 (for a single run) or between 1 and 60 minutes. To specify a single run, you can use `Schedule.once()`. Experimental.
type Test ¶
Specify a test that the canary should run. Experimental.
func Test_Custom ¶
func Test_Custom(options *CustomTestOptions) Test
Specify a custom test with your own code.
Returns: `Test` associated with the specified Code object Experimental.