Documentation
¶
Index ¶
- func CfnComputeEnvironment_CFN_RESOURCE_TYPE_NAME() *string
- func CfnComputeEnvironment_IsCfnElement(x interface{}) *bool
- func CfnComputeEnvironment_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnComputeEnvironment_IsConstruct(x interface{}) *bool
- func CfnJobDefinition_CFN_RESOURCE_TYPE_NAME() *string
- func CfnJobDefinition_IsCfnElement(x interface{}) *bool
- func CfnJobDefinition_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnJobDefinition_IsConstruct(x interface{}) *bool
- func CfnJobQueue_CFN_RESOURCE_TYPE_NAME() *string
- func CfnJobQueue_IsCfnElement(x interface{}) *bool
- func CfnJobQueue_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnJobQueue_IsConstruct(x interface{}) *bool
- func CfnSchedulingPolicy_CFN_RESOURCE_TYPE_NAME() *string
- func CfnSchedulingPolicy_IsCfnElement(x interface{}) *bool
- func CfnSchedulingPolicy_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnSchedulingPolicy_IsConstruct(x interface{}) *bool
- func ComputeEnvironment_IsConstruct(x interface{}) *bool
- func ComputeEnvironment_IsResource(construct awscdk.IConstruct) *bool
- func JobDefinition_IsConstruct(x interface{}) *bool
- func JobDefinition_IsResource(construct awscdk.IConstruct) *bool
- func JobQueue_IsConstruct(x interface{}) *bool
- func JobQueue_IsResource(construct awscdk.IConstruct) *bool
- func NewCfnComputeEnvironment_Override(c CfnComputeEnvironment, scope awscdk.Construct, id *string, ...)
- func NewCfnJobDefinition_Override(c CfnJobDefinition, scope awscdk.Construct, id *string, ...)
- func NewCfnJobQueue_Override(c CfnJobQueue, scope awscdk.Construct, id *string, props *CfnJobQueueProps)
- func NewCfnSchedulingPolicy_Override(c CfnSchedulingPolicy, scope awscdk.Construct, id *string, ...)
- func NewComputeEnvironment_Override(c ComputeEnvironment, scope constructs.Construct, id *string, ...)
- func NewExposedSecret_Override(e ExposedSecret, optionName *string, secretArn *string)
- func NewJobDefinition_Override(j JobDefinition, scope constructs.Construct, id *string, ...)
- func NewJobQueue_Override(j JobQueue, scope constructs.Construct, id *string, props *JobQueueProps)
- type AllocationStrategy
- type CfnComputeEnvironment
- type CfnComputeEnvironmentProps
- type CfnComputeEnvironment_ComputeResourcesProperty
- type CfnComputeEnvironment_Ec2ConfigurationObjectProperty
- type CfnComputeEnvironment_LaunchTemplateSpecificationProperty
- type CfnJobDefinition
- type CfnJobDefinitionProps
- type CfnJobDefinition_AuthorizationConfigProperty
- type CfnJobDefinition_ContainerPropertiesProperty
- type CfnJobDefinition_DeviceProperty
- type CfnJobDefinition_EfsVolumeConfigurationProperty
- type CfnJobDefinition_EnvironmentProperty
- type CfnJobDefinition_EvaluateOnExitProperty
- type CfnJobDefinition_FargatePlatformConfigurationProperty
- type CfnJobDefinition_LinuxParametersProperty
- type CfnJobDefinition_LogConfigurationProperty
- type CfnJobDefinition_MountPointsProperty
- type CfnJobDefinition_NetworkConfigurationProperty
- type CfnJobDefinition_NodePropertiesProperty
- type CfnJobDefinition_NodeRangePropertyProperty
- type CfnJobDefinition_ResourceRequirementProperty
- type CfnJobDefinition_RetryStrategyProperty
- type CfnJobDefinition_SecretProperty
- type CfnJobDefinition_TimeoutProperty
- type CfnJobDefinition_TmpfsProperty
- type CfnJobDefinition_UlimitProperty
- type CfnJobDefinition_VolumesHostProperty
- type CfnJobDefinition_VolumesProperty
- type CfnJobQueue
- type CfnJobQueueProps
- type CfnJobQueue_ComputeEnvironmentOrderProperty
- type CfnSchedulingPolicy
- type CfnSchedulingPolicyProps
- type CfnSchedulingPolicy_FairsharePolicyProperty
- type CfnSchedulingPolicy_ShareAttributesProperty
- type ComputeEnvironment
- type ComputeEnvironmentProps
- type ComputeResourceType
- type ComputeResources
- type ExposedSecret
- type IComputeEnvironment
- type IJobDefinition
- type IJobQueue
- type IMultiNodeProps
- type INodeRangeProps
- type JobDefinition
- type JobDefinitionContainer
- type JobDefinitionProps
- type JobQueue
- type JobQueueComputeEnvironment
- type JobQueueProps
- type LaunchTemplateSpecification
- type LogConfiguration
- type LogDriver
- type PlatformCapabilities
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CfnComputeEnvironment_CFN_RESOURCE_TYPE_NAME ¶
func CfnComputeEnvironment_CFN_RESOURCE_TYPE_NAME() *string
func CfnComputeEnvironment_IsCfnElement ¶
func CfnComputeEnvironment_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 CfnComputeEnvironment_IsCfnResource ¶
func CfnComputeEnvironment_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource. Experimental.
func CfnComputeEnvironment_IsConstruct ¶
func CfnComputeEnvironment_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func CfnJobDefinition_CFN_RESOURCE_TYPE_NAME ¶
func CfnJobDefinition_CFN_RESOURCE_TYPE_NAME() *string
func CfnJobDefinition_IsCfnElement ¶
func CfnJobDefinition_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 CfnJobDefinition_IsCfnResource ¶
func CfnJobDefinition_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource. Experimental.
func CfnJobDefinition_IsConstruct ¶
func CfnJobDefinition_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func CfnJobQueue_CFN_RESOURCE_TYPE_NAME ¶
func CfnJobQueue_CFN_RESOURCE_TYPE_NAME() *string
func CfnJobQueue_IsCfnElement ¶
func CfnJobQueue_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 CfnJobQueue_IsCfnResource ¶
func CfnJobQueue_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource. Experimental.
func CfnJobQueue_IsConstruct ¶
func CfnJobQueue_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func CfnSchedulingPolicy_CFN_RESOURCE_TYPE_NAME ¶
func CfnSchedulingPolicy_CFN_RESOURCE_TYPE_NAME() *string
func CfnSchedulingPolicy_IsCfnElement ¶
func CfnSchedulingPolicy_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 CfnSchedulingPolicy_IsCfnResource ¶
func CfnSchedulingPolicy_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource. Experimental.
func CfnSchedulingPolicy_IsConstruct ¶
func CfnSchedulingPolicy_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func ComputeEnvironment_IsConstruct ¶
func ComputeEnvironment_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func ComputeEnvironment_IsResource ¶
func ComputeEnvironment_IsResource(construct awscdk.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func JobDefinition_IsConstruct ¶
func JobDefinition_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func JobDefinition_IsResource ¶
func JobDefinition_IsResource(construct awscdk.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func JobQueue_IsConstruct ¶
func JobQueue_IsConstruct(x interface{}) *bool
Return whether the given object is a Construct. Experimental.
func JobQueue_IsResource ¶
func JobQueue_IsResource(construct awscdk.IConstruct) *bool
Check whether the given construct is a Resource. Experimental.
func NewCfnComputeEnvironment_Override ¶
func NewCfnComputeEnvironment_Override(c CfnComputeEnvironment, scope awscdk.Construct, id *string, props *CfnComputeEnvironmentProps)
Create a new `AWS::Batch::ComputeEnvironment`.
func NewCfnJobDefinition_Override ¶
func NewCfnJobDefinition_Override(c CfnJobDefinition, scope awscdk.Construct, id *string, props *CfnJobDefinitionProps)
Create a new `AWS::Batch::JobDefinition`.
func NewCfnJobQueue_Override ¶
func NewCfnJobQueue_Override(c CfnJobQueue, scope awscdk.Construct, id *string, props *CfnJobQueueProps)
Create a new `AWS::Batch::JobQueue`.
func NewCfnSchedulingPolicy_Override ¶
func NewCfnSchedulingPolicy_Override(c CfnSchedulingPolicy, scope awscdk.Construct, id *string, props *CfnSchedulingPolicyProps)
Create a new `AWS::Batch::SchedulingPolicy`.
func NewComputeEnvironment_Override ¶
func NewComputeEnvironment_Override(c ComputeEnvironment, scope constructs.Construct, id *string, props *ComputeEnvironmentProps)
Experimental.
func NewExposedSecret_Override ¶
func NewExposedSecret_Override(e ExposedSecret, optionName *string, secretArn *string)
Experimental.
func NewJobDefinition_Override ¶
func NewJobDefinition_Override(j JobDefinition, scope constructs.Construct, id *string, props *JobDefinitionProps)
Experimental.
func NewJobQueue_Override ¶
func NewJobQueue_Override(j JobQueue, scope constructs.Construct, id *string, props *JobQueueProps)
Experimental.
Types ¶
type AllocationStrategy ¶
type AllocationStrategy string
Properties for how to prepare compute resources that are provisioned for a compute environment. Experimental.
const ( // Batch will use the best fitting instance type will be used when assigning a batch job in this compute environment. // Experimental. AllocationStrategy_BEST_FIT AllocationStrategy = "BEST_FIT" // Batch will select additional instance types that are large enough to meet the requirements of the jobs in the queue, with a preference for instance types with a lower cost per unit vCPU. // Experimental. AllocationStrategy_BEST_FIT_PROGRESSIVE AllocationStrategy = "BEST_FIT_PROGRESSIVE" // This is only available for Spot Instance compute resources and will select additional instance types that are large enough to meet the requirements of the jobs in the queue, with a preference for instance types that are less likely to be interrupted. // Experimental. AllocationStrategy_SPOT_CAPACITY_OPTIMIZED AllocationStrategy = "SPOT_CAPACITY_OPTIMIZED" )
type CfnComputeEnvironment ¶
type CfnComputeEnvironment interface {
awscdk.CfnResource
awscdk.IInspectable
AttrComputeEnvironmentArn() *string
// Options for this resource, such as condition, update policy etc.
// Experimental.
CfnOptions() awscdk.ICfnResourceOptions
CfnProperties() *map[string]interface{}
// AWS resource type.
// Experimental.
CfnResourceType() *string
// `AWS::Batch::ComputeEnvironment.ComputeEnvironmentName`.
ComputeEnvironmentName() *string
SetComputeEnvironmentName(val *string)
// `AWS::Batch::ComputeEnvironment.ComputeResources`.
ComputeResources() interface{}
SetComputeResources(val interface{})
// Returns: the stack trace of the point where this Resource was created from, sourced
// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
// node +internal+ entries filtered.
// Experimental.
CreationStack() *[]*string
// The logical ID for this CloudFormation stack element.
//
// The logical ID of the element
// is calculated from the path of the resource node in the construct tree.
//
// To override this value, use `overrideLogicalId(newLogicalId)`.
//
// Returns: the logical ID as a stringified token. This value will only get
// resolved during synthesis.
// Experimental.
LogicalId() *string
// The construct tree node associated with this construct.
// Experimental.
Node() awscdk.ConstructNode
// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
//
// If, by any chance, the intrinsic reference of a resource is not a string, you could
// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
// Experimental.
Ref() *string
// `AWS::Batch::ComputeEnvironment.ServiceRole`.
ServiceRole() *string
SetServiceRole(val *string)
// The stack in which this element is defined.
//
// CfnElements must be defined within a stack scope (directly or indirectly).
// Experimental.
Stack() awscdk.Stack
// `AWS::Batch::ComputeEnvironment.State`.
State() *string
SetState(val *string)
// `AWS::Batch::ComputeEnvironment.Tags`.
Tags() awscdk.TagManager
// `AWS::Batch::ComputeEnvironment.Type`.
Type() *string
SetType(val *string)
// `AWS::Batch::ComputeEnvironment.UnmanagedvCpus`.
UnmanagedvCpus() *float64
SetUnmanagedvCpus(val *float64)
// Return properties modified after initiation.
//
// Resources that expose mutable properties should override this function to
// collect and return the properties object for this resource.
// Experimental.
UpdatedProperites() *map[string]interface{}
// Syntactic sugar for `addOverride(path, undefined)`.
// Experimental.
AddDeletionOverride(path *string)
// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
//
// This can be used for resources across stacks (or nested stack) boundaries
// and the dependency will automatically be transferred to the relevant scope.
// Experimental.
AddDependsOn(target awscdk.CfnResource)
// Add a value to the CloudFormation Resource Metadata.
// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
//
// Note that this is a different set of metadata from CDK node metadata; this
// metadata ends up in the stack template under the resource, whereas CDK
// node metadata ends up in the Cloud Assembly.
//
// Experimental.
AddMetadata(key *string, value interface{})
// Adds an override to the synthesized CloudFormation resource.
//
// To add a
// property override, either use `addPropertyOverride` or prefix `path` with
// "Properties." (i.e. `Properties.TopicName`).
//
// If the override is nested, separate each nested level using a dot (.) in the path parameter.
// If there is an array as part of the nesting, specify the index in the path.
//
// To include a literal `.` in the property name, prefix with a `\`. In most
// programming languages you will need to write this as `"\\."` because the
// `\` itself will need to be escaped.
//
// For example,
// “`typescript
// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
// “`
// would add the overrides
// “`json
// "Properties": {
// "GlobalSecondaryIndexes": [
// {
// "Projection": {
// "NonKeyAttributes": [ "myattribute" ]
// ...
// }
// ...
// },
// {
// "ProjectionType": "INCLUDE"
// ...
// },
// ]
// ...
// }
// “`
//
// The `value` argument to `addOverride` will not be processed or translated
// in any way. Pass raw JSON values in here with the correct capitalization
// for CloudFormation. If you pass CDK classes or structs, they will be
// rendered with lowercased key names, and CloudFormation will reject the
// template.
// Experimental.
AddOverride(path *string, value interface{})
// Adds an override that deletes the value of a property from the resource definition.
// Experimental.
AddPropertyDeletionOverride(propertyPath *string)
// Adds an override to a resource property.
//
// Syntactic sugar for `addOverride("Properties.<...>", value)`.
// Experimental.
AddPropertyOverride(propertyPath *string, value interface{})
// Sets the deletion policy of the resource based on the removal policy specified.
//
// The Removal Policy controls what happens to this resource when it stops
// being managed by CloudFormation, either because you've removed it from the
// CDK application or because you've made a change that requires the resource
// to be replaced.
//
// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
// Experimental.
ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
// Returns a token for an runtime attribute of this resource.
//
// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
// in case there is no generated attribute.
// Experimental.
GetAtt(attributeName *string) awscdk.Reference
// Retrieve a value value from the CloudFormation Resource Metadata.
// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
//
// Note that this is a different set of metadata from CDK node metadata; this
// metadata ends up in the stack template under the resource, whereas CDK
// node metadata ends up in the Cloud Assembly.
//
// Experimental.
GetMetadata(key *string) interface{}
// Examines the CloudFormation resource and discloses attributes.
Inspect(inspector awscdk.TreeInspector)
// 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.
// Experimental.
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.
// Experimental.
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.
// Experimental.
OnValidate() *[]*string
// Overrides the auto-generated logical ID with a specific ID.
// Experimental.
OverrideLogicalId(newLogicalId *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.
// Experimental.
Prepare()
RenderProperties(props *map[string]interface{}) *map[string]interface{}
// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
//
// Returns: `true` if the resource should be included or `false` is the resource
// should be omitted.
// Experimental.
ShouldSynthesize() *bool
// 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.
// Experimental.
Synthesize(session awscdk.ISynthesisSession)
// Returns a string representation of this construct.
//
// Returns: a string representation of this resource.
// Experimental.
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.
// Experimental.
Validate() *[]*string
// Experimental.
ValidateProperties(_properties interface{})
}
A CloudFormation `AWS::Batch::ComputeEnvironment`.
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
cfnComputeEnvironment := batch.NewCfnComputeEnvironment(this, jsii.String("MyCfnComputeEnvironment"), &cfnComputeEnvironmentProps{
type: jsii.String("type"),
// the properties below are optional
computeEnvironmentName: jsii.String("computeEnvironmentName"),
computeResources: &computeResourcesProperty{
maxvCpus: jsii.Number(123),
subnets: []*string{
jsii.String("subnets"),
},
type: jsii.String("type"),
// the properties below are optional
allocationStrategy: jsii.String("allocationStrategy"),
bidPercentage: jsii.Number(123),
desiredvCpus: jsii.Number(123),
ec2Configuration: []interface{}{
&ec2ConfigurationObjectProperty{
imageType: jsii.String("imageType"),
// the properties below are optional
imageIdOverride: jsii.String("imageIdOverride"),
},
},
ec2KeyPair: jsii.String("ec2KeyPair"),
imageId: jsii.String("imageId"),
instanceRole: jsii.String("instanceRole"),
instanceTypes: []*string{
jsii.String("instanceTypes"),
},
launchTemplate: &launchTemplateSpecificationProperty{
launchTemplateId: jsii.String("launchTemplateId"),
launchTemplateName: jsii.String("launchTemplateName"),
version: jsii.String("version"),
},
minvCpus: jsii.Number(123),
placementGroup: jsii.String("placementGroup"),
securityGroupIds: []*string{
jsii.String("securityGroupIds"),
},
spotIamFleetRole: jsii.String("spotIamFleetRole"),
tags: map[string]*string{
"tagsKey": jsii.String("tags"),
},
},
serviceRole: jsii.String("serviceRole"),
state: jsii.String("state"),
tags: map[string]*string{
"tagsKey": jsii.String("tags"),
},
unmanagedvCpus: jsii.Number(123),
})
func NewCfnComputeEnvironment ¶
func NewCfnComputeEnvironment(scope awscdk.Construct, id *string, props *CfnComputeEnvironmentProps) CfnComputeEnvironment
Create a new `AWS::Batch::ComputeEnvironment`.
type CfnComputeEnvironmentProps ¶
type CfnComputeEnvironmentProps struct {
// `AWS::Batch::ComputeEnvironment.Type`.
Type *string `json:"type" yaml:"type"`
// `AWS::Batch::ComputeEnvironment.ComputeEnvironmentName`.
ComputeEnvironmentName *string `json:"computeEnvironmentName" yaml:"computeEnvironmentName"`
// `AWS::Batch::ComputeEnvironment.ComputeResources`.
ComputeResources interface{} `json:"computeResources" yaml:"computeResources"`
// `AWS::Batch::ComputeEnvironment.ServiceRole`.
ServiceRole *string `json:"serviceRole" yaml:"serviceRole"`
// `AWS::Batch::ComputeEnvironment.State`.
State *string `json:"state" yaml:"state"`
// `AWS::Batch::ComputeEnvironment.Tags`.
Tags *map[string]*string `json:"tags" yaml:"tags"`
// `AWS::Batch::ComputeEnvironment.UnmanagedvCpus`.
UnmanagedvCpus *float64 `json:"unmanagedvCpus" yaml:"unmanagedvCpus"`
}
Properties for defining a `CfnComputeEnvironment`.
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
cfnComputeEnvironmentProps := &cfnComputeEnvironmentProps{
type: jsii.String("type"),
// the properties below are optional
computeEnvironmentName: jsii.String("computeEnvironmentName"),
computeResources: &computeResourcesProperty{
maxvCpus: jsii.Number(123),
subnets: []*string{
jsii.String("subnets"),
},
type: jsii.String("type"),
// the properties below are optional
allocationStrategy: jsii.String("allocationStrategy"),
bidPercentage: jsii.Number(123),
desiredvCpus: jsii.Number(123),
ec2Configuration: []interface{}{
&ec2ConfigurationObjectProperty{
imageType: jsii.String("imageType"),
// the properties below are optional
imageIdOverride: jsii.String("imageIdOverride"),
},
},
ec2KeyPair: jsii.String("ec2KeyPair"),
imageId: jsii.String("imageId"),
instanceRole: jsii.String("instanceRole"),
instanceTypes: []*string{
jsii.String("instanceTypes"),
},
launchTemplate: &launchTemplateSpecificationProperty{
launchTemplateId: jsii.String("launchTemplateId"),
launchTemplateName: jsii.String("launchTemplateName"),
version: jsii.String("version"),
},
minvCpus: jsii.Number(123),
placementGroup: jsii.String("placementGroup"),
securityGroupIds: []*string{
jsii.String("securityGroupIds"),
},
spotIamFleetRole: jsii.String("spotIamFleetRole"),
tags: map[string]*string{
"tagsKey": jsii.String("tags"),
},
},
serviceRole: jsii.String("serviceRole"),
state: jsii.String("state"),
tags: map[string]*string{
"tagsKey": jsii.String("tags"),
},
unmanagedvCpus: jsii.Number(123),
}
type CfnComputeEnvironment_ComputeResourcesProperty ¶
type CfnComputeEnvironment_ComputeResourcesProperty struct {
// `CfnComputeEnvironment.ComputeResourcesProperty.MaxvCpus`.
MaxvCpus *float64 `json:"maxvCpus" yaml:"maxvCpus"`
// `CfnComputeEnvironment.ComputeResourcesProperty.Subnets`.
Subnets *[]*string `json:"subnets" yaml:"subnets"`
// `CfnComputeEnvironment.ComputeResourcesProperty.Type`.
Type *string `json:"type" yaml:"type"`
// `CfnComputeEnvironment.ComputeResourcesProperty.AllocationStrategy`.
AllocationStrategy *string `json:"allocationStrategy" yaml:"allocationStrategy"`
// `CfnComputeEnvironment.ComputeResourcesProperty.BidPercentage`.
BidPercentage *float64 `json:"bidPercentage" yaml:"bidPercentage"`
// `CfnComputeEnvironment.ComputeResourcesProperty.DesiredvCpus`.
DesiredvCpus *float64 `json:"desiredvCpus" yaml:"desiredvCpus"`
// `CfnComputeEnvironment.ComputeResourcesProperty.Ec2Configuration`.
Ec2Configuration interface{} `json:"ec2Configuration" yaml:"ec2Configuration"`
// `CfnComputeEnvironment.ComputeResourcesProperty.Ec2KeyPair`.
Ec2KeyPair *string `json:"ec2KeyPair" yaml:"ec2KeyPair"`
// `CfnComputeEnvironment.ComputeResourcesProperty.ImageId`.
ImageId *string `json:"imageId" yaml:"imageId"`
// `CfnComputeEnvironment.ComputeResourcesProperty.InstanceRole`.
InstanceRole *string `json:"instanceRole" yaml:"instanceRole"`
// `CfnComputeEnvironment.ComputeResourcesProperty.InstanceTypes`.
InstanceTypes *[]*string `json:"instanceTypes" yaml:"instanceTypes"`
// `CfnComputeEnvironment.ComputeResourcesProperty.LaunchTemplate`.
LaunchTemplate interface{} `json:"launchTemplate" yaml:"launchTemplate"`
// `CfnComputeEnvironment.ComputeResourcesProperty.MinvCpus`.
MinvCpus *float64 `json:"minvCpus" yaml:"minvCpus"`
// `CfnComputeEnvironment.ComputeResourcesProperty.PlacementGroup`.
PlacementGroup *string `json:"placementGroup" yaml:"placementGroup"`
// `CfnComputeEnvironment.ComputeResourcesProperty.SecurityGroupIds`.
SecurityGroupIds *[]*string `json:"securityGroupIds" yaml:"securityGroupIds"`
// `CfnComputeEnvironment.ComputeResourcesProperty.SpotIamFleetRole`.
SpotIamFleetRole *string `json:"spotIamFleetRole" yaml:"spotIamFleetRole"`
// `CfnComputeEnvironment.ComputeResourcesProperty.Tags`.
Tags *map[string]*string `json:"tags" yaml:"tags"`
}
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
computeResourcesProperty := &computeResourcesProperty{
maxvCpus: jsii.Number(123),
subnets: []*string{
jsii.String("subnets"),
},
type: jsii.String("type"),
// the properties below are optional
allocationStrategy: jsii.String("allocationStrategy"),
bidPercentage: jsii.Number(123),
desiredvCpus: jsii.Number(123),
ec2Configuration: []interface{}{
&ec2ConfigurationObjectProperty{
imageType: jsii.String("imageType"),
// the properties below are optional
imageIdOverride: jsii.String("imageIdOverride"),
},
},
ec2KeyPair: jsii.String("ec2KeyPair"),
imageId: jsii.String("imageId"),
instanceRole: jsii.String("instanceRole"),
instanceTypes: []*string{
jsii.String("instanceTypes"),
},
launchTemplate: &launchTemplateSpecificationProperty{
launchTemplateId: jsii.String("launchTemplateId"),
launchTemplateName: jsii.String("launchTemplateName"),
version: jsii.String("version"),
},
minvCpus: jsii.Number(123),
placementGroup: jsii.String("placementGroup"),
securityGroupIds: []*string{
jsii.String("securityGroupIds"),
},
spotIamFleetRole: jsii.String("spotIamFleetRole"),
tags: map[string]*string{
"tagsKey": jsii.String("tags"),
},
}
type CfnComputeEnvironment_Ec2ConfigurationObjectProperty ¶
type CfnComputeEnvironment_Ec2ConfigurationObjectProperty struct {
// `CfnComputeEnvironment.Ec2ConfigurationObjectProperty.ImageType`.
ImageType *string `json:"imageType" yaml:"imageType"`
// `CfnComputeEnvironment.Ec2ConfigurationObjectProperty.ImageIdOverride`.
ImageIdOverride *string `json:"imageIdOverride" yaml:"imageIdOverride"`
}
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
ec2ConfigurationObjectProperty := &ec2ConfigurationObjectProperty{
imageType: jsii.String("imageType"),
// the properties below are optional
imageIdOverride: jsii.String("imageIdOverride"),
}
type CfnComputeEnvironment_LaunchTemplateSpecificationProperty ¶
type CfnComputeEnvironment_LaunchTemplateSpecificationProperty struct {
// `CfnComputeEnvironment.LaunchTemplateSpecificationProperty.LaunchTemplateId`.
LaunchTemplateId *string `json:"launchTemplateId" yaml:"launchTemplateId"`
// `CfnComputeEnvironment.LaunchTemplateSpecificationProperty.LaunchTemplateName`.
LaunchTemplateName *string `json:"launchTemplateName" yaml:"launchTemplateName"`
// `CfnComputeEnvironment.LaunchTemplateSpecificationProperty.Version`.
Version *string `json:"version" yaml:"version"`
}
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
launchTemplateSpecificationProperty := &launchTemplateSpecificationProperty{
launchTemplateId: jsii.String("launchTemplateId"),
launchTemplateName: jsii.String("launchTemplateName"),
version: jsii.String("version"),
}
type CfnJobDefinition ¶
type CfnJobDefinition interface {
awscdk.CfnResource
awscdk.IInspectable
// Options for this resource, such as condition, update policy etc.
// Experimental.
CfnOptions() awscdk.ICfnResourceOptions
CfnProperties() *map[string]interface{}
// AWS resource type.
// Experimental.
CfnResourceType() *string
// `AWS::Batch::JobDefinition.ContainerProperties`.
ContainerProperties() interface{}
SetContainerProperties(val interface{})
// Returns: the stack trace of the point where this Resource was created from, sourced
// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
// node +internal+ entries filtered.
// Experimental.
CreationStack() *[]*string
// `AWS::Batch::JobDefinition.JobDefinitionName`.
JobDefinitionName() *string
SetJobDefinitionName(val *string)
// The logical ID for this CloudFormation stack element.
//
// The logical ID of the element
// is calculated from the path of the resource node in the construct tree.
//
// To override this value, use `overrideLogicalId(newLogicalId)`.
//
// Returns: the logical ID as a stringified token. This value will only get
// resolved during synthesis.
// Experimental.
LogicalId() *string
// The construct tree node associated with this construct.
// Experimental.
Node() awscdk.ConstructNode
// `AWS::Batch::JobDefinition.NodeProperties`.
NodeProperties() interface{}
SetNodeProperties(val interface{})
// `AWS::Batch::JobDefinition.Parameters`.
Parameters() interface{}
SetParameters(val interface{})
// `AWS::Batch::JobDefinition.PlatformCapabilities`.
PlatformCapabilities() *[]*string
SetPlatformCapabilities(val *[]*string)
// `AWS::Batch::JobDefinition.PropagateTags`.
PropagateTags() interface{}
SetPropagateTags(val interface{})
// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
//
// If, by any chance, the intrinsic reference of a resource is not a string, you could
// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
// Experimental.
Ref() *string
// `AWS::Batch::JobDefinition.RetryStrategy`.
RetryStrategy() interface{}
SetRetryStrategy(val interface{})
// `AWS::Batch::JobDefinition.SchedulingPriority`.
SchedulingPriority() *float64
SetSchedulingPriority(val *float64)
// The stack in which this element is defined.
//
// CfnElements must be defined within a stack scope (directly or indirectly).
// Experimental.
Stack() awscdk.Stack
// `AWS::Batch::JobDefinition.Tags`.
Tags() awscdk.TagManager
// `AWS::Batch::JobDefinition.Timeout`.
Timeout() interface{}
SetTimeout(val interface{})
// `AWS::Batch::JobDefinition.Type`.
Type() *string
SetType(val *string)
// Return properties modified after initiation.
//
// Resources that expose mutable properties should override this function to
// collect and return the properties object for this resource.
// Experimental.
UpdatedProperites() *map[string]interface{}
// Syntactic sugar for `addOverride(path, undefined)`.
// Experimental.
AddDeletionOverride(path *string)
// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
//
// This can be used for resources across stacks (or nested stack) boundaries
// and the dependency will automatically be transferred to the relevant scope.
// Experimental.
AddDependsOn(target awscdk.CfnResource)
// Add a value to the CloudFormation Resource Metadata.
// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
//
// Note that this is a different set of metadata from CDK node metadata; this
// metadata ends up in the stack template under the resource, whereas CDK
// node metadata ends up in the Cloud Assembly.
//
// Experimental.
AddMetadata(key *string, value interface{})
// Adds an override to the synthesized CloudFormation resource.
//
// To add a
// property override, either use `addPropertyOverride` or prefix `path` with
// "Properties." (i.e. `Properties.TopicName`).
//
// If the override is nested, separate each nested level using a dot (.) in the path parameter.
// If there is an array as part of the nesting, specify the index in the path.
//
// To include a literal `.` in the property name, prefix with a `\`. In most
// programming languages you will need to write this as `"\\."` because the
// `\` itself will need to be escaped.
//
// For example,
// “`typescript
// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
// “`
// would add the overrides
// “`json
// "Properties": {
// "GlobalSecondaryIndexes": [
// {
// "Projection": {
// "NonKeyAttributes": [ "myattribute" ]
// ...
// }
// ...
// },
// {
// "ProjectionType": "INCLUDE"
// ...
// },
// ]
// ...
// }
// “`
//
// The `value` argument to `addOverride` will not be processed or translated
// in any way. Pass raw JSON values in here with the correct capitalization
// for CloudFormation. If you pass CDK classes or structs, they will be
// rendered with lowercased key names, and CloudFormation will reject the
// template.
// Experimental.
AddOverride(path *string, value interface{})
// Adds an override that deletes the value of a property from the resource definition.
// Experimental.
AddPropertyDeletionOverride(propertyPath *string)
// Adds an override to a resource property.
//
// Syntactic sugar for `addOverride("Properties.<...>", value)`.
// Experimental.
AddPropertyOverride(propertyPath *string, value interface{})
// Sets the deletion policy of the resource based on the removal policy specified.
//
// The Removal Policy controls what happens to this resource when it stops
// being managed by CloudFormation, either because you've removed it from the
// CDK application or because you've made a change that requires the resource
// to be replaced.
//
// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
// Experimental.
ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
// Returns a token for an runtime attribute of this resource.
//
// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
// in case there is no generated attribute.
// Experimental.
GetAtt(attributeName *string) awscdk.Reference
// Retrieve a value value from the CloudFormation Resource Metadata.
// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
//
// Note that this is a different set of metadata from CDK node metadata; this
// metadata ends up in the stack template under the resource, whereas CDK
// node metadata ends up in the Cloud Assembly.
//
// Experimental.
GetMetadata(key *string) interface{}
// Examines the CloudFormation resource and discloses attributes.
Inspect(inspector awscdk.TreeInspector)
// 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.
// Experimental.
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.
// Experimental.
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.
// Experimental.
OnValidate() *[]*string
// Overrides the auto-generated logical ID with a specific ID.
// Experimental.
OverrideLogicalId(newLogicalId *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.
// Experimental.
Prepare()
RenderProperties(props *map[string]interface{}) *map[string]interface{}
// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
//
// Returns: `true` if the resource should be included or `false` is the resource
// should be omitted.
// Experimental.
ShouldSynthesize() *bool
// 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.
// Experimental.
Synthesize(session awscdk.ISynthesisSession)
// Returns a string representation of this construct.
//
// Returns: a string representation of this resource.
// Experimental.
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.
// Experimental.
Validate() *[]*string
// Experimental.
ValidateProperties(_properties interface{})
}
A CloudFormation `AWS::Batch::JobDefinition`.
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
var options interface{}
var parameters interface{}
var tags interface{}
cfnJobDefinition := batch.NewCfnJobDefinition(this, jsii.String("MyCfnJobDefinition"), &cfnJobDefinitionProps{
type: jsii.String("type"),
// the properties below are optional
containerProperties: &containerPropertiesProperty{
image: jsii.String("image"),
// the properties below are optional
command: []*string{
jsii.String("command"),
},
environment: []interface{}{
&environmentProperty{
name: jsii.String("name"),
value: jsii.String("value"),
},
},
executionRoleArn: jsii.String("executionRoleArn"),
fargatePlatformConfiguration: &fargatePlatformConfigurationProperty{
platformVersion: jsii.String("platformVersion"),
},
instanceType: jsii.String("instanceType"),
jobRoleArn: jsii.String("jobRoleArn"),
linuxParameters: &linuxParametersProperty{
devices: []interface{}{
&deviceProperty{
containerPath: jsii.String("containerPath"),
hostPath: jsii.String("hostPath"),
permissions: []*string{
jsii.String("permissions"),
},
},
},
initProcessEnabled: jsii.Boolean(false),
maxSwap: jsii.Number(123),
sharedMemorySize: jsii.Number(123),
swappiness: jsii.Number(123),
tmpfs: []interface{}{
&tmpfsProperty{
containerPath: jsii.String("containerPath"),
size: jsii.Number(123),
// the properties below are optional
mountOptions: []*string{
jsii.String("mountOptions"),
},
},
},
},
logConfiguration: &logConfigurationProperty{
logDriver: jsii.String("logDriver"),
// the properties below are optional
options: options,
secretOptions: []interface{}{
&secretProperty{
name: jsii.String("name"),
valueFrom: jsii.String("valueFrom"),
},
},
},
memory: jsii.Number(123),
mountPoints: []interface{}{
&mountPointsProperty{
containerPath: jsii.String("containerPath"),
readOnly: jsii.Boolean(false),
sourceVolume: jsii.String("sourceVolume"),
},
},
networkConfiguration: &networkConfigurationProperty{
assignPublicIp: jsii.String("assignPublicIp"),
},
privileged: jsii.Boolean(false),
readonlyRootFilesystem: jsii.Boolean(false),
resourceRequirements: []interface{}{
&resourceRequirementProperty{
type: jsii.String("type"),
value: jsii.String("value"),
},
},
secrets: []interface{}{
&secretProperty{
name: jsii.String("name"),
valueFrom: jsii.String("valueFrom"),
},
},
ulimits: []interface{}{
&ulimitProperty{
hardLimit: jsii.Number(123),
name: jsii.String("name"),
softLimit: jsii.Number(123),
},
},
user: jsii.String("user"),
vcpus: jsii.Number(123),
volumes: []interface{}{
&volumesProperty{
efsVolumeConfiguration: &efsVolumeConfigurationProperty{
fileSystemId: jsii.String("fileSystemId"),
// the properties below are optional
authorizationConfig: &authorizationConfigProperty{
accessPointId: jsii.String("accessPointId"),
iam: jsii.String("iam"),
},
rootDirectory: jsii.String("rootDirectory"),
transitEncryption: jsii.String("transitEncryption"),
transitEncryptionPort: jsii.Number(123),
},
host: &volumesHostProperty{
sourcePath: jsii.String("sourcePath"),
},
name: jsii.String("name"),
},
},
},
jobDefinitionName: jsii.String("jobDefinitionName"),
nodeProperties: &nodePropertiesProperty{
mainNode: jsii.Number(123),
nodeRangeProperties: []interface{}{
&nodeRangePropertyProperty{
targetNodes: jsii.String("targetNodes"),
// the properties below are optional
container: &containerPropertiesProperty{
image: jsii.String("image"),
// the properties below are optional
command: []*string{
jsii.String("command"),
},
environment: []interface{}{
&environmentProperty{
name: jsii.String("name"),
value: jsii.String("value"),
},
},
executionRoleArn: jsii.String("executionRoleArn"),
fargatePlatformConfiguration: &fargatePlatformConfigurationProperty{
platformVersion: jsii.String("platformVersion"),
},
instanceType: jsii.String("instanceType"),
jobRoleArn: jsii.String("jobRoleArn"),
linuxParameters: &linuxParametersProperty{
devices: []interface{}{
&deviceProperty{
containerPath: jsii.String("containerPath"),
hostPath: jsii.String("hostPath"),
permissions: []*string{
jsii.String("permissions"),
},
},
},
initProcessEnabled: jsii.Boolean(false),
maxSwap: jsii.Number(123),
sharedMemorySize: jsii.Number(123),
swappiness: jsii.Number(123),
tmpfs: []interface{}{
&tmpfsProperty{
containerPath: jsii.String("containerPath"),
size: jsii.Number(123),
// the properties below are optional
mountOptions: []*string{
jsii.String("mountOptions"),
},
},
},
},
logConfiguration: &logConfigurationProperty{
logDriver: jsii.String("logDriver"),
// the properties below are optional
options: options,
secretOptions: []interface{}{
&secretProperty{
name: jsii.String("name"),
valueFrom: jsii.String("valueFrom"),
},
},
},
memory: jsii.Number(123),
mountPoints: []interface{}{
&mountPointsProperty{
containerPath: jsii.String("containerPath"),
readOnly: jsii.Boolean(false),
sourceVolume: jsii.String("sourceVolume"),
},
},
networkConfiguration: &networkConfigurationProperty{
assignPublicIp: jsii.String("assignPublicIp"),
},
privileged: jsii.Boolean(false),
readonlyRootFilesystem: jsii.Boolean(false),
resourceRequirements: []interface{}{
&resourceRequirementProperty{
type: jsii.String("type"),
value: jsii.String("value"),
},
},
secrets: []interface{}{
&secretProperty{
name: jsii.String("name"),
valueFrom: jsii.String("valueFrom"),
},
},
ulimits: []interface{}{
&ulimitProperty{
hardLimit: jsii.Number(123),
name: jsii.String("name"),
softLimit: jsii.Number(123),
},
},
user: jsii.String("user"),
vcpus: jsii.Number(123),
volumes: []interface{}{
&volumesProperty{
efsVolumeConfiguration: &efsVolumeConfigurationProperty{
fileSystemId: jsii.String("fileSystemId"),
// the properties below are optional
authorizationConfig: &authorizationConfigProperty{
accessPointId: jsii.String("accessPointId"),
iam: jsii.String("iam"),
},
rootDirectory: jsii.String("rootDirectory"),
transitEncryption: jsii.String("transitEncryption"),
transitEncryptionPort: jsii.Number(123),
},
host: &volumesHostProperty{
sourcePath: jsii.String("sourcePath"),
},
name: jsii.String("name"),
},
},
},
},
},
numNodes: jsii.Number(123),
},
parameters: parameters,
platformCapabilities: []*string{
jsii.String("platformCapabilities"),
},
propagateTags: jsii.Boolean(false),
retryStrategy: &retryStrategyProperty{
attempts: jsii.Number(123),
evaluateOnExit: []interface{}{
&evaluateOnExitProperty{
action: jsii.String("action"),
// the properties below are optional
onExitCode: jsii.String("onExitCode"),
onReason: jsii.String("onReason"),
onStatusReason: jsii.String("onStatusReason"),
},
},
},
schedulingPriority: jsii.Number(123),
tags: tags,
timeout: &timeoutProperty{
attemptDurationSeconds: jsii.Number(123),
},
})
func NewCfnJobDefinition ¶
func NewCfnJobDefinition(scope awscdk.Construct, id *string, props *CfnJobDefinitionProps) CfnJobDefinition
Create a new `AWS::Batch::JobDefinition`.
type CfnJobDefinitionProps ¶
type CfnJobDefinitionProps struct {
// `AWS::Batch::JobDefinition.Type`.
Type *string `json:"type" yaml:"type"`
// `AWS::Batch::JobDefinition.ContainerProperties`.
ContainerProperties interface{} `json:"containerProperties" yaml:"containerProperties"`
// `AWS::Batch::JobDefinition.JobDefinitionName`.
JobDefinitionName *string `json:"jobDefinitionName" yaml:"jobDefinitionName"`
// `AWS::Batch::JobDefinition.NodeProperties`.
NodeProperties interface{} `json:"nodeProperties" yaml:"nodeProperties"`
// `AWS::Batch::JobDefinition.Parameters`.
Parameters interface{} `json:"parameters" yaml:"parameters"`
// `AWS::Batch::JobDefinition.PlatformCapabilities`.
PlatformCapabilities *[]*string `json:"platformCapabilities" yaml:"platformCapabilities"`
// `AWS::Batch::JobDefinition.PropagateTags`.
PropagateTags interface{} `json:"propagateTags" yaml:"propagateTags"`
// `AWS::Batch::JobDefinition.RetryStrategy`.
RetryStrategy interface{} `json:"retryStrategy" yaml:"retryStrategy"`
// `AWS::Batch::JobDefinition.SchedulingPriority`.
SchedulingPriority *float64 `json:"schedulingPriority" yaml:"schedulingPriority"`
// `AWS::Batch::JobDefinition.Tags`.
Tags interface{} `json:"tags" yaml:"tags"`
// `AWS::Batch::JobDefinition.Timeout`.
Timeout interface{} `json:"timeout" yaml:"timeout"`
}
Properties for defining a `CfnJobDefinition`.
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
var options interface{}
var parameters interface{}
var tags interface{}
cfnJobDefinitionProps := &cfnJobDefinitionProps{
type: jsii.String("type"),
// the properties below are optional
containerProperties: &containerPropertiesProperty{
image: jsii.String("image"),
// the properties below are optional
command: []*string{
jsii.String("command"),
},
environment: []interface{}{
&environmentProperty{
name: jsii.String("name"),
value: jsii.String("value"),
},
},
executionRoleArn: jsii.String("executionRoleArn"),
fargatePlatformConfiguration: &fargatePlatformConfigurationProperty{
platformVersion: jsii.String("platformVersion"),
},
instanceType: jsii.String("instanceType"),
jobRoleArn: jsii.String("jobRoleArn"),
linuxParameters: &linuxParametersProperty{
devices: []interface{}{
&deviceProperty{
containerPath: jsii.String("containerPath"),
hostPath: jsii.String("hostPath"),
permissions: []*string{
jsii.String("permissions"),
},
},
},
initProcessEnabled: jsii.Boolean(false),
maxSwap: jsii.Number(123),
sharedMemorySize: jsii.Number(123),
swappiness: jsii.Number(123),
tmpfs: []interface{}{
&tmpfsProperty{
containerPath: jsii.String("containerPath"),
size: jsii.Number(123),
// the properties below are optional
mountOptions: []*string{
jsii.String("mountOptions"),
},
},
},
},
logConfiguration: &logConfigurationProperty{
logDriver: jsii.String("logDriver"),
// the properties below are optional
options: options,
secretOptions: []interface{}{
&secretProperty{
name: jsii.String("name"),
valueFrom: jsii.String("valueFrom"),
},
},
},
memory: jsii.Number(123),
mountPoints: []interface{}{
&mountPointsProperty{
containerPath: jsii.String("containerPath"),
readOnly: jsii.Boolean(false),
sourceVolume: jsii.String("sourceVolume"),
},
},
networkConfiguration: &networkConfigurationProperty{
assignPublicIp: jsii.String("assignPublicIp"),
},
privileged: jsii.Boolean(false),
readonlyRootFilesystem: jsii.Boolean(false),
resourceRequirements: []interface{}{
&resourceRequirementProperty{
type: jsii.String("type"),
value: jsii.String("value"),
},
},
secrets: []interface{}{
&secretProperty{
name: jsii.String("name"),
valueFrom: jsii.String("valueFrom"),
},
},
ulimits: []interface{}{
&ulimitProperty{
hardLimit: jsii.Number(123),
name: jsii.String("name"),
softLimit: jsii.Number(123),
},
},
user: jsii.String("user"),
vcpus: jsii.Number(123),
volumes: []interface{}{
&volumesProperty{
efsVolumeConfiguration: &efsVolumeConfigurationProperty{
fileSystemId: jsii.String("fileSystemId"),
// the properties below are optional
authorizationConfig: &authorizationConfigProperty{
accessPointId: jsii.String("accessPointId"),
iam: jsii.String("iam"),
},
rootDirectory: jsii.String("rootDirectory"),
transitEncryption: jsii.String("transitEncryption"),
transitEncryptionPort: jsii.Number(123),
},
host: &volumesHostProperty{
sourcePath: jsii.String("sourcePath"),
},
name: jsii.String("name"),
},
},
},
jobDefinitionName: jsii.String("jobDefinitionName"),
nodeProperties: &nodePropertiesProperty{
mainNode: jsii.Number(123),
nodeRangeProperties: []interface{}{
&nodeRangePropertyProperty{
targetNodes: jsii.String("targetNodes"),
// the properties below are optional
container: &containerPropertiesProperty{
image: jsii.String("image"),
// the properties below are optional
command: []*string{
jsii.String("command"),
},
environment: []interface{}{
&environmentProperty{
name: jsii.String("name"),
value: jsii.String("value"),
},
},
executionRoleArn: jsii.String("executionRoleArn"),
fargatePlatformConfiguration: &fargatePlatformConfigurationProperty{
platformVersion: jsii.String("platformVersion"),
},
instanceType: jsii.String("instanceType"),
jobRoleArn: jsii.String("jobRoleArn"),
linuxParameters: &linuxParametersProperty{
devices: []interface{}{
&deviceProperty{
containerPath: jsii.String("containerPath"),
hostPath: jsii.String("hostPath"),
permissions: []*string{
jsii.String("permissions"),
},
},
},
initProcessEnabled: jsii.Boolean(false),
maxSwap: jsii.Number(123),
sharedMemorySize: jsii.Number(123),
swappiness: jsii.Number(123),
tmpfs: []interface{}{
&tmpfsProperty{
containerPath: jsii.String("containerPath"),
size: jsii.Number(123),
// the properties below are optional
mountOptions: []*string{
jsii.String("mountOptions"),
},
},
},
},
logConfiguration: &logConfigurationProperty{
logDriver: jsii.String("logDriver"),
// the properties below are optional
options: options,
secretOptions: []interface{}{
&secretProperty{
name: jsii.String("name"),
valueFrom: jsii.String("valueFrom"),
},
},
},
memory: jsii.Number(123),
mountPoints: []interface{}{
&mountPointsProperty{
containerPath: jsii.String("containerPath"),
readOnly: jsii.Boolean(false),
sourceVolume: jsii.String("sourceVolume"),
},
},
networkConfiguration: &networkConfigurationProperty{
assignPublicIp: jsii.String("assignPublicIp"),
},
privileged: jsii.Boolean(false),
readonlyRootFilesystem: jsii.Boolean(false),
resourceRequirements: []interface{}{
&resourceRequirementProperty{
type: jsii.String("type"),
value: jsii.String("value"),
},
},
secrets: []interface{}{
&secretProperty{
name: jsii.String("name"),
valueFrom: jsii.String("valueFrom"),
},
},
ulimits: []interface{}{
&ulimitProperty{
hardLimit: jsii.Number(123),
name: jsii.String("name"),
softLimit: jsii.Number(123),
},
},
user: jsii.String("user"),
vcpus: jsii.Number(123),
volumes: []interface{}{
&volumesProperty{
efsVolumeConfiguration: &efsVolumeConfigurationProperty{
fileSystemId: jsii.String("fileSystemId"),
// the properties below are optional
authorizationConfig: &authorizationConfigProperty{
accessPointId: jsii.String("accessPointId"),
iam: jsii.String("iam"),
},
rootDirectory: jsii.String("rootDirectory"),
transitEncryption: jsii.String("transitEncryption"),
transitEncryptionPort: jsii.Number(123),
},
host: &volumesHostProperty{
sourcePath: jsii.String("sourcePath"),
},
name: jsii.String("name"),
},
},
},
},
},
numNodes: jsii.Number(123),
},
parameters: parameters,
platformCapabilities: []*string{
jsii.String("platformCapabilities"),
},
propagateTags: jsii.Boolean(false),
retryStrategy: &retryStrategyProperty{
attempts: jsii.Number(123),
evaluateOnExit: []interface{}{
&evaluateOnExitProperty{
action: jsii.String("action"),
// the properties below are optional
onExitCode: jsii.String("onExitCode"),
onReason: jsii.String("onReason"),
onStatusReason: jsii.String("onStatusReason"),
},
},
},
schedulingPriority: jsii.Number(123),
tags: tags,
timeout: &timeoutProperty{
attemptDurationSeconds: jsii.Number(123),
},
}
type CfnJobDefinition_AuthorizationConfigProperty ¶
type CfnJobDefinition_AuthorizationConfigProperty struct {
// `CfnJobDefinition.AuthorizationConfigProperty.AccessPointId`.
AccessPointId *string `json:"accessPointId" yaml:"accessPointId"`
// `CfnJobDefinition.AuthorizationConfigProperty.Iam`.
Iam *string `json:"iam" yaml:"iam"`
}
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
authorizationConfigProperty := &authorizationConfigProperty{
accessPointId: jsii.String("accessPointId"),
iam: jsii.String("iam"),
}
type CfnJobDefinition_ContainerPropertiesProperty ¶
type CfnJobDefinition_ContainerPropertiesProperty struct {
// `CfnJobDefinition.ContainerPropertiesProperty.Image`.
Image *string `json:"image" yaml:"image"`
// `CfnJobDefinition.ContainerPropertiesProperty.Command`.
Command *[]*string `json:"command" yaml:"command"`
// `CfnJobDefinition.ContainerPropertiesProperty.Environment`.
Environment interface{} `json:"environment" yaml:"environment"`
// `CfnJobDefinition.ContainerPropertiesProperty.ExecutionRoleArn`.
ExecutionRoleArn *string `json:"executionRoleArn" yaml:"executionRoleArn"`
// `CfnJobDefinition.ContainerPropertiesProperty.FargatePlatformConfiguration`.
FargatePlatformConfiguration interface{} `json:"fargatePlatformConfiguration" yaml:"fargatePlatformConfiguration"`
// `CfnJobDefinition.ContainerPropertiesProperty.InstanceType`.
InstanceType *string `json:"instanceType" yaml:"instanceType"`
// `CfnJobDefinition.ContainerPropertiesProperty.JobRoleArn`.
JobRoleArn *string `json:"jobRoleArn" yaml:"jobRoleArn"`
// `CfnJobDefinition.ContainerPropertiesProperty.LinuxParameters`.
LinuxParameters interface{} `json:"linuxParameters" yaml:"linuxParameters"`
// `CfnJobDefinition.ContainerPropertiesProperty.LogConfiguration`.
LogConfiguration interface{} `json:"logConfiguration" yaml:"logConfiguration"`
// `CfnJobDefinition.ContainerPropertiesProperty.Memory`.
Memory *float64 `json:"memory" yaml:"memory"`
// `CfnJobDefinition.ContainerPropertiesProperty.MountPoints`.
MountPoints interface{} `json:"mountPoints" yaml:"mountPoints"`
// `CfnJobDefinition.ContainerPropertiesProperty.NetworkConfiguration`.
NetworkConfiguration interface{} `json:"networkConfiguration" yaml:"networkConfiguration"`
// `CfnJobDefinition.ContainerPropertiesProperty.Privileged`.
Privileged interface{} `json:"privileged" yaml:"privileged"`
// `CfnJobDefinition.ContainerPropertiesProperty.ReadonlyRootFilesystem`.
ReadonlyRootFilesystem interface{} `json:"readonlyRootFilesystem" yaml:"readonlyRootFilesystem"`
// `CfnJobDefinition.ContainerPropertiesProperty.ResourceRequirements`.
ResourceRequirements interface{} `json:"resourceRequirements" yaml:"resourceRequirements"`
// `CfnJobDefinition.ContainerPropertiesProperty.Secrets`.
Secrets interface{} `json:"secrets" yaml:"secrets"`
// `CfnJobDefinition.ContainerPropertiesProperty.Ulimits`.
Ulimits interface{} `json:"ulimits" yaml:"ulimits"`
// `CfnJobDefinition.ContainerPropertiesProperty.User`.
User *string `json:"user" yaml:"user"`
// `CfnJobDefinition.ContainerPropertiesProperty.Vcpus`.
Vcpus *float64 `json:"vcpus" yaml:"vcpus"`
// `CfnJobDefinition.ContainerPropertiesProperty.Volumes`.
Volumes interface{} `json:"volumes" yaml:"volumes"`
}
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
var options interface{}
containerPropertiesProperty := &containerPropertiesProperty{
image: jsii.String("image"),
// the properties below are optional
command: []*string{
jsii.String("command"),
},
environment: []interface{}{
&environmentProperty{
name: jsii.String("name"),
value: jsii.String("value"),
},
},
executionRoleArn: jsii.String("executionRoleArn"),
fargatePlatformConfiguration: &fargatePlatformConfigurationProperty{
platformVersion: jsii.String("platformVersion"),
},
instanceType: jsii.String("instanceType"),
jobRoleArn: jsii.String("jobRoleArn"),
linuxParameters: &linuxParametersProperty{
devices: []interface{}{
&deviceProperty{
containerPath: jsii.String("containerPath"),
hostPath: jsii.String("hostPath"),
permissions: []*string{
jsii.String("permissions"),
},
},
},
initProcessEnabled: jsii.Boolean(false),
maxSwap: jsii.Number(123),
sharedMemorySize: jsii.Number(123),
swappiness: jsii.Number(123),
tmpfs: []interface{}{
&tmpfsProperty{
containerPath: jsii.String("containerPath"),
size: jsii.Number(123),
// the properties below are optional
mountOptions: []*string{
jsii.String("mountOptions"),
},
},
},
},
logConfiguration: &logConfigurationProperty{
logDriver: jsii.String("logDriver"),
// the properties below are optional
options: options,
secretOptions: []interface{}{
&secretProperty{
name: jsii.String("name"),
valueFrom: jsii.String("valueFrom"),
},
},
},
memory: jsii.Number(123),
mountPoints: []interface{}{
&mountPointsProperty{
containerPath: jsii.String("containerPath"),
readOnly: jsii.Boolean(false),
sourceVolume: jsii.String("sourceVolume"),
},
},
networkConfiguration: &networkConfigurationProperty{
assignPublicIp: jsii.String("assignPublicIp"),
},
privileged: jsii.Boolean(false),
readonlyRootFilesystem: jsii.Boolean(false),
resourceRequirements: []interface{}{
&resourceRequirementProperty{
type: jsii.String("type"),
value: jsii.String("value"),
},
},
secrets: []interface{}{
&secretProperty{
name: jsii.String("name"),
valueFrom: jsii.String("valueFrom"),
},
},
ulimits: []interface{}{
&ulimitProperty{
hardLimit: jsii.Number(123),
name: jsii.String("name"),
softLimit: jsii.Number(123),
},
},
user: jsii.String("user"),
vcpus: jsii.Number(123),
volumes: []interface{}{
&volumesProperty{
efsVolumeConfiguration: &efsVolumeConfigurationProperty{
fileSystemId: jsii.String("fileSystemId"),
// the properties below are optional
authorizationConfig: &authorizationConfigProperty{
accessPointId: jsii.String("accessPointId"),
iam: jsii.String("iam"),
},
rootDirectory: jsii.String("rootDirectory"),
transitEncryption: jsii.String("transitEncryption"),
transitEncryptionPort: jsii.Number(123),
},
host: &volumesHostProperty{
sourcePath: jsii.String("sourcePath"),
},
name: jsii.String("name"),
},
},
}
type CfnJobDefinition_DeviceProperty ¶
type CfnJobDefinition_DeviceProperty struct {
// `CfnJobDefinition.DeviceProperty.ContainerPath`.
ContainerPath *string `json:"containerPath" yaml:"containerPath"`
// `CfnJobDefinition.DeviceProperty.HostPath`.
HostPath *string `json:"hostPath" yaml:"hostPath"`
// `CfnJobDefinition.DeviceProperty.Permissions`.
Permissions *[]*string `json:"permissions" yaml:"permissions"`
}
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
deviceProperty := &deviceProperty{
containerPath: jsii.String("containerPath"),
hostPath: jsii.String("hostPath"),
permissions: []*string{
jsii.String("permissions"),
},
}
type CfnJobDefinition_EfsVolumeConfigurationProperty ¶
type CfnJobDefinition_EfsVolumeConfigurationProperty struct {
// `CfnJobDefinition.EfsVolumeConfigurationProperty.FileSystemId`.
FileSystemId *string `json:"fileSystemId" yaml:"fileSystemId"`
// `CfnJobDefinition.EfsVolumeConfigurationProperty.AuthorizationConfig`.
AuthorizationConfig interface{} `json:"authorizationConfig" yaml:"authorizationConfig"`
// `CfnJobDefinition.EfsVolumeConfigurationProperty.RootDirectory`.
RootDirectory *string `json:"rootDirectory" yaml:"rootDirectory"`
// `CfnJobDefinition.EfsVolumeConfigurationProperty.TransitEncryption`.
TransitEncryption *string `json:"transitEncryption" yaml:"transitEncryption"`
// `CfnJobDefinition.EfsVolumeConfigurationProperty.TransitEncryptionPort`.
TransitEncryptionPort *float64 `json:"transitEncryptionPort" yaml:"transitEncryptionPort"`
}
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
efsVolumeConfigurationProperty := &efsVolumeConfigurationProperty{
fileSystemId: jsii.String("fileSystemId"),
// the properties below are optional
authorizationConfig: &authorizationConfigProperty{
accessPointId: jsii.String("accessPointId"),
iam: jsii.String("iam"),
},
rootDirectory: jsii.String("rootDirectory"),
transitEncryption: jsii.String("transitEncryption"),
transitEncryptionPort: jsii.Number(123),
}
type CfnJobDefinition_EnvironmentProperty ¶
type CfnJobDefinition_EnvironmentProperty struct {
// `CfnJobDefinition.EnvironmentProperty.Name`.
Name *string `json:"name" yaml:"name"`
// `CfnJobDefinition.EnvironmentProperty.Value`.
Value *string `json:"value" yaml:"value"`
}
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
environmentProperty := &environmentProperty{
name: jsii.String("name"),
value: jsii.String("value"),
}
type CfnJobDefinition_EvaluateOnExitProperty ¶
type CfnJobDefinition_EvaluateOnExitProperty struct {
// `CfnJobDefinition.EvaluateOnExitProperty.Action`.
Action *string `json:"action" yaml:"action"`
// `CfnJobDefinition.EvaluateOnExitProperty.OnExitCode`.
OnExitCode *string `json:"onExitCode" yaml:"onExitCode"`
// `CfnJobDefinition.EvaluateOnExitProperty.OnReason`.
OnReason *string `json:"onReason" yaml:"onReason"`
// `CfnJobDefinition.EvaluateOnExitProperty.OnStatusReason`.
OnStatusReason *string `json:"onStatusReason" yaml:"onStatusReason"`
}
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
evaluateOnExitProperty := &evaluateOnExitProperty{
action: jsii.String("action"),
// the properties below are optional
onExitCode: jsii.String("onExitCode"),
onReason: jsii.String("onReason"),
onStatusReason: jsii.String("onStatusReason"),
}
type CfnJobDefinition_FargatePlatformConfigurationProperty ¶
type CfnJobDefinition_FargatePlatformConfigurationProperty struct {
// `CfnJobDefinition.FargatePlatformConfigurationProperty.PlatformVersion`.
PlatformVersion *string `json:"platformVersion" yaml:"platformVersion"`
}
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
fargatePlatformConfigurationProperty := &fargatePlatformConfigurationProperty{
platformVersion: jsii.String("platformVersion"),
}
type CfnJobDefinition_LinuxParametersProperty ¶
type CfnJobDefinition_LinuxParametersProperty struct {
// `CfnJobDefinition.LinuxParametersProperty.Devices`.
Devices interface{} `json:"devices" yaml:"devices"`
// `CfnJobDefinition.LinuxParametersProperty.InitProcessEnabled`.
InitProcessEnabled interface{} `json:"initProcessEnabled" yaml:"initProcessEnabled"`
// `CfnJobDefinition.LinuxParametersProperty.MaxSwap`.
MaxSwap *float64 `json:"maxSwap" yaml:"maxSwap"`
SharedMemorySize *float64 `json:"sharedMemorySize" yaml:"sharedMemorySize"`
// `CfnJobDefinition.LinuxParametersProperty.Swappiness`.
Swappiness *float64 `json:"swappiness" yaml:"swappiness"`
// `CfnJobDefinition.LinuxParametersProperty.Tmpfs`.
Tmpfs interface{} `json:"tmpfs" yaml:"tmpfs"`
}
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
linuxParametersProperty := &linuxParametersProperty{
devices: []interface{}{
&deviceProperty{
containerPath: jsii.String("containerPath"),
hostPath: jsii.String("hostPath"),
permissions: []*string{
jsii.String("permissions"),
},
},
},
initProcessEnabled: jsii.Boolean(false),
maxSwap: jsii.Number(123),
sharedMemorySize: jsii.Number(123),
swappiness: jsii.Number(123),
tmpfs: []interface{}{
&tmpfsProperty{
containerPath: jsii.String("containerPath"),
size: jsii.Number(123),
// the properties below are optional
mountOptions: []*string{
jsii.String("mountOptions"),
},
},
},
}
type CfnJobDefinition_LogConfigurationProperty ¶
type CfnJobDefinition_LogConfigurationProperty struct {
// `CfnJobDefinition.LogConfigurationProperty.LogDriver`.
LogDriver *string `json:"logDriver" yaml:"logDriver"`
// `CfnJobDefinition.LogConfigurationProperty.Options`.
Options interface{} `json:"options" yaml:"options"`
// `CfnJobDefinition.LogConfigurationProperty.SecretOptions`.
SecretOptions interface{} `json:"secretOptions" yaml:"secretOptions"`
}
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
var options interface{}
logConfigurationProperty := &logConfigurationProperty{
logDriver: jsii.String("logDriver"),
// the properties below are optional
options: options,
secretOptions: []interface{}{
&secretProperty{
name: jsii.String("name"),
valueFrom: jsii.String("valueFrom"),
},
},
}
type CfnJobDefinition_MountPointsProperty ¶
type CfnJobDefinition_MountPointsProperty struct {
// `CfnJobDefinition.MountPointsProperty.ContainerPath`.
ContainerPath *string `json:"containerPath" yaml:"containerPath"`
// `CfnJobDefinition.MountPointsProperty.ReadOnly`.
ReadOnly interface{} `json:"readOnly" yaml:"readOnly"`
// `CfnJobDefinition.MountPointsProperty.SourceVolume`.
SourceVolume *string `json:"sourceVolume" yaml:"sourceVolume"`
}
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
mountPointsProperty := &mountPointsProperty{
containerPath: jsii.String("containerPath"),
readOnly: jsii.Boolean(false),
sourceVolume: jsii.String("sourceVolume"),
}
type CfnJobDefinition_NetworkConfigurationProperty ¶
type CfnJobDefinition_NetworkConfigurationProperty struct {
// `CfnJobDefinition.NetworkConfigurationProperty.AssignPublicIp`.
AssignPublicIp *string `json:"assignPublicIp" yaml:"assignPublicIp"`
}
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
networkConfigurationProperty := &networkConfigurationProperty{
assignPublicIp: jsii.String("assignPublicIp"),
}
type CfnJobDefinition_NodePropertiesProperty ¶
type CfnJobDefinition_NodePropertiesProperty struct {
// `CfnJobDefinition.NodePropertiesProperty.MainNode`.
MainNode *float64 `json:"mainNode" yaml:"mainNode"`
// `CfnJobDefinition.NodePropertiesProperty.NodeRangeProperties`.
NodeRangeProperties interface{} `json:"nodeRangeProperties" yaml:"nodeRangeProperties"`
// `CfnJobDefinition.NodePropertiesProperty.NumNodes`.
NumNodes *float64 `json:"numNodes" yaml:"numNodes"`
}
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
var options interface{}
nodePropertiesProperty := &nodePropertiesProperty{
mainNode: jsii.Number(123),
nodeRangeProperties: []interface{}{
&nodeRangePropertyProperty{
targetNodes: jsii.String("targetNodes"),
// the properties below are optional
container: &containerPropertiesProperty{
image: jsii.String("image"),
// the properties below are optional
command: []*string{
jsii.String("command"),
},
environment: []interface{}{
&environmentProperty{
name: jsii.String("name"),
value: jsii.String("value"),
},
},
executionRoleArn: jsii.String("executionRoleArn"),
fargatePlatformConfiguration: &fargatePlatformConfigurationProperty{
platformVersion: jsii.String("platformVersion"),
},
instanceType: jsii.String("instanceType"),
jobRoleArn: jsii.String("jobRoleArn"),
linuxParameters: &linuxParametersProperty{
devices: []interface{}{
&deviceProperty{
containerPath: jsii.String("containerPath"),
hostPath: jsii.String("hostPath"),
permissions: []*string{
jsii.String("permissions"),
},
},
},
initProcessEnabled: jsii.Boolean(false),
maxSwap: jsii.Number(123),
sharedMemorySize: jsii.Number(123),
swappiness: jsii.Number(123),
tmpfs: []interface{}{
&tmpfsProperty{
containerPath: jsii.String("containerPath"),
size: jsii.Number(123),
// the properties below are optional
mountOptions: []*string{
jsii.String("mountOptions"),
},
},
},
},
logConfiguration: &logConfigurationProperty{
logDriver: jsii.String("logDriver"),
// the properties below are optional
options: options,
secretOptions: []interface{}{
&secretProperty{
name: jsii.String("name"),
valueFrom: jsii.String("valueFrom"),
},
},
},
memory: jsii.Number(123),
mountPoints: []interface{}{
&mountPointsProperty{
containerPath: jsii.String("containerPath"),
readOnly: jsii.Boolean(false),
sourceVolume: jsii.String("sourceVolume"),
},
},
networkConfiguration: &networkConfigurationProperty{
assignPublicIp: jsii.String("assignPublicIp"),
},
privileged: jsii.Boolean(false),
readonlyRootFilesystem: jsii.Boolean(false),
resourceRequirements: []interface{}{
&resourceRequirementProperty{
type: jsii.String("type"),
value: jsii.String("value"),
},
},
secrets: []interface{}{
&secretProperty{
name: jsii.String("name"),
valueFrom: jsii.String("valueFrom"),
},
},
ulimits: []interface{}{
&ulimitProperty{
hardLimit: jsii.Number(123),
name: jsii.String("name"),
softLimit: jsii.Number(123),
},
},
user: jsii.String("user"),
vcpus: jsii.Number(123),
volumes: []interface{}{
&volumesProperty{
efsVolumeConfiguration: &efsVolumeConfigurationProperty{
fileSystemId: jsii.String("fileSystemId"),
// the properties below are optional
authorizationConfig: &authorizationConfigProperty{
accessPointId: jsii.String("accessPointId"),
iam: jsii.String("iam"),
},
rootDirectory: jsii.String("rootDirectory"),
transitEncryption: jsii.String("transitEncryption"),
transitEncryptionPort: jsii.Number(123),
},
host: &volumesHostProperty{
sourcePath: jsii.String("sourcePath"),
},
name: jsii.String("name"),
},
},
},
},
},
numNodes: jsii.Number(123),
}
type CfnJobDefinition_NodeRangePropertyProperty ¶
type CfnJobDefinition_NodeRangePropertyProperty struct {
// `CfnJobDefinition.NodeRangePropertyProperty.TargetNodes`.
TargetNodes *string `json:"targetNodes" yaml:"targetNodes"`
// `CfnJobDefinition.NodeRangePropertyProperty.Container`.
Container interface{} `json:"container" yaml:"container"`
}
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
var options interface{}
nodeRangePropertyProperty := &nodeRangePropertyProperty{
targetNodes: jsii.String("targetNodes"),
// the properties below are optional
container: &containerPropertiesProperty{
image: jsii.String("image"),
// the properties below are optional
command: []*string{
jsii.String("command"),
},
environment: []interface{}{
&environmentProperty{
name: jsii.String("name"),
value: jsii.String("value"),
},
},
executionRoleArn: jsii.String("executionRoleArn"),
fargatePlatformConfiguration: &fargatePlatformConfigurationProperty{
platformVersion: jsii.String("platformVersion"),
},
instanceType: jsii.String("instanceType"),
jobRoleArn: jsii.String("jobRoleArn"),
linuxParameters: &linuxParametersProperty{
devices: []interface{}{
&deviceProperty{
containerPath: jsii.String("containerPath"),
hostPath: jsii.String("hostPath"),
permissions: []*string{
jsii.String("permissions"),
},
},
},
initProcessEnabled: jsii.Boolean(false),
maxSwap: jsii.Number(123),
sharedMemorySize: jsii.Number(123),
swappiness: jsii.Number(123),
tmpfs: []interface{}{
&tmpfsProperty{
containerPath: jsii.String("containerPath"),
size: jsii.Number(123),
// the properties below are optional
mountOptions: []*string{
jsii.String("mountOptions"),
},
},
},
},
logConfiguration: &logConfigurationProperty{
logDriver: jsii.String("logDriver"),
// the properties below are optional
options: options,
secretOptions: []interface{}{
&secretProperty{
name: jsii.String("name"),
valueFrom: jsii.String("valueFrom"),
},
},
},
memory: jsii.Number(123),
mountPoints: []interface{}{
&mountPointsProperty{
containerPath: jsii.String("containerPath"),
readOnly: jsii.Boolean(false),
sourceVolume: jsii.String("sourceVolume"),
},
},
networkConfiguration: &networkConfigurationProperty{
assignPublicIp: jsii.String("assignPublicIp"),
},
privileged: jsii.Boolean(false),
readonlyRootFilesystem: jsii.Boolean(false),
resourceRequirements: []interface{}{
&resourceRequirementProperty{
type: jsii.String("type"),
value: jsii.String("value"),
},
},
secrets: []interface{}{
&secretProperty{
name: jsii.String("name"),
valueFrom: jsii.String("valueFrom"),
},
},
ulimits: []interface{}{
&ulimitProperty{
hardLimit: jsii.Number(123),
name: jsii.String("name"),
softLimit: jsii.Number(123),
},
},
user: jsii.String("user"),
vcpus: jsii.Number(123),
volumes: []interface{}{
&volumesProperty{
efsVolumeConfiguration: &efsVolumeConfigurationProperty{
fileSystemId: jsii.String("fileSystemId"),
// the properties below are optional
authorizationConfig: &authorizationConfigProperty{
accessPointId: jsii.String("accessPointId"),
iam: jsii.String("iam"),
},
rootDirectory: jsii.String("rootDirectory"),
transitEncryption: jsii.String("transitEncryption"),
transitEncryptionPort: jsii.Number(123),
},
host: &volumesHostProperty{
sourcePath: jsii.String("sourcePath"),
},
name: jsii.String("name"),
},
},
},
}
type CfnJobDefinition_ResourceRequirementProperty ¶
type CfnJobDefinition_ResourceRequirementProperty struct {
// `CfnJobDefinition.ResourceRequirementProperty.Type`.
Type *string `json:"type" yaml:"type"`
// `CfnJobDefinition.ResourceRequirementProperty.Value`.
Value *string `json:"value" yaml:"value"`
}
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
resourceRequirementProperty := &resourceRequirementProperty{
type: jsii.String("type"),
value: jsii.String("value"),
}
type CfnJobDefinition_RetryStrategyProperty ¶
type CfnJobDefinition_RetryStrategyProperty struct {
// `CfnJobDefinition.RetryStrategyProperty.Attempts`.
Attempts *float64 `json:"attempts" yaml:"attempts"`
// `CfnJobDefinition.RetryStrategyProperty.EvaluateOnExit`.
EvaluateOnExit interface{} `json:"evaluateOnExit" yaml:"evaluateOnExit"`
}
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
retryStrategyProperty := &retryStrategyProperty{
attempts: jsii.Number(123),
evaluateOnExit: []interface{}{
&evaluateOnExitProperty{
action: jsii.String("action"),
// the properties below are optional
onExitCode: jsii.String("onExitCode"),
onReason: jsii.String("onReason"),
onStatusReason: jsii.String("onStatusReason"),
},
},
}
type CfnJobDefinition_SecretProperty ¶
type CfnJobDefinition_SecretProperty struct {
// `CfnJobDefinition.SecretProperty.Name`.
Name *string `json:"name" yaml:"name"`
// `CfnJobDefinition.SecretProperty.ValueFrom`.
ValueFrom *string `json:"valueFrom" yaml:"valueFrom"`
}
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
secretProperty := &secretProperty{
name: jsii.String("name"),
valueFrom: jsii.String("valueFrom"),
}
type CfnJobDefinition_TimeoutProperty ¶
type CfnJobDefinition_TimeoutProperty struct {
// `CfnJobDefinition.TimeoutProperty.AttemptDurationSeconds`.
AttemptDurationSeconds *float64 `json:"attemptDurationSeconds" yaml:"attemptDurationSeconds"`
}
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
timeoutProperty := &timeoutProperty{
attemptDurationSeconds: jsii.Number(123),
}
type CfnJobDefinition_TmpfsProperty ¶
type CfnJobDefinition_TmpfsProperty struct {
// `CfnJobDefinition.TmpfsProperty.ContainerPath`.
ContainerPath *string `json:"containerPath" yaml:"containerPath"`
// `CfnJobDefinition.TmpfsProperty.Size`.
Size *float64 `json:"size" yaml:"size"`
// `CfnJobDefinition.TmpfsProperty.MountOptions`.
MountOptions *[]*string `json:"mountOptions" yaml:"mountOptions"`
}
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
tmpfsProperty := &tmpfsProperty{
containerPath: jsii.String("containerPath"),
size: jsii.Number(123),
// the properties below are optional
mountOptions: []*string{
jsii.String("mountOptions"),
},
}
type CfnJobDefinition_UlimitProperty ¶
type CfnJobDefinition_UlimitProperty struct {
// `CfnJobDefinition.UlimitProperty.HardLimit`.
HardLimit *float64 `json:"hardLimit" yaml:"hardLimit"`
// `CfnJobDefinition.UlimitProperty.Name`.
Name *string `json:"name" yaml:"name"`
// `CfnJobDefinition.UlimitProperty.SoftLimit`.
SoftLimit *float64 `json:"softLimit" yaml:"softLimit"`
}
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
ulimitProperty := &ulimitProperty{
hardLimit: jsii.Number(123),
name: jsii.String("name"),
softLimit: jsii.Number(123),
}
type CfnJobDefinition_VolumesHostProperty ¶
type CfnJobDefinition_VolumesHostProperty struct {
// `CfnJobDefinition.VolumesHostProperty.SourcePath`.
SourcePath *string `json:"sourcePath" yaml:"sourcePath"`
}
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
volumesHostProperty := &volumesHostProperty{
sourcePath: jsii.String("sourcePath"),
}
type CfnJobDefinition_VolumesProperty ¶
type CfnJobDefinition_VolumesProperty struct {
// `CfnJobDefinition.VolumesProperty.EfsVolumeConfiguration`.
EfsVolumeConfiguration interface{} `json:"efsVolumeConfiguration" yaml:"efsVolumeConfiguration"`
// `CfnJobDefinition.VolumesProperty.Host`.
Host interface{} `json:"host" yaml:"host"`
// `CfnJobDefinition.VolumesProperty.Name`.
Name *string `json:"name" yaml:"name"`
}
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
volumesProperty := &volumesProperty{
efsVolumeConfiguration: &efsVolumeConfigurationProperty{
fileSystemId: jsii.String("fileSystemId"),
// the properties below are optional
authorizationConfig: &authorizationConfigProperty{
accessPointId: jsii.String("accessPointId"),
iam: jsii.String("iam"),
},
rootDirectory: jsii.String("rootDirectory"),
transitEncryption: jsii.String("transitEncryption"),
transitEncryptionPort: jsii.Number(123),
},
host: &volumesHostProperty{
sourcePath: jsii.String("sourcePath"),
},
name: jsii.String("name"),
}
type CfnJobQueue ¶
type CfnJobQueue interface {
awscdk.CfnResource
awscdk.IInspectable
AttrJobQueueArn() *string
// Options for this resource, such as condition, update policy etc.
// Experimental.
CfnOptions() awscdk.ICfnResourceOptions
CfnProperties() *map[string]interface{}
// AWS resource type.
// Experimental.
CfnResourceType() *string
// `AWS::Batch::JobQueue.ComputeEnvironmentOrder`.
ComputeEnvironmentOrder() interface{}
SetComputeEnvironmentOrder(val interface{})
// Returns: the stack trace of the point where this Resource was created from, sourced
// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
// node +internal+ entries filtered.
// Experimental.
CreationStack() *[]*string
// `AWS::Batch::JobQueue.JobQueueName`.
JobQueueName() *string
SetJobQueueName(val *string)
// The logical ID for this CloudFormation stack element.
//
// The logical ID of the element
// is calculated from the path of the resource node in the construct tree.
//
// To override this value, use `overrideLogicalId(newLogicalId)`.
//
// Returns: the logical ID as a stringified token. This value will only get
// resolved during synthesis.
// Experimental.
LogicalId() *string
// The construct tree node associated with this construct.
// Experimental.
Node() awscdk.ConstructNode
// `AWS::Batch::JobQueue.Priority`.
Priority() *float64
SetPriority(val *float64)
// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
//
// If, by any chance, the intrinsic reference of a resource is not a string, you could
// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
// Experimental.
Ref() *string
// `AWS::Batch::JobQueue.SchedulingPolicyArn`.
SchedulingPolicyArn() *string
SetSchedulingPolicyArn(val *string)
// The stack in which this element is defined.
//
// CfnElements must be defined within a stack scope (directly or indirectly).
// Experimental.
Stack() awscdk.Stack
// `AWS::Batch::JobQueue.State`.
State() *string
SetState(val *string)
// `AWS::Batch::JobQueue.Tags`.
Tags() awscdk.TagManager
// Return properties modified after initiation.
//
// Resources that expose mutable properties should override this function to
// collect and return the properties object for this resource.
// Experimental.
UpdatedProperites() *map[string]interface{}
// Syntactic sugar for `addOverride(path, undefined)`.
// Experimental.
AddDeletionOverride(path *string)
// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
//
// This can be used for resources across stacks (or nested stack) boundaries
// and the dependency will automatically be transferred to the relevant scope.
// Experimental.
AddDependsOn(target awscdk.CfnResource)
// Add a value to the CloudFormation Resource Metadata.
// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
//
// Note that this is a different set of metadata from CDK node metadata; this
// metadata ends up in the stack template under the resource, whereas CDK
// node metadata ends up in the Cloud Assembly.
//
// Experimental.
AddMetadata(key *string, value interface{})
// Adds an override to the synthesized CloudFormation resource.
//
// To add a
// property override, either use `addPropertyOverride` or prefix `path` with
// "Properties." (i.e. `Properties.TopicName`).
//
// If the override is nested, separate each nested level using a dot (.) in the path parameter.
// If there is an array as part of the nesting, specify the index in the path.
//
// To include a literal `.` in the property name, prefix with a `\`. In most
// programming languages you will need to write this as `"\\."` because the
// `\` itself will need to be escaped.
//
// For example,
// “`typescript
// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
// “`
// would add the overrides
// “`json
// "Properties": {
// "GlobalSecondaryIndexes": [
// {
// "Projection": {
// "NonKeyAttributes": [ "myattribute" ]
// ...
// }
// ...
// },
// {
// "ProjectionType": "INCLUDE"
// ...
// },
// ]
// ...
// }
// “`
//
// The `value` argument to `addOverride` will not be processed or translated
// in any way. Pass raw JSON values in here with the correct capitalization
// for CloudFormation. If you pass CDK classes or structs, they will be
// rendered with lowercased key names, and CloudFormation will reject the
// template.
// Experimental.
AddOverride(path *string, value interface{})
// Adds an override that deletes the value of a property from the resource definition.
// Experimental.
AddPropertyDeletionOverride(propertyPath *string)
// Adds an override to a resource property.
//
// Syntactic sugar for `addOverride("Properties.<...>", value)`.
// Experimental.
AddPropertyOverride(propertyPath *string, value interface{})
// Sets the deletion policy of the resource based on the removal policy specified.
//
// The Removal Policy controls what happens to this resource when it stops
// being managed by CloudFormation, either because you've removed it from the
// CDK application or because you've made a change that requires the resource
// to be replaced.
//
// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
// Experimental.
ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
// Returns a token for an runtime attribute of this resource.
//
// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
// in case there is no generated attribute.
// Experimental.
GetAtt(attributeName *string) awscdk.Reference
// Retrieve a value value from the CloudFormation Resource Metadata.
// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
//
// Note that this is a different set of metadata from CDK node metadata; this
// metadata ends up in the stack template under the resource, whereas CDK
// node metadata ends up in the Cloud Assembly.
//
// Experimental.
GetMetadata(key *string) interface{}
// Examines the CloudFormation resource and discloses attributes.
Inspect(inspector awscdk.TreeInspector)
// 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.
// Experimental.
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.
// Experimental.
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.
// Experimental.
OnValidate() *[]*string
// Overrides the auto-generated logical ID with a specific ID.
// Experimental.
OverrideLogicalId(newLogicalId *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.
// Experimental.
Prepare()
RenderProperties(props *map[string]interface{}) *map[string]interface{}
// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
//
// Returns: `true` if the resource should be included or `false` is the resource
// should be omitted.
// Experimental.
ShouldSynthesize() *bool
// 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.
// Experimental.
Synthesize(session awscdk.ISynthesisSession)
// Returns a string representation of this construct.
//
// Returns: a string representation of this resource.
// Experimental.
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.
// Experimental.
Validate() *[]*string
// Experimental.
ValidateProperties(_properties interface{})
}
A CloudFormation `AWS::Batch::JobQueue`.
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
cfnJobQueue := batch.NewCfnJobQueue(this, jsii.String("MyCfnJobQueue"), &cfnJobQueueProps{
computeEnvironmentOrder: []interface{}{
&computeEnvironmentOrderProperty{
computeEnvironment: jsii.String("computeEnvironment"),
order: jsii.Number(123),
},
},
priority: jsii.Number(123),
// the properties below are optional
jobQueueName: jsii.String("jobQueueName"),
schedulingPolicyArn: jsii.String("schedulingPolicyArn"),
state: jsii.String("state"),
tags: map[string]*string{
"tagsKey": jsii.String("tags"),
},
})
func NewCfnJobQueue ¶
func NewCfnJobQueue(scope awscdk.Construct, id *string, props *CfnJobQueueProps) CfnJobQueue
Create a new `AWS::Batch::JobQueue`.
type CfnJobQueueProps ¶
type CfnJobQueueProps struct {
// `AWS::Batch::JobQueue.ComputeEnvironmentOrder`.
ComputeEnvironmentOrder interface{} `json:"computeEnvironmentOrder" yaml:"computeEnvironmentOrder"`
// `AWS::Batch::JobQueue.Priority`.
Priority *float64 `json:"priority" yaml:"priority"`
// `AWS::Batch::JobQueue.JobQueueName`.
JobQueueName *string `json:"jobQueueName" yaml:"jobQueueName"`
// `AWS::Batch::JobQueue.SchedulingPolicyArn`.
SchedulingPolicyArn *string `json:"schedulingPolicyArn" yaml:"schedulingPolicyArn"`
// `AWS::Batch::JobQueue.State`.
State *string `json:"state" yaml:"state"`
// `AWS::Batch::JobQueue.Tags`.
Tags *map[string]*string `json:"tags" yaml:"tags"`
}
Properties for defining a `CfnJobQueue`.
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
cfnJobQueueProps := &cfnJobQueueProps{
computeEnvironmentOrder: []interface{}{
&computeEnvironmentOrderProperty{
computeEnvironment: jsii.String("computeEnvironment"),
order: jsii.Number(123),
},
},
priority: jsii.Number(123),
// the properties below are optional
jobQueueName: jsii.String("jobQueueName"),
schedulingPolicyArn: jsii.String("schedulingPolicyArn"),
state: jsii.String("state"),
tags: map[string]*string{
"tagsKey": jsii.String("tags"),
},
}
type CfnJobQueue_ComputeEnvironmentOrderProperty ¶
type CfnJobQueue_ComputeEnvironmentOrderProperty struct {
// `CfnJobQueue.ComputeEnvironmentOrderProperty.ComputeEnvironment`.
ComputeEnvironment *string `json:"computeEnvironment" yaml:"computeEnvironment"`
// `CfnJobQueue.ComputeEnvironmentOrderProperty.Order`.
Order *float64 `json:"order" yaml:"order"`
}
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
computeEnvironmentOrderProperty := &computeEnvironmentOrderProperty{
computeEnvironment: jsii.String("computeEnvironment"),
order: jsii.Number(123),
}
type CfnSchedulingPolicy ¶
type CfnSchedulingPolicy interface {
awscdk.CfnResource
awscdk.IInspectable
AttrArn() *string
// Options for this resource, such as condition, update policy etc.
// Experimental.
CfnOptions() awscdk.ICfnResourceOptions
CfnProperties() *map[string]interface{}
// AWS resource type.
// Experimental.
CfnResourceType() *string
// Returns: the stack trace of the point where this Resource was created from, sourced
// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
// node +internal+ entries filtered.
// Experimental.
CreationStack() *[]*string
// `AWS::Batch::SchedulingPolicy.FairsharePolicy`.
// The logical ID for this CloudFormation stack element.
//
// The logical ID of the element
// is calculated from the path of the resource node in the construct tree.
//
// To override this value, use `overrideLogicalId(newLogicalId)`.
//
// Returns: the logical ID as a stringified token. This value will only get
// resolved during synthesis.
// Experimental.
LogicalId() *string
// `AWS::Batch::SchedulingPolicy.Name`.
Name() *string
SetName(val *string)
// The construct tree node associated with this construct.
// Experimental.
Node() awscdk.ConstructNode
// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
//
// If, by any chance, the intrinsic reference of a resource is not a string, you could
// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
// Experimental.
Ref() *string
// The stack in which this element is defined.
//
// CfnElements must be defined within a stack scope (directly or indirectly).
// Experimental.
Stack() awscdk.Stack
// `AWS::Batch::SchedulingPolicy.Tags`.
Tags() awscdk.TagManager
// Return properties modified after initiation.
//
// Resources that expose mutable properties should override this function to
// collect and return the properties object for this resource.
// Experimental.
UpdatedProperites() *map[string]interface{}
// Syntactic sugar for `addOverride(path, undefined)`.
// Experimental.
AddDeletionOverride(path *string)
// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
//
// This can be used for resources across stacks (or nested stack) boundaries
// and the dependency will automatically be transferred to the relevant scope.
// Experimental.
AddDependsOn(target awscdk.CfnResource)
// Add a value to the CloudFormation Resource Metadata.
// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
//
// Note that this is a different set of metadata from CDK node metadata; this
// metadata ends up in the stack template under the resource, whereas CDK
// node metadata ends up in the Cloud Assembly.
//
// Experimental.
AddMetadata(key *string, value interface{})
// Adds an override to the synthesized CloudFormation resource.
//
// To add a
// property override, either use `addPropertyOverride` or prefix `path` with
// "Properties." (i.e. `Properties.TopicName`).
//
// If the override is nested, separate each nested level using a dot (.) in the path parameter.
// If there is an array as part of the nesting, specify the index in the path.
//
// To include a literal `.` in the property name, prefix with a `\`. In most
// programming languages you will need to write this as `"\\."` because the
// `\` itself will need to be escaped.
//
// For example,
// “`typescript
// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
// “`
// would add the overrides
// “`json
// "Properties": {
// "GlobalSecondaryIndexes": [
// {
// "Projection": {
// "NonKeyAttributes": [ "myattribute" ]
// ...
// }
// ...
// },
// {
// "ProjectionType": "INCLUDE"
// ...
// },
// ]
// ...
// }
// “`
//
// The `value` argument to `addOverride` will not be processed or translated
// in any way. Pass raw JSON values in here with the correct capitalization
// for CloudFormation. If you pass CDK classes or structs, they will be
// rendered with lowercased key names, and CloudFormation will reject the
// template.
// Experimental.
AddOverride(path *string, value interface{})
// Adds an override that deletes the value of a property from the resource definition.
// Experimental.
AddPropertyDeletionOverride(propertyPath *string)
// Adds an override to a resource property.
//
// Syntactic sugar for `addOverride("Properties.<...>", value)`.
// Experimental.
AddPropertyOverride(propertyPath *string, value interface{})
// Sets the deletion policy of the resource based on the removal policy specified.
//
// The Removal Policy controls what happens to this resource when it stops
// being managed by CloudFormation, either because you've removed it from the
// CDK application or because you've made a change that requires the resource
// to be replaced.
//
// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
// Experimental.
ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
// Returns a token for an runtime attribute of this resource.
//
// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
// in case there is no generated attribute.
// Experimental.
GetAtt(attributeName *string) awscdk.Reference
// Retrieve a value value from the CloudFormation Resource Metadata.
// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
//
// Note that this is a different set of metadata from CDK node metadata; this
// metadata ends up in the stack template under the resource, whereas CDK
// node metadata ends up in the Cloud Assembly.
//
// Experimental.
GetMetadata(key *string) interface{}
// Examines the CloudFormation resource and discloses attributes.
Inspect(inspector awscdk.TreeInspector)
// 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.
// Experimental.
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.
// Experimental.
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.
// Experimental.
OnValidate() *[]*string
// Overrides the auto-generated logical ID with a specific ID.
// Experimental.
OverrideLogicalId(newLogicalId *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.
// Experimental.
Prepare()
RenderProperties(props *map[string]interface{}) *map[string]interface{}
// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
//
// Returns: `true` if the resource should be included or `false` is the resource
// should be omitted.
// Experimental.
ShouldSynthesize() *bool
// 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.
// Experimental.
Synthesize(session awscdk.ISynthesisSession)
// Returns a string representation of this construct.
//
// Returns: a string representation of this resource.
// Experimental.
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.
// Experimental.
Validate() *[]*string
// Experimental.
ValidateProperties(_properties interface{})
}
A CloudFormation `AWS::Batch::SchedulingPolicy`.
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
cfnSchedulingPolicy := batch.NewCfnSchedulingPolicy(this, jsii.String("MyCfnSchedulingPolicy"), &cfnSchedulingPolicyProps{
fairsharePolicy: &fairsharePolicyProperty{
computeReservation: jsii.Number(123),
shareDecaySeconds: jsii.Number(123),
shareDistribution: []interface{}{
&shareAttributesProperty{
shareIdentifier: jsii.String("shareIdentifier"),
weightFactor: jsii.Number(123),
},
},
},
name: jsii.String("name"),
tags: map[string]*string{
"tagsKey": jsii.String("tags"),
},
})
func NewCfnSchedulingPolicy ¶
func NewCfnSchedulingPolicy(scope awscdk.Construct, id *string, props *CfnSchedulingPolicyProps) CfnSchedulingPolicy
Create a new `AWS::Batch::SchedulingPolicy`.
type CfnSchedulingPolicyProps ¶
type CfnSchedulingPolicyProps struct {
FairsharePolicy interface{} `json:"fairsharePolicy" yaml:"fairsharePolicy"`
// `AWS::Batch::SchedulingPolicy.Name`.
Name *string `json:"name" yaml:"name"`
// `AWS::Batch::SchedulingPolicy.Tags`.
Tags *map[string]*string `json:"tags" yaml:"tags"`
}
Properties for defining a `CfnSchedulingPolicy`.
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
cfnSchedulingPolicyProps := &cfnSchedulingPolicyProps{
fairsharePolicy: &fairsharePolicyProperty{
computeReservation: jsii.Number(123),
shareDecaySeconds: jsii.Number(123),
shareDistribution: []interface{}{
&shareAttributesProperty{
shareIdentifier: jsii.String("shareIdentifier"),
weightFactor: jsii.Number(123),
},
},
},
name: jsii.String("name"),
tags: map[string]*string{
"tagsKey": jsii.String("tags"),
},
}
type CfnSchedulingPolicy_FairsharePolicyProperty ¶
type CfnSchedulingPolicy_FairsharePolicyProperty struct {
ComputeReservation *float64 `json:"computeReservation" yaml:"computeReservation"`
ShareDecaySeconds *float64 `json:"shareDecaySeconds" yaml:"shareDecaySeconds"`
ShareDistribution interface{} `json:"shareDistribution" yaml:"shareDistribution"`
}
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
fairsharePolicyProperty := &fairsharePolicyProperty{
computeReservation: jsii.Number(123),
shareDecaySeconds: jsii.Number(123),
shareDistribution: []interface{}{
&shareAttributesProperty{
shareIdentifier: jsii.String("shareIdentifier"),
weightFactor: jsii.Number(123),
},
},
}
type CfnSchedulingPolicy_ShareAttributesProperty ¶
type CfnSchedulingPolicy_ShareAttributesProperty struct {
ShareIdentifier *string `json:"shareIdentifier" yaml:"shareIdentifier"`
WeightFactor *float64 `json:"weightFactor" yaml:"weightFactor"`
}
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
shareAttributesProperty := &shareAttributesProperty{
shareIdentifier: jsii.String("shareIdentifier"),
weightFactor: jsii.Number(123),
}
type ComputeEnvironment ¶
type ComputeEnvironment interface {
awscdk.Resource
IComputeEnvironment
// The ARN of this compute environment.
// Experimental.
ComputeEnvironmentArn() *string
// The name of this compute environment.
// Experimental.
ComputeEnvironmentName() *string
// The environment this resource belongs to.
//
// For resources that are created and managed by the CDK
// (generally, those created by creating new class instances like Role, Bucket, etc.),
// this is always the same as the environment of the stack they belong to;
// however, for imported resources
// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
// that might be different than the stack they were imported into.
// Experimental.
Env() *awscdk.ResourceEnvironment
// The construct tree node associated with this construct.
// Experimental.
Node() awscdk.ConstructNode
// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation 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 CloudFormation
// - a concrete name generated automatically during synthesis, in
// cross-environment scenarios.
// Experimental.
PhysicalName() *string
// The stack in which this resource is defined.
// Experimental.
Stack() awscdk.Stack
// Apply the given removal policy to this resource.
//
// The Removal Policy controls what happens to this resource when it stops
// being managed by CloudFormation, either because you've removed it from the
// CDK application or because you've made a change that requires the resource
// to be replaced.
//
// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
// Experimental.
ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
// Experimental.
GeneratePhysicalName() *string
// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
//
// Normally, this token will resolve to `arnAttr`, but if the resource is
// referenced across environments, `arnComponents` will be used to synthesize
// a concrete ARN with the resource's physical name. Make sure to reference
// `this.physicalName` in `arnComponents`.
// Experimental.
GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
//
// Normally, this token will resolve to `nameAttr`, but if the resource is
// referenced across environments, it will be resolved to `this.physicalName`,
// which will be a concrete name.
// Experimental.
GetResourceNameAttribute(nameAttr *string) *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.
// Experimental.
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.
// Experimental.
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.
// Experimental.
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.
// Experimental.
Prepare()
// 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.
// Experimental.
Synthesize(session awscdk.ISynthesisSession)
// Returns a string representation of this construct.
// Experimental.
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.
// Experimental.
Validate() *[]*string
}
Batch Compute Environment.
Defines a batch compute environment to run batch jobs on.
Example:
var vpc vpc
myComputeEnv := batch.NewComputeEnvironment(this, jsii.String("ComputeEnv"), &computeEnvironmentProps{
computeResources: &computeResources{
image: ecs.NewEcsOptimizedAmi(&ecsOptimizedAmiProps{
generation: ec2.amazonLinuxGeneration_AMAZON_LINUX_2,
}),
vpc: vpc,
},
})
Experimental.
func NewComputeEnvironment ¶
func NewComputeEnvironment(scope constructs.Construct, id *string, props *ComputeEnvironmentProps) ComputeEnvironment
Experimental.
type ComputeEnvironmentProps ¶
type ComputeEnvironmentProps struct {
// A name for the compute environment.
//
// Up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.
// Experimental.
ComputeEnvironmentName *string `json:"computeEnvironmentName" yaml:"computeEnvironmentName"`
// The details of the required compute resources for the managed compute environment.
//
// If specified, and this is an unmanaged compute environment, will throw an error.
//
// By default, AWS Batch managed compute environments use a recent, approved version of the
// Amazon ECS-optimized AMI for compute resources.
// Experimental.
ComputeResources *ComputeResources `json:"computeResources" yaml:"computeResources"`
// The state of the compute environment.
//
// If the state is set to true, then the compute
// environment accepts jobs from a queue and can scale out automatically based on queues.
// Experimental.
Enabled *bool `json:"enabled" yaml:"enabled"`
// Determines if AWS should manage the allocation of compute resources for processing jobs.
//
// If set to false, then you are in charge of providing the compute resource details.
// Experimental.
Managed *bool `json:"managed" yaml:"managed"`
// The IAM role used by Batch to make calls to other AWS services on your behalf for managing the resources that you use with the service.
//
// By default, this role is created for you using
// the AWS managed service policy for Batch.
// Experimental.
ServiceRole awsiam.IRole `json:"serviceRole" yaml:"serviceRole"`
}
Properties for creating a new Compute Environment.
Example:
var vpc vpc
myComputeEnv := batch.NewComputeEnvironment(this, jsii.String("ComputeEnv"), &computeEnvironmentProps{
computeResources: &computeResources{
image: ecs.NewEcsOptimizedAmi(&ecsOptimizedAmiProps{
generation: ec2.amazonLinuxGeneration_AMAZON_LINUX_2,
}),
vpc: vpc,
},
})
Experimental.
type ComputeResourceType ¶
type ComputeResourceType string
Property to specify if the compute environment uses On-Demand, SpotFleet, Fargate, or Fargate Spot compute resources.
Example:
vpc := ec2.NewVpc(this, jsii.String("VPC"))
spotEnvironment := batch.NewComputeEnvironment(this, jsii.String("MySpotEnvironment"), &computeEnvironmentProps{
computeResources: &computeResources{
type: batch.computeResourceType_SPOT,
bidPercentage: jsii.Number(75),
// Bids for resources at 75% of the on-demand price
vpc: vpc,
},
})
Experimental.
const ( // Resources will be EC2 On-Demand resources. // Experimental. ComputeResourceType_ON_DEMAND ComputeResourceType = "ON_DEMAND" // Resources will be EC2 SpotFleet resources. // Experimental. ComputeResourceType_SPOT ComputeResourceType = "SPOT" // Resources will be Fargate resources. // Experimental. ComputeResourceType_FARGATE ComputeResourceType = "FARGATE" // Resources will be Fargate Spot resources. // // Fargate Spot uses spare capacity in the AWS cloud to run your fault-tolerant, // time-flexible jobs at up to a 70% discount. If AWS needs the resources back, // jobs running on Fargate Spot will be interrupted with two minutes of notification. // Experimental. ComputeResourceType_FARGATE_SPOT ComputeResourceType = "FARGATE_SPOT" )
type ComputeResources ¶
type ComputeResources struct {
// The VPC network that all compute resources will be connected to.
// Experimental.
Vpc awsec2.IVpc `json:"vpc" yaml:"vpc"`
// The allocation strategy to use for the compute resource in case not enough instances of the best fitting instance type can be allocated.
//
// This could be due to availability of the instance type in
// the region or Amazon EC2 service limits. If this is not specified, the default for the EC2
// ComputeResourceType is BEST_FIT, which will use only the best fitting instance type, waiting for
// additional capacity if it's not available. This allocation strategy keeps costs lower but can limit
// scaling. If you are using Spot Fleets with BEST_FIT then the Spot Fleet IAM Role must be specified.
// BEST_FIT_PROGRESSIVE will select an additional instance type that is large enough to meet the
// requirements of the jobs in the queue, with a preference for an instance type with a lower cost.
// The default value for the SPOT instance type is SPOT_CAPACITY_OPTIMIZED, which is only available for
// for this type of compute resources and will select an additional instance type that is large enough
// to meet the requirements of the jobs in the queue, with a preference for an instance type that is
// less likely to be interrupted.
// Experimental.
AllocationStrategy AllocationStrategy `json:"allocationStrategy" yaml:"allocationStrategy"`
// This property will be ignored if you set the environment type to ON_DEMAND.
//
// The maximum percentage that a Spot Instance price can be when compared with the On-Demand price for
// that instance type before instances are launched. For example, if your maximum percentage is 20%,
// then the Spot price must be below 20% of the current On-Demand price for that EC2 instance. You always
// pay the lowest (market) price and never more than your maximum percentage. If you leave this field empty,
// the default value is 100% of the On-Demand price.
// Experimental.
BidPercentage *float64 `json:"bidPercentage" yaml:"bidPercentage"`
// Key-value pair tags to be applied to resources that are launched in the compute environment.
//
// For AWS Batch, these take the form of "String1": "String2", where String1 is the tag key and
// String2 is the tag value—for example, { "Name": "AWS Batch Instance - C4OnDemand" }.
// Experimental.
ComputeResourcesTags *map[string]*string `json:"computeResourcesTags" yaml:"computeResourcesTags"`
// The desired number of EC2 vCPUS in the compute environment.
// Experimental.
DesiredvCpus *float64 `json:"desiredvCpus" yaml:"desiredvCpus"`
// The EC2 key pair that is used for instances launched in the compute environment.
//
// If no key is defined, then SSH access is not allowed to provisioned compute resources.
// Experimental.
Ec2KeyPair *string `json:"ec2KeyPair" yaml:"ec2KeyPair"`
// The Amazon Machine Image (AMI) ID used for instances launched in the compute environment.
// Experimental.
Image awsec2.IMachineImage `json:"image" yaml:"image"`
// The Amazon ECS instance profile applied to Amazon EC2 instances in a compute environment.
//
// You can specify
// the short name or full Amazon Resource Name (ARN) of an instance profile. For example, ecsInstanceRole or
// arn:aws:iam::<aws_account_id>:instance-profile/ecsInstanceRole . For more information, see Amazon ECS
// Instance Role in the AWS Batch User Guide.
// Experimental.
InstanceRole *string `json:"instanceRole" yaml:"instanceRole"`
// The types of EC2 instances that may be launched in the compute environment.
//
// You can specify instance
// families to launch any instance type within those families (for example, c4 or p3), or you can specify
// specific sizes within a family (such as c4.8xlarge). You can also choose optimal to pick instance types
// (from the C, M, and R instance families) on the fly that match the demand of your job queues.
// Experimental.
InstanceTypes *[]awsec2.InstanceType `json:"instanceTypes" yaml:"instanceTypes"`
// An optional launch template to associate with your compute resources.
//
// For more information, see README file.
// Experimental.
LaunchTemplate *LaunchTemplateSpecification `json:"launchTemplate" yaml:"launchTemplate"`
// The maximum number of EC2 vCPUs that an environment can reach.
//
// Each vCPU is equivalent to
// 1,024 CPU shares. You must specify at least one vCPU.
// Experimental.
MaxvCpus *float64 `json:"maxvCpus" yaml:"maxvCpus"`
// The minimum number of EC2 vCPUs that an environment should maintain (even if the compute environment state is DISABLED).
//
// Each vCPU is equivalent to 1,024 CPU shares. By keeping this set to 0 you will not have instance time wasted when
// there is no work to be run. If you set this above zero you will maintain that number of vCPUs at all times.
// Experimental.
MinvCpus *float64 `json:"minvCpus" yaml:"minvCpus"`
// The Amazon EC2 placement group to associate with your compute resources.
// Experimental.
PlacementGroup *string `json:"placementGroup" yaml:"placementGroup"`
// The EC2 security group(s) associated with instances launched in the compute environment.
// Experimental.
SecurityGroups *[]awsec2.ISecurityGroup `json:"securityGroups" yaml:"securityGroups"`
// This property will be ignored if you set the environment type to ON_DEMAND.
//
// The Amazon Resource Name (ARN) of the Amazon EC2 Spot Fleet IAM role applied to a SPOT compute environment.
// For more information, see Amazon EC2 Spot Fleet Role in the AWS Batch User Guide.
// Experimental.
SpotFleetRole awsiam.IRole `json:"spotFleetRole" yaml:"spotFleetRole"`
// The type of compute environment: ON_DEMAND, SPOT, FARGATE, or FARGATE_SPOT.
// Experimental.
Type ComputeResourceType `json:"type" yaml:"type"`
// The VPC subnets into which the compute resources are launched.
// Experimental.
VpcSubnets *awsec2.SubnetSelection `json:"vpcSubnets" yaml:"vpcSubnets"`
}
Properties for defining the structure of the batch compute cluster.
Example:
var vpc vpc
myComputeEnv := batch.NewComputeEnvironment(this, jsii.String("ComputeEnv"), &computeEnvironmentProps{
computeResources: &computeResources{
image: ecs.NewEcsOptimizedAmi(&ecsOptimizedAmiProps{
generation: ec2.amazonLinuxGeneration_AMAZON_LINUX_2,
}),
vpc: vpc,
},
})
Experimental.
type ExposedSecret ¶
type ExposedSecret interface {
// Name of the option.
// Experimental.
OptionName() *string
// Experimental.
SetOptionName(val *string)
// ARN of the secret option.
// Experimental.
SecretArn() *string
// Experimental.
SetSecretArn(val *string)
}
Exposed secret for log configuration.
Example:
import ssm "github.com/aws/aws-cdk-go/awscdk"
batch.NewJobDefinition(this, jsii.String("job-def"), &jobDefinitionProps{
container: &jobDefinitionContainer{
image: ecs.ecrImage.fromRegistry(jsii.String("docker/whalesay")),
logConfiguration: &logConfiguration{
logDriver: batch.logDriver_AWSLOGS,
options: map[string]*string{
"awslogs-region": jsii.String("us-east-1"),
},
secretOptions: []exposedSecret{
batch.*exposedSecret.fromParametersStore(jsii.String("xyz"), ssm.stringParameter.fromStringParameterName(this, jsii.String("parameter"), jsii.String("xyz"))),
},
},
},
})
Experimental.
func ExposedSecret_FromParametersStore ¶
func ExposedSecret_FromParametersStore(optionName *string, parameter awsssm.IParameter) ExposedSecret
User Parameters Store Parameter. Experimental.
func ExposedSecret_FromSecretsManager ¶
func ExposedSecret_FromSecretsManager(optionName *string, secret awssecretsmanager.ISecret) ExposedSecret
Use Secrets Manager Secret. Experimental.
func NewExposedSecret ¶
func NewExposedSecret(optionName *string, secretArn *string) ExposedSecret
Experimental.
type IComputeEnvironment ¶
type IComputeEnvironment interface {
awscdk.IResource
// The ARN of this compute environment.
// Experimental.
ComputeEnvironmentArn() *string
// The name of this compute environment.
// Experimental.
ComputeEnvironmentName() *string
}
Properties of a compute environment. Experimental.
func ComputeEnvironment_FromComputeEnvironmentArn ¶
func ComputeEnvironment_FromComputeEnvironmentArn(scope constructs.Construct, id *string, computeEnvironmentArn *string) IComputeEnvironment
Fetches an existing batch compute environment by its amazon resource name. Experimental.
type IJobDefinition ¶
type IJobDefinition interface {
awscdk.IResource
// The ARN of this batch job definition.
// Experimental.
JobDefinitionArn() *string
// The name of the batch job definition.
// Experimental.
JobDefinitionName() *string
}
An interface representing a job definition - either a new one, created with the CDK, *using the {@link JobDefinition} class, or existing ones, referenced using the {@link JobDefinition.fromJobDefinitionArn} method. Experimental.
func JobDefinition_FromJobDefinitionArn ¶
func JobDefinition_FromJobDefinitionArn(scope constructs.Construct, id *string, jobDefinitionArn *string) IJobDefinition
Imports an existing batch job definition by its amazon resource name. Experimental.
func JobDefinition_FromJobDefinitionName ¶
func JobDefinition_FromJobDefinitionName(scope constructs.Construct, id *string, jobDefinitionName *string) IJobDefinition
Imports an existing batch job definition by its name.
If name is specified without a revision then the latest active revision is used. Experimental.
type IJobQueue ¶
type IJobQueue interface {
awscdk.IResource
// The ARN of this batch job queue.
// Experimental.
JobQueueArn() *string
// A name for the job queue.
//
// Up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.
// Experimental.
JobQueueName() *string
}
Properties of a Job Queue. Experimental.
func JobQueue_FromJobQueueArn ¶
func JobQueue_FromJobQueueArn(scope constructs.Construct, id *string, jobQueueArn *string) IJobQueue
Fetches an existing batch job queue by its amazon resource name. Experimental.
type IMultiNodeProps ¶
type IMultiNodeProps interface {
// The number of nodes associated with a multi-node parallel job.
// Experimental.
Count() *float64
// Experimental.
SetCount(c *float64)
// Specifies the node index for the main node of a multi-node parallel job.
//
// This node index value must be fewer than the number of nodes.
// Experimental.
MainNode() *float64
// Experimental.
SetMainNode(m *float64)
// A list of node ranges and their properties associated with a multi-node parallel job.
// Experimental.
RangeProps() *[]INodeRangeProps
// Experimental.
SetRangeProps(r *[]INodeRangeProps)
}
Properties for specifying multi-node properties for compute resources. Experimental.
type INodeRangeProps ¶
type INodeRangeProps interface {
// The container details for the node range.
// Experimental.
Container() *JobDefinitionContainer
// Experimental.
SetContainer(c *JobDefinitionContainer)
// The minimum node index value to apply this container definition against.
//
// You may nest node ranges, for example 0:10 and 4:5, in which case the 4:5 range properties override the 0:10 properties.
// Experimental.
FromNodeIndex() *float64
// Experimental.
SetFromNodeIndex(f *float64)
// The maximum node index value to apply this container definition against. If omitted, the highest value is used relative.
//
// to the number of nodes associated with the job. You may nest node ranges, for example 0:10 and 4:5,
// in which case the 4:5 range properties override the 0:10 properties.
// Experimental.
ToNodeIndex() *float64
// Experimental.
SetToNodeIndex(t *float64)
}
Properties for a multi-node batch job. Experimental.
type JobDefinition ¶
type JobDefinition interface {
awscdk.Resource
IJobDefinition
// The environment this resource belongs to.
//
// For resources that are created and managed by the CDK
// (generally, those created by creating new class instances like Role, Bucket, etc.),
// this is always the same as the environment of the stack they belong to;
// however, for imported resources
// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
// that might be different than the stack they were imported into.
// Experimental.
Env() *awscdk.ResourceEnvironment
// The ARN of this batch job definition.
// Experimental.
JobDefinitionArn() *string
// The name of the batch job definition.
// Experimental.
JobDefinitionName() *string
// The construct tree node associated with this construct.
// Experimental.
Node() awscdk.ConstructNode
// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation 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 CloudFormation
// - a concrete name generated automatically during synthesis, in
// cross-environment scenarios.
// Experimental.
PhysicalName() *string
// The stack in which this resource is defined.
// Experimental.
Stack() awscdk.Stack
// Apply the given removal policy to this resource.
//
// The Removal Policy controls what happens to this resource when it stops
// being managed by CloudFormation, either because you've removed it from the
// CDK application or because you've made a change that requires the resource
// to be replaced.
//
// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
// Experimental.
ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
// Experimental.
GeneratePhysicalName() *string
// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
//
// Normally, this token will resolve to `arnAttr`, but if the resource is
// referenced across environments, `arnComponents` will be used to synthesize
// a concrete ARN with the resource's physical name. Make sure to reference
// `this.physicalName` in `arnComponents`.
// Experimental.
GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
//
// Normally, this token will resolve to `nameAttr`, but if the resource is
// referenced across environments, it will be resolved to `this.physicalName`,
// which will be a concrete name.
// Experimental.
GetResourceNameAttribute(nameAttr *string) *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.
// Experimental.
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.
// Experimental.
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.
// Experimental.
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.
// Experimental.
Prepare()
// 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.
// Experimental.
Synthesize(session awscdk.ISynthesisSession)
// Returns a string representation of this construct.
// Experimental.
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.
// Experimental.
Validate() *[]*string
}
Batch Job Definition.
Defines a batch job definition to execute a specific batch job.
Example:
import ecr "github.com/aws/aws-cdk-go/awscdk"
repo := ecr.repository.fromRepositoryName(this, jsii.String("batch-job-repo"), jsii.String("todo-list"))
batch.NewJobDefinition(this, jsii.String("batch-job-def-from-ecr"), &jobDefinitionProps{
container: &jobDefinitionContainer{
image: ecs.NewEcrImage(repo, jsii.String("latest")),
},
})
Experimental.
func NewJobDefinition ¶
func NewJobDefinition(scope constructs.Construct, id *string, props *JobDefinitionProps) JobDefinition
Experimental.
type JobDefinitionContainer ¶
type JobDefinitionContainer struct {
// The image used to start a container.
// Experimental.
Image awsecs.ContainerImage `json:"image" yaml:"image"`
// Whether or not to assign a public IP to the job.
// Experimental.
AssignPublicIp *bool `json:"assignPublicIp" yaml:"assignPublicIp"`
// The command that is passed to the container.
//
// If you provide a shell command as a single string, you have to quote command-line arguments.
// Experimental.
Command *[]*string `json:"command" yaml:"command"`
// The environment variables to pass to the container.
// Experimental.
Environment *map[string]*string `json:"environment" yaml:"environment"`
// The IAM role that AWS Batch can assume.
//
// Required when using Fargate.
// Experimental.
ExecutionRole awsiam.IRole `json:"executionRole" yaml:"executionRole"`
// The number of physical GPUs to reserve for the container.
//
// The number of GPUs reserved for all
// containers in a job should not exceed the number of available GPUs on the compute resource that the job is launched on.
// Experimental.
GpuCount *float64 `json:"gpuCount" yaml:"gpuCount"`
// The instance type to use for a multi-node parallel job.
//
// Currently all node groups in a
// multi-node parallel job must use the same instance type. This parameter is not valid
// for single-node container jobs.
// Experimental.
InstanceType awsec2.InstanceType `json:"instanceType" yaml:"instanceType"`
// The IAM role that the container can assume for AWS permissions.
// Experimental.
JobRole awsiam.IRole `json:"jobRole" yaml:"jobRole"`
// Linux-specific modifications that are applied to the container, such as details for device mappings.
//
// For now, only the `devices` property is supported.
// Experimental.
LinuxParams awsecs.LinuxParameters `json:"linuxParams" yaml:"linuxParams"`
// The log configuration specification for the container.
// Experimental.
LogConfiguration *LogConfiguration `json:"logConfiguration" yaml:"logConfiguration"`
// The hard limit (in MiB) of memory to present to the container.
//
// If your container attempts to exceed
// the memory specified here, the container is killed. You must specify at least 4 MiB of memory for EC2 and 512 MiB for Fargate.
// Experimental.
MemoryLimitMiB *float64 `json:"memoryLimitMiB" yaml:"memoryLimitMiB"`
// The mount points for data volumes in your container.
// Experimental.
MountPoints *[]*awsecs.MountPoint `json:"mountPoints" yaml:"mountPoints"`
// Fargate platform version.
// Experimental.
PlatformVersion awsecs.FargatePlatformVersion `json:"platformVersion" yaml:"platformVersion"`
// When this parameter is true, the container is given elevated privileges on the host container instance (similar to the root user).
// Experimental.
Privileged *bool `json:"privileged" yaml:"privileged"`
// When this parameter is true, the container is given read-only access to its root file system.
// Experimental.
ReadOnly *bool `json:"readOnly" yaml:"readOnly"`
// A list of ulimits to set in the container.
// Experimental.
Ulimits *[]*awsecs.Ulimit `json:"ulimits" yaml:"ulimits"`
// The user name to use inside the container.
// Experimental.
User *string `json:"user" yaml:"user"`
// The number of vCPUs reserved for the container.
//
// Each vCPU is equivalent to
// 1,024 CPU shares. You must specify at least one vCPU for EC2 and 0.25 for Fargate.
// Experimental.
Vcpus *float64 `json:"vcpus" yaml:"vcpus"`
// A list of data volumes used in a job.
// Experimental.
Volumes *[]*awsecs.Volume `json:"volumes" yaml:"volumes"`
}
Properties of a job definition container.
Example:
import ssm "github.com/aws/aws-cdk-go/awscdk"
batch.NewJobDefinition(this, jsii.String("job-def"), &jobDefinitionProps{
container: &jobDefinitionContainer{
image: ecs.ecrImage.fromRegistry(jsii.String("docker/whalesay")),
logConfiguration: &logConfiguration{
logDriver: batch.logDriver_AWSLOGS,
options: map[string]*string{
"awslogs-region": jsii.String("us-east-1"),
},
secretOptions: []exposedSecret{
batch.*exposedSecret.fromParametersStore(jsii.String("xyz"), ssm.stringParameter.fromStringParameterName(this, jsii.String("parameter"), jsii.String("xyz"))),
},
},
},
})
Experimental.
type JobDefinitionProps ¶
type JobDefinitionProps struct {
// An object with various properties specific to container-based jobs.
// Experimental.
Container *JobDefinitionContainer `json:"container" yaml:"container"`
// The name of the job definition.
//
// Up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.
// Experimental.
JobDefinitionName *string `json:"jobDefinitionName" yaml:"jobDefinitionName"`
// An object with various properties specific to multi-node parallel jobs.
// Experimental.
NodeProps IMultiNodeProps `json:"nodeProps" yaml:"nodeProps"`
// When you submit a job, you can specify parameters that should replace the placeholders or override the default job definition parameters.
//
// Parameters
// in job submission requests take precedence over the defaults in a job definition.
// This allows you to use the same job definition for multiple jobs that use the same
// format, and programmatically change values in the command at submission time.
// Experimental.
Parameters *map[string]*string `json:"parameters" yaml:"parameters"`
// The platform capabilities required by the job definition.
// Experimental.
PlatformCapabilities *[]PlatformCapabilities `json:"platformCapabilities" yaml:"platformCapabilities"`
// The number of times to move a job to the RUNNABLE status.
//
// You may specify between 1 and
// 10 attempts. If the value of attempts is greater than one, the job is retried on failure
// the same number of attempts as the value.
// Experimental.
RetryAttempts *float64 `json:"retryAttempts" yaml:"retryAttempts"`
// The timeout configuration for jobs that are submitted with this job definition.
//
// You can specify
// a timeout duration after which AWS Batch terminates your jobs if they have not finished.
// Experimental.
Timeout awscdk.Duration `json:"timeout" yaml:"timeout"`
}
Construction properties of the {@link JobDefinition} construct.
Example:
import ssm "github.com/aws/aws-cdk-go/awscdk"
batch.NewJobDefinition(this, jsii.String("job-def"), &jobDefinitionProps{
container: &jobDefinitionContainer{
image: ecs.ecrImage.fromRegistry(jsii.String("docker/whalesay")),
logConfiguration: &logConfiguration{
logDriver: batch.logDriver_AWSLOGS,
options: map[string]*string{
"awslogs-region": jsii.String("us-east-1"),
},
secretOptions: []exposedSecret{
batch.*exposedSecret.fromParametersStore(jsii.String("xyz"), ssm.stringParameter.fromStringParameterName(this, jsii.String("parameter"), jsii.String("xyz"))),
},
},
},
})
Experimental.
type JobQueue ¶
type JobQueue interface {
awscdk.Resource
IJobQueue
// The environment this resource belongs to.
//
// For resources that are created and managed by the CDK
// (generally, those created by creating new class instances like Role, Bucket, etc.),
// this is always the same as the environment of the stack they belong to;
// however, for imported resources
// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
// that might be different than the stack they were imported into.
// Experimental.
Env() *awscdk.ResourceEnvironment
// The ARN of this batch job queue.
// Experimental.
JobQueueArn() *string
// A name for the job queue.
//
// Up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.
// Experimental.
JobQueueName() *string
// The construct tree node associated with this construct.
// Experimental.
Node() awscdk.ConstructNode
// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation 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 CloudFormation
// - a concrete name generated automatically during synthesis, in
// cross-environment scenarios.
// Experimental.
PhysicalName() *string
// The stack in which this resource is defined.
// Experimental.
Stack() awscdk.Stack
// Apply the given removal policy to this resource.
//
// The Removal Policy controls what happens to this resource when it stops
// being managed by CloudFormation, either because you've removed it from the
// CDK application or because you've made a change that requires the resource
// to be replaced.
//
// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
// Experimental.
ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
// Experimental.
GeneratePhysicalName() *string
// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
//
// Normally, this token will resolve to `arnAttr`, but if the resource is
// referenced across environments, `arnComponents` will be used to synthesize
// a concrete ARN with the resource's physical name. Make sure to reference
// `this.physicalName` in `arnComponents`.
// Experimental.
GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
//
// Normally, this token will resolve to `nameAttr`, but if the resource is
// referenced across environments, it will be resolved to `this.physicalName`,
// which will be a concrete name.
// Experimental.
GetResourceNameAttribute(nameAttr *string) *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.
// Experimental.
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.
// Experimental.
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.
// Experimental.
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.
// Experimental.
Prepare()
// 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.
// Experimental.
Synthesize(session awscdk.ISynthesisSession)
// Returns a string representation of this construct.
// Experimental.
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.
// Experimental.
Validate() *[]*string
}
Batch Job Queue.
Defines a batch job queue to define how submitted batch jobs should be ran based on specified batch compute environments.
Example:
var sharedComputeEnvs computeEnvironment
highPrioQueue := batch.NewJobQueue(this, jsii.String("JobQueue"), &jobQueueProps{
computeEnvironments: []jobQueueComputeEnvironment{
&jobQueueComputeEnvironment{
computeEnvironment: sharedComputeEnvs,
order: jsii.Number(1),
},
},
priority: jsii.Number(2),
})
lowPrioQueue := batch.NewJobQueue(this, jsii.String("JobQueue"), &jobQueueProps{
computeEnvironments: []*jobQueueComputeEnvironment{
&jobQueueComputeEnvironment{
computeEnvironment: sharedComputeEnvs,
order: jsii.Number(1),
},
},
priority: jsii.Number(1),
})
Experimental.
func NewJobQueue ¶
func NewJobQueue(scope constructs.Construct, id *string, props *JobQueueProps) JobQueue
Experimental.
type JobQueueComputeEnvironment ¶
type JobQueueComputeEnvironment struct {
// The batch compute environment to use for processing submitted jobs to this queue.
// Experimental.
ComputeEnvironment IComputeEnvironment `json:"computeEnvironment" yaml:"computeEnvironment"`
// The order in which this compute environment will be selected for dynamic allocation of resources to process submitted jobs.
// Experimental.
Order *float64 `json:"order" yaml:"order"`
}
Properties for mapping a compute environment to a job queue.
Example:
import awscdk "github.com/aws/aws-cdk-go/awscdk"import batch "github.com/aws/aws-cdk-go/awscdk/aws_batch"
var computeEnvironment computeEnvironment
jobQueueComputeEnvironment := &jobQueueComputeEnvironment{
computeEnvironment: computeEnvironment,
order: jsii.Number(123),
}
Experimental.
type JobQueueProps ¶
type JobQueueProps struct {
// The set of compute environments mapped to a job queue and their order relative to each other.
//
// The job scheduler uses this parameter to
// determine which compute environment should execute a given job. Compute environments must be in the VALID state before you can associate them
// with a job queue. You can associate up to three compute environments with a job queue.
// Experimental.
ComputeEnvironments *[]*JobQueueComputeEnvironment `json:"computeEnvironments" yaml:"computeEnvironments"`
// The state of the job queue.
//
// If set to true, it is able to accept jobs.
// Experimental.
Enabled *bool `json:"enabled" yaml:"enabled"`
// A name for the job queue.
//
// Up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.
// Experimental.
JobQueueName *string `json:"jobQueueName" yaml:"jobQueueName"`
// The priority of the job queue.
//
// Job queues with a higher priority (or a higher integer value for the priority parameter) are evaluated first
// when associated with the same compute environment. Priority is determined in descending order, for example, a job queue with a priority value
// of 10 is given scheduling preference over a job queue with a priority value of 1.
// Experimental.
Priority *float64 `json:"priority" yaml:"priority"`
}
Properties of a batch job queue.
Example:
var sharedComputeEnvs computeEnvironment
highPrioQueue := batch.NewJobQueue(this, jsii.String("JobQueue"), &jobQueueProps{
computeEnvironments: []jobQueueComputeEnvironment{
&jobQueueComputeEnvironment{
computeEnvironment: sharedComputeEnvs,
order: jsii.Number(1),
},
},
priority: jsii.Number(2),
})
lowPrioQueue := batch.NewJobQueue(this, jsii.String("JobQueue"), &jobQueueProps{
computeEnvironments: []*jobQueueComputeEnvironment{
&jobQueueComputeEnvironment{
computeEnvironment: sharedComputeEnvs,
order: jsii.Number(1),
},
},
priority: jsii.Number(1),
})
Experimental.
type LaunchTemplateSpecification ¶
type LaunchTemplateSpecification struct {
// The Launch template name.
// Experimental.
LaunchTemplateName *string `json:"launchTemplateName" yaml:"launchTemplateName"`
// The launch template version to be used (optional).
// Experimental.
Version *string `json:"version" yaml:"version"`
}
Launch template property specification.
Example:
var vpc vpc
var myLaunchTemplate cfnLaunchTemplate
myComputeEnv := batch.NewComputeEnvironment(this, jsii.String("ComputeEnv"), &computeEnvironmentProps{
computeResources: &computeResources{
launchTemplate: &launchTemplateSpecification{
launchTemplateName: string(myLaunchTemplate.launchTemplateName),
},
vpc: vpc,
},
computeEnvironmentName: jsii.String("MyStorageCapableComputeEnvironment"),
})
Experimental.
type LogConfiguration ¶
type LogConfiguration struct {
// The log driver to use for the container.
// Experimental.
LogDriver LogDriver `json:"logDriver" yaml:"logDriver"`
// The configuration options to send to the log driver.
// Experimental.
Options interface{} `json:"options" yaml:"options"`
// The secrets to pass to the log configuration as options.
//
// For more information, see https://docs.aws.amazon.com/batch/latest/userguide/specifying-sensitive-data-secrets.html#secrets-logconfig
// Experimental.
SecretOptions *[]ExposedSecret `json:"secretOptions" yaml:"secretOptions"`
}
Log configuration options to send to a custom log driver for the container.
Example:
import ssm "github.com/aws/aws-cdk-go/awscdk"
batch.NewJobDefinition(this, jsii.String("job-def"), &jobDefinitionProps{
container: &jobDefinitionContainer{
image: ecs.ecrImage.fromRegistry(jsii.String("docker/whalesay")),
logConfiguration: &logConfiguration{
logDriver: batch.logDriver_AWSLOGS,
options: map[string]*string{
"awslogs-region": jsii.String("us-east-1"),
},
secretOptions: []exposedSecret{
batch.*exposedSecret.fromParametersStore(jsii.String("xyz"), ssm.stringParameter.fromStringParameterName(this, jsii.String("parameter"), jsii.String("xyz"))),
},
},
},
})
Experimental.
type LogDriver ¶
type LogDriver string
The log driver to use for the container.
Example:
import ssm "github.com/aws/aws-cdk-go/awscdk"
batch.NewJobDefinition(this, jsii.String("job-def"), &jobDefinitionProps{
container: &jobDefinitionContainer{
image: ecs.ecrImage.fromRegistry(jsii.String("docker/whalesay")),
logConfiguration: &logConfiguration{
logDriver: batch.logDriver_AWSLOGS,
options: map[string]*string{
"awslogs-region": jsii.String("us-east-1"),
},
secretOptions: []exposedSecret{
batch.*exposedSecret.fromParametersStore(jsii.String("xyz"), ssm.stringParameter.fromStringParameterName(this, jsii.String("parameter"), jsii.String("xyz"))),
},
},
},
})
Experimental.
const ( // Specifies the Amazon CloudWatch Logs logging driver. // Experimental. LogDriver_AWSLOGS LogDriver = "AWSLOGS" // Specifies the Fluentd logging driver. // Experimental. LogDriver_FLUENTD LogDriver = "FLUENTD" // Specifies the Graylog Extended Format (GELF) logging driver. // Experimental. LogDriver_GELF LogDriver = "GELF" // Specifies the journald logging driver. // Experimental. LogDriver_JOURNALD LogDriver = "JOURNALD" // Specifies the logentries logging driver. // Experimental. LogDriver_LOGENTRIES LogDriver = "LOGENTRIES" // Specifies the JSON file logging driver. // Experimental. LogDriver_JSON_FILE LogDriver = "JSON_FILE" // Specifies the Splunk logging driver. // Experimental. LogDriver_SPLUNK LogDriver = "SPLUNK" // Specifies the syslog logging driver. // Experimental. LogDriver_SYSLOG LogDriver = "SYSLOG" )
type PlatformCapabilities ¶
type PlatformCapabilities string
Platform capabilities. Experimental.
const ( // Specifies EC2 environment. // Experimental. PlatformCapabilities_EC2 PlatformCapabilities = "EC2" // Specifies Fargate environment. // Experimental. PlatformCapabilities_FARGATE PlatformCapabilities = "FARGATE" )