start_resource_evaluation

ConfigService.Client.start_resource_evaluation(**kwargs)

Runs an on-demand evaluation for the specified resource to determine whether the resource details will comply with configured Config rules. You can also use it for evaluation purposes. Config recommends using an evaluation context. It runs an execution against the resource details with all of the Config rules in your account that match with the specified proactive mode and resource type.

Note

Ensure you have the cloudformation:DescribeType role setup to validate the resource type schema.

See also: AWS API Documentation

Request Syntax

response = client.start_resource_evaluation(
    ResourceDetails={
        'ResourceId': 'string',
        'ResourceType': 'string',
        'ResourceConfiguration': 'string',
        'ResourceConfigurationSchemaType': 'CFN_RESOURCE_SCHEMA'
    },
    EvaluationContext={
        'EvaluationContextIdentifier': 'string'
    },
    EvaluationMode='DETECTIVE'|'PROACTIVE',
    EvaluationTimeout=123,
    ClientToken='string'
)
Parameters
  • ResourceDetails (dict) --

    [REQUIRED]

    Returns a ResourceDetails object.

    • ResourceId (string) -- [REQUIRED]

      A unique resource ID for an evaluation.

    • ResourceType (string) -- [REQUIRED]

      The type of resource being evaluated.

    • ResourceConfiguration (string) -- [REQUIRED]

      The resource definition to be evaluated as per the resource configuration schema type.

    • ResourceConfigurationSchemaType (string) --

      The schema type of the resource configuration.

  • EvaluationContext (dict) --

    Returns an EvaluationContext object.

    • EvaluationContextIdentifier (string) --

      A unique EvaluationContextIdentifier ID for an EvaluationContext.

  • EvaluationMode (string) --

    [REQUIRED]

    The mode of an evaluation. The valid value for this API is Proactive .

  • EvaluationTimeout (integer) -- The timeout for an evaluation. The default is 900 seconds. You cannot specify a number greater than 3600. If you specify 0, Config uses the default.
  • ClientToken (string) --

    A client token is a unique, case-sensitive string of up to 64 ASCII characters. To make an idempotent API request using one of these actions, specify a client token in the request.

    Note

    Avoid reusing the same client token for other API requests. If you retry a request that completed successfully using the same client token and the same parameters, the retry succeeds without performing any further actions. If you retry a successful request using the same client token, but one or more of the parameters are different, other than the Region or Availability Zone, the retry fails with an IdempotentParameterMismatch error.

Return type

dict

Returns

Response Syntax

{
    'ResourceEvaluationId': 'string'
}

Response Structure

  • (dict) --

    • ResourceEvaluationId (string) --

      A unique ResourceEvaluationId that is associated with a single execution.

Exceptions

  • ConfigService.Client.exceptions.InvalidParameterValueException
  • ConfigService.Client.exceptions.IdempotentParameterMismatch