published on Tuesday, Mar 10, 2026 by Pulumi
published on Tuesday, Mar 10, 2026 by Pulumi
Resource for managing an AWS EventBridge Schemas Registry Policy.
Example Usage
Basic Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var examplePolicyDocument = Aws.Iam.GetPolicyDocument.Invoke(new()
{
Statements = new[]
{
new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs
{
Sid = "example",
Effect = "Allow",
Principals = new[]
{
new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs
{
Type = "AWS",
Identifiers = new[]
{
"109876543210",
},
},
},
Actions = new[]
{
"schemas:*",
},
Resources = new[]
{
"arn:aws:schemas:us-east-1:012345678901:registry/example",
"arn:aws:schemas:us-east-1:012345678901:schema/example*",
},
},
},
});
var exampleRegistryPolicy = new Aws.Schemas.RegistryPolicy("exampleRegistryPolicy", new()
{
RegistryName = "example",
Policy = examplePolicyDocument.Apply(getPolicyDocumentResult => getPolicyDocumentResult.Json),
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/iam"
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/schemas"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
examplePolicyDocument, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
Statements: []iam.GetPolicyDocumentStatement{
{
Sid: pulumi.StringRef("example"),
Effect: pulumi.StringRef("Allow"),
Principals: []iam.GetPolicyDocumentStatementPrincipal{
{
Type: "AWS",
Identifiers: []string{
"109876543210",
},
},
},
Actions: []string{
"schemas:*",
},
Resources: []string{
"arn:aws:schemas:us-east-1:012345678901:registry/example",
"arn:aws:schemas:us-east-1:012345678901:schema/example*",
},
},
},
}, nil)
if err != nil {
return err
}
_, err = schemas.NewRegistryPolicy(ctx, "exampleRegistryPolicy", &schemas.RegistryPolicyArgs{
RegistryName: pulumi.String("example"),
Policy: *pulumi.String(examplePolicyDocument.Json),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.iam.IamFunctions;
import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
import com.pulumi.aws.schemas.RegistryPolicy;
import com.pulumi.aws.schemas.RegistryPolicyArgs;
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 examplePolicyDocument = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
.statements(GetPolicyDocumentStatementArgs.builder()
.sid("example")
.effect("Allow")
.principals(GetPolicyDocumentStatementPrincipalArgs.builder()
.type("AWS")
.identifiers("109876543210")
.build())
.actions("schemas:*")
.resources(
"arn:aws:schemas:us-east-1:012345678901:registry/example",
"arn:aws:schemas:us-east-1:012345678901:schema/example*")
.build())
.build());
var exampleRegistryPolicy = new RegistryPolicy("exampleRegistryPolicy", RegistryPolicyArgs.builder()
.registryName("example")
.policy(examplePolicyDocument.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const examplePolicyDocument = aws.iam.getPolicyDocument({
statements: [{
sid: "example",
effect: "Allow",
principals: [{
type: "AWS",
identifiers: ["109876543210"],
}],
actions: ["schemas:*"],
resources: [
"arn:aws:schemas:us-east-1:012345678901:registry/example",
"arn:aws:schemas:us-east-1:012345678901:schema/example*",
],
}],
});
const exampleRegistryPolicy = new aws.schemas.RegistryPolicy("exampleRegistryPolicy", {
registryName: "example",
policy: examplePolicyDocument.then(examplePolicyDocument => examplePolicyDocument.json),
});
import pulumi
import pulumi_aws as aws
example_policy_document = aws.iam.get_policy_document(statements=[aws.iam.GetPolicyDocumentStatementArgs(
sid="example",
effect="Allow",
principals=[aws.iam.GetPolicyDocumentStatementPrincipalArgs(
type="AWS",
identifiers=["109876543210"],
)],
actions=["schemas:*"],
resources=[
"arn:aws:schemas:us-east-1:012345678901:registry/example",
"arn:aws:schemas:us-east-1:012345678901:schema/example*",
],
)])
example_registry_policy = aws.schemas.RegistryPolicy("exampleRegistryPolicy",
registry_name="example",
policy=example_policy_document.json)
resources:
exampleRegistryPolicy:
type: aws:schemas:RegistryPolicy
properties:
registryName: example
policy: ${examplePolicyDocument.json}
variables:
examplePolicyDocument:
fn::invoke:
Function: aws:iam:getPolicyDocument
Arguments:
statements:
- sid: example
effect: Allow
principals:
- type: AWS
identifiers:
- '109876543210'
actions:
- schemas:*
resources:
- arn:aws:schemas:us-east-1:012345678901:registry/example
- arn:aws:schemas:us-east-1:012345678901:schema/example*
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[str] = None,
registry_name: 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:schemas: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.
Constructor example
The following reference example uses placeholder values for all input properties.
var awsRegistryPolicyResource = new Aws.Schemas.RegistryPolicy("awsRegistryPolicyResource", new()
{
Policy = "string",
RegistryName = "string",
});
example, err := schemas.NewRegistryPolicy(ctx, "awsRegistryPolicyResource", &schemas.RegistryPolicyArgs{
Policy: pulumi.String("string"),
RegistryName: pulumi.String("string"),
})
var awsRegistryPolicyResource = new com.pulumi.aws.schemas.RegistryPolicy("awsRegistryPolicyResource", com.pulumi.aws.schemas.RegistryPolicyArgs.builder()
.policy("string")
.registryName("string")
.build());
aws_registry_policy_resource = aws.schemas.RegistryPolicy("awsRegistryPolicyResource",
policy="string",
registry_name="string")
const awsRegistryPolicyResource = new aws.schemas.RegistryPolicy("awsRegistryPolicyResource", {
policy: "string",
registryName: "string",
});
type: aws:schemas:RegistryPolicy
properties:
policy: string
registryName: string
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 string
- Resource Policy for EventBridge Schema Registry
- Registry
Name string - Name of EventBridge Schema Registry
- Policy string
- Resource Policy for EventBridge Schema Registry
- Registry
Name string - Name of EventBridge Schema Registry
- policy String
- Resource Policy for EventBridge Schema Registry
- registry
Name String - Name of EventBridge Schema Registry
- policy string
- Resource Policy for EventBridge Schema Registry
- registry
Name string - Name of EventBridge Schema Registry
- policy str
- Resource Policy for EventBridge Schema Registry
- registry_
name str - Name of EventBridge Schema Registry
- policy String
- Resource Policy for EventBridge Schema Registry
- registry
Name String - Name of EventBridge Schema Registry
Outputs
All input properties are implicitly available as output properties. Additionally, the RegistryPolicy 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 RegistryPolicy Resource
Get an existing RegistryPolicy 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?: RegistryPolicyState, opts?: CustomResourceOptions): RegistryPolicy@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
policy: Optional[str] = None,
registry_name: Optional[str] = None) -> RegistryPolicyfunc GetRegistryPolicy(ctx *Context, name string, id IDInput, state *RegistryPolicyState, opts ...ResourceOption) (*RegistryPolicy, error)public static RegistryPolicy Get(string name, Input<string> id, RegistryPolicyState? state, CustomResourceOptions? opts = null)public static RegistryPolicy get(String name, Output<String> id, RegistryPolicyState state, CustomResourceOptions options)resources: _: type: aws:schemas:RegistryPolicy 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
- Resource Policy for EventBridge Schema Registry
- Registry
Name string - Name of EventBridge Schema Registry
- Policy string
- Resource Policy for EventBridge Schema Registry
- Registry
Name string - Name of EventBridge Schema Registry
- policy String
- Resource Policy for EventBridge Schema Registry
- registry
Name String - Name of EventBridge Schema Registry
- policy string
- Resource Policy for EventBridge Schema Registry
- registry
Name string - Name of EventBridge Schema Registry
- policy str
- Resource Policy for EventBridge Schema Registry
- registry_
name str - Name of EventBridge Schema Registry
- policy String
- Resource Policy for EventBridge Schema Registry
- registry
Name String - Name of EventBridge Schema Registry
Import
EventBridge Schema Registry Policy can be imported using the registry_name, e.g.,
$ pulumi import aws:schemas/registryPolicy:RegistryPolicy example example
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.
published on Tuesday, Mar 10, 2026 by Pulumi
