# JobAttributes

A subset of Job attributes are required for importing an existing job into a CDK project.

This is only used when using fromJobAttributes
to identify and reference the existing job.

Used as argument in: [Job.fromJobAttributes](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_glue.Job.html#fromjobattributes)

- Source: [`aws-glue/lib/jobs/job.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-glue/lib/jobs/job.ts#L299)
- Type last changed: v2.270.0 · 17 Sep 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_glue as glue } from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';

declare const role: iam.Role;
const jobAttributes: glue.JobAttributes = {
  jobName: 'jobName',

  // the properties below are optional
  role: role,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_glue as glue
from aws_cdk import aws_iam as iam

# role: iam.Role

job_attributes = glue.JobAttributes(
    job_name="jobName",

    # the properties below are optional
    role=role
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.glue.*;
import software.amazon.awscdk.services.iam.*;

Role role;

JobAttributes jobAttributes = JobAttributes.builder()
        .jobName("jobName")

        // the properties below are optional
        .role(role)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Glue;
using Amazon.CDK.AWS.IAM;

Role role;

var jobAttributes = new JobAttributes {
    JobName = "jobName",

    // the properties below are optional
    Role = role
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var role Role

jobAttributes := &JobAttributes{
	JobName: jsii.String("jobName"),

	// the properties below are optional
	Role: role,
}
```

## Properties

- `jobName`: string (required) — The name of the job.

- `role`: [IRole](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) = undefined — The IAM role assumed by Glue to run this job.
