Class CfnJobTemplate

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, IJobTemplateRef, IEnvironmentAware, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.140.0 (build 79fd58c)", date="2026-09-30T11:04:52.153Z") @Stability(Stable) public class CfnJobTemplate extends CfnResource implements IInspectable, IJobTemplateRef, ITaggableV2
Represents an Amazon EMR on EKS job template.

A job template stores the values of a StartJobRun API request in a reusable template, so they can be used to start a job run or to enforce certain values in a StartJobRun API request.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.emrcontainers.*;
 ConfigurationProperty configurationProperty_;
 CfnJobTemplate cfnJobTemplate = CfnJobTemplate.Builder.create(this, "MyCfnJobTemplate")
         .jobTemplateData(JobTemplateDataProperty.builder()
                 .executionRoleArn("executionRoleArn")
                 .jobDriver(JobDriverProperty.builder()
                         .sparkSqlJobDriver(SparkSqlJobDriverProperty.builder()
                                 .entryPoint("entryPoint")
                                 .sparkSqlParameters("sparkSqlParameters")
                                 .build())
                         .sparkSubmitJobDriver(SparkSubmitJobDriverProperty.builder()
                                 .entryPoint("entryPoint")
                                 // the properties below are optional
                                 .entryPointArguments(List.of("entryPointArguments"))
                                 .sparkSubmitParameters("sparkSubmitParameters")
                                 .build())
                         .build())
                 .releaseLabel("releaseLabel")
                 // the properties below are optional
                 .configurationOverrides(ParametricConfigurationOverridesProperty.builder()
                         .applicationConfiguration(List.of(ConfigurationProperty.builder()
                                 .classification("classification")
                                 // the properties below are optional
                                 .configurations(List.of(configurationProperty_))
                                 .properties(Map.of(
                                         "propertiesKey", "properties"))
                                 .build()))
                         .monitoringConfiguration(ParametricMonitoringConfigurationProperty.builder()
                                 .cloudWatchMonitoringConfiguration(ParametricCloudWatchMonitoringConfigurationProperty.builder()
                                         .logGroupName("logGroupName")
                                         .logStreamNamePrefix("logStreamNamePrefix")
                                         .build())
                                 .persistentAppUi("persistentAppUi")
                                 .s3MonitoringConfiguration(ParametricS3MonitoringConfigurationProperty.builder()
                                         .logUri("logUri")
                                         .build())
                                 .build())
                         .build())
                 .jobTags(Map.of(
                         "jobTagsKey", "jobTags"))
                 .parameterConfiguration(Map.of(
                         "parameterConfigurationKey", TemplateParameterConfigurationProperty.builder()
                                 .defaultValue("defaultValue")
                                 .type("type")
                                 .build()))
                 .build())
         .name("name")
         // the properties below are optional
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnJobTemplate

      protected CfnJobTemplate(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnJobTemplate

      protected CfnJobTemplate(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnJobTemplate

      @Stability(Stable) public CfnJobTemplate(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnJobTemplateProps props)
      Create a new AWS::EMRContainers::JobTemplate.

      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • arnForJobTemplate

      @Stability(Stable) @NotNull public static String arnForJobTemplate(@NotNull IJobTemplateRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnJobTemplate

      @Stability(Stable) @NotNull public static Boolean isCfnJobTemplate(@NotNull Object x)
      Checks whether the given object is a CfnJobTemplate.

      Parameters:
      x - This parameter is required.
    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The ARN of the job template.
    • getAttrCreatedAt

      @Stability(Stable) @NotNull public String getAttrCreatedAt()
      The date and time when the job template was created.
    • getAttrCreatedBy

      @Stability(Stable) @NotNull public String getAttrCreatedBy()
      The user who created the job template.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
      The ID of the job template.
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getCfnPropertyNames

      @Stability(Stable) @NotNull protected Map<String,String> getCfnPropertyNames()
      Overrides:
      getCfnPropertyNames in class CfnResource
    • getJobTemplateRef

      @Stability(Stable) @NotNull public JobTemplateReference getJobTemplateRef()
      A reference to a JobTemplate resource.
      Specified by:
      getJobTemplateRef in interface IJobTemplateRef
    • getJobTemplateData

      @Stability(Stable) @NotNull public Object getJobTemplateData()
      The values of a StartJobRun API request used in job runs started using the job template.

      Returns union: either IResolvable or CfnJobTemplate.JobTemplateDataProperty

    • setJobTemplateData

      @Stability(Stable) public void setJobTemplateData(@NotNull IResolvable value)
      The values of a StartJobRun API request used in job runs started using the job template.
    • setJobTemplateData

      @Stability(Stable) public void setJobTemplateData(@NotNull CfnJobTemplate.JobTemplateDataProperty value)
      The values of a StartJobRun API request used in job runs started using the job template.
    • getName

      @Stability(Stable) @NotNull public String getName()
      The specified name of the job template.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The specified name of the job template.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      The tags that are associated with the job template.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      The tags that are associated with the job template.