# ResourceProps

Construction properties for `Resource`.

Used as props by: [BrowserCustomBase](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-bedrock-agentcore-alpha.BrowserCustomBase.html), [CodeInterpreterCustomBase](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-bedrock-agentcore-alpha.CodeInterpreterCustomBase.html), [EvaluatorBase](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-bedrock-agentcore-alpha.EvaluatorBase.html), GatewayBase, GatewayTargetBase, MemoryBase, OnlineEvaluationBase, PolicyBase, PolicyEngineBase, RuntimeBase, RuntimeEndpointBase, AgentAliasBase, AgentBase, GuardrailBase, InferenceProfileBase, KnowledgeBaseBase, PromptBase, VpcV2Base, ServerlessCacheBase, UserBase, UserGroupBase, AliasBase, BuildBase, FleetBase, GameServerGroupBase, GameSessionQueueBase, MatchmakingConfigurationBase, MatchmakingRuleSetBase, ScriptBase, ContainerRecipeBase, ClusterBase, DatabaseClusterBase, DatabaseInstanceBase, Resource, Authorizer, StageBase, ApiBase, EventApiBase, GraphqlApiBase, BrowserCustomBase, CodeInterpreterCustomBase, EvaluatorBase, GatewayBase, GatewayTargetBase, MemoryBase, OnlineEvaluationBase, PolicyBase, PolicyEngineBase, RuntimeBase, RuntimeEndpointBase, AlarmBase, TableBase, TableBaseV2, VpcEndpoint, VpnConnectionBase, RepositoryBase, FileSystemBase, CatalogBase, Job, JobBase, WorkflowBase, AssessmentTemplate, FunctionBase, QualifiedFunctionBase, WebFunctionBase, WebFunctionEndpointBase, DatabaseClusterBase, DatabaseInstanceBase, BucketBase, Product, InstanceBase, TopicBase, QueueBase

- Source: [`core/lib/resource.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/core/lib/resource.ts#L51)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
const resourceProps: cdk.ResourceProps = {
  account: 'account',
  environmentFromArn: 'environmentFromArn',
  physicalName: 'physicalName',
  region: 'region',
};
```

Python:

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

resource_props = cdk.ResourceProps(
    account="account",
    environment_from_arn="environmentFromArn",
    physical_name="physicalName",
    region="region"
)
```

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

ResourceProps resourceProps = ResourceProps.builder()
        .account("account")
        .environmentFromArn("environmentFromArn")
        .physicalName("physicalName")
        .region("region")
        .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;

var resourceProps = new ResourceProps {
    Account = "account",
    EnvironmentFromArn = "environmentFromArn",
    PhysicalName = "physicalName",
    Region = "region"
};
```

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 cdk "github.com/aws/aws-cdk-go/awscdk"

resourceProps := &ResourceProps{
	Account: jsii.String("account"),
	EnvironmentFromArn: jsii.String("environmentFromArn"),
	PhysicalName: jsii.String("physicalName"),
	Region: jsii.String("region"),
}
```

## Properties

- `account`: string — The AWS account ID this resource belongs to.

  **Default:** the resource is in the same account as the stack it belongs to

- `environmentFromArn`: string — ARN to deduce region and account from.

  **Default:** take environment from `account`, `region` parameters, or use Stack environment.

  The ARN is parsed and the account and region are taken from the ARN.
  This should be used for imported resources.

  Cannot be supplied together with either `account` or `region`.

- `physicalName`: string — The value passed in by users to the physical name prop of the resource.

  **Default:** The physical name will be allocated by CloudFormation at deployment time

  - `undefined` implies that a physical name will be allocated by
    CloudFormation during deployment.
  - a concrete value implies a specific physical name
  - `PhysicalName.GENERATE_IF_NEEDED` is a marker that indicates that a physical will only be generated
    by the CDK if it is needed for cross-environment references. Otherwise, it will be allocated by CloudFormation.

- `region`: string — The AWS region this resource belongs to.

  **Default:** the resource is in the same region as the stack it belongs to
