# ComponentDependencyRequirementProperty

Contains information about a component dependency for a Lambda function component.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_greengrassv2 as greengrassv2 } from 'aws-cdk-lib';
const componentDependencyRequirementProperty: greengrassv2.CfnComponentVersion.ComponentDependencyRequirementProperty = {
  dependencyType: 'dependencyType',
  versionRequirement: 'versionRequirement',
};
```

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_greengrassv2 as greengrassv2

component_dependency_requirement_property = greengrassv2.CfnComponentVersion.ComponentDependencyRequirementProperty(
    dependency_type="dependencyType",
    version_requirement="versionRequirement"
)
```

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

ComponentDependencyRequirementProperty componentDependencyRequirementProperty = ComponentDependencyRequirementProperty.builder()
        .dependencyType("dependencyType")
        .versionRequirement("versionRequirement")
        .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.GreengrassV2;

var componentDependencyRequirementProperty = new ComponentDependencyRequirementProperty {
    DependencyType = "dependencyType",
    VersionRequirement = "versionRequirement"
};
```

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"

componentDependencyRequirementProperty := &ComponentDependencyRequirementProperty{
	DependencyType: jsii.String("dependencyType"),
	VersionRequirement: jsii.String("versionRequirement"),
}
```

## Properties

- `dependencyType`: string — The type of this dependency. Choose from the following options:.

  - `SOFT` – The component doesn't restart if the dependency changes state.
  - `HARD` – The component restarts if the dependency changes state.

  Default: `HARD`

- `versionRequirement`: string — The component version requirement for the component dependency.

  AWS IoT Greengrass uses semantic version constraints. For more information, see [Semantic Versioning](https://docs.aws.amazon.com/https://semver.org/) .
