Class Job.Builder

  • Enclosing class:
    Job

    public static class Job.Builder
    extends Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • id

        public Job.Builder id​(String id)
        The OCID of the job.
        Parameters:
        id - the value to set
        Returns:
        this builder
      • stackId

        public Job.Builder stackId​(String stackId)
        The OCID of the stack that is associated with the job.
        Parameters:
        stackId - the value to set
        Returns:
        this builder
      • compartmentId

        public Job.Builder compartmentId​(String compartmentId)
        The OCID of the compartment in which the job’s associated stack resides.
        Parameters:
        compartmentId - the value to set
        Returns:
        this builder
      • displayName

        public Job.Builder displayName​(String displayName)
        The job’s display name.
        Parameters:
        displayName - the value to set
        Returns:
        this builder
      • operation

        public Job.Builder operation​(Job.Operation operation)
        The type of job executing.
        Parameters:
        operation - the value to set
        Returns:
        this builder
      • isThirdPartyProviderExperienceEnabled

        public Job.Builder isThirdPartyProviderExperienceEnabled​(Boolean isThirdPartyProviderExperienceEnabled)
        When true, the stack sources third-party Terraform providers from Terraform Registry and allows customTerraformProvider.

        For more information about stack sourcing of third-party Terraform providers, see Third-party Provider Configuration.

        Parameters:
        isThirdPartyProviderExperienceEnabled - the value to set
        Returns:
        this builder
      • isProviderUpgradeRequired

        public Job.Builder isProviderUpgradeRequired​(Boolean isProviderUpgradeRequired)
        Specifies whether or not to upgrade provider versions.

        Within the version constraints of your Terraform configuration, use the latest versions available from the source of Terraform providers. For more information about this option, see Dependency Lock File (terraform.io).

        Parameters:
        isProviderUpgradeRequired - the value to set
        Returns:
        this builder
      • resolvedPlanJobId

        public Job.Builder resolvedPlanJobId​(String resolvedPlanJobId)
        Deprecated.

        Use the property executionPlanJobId in jobOperationDetails instead. The plan job OCID that was used (if this was an apply job and was not auto-approved).

        Parameters:
        resolvedPlanJobId - the value to set
        Returns:
        this builder
      • timeCreated

        public Job.Builder timeCreated​(Date timeCreated)
        The date and time when the job was created.

        Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z

        Parameters:
        timeCreated - the value to set
        Returns:
        this builder
      • timeFinished

        public Job.Builder timeFinished​(Date timeFinished)
        The date and time when the job stopped running, irrespective of whether the job ran successfully.

        Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z

        Parameters:
        timeFinished - the value to set
        Returns:
        this builder
      • lifecycleState

        public Job.Builder lifecycleState​(Job.LifecycleState lifecycleState)
        Current state of the specified job.

        For more information about job lifecycle states in Resource Manager, see Key Concepts.

        Parameters:
        lifecycleState - the value to set
        Returns:
        this builder
      • workingDirectory

        public Job.Builder workingDirectory​(String workingDirectory)
        File path to the directory to use for running Terraform.

        If not specified, the root directory is used. Required when using a zip Terraform configuration ( configSourceType value of ZIP_UPLOAD) that contains folders. Ignored for the configSourceType value of COMPARTMENT_CONFIG_SOURCE. For more information about required and recommended file structure, see File Structure (Terraform Configurations for Resource Manager).

        Parameters:
        workingDirectory - the value to set
        Returns:
        this builder
      • variables

        public Job.Builder variables​(Map<String,​String> variables)
        Terraform variables associated with this resource.

        Maximum number of variables supported is 250. The maximum size of each variable, including both name and value, is 8192 bytes. Example: {“CompartmentId”: “compartment-id-value”}

        Parameters:
        variables - the value to set
        Returns:
        this builder
      • freeformTags

        public Job.Builder freeformTags​(Map<String,​String> freeformTags)
        Free-form tags associated with this resource.

        Each tag is a key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {“Department”: “Finance”}

        Parameters:
        freeformTags - the value to set
        Returns:
        this builder
      • definedTags

        public Job.Builder definedTags​(Map<String,​Map<String,​Object>> definedTags)
        Defined tags for this resource.

        Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {“Operations”: {“CostCenter”: “42”}}

        Parameters:
        definedTags - the value to set
        Returns:
        this builder
      • build

        public Job build()