Resource for managing an Amazon S3 Vectors Vector Bucket policy.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.s3.VectorsVectorBucketPolicy("example", {
vectorBucketArn: exampleAwsS3vectorsVectorBucket.arn,
policy: `{
\\"Version\\": \\"2012-10-17\\",
\\"Id\\": \\"writePolicy\\",
\\"Statement\\": [{
\\"Sid\\": \\"writeStatement\\",
\\"Effect\\": \\"Allow\\",
\\"Principal\\": {
\\"AWS\\": \\"123456789012\\"
},
\\"Action\\": [
\\"s3vectors:PutVectors\\"
],
\\"Resource\\": \\"*\\"
}]
}
`,
});
import pulumi
import pulumi_aws as aws
example = aws.s3.VectorsVectorBucketPolicy("example",
vector_bucket_arn=example_aws_s3vectors_vector_bucket["arn"],
policy="""{
\"Version\": \"2012-10-17\",
\"Id\": \"writePolicy\",
\"Statement\": [{
\"Sid\": \"writeStatement\",
\"Effect\": \"Allow\",
\"Principal\": {
\"AWS\": \"123456789012\"
},
\"Action\": [
\"s3vectors:PutVectors\"
],
\"Resource\": \"*\"
}]
}
""")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/s3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := s3.NewVectorsVectorBucketPolicy(ctx, "example", &s3.VectorsVectorBucketPolicyArgs{
VectorBucketArn: pulumi.Any(exampleAwsS3vectorsVectorBucket.Arn),
Policy: pulumi.String(`{
\"Version\": \"2012-10-17\",
\"Id\": \"writePolicy\",
\"Statement\": [{
\"Sid\": \"writeStatement\",
\"Effect\": \"Allow\",
\"Principal\": {
\"AWS\": \"123456789012\"
},
\"Action\": [
\"s3vectors:PutVectors\"
],
\"Resource\": \"*\"
}]
}
`),
})
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 = new Aws.S3.VectorsVectorBucketPolicy("example", new()
{
VectorBucketArn = exampleAwsS3vectorsVectorBucket.Arn,
Policy = @"{
\""Version\"": \""2012-10-17\"",
\""Id\"": \""writePolicy\"",
\""Statement\"": [{
\""Sid\"": \""writeStatement\"",
\""Effect\"": \""Allow\"",
\""Principal\"": {
\""AWS\"": \""123456789012\""
},
\""Action\"": [
\""s3vectors:PutVectors\""
],
\""Resource\"": \""*\""
}]
}
",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.VectorsVectorBucketPolicy;
import com.pulumi.aws.s3.VectorsVectorBucketPolicyArgs;
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) {
var example = new VectorsVectorBucketPolicy("example", VectorsVectorBucketPolicyArgs.builder()
.vectorBucketArn(exampleAwsS3vectorsVectorBucket.arn())
.policy("""
{
\"Version\": \"2012-10-17\",
\"Id\": \"writePolicy\",
\"Statement\": [{
\"Sid\": \"writeStatement\",
\"Effect\": \"Allow\",
\"Principal\": {
\"AWS\": \"123456789012\"
},
\"Action\": [
\"s3vectors:PutVectors\"
],
\"Resource\": \"*\"
}]
}
""")
.build());
}
}
resources:
example:
type: aws:s3:VectorsVectorBucketPolicy
properties:
vectorBucketArn: ${exampleAwsS3vectorsVectorBucket.arn}
policy: |
{
\"Version\": \"2012-10-17\",
\"Id\": \"writePolicy\",
\"Statement\": [{
\"Sid\": \"writeStatement\",
\"Effect\": \"Allow\",
\"Principal\": {
\"AWS\": \"123456789012\"
},
\"Action\": [
\"s3vectors:PutVectors\"
],
\"Resource\": \"*\"
}]
}
Create VectorsVectorBucketPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VectorsVectorBucketPolicy(name: string, args: VectorsVectorBucketPolicyArgs, opts?: CustomResourceOptions);@overload
def VectorsVectorBucketPolicy(resource_name: str,
args: VectorsVectorBucketPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def VectorsVectorBucketPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
policy: Optional[str] = None,
vector_bucket_arn: Optional[str] = None,
region: Optional[str] = None)func NewVectorsVectorBucketPolicy(ctx *Context, name string, args VectorsVectorBucketPolicyArgs, opts ...ResourceOption) (*VectorsVectorBucketPolicy, error)public VectorsVectorBucketPolicy(string name, VectorsVectorBucketPolicyArgs args, CustomResourceOptions? opts = null)
public VectorsVectorBucketPolicy(String name, VectorsVectorBucketPolicyArgs args)
public VectorsVectorBucketPolicy(String name, VectorsVectorBucketPolicyArgs args, CustomResourceOptions options)
type: aws:s3:VectorsVectorBucketPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args VectorsVectorBucketPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args VectorsVectorBucketPolicyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args VectorsVectorBucketPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VectorsVectorBucketPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VectorsVectorBucketPolicyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var vectorsVectorBucketPolicyResource = new Aws.S3.VectorsVectorBucketPolicy("vectorsVectorBucketPolicyResource", new()
{
Policy = "string",
VectorBucketArn = "string",
Region = "string",
});
example, err := s3.NewVectorsVectorBucketPolicy(ctx, "vectorsVectorBucketPolicyResource", &s3.VectorsVectorBucketPolicyArgs{
Policy: pulumi.String("string"),
VectorBucketArn: pulumi.String("string"),
Region: pulumi.String("string"),
})
var vectorsVectorBucketPolicyResource = new VectorsVectorBucketPolicy("vectorsVectorBucketPolicyResource", VectorsVectorBucketPolicyArgs.builder()
.policy("string")
.vectorBucketArn("string")
.region("string")
.build());
vectors_vector_bucket_policy_resource = aws.s3.VectorsVectorBucketPolicy("vectorsVectorBucketPolicyResource",
policy="string",
vector_bucket_arn="string",
region="string")
const vectorsVectorBucketPolicyResource = new aws.s3.VectorsVectorBucketPolicy("vectorsVectorBucketPolicyResource", {
policy: "string",
vectorBucketArn: "string",
region: "string",
});
type: aws:s3:VectorsVectorBucketPolicy
properties:
policy: string
region: string
vectorBucketArn: string
VectorsVectorBucketPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The VectorsVectorBucketPolicy resource accepts the following input properties:
- Policy string
- The policy document.
- Vector
Bucket stringArn ARN of the vector bucket.
The following arguments are optional:
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Policy string
- The policy document.
- Vector
Bucket stringArn ARN of the vector bucket.
The following arguments are optional:
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- policy String
- The policy document.
- vector
Bucket StringArn ARN of the vector bucket.
The following arguments are optional:
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- policy string
- The policy document.
- vector
Bucket stringArn ARN of the vector bucket.
The following arguments are optional:
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- policy str
- The policy document.
- vector_
bucket_ strarn ARN of the vector bucket.
The following arguments are optional:
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- policy String
- The policy document.
- vector
Bucket StringArn ARN of the vector bucket.
The following arguments are optional:
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
Outputs
All input properties are implicitly available as output properties. Additionally, the VectorsVectorBucketPolicy resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing VectorsVectorBucketPolicy Resource
Get an existing VectorsVectorBucketPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: VectorsVectorBucketPolicyState, opts?: CustomResourceOptions): VectorsVectorBucketPolicy@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
policy: Optional[str] = None,
region: Optional[str] = None,
vector_bucket_arn: Optional[str] = None) -> VectorsVectorBucketPolicyfunc GetVectorsVectorBucketPolicy(ctx *Context, name string, id IDInput, state *VectorsVectorBucketPolicyState, opts ...ResourceOption) (*VectorsVectorBucketPolicy, error)public static VectorsVectorBucketPolicy Get(string name, Input<string> id, VectorsVectorBucketPolicyState? state, CustomResourceOptions? opts = null)public static VectorsVectorBucketPolicy get(String name, Output<String> id, VectorsVectorBucketPolicyState state, CustomResourceOptions options)resources: _: type: aws:s3:VectorsVectorBucketPolicy get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Policy string
- The policy document.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Vector
Bucket stringArn ARN of the vector bucket.
The following arguments are optional:
- Policy string
- The policy document.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Vector
Bucket stringArn ARN of the vector bucket.
The following arguments are optional:
- policy String
- The policy document.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- vector
Bucket StringArn ARN of the vector bucket.
The following arguments are optional:
- policy string
- The policy document.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- vector
Bucket stringArn ARN of the vector bucket.
The following arguments are optional:
- policy str
- The policy document.
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- vector_
bucket_ strarn ARN of the vector bucket.
The following arguments are optional:
- policy String
- The policy document.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- vector
Bucket StringArn ARN of the vector bucket.
The following arguments are optional:
Import
Using pulumi import, import S3 Vectors Vector Bucket policy using the vector_bucket_arn. For example:
$ pulumi import aws:s3/vectorsVectorBucketPolicy:VectorsVectorBucketPolicy example arn:aws:s3vectors:us-west-2:123456789012:bucket/example-bucket
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
