get_parameters_by_path
¶
get_parameters_by_path(
path: PSParameterName,
*,
config_overrides: Optional[SSMClientConfig] = None,
recursive: Optional[Boolean] = None,
parameter_filters: Optional[ParameterStringFilterList] = None,
with_decryption: Optional[Boolean] = None,
max_results: Optional[GetParametersByPathMaxResults] = None,
next_token: Optional[NextToken] = None,
) -> GetParametersByPathResult
Retrieve information about one or more parameters under a specified level in a hierarchy.
This operation is authorized against the ssm:GetParametersByPath action for the path that you specify in the request. It isn't authorized against the individual parameters that it returns, and it isn't authorized against ssm:GetParameter. A principal who is allowed to call this operation for the path /a with Recursive set to true receives every parameter under that path, including /a/b, even if a policy explicitly denies access to /a/b.
To prevent a parameter from being returned by this operation, deny the ssm:GetParametersByPath action on every ancestor path that could include the parameter in its results. For more information, see Restricting access to specific parameters and paths in the Amazon Web Services Systems Manager User Guide.
Request results are returned on a best-effort basis. If you specify MaxResults in the request, the response includes information up to the limit specified. The number of items returned, however, can be between zero and the value of MaxResults. If the service reaches an internal limit while processing the results, it stops the operation and returns the matching values up to that point and a NextToken. You can specify the NextToken in a subsequent call to get the next set of results.
Parameter names can't contain spaces. The service removes any spaces specified for the beginning or end of a parameter name. If the specified name for a parameter contains spaces between characters, the request fails with a ValidationException error.
Parameters:
-
path(PSParameterName) –The hierarchy for the parameter. Hierarchies start with a forward slash (/). The hierarchy is the parameter name except the last part of the parameter. For the API call to succeed, the last part of the parameter name can't be in the path. A parameter name hierarchy can have a maximum of 15 levels. Here is an example of a hierarchy:
/Finance/Prod/IAD/WinServ2016/license33 -
recursive(Optional[Boolean], default:None) –Retrieve all parameters within a hierarchy.
-
parameter_filters(Optional[ParameterStringFilterList], default:None) –Filters to limit the request results.
The following
Keyvalues are supported forGetParametersByPath:Type,KeyId, andLabel.The following
Keyvalues aren't supported forGetParametersByPath:tag,DataType,Name,Path, andTier. -
with_decryption(Optional[Boolean], default:None) –Retrieve all parameters in a hierarchy with their value decrypted.
-
max_results(Optional[GetParametersByPathMaxResults], default:None) –The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.
-
next_token(Optional[NextToken], default:None) –A token to start the list. Use this token to get the next set of results.
Raises:
-
InternalServerError–An error occurred on the server side.
-
InvalidFilterKey–The specified key isn't valid.
-
InvalidFilterOption–The specified filter option isn't valid. Valid options are Equals and BeginsWith. For Path filter, valid options are Recursive and OneLevel.
-
InvalidFilterValue–The filter value isn't valid. Verify the value and try again.
-
InvalidKeyId–The query key ID isn't valid.
-
InvalidNextToken–The specified token isn't valid.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ssm/_services/ssm.py
7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 | |