Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to call CreateJob #1880

Open
2 tasks
StevoGTA opened this issue Jan 29, 2025 · 3 comments
Open
2 tasks

Ability to call CreateJob #1880

StevoGTA opened this issue Jan 29, 2025 · 3 comments
Labels
feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.

Comments

@StevoGTA
Copy link

Describe the feature

We are making a macOS application to provide a nice GUI around CreateJob (https://docs.aws.amazon.com/AmazonS3/latest/userguide/batch-ops-create-job.html). But looks like this SDK doesn't support creating and submitting a CreateJob request with the nice Swift wrappers available for other calls.

Use Case

The users need to perform batch copies in S3 regularly. Initiating these via the AWS CLI is error-prone with a number of steps and lots of details. We are making a macOS application to present a nice GUI to collect info and compose the request.

Proposed Solution

Implement CreateJob like the other AWS S3 actions.

Other Information

Our only current options are to compose AWS CLI commands or call the REST API directly.

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change
@StevoGTA StevoGTA added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jan 29, 2025
@jbelkins
Copy link
Contributor

The CreateJob operation referenced in the doc link you cited is available in the SDK's AWSS3Control module. (Some larger AWS services, such as S3 and SageMaker, provide their functions through multiple SDK modules.)

You can see it in our codebase here:
https://github.com/awslabs/aws-sdk-swift/blob/main/Sources/Services/AWSS3Control/Sources/AWSS3Control/S3ControlClient.swift#L939

To use it in your own project:

In your target's dependencies in Package.swift:

dependencies: [
    .product(name: "AWSS3Control", package: "aws-sdk-swift"),
    // any other needed dependencies
]

In your code:

import AWSS3Control

let client = try S3ControlClient(region: "us-west-2")

var input = CreateJobInput()
// configure CreateJob input as needed

let output = try await client.createJob(input: input)

Please let us know if you need any other assistance.

@StevoGTA
Copy link
Author

@jbelkins Thanks so much for pointing me there. What is the best way to find where in the SDK a particular operation is implemented?

@jbelkins
Copy link
Contributor

In general, if you don't find what you need in an AWS service, look in the https://github.com/awslabs/aws-sdk-swift/tree/main/Sources/Services directory for a complete list of the service clients included in the SDK. (Currently there's over 400 clients!) Searching the SDK project for the operation name you want to perform should get you to the right place as well.

All of the AWS SDKs are generated from the same set of model definitions, so if you have example code like the Java SDK example in the linked docs, it's usually pretty easy to identify the same components in this SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

2 participants