Help functions for setting the parameters for services
Usage
config(
credentials = list(creds = list(access_key_id = "", secret_access_key = "",
session_token = "", access_token = "", expiration = Inf), profile = "", anonymous =
FALSE),
endpoint = "",
region = "",
close_connection = FALSE,
max_retries = 3,
connect_timeout = 60,
s3_force_path_style = FALSE,
s3_virtual_address = FALSE,
sts_regional_endpoint = "",
signature_version = ""
)
credentials(
creds = list(access_key_id = "", secret_access_key = "", session_token = "",
access_token = "", expiration = Inf),
profile = "",
anonymous = FALSE
)
creds(
access_key_id = "",
secret_access_key = "",
session_token = "",
access_token = "",
expiration = Inf
)Arguments
- credentials
credentials()orlistin same format.creds:
creds()orlistin same format.access_key_id: AWS access key ID
secret_access_key: AWS secret access key
session_token: AWS temporary session token
access_token: The token issued by the
CreateTokenAPI call. For more information, see CreateToken in theIAM Identity Center OIDC API Reference Guide.expiration: The date and time when the temporary credentials expire.
expirationmust be aPOSIXctdate-time or able to be compared with them.
profile: The name of a profile to use. If not given, then the default profile is used.
anonymous: Set anonymous credentials.
- endpoint
The complete URL to use for the constructed client.
- region
The AWS Region used in instantiating the client.
- close_connection
Immediately close all HTTP connections.
- max_retries
Max number of retries call AWS API (default set to 3).
- connect_timeout
The time in seconds till a timeout exception is thrown when attempting to make a connection. The default is 60 seconds.
- s3_force_path_style
Set this to
trueto force the request to use path-style addressing, i.e.http://s3.amazonaws.com/BUCKET/KEY.- s3_virtual_address
Set this to
trueto force the request to use virtual-hosted-style- sts_regional_endpoint
Set sts regional endpoint resolver to regional or legacy https://docs.aws.amazon.com/sdkref/latest/guide/feature-sts-regionalized-endpoints.html
- signature_version
The signature version used when signing requests. Note that the default version is Signature Version 4.
- creds
creds()orlistin same format.access_key_id: AWS access key ID
secret_access_key: AWS secret access key
session_token: AWS temporary session token
access_token: The token issued by the
CreateTokenAPI call. For more information, see CreateToken in theIAM Identity Center OIDC API Reference Guide.expiration: The date and time when the temporary credentials expire.
expirationmust be aPOSIXctdate-time or able to be compared with them.
- profile
The name of a profile to use. If not given, then the default profile is used.
- anonymous
Set anonymous credentials.
- access_key_id
AWS access key ID
- secret_access_key
AWS secret access key
- session_token
AWS temporary session token
- access_token
The token issued by the
CreateTokenAPI call. For more information, see CreateToken in theIAM Identity Center OIDC API Reference Guide.- expiration
The date and time when the temporary credentials expire.
expirationmust be aPOSIXctdate-time or able to be compared with them.
Examples
# set service parameter access_key_id and secret_access_key
config(credentials(creds("dummy", "secret")))
#> $credentials
#> $creds
#> $access_key_id
#> [1] "dummy"
#>
#> $secret_access_key
#> [1] "secret"
#>
#> $session_token
#> [1] ""
#>
#> $access_token
#> [1] ""
#>
#> $expiration
#> [1] Inf
#>
#> attr(,"class")
#> [1] "struct"
#>
#> $profile
#> [1] ""
#>
#> $anonymous
#> [1] FALSE
#>
#> attr(,"class")
#> [1] "struct"
#>
#> $endpoint
#> [1] ""
#>
#> $region
#> [1] ""
#>
#> $close_connection
#> [1] FALSE
#>
#> $max_retries
#> [1] 3
#>
#> $connect_timeout
#> [1] 60
#>
#> $s3_force_path_style
#> [1] FALSE
#>
#> $s3_virtual_address
#> [1] FALSE
#>
#> $sts_regional_endpoint
#> [1] ""
#>
#> $signature_version
#> [1] ""
#>
#> attr(,"class")
#> [1] "struct"
# set service parameter access_key_id and secret_access_key using using lists
config(
credentials = list(
creds = list(
access_key_id = "dummy",
secret_access_key = "secret"
)
)
)
#> $credentials
#> $credentials$creds
#> $credentials$creds$access_key_id
#> [1] "dummy"
#>
#> $credentials$creds$secret_access_key
#> [1] "secret"
#>
#>
#>
#> $endpoint
#> [1] ""
#>
#> $region
#> [1] ""
#>
#> $close_connection
#> [1] FALSE
#>
#> $max_retries
#> [1] 3
#>
#> $connect_timeout
#> [1] 60
#>
#> $s3_force_path_style
#> [1] FALSE
#>
#> $s3_virtual_address
#> [1] FALSE
#>
#> $sts_regional_endpoint
#> [1] ""
#>
#> $signature_version
#> [1] ""
#>
#> attr(,"class")
#> [1] "struct"