Documentation ¶
Overview ¶
Package appconfig manages the configuration of the agent.
Package appconfig manages the configuration of the agent.
Package appconfig manages the configuration of the agent.
Package appconfig manages the configuration of the agent.
Index ¶
Constants ¶
const ( // Agent defaults DefaultAgentName = "amazon-ssm-agent" DefaultCommandWorkersLimit = 1 DefaultCommandWorkersLimitMin = 1 DefaultCommandWorkersLimitMax = 10 DefaultCommandRetryLimit = 15 DefaultCommandRetryLimitMin = 1 DefaultCommandRetryLimitMax = 100 DefaultStopTimeoutMillis = 20000 DefaultStopTimeoutMillisMin = 10000 DefaultStopTimeoutMillisMax = 1000000 // SSM defaults DefaultSsmHealthFrequencyMinutes = 5 DefaultSsmHealthFrequencyMinutesMin = 5 DefaultSsmHealthFrequencyMinutesMax = 60 //aws-ssm-agent bookkeeping constants DefaultLocationOfPending = "pending" DefaultLocationOfCurrent = "current" DefaultLocationOfCompleted = "completed" DefaultLocationOfCorrupt = "corrupt" DefaultLocationOfState = "state" // DefaultCommandRootDirName is the root directory for storing command states DefaultCommandRootDirName = "command" // Permissions defaults //NOTE: Limit READ, WRITE and EXECUTE access to administrators/root. ReadWriteAccess = 0600 ReadWriteExecuteAccess = 0700 // ExitCodes SuccessExitCode = 0 ErrorExitCode = 1 // DefaultPluginConfig is a default config with which the plugins are initialized DefaultPluginConfig = "aws:defaultPluginConfig" // PluginNameAwsAgentUpdate is the name for agent update plugin PluginNameAwsAgentUpdate = "aws:updateSsmAgent" AppConfigFileName = "amazon-ssm-agent.json" SeelogConfigFileName = "seelog.xml" )
const ( // DefaultProgramFolder is the default folder for SSM DefaultProgramFolder = "/etc/amazon/ssm/" // AppConfigPath is the path of the AppConfig AppConfigPath = DefaultProgramFolder + AppConfigFileName // DownloadRoot specifies the directory under which files will be downloaded DownloadRoot = "/var/log/amazon/ssm/download/" // DefaultDataStorePath represents the directory for storing system data DefaultDataStorePath = "/var/lib/amazon/ssm/" // UpdaterArtifactsRoot represents the directory for storing update related information UpdaterArtifactsRoot = "/var/lib/amazon/ssm/update/" // PluginNameAwsRunScript is the name for run script plugin PluginNameAwsRunScript = "aws:runShellScript" // RebootExitCode that would trigger a Soft Reboot RebootExitCode = 194 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentInfo ¶
type AgentInfo struct { Name string Version string Region string OrchestrationRootDir string DownloadRootDir string }
AgentInfo represents metadata for amazon-ssm-agent
type CredentialProfile ¶
CredentialProfile represents configurations for aws credential profile
type MdsCfg ¶
type MdsCfg struct { Endpoint string CommandWorkersLimit int StopTimeoutMillis int64 CommandRetryLimit int }
MdsCfg represents configuration for Message delivery service (MDS)
type Mock ¶
Mock mocks a AppConfig.
func NewMockAppConfig ¶
func NewMockAppConfig() *Mock
NewMockAppConfig returns an instance of Mock for AppConfig.
type SsmCfg ¶
type SsmCfg struct { Endpoint string HealthFrequencyMinutes int // TODO: test hook, can be removed before release // this is to skip ssl verification for the beta self signed certs InsecureSkipVerify bool }
SsmCfg represents configuration for Simple system manager (SSM)
type SsmagentConfig ¶
type SsmagentConfig struct { Profile CredentialProfile Mds MdsCfg Ssm SsmCfg Agent AgentInfo Os OsInfo S3 S3Cfg }
SsmagentConfig stores agent configuration values.
func Config ¶
func Config(reload bool) (SsmagentConfig, error)
Config loads the app configuration for amazon-ssm-agent. If reload is true, it loads the config afresh, otherwise it returns a previous loaded version, if any.
func DefaultConfig ¶
func DefaultConfig() SsmagentConfig
DefaultConfig returns default ssm agent configuration
func (SsmagentConfig) ProfileCredentials ¶
func (config SsmagentConfig) ProfileCredentials() (credsInConfig *credentials.Credentials, err error)
ProfileCredentials checks to see if specific profile is being asked to use