github.com/aavshr/aws-sdk-go@v1.41.3/example/service/ecr/createRepository/README.md (about)

     1  # Example
     2  
     3  This is an example using the AWS SDK for Go to create a new ECR Repository.
     4  
     5  
     6  # Usage
     7  
     8  The example creates the repository name provided in the first parameter on default `us-east-1` aws region.
     9  
    10  ```sh
    11  go run -tags example createRepository.go <repo_name>
    12  ```
    13  
    14  To create a repository in a different region, set `AWS_REGION` env var.
    15  
    16  ```sh
    17  AWS_REGION=us-west-2 go -tags example run createRepository.go <repo_name>
    18  ```
    19  
    20  Output:
    21  ```
    22  ECR Repository "repo_name" created successfully!
    23  
    24  AWS Output:
    25  {
    26    Repository: {
    27      CreatedAt: 2020-03-26 00:20:36 +0000 UTC,
    28      ImageScanningConfiguration: {
    29        ScanOnPush: false
    30      },
    31      ImageTagMutability: "MUTABLE",
    32      RegistryId: "999999999999",
    33      RepositoryArn: "arn:aws:ecr:us-east-1:999999999999:repository/repo_name",
    34      RepositoryName: "repo_name",
    35      RepositoryUri: "999999999999.dkr.ecr.us-east-1.amazonaws.com/repo_name"
    36    }
    37  }
    38  ```