# CfnDomainAccessGrantForOrganizationProps

Properties for defining a `CfnDomainAccessGrantForOrganization`.

Used as props by: [CfnDomainAccessGrantForOrganization](/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.CfnDomainAccessGrantForOrganization.html)

- Source: Generated at build time
- Type last changed: v2.276.0 · 10 Nov 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudwatch as cloudwatch } from 'aws-cdk-lib';
const cfnDomainAccessGrantForOrganizationProps: cloudwatch.CfnDomainAccessGrantForOrganizationProps = {
  domainId: 'domainId',
  name: 'name',
  permission: 'permission',
  principal: {
    principalType: 'principalType',

    // the properties below are optional
    principalAttributes: [{
      key: 'key',
      value: 'value',
    }],
    principalId: 'principalId',
  },

  // the properties below are optional
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

Python:

```python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_cloudwatch as cloudwatch

cfn_domain_access_grant_for_organization_props = cloudwatch.CfnDomainAccessGrantForOrganizationProps(
    domain_id="domainId",
    name="name",
    permission="permission",
    principal=cloudwatch.CfnDomainAccessGrantForOrganization.OrganizationAccessGrantPrincipalProperty(
        principal_type="principalType",

        # the properties below are optional
        principal_attributes=[cloudwatch.CfnDomainAccessGrantForOrganization.PrincipalAttributeProperty(
            key="key",
            value="value"
        )],
        principal_id="principalId"
    ),

    # the properties below are optional
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.cloudwatch.*;

CfnDomainAccessGrantForOrganizationProps cfnDomainAccessGrantForOrganizationProps = CfnDomainAccessGrantForOrganizationProps.builder()
        .domainId("domainId")
        .name("name")
        .permission("permission")
        .principal(OrganizationAccessGrantPrincipalProperty.builder()
                .principalType("principalType")

                // the properties below are optional
                .principalAttributes(List.of(PrincipalAttributeProperty.builder()
                        .key("key")
                        .value("value")
                        .build()))
                .principalId("principalId")
                .build())

        // the properties below are optional
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CloudWatch;

var cfnDomainAccessGrantForOrganizationProps = new CfnDomainAccessGrantForOrganizationProps {
    DomainId = "domainId",
    Name = "name",
    Permission = "permission",
    Principal = new OrganizationAccessGrantPrincipalProperty {
        PrincipalType = "principalType",

        // the properties below are optional
        PrincipalAttributes = new [] { new PrincipalAttributeProperty {
            Key = "key",
            Value = "value"
        } },
        PrincipalId = "principalId"
    },

    // the properties below are optional
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnDomainAccessGrantForOrganizationProps := &CfnDomainAccessGrantForOrganizationProps{
	DomainId: jsii.String("domainId"),
	Name: jsii.String("name"),
	Permission: jsii.String("permission"),
	Principal: &OrganizationAccessGrantPrincipalProperty{
		PrincipalType: jsii.String("principalType"),

		// the properties below are optional
		PrincipalAttributes: []interface{}{
			&PrincipalAttributeProperty{
				Key: jsii.String("key"),
				Value: jsii.String("value"),
			},
		},
		PrincipalId: jsii.String("principalId"),
	},

	// the properties below are optional
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

- `domainId`: string (required) — The ID of the organization domain the grant belongs to.

- `name`: string (required) — A name that identifies the access grant.

- `permission`: string (required) — The permission granted.

- `principal`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDomainAccessGrantForOrganization.OrganizationAccessGrantPrincipalProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.CfnDomainAccessGrantForOrganization.OrganizationAccessGrantPrincipalProperty.html) (required) — The principal the grant is issued to.

  Supply PrincipalId, or PrincipalAttributes for an attribute-based grant.

- `tags`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — An array of key-value pairs to apply to this resource.
