1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. eventschemas
  5. RegistryPolicy

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.9.0 published on Monday, Nov 18, 2024 by Pulumi

aws-native.eventschemas.RegistryPolicy

Explore with Pulumi AI

aws-native logo

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.9.0 published on Monday, Nov 18, 2024 by Pulumi

    Resource Type definition for AWS::EventSchemas::RegistryPolicy

    Example Usage

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var registryPolicy = new AwsNative.EventSchemas.RegistryPolicy("registryPolicy", new()
        {
            RegistryName = "registryName",
            Policy = new Dictionary<string, object?>
            {
                ["version"] = "2012-10-17",
                ["statement"] = new Dictionary<string, object?>
                {
                    ["sid"] = 1,
                    ["effect"] = "Allow",
                    ["principal"] = new Dictionary<string, object?>
                    {
                        ["aws"] = "arn:aws:iam::012345678901:user/TestAccountForRegistryPolicy",
                    },
                    ["action"] = new[]
                    {
                        "schemas:DescribeRegistry",
                        "schemas:CreateSchema",
                    },
                    ["resource"] = "registryArn",
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/eventschemas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := eventschemas.NewRegistryPolicy(ctx, "registryPolicy", &eventschemas.RegistryPolicyArgs{
    			RegistryName: pulumi.String("registryName"),
    			Policy: pulumi.Any(map[string]interface{}{
    				"version": "2012-10-17",
    				"statement": map[string]interface{}{
    					"sid":    1,
    					"effect": "Allow",
    					"principal": map[string]interface{}{
    						"aws": "arn:aws:iam::012345678901:user/TestAccountForRegistryPolicy",
    					},
    					"action": []string{
    						"schemas:DescribeRegistry",
    						"schemas:CreateSchema",
    					},
    					"resource": "registryArn",
    				},
    			}),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    registry_policy = aws_native.eventschemas.RegistryPolicy("registryPolicy",
        registry_name="registryName",
        policy={
            "version": "2012-10-17",
            "statement": {
                "sid": 1,
                "effect": "Allow",
                "principal": {
                    "aws": "arn:aws:iam::012345678901:user/TestAccountForRegistryPolicy",
                },
                "action": [
                    "schemas:DescribeRegistry",
                    "schemas:CreateSchema",
                ],
                "resource": "registryArn",
            },
        })
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const registryPolicy = new aws_native.eventschemas.RegistryPolicy("registryPolicy", {
        registryName: "registryName",
        policy: {
            version: "2012-10-17",
            statement: {
                sid: 1,
                effect: "Allow",
                principal: {
                    aws: "arn:aws:iam::012345678901:user/TestAccountForRegistryPolicy",
                },
                action: [
                    "schemas:DescribeRegistry",
                    "schemas:CreateSchema",
                ],
                resource: "registryArn",
            },
        },
    });
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var registryPolicy = new AwsNative.EventSchemas.RegistryPolicy("registryPolicy", new()
        {
            RegistryName = "MyRegistry",
            Policy = new Dictionary<string, object?>
            {
                ["version"] = "2012-10-17",
                ["statement"] = new[]
                {
                    new Dictionary<string, object?>
                    {
                        ["sid"] = "Test",
                        ["effect"] = "Allow",
                        ["action"] = new[]
                        {
                            "schemas:*",
                        },
                        ["principal"] = new Dictionary<string, object?>
                        {
                            ["aws"] = new[]
                            {
                                "109876543210",
                            },
                        },
                        ["resource"] = new[]
                        {
                            "arn:aws:schemas:us-east-1:012345678901:registry/MyRegistry",
                            "arn:aws:schemas:us-east-1:012345678901:schema/MyRegistry*",
                        },
                    },
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/eventschemas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := eventschemas.NewRegistryPolicy(ctx, "registryPolicy", &eventschemas.RegistryPolicyArgs{
    			RegistryName: pulumi.String("MyRegistry"),
    			Policy: pulumi.Any(map[string]interface{}{
    				"version": "2012-10-17",
    				"statement": []map[string]interface{}{
    					map[string]interface{}{
    						"sid":    "Test",
    						"effect": "Allow",
    						"action": []string{
    							"schemas:*",
    						},
    						"principal": map[string]interface{}{
    							"aws": []string{
    								"109876543210",
    							},
    						},
    						"resource": []string{
    							"arn:aws:schemas:us-east-1:012345678901:registry/MyRegistry",
    							"arn:aws:schemas:us-east-1:012345678901:schema/MyRegistry*",
    						},
    					},
    				},
    			}),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    registry_policy = aws_native.eventschemas.RegistryPolicy("registryPolicy",
        registry_name="MyRegistry",
        policy={
            "version": "2012-10-17",
            "statement": [{
                "sid": "Test",
                "effect": "Allow",
                "action": ["schemas:*"],
                "principal": {
                    "aws": ["109876543210"],
                },
                "resource": [
                    "arn:aws:schemas:us-east-1:012345678901:registry/MyRegistry",
                    "arn:aws:schemas:us-east-1:012345678901:schema/MyRegistry*",
                ],
            }],
        })
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const registryPolicy = new aws_native.eventschemas.RegistryPolicy("registryPolicy", {
        registryName: "MyRegistry",
        policy: {
            version: "2012-10-17",
            statement: [{
                sid: "Test",
                effect: "Allow",
                action: ["schemas:*"],
                principal: {
                    aws: ["109876543210"],
                },
                resource: [
                    "arn:aws:schemas:us-east-1:012345678901:registry/MyRegistry",
                    "arn:aws:schemas:us-east-1:012345678901:schema/MyRegistry*",
                ],
            }],
        },
    });
    

    Coming soon!

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var registryPolicy = new AwsNative.EventSchemas.RegistryPolicy("registryPolicy", new()
        {
            RegistryName = "MyRegistry",
            Policy = new Dictionary<string, object?>
            {
                ["version"] = "2012-10-17",
                ["statement"] = new[]
                {
                    new Dictionary<string, object?>
                    {
                        ["sid"] = "Test",
                        ["effect"] = "Allow",
                        ["action"] = new[]
                        {
                            "schemas:*",
                        },
                        ["principal"] = new Dictionary<string, object?>
                        {
                            ["aws"] = new[]
                            {
                                "109876543210",
                            },
                        },
                        ["resource"] = new[]
                        {
                            "arn:aws:schemas:us-east-1:012345678901:registry/MyRegistry",
                            "arn:aws:schemas:us-east-1:012345678901:schema/MyRegistry*",
                        },
                    },
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/eventschemas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := eventschemas.NewRegistryPolicy(ctx, "registryPolicy", &eventschemas.RegistryPolicyArgs{
    			RegistryName: pulumi.String("MyRegistry"),
    			Policy: pulumi.Any(map[string]interface{}{
    				"version": "2012-10-17",
    				"statement": []map[string]interface{}{
    					map[string]interface{}{
    						"sid":    "Test",
    						"effect": "Allow",
    						"action": []string{
    							"schemas:*",
    						},
    						"principal": map[string]interface{}{
    							"aws": []string{
    								"109876543210",
    							},
    						},
    						"resource": []string{
    							"arn:aws:schemas:us-east-1:012345678901:registry/MyRegistry",
    							"arn:aws:schemas:us-east-1:012345678901:schema/MyRegistry*",
    						},
    					},
    				},
    			}),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    registry_policy = aws_native.eventschemas.RegistryPolicy("registryPolicy",
        registry_name="MyRegistry",
        policy={
            "version": "2012-10-17",
            "statement": [{
                "sid": "Test",
                "effect": "Allow",
                "action": ["schemas:*"],
                "principal": {
                    "aws": ["109876543210"],
                },
                "resource": [
                    "arn:aws:schemas:us-east-1:012345678901:registry/MyRegistry",
                    "arn:aws:schemas:us-east-1:012345678901:schema/MyRegistry*",
                ],
            }],
        })
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const registryPolicy = new aws_native.eventschemas.RegistryPolicy("registryPolicy", {
        registryName: "MyRegistry",
        policy: {
            version: "2012-10-17",
            statement: [{
                sid: "Test",
                effect: "Allow",
                action: ["schemas:*"],
                principal: {
                    aws: ["109876543210"],
                },
                resource: [
                    "arn:aws:schemas:us-east-1:012345678901:registry/MyRegistry",
                    "arn:aws:schemas:us-east-1:012345678901:schema/MyRegistry*",
                ],
            }],
        },
    });
    

    Coming soon!

    Create RegistryPolicy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new RegistryPolicy(name: string, args: RegistryPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def RegistryPolicy(resource_name: str,
                       args: RegistryPolicyArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def RegistryPolicy(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       policy: Optional[Any] = None,
                       registry_name: Optional[str] = None,
                       revision_id: Optional[str] = None)
    func NewRegistryPolicy(ctx *Context, name string, args RegistryPolicyArgs, opts ...ResourceOption) (*RegistryPolicy, error)
    public RegistryPolicy(string name, RegistryPolicyArgs args, CustomResourceOptions? opts = null)
    public RegistryPolicy(String name, RegistryPolicyArgs args)
    public RegistryPolicy(String name, RegistryPolicyArgs args, CustomResourceOptions options)
    
    type: aws-native:eventschemas:RegistryPolicy
    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 RegistryPolicyArgs
    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 RegistryPolicyArgs
    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 RegistryPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RegistryPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RegistryPolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    RegistryPolicy 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 RegistryPolicy resource accepts the following input properties:

    Policy object

    A resource-based policy.

    Search the CloudFormation User Guide for AWS::EventSchemas::RegistryPolicy for more information about the expected schema for this property.

    RegistryName string
    The name of the registry.
    RevisionId string
    The revision ID of the policy.
    Policy interface{}

    A resource-based policy.

    Search the CloudFormation User Guide for AWS::EventSchemas::RegistryPolicy for more information about the expected schema for this property.

    RegistryName string
    The name of the registry.
    RevisionId string
    The revision ID of the policy.
    policy Object

    A resource-based policy.

    Search the CloudFormation User Guide for AWS::EventSchemas::RegistryPolicy for more information about the expected schema for this property.

    registryName String
    The name of the registry.
    revisionId String
    The revision ID of the policy.
    policy any

    A resource-based policy.

    Search the CloudFormation User Guide for AWS::EventSchemas::RegistryPolicy for more information about the expected schema for this property.

    registryName string
    The name of the registry.
    revisionId string
    The revision ID of the policy.
    policy Any

    A resource-based policy.

    Search the CloudFormation User Guide for AWS::EventSchemas::RegistryPolicy for more information about the expected schema for this property.

    registry_name str
    The name of the registry.
    revision_id str
    The revision ID of the policy.
    policy Any

    A resource-based policy.

    Search the CloudFormation User Guide for AWS::EventSchemas::RegistryPolicy for more information about the expected schema for this property.

    registryName String
    The name of the registry.
    revisionId String
    The revision ID of the policy.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the RegistryPolicy resource produces the following output properties:

    AwsId string
    The ID of the policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    AwsId string
    The ID of the policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    awsId String
    The ID of the policy.
    id String
    The provider-assigned unique ID for this managed resource.
    awsId string
    The ID of the policy.
    id string
    The provider-assigned unique ID for this managed resource.
    aws_id str
    The ID of the policy.
    id str
    The provider-assigned unique ID for this managed resource.
    awsId String
    The ID of the policy.
    id String
    The provider-assigned unique ID for this managed resource.

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    We recommend new projects start with resources from the AWS provider.

    AWS Cloud Control v1.9.0 published on Monday, Nov 18, 2024 by Pulumi