SecretManagerClient class
Client for retrieving secrets from Google Cloud Secret Manager.
Extends the core Secret Manager client with location-aware regional endpoint
metadata and strict mutual-exclusion validation between
serviceAccountJson and authToken.
final client = SecretManagerClient(
authToken: 'ya29.example-token',
location: 'us-central1',
);
final secret = await client.getSecret(
'projects/my-project/secrets/my-secret/versions/latest',
);
- Inheritance
-
- Object
- SecretManagerClient
- SecretManagerClient
Constructors
- SecretManagerClient({String? serviceAccountJson, String? authToken, String? location, Client? httpClient})
- Creates a Secret Manager client.
Properties
- apiEndpoint → String
-
Effective API endpoint base URL for this client.
no setter
- authToken → String?
-
Optional pre-resolved auth token.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- httpClient → Client?
-
Optional injected HTTP client used for Secret Manager REST requests.
finalinherited
- location → String?
-
Optional regional location (for example,
'us-central1').final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serviceAccountJson → String?
-
Optional service-account JSON used to exchange access tokens.
finalinherited
Methods
-
getSecret(
String resourceName, {String? apiEndpoint}) → Future< String> -
Resolves the secret text stored at
resourceName.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited