Documentation ¶
Index ¶
- Constants
- type SSMSecretResource
- func (secret *SSMSecretResource) ApplyTransition(nextState resourcestatus.ResourceStatus) error
- func (secret *SSMSecretResource) BuildContainerDependency(containerName string, satisfied apicontainerstatus.ContainerStatus, ...)
- func (secret *SSMSecretResource) Cleanup() error
- func (secret *SSMSecretResource) Create() error
- func (secret *SSMSecretResource) DependOnTaskNetwork() bool
- func (secret *SSMSecretResource) DesiredTerminal() bool
- func (secret *SSMSecretResource) GetAppliedStatus() resourcestatus.ResourceStatus
- func (secret *SSMSecretResource) GetCachedSecretValue(secretKey string) (string, bool)
- func (secret *SSMSecretResource) GetContainerDependencies(dependent resourcestatus.ResourceStatus) []apicontainer.ContainerDependency
- func (secret *SSMSecretResource) GetCreatedAt() time.Time
- func (secret *SSMSecretResource) GetDesiredStatus() resourcestatus.ResourceStatus
- func (secret *SSMSecretResource) GetKnownStatus() resourcestatus.ResourceStatus
- func (secret *SSMSecretResource) GetName() string
- func (secret *SSMSecretResource) GetTerminalReason() string
- func (secret *SSMSecretResource) Initialize(resourceFields *taskresource.ResourceFields, taskKnownStatus status.TaskStatus, ...)
- func (secret *SSMSecretResource) KnownCreated() bool
- func (secret *SSMSecretResource) MarshalJSON() ([]byte, error)
- func (secret *SSMSecretResource) NextKnownState() resourcestatus.ResourceStatus
- func (secret *SSMSecretResource) SetAppliedStatus(status resourcestatus.ResourceStatus) bool
- func (secret *SSMSecretResource) SetCachedSecretValue(secretKey string, secretValue string)
- func (secret *SSMSecretResource) SetCreatedAt(createdAt time.Time)
- func (secret *SSMSecretResource) SetDesiredStatus(status resourcestatus.ResourceStatus)
- func (secret *SSMSecretResource) SetKnownStatus(status resourcestatus.ResourceStatus)
- func (secret *SSMSecretResource) StatusString(status resourcestatus.ResourceStatus) string
- func (secret *SSMSecretResource) SteadyState() resourcestatus.ResourceStatus
- func (secret *SSMSecretResource) TerminalStatus() resourcestatus.ResourceStatus
- func (secret *SSMSecretResource) UnmarshalJSON(b []byte) error
- type SSMSecretResourceJSON
- type SSMSecretStatus
Constants ¶
const ( // ResourceName is the name of the ssmsecret resource ResourceName = "ssmsecret" //MaxBatchNum is the maximum batch number that ssm GetParameters API can accept at one time MaxBatchNum = 10 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SSMSecretResource ¶
type SSMSecretResource struct {
// contains filtered or unexported fields
}
SSMSecretResource represents secrets as a task resource. The secrets are stored in SSM Parameter Store.
func NewSSMSecretResource ¶
func NewSSMSecretResource(taskARN string, ssmSecrets map[string][]apicontainer.Secret, executionCredentialsID string, credentialsManager credentials.Manager, ssmClientCreator factory.SSMClientCreator) *SSMSecretResource
NewSSMSecretResource creates a new SSMSecretResource object
func (*SSMSecretResource) ApplyTransition ¶
func (secret *SSMSecretResource) ApplyTransition(nextState resourcestatus.ResourceStatus) error
ApplyTransition calls the function required to move to the specified status
func (*SSMSecretResource) BuildContainerDependency ¶ added in v1.38.0
func (secret *SSMSecretResource) BuildContainerDependency(containerName string, satisfied apicontainerstatus.ContainerStatus, dependent resourcestatus.ResourceStatus)
func (*SSMSecretResource) Cleanup ¶
func (secret *SSMSecretResource) Cleanup() error
Cleanup removes the secret value created for the task
func (*SSMSecretResource) Create ¶
func (secret *SSMSecretResource) Create() error
Create fetches secret value from SSM in batches. It spins up multiple goroutines in order to retrieve values in parallel.
func (*SSMSecretResource) DependOnTaskNetwork ¶ added in v1.38.0
func (secret *SSMSecretResource) DependOnTaskNetwork() bool
func (*SSMSecretResource) DesiredTerminal ¶
func (secret *SSMSecretResource) DesiredTerminal() bool
DesiredTerminal returns true if the secret's desired status is REMOVED
func (*SSMSecretResource) GetAppliedStatus ¶ added in v1.38.0
func (secret *SSMSecretResource) GetAppliedStatus() resourcestatus.ResourceStatus
GetAppliedStatus safely returns the currently applied status of the resource
func (*SSMSecretResource) GetCachedSecretValue ¶
func (secret *SSMSecretResource) GetCachedSecretValue(secretKey string) (string, bool)
GetCachedSecretValue retrieves the secret value from secretData field
func (*SSMSecretResource) GetContainerDependencies ¶ added in v1.38.0
func (secret *SSMSecretResource) GetContainerDependencies(dependent resourcestatus.ResourceStatus) []apicontainer.ContainerDependency
func (*SSMSecretResource) GetCreatedAt ¶
func (secret *SSMSecretResource) GetCreatedAt() time.Time
GetCreatedAt sets the timestamp for resource's creation time
func (*SSMSecretResource) GetDesiredStatus ¶
func (secret *SSMSecretResource) GetDesiredStatus() resourcestatus.ResourceStatus
GetDesiredStatus safely returns the desired status of the task
func (*SSMSecretResource) GetKnownStatus ¶
func (secret *SSMSecretResource) GetKnownStatus() resourcestatus.ResourceStatus
GetKnownStatus safely returns the currently known status of the task
func (*SSMSecretResource) GetName ¶
func (secret *SSMSecretResource) GetName() string
GetName safely returns the name of the resource
func (*SSMSecretResource) GetTerminalReason ¶
func (secret *SSMSecretResource) GetTerminalReason() string
GetTerminalReason returns an error string to propagate up through to task state change messages
func (*SSMSecretResource) Initialize ¶
func (secret *SSMSecretResource) Initialize(resourceFields *taskresource.ResourceFields, taskKnownStatus status.TaskStatus, taskDesiredStatus status.TaskStatus)
func (*SSMSecretResource) KnownCreated ¶
func (secret *SSMSecretResource) KnownCreated() bool
KnownCreated returns true if the secret's known status is CREATED
func (*SSMSecretResource) MarshalJSON ¶
func (secret *SSMSecretResource) MarshalJSON() ([]byte, error)
MarshalJSON serialises the SSMSecretResource struct to JSON
func (*SSMSecretResource) NextKnownState ¶
func (secret *SSMSecretResource) NextKnownState() resourcestatus.ResourceStatus
NextKnownState returns the state that the resource should progress to based on its `KnownState`.
func (*SSMSecretResource) SetAppliedStatus ¶
func (secret *SSMSecretResource) SetAppliedStatus(status resourcestatus.ResourceStatus) bool
SetAppliedStatus sets the applied status of resource and returns whether the resource is already in a transition
func (*SSMSecretResource) SetCachedSecretValue ¶ added in v1.23.0
func (secret *SSMSecretResource) SetCachedSecretValue(secretKey string, secretValue string)
SetCachedSecretValue set the secret value in the secretData field given the key and value
func (*SSMSecretResource) SetCreatedAt ¶
func (secret *SSMSecretResource) SetCreatedAt(createdAt time.Time)
SetCreatedAt sets the timestamp for resource's creation time
func (*SSMSecretResource) SetDesiredStatus ¶
func (secret *SSMSecretResource) SetDesiredStatus(status resourcestatus.ResourceStatus)
SetDesiredStatus safely sets the desired status of the resource
func (*SSMSecretResource) SetKnownStatus ¶
func (secret *SSMSecretResource) SetKnownStatus(status resourcestatus.ResourceStatus)
SetKnownStatus safely sets the currently known status of the resource
func (*SSMSecretResource) StatusString ¶
func (secret *SSMSecretResource) StatusString(status resourcestatus.ResourceStatus) string
StatusString returns the string of the cgroup resource status
func (*SSMSecretResource) SteadyState ¶
func (secret *SSMSecretResource) SteadyState() resourcestatus.ResourceStatus
SteadyState returns the transition state of the resource defined as "ready"
func (*SSMSecretResource) TerminalStatus ¶
func (secret *SSMSecretResource) TerminalStatus() resourcestatus.ResourceStatus
TerminalStatus returns the last transition state of cgroup
func (*SSMSecretResource) UnmarshalJSON ¶
func (secret *SSMSecretResource) UnmarshalJSON(b []byte) error
UnmarshalJSON deserialises the raw JSON to a SSMSecretResource struct
type SSMSecretResourceJSON ¶
type SSMSecretResourceJSON struct { TaskARN string `json:"taskARN"` CreatedAt *time.Time `json:"createdAt,omitempty"` DesiredStatus *SSMSecretStatus `json:"desiredStatus"` KnownStatus *SSMSecretStatus `json:"knownStatus"` RequiredSecrets map[string][]apicontainer.Secret `json:"secretResources"` ExecutionCredentialsID string `json:"executionCredentialsID"` }
type SSMSecretStatus ¶
type SSMSecretStatus resourcestatus.ResourceStatus
const ( // is the zero state of a task resource SSMSecretStatusNone SSMSecretStatus = iota // represents a task resource which has been created SSMSecretCreated // represents a task resource which has been cleaned up SSMSecretRemoved )
func (*SSMSecretStatus) MarshalJSON ¶
func (as *SSMSecretStatus) MarshalJSON() ([]byte, error)
MarshalJSON overrides the logic for JSON-encoding the ResourceStatus type
func (SSMSecretStatus) String ¶
func (as SSMSecretStatus) String() string
StatusString returns a human readable string representation of this object
func (*SSMSecretStatus) UnmarshalJSON ¶
func (as *SSMSecretStatus) UnmarshalJSON(b []byte) error
UnmarshalJSON overrides the logic for parsing the JSON-encoded ResourceStatus data