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

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.102.0 published on Tuesday, Apr 16, 2024 by Pulumi

aws-native.eventschemas.RegistryPolicy

Explore with Pulumi AI

aws-native logo

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.102.0 published on Tuesday, Apr 16, 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.

    Example

    The following reference example uses placeholder values for all input properties.

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    const aws_nativeRegistryPolicyResource = new aws_native.eventschemas.RegistryPolicy("aws-nativeRegistryPolicyResource", {
        policy: "any",
        registryName: "string",
        revisionId: "string",
    });
    
    Coming soon!
    

    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

    The RegistryPolicy resource accepts the following input properties:

    Policy object
    Search the CloudFormation User Guide for AWS::EventSchemas::RegistryPolicy for more information about the expected schema for this property.
    RegistryName string
    RevisionId string
    Policy interface{}
    Search the CloudFormation User Guide for AWS::EventSchemas::RegistryPolicy for more information about the expected schema for this property.
    RegistryName string
    RevisionId string
    policy Object
    Search the CloudFormation User Guide for AWS::EventSchemas::RegistryPolicy for more information about the expected schema for this property.
    registryName String
    revisionId String
    policy any
    Search the CloudFormation User Guide for AWS::EventSchemas::RegistryPolicy for more information about the expected schema for this property.
    registryName string
    revisionId string
    policy Any
    Search the CloudFormation User Guide for AWS::EventSchemas::RegistryPolicy for more information about the expected schema for this property.
    registry_name str
    revision_id str
    policy Any
    Search the CloudFormation User Guide for AWS::EventSchemas::RegistryPolicy for more information about the expected schema for this property.
    registryName String
    revisionId String

    Outputs

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

    AwsId string
    Id string
    The provider-assigned unique ID for this managed resource.
    AwsId string
    Id string
    The provider-assigned unique ID for this managed resource.
    awsId String
    id String
    The provider-assigned unique ID for this managed resource.
    awsId string
    id string
    The provider-assigned unique ID for this managed resource.
    aws_id str
    id str
    The provider-assigned unique ID for this managed resource.
    awsId String
    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

    AWS Native is in preview. AWS Classic is fully supported.

    AWS Native v0.102.0 published on Tuesday, Apr 16, 2024 by Pulumi