# PublicGalleryAuthorizationToken

Authorization token to access the global public ECR Gallery via Docker CLI.

- Source: [`aws-ecr/lib/auth-token.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-ecr/lib/auth-token.ts#L29)

## Example

TypeScript:

```ts
const user = new iam.User(this, 'User');
ecr.PublicGalleryAuthorizationToken.grantRead(user);
```

Python:

```python
user = iam.User(self, "User")
ecr.PublicGalleryAuthorizationToken.grant_read(user)
```

Java:

```java
User user = new User(this, "User");
PublicGalleryAuthorizationToken.grantRead(user);
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
var user = new User(this, "User");
PublicGalleryAuthorizationToken.GrantRead(user);
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
user := iam.NewUser(this, jsii.String("User"))
ecr.PublicGalleryAuthorizationToken_GrantRead(user)
```

## Methods

- `grantRead(grantee: IGrantable): void` (static) — Grant access to retrieve an authorization token.
