Class Secret
- java.lang.Object
-
- software.amazon.awssdk.services.ecs.model.Secret
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<Secret.Builder,Secret>
@Generated("software.amazon.awssdk:codegen") public final class Secret extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Secret.Builder,Secret>
An object representing the secret to expose to your container. Secrets can be exposed to a container in the following ways:
-
To inject sensitive data into your containers as environment variables, use the
secretscontainer definition parameter. -
To reference sensitive information in the log configuration of a container, use the
secretOptionscontainer definition parameter.
For more information, see Specifying sensitive data in the Amazon Elastic Container Service Developer Guide.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceSecret.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Secret.Builderbuilder()booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()Stringname()The name of the secret.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends Secret.Builder>serializableBuilderClass()Secret.BuildertoBuilder()StringtoString()Returns a string representation of this object.StringvalueFrom()The secret to expose to the container.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
name
public final String name()
The name of the secret.
- Returns:
- The name of the secret.
-
valueFrom
public final String valueFrom()
The secret to expose to the container. The supported values are either the full ARN of the Secrets Manager secret or the full ARN of the parameter in the SSM Parameter Store.
For information about the require Identity and Access Management permissions, see Required IAM permissions for Amazon ECS secrets (for Secrets Manager) or Required IAM permissions for Amazon ECS secrets (for Systems Manager Parameter store) in the Amazon Elastic Container Service Developer Guide.
If the SSM Parameter Store parameter exists in the same Region as the task you're launching, then you can use either the full ARN or name of the parameter. If the parameter exists in a different Region, then the full ARN must be specified.
- Returns:
- The secret to expose to the container. The supported values are either the full ARN of the Secrets
Manager secret or the full ARN of the parameter in the SSM Parameter Store.
For information about the require Identity and Access Management permissions, see Required IAM permissions for Amazon ECS secrets (for Secrets Manager) or Required IAM permissions for Amazon ECS secrets (for Systems Manager Parameter store) in the Amazon Elastic Container Service Developer Guide.
If the SSM Parameter Store parameter exists in the same Region as the task you're launching, then you can use either the full ARN or name of the parameter. If the parameter exists in a different Region, then the full ARN must be specified.
-
toBuilder
public Secret.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<Secret.Builder,Secret>
-
builder
public static Secret.Builder builder()
-
serializableBuilderClass
public static Class<? extends Secret.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-