# NetworkConfigurationProperty

The network configuration for jobs that are running on Fargate resources.

Jobs that are running on Amazon EC2 resources must not specify this parameter.

- 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_batch as batch } from 'aws-cdk-lib';
const networkConfigurationProperty: batch.CfnJobDefinition.NetworkConfigurationProperty = {
  assignPublicIp: 'assignPublicIp',
};
```

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_batch as batch

network_configuration_property = batch.CfnJobDefinition.NetworkConfigurationProperty(
    assign_public_ip="assignPublicIp"
)
```

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

NetworkConfigurationProperty networkConfigurationProperty = NetworkConfigurationProperty.builder()
        .assignPublicIp("assignPublicIp")
        .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.Batch;

var networkConfigurationProperty = new NetworkConfigurationProperty {
    AssignPublicIp = "assignPublicIp"
};
```

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"

networkConfigurationProperty := &NetworkConfigurationProperty{
	AssignPublicIp: jsii.String("assignPublicIp"),
}
```

## Properties

- `assignPublicIp`: string — Indicates whether the job has a public IP address.

  For a job that's running on Fargate resources in a private subnet to send outbound traffic to the internet (for example, to pull container images), the private subnet requires a NAT gateway be attached to route requests to the internet. For more information, see [Amazon ECS task networking](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html) in the *Amazon Elastic Container Service Developer Guide* . The default value is " `DISABLED` ".
