ns1.APIKey
Explore with Pulumi AI
Provides a NS1 Api Key resource. This can be used to create, modify, and delete api keys.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ns1 from "@pulumi/ns1";
const exampleTeam = new ns1.Team("exampleTeam", {});
const exampleAPIKey = new ns1.APIKey("exampleAPIKey", {
teams: [exampleTeam.id],
ipWhitelists: [
"1.1.1.1",
"2.2.2.2",
],
dnsViewZones: false,
accountManageUsers: false,
});
import pulumi
import pulumi_ns1 as ns1
example_team = ns1.Team("exampleTeam")
example_api_key = ns1.APIKey("exampleAPIKey",
teams=[example_team.id],
ip_whitelists=[
"1.1.1.1",
"2.2.2.2",
],
dns_view_zones=False,
account_manage_users=False)
package main
import (
"github.com/pulumi/pulumi-ns1/sdk/v3/go/ns1"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleTeam, err := ns1.NewTeam(ctx, "exampleTeam", nil)
if err != nil {
return err
}
_, err = ns1.NewAPIKey(ctx, "exampleAPIKey", &ns1.APIKeyArgs{
Teams: pulumi.StringArray{
exampleTeam.ID(),
},
IpWhitelists: pulumi.StringArray{
pulumi.String("1.1.1.1"),
pulumi.String("2.2.2.2"),
},
DnsViewZones: pulumi.Bool(false),
AccountManageUsers: pulumi.Bool(false),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ns1 = Pulumi.Ns1;
return await Deployment.RunAsync(() =>
{
var exampleTeam = new Ns1.Team("exampleTeam");
var exampleAPIKey = new Ns1.APIKey("exampleAPIKey", new()
{
Teams = new[]
{
exampleTeam.Id,
},
IpWhitelists = new[]
{
"1.1.1.1",
"2.2.2.2",
},
DnsViewZones = false,
AccountManageUsers = false,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ns1.Team;
import com.pulumi.ns1.APIKey;
import com.pulumi.ns1.APIKeyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleTeam = new Team("exampleTeam");
var exampleAPIKey = new APIKey("exampleAPIKey", APIKeyArgs.builder()
.teams(exampleTeam.id())
.ipWhitelists(
"1.1.1.1",
"2.2.2.2")
.dnsViewZones(false)
.accountManageUsers(false)
.build());
}
}
resources:
exampleTeam:
type: ns1:Team
exampleAPIKey:
type: ns1:APIKey
properties:
teams:
- ${exampleTeam.id}
# Optional IP whitelist
ipWhitelists:
- 1.1.1.1
- 2.2.2.2
# Configure permissions
dnsViewZones: false
accountManageUsers: false
Permissions
An API key will inherit permissions from the teams it is assigned to. If a key is assigned to a team and also has individual permissions set on the key, the individual permissions will be overridden by the inherited team permissions. In a future release, setting permissions on a key that is part of a team will be explicitly disabled.
When a key is removed from all teams completely, it will inherit whatever permissions it had previously.
If a key is removed from all it’s teams, it will probably be necessary to run pulumi up
a second time
to update the keys permissions from it’s old team permissions to new key-specific permissions.
See the NS1 API docs for an overview of permission semantics or for more details about the individual permission flags.
NS1 Documentation
Create APIKey Resource
new APIKey(name: string, args?: APIKeyArgs, opts?: CustomResourceOptions);
@overload
def APIKey(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_manage_account_settings: Optional[bool] = None,
account_manage_apikeys: Optional[bool] = None,
account_manage_ip_whitelist: Optional[bool] = None,
account_manage_payment_methods: Optional[bool] = None,
account_manage_plan: Optional[bool] = None,
account_manage_teams: Optional[bool] = None,
account_manage_users: Optional[bool] = None,
account_view_activity_log: Optional[bool] = None,
account_view_invoices: Optional[bool] = None,
data_manage_datafeeds: Optional[bool] = None,
data_manage_datasources: Optional[bool] = None,
data_push_to_datafeeds: Optional[bool] = None,
dhcp_manage_dhcp: Optional[bool] = None,
dhcp_view_dhcp: Optional[bool] = None,
dns_manage_zones: Optional[bool] = None,
dns_records_allows: Optional[Sequence[APIKeyDnsRecordsAllowArgs]] = None,
dns_records_denies: Optional[Sequence[APIKeyDnsRecordsDenyArgs]] = None,
dns_view_zones: Optional[bool] = None,
dns_zones_allow_by_default: Optional[bool] = None,
dns_zones_allows: Optional[Sequence[str]] = None,
dns_zones_denies: Optional[Sequence[str]] = None,
ip_whitelist_strict: Optional[bool] = None,
ip_whitelists: Optional[Sequence[str]] = None,
ipam_manage_ipam: Optional[bool] = None,
ipam_view_ipam: Optional[bool] = None,
monitoring_manage_jobs: Optional[bool] = None,
monitoring_manage_lists: Optional[bool] = None,
monitoring_view_jobs: Optional[bool] = None,
name: Optional[str] = None,
security_manage_active_directory: Optional[bool] = None,
security_manage_global2fa: Optional[bool] = None,
teams: Optional[Sequence[str]] = None)
@overload
def APIKey(resource_name: str,
args: Optional[APIKeyArgs] = None,
opts: Optional[ResourceOptions] = None)
func NewAPIKey(ctx *Context, name string, args *APIKeyArgs, opts ...ResourceOption) (*APIKey, error)
public APIKey(string name, APIKeyArgs? args = null, CustomResourceOptions? opts = null)
public APIKey(String name, APIKeyArgs args)
public APIKey(String name, APIKeyArgs args, CustomResourceOptions options)
type: ns1:APIKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args APIKeyArgs
- 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 APIKeyArgs
- 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 APIKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args APIKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args APIKeyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
APIKey Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The APIKey resource accepts the following input properties:
- Account
Manage boolAccount Settings - Whether the apikey can modify account settings.
- Account
Manage boolApikeys - Whether the apikey can modify account apikeys.
- Account
Manage boolIp Whitelist - Whether the apikey can manage ip whitelist.
- Account
Manage boolPayment Methods - Whether the apikey can modify account payment methods.
- Account
Manage boolPlan - No longer in use.
- Account
Manage boolTeams - Whether the apikey can modify other teams in the account.
- Account
Manage boolUsers - Whether the apikey can modify account users.
- Account
View boolActivity Log - Whether the apikey can view activity logs.
- Account
View boolInvoices - Whether the apikey can view invoices.
- Data
Manage boolDatafeeds - Whether the apikey can modify data feeds.
- Data
Manage boolDatasources - Whether the apikey can modify data sources.
- Data
Push boolTo Datafeeds - Whether the apikey can publish to data feeds.
- Dhcp
Manage boolDhcp - Whether the apikey can manage DHCP. Only relevant for the DDI product.
- Dhcp
View boolDhcp - Whether the apikey can view DHCP. Only relevant for the DDI product.
- Dns
Manage boolZones - Whether the apikey can modify the accounts zones.
- Dns
Records List<APIKeyAllows Dns Records Allow> - List of records that the apikey may access.
- Dns
Records List<APIKeyDenies Dns Records Deny> - List of records that the apikey may not access.
- Dns
View boolZones - Whether the apikey can view the accounts zones.
- Dns
Zones boolAllow By Default - If true, enable the
dns_zones_allow
list, otherwise enable thedns_zones_deny
list. - Dns
Zones List<string>Allows - List of zones that the apikey may access.
- Dns
Zones List<string>Denies - List of zones that the apikey may not access.
- Ip
Whitelist boolStrict - Set to true to restrict access to only those IP addresses and networks listed in the ip_whitelist field.
- Ip
Whitelists List<string> - Array of IP addresses/networks to which to grant the API key access.
- Ipam
Manage boolIpam - Whether the apikey can manage IPAM. Only relevant for the DDI product.
- Ipam
View boolIpam - Whether the apikey can view IPAM. Only relevant for the DDI product.
- Monitoring
Manage boolJobs - Whether the apikey can modify monitoring jobs.
- Monitoring
Manage boolLists - Whether the apikey can modify notification lists.
- Monitoring
View boolJobs - Whether the apikey can view monitoring jobs.
- Name string
- The free form name of the apikey.
- Security
Manage boolActive Directory - Whether the apikey can manage global active directory. Only relevant for the DDI product.
- Security
Manage boolGlobal2fa - Whether the apikey can manage global two factor authentication.
- Teams List<string>
- The teams that the apikey belongs to.
- Account
Manage boolAccount Settings - Whether the apikey can modify account settings.
- Account
Manage boolApikeys - Whether the apikey can modify account apikeys.
- Account
Manage boolIp Whitelist - Whether the apikey can manage ip whitelist.
- Account
Manage boolPayment Methods - Whether the apikey can modify account payment methods.
- Account
Manage boolPlan - No longer in use.
- Account
Manage boolTeams - Whether the apikey can modify other teams in the account.
- Account
Manage boolUsers - Whether the apikey can modify account users.
- Account
View boolActivity Log - Whether the apikey can view activity logs.
- Account
View boolInvoices - Whether the apikey can view invoices.
- Data
Manage boolDatafeeds - Whether the apikey can modify data feeds.
- Data
Manage boolDatasources - Whether the apikey can modify data sources.
- Data
Push boolTo Datafeeds - Whether the apikey can publish to data feeds.
- Dhcp
Manage boolDhcp - Whether the apikey can manage DHCP. Only relevant for the DDI product.
- Dhcp
View boolDhcp - Whether the apikey can view DHCP. Only relevant for the DDI product.
- Dns
Manage boolZones - Whether the apikey can modify the accounts zones.
- Dns
Records []APIKeyAllows Dns Records Allow Args - List of records that the apikey may access.
- Dns
Records []APIKeyDenies Dns Records Deny Args - List of records that the apikey may not access.
- Dns
View boolZones - Whether the apikey can view the accounts zones.
- Dns
Zones boolAllow By Default - If true, enable the
dns_zones_allow
list, otherwise enable thedns_zones_deny
list. - Dns
Zones []stringAllows - List of zones that the apikey may access.
- Dns
Zones []stringDenies - List of zones that the apikey may not access.
- Ip
Whitelist boolStrict - Set to true to restrict access to only those IP addresses and networks listed in the ip_whitelist field.
- Ip
Whitelists []string - Array of IP addresses/networks to which to grant the API key access.
- Ipam
Manage boolIpam - Whether the apikey can manage IPAM. Only relevant for the DDI product.
- Ipam
View boolIpam - Whether the apikey can view IPAM. Only relevant for the DDI product.
- Monitoring
Manage boolJobs - Whether the apikey can modify monitoring jobs.
- Monitoring
Manage boolLists - Whether the apikey can modify notification lists.
- Monitoring
View boolJobs - Whether the apikey can view monitoring jobs.
- Name string
- The free form name of the apikey.
- Security
Manage boolActive Directory - Whether the apikey can manage global active directory. Only relevant for the DDI product.
- Security
Manage boolGlobal2fa - Whether the apikey can manage global two factor authentication.
- Teams []string
- The teams that the apikey belongs to.
- account
Manage BooleanAccount Settings - Whether the apikey can modify account settings.
- account
Manage BooleanApikeys - Whether the apikey can modify account apikeys.
- account
Manage BooleanIp Whitelist - Whether the apikey can manage ip whitelist.
- account
Manage BooleanPayment Methods - Whether the apikey can modify account payment methods.
- account
Manage BooleanPlan - No longer in use.
- account
Manage BooleanTeams - Whether the apikey can modify other teams in the account.
- account
Manage BooleanUsers - Whether the apikey can modify account users.
- account
View BooleanActivity Log - Whether the apikey can view activity logs.
- account
View BooleanInvoices - Whether the apikey can view invoices.
- data
Manage BooleanDatafeeds - Whether the apikey can modify data feeds.
- data
Manage BooleanDatasources - Whether the apikey can modify data sources.
- data
Push BooleanTo Datafeeds - Whether the apikey can publish to data feeds.
- dhcp
Manage BooleanDhcp - Whether the apikey can manage DHCP. Only relevant for the DDI product.
- dhcp
View BooleanDhcp - Whether the apikey can view DHCP. Only relevant for the DDI product.
- dns
Manage BooleanZones - Whether the apikey can modify the accounts zones.
- dns
Records List<APIKeyAllows Dns Records Allow> - List of records that the apikey may access.
- dns
Records List<APIKeyDenies Dns Records Deny> - List of records that the apikey may not access.
- dns
View BooleanZones - Whether the apikey can view the accounts zones.
- dns
Zones BooleanAllow By Default - If true, enable the
dns_zones_allow
list, otherwise enable thedns_zones_deny
list. - dns
Zones List<String>Allows - List of zones that the apikey may access.
- dns
Zones List<String>Denies - List of zones that the apikey may not access.
- ip
Whitelist BooleanStrict - Set to true to restrict access to only those IP addresses and networks listed in the ip_whitelist field.
- ip
Whitelists List<String> - Array of IP addresses/networks to which to grant the API key access.
- ipam
Manage BooleanIpam - Whether the apikey can manage IPAM. Only relevant for the DDI product.
- ipam
View BooleanIpam - Whether the apikey can view IPAM. Only relevant for the DDI product.
- monitoring
Manage BooleanJobs - Whether the apikey can modify monitoring jobs.
- monitoring
Manage BooleanLists - Whether the apikey can modify notification lists.
- monitoring
View BooleanJobs - Whether the apikey can view monitoring jobs.
- name String
- The free form name of the apikey.
- security
Manage BooleanActive Directory - Whether the apikey can manage global active directory. Only relevant for the DDI product.
- security
Manage BooleanGlobal2fa - Whether the apikey can manage global two factor authentication.
- teams List<String>
- The teams that the apikey belongs to.
- account
Manage booleanAccount Settings - Whether the apikey can modify account settings.
- account
Manage booleanApikeys - Whether the apikey can modify account apikeys.
- account
Manage booleanIp Whitelist - Whether the apikey can manage ip whitelist.
- account
Manage booleanPayment Methods - Whether the apikey can modify account payment methods.
- account
Manage booleanPlan - No longer in use.
- account
Manage booleanTeams - Whether the apikey can modify other teams in the account.
- account
Manage booleanUsers - Whether the apikey can modify account users.
- account
View booleanActivity Log - Whether the apikey can view activity logs.
- account
View booleanInvoices - Whether the apikey can view invoices.
- data
Manage booleanDatafeeds - Whether the apikey can modify data feeds.
- data
Manage booleanDatasources - Whether the apikey can modify data sources.
- data
Push booleanTo Datafeeds - Whether the apikey can publish to data feeds.
- dhcp
Manage booleanDhcp - Whether the apikey can manage DHCP. Only relevant for the DDI product.
- dhcp
View booleanDhcp - Whether the apikey can view DHCP. Only relevant for the DDI product.
- dns
Manage booleanZones - Whether the apikey can modify the accounts zones.
- dns
Records APIKeyAllows Dns Records Allow[] - List of records that the apikey may access.
- dns
Records APIKeyDenies Dns Records Deny[] - List of records that the apikey may not access.
- dns
View booleanZones - Whether the apikey can view the accounts zones.
- dns
Zones booleanAllow By Default - If true, enable the
dns_zones_allow
list, otherwise enable thedns_zones_deny
list. - dns
Zones string[]Allows - List of zones that the apikey may access.
- dns
Zones string[]Denies - List of zones that the apikey may not access.
- ip
Whitelist booleanStrict - Set to true to restrict access to only those IP addresses and networks listed in the ip_whitelist field.
- ip
Whitelists string[] - Array of IP addresses/networks to which to grant the API key access.
- ipam
Manage booleanIpam - Whether the apikey can manage IPAM. Only relevant for the DDI product.
- ipam
View booleanIpam - Whether the apikey can view IPAM. Only relevant for the DDI product.
- monitoring
Manage booleanJobs - Whether the apikey can modify monitoring jobs.
- monitoring
Manage booleanLists - Whether the apikey can modify notification lists.
- monitoring
View booleanJobs - Whether the apikey can view monitoring jobs.
- name string
- The free form name of the apikey.
- security
Manage booleanActive Directory - Whether the apikey can manage global active directory. Only relevant for the DDI product.
- security
Manage booleanGlobal2fa - Whether the apikey can manage global two factor authentication.
- teams string[]
- The teams that the apikey belongs to.
- account_
manage_ boolaccount_ settings - Whether the apikey can modify account settings.
- account_
manage_ boolapikeys - Whether the apikey can modify account apikeys.
- account_
manage_ boolip_ whitelist - Whether the apikey can manage ip whitelist.
- account_
manage_ boolpayment_ methods - Whether the apikey can modify account payment methods.
- account_
manage_ boolplan - No longer in use.
- account_
manage_ boolteams - Whether the apikey can modify other teams in the account.
- account_
manage_ boolusers - Whether the apikey can modify account users.
- account_
view_ boolactivity_ log - Whether the apikey can view activity logs.
- account_
view_ boolinvoices - Whether the apikey can view invoices.
- data_
manage_ booldatafeeds - Whether the apikey can modify data feeds.
- data_
manage_ booldatasources - Whether the apikey can modify data sources.
- data_
push_ boolto_ datafeeds - Whether the apikey can publish to data feeds.
- dhcp_
manage_ booldhcp - Whether the apikey can manage DHCP. Only relevant for the DDI product.
- dhcp_
view_ booldhcp - Whether the apikey can view DHCP. Only relevant for the DDI product.
- dns_
manage_ boolzones - Whether the apikey can modify the accounts zones.
- dns_
records_ Sequence[APIKeyallows Dns Records Allow Args] - List of records that the apikey may access.
- dns_
records_ Sequence[APIKeydenies Dns Records Deny Args] - List of records that the apikey may not access.
- dns_
view_ boolzones - Whether the apikey can view the accounts zones.
- dns_
zones_ boolallow_ by_ default - If true, enable the
dns_zones_allow
list, otherwise enable thedns_zones_deny
list. - dns_
zones_ Sequence[str]allows - List of zones that the apikey may access.
- dns_
zones_ Sequence[str]denies - List of zones that the apikey may not access.
- ip_
whitelist_ boolstrict - Set to true to restrict access to only those IP addresses and networks listed in the ip_whitelist field.
- ip_
whitelists Sequence[str] - Array of IP addresses/networks to which to grant the API key access.
- ipam_
manage_ boolipam - Whether the apikey can manage IPAM. Only relevant for the DDI product.
- ipam_
view_ boolipam - Whether the apikey can view IPAM. Only relevant for the DDI product.
- monitoring_
manage_ booljobs - Whether the apikey can modify monitoring jobs.
- monitoring_
manage_ boollists - Whether the apikey can modify notification lists.
- monitoring_
view_ booljobs - Whether the apikey can view monitoring jobs.
- name str
- The free form name of the apikey.
- security_
manage_ boolactive_ directory - Whether the apikey can manage global active directory. Only relevant for the DDI product.
- security_
manage_ boolglobal2fa - Whether the apikey can manage global two factor authentication.
- teams Sequence[str]
- The teams that the apikey belongs to.
- account
Manage BooleanAccount Settings - Whether the apikey can modify account settings.
- account
Manage BooleanApikeys - Whether the apikey can modify account apikeys.
- account
Manage BooleanIp Whitelist - Whether the apikey can manage ip whitelist.
- account
Manage BooleanPayment Methods - Whether the apikey can modify account payment methods.
- account
Manage BooleanPlan - No longer in use.
- account
Manage BooleanTeams - Whether the apikey can modify other teams in the account.
- account
Manage BooleanUsers - Whether the apikey can modify account users.
- account
View BooleanActivity Log - Whether the apikey can view activity logs.
- account
View BooleanInvoices - Whether the apikey can view invoices.
- data
Manage BooleanDatafeeds - Whether the apikey can modify data feeds.
- data
Manage BooleanDatasources - Whether the apikey can modify data sources.
- data
Push BooleanTo Datafeeds - Whether the apikey can publish to data feeds.
- dhcp
Manage BooleanDhcp - Whether the apikey can manage DHCP. Only relevant for the DDI product.
- dhcp
View BooleanDhcp - Whether the apikey can view DHCP. Only relevant for the DDI product.
- dns
Manage BooleanZones - Whether the apikey can modify the accounts zones.
- dns
Records List<Property Map>Allows - List of records that the apikey may access.
- dns
Records List<Property Map>Denies - List of records that the apikey may not access.
- dns
View BooleanZones - Whether the apikey can view the accounts zones.
- dns
Zones BooleanAllow By Default - If true, enable the
dns_zones_allow
list, otherwise enable thedns_zones_deny
list. - dns
Zones List<String>Allows - List of zones that the apikey may access.
- dns
Zones List<String>Denies - List of zones that the apikey may not access.
- ip
Whitelist BooleanStrict - Set to true to restrict access to only those IP addresses and networks listed in the ip_whitelist field.
- ip
Whitelists List<String> - Array of IP addresses/networks to which to grant the API key access.
- ipam
Manage BooleanIpam - Whether the apikey can manage IPAM. Only relevant for the DDI product.
- ipam
View BooleanIpam - Whether the apikey can view IPAM. Only relevant for the DDI product.
- monitoring
Manage BooleanJobs - Whether the apikey can modify monitoring jobs.
- monitoring
Manage BooleanLists - Whether the apikey can modify notification lists.
- monitoring
View BooleanJobs - Whether the apikey can view monitoring jobs.
- name String
- The free form name of the apikey.
- security
Manage BooleanActive Directory - Whether the apikey can manage global active directory. Only relevant for the DDI product.
- security
Manage BooleanGlobal2fa - Whether the apikey can manage global two factor authentication.
- teams List<String>
- The teams that the apikey belongs to.
Outputs
All input properties are implicitly available as output properties. Additionally, the APIKey resource produces the following output properties:
Look up Existing APIKey Resource
Get an existing APIKey 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?: APIKeyState, opts?: CustomResourceOptions): APIKey
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_manage_account_settings: Optional[bool] = None,
account_manage_apikeys: Optional[bool] = None,
account_manage_ip_whitelist: Optional[bool] = None,
account_manage_payment_methods: Optional[bool] = None,
account_manage_plan: Optional[bool] = None,
account_manage_teams: Optional[bool] = None,
account_manage_users: Optional[bool] = None,
account_view_activity_log: Optional[bool] = None,
account_view_invoices: Optional[bool] = None,
data_manage_datafeeds: Optional[bool] = None,
data_manage_datasources: Optional[bool] = None,
data_push_to_datafeeds: Optional[bool] = None,
dhcp_manage_dhcp: Optional[bool] = None,
dhcp_view_dhcp: Optional[bool] = None,
dns_manage_zones: Optional[bool] = None,
dns_records_allows: Optional[Sequence[APIKeyDnsRecordsAllowArgs]] = None,
dns_records_denies: Optional[Sequence[APIKeyDnsRecordsDenyArgs]] = None,
dns_view_zones: Optional[bool] = None,
dns_zones_allow_by_default: Optional[bool] = None,
dns_zones_allows: Optional[Sequence[str]] = None,
dns_zones_denies: Optional[Sequence[str]] = None,
ip_whitelist_strict: Optional[bool] = None,
ip_whitelists: Optional[Sequence[str]] = None,
ipam_manage_ipam: Optional[bool] = None,
ipam_view_ipam: Optional[bool] = None,
key: Optional[str] = None,
monitoring_manage_jobs: Optional[bool] = None,
monitoring_manage_lists: Optional[bool] = None,
monitoring_view_jobs: Optional[bool] = None,
name: Optional[str] = None,
security_manage_active_directory: Optional[bool] = None,
security_manage_global2fa: Optional[bool] = None,
teams: Optional[Sequence[str]] = None) -> APIKey
func GetAPIKey(ctx *Context, name string, id IDInput, state *APIKeyState, opts ...ResourceOption) (*APIKey, error)
public static APIKey Get(string name, Input<string> id, APIKeyState? state, CustomResourceOptions? opts = null)
public static APIKey get(String name, Output<String> id, APIKeyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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
Manage boolAccount Settings - Whether the apikey can modify account settings.
- Account
Manage boolApikeys - Whether the apikey can modify account apikeys.
- Account
Manage boolIp Whitelist - Whether the apikey can manage ip whitelist.
- Account
Manage boolPayment Methods - Whether the apikey can modify account payment methods.
- Account
Manage boolPlan - No longer in use.
- Account
Manage boolTeams - Whether the apikey can modify other teams in the account.
- Account
Manage boolUsers - Whether the apikey can modify account users.
- Account
View boolActivity Log - Whether the apikey can view activity logs.
- Account
View boolInvoices - Whether the apikey can view invoices.
- Data
Manage boolDatafeeds - Whether the apikey can modify data feeds.
- Data
Manage boolDatasources - Whether the apikey can modify data sources.
- Data
Push boolTo Datafeeds - Whether the apikey can publish to data feeds.
- Dhcp
Manage boolDhcp - Whether the apikey can manage DHCP. Only relevant for the DDI product.
- Dhcp
View boolDhcp - Whether the apikey can view DHCP. Only relevant for the DDI product.
- Dns
Manage boolZones - Whether the apikey can modify the accounts zones.
- Dns
Records List<APIKeyAllows Dns Records Allow> - List of records that the apikey may access.
- Dns
Records List<APIKeyDenies Dns Records Deny> - List of records that the apikey may not access.
- Dns
View boolZones - Whether the apikey can view the accounts zones.
- Dns
Zones boolAllow By Default - If true, enable the
dns_zones_allow
list, otherwise enable thedns_zones_deny
list. - Dns
Zones List<string>Allows - List of zones that the apikey may access.
- Dns
Zones List<string>Denies - List of zones that the apikey may not access.
- Ip
Whitelist boolStrict - Set to true to restrict access to only those IP addresses and networks listed in the ip_whitelist field.
- Ip
Whitelists List<string> - Array of IP addresses/networks to which to grant the API key access.
- Ipam
Manage boolIpam - Whether the apikey can manage IPAM. Only relevant for the DDI product.
- Ipam
View boolIpam - Whether the apikey can view IPAM. Only relevant for the DDI product.
- Key string
- (Computed) The apikeys authentication token.
- Monitoring
Manage boolJobs - Whether the apikey can modify monitoring jobs.
- Monitoring
Manage boolLists - Whether the apikey can modify notification lists.
- Monitoring
View boolJobs - Whether the apikey can view monitoring jobs.
- Name string
- The free form name of the apikey.
- Security
Manage boolActive Directory - Whether the apikey can manage global active directory. Only relevant for the DDI product.
- Security
Manage boolGlobal2fa - Whether the apikey can manage global two factor authentication.
- Teams List<string>
- The teams that the apikey belongs to.
- Account
Manage boolAccount Settings - Whether the apikey can modify account settings.
- Account
Manage boolApikeys - Whether the apikey can modify account apikeys.
- Account
Manage boolIp Whitelist - Whether the apikey can manage ip whitelist.
- Account
Manage boolPayment Methods - Whether the apikey can modify account payment methods.
- Account
Manage boolPlan - No longer in use.
- Account
Manage boolTeams - Whether the apikey can modify other teams in the account.
- Account
Manage boolUsers - Whether the apikey can modify account users.
- Account
View boolActivity Log - Whether the apikey can view activity logs.
- Account
View boolInvoices - Whether the apikey can view invoices.
- Data
Manage boolDatafeeds - Whether the apikey can modify data feeds.
- Data
Manage boolDatasources - Whether the apikey can modify data sources.
- Data
Push boolTo Datafeeds - Whether the apikey can publish to data feeds.
- Dhcp
Manage boolDhcp - Whether the apikey can manage DHCP. Only relevant for the DDI product.
- Dhcp
View boolDhcp - Whether the apikey can view DHCP. Only relevant for the DDI product.
- Dns
Manage boolZones - Whether the apikey can modify the accounts zones.
- Dns
Records []APIKeyAllows Dns Records Allow Args - List of records that the apikey may access.
- Dns
Records []APIKeyDenies Dns Records Deny Args - List of records that the apikey may not access.
- Dns
View boolZones - Whether the apikey can view the accounts zones.
- Dns
Zones boolAllow By Default - If true, enable the
dns_zones_allow
list, otherwise enable thedns_zones_deny
list. - Dns
Zones []stringAllows - List of zones that the apikey may access.
- Dns
Zones []stringDenies - List of zones that the apikey may not access.
- Ip
Whitelist boolStrict - Set to true to restrict access to only those IP addresses and networks listed in the ip_whitelist field.
- Ip
Whitelists []string - Array of IP addresses/networks to which to grant the API key access.
- Ipam
Manage boolIpam - Whether the apikey can manage IPAM. Only relevant for the DDI product.
- Ipam
View boolIpam - Whether the apikey can view IPAM. Only relevant for the DDI product.
- Key string
- (Computed) The apikeys authentication token.
- Monitoring
Manage boolJobs - Whether the apikey can modify monitoring jobs.
- Monitoring
Manage boolLists - Whether the apikey can modify notification lists.
- Monitoring
View boolJobs - Whether the apikey can view monitoring jobs.
- Name string
- The free form name of the apikey.
- Security
Manage boolActive Directory - Whether the apikey can manage global active directory. Only relevant for the DDI product.
- Security
Manage boolGlobal2fa - Whether the apikey can manage global two factor authentication.
- Teams []string
- The teams that the apikey belongs to.
- account
Manage BooleanAccount Settings - Whether the apikey can modify account settings.
- account
Manage BooleanApikeys - Whether the apikey can modify account apikeys.
- account
Manage BooleanIp Whitelist - Whether the apikey can manage ip whitelist.
- account
Manage BooleanPayment Methods - Whether the apikey can modify account payment methods.
- account
Manage BooleanPlan - No longer in use.
- account
Manage BooleanTeams - Whether the apikey can modify other teams in the account.
- account
Manage BooleanUsers - Whether the apikey can modify account users.
- account
View BooleanActivity Log - Whether the apikey can view activity logs.
- account
View BooleanInvoices - Whether the apikey can view invoices.
- data
Manage BooleanDatafeeds - Whether the apikey can modify data feeds.
- data
Manage BooleanDatasources - Whether the apikey can modify data sources.
- data
Push BooleanTo Datafeeds - Whether the apikey can publish to data feeds.
- dhcp
Manage BooleanDhcp - Whether the apikey can manage DHCP. Only relevant for the DDI product.
- dhcp
View BooleanDhcp - Whether the apikey can view DHCP. Only relevant for the DDI product.
- dns
Manage BooleanZones - Whether the apikey can modify the accounts zones.
- dns
Records List<APIKeyAllows Dns Records Allow> - List of records that the apikey may access.
- dns
Records List<APIKeyDenies Dns Records Deny> - List of records that the apikey may not access.
- dns
View BooleanZones - Whether the apikey can view the accounts zones.
- dns
Zones BooleanAllow By Default - If true, enable the
dns_zones_allow
list, otherwise enable thedns_zones_deny
list. - dns
Zones List<String>Allows - List of zones that the apikey may access.
- dns
Zones List<String>Denies - List of zones that the apikey may not access.
- ip
Whitelist BooleanStrict - Set to true to restrict access to only those IP addresses and networks listed in the ip_whitelist field.
- ip
Whitelists List<String> - Array of IP addresses/networks to which to grant the API key access.
- ipam
Manage BooleanIpam - Whether the apikey can manage IPAM. Only relevant for the DDI product.
- ipam
View BooleanIpam - Whether the apikey can view IPAM. Only relevant for the DDI product.
- key String
- (Computed) The apikeys authentication token.
- monitoring
Manage BooleanJobs - Whether the apikey can modify monitoring jobs.
- monitoring
Manage BooleanLists - Whether the apikey can modify notification lists.
- monitoring
View BooleanJobs - Whether the apikey can view monitoring jobs.
- name String
- The free form name of the apikey.
- security
Manage BooleanActive Directory - Whether the apikey can manage global active directory. Only relevant for the DDI product.
- security
Manage BooleanGlobal2fa - Whether the apikey can manage global two factor authentication.
- teams List<String>
- The teams that the apikey belongs to.
- account
Manage booleanAccount Settings - Whether the apikey can modify account settings.
- account
Manage booleanApikeys - Whether the apikey can modify account apikeys.
- account
Manage booleanIp Whitelist - Whether the apikey can manage ip whitelist.
- account
Manage booleanPayment Methods - Whether the apikey can modify account payment methods.
- account
Manage booleanPlan - No longer in use.
- account
Manage booleanTeams - Whether the apikey can modify other teams in the account.
- account
Manage booleanUsers - Whether the apikey can modify account users.
- account
View booleanActivity Log - Whether the apikey can view activity logs.
- account
View booleanInvoices - Whether the apikey can view invoices.
- data
Manage booleanDatafeeds - Whether the apikey can modify data feeds.
- data
Manage booleanDatasources - Whether the apikey can modify data sources.
- data
Push booleanTo Datafeeds - Whether the apikey can publish to data feeds.
- dhcp
Manage booleanDhcp - Whether the apikey can manage DHCP. Only relevant for the DDI product.
- dhcp
View booleanDhcp - Whether the apikey can view DHCP. Only relevant for the DDI product.
- dns
Manage booleanZones - Whether the apikey can modify the accounts zones.
- dns
Records APIKeyAllows Dns Records Allow[] - List of records that the apikey may access.
- dns
Records APIKeyDenies Dns Records Deny[] - List of records that the apikey may not access.
- dns
View booleanZones - Whether the apikey can view the accounts zones.
- dns
Zones booleanAllow By Default - If true, enable the
dns_zones_allow
list, otherwise enable thedns_zones_deny
list. - dns
Zones string[]Allows - List of zones that the apikey may access.
- dns
Zones string[]Denies - List of zones that the apikey may not access.
- ip
Whitelist booleanStrict - Set to true to restrict access to only those IP addresses and networks listed in the ip_whitelist field.
- ip
Whitelists string[] - Array of IP addresses/networks to which to grant the API key access.
- ipam
Manage booleanIpam - Whether the apikey can manage IPAM. Only relevant for the DDI product.
- ipam
View booleanIpam - Whether the apikey can view IPAM. Only relevant for the DDI product.
- key string
- (Computed) The apikeys authentication token.
- monitoring
Manage booleanJobs - Whether the apikey can modify monitoring jobs.
- monitoring
Manage booleanLists - Whether the apikey can modify notification lists.
- monitoring
View booleanJobs - Whether the apikey can view monitoring jobs.
- name string
- The free form name of the apikey.
- security
Manage booleanActive Directory - Whether the apikey can manage global active directory. Only relevant for the DDI product.
- security
Manage booleanGlobal2fa - Whether the apikey can manage global two factor authentication.
- teams string[]
- The teams that the apikey belongs to.
- account_
manage_ boolaccount_ settings - Whether the apikey can modify account settings.
- account_
manage_ boolapikeys - Whether the apikey can modify account apikeys.
- account_
manage_ boolip_ whitelist - Whether the apikey can manage ip whitelist.
- account_
manage_ boolpayment_ methods - Whether the apikey can modify account payment methods.
- account_
manage_ boolplan - No longer in use.
- account_
manage_ boolteams - Whether the apikey can modify other teams in the account.
- account_
manage_ boolusers - Whether the apikey can modify account users.
- account_
view_ boolactivity_ log - Whether the apikey can view activity logs.
- account_
view_ boolinvoices - Whether the apikey can view invoices.
- data_
manage_ booldatafeeds - Whether the apikey can modify data feeds.
- data_
manage_ booldatasources - Whether the apikey can modify data sources.
- data_
push_ boolto_ datafeeds - Whether the apikey can publish to data feeds.
- dhcp_
manage_ booldhcp - Whether the apikey can manage DHCP. Only relevant for the DDI product.
- dhcp_
view_ booldhcp - Whether the apikey can view DHCP. Only relevant for the DDI product.
- dns_
manage_ boolzones - Whether the apikey can modify the accounts zones.
- dns_
records_ Sequence[APIKeyallows Dns Records Allow Args] - List of records that the apikey may access.
- dns_
records_ Sequence[APIKeydenies Dns Records Deny Args] - List of records that the apikey may not access.
- dns_
view_ boolzones - Whether the apikey can view the accounts zones.
- dns_
zones_ boolallow_ by_ default - If true, enable the
dns_zones_allow
list, otherwise enable thedns_zones_deny
list. - dns_
zones_ Sequence[str]allows - List of zones that the apikey may access.
- dns_
zones_ Sequence[str]denies - List of zones that the apikey may not access.
- ip_
whitelist_ boolstrict - Set to true to restrict access to only those IP addresses and networks listed in the ip_whitelist field.
- ip_
whitelists Sequence[str] - Array of IP addresses/networks to which to grant the API key access.
- ipam_
manage_ boolipam - Whether the apikey can manage IPAM. Only relevant for the DDI product.
- ipam_
view_ boolipam - Whether the apikey can view IPAM. Only relevant for the DDI product.
- key str
- (Computed) The apikeys authentication token.
- monitoring_
manage_ booljobs - Whether the apikey can modify monitoring jobs.
- monitoring_
manage_ boollists - Whether the apikey can modify notification lists.
- monitoring_
view_ booljobs - Whether the apikey can view monitoring jobs.
- name str
- The free form name of the apikey.
- security_
manage_ boolactive_ directory - Whether the apikey can manage global active directory. Only relevant for the DDI product.
- security_
manage_ boolglobal2fa - Whether the apikey can manage global two factor authentication.
- teams Sequence[str]
- The teams that the apikey belongs to.
- account
Manage BooleanAccount Settings - Whether the apikey can modify account settings.
- account
Manage BooleanApikeys - Whether the apikey can modify account apikeys.
- account
Manage BooleanIp Whitelist - Whether the apikey can manage ip whitelist.
- account
Manage BooleanPayment Methods - Whether the apikey can modify account payment methods.
- account
Manage BooleanPlan - No longer in use.
- account
Manage BooleanTeams - Whether the apikey can modify other teams in the account.
- account
Manage BooleanUsers - Whether the apikey can modify account users.
- account
View BooleanActivity Log - Whether the apikey can view activity logs.
- account
View BooleanInvoices - Whether the apikey can view invoices.
- data
Manage BooleanDatafeeds - Whether the apikey can modify data feeds.
- data
Manage BooleanDatasources - Whether the apikey can modify data sources.
- data
Push BooleanTo Datafeeds - Whether the apikey can publish to data feeds.
- dhcp
Manage BooleanDhcp - Whether the apikey can manage DHCP. Only relevant for the DDI product.
- dhcp
View BooleanDhcp - Whether the apikey can view DHCP. Only relevant for the DDI product.
- dns
Manage BooleanZones - Whether the apikey can modify the accounts zones.
- dns
Records List<Property Map>Allows - List of records that the apikey may access.
- dns
Records List<Property Map>Denies - List of records that the apikey may not access.
- dns
View BooleanZones - Whether the apikey can view the accounts zones.
- dns
Zones BooleanAllow By Default - If true, enable the
dns_zones_allow
list, otherwise enable thedns_zones_deny
list. - dns
Zones List<String>Allows - List of zones that the apikey may access.
- dns
Zones List<String>Denies - List of zones that the apikey may not access.
- ip
Whitelist BooleanStrict - Set to true to restrict access to only those IP addresses and networks listed in the ip_whitelist field.
- ip
Whitelists List<String> - Array of IP addresses/networks to which to grant the API key access.
- ipam
Manage BooleanIpam - Whether the apikey can manage IPAM. Only relevant for the DDI product.
- ipam
View BooleanIpam - Whether the apikey can view IPAM. Only relevant for the DDI product.
- key String
- (Computed) The apikeys authentication token.
- monitoring
Manage BooleanJobs - Whether the apikey can modify monitoring jobs.
- monitoring
Manage BooleanLists - Whether the apikey can modify notification lists.
- monitoring
View BooleanJobs - Whether the apikey can view monitoring jobs.
- name String
- The free form name of the apikey.
- security
Manage BooleanActive Directory - Whether the apikey can manage global active directory. Only relevant for the DDI product.
- security
Manage BooleanGlobal2fa - Whether the apikey can manage global two factor authentication.
- teams List<String>
- The teams that the apikey belongs to.
Supporting Types
APIKeyDnsRecordsAllow, APIKeyDnsRecordsAllowArgs
- Domain string
- Include
Subdomains bool - Type string
- Zone string
- Domain string
- Include
Subdomains bool - Type string
- Zone string
- domain String
- include
Subdomains Boolean - type String
- zone String
- domain string
- include
Subdomains boolean - type string
- zone string
- domain str
- include_
subdomains bool - type str
- zone str
- domain String
- include
Subdomains Boolean - type String
- zone String
APIKeyDnsRecordsDeny, APIKeyDnsRecordsDenyArgs
- Domain string
- Include
Subdomains bool - Type string
- Zone string
- Domain string
- Include
Subdomains bool - Type string
- Zone string
- domain String
- include
Subdomains Boolean - type String
- zone String
- domain string
- include
Subdomains boolean - type string
- zone string
- domain str
- include_
subdomains bool - type str
- zone str
- domain String
- include
Subdomains Boolean - type String
- zone String
Import
$ pulumi import ns1:index/aPIKey:APIKey `ns1_apikey`
So for the example above:
$ pulumi import ns1:index/aPIKey:APIKey example <ID>`
Package Details
- Repository
- NS1 pulumi/pulumi-ns1
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ns1
Terraform Provider.