Try AWS Native preview for resources not in the classic version.
aws.cloudfront.getOriginAccessIdentities
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Use this data source to get ARNs, ids and S3 canonical user IDs of Amazon CloudFront origin access identities.
Example Usage
All origin access identities in the account
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.cloudfront.getOriginAccessIdentities({});
import pulumi
import pulumi_aws as aws
example = aws.cloudfront.get_origin_access_identities()
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudfront"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudfront.GetOriginAccessIdentities(ctx, nil, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.CloudFront.GetOriginAccessIdentities.Invoke();
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudfront.CloudfrontFunctions;
import com.pulumi.aws.cloudfront.inputs.GetOriginAccessIdentitiesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = CloudfrontFunctions.getOriginAccessIdentities();
}
}
variables:
example:
fn::invoke:
Function: aws:cloudfront:getOriginAccessIdentities
Arguments: {}
Origin access identities filtered by comment/name
Origin access identities whose comments are example-comment1
, example-comment2
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.cloudfront.getOriginAccessIdentities({
comments: [
"example-comment1",
"example-comment2",
],
});
import pulumi
import pulumi_aws as aws
example = aws.cloudfront.get_origin_access_identities(comments=[
"example-comment1",
"example-comment2",
])
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudfront"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudfront.GetOriginAccessIdentities(ctx, &cloudfront.GetOriginAccessIdentitiesArgs{
Comments: []string{
"example-comment1",
"example-comment2",
},
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.CloudFront.GetOriginAccessIdentities.Invoke(new()
{
Comments = new[]
{
"example-comment1",
"example-comment2",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudfront.CloudfrontFunctions;
import com.pulumi.aws.cloudfront.inputs.GetOriginAccessIdentitiesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = CloudfrontFunctions.getOriginAccessIdentities(GetOriginAccessIdentitiesArgs.builder()
.comments(
"example-comment1",
"example-comment2")
.build());
}
}
variables:
example:
fn::invoke:
Function: aws:cloudfront:getOriginAccessIdentities
Arguments:
comments:
- example-comment1
- example-comment2
Using getOriginAccessIdentities
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getOriginAccessIdentities(args: GetOriginAccessIdentitiesArgs, opts?: InvokeOptions): Promise<GetOriginAccessIdentitiesResult>
function getOriginAccessIdentitiesOutput(args: GetOriginAccessIdentitiesOutputArgs, opts?: InvokeOptions): Output<GetOriginAccessIdentitiesResult>
def get_origin_access_identities(comments: Optional[Sequence[str]] = None,
opts: Optional[InvokeOptions] = None) -> GetOriginAccessIdentitiesResult
def get_origin_access_identities_output(comments: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetOriginAccessIdentitiesResult]
func GetOriginAccessIdentities(ctx *Context, args *GetOriginAccessIdentitiesArgs, opts ...InvokeOption) (*GetOriginAccessIdentitiesResult, error)
func GetOriginAccessIdentitiesOutput(ctx *Context, args *GetOriginAccessIdentitiesOutputArgs, opts ...InvokeOption) GetOriginAccessIdentitiesResultOutput
> Note: This function is named GetOriginAccessIdentities
in the Go SDK.
public static class GetOriginAccessIdentities
{
public static Task<GetOriginAccessIdentitiesResult> InvokeAsync(GetOriginAccessIdentitiesArgs args, InvokeOptions? opts = null)
public static Output<GetOriginAccessIdentitiesResult> Invoke(GetOriginAccessIdentitiesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetOriginAccessIdentitiesResult> getOriginAccessIdentities(GetOriginAccessIdentitiesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:cloudfront/getOriginAccessIdentities:getOriginAccessIdentities
arguments:
# arguments dictionary
The following arguments are supported:
- Comments List<string>
- Filter origin access identities by comment.
- Comments []string
- Filter origin access identities by comment.
- comments List<String>
- Filter origin access identities by comment.
- comments string[]
- Filter origin access identities by comment.
- comments Sequence[str]
- Filter origin access identities by comment.
- comments List<String>
- Filter origin access identities by comment.
getOriginAccessIdentities Result
The following output properties are available:
- Iam
Arns List<string> - Set of ARNs of the matched origin access identities.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Set of ids of the matched origin access identities.
- S3Canonical
User List<string>Ids - Set of S3 canonical user IDs of the matched origin access identities.
- Comments List<string>
- Iam
Arns []string - Set of ARNs of the matched origin access identities.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Set of ids of the matched origin access identities.
- S3Canonical
User []stringIds - Set of S3 canonical user IDs of the matched origin access identities.
- Comments []string
- iam
Arns List<String> - Set of ARNs of the matched origin access identities.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- Set of ids of the matched origin access identities.
- s3Canonical
User List<String>Ids - Set of S3 canonical user IDs of the matched origin access identities.
- comments List<String>
- iam
Arns string[] - Set of ARNs of the matched origin access identities.
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- Set of ids of the matched origin access identities.
- s3Canonical
User string[]Ids - Set of S3 canonical user IDs of the matched origin access identities.
- comments string[]
- iam_
arns Sequence[str] - Set of ARNs of the matched origin access identities.
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- Set of ids of the matched origin access identities.
- s3_
canonical_ Sequence[str]user_ ids - Set of S3 canonical user IDs of the matched origin access identities.
- comments Sequence[str]
- iam
Arns List<String> - Set of ARNs of the matched origin access identities.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- Set of ids of the matched origin access identities.
- s3Canonical
User List<String>Ids - Set of S3 canonical user IDs of the matched origin access identities.
- comments List<String>
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.