databricks.AccountNetworkPolicy
Explore with Pulumi AI
Import
As of terraform v1.5, resources can be imported through configuration.
hcl
import {
id = network_policy_id
to = databricks_account_network_policy.this
}
If you are using an older version of terraform, you can import the resource using cli as follows:
$ pulumi import databricks:index/accountNetworkPolicy:AccountNetworkPolicy databricks_account_network_policy network_policy_id
Create AccountNetworkPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AccountNetworkPolicy(name: string, args?: AccountNetworkPolicyArgs, opts?: CustomResourceOptions);
@overload
def AccountNetworkPolicy(resource_name: str,
args: Optional[AccountNetworkPolicyArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def AccountNetworkPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
egress: Optional[AccountNetworkPolicyEgressArgs] = None,
network_policy_id: Optional[str] = None)
func NewAccountNetworkPolicy(ctx *Context, name string, args *AccountNetworkPolicyArgs, opts ...ResourceOption) (*AccountNetworkPolicy, error)
public AccountNetworkPolicy(string name, AccountNetworkPolicyArgs? args = null, CustomResourceOptions? opts = null)
public AccountNetworkPolicy(String name, AccountNetworkPolicyArgs args)
public AccountNetworkPolicy(String name, AccountNetworkPolicyArgs args, CustomResourceOptions options)
type: databricks:AccountNetworkPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args AccountNetworkPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AccountNetworkPolicyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AccountNetworkPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AccountNetworkPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AccountNetworkPolicyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var accountNetworkPolicyResource = new Databricks.AccountNetworkPolicy("accountNetworkPolicyResource", new()
{
AccountId = "string",
Egress = new Databricks.Inputs.AccountNetworkPolicyEgressArgs
{
NetworkAccess = new Databricks.Inputs.AccountNetworkPolicyEgressNetworkAccessArgs
{
RestrictionMode = "string",
AllowedInternetDestinations = new[]
{
new Databricks.Inputs.AccountNetworkPolicyEgressNetworkAccessAllowedInternetDestinationArgs
{
Destination = "string",
InternetDestinationType = "string",
},
},
AllowedStorageDestinations = new[]
{
new Databricks.Inputs.AccountNetworkPolicyEgressNetworkAccessAllowedStorageDestinationArgs
{
AzureStorageAccount = "string",
AzureStorageService = "string",
BucketName = "string",
Region = "string",
StorageDestinationType = "string",
},
},
PolicyEnforcement = new Databricks.Inputs.AccountNetworkPolicyEgressNetworkAccessPolicyEnforcementArgs
{
DryRunModeProductFilters = new[]
{
"string",
},
EnforcementMode = "string",
},
},
},
NetworkPolicyId = "string",
});
example, err := databricks.NewAccountNetworkPolicy(ctx, "accountNetworkPolicyResource", &databricks.AccountNetworkPolicyArgs{
AccountId: pulumi.String("string"),
Egress: &databricks.AccountNetworkPolicyEgressArgs{
NetworkAccess: &databricks.AccountNetworkPolicyEgressNetworkAccessArgs{
RestrictionMode: pulumi.String("string"),
AllowedInternetDestinations: databricks.AccountNetworkPolicyEgressNetworkAccessAllowedInternetDestinationArray{
&databricks.AccountNetworkPolicyEgressNetworkAccessAllowedInternetDestinationArgs{
Destination: pulumi.String("string"),
InternetDestinationType: pulumi.String("string"),
},
},
AllowedStorageDestinations: databricks.AccountNetworkPolicyEgressNetworkAccessAllowedStorageDestinationArray{
&databricks.AccountNetworkPolicyEgressNetworkAccessAllowedStorageDestinationArgs{
AzureStorageAccount: pulumi.String("string"),
AzureStorageService: pulumi.String("string"),
BucketName: pulumi.String("string"),
Region: pulumi.String("string"),
StorageDestinationType: pulumi.String("string"),
},
},
PolicyEnforcement: &databricks.AccountNetworkPolicyEgressNetworkAccessPolicyEnforcementArgs{
DryRunModeProductFilters: pulumi.StringArray{
pulumi.String("string"),
},
EnforcementMode: pulumi.String("string"),
},
},
},
NetworkPolicyId: pulumi.String("string"),
})
var accountNetworkPolicyResource = new AccountNetworkPolicy("accountNetworkPolicyResource", AccountNetworkPolicyArgs.builder()
.accountId("string")
.egress(AccountNetworkPolicyEgressArgs.builder()
.networkAccess(AccountNetworkPolicyEgressNetworkAccessArgs.builder()
.restrictionMode("string")
.allowedInternetDestinations(AccountNetworkPolicyEgressNetworkAccessAllowedInternetDestinationArgs.builder()
.destination("string")
.internetDestinationType("string")
.build())
.allowedStorageDestinations(AccountNetworkPolicyEgressNetworkAccessAllowedStorageDestinationArgs.builder()
.azureStorageAccount("string")
.azureStorageService("string")
.bucketName("string")
.region("string")
.storageDestinationType("string")
.build())
.policyEnforcement(AccountNetworkPolicyEgressNetworkAccessPolicyEnforcementArgs.builder()
.dryRunModeProductFilters("string")
.enforcementMode("string")
.build())
.build())
.build())
.networkPolicyId("string")
.build());
account_network_policy_resource = databricks.AccountNetworkPolicy("accountNetworkPolicyResource",
account_id="string",
egress={
"network_access": {
"restriction_mode": "string",
"allowed_internet_destinations": [{
"destination": "string",
"internet_destination_type": "string",
}],
"allowed_storage_destinations": [{
"azure_storage_account": "string",
"azure_storage_service": "string",
"bucket_name": "string",
"region": "string",
"storage_destination_type": "string",
}],
"policy_enforcement": {
"dry_run_mode_product_filters": ["string"],
"enforcement_mode": "string",
},
},
},
network_policy_id="string")
const accountNetworkPolicyResource = new databricks.AccountNetworkPolicy("accountNetworkPolicyResource", {
accountId: "string",
egress: {
networkAccess: {
restrictionMode: "string",
allowedInternetDestinations: [{
destination: "string",
internetDestinationType: "string",
}],
allowedStorageDestinations: [{
azureStorageAccount: "string",
azureStorageService: "string",
bucketName: "string",
region: "string",
storageDestinationType: "string",
}],
policyEnforcement: {
dryRunModeProductFilters: ["string"],
enforcementMode: "string",
},
},
},
networkPolicyId: "string",
});
type: databricks:AccountNetworkPolicy
properties:
accountId: string
egress:
networkAccess:
allowedInternetDestinations:
- destination: string
internetDestinationType: string
allowedStorageDestinations:
- azureStorageAccount: string
azureStorageService: string
bucketName: string
region: string
storageDestinationType: string
policyEnforcement:
dryRunModeProductFilters:
- string
enforcementMode: string
restrictionMode: string
networkPolicyId: string
AccountNetworkPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The AccountNetworkPolicy resource accepts the following input properties:
- Account
Id string - The associated account ID for this Network Policy object
- Egress
Account
Network Policy Egress - The network policies applying for egress traffic
- Network
Policy stringId - The unique identifier for the network policy
- Account
Id string - The associated account ID for this Network Policy object
- Egress
Account
Network Policy Egress Args - The network policies applying for egress traffic
- Network
Policy stringId - The unique identifier for the network policy
- account
Id String - The associated account ID for this Network Policy object
- egress
Account
Network Policy Egress - The network policies applying for egress traffic
- network
Policy StringId - The unique identifier for the network policy
- account
Id string - The associated account ID for this Network Policy object
- egress
Account
Network Policy Egress - The network policies applying for egress traffic
- network
Policy stringId - The unique identifier for the network policy
- account_
id str - The associated account ID for this Network Policy object
- egress
Account
Network Policy Egress Args - The network policies applying for egress traffic
- network_
policy_ strid - The unique identifier for the network policy
- account
Id String - The associated account ID for this Network Policy object
- egress Property Map
- The network policies applying for egress traffic
- network
Policy StringId - The unique identifier for the network policy
Outputs
All input properties are implicitly available as output properties. Additionally, the AccountNetworkPolicy resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing AccountNetworkPolicy Resource
Get an existing AccountNetworkPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AccountNetworkPolicyState, opts?: CustomResourceOptions): AccountNetworkPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
egress: Optional[AccountNetworkPolicyEgressArgs] = None,
network_policy_id: Optional[str] = None) -> AccountNetworkPolicy
func GetAccountNetworkPolicy(ctx *Context, name string, id IDInput, state *AccountNetworkPolicyState, opts ...ResourceOption) (*AccountNetworkPolicy, error)
public static AccountNetworkPolicy Get(string name, Input<string> id, AccountNetworkPolicyState? state, CustomResourceOptions? opts = null)
public static AccountNetworkPolicy get(String name, Output<String> id, AccountNetworkPolicyState state, CustomResourceOptions options)
resources: _: type: databricks:AccountNetworkPolicy get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Account
Id string - The associated account ID for this Network Policy object
- Egress
Account
Network Policy Egress - The network policies applying for egress traffic
- Network
Policy stringId - The unique identifier for the network policy
- Account
Id string - The associated account ID for this Network Policy object
- Egress
Account
Network Policy Egress Args - The network policies applying for egress traffic
- Network
Policy stringId - The unique identifier for the network policy
- account
Id String - The associated account ID for this Network Policy object
- egress
Account
Network Policy Egress - The network policies applying for egress traffic
- network
Policy StringId - The unique identifier for the network policy
- account
Id string - The associated account ID for this Network Policy object
- egress
Account
Network Policy Egress - The network policies applying for egress traffic
- network
Policy stringId - The unique identifier for the network policy
- account_
id str - The associated account ID for this Network Policy object
- egress
Account
Network Policy Egress Args - The network policies applying for egress traffic
- network_
policy_ strid - The unique identifier for the network policy
- account
Id String - The associated account ID for this Network Policy object
- egress Property Map
- The network policies applying for egress traffic
- network
Policy StringId - The unique identifier for the network policy
Supporting Types
AccountNetworkPolicyEgress, AccountNetworkPolicyEgressArgs
- Network
Access AccountNetwork Policy Egress Network Access - The access policy enforced for egress traffic to the internet
- Network
Access AccountNetwork Policy Egress Network Access - The access policy enforced for egress traffic to the internet
- network
Access AccountNetwork Policy Egress Network Access - The access policy enforced for egress traffic to the internet
- network
Access AccountNetwork Policy Egress Network Access - The access policy enforced for egress traffic to the internet
- network_
access AccountNetwork Policy Egress Network Access - The access policy enforced for egress traffic to the internet
- network
Access Property Map - The access policy enforced for egress traffic to the internet
AccountNetworkPolicyEgressNetworkAccess, AccountNetworkPolicyEgressNetworkAccessArgs
- Restriction
Mode string - The restriction mode that controls how serverless workloads can access the internet. Possible values are: FULL_ACCESS, RESTRICTED_ACCESS
- Allowed
Internet List<AccountDestinations Network Policy Egress Network Access Allowed Internet Destination> - List of internet destinations that serverless workloads are allowed to access when in RESTRICTED_ACCESS mode
- Allowed
Storage List<AccountDestinations Network Policy Egress Network Access Allowed Storage Destination> - List of storage destinations that serverless workloads are allowed to access when in RESTRICTED_ACCESS mode
- Policy
Enforcement AccountNetwork Policy Egress Network Access Policy Enforcement - Optional. When policy_enforcement is not provided, we default to ENFORCE_MODE_ALL_SERVICES
- Restriction
Mode string - The restriction mode that controls how serverless workloads can access the internet. Possible values are: FULL_ACCESS, RESTRICTED_ACCESS
- Allowed
Internet []AccountDestinations Network Policy Egress Network Access Allowed Internet Destination - List of internet destinations that serverless workloads are allowed to access when in RESTRICTED_ACCESS mode
- Allowed
Storage []AccountDestinations Network Policy Egress Network Access Allowed Storage Destination - List of storage destinations that serverless workloads are allowed to access when in RESTRICTED_ACCESS mode
- Policy
Enforcement AccountNetwork Policy Egress Network Access Policy Enforcement - Optional. When policy_enforcement is not provided, we default to ENFORCE_MODE_ALL_SERVICES
- restriction
Mode String - The restriction mode that controls how serverless workloads can access the internet. Possible values are: FULL_ACCESS, RESTRICTED_ACCESS
- allowed
Internet List<AccountDestinations Network Policy Egress Network Access Allowed Internet Destination> - List of internet destinations that serverless workloads are allowed to access when in RESTRICTED_ACCESS mode
- allowed
Storage List<AccountDestinations Network Policy Egress Network Access Allowed Storage Destination> - List of storage destinations that serverless workloads are allowed to access when in RESTRICTED_ACCESS mode
- policy
Enforcement AccountNetwork Policy Egress Network Access Policy Enforcement - Optional. When policy_enforcement is not provided, we default to ENFORCE_MODE_ALL_SERVICES
- restriction
Mode string - The restriction mode that controls how serverless workloads can access the internet. Possible values are: FULL_ACCESS, RESTRICTED_ACCESS
- allowed
Internet AccountDestinations Network Policy Egress Network Access Allowed Internet Destination[] - List of internet destinations that serverless workloads are allowed to access when in RESTRICTED_ACCESS mode
- allowed
Storage AccountDestinations Network Policy Egress Network Access Allowed Storage Destination[] - List of storage destinations that serverless workloads are allowed to access when in RESTRICTED_ACCESS mode
- policy
Enforcement AccountNetwork Policy Egress Network Access Policy Enforcement - Optional. When policy_enforcement is not provided, we default to ENFORCE_MODE_ALL_SERVICES
- restriction_
mode str - The restriction mode that controls how serverless workloads can access the internet. Possible values are: FULL_ACCESS, RESTRICTED_ACCESS
- allowed_
internet_ Sequence[Accountdestinations Network Policy Egress Network Access Allowed Internet Destination] - List of internet destinations that serverless workloads are allowed to access when in RESTRICTED_ACCESS mode
- allowed_
storage_ Sequence[Accountdestinations Network Policy Egress Network Access Allowed Storage Destination] - List of storage destinations that serverless workloads are allowed to access when in RESTRICTED_ACCESS mode
- policy_
enforcement AccountNetwork Policy Egress Network Access Policy Enforcement - Optional. When policy_enforcement is not provided, we default to ENFORCE_MODE_ALL_SERVICES
- restriction
Mode String - The restriction mode that controls how serverless workloads can access the internet. Possible values are: FULL_ACCESS, RESTRICTED_ACCESS
- allowed
Internet List<Property Map>Destinations - List of internet destinations that serverless workloads are allowed to access when in RESTRICTED_ACCESS mode
- allowed
Storage List<Property Map>Destinations - List of storage destinations that serverless workloads are allowed to access when in RESTRICTED_ACCESS mode
- policy
Enforcement Property Map - Optional. When policy_enforcement is not provided, we default to ENFORCE_MODE_ALL_SERVICES
AccountNetworkPolicyEgressNetworkAccessAllowedInternetDestination, AccountNetworkPolicyEgressNetworkAccessAllowedInternetDestinationArgs
- Destination string
- The internet destination to which access will be allowed. Format dependent on the destination type
- Internet
Destination stringType - The type of internet destination. Currently only DNS_NAME is supported. Possible values are: DNS_NAME
- Destination string
- The internet destination to which access will be allowed. Format dependent on the destination type
- Internet
Destination stringType - The type of internet destination. Currently only DNS_NAME is supported. Possible values are: DNS_NAME
- destination String
- The internet destination to which access will be allowed. Format dependent on the destination type
- internet
Destination StringType - The type of internet destination. Currently only DNS_NAME is supported. Possible values are: DNS_NAME
- destination string
- The internet destination to which access will be allowed. Format dependent on the destination type
- internet
Destination stringType - The type of internet destination. Currently only DNS_NAME is supported. Possible values are: DNS_NAME
- destination str
- The internet destination to which access will be allowed. Format dependent on the destination type
- internet_
destination_ strtype - The type of internet destination. Currently only DNS_NAME is supported. Possible values are: DNS_NAME
- destination String
- The internet destination to which access will be allowed. Format dependent on the destination type
- internet
Destination StringType - The type of internet destination. Currently only DNS_NAME is supported. Possible values are: DNS_NAME
AccountNetworkPolicyEgressNetworkAccessAllowedStorageDestination, AccountNetworkPolicyEgressNetworkAccessAllowedStorageDestinationArgs
- Azure
Storage stringAccount - The Azure storage account name
- Azure
Storage stringService - The Azure storage service type (blob, dfs, etc.)
- Bucket
Name string - Region string
- The region of the S3 bucket
- Storage
Destination stringType - The type of storage destination. Possible values are: AWS_S3, AZURE_STORAGE, GOOGLE_CLOUD_STORAGE
- Azure
Storage stringAccount - The Azure storage account name
- Azure
Storage stringService - The Azure storage service type (blob, dfs, etc.)
- Bucket
Name string - Region string
- The region of the S3 bucket
- Storage
Destination stringType - The type of storage destination. Possible values are: AWS_S3, AZURE_STORAGE, GOOGLE_CLOUD_STORAGE
- azure
Storage StringAccount - The Azure storage account name
- azure
Storage StringService - The Azure storage service type (blob, dfs, etc.)
- bucket
Name String - region String
- The region of the S3 bucket
- storage
Destination StringType - The type of storage destination. Possible values are: AWS_S3, AZURE_STORAGE, GOOGLE_CLOUD_STORAGE
- azure
Storage stringAccount - The Azure storage account name
- azure
Storage stringService - The Azure storage service type (blob, dfs, etc.)
- bucket
Name string - region string
- The region of the S3 bucket
- storage
Destination stringType - The type of storage destination. Possible values are: AWS_S3, AZURE_STORAGE, GOOGLE_CLOUD_STORAGE
- azure_
storage_ straccount - The Azure storage account name
- azure_
storage_ strservice - The Azure storage service type (blob, dfs, etc.)
- bucket_
name str - region str
- The region of the S3 bucket
- storage_
destination_ strtype - The type of storage destination. Possible values are: AWS_S3, AZURE_STORAGE, GOOGLE_CLOUD_STORAGE
- azure
Storage StringAccount - The Azure storage account name
- azure
Storage StringService - The Azure storage service type (blob, dfs, etc.)
- bucket
Name String - region String
- The region of the S3 bucket
- storage
Destination StringType - The type of storage destination. Possible values are: AWS_S3, AZURE_STORAGE, GOOGLE_CLOUD_STORAGE
AccountNetworkPolicyEgressNetworkAccessPolicyEnforcement, AccountNetworkPolicyEgressNetworkAccessPolicyEnforcementArgs
- Dry
Run List<string>Mode Product Filters - When empty, it means dry run for all products. When non-empty, it means dry run for specific products and for the other products, they will run in enforced mode
- Enforcement
Mode string - The mode of policy enforcement. ENFORCED blocks traffic that violates policy, while DRY_RUN only logs violations without blocking. When not specified, defaults to ENFORCED. Possible values are: DRY_RUN, ENFORCED
- Dry
Run []stringMode Product Filters - When empty, it means dry run for all products. When non-empty, it means dry run for specific products and for the other products, they will run in enforced mode
- Enforcement
Mode string - The mode of policy enforcement. ENFORCED blocks traffic that violates policy, while DRY_RUN only logs violations without blocking. When not specified, defaults to ENFORCED. Possible values are: DRY_RUN, ENFORCED
- dry
Run List<String>Mode Product Filters - When empty, it means dry run for all products. When non-empty, it means dry run for specific products and for the other products, they will run in enforced mode
- enforcement
Mode String - The mode of policy enforcement. ENFORCED blocks traffic that violates policy, while DRY_RUN only logs violations without blocking. When not specified, defaults to ENFORCED. Possible values are: DRY_RUN, ENFORCED
- dry
Run string[]Mode Product Filters - When empty, it means dry run for all products. When non-empty, it means dry run for specific products and for the other products, they will run in enforced mode
- enforcement
Mode string - The mode of policy enforcement. ENFORCED blocks traffic that violates policy, while DRY_RUN only logs violations without blocking. When not specified, defaults to ENFORCED. Possible values are: DRY_RUN, ENFORCED
- dry_
run_ Sequence[str]mode_ product_ filters - When empty, it means dry run for all products. When non-empty, it means dry run for specific products and for the other products, they will run in enforced mode
- enforcement_
mode str - The mode of policy enforcement. ENFORCED blocks traffic that violates policy, while DRY_RUN only logs violations without blocking. When not specified, defaults to ENFORCED. Possible values are: DRY_RUN, ENFORCED
- dry
Run List<String>Mode Product Filters - When empty, it means dry run for all products. When non-empty, it means dry run for specific products and for the other products, they will run in enforced mode
- enforcement
Mode String - The mode of policy enforcement. ENFORCED blocks traffic that violates policy, while DRY_RUN only logs violations without blocking. When not specified, defaults to ENFORCED. Possible values are: DRY_RUN, ENFORCED
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
databricks
Terraform Provider.