Use GetCloudFrontOriginAccessIdentityConfig with a CLI
The following code examples show how to use GetCloudFrontOriginAccessIdentityConfig.
- CLI
-
- AWS CLI
-
To get a CloudFront origin access identity configuration
The following
get-cloud-front-origin-access-identity-configexample gets metadata about the CloudFront origin access identity (OAI) with the IDE74FTE3AEXAMPLE, including itsETag. The OAI ID is returned in the output of the create-cloud-front-origin-access-identity and list-cloud-front-origin-access-identities commands.aws cloudfront get-cloud-front-origin-access-identity-config \ --idE74FTE3AEXAMPLEOutput:
{ "ETag": "E2QWRUHEXAMPLE", "CloudFrontOriginAccessIdentityConfig": { "CallerReference": "cli-example", "Comment": "Example OAI" } }For more information, see Restrict access to an Amazon S3 origin in the Amazon CloudFront Developer Guide.
-
For API details, see GetCloudFrontOriginAccessIdentityConfig
in AWS CLI Command Reference.
-
- PowerShell
-
- Tools for PowerShell V4
-
Example 1: This example returns configuration information about a single Amazon CloudFront origin access identity, specified by the -Id parameter. Errors occur if no -Id parameter is specified..
Get-CFCloudFrontOriginAccessIdentityConfig -Id E3XXXXXXXXXXRTOutput:
CallerReference Comment --------------- ------- mycallerreference: 2/1/2011 1:16:32 PM Caller reference: 2/1/2011 1:16:32 PM-
For API details, see GetCloudFrontOriginAccessIdentityConfig in AWS Tools for PowerShell Cmdlet Reference (V4).
-
- Tools for PowerShell V5
-
Example 1: This example returns configuration information about a single Amazon CloudFront origin access identity, specified by the -Id parameter. Errors occur if no -Id parameter is specified..
Get-CFCloudFrontOriginAccessIdentityConfig -Id E3XXXXXXXXXXRTOutput:
CallerReference Comment --------------- ------- mycallerreference: 2/1/2011 1:16:32 PM Caller reference: 2/1/2011 1:16:32 PM-
For API details, see GetCloudFrontOriginAccessIdentityConfig in AWS Tools for PowerShell Cmdlet Reference (V5).
-
For a complete list of AWS SDK developer guides and code examples, see Using CloudFront with an AWS SDK. This topic also includes information about getting started and details about previous SDK versions.