# CfnHookVersionProps

Properties for defining a `CfnHookVersion`.

Used as props by: [CfnHookVersion](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudformation.CfnHookVersion.html)

- Source: Generated at build time
- Type last changed: v2.13.0 · 19 Feb 2022

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudformation as cloudformation } from 'aws-cdk-lib';
const cfnHookVersionProps: cloudformation.CfnHookVersionProps = {
  schemaHandlerPackage: 'schemaHandlerPackage',
  typeName: 'typeName',

  // the properties below are optional
  executionRoleArn: 'executionRoleArn',
  loggingConfig: {
    logGroupName: 'logGroupName',
    logRoleArn: 'logRoleArn',
  },
};
```

Python:

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

cfn_hook_version_props = cloudformation.CfnHookVersionProps(
    schema_handler_package="schemaHandlerPackage",
    type_name="typeName",

    # the properties below are optional
    execution_role_arn="executionRoleArn",
    logging_config=cloudformation.CfnHookVersion.LoggingConfigProperty(
        log_group_name="logGroupName",
        log_role_arn="logRoleArn"
    )
)
```

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.cloudformation.*;

CfnHookVersionProps cfnHookVersionProps = CfnHookVersionProps.builder()
        .schemaHandlerPackage("schemaHandlerPackage")
        .typeName("typeName")

        // the properties below are optional
        .executionRoleArn("executionRoleArn")
        .loggingConfig(LoggingConfigProperty.builder()
                .logGroupName("logGroupName")
                .logRoleArn("logRoleArn")
                .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.CloudFormation;

var cfnHookVersionProps = new CfnHookVersionProps {
    SchemaHandlerPackage = "schemaHandlerPackage",
    TypeName = "typeName",

    // the properties below are optional
    ExecutionRoleArn = "executionRoleArn",
    LoggingConfig = new LoggingConfigProperty {
        LogGroupName = "logGroupName",
        LogRoleArn = "logRoleArn"
    }
};
```

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"

cfnHookVersionProps := &CfnHookVersionProps{
	SchemaHandlerPackage: jsii.String("schemaHandlerPackage"),
	TypeName: jsii.String("typeName"),

	// the properties below are optional
	ExecutionRoleArn: jsii.String("executionRoleArn"),
	LoggingConfig: &LoggingConfigProperty{
		LogGroupName: jsii.String("logGroupName"),
		LogRoleArn: jsii.String("logRoleArn"),
	},
}
```

## Properties

- `executionRoleArn`: string — The Amazon Resource Name (ARN) of the task execution role that grants the Hook permission.

- `loggingConfig`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnHookVersion.LoggingConfigProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudformation.CfnHookVersion.LoggingConfigProperty.html) — Contains logging configuration information for an extension.

- `schemaHandlerPackage`: string (required) — A URL to the Amazon S3 bucket for the Hook project package that contains the necessary files for the Hook you want to register.

  For information on generating a schema handler package, see [Modeling custom CloudFormation Hooks](https://docs.aws.amazon.com/cloudformation-cli/latest/hooks-userguide/hooks-model.html) in the *CloudFormation Hooks User Guide* .

  > To register the Hook, you must have `s3:GetObject` permissions to access the S3 objects.

- `typeName`: string (required) — The unique name for your Hook.

  Specifies a three-part namespace for your Hook, with a recommended pattern of `Organization::Service::Hook` .

  > The following organization namespaces are reserved and can't be used in your Hook type names:
  >
  > - `Alexa`
  > - `AMZN`
  > - `Amazon`
  > - `ASK`
  > - `AWS`
  > - `Custom`
  > - `Dev`
