-
Notifications
You must be signed in to change notification settings - Fork 672
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #870 from aws/s3/arn
Adds support for access-point and outposts for s3 / s3control client
- Loading branch information
Showing
153 changed files
with
7,733 additions
and
622 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...n/java/software/amazon/smithy/aws/go/codegen/customization/S3ControlEndpointResolver.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package software.amazon.smithy.aws.go.codegen.customization; | ||
|
||
import java.util.function.Consumer; | ||
import software.amazon.smithy.aws.go.codegen.EndpointGenerator; | ||
import software.amazon.smithy.aws.traits.ServiceTrait; | ||
import software.amazon.smithy.codegen.core.SymbolProvider; | ||
import software.amazon.smithy.go.codegen.GoSettings; | ||
import software.amazon.smithy.go.codegen.GoWriter; | ||
import software.amazon.smithy.go.codegen.TriConsumer; | ||
import software.amazon.smithy.go.codegen.integration.GoIntegration; | ||
import software.amazon.smithy.model.Model; | ||
|
||
/** | ||
* S3ControlEndpointResolverCustomizations adds an internal endpoint resolver | ||
* for s3 service endpoints | ||
*/ | ||
public class S3ControlEndpointResolver implements GoIntegration { | ||
|
||
@Override | ||
public void writeAdditionalFiles( | ||
GoSettings settings, | ||
Model model, | ||
SymbolProvider symbolProvider, | ||
TriConsumer<String, String, Consumer<GoWriter>> writerFactory | ||
) { | ||
if (!settings.getService(model).expectTrait(ServiceTrait.class).getSdkId().equalsIgnoreCase( | ||
"S3 Control")){ | ||
return; | ||
} | ||
|
||
// Generate S3 internal endpoint resolver for S3 Control service | ||
new EndpointGenerator(settings, model, writerFactory,"S3","s3", true).run(); | ||
} | ||
} |
Oops, something went wrong.