repo
stringlengths
6
47
file_url
stringlengths
77
269
file_path
stringlengths
5
186
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-07 08:35:43
2026-01-07 08:55:24
truncated
bool
2 classes
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/keyvault/getManagedHardwareSecurityModuleRoleDefinition.go
sdk/go/azure/keyvault/getManagedHardwareSecurityModuleRoleDefinition.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package keyvault import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Key Vault Managed Hardware Security Module Role Definition. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := keyvault.LookupManagedHardwareSecurityModuleRoleDefinition(ctx, &keyvault.LookupManagedHardwareSecurityModuleRoleDefinitionArgs{ // ManagedHsmId: exampleAzurermKeyVaultManagedHardwareSecurityModule.Id, // Name: "21dbd100-6940-42c2-9190-5d6cb909625b", // }, nil) // if err != nil { // return err // } // ctx.Export("id", example.ResourceManagerId) // return nil // }) // } // // ``` func LookupManagedHardwareSecurityModuleRoleDefinition(ctx *pulumi.Context, args *LookupManagedHardwareSecurityModuleRoleDefinitionArgs, opts ...pulumi.InvokeOption) (*LookupManagedHardwareSecurityModuleRoleDefinitionResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupManagedHardwareSecurityModuleRoleDefinitionResult err := ctx.Invoke("azure:keyvault/getManagedHardwareSecurityModuleRoleDefinition:getManagedHardwareSecurityModuleRoleDefinition", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getManagedHardwareSecurityModuleRoleDefinition. type LookupManagedHardwareSecurityModuleRoleDefinitionArgs struct { // The ID of the Key Vault Managed Hardware Security Module. ManagedHsmId string `pulumi:"managedHsmId"` // The name in UUID notation of this Key Vault Managed Hardware Security Module Role Definition. Name string `pulumi:"name"` } // A collection of values returned by getManagedHardwareSecurityModuleRoleDefinition. type LookupManagedHardwareSecurityModuleRoleDefinitionResult struct { // A list of assignable role scopes. Possible values are `/` and `/keys`. AssignableScopes []string `pulumi:"assignableScopes"` // A text description of the Key Vault Managed Hardware Security Module Role Definition. Description string `pulumi:"description"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` ManagedHsmId string `pulumi:"managedHsmId"` Name string `pulumi:"name"` // A `permission` block as defined below. Permissions []GetManagedHardwareSecurityModuleRoleDefinitionPermission `pulumi:"permissions"` // The ID of the Key Vault Managed Hardware Security Module Role Definition resource without base url. ResourceManagerId string `pulumi:"resourceManagerId"` // The display name of the Key Vault Managed Hardware Security Module Role Definition. RoleName string `pulumi:"roleName"` // The type of the Key Vault Managed Hardware Security Module Role Definition. Possible values are `AKVBuiltInRole` and `CustomRole`. RoleType string `pulumi:"roleType"` } func LookupManagedHardwareSecurityModuleRoleDefinitionOutput(ctx *pulumi.Context, args LookupManagedHardwareSecurityModuleRoleDefinitionOutputArgs, opts ...pulumi.InvokeOption) LookupManagedHardwareSecurityModuleRoleDefinitionResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupManagedHardwareSecurityModuleRoleDefinitionResultOutput, error) { args := v.(LookupManagedHardwareSecurityModuleRoleDefinitionArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:keyvault/getManagedHardwareSecurityModuleRoleDefinition:getManagedHardwareSecurityModuleRoleDefinition", args, LookupManagedHardwareSecurityModuleRoleDefinitionResultOutput{}, options).(LookupManagedHardwareSecurityModuleRoleDefinitionResultOutput), nil }).(LookupManagedHardwareSecurityModuleRoleDefinitionResultOutput) } // A collection of arguments for invoking getManagedHardwareSecurityModuleRoleDefinition. type LookupManagedHardwareSecurityModuleRoleDefinitionOutputArgs struct { // The ID of the Key Vault Managed Hardware Security Module. ManagedHsmId pulumi.StringInput `pulumi:"managedHsmId"` // The name in UUID notation of this Key Vault Managed Hardware Security Module Role Definition. Name pulumi.StringInput `pulumi:"name"` } func (LookupManagedHardwareSecurityModuleRoleDefinitionOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupManagedHardwareSecurityModuleRoleDefinitionArgs)(nil)).Elem() } // A collection of values returned by getManagedHardwareSecurityModuleRoleDefinition. type LookupManagedHardwareSecurityModuleRoleDefinitionResultOutput struct{ *pulumi.OutputState } func (LookupManagedHardwareSecurityModuleRoleDefinitionResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupManagedHardwareSecurityModuleRoleDefinitionResult)(nil)).Elem() } func (o LookupManagedHardwareSecurityModuleRoleDefinitionResultOutput) ToLookupManagedHardwareSecurityModuleRoleDefinitionResultOutput() LookupManagedHardwareSecurityModuleRoleDefinitionResultOutput { return o } func (o LookupManagedHardwareSecurityModuleRoleDefinitionResultOutput) ToLookupManagedHardwareSecurityModuleRoleDefinitionResultOutputWithContext(ctx context.Context) LookupManagedHardwareSecurityModuleRoleDefinitionResultOutput { return o } // A list of assignable role scopes. Possible values are `/` and `/keys`. func (o LookupManagedHardwareSecurityModuleRoleDefinitionResultOutput) AssignableScopes() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleRoleDefinitionResult) []string { return v.AssignableScopes }).(pulumi.StringArrayOutput) } // A text description of the Key Vault Managed Hardware Security Module Role Definition. func (o LookupManagedHardwareSecurityModuleRoleDefinitionResultOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleRoleDefinitionResult) string { return v.Description }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupManagedHardwareSecurityModuleRoleDefinitionResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleRoleDefinitionResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupManagedHardwareSecurityModuleRoleDefinitionResultOutput) ManagedHsmId() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleRoleDefinitionResult) string { return v.ManagedHsmId }).(pulumi.StringOutput) } func (o LookupManagedHardwareSecurityModuleRoleDefinitionResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleRoleDefinitionResult) string { return v.Name }).(pulumi.StringOutput) } // A `permission` block as defined below. func (o LookupManagedHardwareSecurityModuleRoleDefinitionResultOutput) Permissions() GetManagedHardwareSecurityModuleRoleDefinitionPermissionArrayOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleRoleDefinitionResult) []GetManagedHardwareSecurityModuleRoleDefinitionPermission { return v.Permissions }).(GetManagedHardwareSecurityModuleRoleDefinitionPermissionArrayOutput) } // The ID of the Key Vault Managed Hardware Security Module Role Definition resource without base url. func (o LookupManagedHardwareSecurityModuleRoleDefinitionResultOutput) ResourceManagerId() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleRoleDefinitionResult) string { return v.ResourceManagerId }).(pulumi.StringOutput) } // The display name of the Key Vault Managed Hardware Security Module Role Definition. func (o LookupManagedHardwareSecurityModuleRoleDefinitionResultOutput) RoleName() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleRoleDefinitionResult) string { return v.RoleName }).(pulumi.StringOutput) } // The type of the Key Vault Managed Hardware Security Module Role Definition. Possible values are `AKVBuiltInRole` and `CustomRole`. func (o LookupManagedHardwareSecurityModuleRoleDefinitionResultOutput) RoleType() pulumi.StringOutput { return o.ApplyT(func(v LookupManagedHardwareSecurityModuleRoleDefinitionResult) string { return v.RoleType }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupManagedHardwareSecurityModuleRoleDefinitionResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/keyvault/key.go
sdk/go/azure/keyvault/key.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package keyvault import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Key Vault Key. // // ## Example Usage // // > **Note:** To use this resource, your client should have RBAC roles with permissions like `Key Vault Crypto Officer` or `Key Vault Administrator` or an assigned Key Vault Access Policy with permissions `Create`,`Delete`,`Get`,`Purge`,`Recover`,`Update` and `GetRotationPolicy` for keys without Rotation Policy. Include `SetRotationPolicy` for keys with Rotation Policy. // // > **Note:** The Azure Provider includes a Feature Toggle which will purge a Key Vault Key resource on destroy, rather than the default soft-delete. See `purgeSoftDeletedKeysOnDestroy` for more information. // // ### Additional Examples // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{ // Name: pulumi.String("examplekeyvault"), // Location: example.Location, // ResourceGroupName: example.Name, // TenantId: pulumi.String(current.TenantId), // SkuName: pulumi.String("premium"), // SoftDeleteRetentionDays: pulumi.Int(7), // AccessPolicies: keyvault.KeyVaultAccessPolicyArray{ // &keyvault.KeyVaultAccessPolicyArgs{ // TenantId: pulumi.String(current.TenantId), // ObjectId: pulumi.String(current.ObjectId), // KeyPermissions: pulumi.StringArray{ // pulumi.String("Create"), // pulumi.String("Delete"), // pulumi.String("Get"), // pulumi.String("Purge"), // pulumi.String("Recover"), // pulumi.String("Update"), // pulumi.String("GetRotationPolicy"), // pulumi.String("SetRotationPolicy"), // }, // SecretPermissions: pulumi.StringArray{ // pulumi.String("Set"), // }, // }, // }, // }) // if err != nil { // return err // } // _, err = keyvault.NewKey(ctx, "generated", &keyvault.KeyArgs{ // Name: pulumi.String("generated-certificate"), // KeyVaultId: exampleKeyVault.ID(), // KeyType: pulumi.String("RSA"), // KeySize: pulumi.Int(2048), // KeyOpts: pulumi.StringArray{ // pulumi.String("decrypt"), // pulumi.String("encrypt"), // pulumi.String("sign"), // pulumi.String("unwrapKey"), // pulumi.String("verify"), // pulumi.String("wrapKey"), // }, // RotationPolicy: &keyvault.KeyRotationPolicyArgs{ // Automatic: &keyvault.KeyRotationPolicyAutomaticArgs{ // TimeBeforeExpiry: pulumi.String("P30D"), // }, // ExpireAfter: pulumi.String("P90D"), // NotifyBeforeExpiry: pulumi.String("P29D"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Key Vault Key which is Enabled can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:keyvault/key:Key example "https://example-keyvault.vault.azure.net/keys/example/fdf067c93bbb4b22bff4d8b7a9a56217" // ``` type Key struct { pulumi.CustomResourceState // Specifies the curve to use when creating an `EC` key. Possible values are `P-256`, `P-256K`, `P-384`, and `P-521`. This field will be required in a future release if `keyType` is `EC` or `EC-HSM`. The API will default to `P-256` if nothing is specified. Changing this forces a new resource to be created. Curve pulumi.StringOutput `pulumi:"curve"` // The RSA public exponent of this Key Vault Key. E pulumi.StringOutput `pulumi:"e"` // Expiration UTC datetime (Y-m-d'T'H:M:S'Z'). // // > **Note:** Removing this field from the config forces a new resource to be created. ExpirationDate pulumi.StringPtrOutput `pulumi:"expirationDate"` // A list of JSON web key operations. Possible values include: `decrypt`, `encrypt`, `sign`, `unwrapKey`, `verify` and `wrapKey`. Please note these values are case sensitive. KeyOpts pulumi.StringArrayOutput `pulumi:"keyOpts"` // Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. *Note*: This field is required if `keyType` is `RSA` or `RSA-HSM`. Changing this forces a new resource to be created. KeySize pulumi.IntPtrOutput `pulumi:"keySize"` // Specifies the Key Type to use for this Key Vault Key. Possible values are `EC` (Elliptic Curve), `EC-HSM`, `RSA` and `RSA-HSM`. Changing this forces a new resource to be created. KeyType pulumi.StringOutput `pulumi:"keyType"` // The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created. KeyVaultId pulumi.StringOutput `pulumi:"keyVaultId"` // The RSA modulus of this Key Vault Key. N pulumi.StringOutput `pulumi:"n"` // Specifies the name of the Key Vault Key. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z'). // // > **Note:** Once `expirationDate` is set, it's not possible to unset the key even if it is deleted & recreated as underlying Azure API uses the restore of the purged key. NotBeforeDate pulumi.StringPtrOutput `pulumi:"notBeforeDate"` // The OpenSSH encoded public key of this Key Vault Key. PublicKeyOpenssh pulumi.StringOutput `pulumi:"publicKeyOpenssh"` // The PEM encoded public key of this Key Vault Key. PublicKeyPem pulumi.StringOutput `pulumi:"publicKeyPem"` // The (Versioned) ID for this Key Vault Key. This property points to a specific version of a Key Vault Key, as such using this won't auto-rotate values if used in other Azure Services. ResourceId pulumi.StringOutput `pulumi:"resourceId"` // The Versionless ID of the Key Vault Key. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Key is updated. ResourceVersionlessId pulumi.StringOutput `pulumi:"resourceVersionlessId"` // A `rotationPolicy` block as defined below. RotationPolicy KeyRotationPolicyPtrOutput `pulumi:"rotationPolicy"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // The current version of the Key Vault Key. Version pulumi.StringOutput `pulumi:"version"` // The Base ID of the Key Vault Key. VersionlessId pulumi.StringOutput `pulumi:"versionlessId"` // The EC X component of this Key Vault Key. X pulumi.StringOutput `pulumi:"x"` // The EC Y component of this Key Vault Key. Y pulumi.StringOutput `pulumi:"y"` } // NewKey registers a new resource with the given unique name, arguments, and options. func NewKey(ctx *pulumi.Context, name string, args *KeyArgs, opts ...pulumi.ResourceOption) (*Key, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.KeyOpts == nil { return nil, errors.New("invalid value for required argument 'KeyOpts'") } if args.KeyType == nil { return nil, errors.New("invalid value for required argument 'KeyType'") } if args.KeyVaultId == nil { return nil, errors.New("invalid value for required argument 'KeyVaultId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Key err := ctx.RegisterResource("azure:keyvault/key:Key", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetKey gets an existing Key resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetKey(ctx *pulumi.Context, name string, id pulumi.IDInput, state *KeyState, opts ...pulumi.ResourceOption) (*Key, error) { var resource Key err := ctx.ReadResource("azure:keyvault/key:Key", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Key resources. type keyState struct { // Specifies the curve to use when creating an `EC` key. Possible values are `P-256`, `P-256K`, `P-384`, and `P-521`. This field will be required in a future release if `keyType` is `EC` or `EC-HSM`. The API will default to `P-256` if nothing is specified. Changing this forces a new resource to be created. Curve *string `pulumi:"curve"` // The RSA public exponent of this Key Vault Key. E *string `pulumi:"e"` // Expiration UTC datetime (Y-m-d'T'H:M:S'Z'). // // > **Note:** Removing this field from the config forces a new resource to be created. ExpirationDate *string `pulumi:"expirationDate"` // A list of JSON web key operations. Possible values include: `decrypt`, `encrypt`, `sign`, `unwrapKey`, `verify` and `wrapKey`. Please note these values are case sensitive. KeyOpts []string `pulumi:"keyOpts"` // Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. *Note*: This field is required if `keyType` is `RSA` or `RSA-HSM`. Changing this forces a new resource to be created. KeySize *int `pulumi:"keySize"` // Specifies the Key Type to use for this Key Vault Key. Possible values are `EC` (Elliptic Curve), `EC-HSM`, `RSA` and `RSA-HSM`. Changing this forces a new resource to be created. KeyType *string `pulumi:"keyType"` // The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created. KeyVaultId *string `pulumi:"keyVaultId"` // The RSA modulus of this Key Vault Key. N *string `pulumi:"n"` // Specifies the name of the Key Vault Key. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z'). // // > **Note:** Once `expirationDate` is set, it's not possible to unset the key even if it is deleted & recreated as underlying Azure API uses the restore of the purged key. NotBeforeDate *string `pulumi:"notBeforeDate"` // The OpenSSH encoded public key of this Key Vault Key. PublicKeyOpenssh *string `pulumi:"publicKeyOpenssh"` // The PEM encoded public key of this Key Vault Key. PublicKeyPem *string `pulumi:"publicKeyPem"` // The (Versioned) ID for this Key Vault Key. This property points to a specific version of a Key Vault Key, as such using this won't auto-rotate values if used in other Azure Services. ResourceId *string `pulumi:"resourceId"` // The Versionless ID of the Key Vault Key. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Key is updated. ResourceVersionlessId *string `pulumi:"resourceVersionlessId"` // A `rotationPolicy` block as defined below. RotationPolicy *KeyRotationPolicy `pulumi:"rotationPolicy"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // The current version of the Key Vault Key. Version *string `pulumi:"version"` // The Base ID of the Key Vault Key. VersionlessId *string `pulumi:"versionlessId"` // The EC X component of this Key Vault Key. X *string `pulumi:"x"` // The EC Y component of this Key Vault Key. Y *string `pulumi:"y"` } type KeyState struct { // Specifies the curve to use when creating an `EC` key. Possible values are `P-256`, `P-256K`, `P-384`, and `P-521`. This field will be required in a future release if `keyType` is `EC` or `EC-HSM`. The API will default to `P-256` if nothing is specified. Changing this forces a new resource to be created. Curve pulumi.StringPtrInput // The RSA public exponent of this Key Vault Key. E pulumi.StringPtrInput // Expiration UTC datetime (Y-m-d'T'H:M:S'Z'). // // > **Note:** Removing this field from the config forces a new resource to be created. ExpirationDate pulumi.StringPtrInput // A list of JSON web key operations. Possible values include: `decrypt`, `encrypt`, `sign`, `unwrapKey`, `verify` and `wrapKey`. Please note these values are case sensitive. KeyOpts pulumi.StringArrayInput // Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. *Note*: This field is required if `keyType` is `RSA` or `RSA-HSM`. Changing this forces a new resource to be created. KeySize pulumi.IntPtrInput // Specifies the Key Type to use for this Key Vault Key. Possible values are `EC` (Elliptic Curve), `EC-HSM`, `RSA` and `RSA-HSM`. Changing this forces a new resource to be created. KeyType pulumi.StringPtrInput // The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created. KeyVaultId pulumi.StringPtrInput // The RSA modulus of this Key Vault Key. N pulumi.StringPtrInput // Specifies the name of the Key Vault Key. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z'). // // > **Note:** Once `expirationDate` is set, it's not possible to unset the key even if it is deleted & recreated as underlying Azure API uses the restore of the purged key. NotBeforeDate pulumi.StringPtrInput // The OpenSSH encoded public key of this Key Vault Key. PublicKeyOpenssh pulumi.StringPtrInput // The PEM encoded public key of this Key Vault Key. PublicKeyPem pulumi.StringPtrInput // The (Versioned) ID for this Key Vault Key. This property points to a specific version of a Key Vault Key, as such using this won't auto-rotate values if used in other Azure Services. ResourceId pulumi.StringPtrInput // The Versionless ID of the Key Vault Key. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Key is updated. ResourceVersionlessId pulumi.StringPtrInput // A `rotationPolicy` block as defined below. RotationPolicy KeyRotationPolicyPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The current version of the Key Vault Key. Version pulumi.StringPtrInput // The Base ID of the Key Vault Key. VersionlessId pulumi.StringPtrInput // The EC X component of this Key Vault Key. X pulumi.StringPtrInput // The EC Y component of this Key Vault Key. Y pulumi.StringPtrInput } func (KeyState) ElementType() reflect.Type { return reflect.TypeOf((*keyState)(nil)).Elem() } type keyArgs struct { // Specifies the curve to use when creating an `EC` key. Possible values are `P-256`, `P-256K`, `P-384`, and `P-521`. This field will be required in a future release if `keyType` is `EC` or `EC-HSM`. The API will default to `P-256` if nothing is specified. Changing this forces a new resource to be created. Curve *string `pulumi:"curve"` // Expiration UTC datetime (Y-m-d'T'H:M:S'Z'). // // > **Note:** Removing this field from the config forces a new resource to be created. ExpirationDate *string `pulumi:"expirationDate"` // A list of JSON web key operations. Possible values include: `decrypt`, `encrypt`, `sign`, `unwrapKey`, `verify` and `wrapKey`. Please note these values are case sensitive. KeyOpts []string `pulumi:"keyOpts"` // Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. *Note*: This field is required if `keyType` is `RSA` or `RSA-HSM`. Changing this forces a new resource to be created. KeySize *int `pulumi:"keySize"` // Specifies the Key Type to use for this Key Vault Key. Possible values are `EC` (Elliptic Curve), `EC-HSM`, `RSA` and `RSA-HSM`. Changing this forces a new resource to be created. KeyType string `pulumi:"keyType"` // The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created. KeyVaultId string `pulumi:"keyVaultId"` // Specifies the name of the Key Vault Key. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z'). // // > **Note:** Once `expirationDate` is set, it's not possible to unset the key even if it is deleted & recreated as underlying Azure API uses the restore of the purged key. NotBeforeDate *string `pulumi:"notBeforeDate"` // A `rotationPolicy` block as defined below. RotationPolicy *KeyRotationPolicy `pulumi:"rotationPolicy"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a Key resource. type KeyArgs struct { // Specifies the curve to use when creating an `EC` key. Possible values are `P-256`, `P-256K`, `P-384`, and `P-521`. This field will be required in a future release if `keyType` is `EC` or `EC-HSM`. The API will default to `P-256` if nothing is specified. Changing this forces a new resource to be created. Curve pulumi.StringPtrInput // Expiration UTC datetime (Y-m-d'T'H:M:S'Z'). // // > **Note:** Removing this field from the config forces a new resource to be created. ExpirationDate pulumi.StringPtrInput // A list of JSON web key operations. Possible values include: `decrypt`, `encrypt`, `sign`, `unwrapKey`, `verify` and `wrapKey`. Please note these values are case sensitive. KeyOpts pulumi.StringArrayInput // Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. *Note*: This field is required if `keyType` is `RSA` or `RSA-HSM`. Changing this forces a new resource to be created. KeySize pulumi.IntPtrInput // Specifies the Key Type to use for this Key Vault Key. Possible values are `EC` (Elliptic Curve), `EC-HSM`, `RSA` and `RSA-HSM`. Changing this forces a new resource to be created. KeyType pulumi.StringInput // The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created. KeyVaultId pulumi.StringInput // Specifies the name of the Key Vault Key. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z'). // // > **Note:** Once `expirationDate` is set, it's not possible to unset the key even if it is deleted & recreated as underlying Azure API uses the restore of the purged key. NotBeforeDate pulumi.StringPtrInput // A `rotationPolicy` block as defined below. RotationPolicy KeyRotationPolicyPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (KeyArgs) ElementType() reflect.Type { return reflect.TypeOf((*keyArgs)(nil)).Elem() } type KeyInput interface { pulumi.Input ToKeyOutput() KeyOutput ToKeyOutputWithContext(ctx context.Context) KeyOutput } func (*Key) ElementType() reflect.Type { return reflect.TypeOf((**Key)(nil)).Elem() } func (i *Key) ToKeyOutput() KeyOutput { return i.ToKeyOutputWithContext(context.Background()) } func (i *Key) ToKeyOutputWithContext(ctx context.Context) KeyOutput { return pulumi.ToOutputWithContext(ctx, i).(KeyOutput) } // KeyArrayInput is an input type that accepts KeyArray and KeyArrayOutput values. // You can construct a concrete instance of `KeyArrayInput` via: // // KeyArray{ KeyArgs{...} } type KeyArrayInput interface { pulumi.Input ToKeyArrayOutput() KeyArrayOutput ToKeyArrayOutputWithContext(context.Context) KeyArrayOutput } type KeyArray []KeyInput func (KeyArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Key)(nil)).Elem() } func (i KeyArray) ToKeyArrayOutput() KeyArrayOutput { return i.ToKeyArrayOutputWithContext(context.Background()) } func (i KeyArray) ToKeyArrayOutputWithContext(ctx context.Context) KeyArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(KeyArrayOutput) } // KeyMapInput is an input type that accepts KeyMap and KeyMapOutput values. // You can construct a concrete instance of `KeyMapInput` via: // // KeyMap{ "key": KeyArgs{...} } type KeyMapInput interface { pulumi.Input ToKeyMapOutput() KeyMapOutput ToKeyMapOutputWithContext(context.Context) KeyMapOutput } type KeyMap map[string]KeyInput func (KeyMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Key)(nil)).Elem() } func (i KeyMap) ToKeyMapOutput() KeyMapOutput { return i.ToKeyMapOutputWithContext(context.Background()) } func (i KeyMap) ToKeyMapOutputWithContext(ctx context.Context) KeyMapOutput { return pulumi.ToOutputWithContext(ctx, i).(KeyMapOutput) } type KeyOutput struct{ *pulumi.OutputState } func (KeyOutput) ElementType() reflect.Type { return reflect.TypeOf((**Key)(nil)).Elem() } func (o KeyOutput) ToKeyOutput() KeyOutput { return o } func (o KeyOutput) ToKeyOutputWithContext(ctx context.Context) KeyOutput { return o } // Specifies the curve to use when creating an `EC` key. Possible values are `P-256`, `P-256K`, `P-384`, and `P-521`. This field will be required in a future release if `keyType` is `EC` or `EC-HSM`. The API will default to `P-256` if nothing is specified. Changing this forces a new resource to be created. func (o KeyOutput) Curve() pulumi.StringOutput { return o.ApplyT(func(v *Key) pulumi.StringOutput { return v.Curve }).(pulumi.StringOutput) } // The RSA public exponent of this Key Vault Key. func (o KeyOutput) E() pulumi.StringOutput { return o.ApplyT(func(v *Key) pulumi.StringOutput { return v.E }).(pulumi.StringOutput) } // Expiration UTC datetime (Y-m-d'T'H:M:S'Z'). // // > **Note:** Removing this field from the config forces a new resource to be created. func (o KeyOutput) ExpirationDate() pulumi.StringPtrOutput { return o.ApplyT(func(v *Key) pulumi.StringPtrOutput { return v.ExpirationDate }).(pulumi.StringPtrOutput) } // A list of JSON web key operations. Possible values include: `decrypt`, `encrypt`, `sign`, `unwrapKey`, `verify` and `wrapKey`. Please note these values are case sensitive. func (o KeyOutput) KeyOpts() pulumi.StringArrayOutput { return o.ApplyT(func(v *Key) pulumi.StringArrayOutput { return v.KeyOpts }).(pulumi.StringArrayOutput) } // Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. *Note*: This field is required if `keyType` is `RSA` or `RSA-HSM`. Changing this forces a new resource to be created. func (o KeyOutput) KeySize() pulumi.IntPtrOutput { return o.ApplyT(func(v *Key) pulumi.IntPtrOutput { return v.KeySize }).(pulumi.IntPtrOutput) } // Specifies the Key Type to use for this Key Vault Key. Possible values are `EC` (Elliptic Curve), `EC-HSM`, `RSA` and `RSA-HSM`. Changing this forces a new resource to be created. func (o KeyOutput) KeyType() pulumi.StringOutput { return o.ApplyT(func(v *Key) pulumi.StringOutput { return v.KeyType }).(pulumi.StringOutput) } // The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created. func (o KeyOutput) KeyVaultId() pulumi.StringOutput { return o.ApplyT(func(v *Key) pulumi.StringOutput { return v.KeyVaultId }).(pulumi.StringOutput) } // The RSA modulus of this Key Vault Key. func (o KeyOutput) N() pulumi.StringOutput { return o.ApplyT(func(v *Key) pulumi.StringOutput { return v.N }).(pulumi.StringOutput) } // Specifies the name of the Key Vault Key. Changing this forces a new resource to be created. func (o KeyOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Key) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z'). // // > **Note:** Once `expirationDate` is set, it's not possible to unset the key even if it is deleted & recreated as underlying Azure API uses the restore of the purged key. func (o KeyOutput) NotBeforeDate() pulumi.StringPtrOutput { return o.ApplyT(func(v *Key) pulumi.StringPtrOutput { return v.NotBeforeDate }).(pulumi.StringPtrOutput) } // The OpenSSH encoded public key of this Key Vault Key. func (o KeyOutput) PublicKeyOpenssh() pulumi.StringOutput { return o.ApplyT(func(v *Key) pulumi.StringOutput { return v.PublicKeyOpenssh }).(pulumi.StringOutput) } // The PEM encoded public key of this Key Vault Key. func (o KeyOutput) PublicKeyPem() pulumi.StringOutput { return o.ApplyT(func(v *Key) pulumi.StringOutput { return v.PublicKeyPem }).(pulumi.StringOutput) } // The (Versioned) ID for this Key Vault Key. This property points to a specific version of a Key Vault Key, as such using this won't auto-rotate values if used in other Azure Services. func (o KeyOutput) ResourceId() pulumi.StringOutput { return o.ApplyT(func(v *Key) pulumi.StringOutput { return v.ResourceId }).(pulumi.StringOutput) } // The Versionless ID of the Key Vault Key. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Key is updated. func (o KeyOutput) ResourceVersionlessId() pulumi.StringOutput { return o.ApplyT(func(v *Key) pulumi.StringOutput { return v.ResourceVersionlessId }).(pulumi.StringOutput) } // A `rotationPolicy` block as defined below. func (o KeyOutput) RotationPolicy() KeyRotationPolicyPtrOutput { return o.ApplyT(func(v *Key) KeyRotationPolicyPtrOutput { return v.RotationPolicy }).(KeyRotationPolicyPtrOutput) } // A mapping of tags to assign to the resource. func (o KeyOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Key) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The current version of the Key Vault Key. func (o KeyOutput) Version() pulumi.StringOutput { return o.ApplyT(func(v *Key) pulumi.StringOutput { return v.Version }).(pulumi.StringOutput) } // The Base ID of the Key Vault Key. func (o KeyOutput) VersionlessId() pulumi.StringOutput { return o.ApplyT(func(v *Key) pulumi.StringOutput { return v.VersionlessId }).(pulumi.StringOutput) } // The EC X component of this Key Vault Key. func (o KeyOutput) X() pulumi.StringOutput { return o.ApplyT(func(v *Key) pulumi.StringOutput { return v.X }).(pulumi.StringOutput) } // The EC Y component of this Key Vault Key. func (o KeyOutput) Y() pulumi.StringOutput { return o.ApplyT(func(v *Key) pulumi.StringOutput { return v.Y }).(pulumi.StringOutput) } type KeyArrayOutput struct{ *pulumi.OutputState } func (KeyArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Key)(nil)).Elem() } func (o KeyArrayOutput) ToKeyArrayOutput() KeyArrayOutput { return o } func (o KeyArrayOutput) ToKeyArrayOutputWithContext(ctx context.Context) KeyArrayOutput { return o } func (o KeyArrayOutput) Index(i pulumi.IntInput) KeyOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Key { return vs[0].([]*Key)[vs[1].(int)] }).(KeyOutput) } type KeyMapOutput struct{ *pulumi.OutputState } func (KeyMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Key)(nil)).Elem() } func (o KeyMapOutput) ToKeyMapOutput() KeyMapOutput { return o } func (o KeyMapOutput) ToKeyMapOutputWithContext(ctx context.Context) KeyMapOutput { return o } func (o KeyMapOutput) MapIndex(k pulumi.StringInput) KeyOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Key { return vs[0].(map[string]*Key)[vs[1].(string)] }).(KeyOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*KeyInput)(nil)).Elem(), &Key{}) pulumi.RegisterInputType(reflect.TypeOf((*KeyArrayInput)(nil)).Elem(), KeyArray{}) pulumi.RegisterInputType(reflect.TypeOf((*KeyMapInput)(nil)).Elem(), KeyMap{}) pulumi.RegisterOutputType(KeyOutput{}) pulumi.RegisterOutputType(KeyArrayOutput{}) pulumi.RegisterOutputType(KeyMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/keyvault/getKeyVault.go
sdk/go/azure/keyvault/getKeyVault.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package keyvault import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Key Vault. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := keyvault.LookupKeyVault(ctx, &keyvault.LookupKeyVaultArgs{ // Name: "mykeyvault", // ResourceGroupName: "some-resource-group", // }, nil) // if err != nil { // return err // } // ctx.Export("vaultUri", example.VaultUri) // return nil // }) // } // // ``` func LookupKeyVault(ctx *pulumi.Context, args *LookupKeyVaultArgs, opts ...pulumi.InvokeOption) (*LookupKeyVaultResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupKeyVaultResult err := ctx.Invoke("azure:keyvault/getKeyVault:getKeyVault", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getKeyVault. type LookupKeyVaultArgs struct { // Specifies the name of the Key Vault. Name string `pulumi:"name"` // The name of the Resource Group in which the Key Vault exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getKeyVault. type LookupKeyVaultResult struct { // One or more `accessPolicy` blocks as defined below. AccessPolicies []GetKeyVaultAccessPolicy `pulumi:"accessPolicies"` // Is Role Based Access Control (RBAC) for authorization of data actions enabled on this Key Vault? // // Deprecated: the `enableRbacAuthorization` property is deprecated in favour of `rbacAuthorizationEnabled` and will be removed in v5.0 of the AzureRM Provider. EnableRbacAuthorization bool `pulumi:"enableRbacAuthorization"` // Can Azure Virtual Machines retrieve certificates stored as secrets from the Key Vault? EnabledForDeployment bool `pulumi:"enabledForDeployment"` // Can Azure Disk Encryption retrieve secrets from the Key Vault? EnabledForDiskEncryption bool `pulumi:"enabledForDiskEncryption"` // Can Azure Resource Manager retrieve secrets from the Key Vault? EnabledForTemplateDeployment bool `pulumi:"enabledForTemplateDeployment"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The Azure Region in which the Key Vault exists. Location string `pulumi:"location"` Name string `pulumi:"name"` NetworkAcls []GetKeyVaultNetworkAcl `pulumi:"networkAcls"` // Is public network access enabled on this Key Vault? PublicNetworkAccessEnabled bool `pulumi:"publicNetworkAccessEnabled"` // Is purge protection enabled on this Key Vault? PurgeProtectionEnabled bool `pulumi:"purgeProtectionEnabled"` RbacAuthorizationEnabled bool `pulumi:"rbacAuthorizationEnabled"` ResourceGroupName string `pulumi:"resourceGroupName"` // The Name of the SKU used for this Key Vault. SkuName string `pulumi:"skuName"` // A mapping of tags assigned to the Key Vault. Tags map[string]string `pulumi:"tags"` // The Azure Active Directory Tenant ID used to authenticate requests for this Key Vault. TenantId string `pulumi:"tenantId"` // The URI of the vault for performing operations on keys and secrets. VaultUri string `pulumi:"vaultUri"` } func LookupKeyVaultOutput(ctx *pulumi.Context, args LookupKeyVaultOutputArgs, opts ...pulumi.InvokeOption) LookupKeyVaultResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupKeyVaultResultOutput, error) { args := v.(LookupKeyVaultArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:keyvault/getKeyVault:getKeyVault", args, LookupKeyVaultResultOutput{}, options).(LookupKeyVaultResultOutput), nil }).(LookupKeyVaultResultOutput) } // A collection of arguments for invoking getKeyVault. type LookupKeyVaultOutputArgs struct { // Specifies the name of the Key Vault. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group in which the Key Vault exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupKeyVaultOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupKeyVaultArgs)(nil)).Elem() } // A collection of values returned by getKeyVault. type LookupKeyVaultResultOutput struct{ *pulumi.OutputState } func (LookupKeyVaultResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupKeyVaultResult)(nil)).Elem() } func (o LookupKeyVaultResultOutput) ToLookupKeyVaultResultOutput() LookupKeyVaultResultOutput { return o } func (o LookupKeyVaultResultOutput) ToLookupKeyVaultResultOutputWithContext(ctx context.Context) LookupKeyVaultResultOutput { return o } // One or more `accessPolicy` blocks as defined below. func (o LookupKeyVaultResultOutput) AccessPolicies() GetKeyVaultAccessPolicyArrayOutput { return o.ApplyT(func(v LookupKeyVaultResult) []GetKeyVaultAccessPolicy { return v.AccessPolicies }).(GetKeyVaultAccessPolicyArrayOutput) } // Is Role Based Access Control (RBAC) for authorization of data actions enabled on this Key Vault? // // Deprecated: the `enableRbacAuthorization` property is deprecated in favour of `rbacAuthorizationEnabled` and will be removed in v5.0 of the AzureRM Provider. func (o LookupKeyVaultResultOutput) EnableRbacAuthorization() pulumi.BoolOutput { return o.ApplyT(func(v LookupKeyVaultResult) bool { return v.EnableRbacAuthorization }).(pulumi.BoolOutput) } // Can Azure Virtual Machines retrieve certificates stored as secrets from the Key Vault? func (o LookupKeyVaultResultOutput) EnabledForDeployment() pulumi.BoolOutput { return o.ApplyT(func(v LookupKeyVaultResult) bool { return v.EnabledForDeployment }).(pulumi.BoolOutput) } // Can Azure Disk Encryption retrieve secrets from the Key Vault? func (o LookupKeyVaultResultOutput) EnabledForDiskEncryption() pulumi.BoolOutput { return o.ApplyT(func(v LookupKeyVaultResult) bool { return v.EnabledForDiskEncryption }).(pulumi.BoolOutput) } // Can Azure Resource Manager retrieve secrets from the Key Vault? func (o LookupKeyVaultResultOutput) EnabledForTemplateDeployment() pulumi.BoolOutput { return o.ApplyT(func(v LookupKeyVaultResult) bool { return v.EnabledForTemplateDeployment }).(pulumi.BoolOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupKeyVaultResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupKeyVaultResult) string { return v.Id }).(pulumi.StringOutput) } // The Azure Region in which the Key Vault exists. func (o LookupKeyVaultResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupKeyVaultResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupKeyVaultResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupKeyVaultResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupKeyVaultResultOutput) NetworkAcls() GetKeyVaultNetworkAclArrayOutput { return o.ApplyT(func(v LookupKeyVaultResult) []GetKeyVaultNetworkAcl { return v.NetworkAcls }).(GetKeyVaultNetworkAclArrayOutput) } // Is public network access enabled on this Key Vault? func (o LookupKeyVaultResultOutput) PublicNetworkAccessEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupKeyVaultResult) bool { return v.PublicNetworkAccessEnabled }).(pulumi.BoolOutput) } // Is purge protection enabled on this Key Vault? func (o LookupKeyVaultResultOutput) PurgeProtectionEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupKeyVaultResult) bool { return v.PurgeProtectionEnabled }).(pulumi.BoolOutput) } func (o LookupKeyVaultResultOutput) RbacAuthorizationEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupKeyVaultResult) bool { return v.RbacAuthorizationEnabled }).(pulumi.BoolOutput) } func (o LookupKeyVaultResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupKeyVaultResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // The Name of the SKU used for this Key Vault. func (o LookupKeyVaultResultOutput) SkuName() pulumi.StringOutput { return o.ApplyT(func(v LookupKeyVaultResult) string { return v.SkuName }).(pulumi.StringOutput) } // A mapping of tags assigned to the Key Vault. func (o LookupKeyVaultResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupKeyVaultResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The Azure Active Directory Tenant ID used to authenticate requests for this Key Vault. func (o LookupKeyVaultResultOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v LookupKeyVaultResult) string { return v.TenantId }).(pulumi.StringOutput) } // The URI of the vault for performing operations on keys and secrets. func (o LookupKeyVaultResultOutput) VaultUri() pulumi.StringOutput { return o.ApplyT(func(v LookupKeyVaultResult) string { return v.VaultUri }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupKeyVaultResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/keyvault/getCertificate.go
sdk/go/azure/keyvault/getCertificate.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package keyvault import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Key Vault Certificate. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := keyvault.LookupKeyVault(ctx, &keyvault.LookupKeyVaultArgs{ // Name: "examplekv", // ResourceGroupName: "some-resource-group", // }, nil) // if err != nil { // return err // } // exampleGetCertificate, err := keyvault.LookupCertificate(ctx, &keyvault.LookupCertificateArgs{ // Name: "secret-sauce", // KeyVaultId: example.Id, // }, nil) // if err != nil { // return err // } // ctx.Export("certificateThumbprint", exampleGetCertificate.Thumbprint) // return nil // }) // } // // ``` func LookupCertificate(ctx *pulumi.Context, args *LookupCertificateArgs, opts ...pulumi.InvokeOption) (*LookupCertificateResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupCertificateResult err := ctx.Invoke("azure:keyvault/getCertificate:getCertificate", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getCertificate. type LookupCertificateArgs struct { // Specifies the ID of the Key Vault instance where the Secret resides, available on the `keyvault.KeyVault` Data Source / Resource. KeyVaultId string `pulumi:"keyVaultId"` // Specifies the name of the Key Vault Certificate. Name string `pulumi:"name"` // Specifies the version of the certificate to look up. (Defaults to latest) // // > **Note:** The vault must be in the same subscription as the provider. If the vault is in another subscription, you must create an aliased provider for that subscription. Version *string `pulumi:"version"` } // A collection of values returned by getCertificate. type LookupCertificateResult struct { // The raw Key Vault Certificate data represented as a hexadecimal string. CertificateData string `pulumi:"certificateData"` // The raw Key Vault Certificate data represented as a base64 string. CertificateDataBase64 string `pulumi:"certificateDataBase64"` // A `certificatePolicy` block as defined below. CertificatePolicies []GetCertificateCertificatePolicy `pulumi:"certificatePolicies"` // Expiry date of certificate in RFC3339 format. Expires string `pulumi:"expires"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` KeyVaultId string `pulumi:"keyVaultId"` // The name of the Certificate Issuer. Name string `pulumi:"name"` // Not Before date of certificate in RFC3339 format. NotBefore string `pulumi:"notBefore"` // The (Versioned) ID for this Key Vault Certificate. This property points to a specific version of a Key Vault Certificate, as such using this won't auto-rotate values if used in other Azure Services. ResourceManagerId string `pulumi:"resourceManagerId"` // The Versionless ID of the Key Vault Certificate. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Certificate is updated. ResourceManagerVersionlessId string `pulumi:"resourceManagerVersionlessId"` // The ID of the associated Key Vault Secret. SecretId string `pulumi:"secretId"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // The X509 Thumbprint of the Key Vault Certificate represented as a hexadecimal string. Thumbprint string `pulumi:"thumbprint"` // The current version of the Key Vault Certificate. Version string `pulumi:"version"` // The Base ID of the Key Vault Certificate. VersionlessId string `pulumi:"versionlessId"` // The Base ID of the Key Vault Secret. VersionlessSecretId string `pulumi:"versionlessSecretId"` } func LookupCertificateOutput(ctx *pulumi.Context, args LookupCertificateOutputArgs, opts ...pulumi.InvokeOption) LookupCertificateResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupCertificateResultOutput, error) { args := v.(LookupCertificateArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:keyvault/getCertificate:getCertificate", args, LookupCertificateResultOutput{}, options).(LookupCertificateResultOutput), nil }).(LookupCertificateResultOutput) } // A collection of arguments for invoking getCertificate. type LookupCertificateOutputArgs struct { // Specifies the ID of the Key Vault instance where the Secret resides, available on the `keyvault.KeyVault` Data Source / Resource. KeyVaultId pulumi.StringInput `pulumi:"keyVaultId"` // Specifies the name of the Key Vault Certificate. Name pulumi.StringInput `pulumi:"name"` // Specifies the version of the certificate to look up. (Defaults to latest) // // > **Note:** The vault must be in the same subscription as the provider. If the vault is in another subscription, you must create an aliased provider for that subscription. Version pulumi.StringPtrInput `pulumi:"version"` } func (LookupCertificateOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupCertificateArgs)(nil)).Elem() } // A collection of values returned by getCertificate. type LookupCertificateResultOutput struct{ *pulumi.OutputState } func (LookupCertificateResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupCertificateResult)(nil)).Elem() } func (o LookupCertificateResultOutput) ToLookupCertificateResultOutput() LookupCertificateResultOutput { return o } func (o LookupCertificateResultOutput) ToLookupCertificateResultOutputWithContext(ctx context.Context) LookupCertificateResultOutput { return o } // The raw Key Vault Certificate data represented as a hexadecimal string. func (o LookupCertificateResultOutput) CertificateData() pulumi.StringOutput { return o.ApplyT(func(v LookupCertificateResult) string { return v.CertificateData }).(pulumi.StringOutput) } // The raw Key Vault Certificate data represented as a base64 string. func (o LookupCertificateResultOutput) CertificateDataBase64() pulumi.StringOutput { return o.ApplyT(func(v LookupCertificateResult) string { return v.CertificateDataBase64 }).(pulumi.StringOutput) } // A `certificatePolicy` block as defined below. func (o LookupCertificateResultOutput) CertificatePolicies() GetCertificateCertificatePolicyArrayOutput { return o.ApplyT(func(v LookupCertificateResult) []GetCertificateCertificatePolicy { return v.CertificatePolicies }).(GetCertificateCertificatePolicyArrayOutput) } // Expiry date of certificate in RFC3339 format. func (o LookupCertificateResultOutput) Expires() pulumi.StringOutput { return o.ApplyT(func(v LookupCertificateResult) string { return v.Expires }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupCertificateResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupCertificateResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupCertificateResultOutput) KeyVaultId() pulumi.StringOutput { return o.ApplyT(func(v LookupCertificateResult) string { return v.KeyVaultId }).(pulumi.StringOutput) } // The name of the Certificate Issuer. func (o LookupCertificateResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupCertificateResult) string { return v.Name }).(pulumi.StringOutput) } // Not Before date of certificate in RFC3339 format. func (o LookupCertificateResultOutput) NotBefore() pulumi.StringOutput { return o.ApplyT(func(v LookupCertificateResult) string { return v.NotBefore }).(pulumi.StringOutput) } // The (Versioned) ID for this Key Vault Certificate. This property points to a specific version of a Key Vault Certificate, as such using this won't auto-rotate values if used in other Azure Services. func (o LookupCertificateResultOutput) ResourceManagerId() pulumi.StringOutput { return o.ApplyT(func(v LookupCertificateResult) string { return v.ResourceManagerId }).(pulumi.StringOutput) } // The Versionless ID of the Key Vault Certificate. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Certificate is updated. func (o LookupCertificateResultOutput) ResourceManagerVersionlessId() pulumi.StringOutput { return o.ApplyT(func(v LookupCertificateResult) string { return v.ResourceManagerVersionlessId }).(pulumi.StringOutput) } // The ID of the associated Key Vault Secret. func (o LookupCertificateResultOutput) SecretId() pulumi.StringOutput { return o.ApplyT(func(v LookupCertificateResult) string { return v.SecretId }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o LookupCertificateResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupCertificateResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The X509 Thumbprint of the Key Vault Certificate represented as a hexadecimal string. func (o LookupCertificateResultOutput) Thumbprint() pulumi.StringOutput { return o.ApplyT(func(v LookupCertificateResult) string { return v.Thumbprint }).(pulumi.StringOutput) } // The current version of the Key Vault Certificate. func (o LookupCertificateResultOutput) Version() pulumi.StringOutput { return o.ApplyT(func(v LookupCertificateResult) string { return v.Version }).(pulumi.StringOutput) } // The Base ID of the Key Vault Certificate. func (o LookupCertificateResultOutput) VersionlessId() pulumi.StringOutput { return o.ApplyT(func(v LookupCertificateResult) string { return v.VersionlessId }).(pulumi.StringOutput) } // The Base ID of the Key Vault Secret. func (o LookupCertificateResultOutput) VersionlessSecretId() pulumi.StringOutput { return o.ApplyT(func(v LookupCertificateResult) string { return v.VersionlessSecretId }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupCertificateResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/config/pulumiTypes.go
sdk/go/azure/config/pulumiTypes.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package config import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) var _ = internal.GetEnvOrDefault type Features struct { ApiManagement *FeaturesApiManagement `pulumi:"apiManagement"` AppConfiguration *FeaturesAppConfiguration `pulumi:"appConfiguration"` ApplicationInsights *FeaturesApplicationInsights `pulumi:"applicationInsights"` CognitiveAccount *FeaturesCognitiveAccount `pulumi:"cognitiveAccount"` DatabricksWorkspace *FeaturesDatabricksWorkspace `pulumi:"databricksWorkspace"` KeyVault *FeaturesKeyVault `pulumi:"keyVault"` LogAnalyticsWorkspace *FeaturesLogAnalyticsWorkspace `pulumi:"logAnalyticsWorkspace"` MachineLearning *FeaturesMachineLearning `pulumi:"machineLearning"` ManagedDisk *FeaturesManagedDisk `pulumi:"managedDisk"` Netapp *FeaturesNetapp `pulumi:"netapp"` PostgresqlFlexibleServer *FeaturesPostgresqlFlexibleServer `pulumi:"postgresqlFlexibleServer"` RecoveryService *FeaturesRecoveryService `pulumi:"recoveryService"` RecoveryServicesVaults *FeaturesRecoveryServicesVaults `pulumi:"recoveryServicesVaults"` ResourceGroup *FeaturesResourceGroup `pulumi:"resourceGroup"` Storage *FeaturesStorage `pulumi:"storage"` Subscription *FeaturesSubscription `pulumi:"subscription"` TemplateDeployment *FeaturesTemplateDeployment `pulumi:"templateDeployment"` VirtualMachine *FeaturesVirtualMachine `pulumi:"virtualMachine"` VirtualMachineScaleSet *FeaturesVirtualMachineScaleSet `pulumi:"virtualMachineScaleSet"` } // FeaturesInput is an input type that accepts FeaturesArgs and FeaturesOutput values. // You can construct a concrete instance of `FeaturesInput` via: // // FeaturesArgs{...} type FeaturesInput interface { pulumi.Input ToFeaturesOutput() FeaturesOutput ToFeaturesOutputWithContext(context.Context) FeaturesOutput } type FeaturesArgs struct { ApiManagement FeaturesApiManagementPtrInput `pulumi:"apiManagement"` AppConfiguration FeaturesAppConfigurationPtrInput `pulumi:"appConfiguration"` ApplicationInsights FeaturesApplicationInsightsPtrInput `pulumi:"applicationInsights"` CognitiveAccount FeaturesCognitiveAccountPtrInput `pulumi:"cognitiveAccount"` DatabricksWorkspace FeaturesDatabricksWorkspacePtrInput `pulumi:"databricksWorkspace"` KeyVault FeaturesKeyVaultPtrInput `pulumi:"keyVault"` LogAnalyticsWorkspace FeaturesLogAnalyticsWorkspacePtrInput `pulumi:"logAnalyticsWorkspace"` MachineLearning FeaturesMachineLearningPtrInput `pulumi:"machineLearning"` ManagedDisk FeaturesManagedDiskPtrInput `pulumi:"managedDisk"` Netapp FeaturesNetappPtrInput `pulumi:"netapp"` PostgresqlFlexibleServer FeaturesPostgresqlFlexibleServerPtrInput `pulumi:"postgresqlFlexibleServer"` RecoveryService FeaturesRecoveryServicePtrInput `pulumi:"recoveryService"` RecoveryServicesVaults FeaturesRecoveryServicesVaultsPtrInput `pulumi:"recoveryServicesVaults"` ResourceGroup FeaturesResourceGroupPtrInput `pulumi:"resourceGroup"` Storage FeaturesStoragePtrInput `pulumi:"storage"` Subscription FeaturesSubscriptionPtrInput `pulumi:"subscription"` TemplateDeployment FeaturesTemplateDeploymentPtrInput `pulumi:"templateDeployment"` VirtualMachine FeaturesVirtualMachinePtrInput `pulumi:"virtualMachine"` VirtualMachineScaleSet FeaturesVirtualMachineScaleSetPtrInput `pulumi:"virtualMachineScaleSet"` } func (FeaturesArgs) ElementType() reflect.Type { return reflect.TypeOf((*Features)(nil)).Elem() } func (i FeaturesArgs) ToFeaturesOutput() FeaturesOutput { return i.ToFeaturesOutputWithContext(context.Background()) } func (i FeaturesArgs) ToFeaturesOutputWithContext(ctx context.Context) FeaturesOutput { return pulumi.ToOutputWithContext(ctx, i).(FeaturesOutput) } type FeaturesOutput struct{ *pulumi.OutputState } func (FeaturesOutput) ElementType() reflect.Type { return reflect.TypeOf((*Features)(nil)).Elem() } func (o FeaturesOutput) ToFeaturesOutput() FeaturesOutput { return o } func (o FeaturesOutput) ToFeaturesOutputWithContext(ctx context.Context) FeaturesOutput { return o } func (o FeaturesOutput) ApiManagement() FeaturesApiManagementPtrOutput { return o.ApplyT(func(v Features) *FeaturesApiManagement { return v.ApiManagement }).(FeaturesApiManagementPtrOutput) } func (o FeaturesOutput) AppConfiguration() FeaturesAppConfigurationPtrOutput { return o.ApplyT(func(v Features) *FeaturesAppConfiguration { return v.AppConfiguration }).(FeaturesAppConfigurationPtrOutput) } func (o FeaturesOutput) ApplicationInsights() FeaturesApplicationInsightsPtrOutput { return o.ApplyT(func(v Features) *FeaturesApplicationInsights { return v.ApplicationInsights }).(FeaturesApplicationInsightsPtrOutput) } func (o FeaturesOutput) CognitiveAccount() FeaturesCognitiveAccountPtrOutput { return o.ApplyT(func(v Features) *FeaturesCognitiveAccount { return v.CognitiveAccount }).(FeaturesCognitiveAccountPtrOutput) } func (o FeaturesOutput) DatabricksWorkspace() FeaturesDatabricksWorkspacePtrOutput { return o.ApplyT(func(v Features) *FeaturesDatabricksWorkspace { return v.DatabricksWorkspace }).(FeaturesDatabricksWorkspacePtrOutput) } func (o FeaturesOutput) KeyVault() FeaturesKeyVaultPtrOutput { return o.ApplyT(func(v Features) *FeaturesKeyVault { return v.KeyVault }).(FeaturesKeyVaultPtrOutput) } func (o FeaturesOutput) LogAnalyticsWorkspace() FeaturesLogAnalyticsWorkspacePtrOutput { return o.ApplyT(func(v Features) *FeaturesLogAnalyticsWorkspace { return v.LogAnalyticsWorkspace }).(FeaturesLogAnalyticsWorkspacePtrOutput) } func (o FeaturesOutput) MachineLearning() FeaturesMachineLearningPtrOutput { return o.ApplyT(func(v Features) *FeaturesMachineLearning { return v.MachineLearning }).(FeaturesMachineLearningPtrOutput) } func (o FeaturesOutput) ManagedDisk() FeaturesManagedDiskPtrOutput { return o.ApplyT(func(v Features) *FeaturesManagedDisk { return v.ManagedDisk }).(FeaturesManagedDiskPtrOutput) } func (o FeaturesOutput) Netapp() FeaturesNetappPtrOutput { return o.ApplyT(func(v Features) *FeaturesNetapp { return v.Netapp }).(FeaturesNetappPtrOutput) } func (o FeaturesOutput) PostgresqlFlexibleServer() FeaturesPostgresqlFlexibleServerPtrOutput { return o.ApplyT(func(v Features) *FeaturesPostgresqlFlexibleServer { return v.PostgresqlFlexibleServer }).(FeaturesPostgresqlFlexibleServerPtrOutput) } func (o FeaturesOutput) RecoveryService() FeaturesRecoveryServicePtrOutput { return o.ApplyT(func(v Features) *FeaturesRecoveryService { return v.RecoveryService }).(FeaturesRecoveryServicePtrOutput) } func (o FeaturesOutput) RecoveryServicesVaults() FeaturesRecoveryServicesVaultsPtrOutput { return o.ApplyT(func(v Features) *FeaturesRecoveryServicesVaults { return v.RecoveryServicesVaults }).(FeaturesRecoveryServicesVaultsPtrOutput) } func (o FeaturesOutput) ResourceGroup() FeaturesResourceGroupPtrOutput { return o.ApplyT(func(v Features) *FeaturesResourceGroup { return v.ResourceGroup }).(FeaturesResourceGroupPtrOutput) } func (o FeaturesOutput) Storage() FeaturesStoragePtrOutput { return o.ApplyT(func(v Features) *FeaturesStorage { return v.Storage }).(FeaturesStoragePtrOutput) } func (o FeaturesOutput) Subscription() FeaturesSubscriptionPtrOutput { return o.ApplyT(func(v Features) *FeaturesSubscription { return v.Subscription }).(FeaturesSubscriptionPtrOutput) } func (o FeaturesOutput) TemplateDeployment() FeaturesTemplateDeploymentPtrOutput { return o.ApplyT(func(v Features) *FeaturesTemplateDeployment { return v.TemplateDeployment }).(FeaturesTemplateDeploymentPtrOutput) } func (o FeaturesOutput) VirtualMachine() FeaturesVirtualMachinePtrOutput { return o.ApplyT(func(v Features) *FeaturesVirtualMachine { return v.VirtualMachine }).(FeaturesVirtualMachinePtrOutput) } func (o FeaturesOutput) VirtualMachineScaleSet() FeaturesVirtualMachineScaleSetPtrOutput { return o.ApplyT(func(v Features) *FeaturesVirtualMachineScaleSet { return v.VirtualMachineScaleSet }).(FeaturesVirtualMachineScaleSetPtrOutput) } type FeaturesApiManagement struct { PurgeSoftDeleteOnDestroy *bool `pulumi:"purgeSoftDeleteOnDestroy"` RecoverSoftDeleted *bool `pulumi:"recoverSoftDeleted"` } // FeaturesApiManagementInput is an input type that accepts FeaturesApiManagementArgs and FeaturesApiManagementOutput values. // You can construct a concrete instance of `FeaturesApiManagementInput` via: // // FeaturesApiManagementArgs{...} type FeaturesApiManagementInput interface { pulumi.Input ToFeaturesApiManagementOutput() FeaturesApiManagementOutput ToFeaturesApiManagementOutputWithContext(context.Context) FeaturesApiManagementOutput } type FeaturesApiManagementArgs struct { PurgeSoftDeleteOnDestroy pulumi.BoolPtrInput `pulumi:"purgeSoftDeleteOnDestroy"` RecoverSoftDeleted pulumi.BoolPtrInput `pulumi:"recoverSoftDeleted"` } func (FeaturesApiManagementArgs) ElementType() reflect.Type { return reflect.TypeOf((*FeaturesApiManagement)(nil)).Elem() } func (i FeaturesApiManagementArgs) ToFeaturesApiManagementOutput() FeaturesApiManagementOutput { return i.ToFeaturesApiManagementOutputWithContext(context.Background()) } func (i FeaturesApiManagementArgs) ToFeaturesApiManagementOutputWithContext(ctx context.Context) FeaturesApiManagementOutput { return pulumi.ToOutputWithContext(ctx, i).(FeaturesApiManagementOutput) } func (i FeaturesApiManagementArgs) ToFeaturesApiManagementPtrOutput() FeaturesApiManagementPtrOutput { return i.ToFeaturesApiManagementPtrOutputWithContext(context.Background()) } func (i FeaturesApiManagementArgs) ToFeaturesApiManagementPtrOutputWithContext(ctx context.Context) FeaturesApiManagementPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FeaturesApiManagementOutput).ToFeaturesApiManagementPtrOutputWithContext(ctx) } // FeaturesApiManagementPtrInput is an input type that accepts FeaturesApiManagementArgs, FeaturesApiManagementPtr and FeaturesApiManagementPtrOutput values. // You can construct a concrete instance of `FeaturesApiManagementPtrInput` via: // // FeaturesApiManagementArgs{...} // // or: // // nil type FeaturesApiManagementPtrInput interface { pulumi.Input ToFeaturesApiManagementPtrOutput() FeaturesApiManagementPtrOutput ToFeaturesApiManagementPtrOutputWithContext(context.Context) FeaturesApiManagementPtrOutput } type featuresApiManagementPtrType FeaturesApiManagementArgs func FeaturesApiManagementPtr(v *FeaturesApiManagementArgs) FeaturesApiManagementPtrInput { return (*featuresApiManagementPtrType)(v) } func (*featuresApiManagementPtrType) ElementType() reflect.Type { return reflect.TypeOf((**FeaturesApiManagement)(nil)).Elem() } func (i *featuresApiManagementPtrType) ToFeaturesApiManagementPtrOutput() FeaturesApiManagementPtrOutput { return i.ToFeaturesApiManagementPtrOutputWithContext(context.Background()) } func (i *featuresApiManagementPtrType) ToFeaturesApiManagementPtrOutputWithContext(ctx context.Context) FeaturesApiManagementPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FeaturesApiManagementPtrOutput) } type FeaturesApiManagementOutput struct{ *pulumi.OutputState } func (FeaturesApiManagementOutput) ElementType() reflect.Type { return reflect.TypeOf((*FeaturesApiManagement)(nil)).Elem() } func (o FeaturesApiManagementOutput) ToFeaturesApiManagementOutput() FeaturesApiManagementOutput { return o } func (o FeaturesApiManagementOutput) ToFeaturesApiManagementOutputWithContext(ctx context.Context) FeaturesApiManagementOutput { return o } func (o FeaturesApiManagementOutput) ToFeaturesApiManagementPtrOutput() FeaturesApiManagementPtrOutput { return o.ToFeaturesApiManagementPtrOutputWithContext(context.Background()) } func (o FeaturesApiManagementOutput) ToFeaturesApiManagementPtrOutputWithContext(ctx context.Context) FeaturesApiManagementPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v FeaturesApiManagement) *FeaturesApiManagement { return &v }).(FeaturesApiManagementPtrOutput) } func (o FeaturesApiManagementOutput) PurgeSoftDeleteOnDestroy() pulumi.BoolPtrOutput { return o.ApplyT(func(v FeaturesApiManagement) *bool { return v.PurgeSoftDeleteOnDestroy }).(pulumi.BoolPtrOutput) } func (o FeaturesApiManagementOutput) RecoverSoftDeleted() pulumi.BoolPtrOutput { return o.ApplyT(func(v FeaturesApiManagement) *bool { return v.RecoverSoftDeleted }).(pulumi.BoolPtrOutput) } type FeaturesApiManagementPtrOutput struct{ *pulumi.OutputState } func (FeaturesApiManagementPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**FeaturesApiManagement)(nil)).Elem() } func (o FeaturesApiManagementPtrOutput) ToFeaturesApiManagementPtrOutput() FeaturesApiManagementPtrOutput { return o } func (o FeaturesApiManagementPtrOutput) ToFeaturesApiManagementPtrOutputWithContext(ctx context.Context) FeaturesApiManagementPtrOutput { return o } func (o FeaturesApiManagementPtrOutput) Elem() FeaturesApiManagementOutput { return o.ApplyT(func(v *FeaturesApiManagement) FeaturesApiManagement { if v != nil { return *v } var ret FeaturesApiManagement return ret }).(FeaturesApiManagementOutput) } func (o FeaturesApiManagementPtrOutput) PurgeSoftDeleteOnDestroy() pulumi.BoolPtrOutput { return o.ApplyT(func(v *FeaturesApiManagement) *bool { if v == nil { return nil } return v.PurgeSoftDeleteOnDestroy }).(pulumi.BoolPtrOutput) } func (o FeaturesApiManagementPtrOutput) RecoverSoftDeleted() pulumi.BoolPtrOutput { return o.ApplyT(func(v *FeaturesApiManagement) *bool { if v == nil { return nil } return v.RecoverSoftDeleted }).(pulumi.BoolPtrOutput) } type FeaturesAppConfiguration struct { PurgeSoftDeleteOnDestroy *bool `pulumi:"purgeSoftDeleteOnDestroy"` RecoverSoftDeleted *bool `pulumi:"recoverSoftDeleted"` } // FeaturesAppConfigurationInput is an input type that accepts FeaturesAppConfigurationArgs and FeaturesAppConfigurationOutput values. // You can construct a concrete instance of `FeaturesAppConfigurationInput` via: // // FeaturesAppConfigurationArgs{...} type FeaturesAppConfigurationInput interface { pulumi.Input ToFeaturesAppConfigurationOutput() FeaturesAppConfigurationOutput ToFeaturesAppConfigurationOutputWithContext(context.Context) FeaturesAppConfigurationOutput } type FeaturesAppConfigurationArgs struct { PurgeSoftDeleteOnDestroy pulumi.BoolPtrInput `pulumi:"purgeSoftDeleteOnDestroy"` RecoverSoftDeleted pulumi.BoolPtrInput `pulumi:"recoverSoftDeleted"` } func (FeaturesAppConfigurationArgs) ElementType() reflect.Type { return reflect.TypeOf((*FeaturesAppConfiguration)(nil)).Elem() } func (i FeaturesAppConfigurationArgs) ToFeaturesAppConfigurationOutput() FeaturesAppConfigurationOutput { return i.ToFeaturesAppConfigurationOutputWithContext(context.Background()) } func (i FeaturesAppConfigurationArgs) ToFeaturesAppConfigurationOutputWithContext(ctx context.Context) FeaturesAppConfigurationOutput { return pulumi.ToOutputWithContext(ctx, i).(FeaturesAppConfigurationOutput) } func (i FeaturesAppConfigurationArgs) ToFeaturesAppConfigurationPtrOutput() FeaturesAppConfigurationPtrOutput { return i.ToFeaturesAppConfigurationPtrOutputWithContext(context.Background()) } func (i FeaturesAppConfigurationArgs) ToFeaturesAppConfigurationPtrOutputWithContext(ctx context.Context) FeaturesAppConfigurationPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FeaturesAppConfigurationOutput).ToFeaturesAppConfigurationPtrOutputWithContext(ctx) } // FeaturesAppConfigurationPtrInput is an input type that accepts FeaturesAppConfigurationArgs, FeaturesAppConfigurationPtr and FeaturesAppConfigurationPtrOutput values. // You can construct a concrete instance of `FeaturesAppConfigurationPtrInput` via: // // FeaturesAppConfigurationArgs{...} // // or: // // nil type FeaturesAppConfigurationPtrInput interface { pulumi.Input ToFeaturesAppConfigurationPtrOutput() FeaturesAppConfigurationPtrOutput ToFeaturesAppConfigurationPtrOutputWithContext(context.Context) FeaturesAppConfigurationPtrOutput } type featuresAppConfigurationPtrType FeaturesAppConfigurationArgs func FeaturesAppConfigurationPtr(v *FeaturesAppConfigurationArgs) FeaturesAppConfigurationPtrInput { return (*featuresAppConfigurationPtrType)(v) } func (*featuresAppConfigurationPtrType) ElementType() reflect.Type { return reflect.TypeOf((**FeaturesAppConfiguration)(nil)).Elem() } func (i *featuresAppConfigurationPtrType) ToFeaturesAppConfigurationPtrOutput() FeaturesAppConfigurationPtrOutput { return i.ToFeaturesAppConfigurationPtrOutputWithContext(context.Background()) } func (i *featuresAppConfigurationPtrType) ToFeaturesAppConfigurationPtrOutputWithContext(ctx context.Context) FeaturesAppConfigurationPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FeaturesAppConfigurationPtrOutput) } type FeaturesAppConfigurationOutput struct{ *pulumi.OutputState } func (FeaturesAppConfigurationOutput) ElementType() reflect.Type { return reflect.TypeOf((*FeaturesAppConfiguration)(nil)).Elem() } func (o FeaturesAppConfigurationOutput) ToFeaturesAppConfigurationOutput() FeaturesAppConfigurationOutput { return o } func (o FeaturesAppConfigurationOutput) ToFeaturesAppConfigurationOutputWithContext(ctx context.Context) FeaturesAppConfigurationOutput { return o } func (o FeaturesAppConfigurationOutput) ToFeaturesAppConfigurationPtrOutput() FeaturesAppConfigurationPtrOutput { return o.ToFeaturesAppConfigurationPtrOutputWithContext(context.Background()) } func (o FeaturesAppConfigurationOutput) ToFeaturesAppConfigurationPtrOutputWithContext(ctx context.Context) FeaturesAppConfigurationPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v FeaturesAppConfiguration) *FeaturesAppConfiguration { return &v }).(FeaturesAppConfigurationPtrOutput) } func (o FeaturesAppConfigurationOutput) PurgeSoftDeleteOnDestroy() pulumi.BoolPtrOutput { return o.ApplyT(func(v FeaturesAppConfiguration) *bool { return v.PurgeSoftDeleteOnDestroy }).(pulumi.BoolPtrOutput) } func (o FeaturesAppConfigurationOutput) RecoverSoftDeleted() pulumi.BoolPtrOutput { return o.ApplyT(func(v FeaturesAppConfiguration) *bool { return v.RecoverSoftDeleted }).(pulumi.BoolPtrOutput) } type FeaturesAppConfigurationPtrOutput struct{ *pulumi.OutputState } func (FeaturesAppConfigurationPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**FeaturesAppConfiguration)(nil)).Elem() } func (o FeaturesAppConfigurationPtrOutput) ToFeaturesAppConfigurationPtrOutput() FeaturesAppConfigurationPtrOutput { return o } func (o FeaturesAppConfigurationPtrOutput) ToFeaturesAppConfigurationPtrOutputWithContext(ctx context.Context) FeaturesAppConfigurationPtrOutput { return o } func (o FeaturesAppConfigurationPtrOutput) Elem() FeaturesAppConfigurationOutput { return o.ApplyT(func(v *FeaturesAppConfiguration) FeaturesAppConfiguration { if v != nil { return *v } var ret FeaturesAppConfiguration return ret }).(FeaturesAppConfigurationOutput) } func (o FeaturesAppConfigurationPtrOutput) PurgeSoftDeleteOnDestroy() pulumi.BoolPtrOutput { return o.ApplyT(func(v *FeaturesAppConfiguration) *bool { if v == nil { return nil } return v.PurgeSoftDeleteOnDestroy }).(pulumi.BoolPtrOutput) } func (o FeaturesAppConfigurationPtrOutput) RecoverSoftDeleted() pulumi.BoolPtrOutput { return o.ApplyT(func(v *FeaturesAppConfiguration) *bool { if v == nil { return nil } return v.RecoverSoftDeleted }).(pulumi.BoolPtrOutput) } type FeaturesApplicationInsights struct { DisableGeneratedRule *bool `pulumi:"disableGeneratedRule"` } // FeaturesApplicationInsightsInput is an input type that accepts FeaturesApplicationInsightsArgs and FeaturesApplicationInsightsOutput values. // You can construct a concrete instance of `FeaturesApplicationInsightsInput` via: // // FeaturesApplicationInsightsArgs{...} type FeaturesApplicationInsightsInput interface { pulumi.Input ToFeaturesApplicationInsightsOutput() FeaturesApplicationInsightsOutput ToFeaturesApplicationInsightsOutputWithContext(context.Context) FeaturesApplicationInsightsOutput } type FeaturesApplicationInsightsArgs struct { DisableGeneratedRule pulumi.BoolPtrInput `pulumi:"disableGeneratedRule"` } func (FeaturesApplicationInsightsArgs) ElementType() reflect.Type { return reflect.TypeOf((*FeaturesApplicationInsights)(nil)).Elem() } func (i FeaturesApplicationInsightsArgs) ToFeaturesApplicationInsightsOutput() FeaturesApplicationInsightsOutput { return i.ToFeaturesApplicationInsightsOutputWithContext(context.Background()) } func (i FeaturesApplicationInsightsArgs) ToFeaturesApplicationInsightsOutputWithContext(ctx context.Context) FeaturesApplicationInsightsOutput { return pulumi.ToOutputWithContext(ctx, i).(FeaturesApplicationInsightsOutput) } func (i FeaturesApplicationInsightsArgs) ToFeaturesApplicationInsightsPtrOutput() FeaturesApplicationInsightsPtrOutput { return i.ToFeaturesApplicationInsightsPtrOutputWithContext(context.Background()) } func (i FeaturesApplicationInsightsArgs) ToFeaturesApplicationInsightsPtrOutputWithContext(ctx context.Context) FeaturesApplicationInsightsPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FeaturesApplicationInsightsOutput).ToFeaturesApplicationInsightsPtrOutputWithContext(ctx) } // FeaturesApplicationInsightsPtrInput is an input type that accepts FeaturesApplicationInsightsArgs, FeaturesApplicationInsightsPtr and FeaturesApplicationInsightsPtrOutput values. // You can construct a concrete instance of `FeaturesApplicationInsightsPtrInput` via: // // FeaturesApplicationInsightsArgs{...} // // or: // // nil type FeaturesApplicationInsightsPtrInput interface { pulumi.Input ToFeaturesApplicationInsightsPtrOutput() FeaturesApplicationInsightsPtrOutput ToFeaturesApplicationInsightsPtrOutputWithContext(context.Context) FeaturesApplicationInsightsPtrOutput } type featuresApplicationInsightsPtrType FeaturesApplicationInsightsArgs func FeaturesApplicationInsightsPtr(v *FeaturesApplicationInsightsArgs) FeaturesApplicationInsightsPtrInput { return (*featuresApplicationInsightsPtrType)(v) } func (*featuresApplicationInsightsPtrType) ElementType() reflect.Type { return reflect.TypeOf((**FeaturesApplicationInsights)(nil)).Elem() } func (i *featuresApplicationInsightsPtrType) ToFeaturesApplicationInsightsPtrOutput() FeaturesApplicationInsightsPtrOutput { return i.ToFeaturesApplicationInsightsPtrOutputWithContext(context.Background()) } func (i *featuresApplicationInsightsPtrType) ToFeaturesApplicationInsightsPtrOutputWithContext(ctx context.Context) FeaturesApplicationInsightsPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FeaturesApplicationInsightsPtrOutput) } type FeaturesApplicationInsightsOutput struct{ *pulumi.OutputState } func (FeaturesApplicationInsightsOutput) ElementType() reflect.Type { return reflect.TypeOf((*FeaturesApplicationInsights)(nil)).Elem() } func (o FeaturesApplicationInsightsOutput) ToFeaturesApplicationInsightsOutput() FeaturesApplicationInsightsOutput { return o } func (o FeaturesApplicationInsightsOutput) ToFeaturesApplicationInsightsOutputWithContext(ctx context.Context) FeaturesApplicationInsightsOutput { return o } func (o FeaturesApplicationInsightsOutput) ToFeaturesApplicationInsightsPtrOutput() FeaturesApplicationInsightsPtrOutput { return o.ToFeaturesApplicationInsightsPtrOutputWithContext(context.Background()) } func (o FeaturesApplicationInsightsOutput) ToFeaturesApplicationInsightsPtrOutputWithContext(ctx context.Context) FeaturesApplicationInsightsPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v FeaturesApplicationInsights) *FeaturesApplicationInsights { return &v }).(FeaturesApplicationInsightsPtrOutput) } func (o FeaturesApplicationInsightsOutput) DisableGeneratedRule() pulumi.BoolPtrOutput { return o.ApplyT(func(v FeaturesApplicationInsights) *bool { return v.DisableGeneratedRule }).(pulumi.BoolPtrOutput) } type FeaturesApplicationInsightsPtrOutput struct{ *pulumi.OutputState } func (FeaturesApplicationInsightsPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**FeaturesApplicationInsights)(nil)).Elem() } func (o FeaturesApplicationInsightsPtrOutput) ToFeaturesApplicationInsightsPtrOutput() FeaturesApplicationInsightsPtrOutput { return o } func (o FeaturesApplicationInsightsPtrOutput) ToFeaturesApplicationInsightsPtrOutputWithContext(ctx context.Context) FeaturesApplicationInsightsPtrOutput { return o } func (o FeaturesApplicationInsightsPtrOutput) Elem() FeaturesApplicationInsightsOutput { return o.ApplyT(func(v *FeaturesApplicationInsights) FeaturesApplicationInsights { if v != nil { return *v } var ret FeaturesApplicationInsights return ret }).(FeaturesApplicationInsightsOutput) } func (o FeaturesApplicationInsightsPtrOutput) DisableGeneratedRule() pulumi.BoolPtrOutput { return o.ApplyT(func(v *FeaturesApplicationInsights) *bool { if v == nil { return nil } return v.DisableGeneratedRule }).(pulumi.BoolPtrOutput) } type FeaturesCognitiveAccount struct { PurgeSoftDeleteOnDestroy *bool `pulumi:"purgeSoftDeleteOnDestroy"` } // FeaturesCognitiveAccountInput is an input type that accepts FeaturesCognitiveAccountArgs and FeaturesCognitiveAccountOutput values. // You can construct a concrete instance of `FeaturesCognitiveAccountInput` via: // // FeaturesCognitiveAccountArgs{...} type FeaturesCognitiveAccountInput interface { pulumi.Input ToFeaturesCognitiveAccountOutput() FeaturesCognitiveAccountOutput ToFeaturesCognitiveAccountOutputWithContext(context.Context) FeaturesCognitiveAccountOutput } type FeaturesCognitiveAccountArgs struct { PurgeSoftDeleteOnDestroy pulumi.BoolPtrInput `pulumi:"purgeSoftDeleteOnDestroy"` } func (FeaturesCognitiveAccountArgs) ElementType() reflect.Type { return reflect.TypeOf((*FeaturesCognitiveAccount)(nil)).Elem() } func (i FeaturesCognitiveAccountArgs) ToFeaturesCognitiveAccountOutput() FeaturesCognitiveAccountOutput { return i.ToFeaturesCognitiveAccountOutputWithContext(context.Background()) } func (i FeaturesCognitiveAccountArgs) ToFeaturesCognitiveAccountOutputWithContext(ctx context.Context) FeaturesCognitiveAccountOutput { return pulumi.ToOutputWithContext(ctx, i).(FeaturesCognitiveAccountOutput) } func (i FeaturesCognitiveAccountArgs) ToFeaturesCognitiveAccountPtrOutput() FeaturesCognitiveAccountPtrOutput { return i.ToFeaturesCognitiveAccountPtrOutputWithContext(context.Background()) } func (i FeaturesCognitiveAccountArgs) ToFeaturesCognitiveAccountPtrOutputWithContext(ctx context.Context) FeaturesCognitiveAccountPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FeaturesCognitiveAccountOutput).ToFeaturesCognitiveAccountPtrOutputWithContext(ctx) } // FeaturesCognitiveAccountPtrInput is an input type that accepts FeaturesCognitiveAccountArgs, FeaturesCognitiveAccountPtr and FeaturesCognitiveAccountPtrOutput values. // You can construct a concrete instance of `FeaturesCognitiveAccountPtrInput` via: // // FeaturesCognitiveAccountArgs{...} // // or: // // nil type FeaturesCognitiveAccountPtrInput interface { pulumi.Input ToFeaturesCognitiveAccountPtrOutput() FeaturesCognitiveAccountPtrOutput ToFeaturesCognitiveAccountPtrOutputWithContext(context.Context) FeaturesCognitiveAccountPtrOutput } type featuresCognitiveAccountPtrType FeaturesCognitiveAccountArgs func FeaturesCognitiveAccountPtr(v *FeaturesCognitiveAccountArgs) FeaturesCognitiveAccountPtrInput { return (*featuresCognitiveAccountPtrType)(v) } func (*featuresCognitiveAccountPtrType) ElementType() reflect.Type { return reflect.TypeOf((**FeaturesCognitiveAccount)(nil)).Elem() } func (i *featuresCognitiveAccountPtrType) ToFeaturesCognitiveAccountPtrOutput() FeaturesCognitiveAccountPtrOutput { return i.ToFeaturesCognitiveAccountPtrOutputWithContext(context.Background()) } func (i *featuresCognitiveAccountPtrType) ToFeaturesCognitiveAccountPtrOutputWithContext(ctx context.Context) FeaturesCognitiveAccountPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FeaturesCognitiveAccountPtrOutput) } type FeaturesCognitiveAccountOutput struct{ *pulumi.OutputState } func (FeaturesCognitiveAccountOutput) ElementType() reflect.Type { return reflect.TypeOf((*FeaturesCognitiveAccount)(nil)).Elem() } func (o FeaturesCognitiveAccountOutput) ToFeaturesCognitiveAccountOutput() FeaturesCognitiveAccountOutput { return o } func (o FeaturesCognitiveAccountOutput) ToFeaturesCognitiveAccountOutputWithContext(ctx context.Context) FeaturesCognitiveAccountOutput { return o } func (o FeaturesCognitiveAccountOutput) ToFeaturesCognitiveAccountPtrOutput() FeaturesCognitiveAccountPtrOutput { return o.ToFeaturesCognitiveAccountPtrOutputWithContext(context.Background()) } func (o FeaturesCognitiveAccountOutput) ToFeaturesCognitiveAccountPtrOutputWithContext(ctx context.Context) FeaturesCognitiveAccountPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v FeaturesCognitiveAccount) *FeaturesCognitiveAccount { return &v }).(FeaturesCognitiveAccountPtrOutput) } func (o FeaturesCognitiveAccountOutput) PurgeSoftDeleteOnDestroy() pulumi.BoolPtrOutput { return o.ApplyT(func(v FeaturesCognitiveAccount) *bool { return v.PurgeSoftDeleteOnDestroy }).(pulumi.BoolPtrOutput) } type FeaturesCognitiveAccountPtrOutput struct{ *pulumi.OutputState } func (FeaturesCognitiveAccountPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**FeaturesCognitiveAccount)(nil)).Elem() } func (o FeaturesCognitiveAccountPtrOutput) ToFeaturesCognitiveAccountPtrOutput() FeaturesCognitiveAccountPtrOutput { return o } func (o FeaturesCognitiveAccountPtrOutput) ToFeaturesCognitiveAccountPtrOutputWithContext(ctx context.Context) FeaturesCognitiveAccountPtrOutput { return o } func (o FeaturesCognitiveAccountPtrOutput) Elem() FeaturesCognitiveAccountOutput { return o.ApplyT(func(v *FeaturesCognitiveAccount) FeaturesCognitiveAccount { if v != nil { return *v } var ret FeaturesCognitiveAccount return ret }).(FeaturesCognitiveAccountOutput) } func (o FeaturesCognitiveAccountPtrOutput) PurgeSoftDeleteOnDestroy() pulumi.BoolPtrOutput { return o.ApplyT(func(v *FeaturesCognitiveAccount) *bool { if v == nil { return nil } return v.PurgeSoftDeleteOnDestroy }).(pulumi.BoolPtrOutput) } type FeaturesDatabricksWorkspace struct { // When enabled, the managed resource group that contains the Unity Catalog data will be forcibly deleted when the workspace is destroyed, regardless of contents. ForceDelete *bool `pulumi:"forceDelete"` } // FeaturesDatabricksWorkspaceInput is an input type that accepts FeaturesDatabricksWorkspaceArgs and FeaturesDatabricksWorkspaceOutput values. // You can construct a concrete instance of `FeaturesDatabricksWorkspaceInput` via: // // FeaturesDatabricksWorkspaceArgs{...} type FeaturesDatabricksWorkspaceInput interface { pulumi.Input ToFeaturesDatabricksWorkspaceOutput() FeaturesDatabricksWorkspaceOutput ToFeaturesDatabricksWorkspaceOutputWithContext(context.Context) FeaturesDatabricksWorkspaceOutput } type FeaturesDatabricksWorkspaceArgs struct { // When enabled, the managed resource group that contains the Unity Catalog data will be forcibly deleted when the workspace is destroyed, regardless of contents. ForceDelete pulumi.BoolPtrInput `pulumi:"forceDelete"` } func (FeaturesDatabricksWorkspaceArgs) ElementType() reflect.Type { return reflect.TypeOf((*FeaturesDatabricksWorkspace)(nil)).Elem() } func (i FeaturesDatabricksWorkspaceArgs) ToFeaturesDatabricksWorkspaceOutput() FeaturesDatabricksWorkspaceOutput { return i.ToFeaturesDatabricksWorkspaceOutputWithContext(context.Background()) } func (i FeaturesDatabricksWorkspaceArgs) ToFeaturesDatabricksWorkspaceOutputWithContext(ctx context.Context) FeaturesDatabricksWorkspaceOutput { return pulumi.ToOutputWithContext(ctx, i).(FeaturesDatabricksWorkspaceOutput) } func (i FeaturesDatabricksWorkspaceArgs) ToFeaturesDatabricksWorkspacePtrOutput() FeaturesDatabricksWorkspacePtrOutput {
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
true
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/config/config.go
sdk/go/azure/config/config.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package config import ( "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) var _ = internal.GetEnvOrDefault // The Azure DevOps Pipeline Service Connection ID. func GetAdoPipelineServiceConnectionId(ctx *pulumi.Context) string { return config.Get(ctx, "azure:adoPipelineServiceConnectionId") } func GetAuxiliaryTenantIds(ctx *pulumi.Context) string { return config.Get(ctx, "azure:auxiliaryTenantIds") } // Base64 encoded PKCS#12 certificate bundle to use when authenticating as a Service Principal using a Client Certificate func GetClientCertificate(ctx *pulumi.Context) string { return config.Get(ctx, "azure:clientCertificate") } // The password associated with the Client Certificate. For use when authenticating as a Service Principal using a Client Certificate func GetClientCertificatePassword(ctx *pulumi.Context) string { return config.Get(ctx, "azure:clientCertificatePassword") } // The path to the Client Certificate associated with the Service Principal for use when authenticating as a Service Principal using a Client Certificate. func GetClientCertificatePath(ctx *pulumi.Context) string { return config.Get(ctx, "azure:clientCertificatePath") } // The Client ID which should be used. func GetClientId(ctx *pulumi.Context) string { return config.Get(ctx, "azure:clientId") } // The path to a file containing the Client ID which should be used. func GetClientIdFilePath(ctx *pulumi.Context) string { return config.Get(ctx, "azure:clientIdFilePath") } // The Client Secret which should be used. For use When authenticating as a Service Principal using a Client Secret. func GetClientSecret(ctx *pulumi.Context) string { return config.Get(ctx, "azure:clientSecret") } // The path to a file containing the Client Secret which should be used. For use When authenticating as a Service Principal using a Client Secret. func GetClientSecretFilePath(ctx *pulumi.Context) string { return config.Get(ctx, "azure:clientSecretFilePath") } // This will disable the x-ms-correlation-request-id header. func GetDisableCorrelationRequestId(ctx *pulumi.Context) bool { return config.GetBool(ctx, "azure:disableCorrelationRequestId") } func GetDisableTerraformPartnerId(ctx *pulumi.Context) bool { return config.GetBool(ctx, "azure:disableTerraformPartnerId") } // The Cloud Environment which should be used. Possible values are public, usgovernment, and china. Defaults to public. Not used and should not be specified when `metadataHost` is specified. func GetEnvironment(ctx *pulumi.Context) string { v, err := config.Try(ctx, "azure:environment") if err == nil { return v } var value string if d := internal.GetEnvOrDefault("public", nil, "AZURE_ENVIRONMENT", "ARM_ENVIRONMENT"); d != nil { value = d.(string) } return value } func GetFeatures(ctx *pulumi.Context) string { return config.Get(ctx, "azure:features") } func GetLocation(ctx *pulumi.Context) string { v, err := config.Try(ctx, "azure:location") if err == nil { return v } var value string if d := internal.GetEnvOrDefault(nil, nil, "ARM_LOCATION"); d != nil { value = d.(string) } return value } // The Hostname which should be used for the Azure Metadata Service. func GetMetadataHost(ctx *pulumi.Context) string { v, err := config.Try(ctx, "azure:metadataHost") if err == nil { return v } var value string if d := internal.GetEnvOrDefault(nil, nil, "ARM_METADATA_HOSTNAME"); d != nil { value = d.(string) } return value } // The API version to use for Managed Service Identity (IMDS) - for cases where the default API version is not supported by the endpoint. e.g. for Azure Container Apps. func GetMsiApiVersion(ctx *pulumi.Context) string { return config.Get(ctx, "azure:msiApiVersion") } // The path to a custom endpoint for Managed Service Identity - in most circumstances this should be detected automatically. func GetMsiEndpoint(ctx *pulumi.Context) string { return config.Get(ctx, "azure:msiEndpoint") } // The bearer token for the request to the OIDC provider. For use when authenticating as a Service Principal using OpenID Connect. func GetOidcRequestToken(ctx *pulumi.Context) string { return config.Get(ctx, "azure:oidcRequestToken") } // The URL for the OIDC provider from which to request an ID token. For use when authenticating as a Service Principal using OpenID Connect. func GetOidcRequestUrl(ctx *pulumi.Context) string { return config.Get(ctx, "azure:oidcRequestUrl") } // The OIDC ID token for use when authenticating as a Service Principal using OpenID Connect. func GetOidcToken(ctx *pulumi.Context) string { return config.Get(ctx, "azure:oidcToken") } // The path to a file containing an OIDC ID token for use when authenticating as a Service Principal using OpenID Connect. func GetOidcTokenFilePath(ctx *pulumi.Context) string { return config.Get(ctx, "azure:oidcTokenFilePath") } // A GUID/UUID that is registered with Microsoft to facilitate partner resource usage attribution. func GetPartnerId(ctx *pulumi.Context) string { return config.Get(ctx, "azure:partnerId") } // The set of Resource Providers which should be automatically registered for the subscription. func GetResourceProviderRegistrations(ctx *pulumi.Context) string { return config.Get(ctx, "azure:resourceProviderRegistrations") } // A list of Resource Providers to explicitly register for the subscription, in addition to those specified by the `resourceProviderRegistrations` property. func GetResourceProvidersToRegisters(ctx *pulumi.Context) string { return config.Get(ctx, "azure:resourceProvidersToRegisters") } // Should the AzureRM Provider skip registering all of the Resource Providers that it supports, if they're not already registered? // // Deprecated: This property is deprecated and will be removed in v5.0 of the AzureRM provider. Please use the `resourceProviderRegistrations` property instead. func GetSkipProviderRegistration(ctx *pulumi.Context) bool { v, err := config.TryBool(ctx, "azure:skipProviderRegistration") if err == nil { return v } var value bool if d := internal.GetEnvOrDefault(false, internal.ParseEnvBool, "ARM_SKIP_PROVIDER_REGISTRATION"); d != nil { value = d.(bool) } return value } // Should the AzureRM Provider use Azure AD Authentication when accessing the Storage Data Plane APIs? func GetStorageUseAzuread(ctx *pulumi.Context) bool { v, err := config.TryBool(ctx, "azure:storageUseAzuread") if err == nil { return v } var value bool if d := internal.GetEnvOrDefault(false, internal.ParseEnvBool, "ARM_STORAGE_USE_AZUREAD"); d != nil { value = d.(bool) } return value } // The Subscription ID which should be used. func GetSubscriptionId(ctx *pulumi.Context) string { v, err := config.Try(ctx, "azure:subscriptionId") if err == nil { return v } var value string if d := internal.GetEnvOrDefault("", nil, "ARM_SUBSCRIPTION_ID"); d != nil { value = d.(string) } return value } // The Tenant ID which should be used. func GetTenantId(ctx *pulumi.Context) string { return config.Get(ctx, "azure:tenantId") } // Allow Azure AKS Workload Identity to be used for Authentication. func GetUseAksWorkloadIdentity(ctx *pulumi.Context) bool { return config.GetBool(ctx, "azure:useAksWorkloadIdentity") } // Allow Azure CLI to be used for Authentication. func GetUseCli(ctx *pulumi.Context) bool { return config.GetBool(ctx, "azure:useCli") } // Allow Managed Service Identity to be used for Authentication. func GetUseMsi(ctx *pulumi.Context) bool { return config.GetBool(ctx, "azure:useMsi") } // Allow OpenID Connect to be used for authentication func GetUseOidc(ctx *pulumi.Context) bool { return config.GetBool(ctx, "azure:useOidc") }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getVirtualHub.go
sdk/go/azure/network/getVirtualHub.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Uses this data source to access information about an existing Virtual Hub. // // ## Virtual Hub Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.LookupVirtualHub(ctx, &network.LookupVirtualHubArgs{ // Name: "example-hub", // ResourceGroupName: "example-resources", // }, nil) // if err != nil { // return err // } // ctx.Export("virtualHubId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func LookupVirtualHub(ctx *pulumi.Context, args *LookupVirtualHubArgs, opts ...pulumi.InvokeOption) (*LookupVirtualHubResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupVirtualHubResult err := ctx.Invoke("azure:network/getVirtualHub:getVirtualHub", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getVirtualHub. type LookupVirtualHubArgs struct { // The name of the Virtual Hub. Name string `pulumi:"name"` // The Name of the Resource Group where the Virtual Hub exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getVirtualHub. type LookupVirtualHubResult struct { // The Address Prefix used for this Virtual Hub. AddressPrefix string `pulumi:"addressPrefix"` // The ID of the default Route Table in the Virtual Hub. DefaultRouteTableId string `pulumi:"defaultRouteTableId"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The Azure Region where the Virtual Hub exists. Location string `pulumi:"location"` Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags assigned to the Virtual Hub. Tags map[string]string `pulumi:"tags"` // The Autonomous System Number of the Virtual Hub BGP router. VirtualRouterAsn int `pulumi:"virtualRouterAsn"` // The IP addresses of the Virtual Hub BGP router. VirtualRouterIps []string `pulumi:"virtualRouterIps"` // The ID of the Virtual WAN within which the Virtual Hub exists. VirtualWanId string `pulumi:"virtualWanId"` } func LookupVirtualHubOutput(ctx *pulumi.Context, args LookupVirtualHubOutputArgs, opts ...pulumi.InvokeOption) LookupVirtualHubResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupVirtualHubResultOutput, error) { args := v.(LookupVirtualHubArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getVirtualHub:getVirtualHub", args, LookupVirtualHubResultOutput{}, options).(LookupVirtualHubResultOutput), nil }).(LookupVirtualHubResultOutput) } // A collection of arguments for invoking getVirtualHub. type LookupVirtualHubOutputArgs struct { // The name of the Virtual Hub. Name pulumi.StringInput `pulumi:"name"` // The Name of the Resource Group where the Virtual Hub exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupVirtualHubOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupVirtualHubArgs)(nil)).Elem() } // A collection of values returned by getVirtualHub. type LookupVirtualHubResultOutput struct{ *pulumi.OutputState } func (LookupVirtualHubResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupVirtualHubResult)(nil)).Elem() } func (o LookupVirtualHubResultOutput) ToLookupVirtualHubResultOutput() LookupVirtualHubResultOutput { return o } func (o LookupVirtualHubResultOutput) ToLookupVirtualHubResultOutputWithContext(ctx context.Context) LookupVirtualHubResultOutput { return o } // The Address Prefix used for this Virtual Hub. func (o LookupVirtualHubResultOutput) AddressPrefix() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualHubResult) string { return v.AddressPrefix }).(pulumi.StringOutput) } // The ID of the default Route Table in the Virtual Hub. func (o LookupVirtualHubResultOutput) DefaultRouteTableId() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualHubResult) string { return v.DefaultRouteTableId }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupVirtualHubResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualHubResult) string { return v.Id }).(pulumi.StringOutput) } // The Azure Region where the Virtual Hub exists. func (o LookupVirtualHubResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualHubResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupVirtualHubResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualHubResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupVirtualHubResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualHubResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags assigned to the Virtual Hub. func (o LookupVirtualHubResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupVirtualHubResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The Autonomous System Number of the Virtual Hub BGP router. func (o LookupVirtualHubResultOutput) VirtualRouterAsn() pulumi.IntOutput { return o.ApplyT(func(v LookupVirtualHubResult) int { return v.VirtualRouterAsn }).(pulumi.IntOutput) } // The IP addresses of the Virtual Hub BGP router. func (o LookupVirtualHubResultOutput) VirtualRouterIps() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupVirtualHubResult) []string { return v.VirtualRouterIps }).(pulumi.StringArrayOutput) } // The ID of the Virtual WAN within which the Virtual Hub exists. func (o LookupVirtualHubResultOutput) VirtualWanId() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualHubResult) string { return v.VirtualWanId }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupVirtualHubResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/networkManagerNetworkGroup.go
sdk/go/azure/network/networkManagerNetworkGroup.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Network Manager Network Group. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // exampleNetworkManager, err := network.NewNetworkManager(ctx, "example", &network.NetworkManagerArgs{ // Name: pulumi.String("example-network-manager"), // Location: example.Location, // ResourceGroupName: example.Name, // Scope: &network.NetworkManagerScopeArgs{ // SubscriptionIds: pulumi.StringArray{ // pulumi.String(current.Id), // }, // }, // ScopeAccesses: pulumi.StringArray{ // pulumi.String("Connectivity"), // pulumi.String("SecurityAdmin"), // }, // Description: pulumi.String("example network manager"), // }) // if err != nil { // return err // } // _, err = network.NewNetworkManagerNetworkGroup(ctx, "example", &network.NetworkManagerNetworkGroupArgs{ // Name: pulumi.String("example-group"), // NetworkManagerId: exampleNetworkManager.ID(), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Network Manager Network Group can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/networkManagerNetworkGroup:NetworkManagerNetworkGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Network/networkManagers/networkManager1/networkGroups/networkGroup1 // ``` type NetworkManagerNetworkGroup struct { pulumi.CustomResourceState // A description of the Network Manager Network Group. Description pulumi.StringPtrOutput `pulumi:"description"` // The member type for the network group. Possible values are `Subnet` and `VirtualNetwork`. Defaults to `VirtualNetwork`. // // > **Note:** `memberType` can be set to `Subnet` only if the parent Network Manager has `Routing` included in its `scopeAccesses`. MemberType pulumi.StringPtrOutput `pulumi:"memberType"` // Specifies the name which should be used for this Network Manager Network Group. Changing this forces a new Network Manager Network Group to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the ID of the Network Manager. Changing this forces a new Network Manager Network Group to be created. NetworkManagerId pulumi.StringOutput `pulumi:"networkManagerId"` } // NewNetworkManagerNetworkGroup registers a new resource with the given unique name, arguments, and options. func NewNetworkManagerNetworkGroup(ctx *pulumi.Context, name string, args *NetworkManagerNetworkGroupArgs, opts ...pulumi.ResourceOption) (*NetworkManagerNetworkGroup, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.NetworkManagerId == nil { return nil, errors.New("invalid value for required argument 'NetworkManagerId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkManagerNetworkGroup err := ctx.RegisterResource("azure:network/networkManagerNetworkGroup:NetworkManagerNetworkGroup", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkManagerNetworkGroup gets an existing NetworkManagerNetworkGroup resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetNetworkManagerNetworkGroup(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkManagerNetworkGroupState, opts ...pulumi.ResourceOption) (*NetworkManagerNetworkGroup, error) { var resource NetworkManagerNetworkGroup err := ctx.ReadResource("azure:network/networkManagerNetworkGroup:NetworkManagerNetworkGroup", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkManagerNetworkGroup resources. type networkManagerNetworkGroupState struct { // A description of the Network Manager Network Group. Description *string `pulumi:"description"` // The member type for the network group. Possible values are `Subnet` and `VirtualNetwork`. Defaults to `VirtualNetwork`. // // > **Note:** `memberType` can be set to `Subnet` only if the parent Network Manager has `Routing` included in its `scopeAccesses`. MemberType *string `pulumi:"memberType"` // Specifies the name which should be used for this Network Manager Network Group. Changing this forces a new Network Manager Network Group to be created. Name *string `pulumi:"name"` // Specifies the ID of the Network Manager. Changing this forces a new Network Manager Network Group to be created. NetworkManagerId *string `pulumi:"networkManagerId"` } type NetworkManagerNetworkGroupState struct { // A description of the Network Manager Network Group. Description pulumi.StringPtrInput // The member type for the network group. Possible values are `Subnet` and `VirtualNetwork`. Defaults to `VirtualNetwork`. // // > **Note:** `memberType` can be set to `Subnet` only if the parent Network Manager has `Routing` included in its `scopeAccesses`. MemberType pulumi.StringPtrInput // Specifies the name which should be used for this Network Manager Network Group. Changing this forces a new Network Manager Network Group to be created. Name pulumi.StringPtrInput // Specifies the ID of the Network Manager. Changing this forces a new Network Manager Network Group to be created. NetworkManagerId pulumi.StringPtrInput } func (NetworkManagerNetworkGroupState) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerNetworkGroupState)(nil)).Elem() } type networkManagerNetworkGroupArgs struct { // A description of the Network Manager Network Group. Description *string `pulumi:"description"` // The member type for the network group. Possible values are `Subnet` and `VirtualNetwork`. Defaults to `VirtualNetwork`. // // > **Note:** `memberType` can be set to `Subnet` only if the parent Network Manager has `Routing` included in its `scopeAccesses`. MemberType *string `pulumi:"memberType"` // Specifies the name which should be used for this Network Manager Network Group. Changing this forces a new Network Manager Network Group to be created. Name *string `pulumi:"name"` // Specifies the ID of the Network Manager. Changing this forces a new Network Manager Network Group to be created. NetworkManagerId string `pulumi:"networkManagerId"` } // The set of arguments for constructing a NetworkManagerNetworkGroup resource. type NetworkManagerNetworkGroupArgs struct { // A description of the Network Manager Network Group. Description pulumi.StringPtrInput // The member type for the network group. Possible values are `Subnet` and `VirtualNetwork`. Defaults to `VirtualNetwork`. // // > **Note:** `memberType` can be set to `Subnet` only if the parent Network Manager has `Routing` included in its `scopeAccesses`. MemberType pulumi.StringPtrInput // Specifies the name which should be used for this Network Manager Network Group. Changing this forces a new Network Manager Network Group to be created. Name pulumi.StringPtrInput // Specifies the ID of the Network Manager. Changing this forces a new Network Manager Network Group to be created. NetworkManagerId pulumi.StringInput } func (NetworkManagerNetworkGroupArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerNetworkGroupArgs)(nil)).Elem() } type NetworkManagerNetworkGroupInput interface { pulumi.Input ToNetworkManagerNetworkGroupOutput() NetworkManagerNetworkGroupOutput ToNetworkManagerNetworkGroupOutputWithContext(ctx context.Context) NetworkManagerNetworkGroupOutput } func (*NetworkManagerNetworkGroup) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerNetworkGroup)(nil)).Elem() } func (i *NetworkManagerNetworkGroup) ToNetworkManagerNetworkGroupOutput() NetworkManagerNetworkGroupOutput { return i.ToNetworkManagerNetworkGroupOutputWithContext(context.Background()) } func (i *NetworkManagerNetworkGroup) ToNetworkManagerNetworkGroupOutputWithContext(ctx context.Context) NetworkManagerNetworkGroupOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerNetworkGroupOutput) } // NetworkManagerNetworkGroupArrayInput is an input type that accepts NetworkManagerNetworkGroupArray and NetworkManagerNetworkGroupArrayOutput values. // You can construct a concrete instance of `NetworkManagerNetworkGroupArrayInput` via: // // NetworkManagerNetworkGroupArray{ NetworkManagerNetworkGroupArgs{...} } type NetworkManagerNetworkGroupArrayInput interface { pulumi.Input ToNetworkManagerNetworkGroupArrayOutput() NetworkManagerNetworkGroupArrayOutput ToNetworkManagerNetworkGroupArrayOutputWithContext(context.Context) NetworkManagerNetworkGroupArrayOutput } type NetworkManagerNetworkGroupArray []NetworkManagerNetworkGroupInput func (NetworkManagerNetworkGroupArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerNetworkGroup)(nil)).Elem() } func (i NetworkManagerNetworkGroupArray) ToNetworkManagerNetworkGroupArrayOutput() NetworkManagerNetworkGroupArrayOutput { return i.ToNetworkManagerNetworkGroupArrayOutputWithContext(context.Background()) } func (i NetworkManagerNetworkGroupArray) ToNetworkManagerNetworkGroupArrayOutputWithContext(ctx context.Context) NetworkManagerNetworkGroupArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerNetworkGroupArrayOutput) } // NetworkManagerNetworkGroupMapInput is an input type that accepts NetworkManagerNetworkGroupMap and NetworkManagerNetworkGroupMapOutput values. // You can construct a concrete instance of `NetworkManagerNetworkGroupMapInput` via: // // NetworkManagerNetworkGroupMap{ "key": NetworkManagerNetworkGroupArgs{...} } type NetworkManagerNetworkGroupMapInput interface { pulumi.Input ToNetworkManagerNetworkGroupMapOutput() NetworkManagerNetworkGroupMapOutput ToNetworkManagerNetworkGroupMapOutputWithContext(context.Context) NetworkManagerNetworkGroupMapOutput } type NetworkManagerNetworkGroupMap map[string]NetworkManagerNetworkGroupInput func (NetworkManagerNetworkGroupMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerNetworkGroup)(nil)).Elem() } func (i NetworkManagerNetworkGroupMap) ToNetworkManagerNetworkGroupMapOutput() NetworkManagerNetworkGroupMapOutput { return i.ToNetworkManagerNetworkGroupMapOutputWithContext(context.Background()) } func (i NetworkManagerNetworkGroupMap) ToNetworkManagerNetworkGroupMapOutputWithContext(ctx context.Context) NetworkManagerNetworkGroupMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerNetworkGroupMapOutput) } type NetworkManagerNetworkGroupOutput struct{ *pulumi.OutputState } func (NetworkManagerNetworkGroupOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerNetworkGroup)(nil)).Elem() } func (o NetworkManagerNetworkGroupOutput) ToNetworkManagerNetworkGroupOutput() NetworkManagerNetworkGroupOutput { return o } func (o NetworkManagerNetworkGroupOutput) ToNetworkManagerNetworkGroupOutputWithContext(ctx context.Context) NetworkManagerNetworkGroupOutput { return o } // A description of the Network Manager Network Group. func (o NetworkManagerNetworkGroupOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkManagerNetworkGroup) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // The member type for the network group. Possible values are `Subnet` and `VirtualNetwork`. Defaults to `VirtualNetwork`. // // > **Note:** `memberType` can be set to `Subnet` only if the parent Network Manager has `Routing` included in its `scopeAccesses`. func (o NetworkManagerNetworkGroupOutput) MemberType() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkManagerNetworkGroup) pulumi.StringPtrOutput { return v.MemberType }).(pulumi.StringPtrOutput) } // Specifies the name which should be used for this Network Manager Network Group. Changing this forces a new Network Manager Network Group to be created. func (o NetworkManagerNetworkGroupOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerNetworkGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the ID of the Network Manager. Changing this forces a new Network Manager Network Group to be created. func (o NetworkManagerNetworkGroupOutput) NetworkManagerId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerNetworkGroup) pulumi.StringOutput { return v.NetworkManagerId }).(pulumi.StringOutput) } type NetworkManagerNetworkGroupArrayOutput struct{ *pulumi.OutputState } func (NetworkManagerNetworkGroupArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerNetworkGroup)(nil)).Elem() } func (o NetworkManagerNetworkGroupArrayOutput) ToNetworkManagerNetworkGroupArrayOutput() NetworkManagerNetworkGroupArrayOutput { return o } func (o NetworkManagerNetworkGroupArrayOutput) ToNetworkManagerNetworkGroupArrayOutputWithContext(ctx context.Context) NetworkManagerNetworkGroupArrayOutput { return o } func (o NetworkManagerNetworkGroupArrayOutput) Index(i pulumi.IntInput) NetworkManagerNetworkGroupOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkManagerNetworkGroup { return vs[0].([]*NetworkManagerNetworkGroup)[vs[1].(int)] }).(NetworkManagerNetworkGroupOutput) } type NetworkManagerNetworkGroupMapOutput struct{ *pulumi.OutputState } func (NetworkManagerNetworkGroupMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerNetworkGroup)(nil)).Elem() } func (o NetworkManagerNetworkGroupMapOutput) ToNetworkManagerNetworkGroupMapOutput() NetworkManagerNetworkGroupMapOutput { return o } func (o NetworkManagerNetworkGroupMapOutput) ToNetworkManagerNetworkGroupMapOutputWithContext(ctx context.Context) NetworkManagerNetworkGroupMapOutput { return o } func (o NetworkManagerNetworkGroupMapOutput) MapIndex(k pulumi.StringInput) NetworkManagerNetworkGroupOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkManagerNetworkGroup { return vs[0].(map[string]*NetworkManagerNetworkGroup)[vs[1].(string)] }).(NetworkManagerNetworkGroupOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerNetworkGroupInput)(nil)).Elem(), &NetworkManagerNetworkGroup{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerNetworkGroupArrayInput)(nil)).Elem(), NetworkManagerNetworkGroupArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerNetworkGroupMapInput)(nil)).Elem(), NetworkManagerNetworkGroupMap{}) pulumi.RegisterOutputType(NetworkManagerNetworkGroupOutput{}) pulumi.RegisterOutputType(NetworkManagerNetworkGroupArrayOutput{}) pulumi.RegisterOutputType(NetworkManagerNetworkGroupMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getNetworkSecurityGroup.go
sdk/go/azure/network/getNetworkSecurityGroup.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Network Security Group. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.LookupNetworkSecurityGroup(ctx, &network.LookupNetworkSecurityGroupArgs{ // Name: "example", // ResourceGroupName: exampleAzurermResourceGroup.Name, // }, nil) // if err != nil { // return err // } // ctx.Export("location", example.Location) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func LookupNetworkSecurityGroup(ctx *pulumi.Context, args *LookupNetworkSecurityGroupArgs, opts ...pulumi.InvokeOption) (*LookupNetworkSecurityGroupResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupNetworkSecurityGroupResult err := ctx.Invoke("azure:network/getNetworkSecurityGroup:getNetworkSecurityGroup", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getNetworkSecurityGroup. type LookupNetworkSecurityGroupArgs struct { // Specifies the Name of the Network Security Group. Name string `pulumi:"name"` // Specifies the Name of the Resource Group within which the Network Security Group exists ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getNetworkSecurityGroup. type LookupNetworkSecurityGroupResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The supported Azure location where the resource exists. Location string `pulumi:"location"` // The name of the security rule. Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // One or more `securityRule` blocks as defined below. SecurityRules []GetNetworkSecurityGroupSecurityRule `pulumi:"securityRules"` // A mapping of tags assigned to the resource. Tags map[string]string `pulumi:"tags"` } func LookupNetworkSecurityGroupOutput(ctx *pulumi.Context, args LookupNetworkSecurityGroupOutputArgs, opts ...pulumi.InvokeOption) LookupNetworkSecurityGroupResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupNetworkSecurityGroupResultOutput, error) { args := v.(LookupNetworkSecurityGroupArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getNetworkSecurityGroup:getNetworkSecurityGroup", args, LookupNetworkSecurityGroupResultOutput{}, options).(LookupNetworkSecurityGroupResultOutput), nil }).(LookupNetworkSecurityGroupResultOutput) } // A collection of arguments for invoking getNetworkSecurityGroup. type LookupNetworkSecurityGroupOutputArgs struct { // Specifies the Name of the Network Security Group. Name pulumi.StringInput `pulumi:"name"` // Specifies the Name of the Resource Group within which the Network Security Group exists ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupNetworkSecurityGroupOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupNetworkSecurityGroupArgs)(nil)).Elem() } // A collection of values returned by getNetworkSecurityGroup. type LookupNetworkSecurityGroupResultOutput struct{ *pulumi.OutputState } func (LookupNetworkSecurityGroupResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupNetworkSecurityGroupResult)(nil)).Elem() } func (o LookupNetworkSecurityGroupResultOutput) ToLookupNetworkSecurityGroupResultOutput() LookupNetworkSecurityGroupResultOutput { return o } func (o LookupNetworkSecurityGroupResultOutput) ToLookupNetworkSecurityGroupResultOutputWithContext(ctx context.Context) LookupNetworkSecurityGroupResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o LookupNetworkSecurityGroupResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkSecurityGroupResult) string { return v.Id }).(pulumi.StringOutput) } // The supported Azure location where the resource exists. func (o LookupNetworkSecurityGroupResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkSecurityGroupResult) string { return v.Location }).(pulumi.StringOutput) } // The name of the security rule. func (o LookupNetworkSecurityGroupResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkSecurityGroupResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupNetworkSecurityGroupResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkSecurityGroupResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // One or more `securityRule` blocks as defined below. func (o LookupNetworkSecurityGroupResultOutput) SecurityRules() GetNetworkSecurityGroupSecurityRuleArrayOutput { return o.ApplyT(func(v LookupNetworkSecurityGroupResult) []GetNetworkSecurityGroupSecurityRule { return v.SecurityRules }).(GetNetworkSecurityGroupSecurityRuleArrayOutput) } // A mapping of tags assigned to the resource. func (o LookupNetworkSecurityGroupResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupNetworkSecurityGroupResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(LookupNetworkSecurityGroupResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getApplicationGateway.go
sdk/go/azure/network/getApplicationGateway.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Application Gateway. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.LookupApplicationGateway(ctx, &network.LookupApplicationGatewayArgs{ // Name: "existing-app-gateway", // ResourceGroupName: "existing-resources", // }, nil) // if err != nil { // return err // } // ctx.Export("id", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func LookupApplicationGateway(ctx *pulumi.Context, args *LookupApplicationGatewayArgs, opts ...pulumi.InvokeOption) (*LookupApplicationGatewayResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupApplicationGatewayResult err := ctx.Invoke("azure:network/getApplicationGateway:getApplicationGateway", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getApplicationGateway. type LookupApplicationGatewayArgs struct { // The name of this Application Gateway. Name string `pulumi:"name"` // The name of the Resource Group where the Application Gateway exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getApplicationGateway. type LookupApplicationGatewayResult struct { // One or more `authenticationCertificate` blocks as defined below. AuthenticationCertificates []GetApplicationGatewayAuthenticationCertificate `pulumi:"authenticationCertificates"` // An `autoscaleConfiguration` block as defined below. AutoscaleConfigurations []GetApplicationGatewayAutoscaleConfiguration `pulumi:"autoscaleConfigurations"` // One or more `backendAddressPool` blocks as defined below. BackendAddressPools []GetApplicationGatewayBackendAddressPool `pulumi:"backendAddressPools"` // One or more `backendHttpSettings` blocks as defined below. BackendHttpSettings []GetApplicationGatewayBackendHttpSetting `pulumi:"backendHttpSettings"` // One or more `customErrorConfiguration` blocks as defined below. CustomErrorConfigurations []GetApplicationGatewayCustomErrorConfiguration `pulumi:"customErrorConfigurations"` // Is FIPS enabled on the Application Gateway? FipsEnabled bool `pulumi:"fipsEnabled"` // The ID of the Web Application Firewall Policy which is used as an HTTP Listener for this Path Rule. FirewallPolicyId string `pulumi:"firewallPolicyId"` // Is the Firewall Policy associated with the Application Gateway? ForceFirewallPolicyAssociation bool `pulumi:"forceFirewallPolicyAssociation"` // One or more `frontendIpConfiguration` blocks as defined below. FrontendIpConfigurations []GetApplicationGatewayFrontendIpConfiguration `pulumi:"frontendIpConfigurations"` // One or more `frontendPort` blocks as defined below. FrontendPorts []GetApplicationGatewayFrontendPort `pulumi:"frontendPorts"` // One or more `gatewayIpConfiguration` blocks as defined below. GatewayIpConfigurations []GetApplicationGatewayGatewayIpConfiguration `pulumi:"gatewayIpConfigurations"` // A `global` block as defined below. Globals []GetApplicationGatewayGlobal `pulumi:"globals"` // Is HTTP2 enabled on the application gateway resource? Http2Enabled bool `pulumi:"http2Enabled"` // One or more `httpListener` blocks as defined below. HttpListeners []GetApplicationGatewayHttpListener `pulumi:"httpListeners"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // An `identity` block as defined below. Identities []GetApplicationGatewayIdentity `pulumi:"identities"` // The Azure region where the Application Gateway exists. Location string `pulumi:"location"` // Unique name of the Rewrite Rule Name string `pulumi:"name"` PrivateEndpointConnections []GetApplicationGatewayPrivateEndpointConnection `pulumi:"privateEndpointConnections"` // One or more `privateLinkConfiguration` blocks as defined below. PrivateLinkConfigurations []GetApplicationGatewayPrivateLinkConfiguration `pulumi:"privateLinkConfigurations"` // One or more `probe` blocks as defined below. Probes []GetApplicationGatewayProbe `pulumi:"probes"` // One or more `redirectConfiguration` blocks as defined below. RedirectConfigurations []GetApplicationGatewayRedirectConfiguration `pulumi:"redirectConfigurations"` // One or more `requestRoutingRule` blocks as defined below. RequestRoutingRules []GetApplicationGatewayRequestRoutingRule `pulumi:"requestRoutingRules"` ResourceGroupName string `pulumi:"resourceGroupName"` // One or more `rewriteRuleSet` blocks as defined below. RewriteRuleSets []GetApplicationGatewayRewriteRuleSet `pulumi:"rewriteRuleSets"` // A `sku` block as defined below. Skus []GetApplicationGatewaySkus `pulumi:"skus"` // One or more `sslCertificate` blocks as defined below. SslCertificates []GetApplicationGatewaySslCertificate `pulumi:"sslCertificates"` // a `sslPolicy` block as defined below. SslPolicies []GetApplicationGatewaySslPolicy `pulumi:"sslPolicies"` // One or more `sslProfile` blocks as defined below. SslProfiles []GetApplicationGatewaySslProfile `pulumi:"sslProfiles"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // One or more `trustedClientCertificate` blocks as defined below. TrustedClientCertificates []GetApplicationGatewayTrustedClientCertificate `pulumi:"trustedClientCertificates"` // One or more `trustedRootCertificate` blocks as defined below. TrustedRootCertificates []GetApplicationGatewayTrustedRootCertificate `pulumi:"trustedRootCertificates"` // One or more `urlPathMap` blocks as defined below. UrlPathMaps []GetApplicationGatewayUrlPathMap `pulumi:"urlPathMaps"` // A `wafConfiguration` block as defined below. WafConfigurations []GetApplicationGatewayWafConfiguration `pulumi:"wafConfigurations"` // The list of Availability Zones in which this Application Gateway can use. Zones []string `pulumi:"zones"` } func LookupApplicationGatewayOutput(ctx *pulumi.Context, args LookupApplicationGatewayOutputArgs, opts ...pulumi.InvokeOption) LookupApplicationGatewayResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupApplicationGatewayResultOutput, error) { args := v.(LookupApplicationGatewayArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getApplicationGateway:getApplicationGateway", args, LookupApplicationGatewayResultOutput{}, options).(LookupApplicationGatewayResultOutput), nil }).(LookupApplicationGatewayResultOutput) } // A collection of arguments for invoking getApplicationGateway. type LookupApplicationGatewayOutputArgs struct { // The name of this Application Gateway. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group where the Application Gateway exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupApplicationGatewayOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupApplicationGatewayArgs)(nil)).Elem() } // A collection of values returned by getApplicationGateway. type LookupApplicationGatewayResultOutput struct{ *pulumi.OutputState } func (LookupApplicationGatewayResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupApplicationGatewayResult)(nil)).Elem() } func (o LookupApplicationGatewayResultOutput) ToLookupApplicationGatewayResultOutput() LookupApplicationGatewayResultOutput { return o } func (o LookupApplicationGatewayResultOutput) ToLookupApplicationGatewayResultOutputWithContext(ctx context.Context) LookupApplicationGatewayResultOutput { return o } // One or more `authenticationCertificate` blocks as defined below. func (o LookupApplicationGatewayResultOutput) AuthenticationCertificates() GetApplicationGatewayAuthenticationCertificateArrayOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) []GetApplicationGatewayAuthenticationCertificate { return v.AuthenticationCertificates }).(GetApplicationGatewayAuthenticationCertificateArrayOutput) } // An `autoscaleConfiguration` block as defined below. func (o LookupApplicationGatewayResultOutput) AutoscaleConfigurations() GetApplicationGatewayAutoscaleConfigurationArrayOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) []GetApplicationGatewayAutoscaleConfiguration { return v.AutoscaleConfigurations }).(GetApplicationGatewayAutoscaleConfigurationArrayOutput) } // One or more `backendAddressPool` blocks as defined below. func (o LookupApplicationGatewayResultOutput) BackendAddressPools() GetApplicationGatewayBackendAddressPoolArrayOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) []GetApplicationGatewayBackendAddressPool { return v.BackendAddressPools }).(GetApplicationGatewayBackendAddressPoolArrayOutput) } // One or more `backendHttpSettings` blocks as defined below. func (o LookupApplicationGatewayResultOutput) BackendHttpSettings() GetApplicationGatewayBackendHttpSettingArrayOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) []GetApplicationGatewayBackendHttpSetting { return v.BackendHttpSettings }).(GetApplicationGatewayBackendHttpSettingArrayOutput) } // One or more `customErrorConfiguration` blocks as defined below. func (o LookupApplicationGatewayResultOutput) CustomErrorConfigurations() GetApplicationGatewayCustomErrorConfigurationArrayOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) []GetApplicationGatewayCustomErrorConfiguration { return v.CustomErrorConfigurations }).(GetApplicationGatewayCustomErrorConfigurationArrayOutput) } // Is FIPS enabled on the Application Gateway? func (o LookupApplicationGatewayResultOutput) FipsEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) bool { return v.FipsEnabled }).(pulumi.BoolOutput) } // The ID of the Web Application Firewall Policy which is used as an HTTP Listener for this Path Rule. func (o LookupApplicationGatewayResultOutput) FirewallPolicyId() pulumi.StringOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) string { return v.FirewallPolicyId }).(pulumi.StringOutput) } // Is the Firewall Policy associated with the Application Gateway? func (o LookupApplicationGatewayResultOutput) ForceFirewallPolicyAssociation() pulumi.BoolOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) bool { return v.ForceFirewallPolicyAssociation }).(pulumi.BoolOutput) } // One or more `frontendIpConfiguration` blocks as defined below. func (o LookupApplicationGatewayResultOutput) FrontendIpConfigurations() GetApplicationGatewayFrontendIpConfigurationArrayOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) []GetApplicationGatewayFrontendIpConfiguration { return v.FrontendIpConfigurations }).(GetApplicationGatewayFrontendIpConfigurationArrayOutput) } // One or more `frontendPort` blocks as defined below. func (o LookupApplicationGatewayResultOutput) FrontendPorts() GetApplicationGatewayFrontendPortArrayOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) []GetApplicationGatewayFrontendPort { return v.FrontendPorts }).(GetApplicationGatewayFrontendPortArrayOutput) } // One or more `gatewayIpConfiguration` blocks as defined below. func (o LookupApplicationGatewayResultOutput) GatewayIpConfigurations() GetApplicationGatewayGatewayIpConfigurationArrayOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) []GetApplicationGatewayGatewayIpConfiguration { return v.GatewayIpConfigurations }).(GetApplicationGatewayGatewayIpConfigurationArrayOutput) } // A `global` block as defined below. func (o LookupApplicationGatewayResultOutput) Globals() GetApplicationGatewayGlobalArrayOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) []GetApplicationGatewayGlobal { return v.Globals }).(GetApplicationGatewayGlobalArrayOutput) } // Is HTTP2 enabled on the application gateway resource? func (o LookupApplicationGatewayResultOutput) Http2Enabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) bool { return v.Http2Enabled }).(pulumi.BoolOutput) } // One or more `httpListener` blocks as defined below. func (o LookupApplicationGatewayResultOutput) HttpListeners() GetApplicationGatewayHttpListenerArrayOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) []GetApplicationGatewayHttpListener { return v.HttpListeners }).(GetApplicationGatewayHttpListenerArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupApplicationGatewayResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) string { return v.Id }).(pulumi.StringOutput) } // An `identity` block as defined below. func (o LookupApplicationGatewayResultOutput) Identities() GetApplicationGatewayIdentityArrayOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) []GetApplicationGatewayIdentity { return v.Identities }).(GetApplicationGatewayIdentityArrayOutput) } // The Azure region where the Application Gateway exists. func (o LookupApplicationGatewayResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) string { return v.Location }).(pulumi.StringOutput) } // Unique name of the Rewrite Rule func (o LookupApplicationGatewayResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupApplicationGatewayResultOutput) PrivateEndpointConnections() GetApplicationGatewayPrivateEndpointConnectionArrayOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) []GetApplicationGatewayPrivateEndpointConnection { return v.PrivateEndpointConnections }).(GetApplicationGatewayPrivateEndpointConnectionArrayOutput) } // One or more `privateLinkConfiguration` blocks as defined below. func (o LookupApplicationGatewayResultOutput) PrivateLinkConfigurations() GetApplicationGatewayPrivateLinkConfigurationArrayOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) []GetApplicationGatewayPrivateLinkConfiguration { return v.PrivateLinkConfigurations }).(GetApplicationGatewayPrivateLinkConfigurationArrayOutput) } // One or more `probe` blocks as defined below. func (o LookupApplicationGatewayResultOutput) Probes() GetApplicationGatewayProbeArrayOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) []GetApplicationGatewayProbe { return v.Probes }).(GetApplicationGatewayProbeArrayOutput) } // One or more `redirectConfiguration` blocks as defined below. func (o LookupApplicationGatewayResultOutput) RedirectConfigurations() GetApplicationGatewayRedirectConfigurationArrayOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) []GetApplicationGatewayRedirectConfiguration { return v.RedirectConfigurations }).(GetApplicationGatewayRedirectConfigurationArrayOutput) } // One or more `requestRoutingRule` blocks as defined below. func (o LookupApplicationGatewayResultOutput) RequestRoutingRules() GetApplicationGatewayRequestRoutingRuleArrayOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) []GetApplicationGatewayRequestRoutingRule { return v.RequestRoutingRules }).(GetApplicationGatewayRequestRoutingRuleArrayOutput) } func (o LookupApplicationGatewayResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // One or more `rewriteRuleSet` blocks as defined below. func (o LookupApplicationGatewayResultOutput) RewriteRuleSets() GetApplicationGatewayRewriteRuleSetArrayOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) []GetApplicationGatewayRewriteRuleSet { return v.RewriteRuleSets }).(GetApplicationGatewayRewriteRuleSetArrayOutput) } // A `sku` block as defined below. func (o LookupApplicationGatewayResultOutput) Skus() GetApplicationGatewaySkusArrayOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) []GetApplicationGatewaySkus { return v.Skus }).(GetApplicationGatewaySkusArrayOutput) } // One or more `sslCertificate` blocks as defined below. func (o LookupApplicationGatewayResultOutput) SslCertificates() GetApplicationGatewaySslCertificateArrayOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) []GetApplicationGatewaySslCertificate { return v.SslCertificates }).(GetApplicationGatewaySslCertificateArrayOutput) } // a `sslPolicy` block as defined below. func (o LookupApplicationGatewayResultOutput) SslPolicies() GetApplicationGatewaySslPolicyArrayOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) []GetApplicationGatewaySslPolicy { return v.SslPolicies }).(GetApplicationGatewaySslPolicyArrayOutput) } // One or more `sslProfile` blocks as defined below. func (o LookupApplicationGatewayResultOutput) SslProfiles() GetApplicationGatewaySslProfileArrayOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) []GetApplicationGatewaySslProfile { return v.SslProfiles }).(GetApplicationGatewaySslProfileArrayOutput) } // A mapping of tags to assign to the resource. func (o LookupApplicationGatewayResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // One or more `trustedClientCertificate` blocks as defined below. func (o LookupApplicationGatewayResultOutput) TrustedClientCertificates() GetApplicationGatewayTrustedClientCertificateArrayOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) []GetApplicationGatewayTrustedClientCertificate { return v.TrustedClientCertificates }).(GetApplicationGatewayTrustedClientCertificateArrayOutput) } // One or more `trustedRootCertificate` blocks as defined below. func (o LookupApplicationGatewayResultOutput) TrustedRootCertificates() GetApplicationGatewayTrustedRootCertificateArrayOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) []GetApplicationGatewayTrustedRootCertificate { return v.TrustedRootCertificates }).(GetApplicationGatewayTrustedRootCertificateArrayOutput) } // One or more `urlPathMap` blocks as defined below. func (o LookupApplicationGatewayResultOutput) UrlPathMaps() GetApplicationGatewayUrlPathMapArrayOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) []GetApplicationGatewayUrlPathMap { return v.UrlPathMaps }).(GetApplicationGatewayUrlPathMapArrayOutput) } // A `wafConfiguration` block as defined below. func (o LookupApplicationGatewayResultOutput) WafConfigurations() GetApplicationGatewayWafConfigurationArrayOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) []GetApplicationGatewayWafConfiguration { return v.WafConfigurations }).(GetApplicationGatewayWafConfigurationArrayOutput) } // The list of Availability Zones in which this Application Gateway can use. func (o LookupApplicationGatewayResultOutput) Zones() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupApplicationGatewayResult) []string { return v.Zones }).(pulumi.StringArrayOutput) } func init() { pulumi.RegisterOutputType(LookupApplicationGatewayResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/trafficManagerProfile.go
sdk/go/azure/network/trafficManagerProfile.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Traffic Manager Profile to which multiple endpoints can be attached. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi-random/sdk/v4/go/random" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // server, err := random.NewId(ctx, "server", &random.IdArgs{ // Keepers: map[string]interface{}{ // "aziId": 1, // }, // ByteLength: 8, // }) // if err != nil { // return err // } // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("trafficmanagerProfile"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = network.NewTrafficManagerProfile(ctx, "example", &network.TrafficManagerProfileArgs{ // Name: server.Hex, // ResourceGroupName: example.Name, // TrafficRoutingMethod: pulumi.String("Weighted"), // DnsConfig: &network.TrafficManagerProfileDnsConfigArgs{ // RelativeName: server.Hex, // Ttl: pulumi.Int(100), // }, // MonitorConfig: &network.TrafficManagerProfileMonitorConfigArgs{ // Protocol: pulumi.String("HTTP"), // Port: pulumi.Int(80), // Path: pulumi.String("/"), // IntervalInSeconds: pulumi.Int(30), // TimeoutInSeconds: pulumi.Int(9), // ToleratedNumberOfFailures: pulumi.Int(3), // }, // Tags: pulumi.StringMap{ // "environment": pulumi.String("Production"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2022-04-01 // // ## Import // // Traffic Manager Profiles can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/trafficManagerProfile:TrafficManagerProfile exampleProfile /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/trafficManagerProfiles/mytrafficmanagerprofile1 // ``` type TrafficManagerProfile struct { pulumi.CustomResourceState // This block specifies the DNS configuration of the Profile. One `dnsConfig` block as defined below. DnsConfig TrafficManagerProfileDnsConfigOutput `pulumi:"dnsConfig"` // The FQDN of the created Profile. Fqdn pulumi.StringOutput `pulumi:"fqdn"` // The amount of endpoints to return for DNS queries to this Profile. Possible values range from `1` to `8`. // // > **Note:** `maxReturn` must be set when the `trafficRoutingMethod` is `MultiValue`. MaxReturn pulumi.IntPtrOutput `pulumi:"maxReturn"` // This block specifies the Endpoint monitoring configuration for the Profile. One `monitorConfig` block as defined below. MonitorConfig TrafficManagerProfileMonitorConfigOutput `pulumi:"monitorConfig"` // The name of the Traffic Manager profile. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The status of the profile, can be set to either `Enabled` or `Disabled`. Defaults to `Enabled`. ProfileStatus pulumi.StringPtrOutput `pulumi:"profileStatus"` // The name of the resource group in which to create the Traffic Manager profile. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // Specifies the algorithm used to route traffic. Possible values are `Geographic`, `Weighted`, `Performance`, `Priority`, `Subnet` and `MultiValue`. // * `Geographic` - Traffic is routed based on Geographic regions specified in the Endpoint. // * `MultiValue` - All healthy Endpoints are returned. MultiValue routing method works only if all the endpoints of type `External` and are specified as IPv4 or IPv6 addresses. // * `Performance` - Traffic is routed via the User's closest Endpoint // * `Priority` - Traffic is routed to the Endpoint with the lowest `priority` value. // * `Subnet` - Traffic is routed based on a mapping of sets of end-user IP address ranges to a specific Endpoint within a Traffic Manager profile. // * `Weighted` - Traffic is spread across Endpoints proportional to their `weight` value. TrafficRoutingMethod pulumi.StringOutput `pulumi:"trafficRoutingMethod"` // Indicates whether Traffic View is enabled for the Traffic Manager profile. TrafficViewEnabled pulumi.BoolPtrOutput `pulumi:"trafficViewEnabled"` } // NewTrafficManagerProfile registers a new resource with the given unique name, arguments, and options. func NewTrafficManagerProfile(ctx *pulumi.Context, name string, args *TrafficManagerProfileArgs, opts ...pulumi.ResourceOption) (*TrafficManagerProfile, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.DnsConfig == nil { return nil, errors.New("invalid value for required argument 'DnsConfig'") } if args.MonitorConfig == nil { return nil, errors.New("invalid value for required argument 'MonitorConfig'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.TrafficRoutingMethod == nil { return nil, errors.New("invalid value for required argument 'TrafficRoutingMethod'") } aliases := pulumi.Aliases([]pulumi.Alias{ { Type: pulumi.String("azure:trafficmanager/profile:Profile"), }, }) opts = append(opts, aliases) opts = internal.PkgResourceDefaultOpts(opts) var resource TrafficManagerProfile err := ctx.RegisterResource("azure:network/trafficManagerProfile:TrafficManagerProfile", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetTrafficManagerProfile gets an existing TrafficManagerProfile resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetTrafficManagerProfile(ctx *pulumi.Context, name string, id pulumi.IDInput, state *TrafficManagerProfileState, opts ...pulumi.ResourceOption) (*TrafficManagerProfile, error) { var resource TrafficManagerProfile err := ctx.ReadResource("azure:network/trafficManagerProfile:TrafficManagerProfile", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering TrafficManagerProfile resources. type trafficManagerProfileState struct { // This block specifies the DNS configuration of the Profile. One `dnsConfig` block as defined below. DnsConfig *TrafficManagerProfileDnsConfig `pulumi:"dnsConfig"` // The FQDN of the created Profile. Fqdn *string `pulumi:"fqdn"` // The amount of endpoints to return for DNS queries to this Profile. Possible values range from `1` to `8`. // // > **Note:** `maxReturn` must be set when the `trafficRoutingMethod` is `MultiValue`. MaxReturn *int `pulumi:"maxReturn"` // This block specifies the Endpoint monitoring configuration for the Profile. One `monitorConfig` block as defined below. MonitorConfig *TrafficManagerProfileMonitorConfig `pulumi:"monitorConfig"` // The name of the Traffic Manager profile. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The status of the profile, can be set to either `Enabled` or `Disabled`. Defaults to `Enabled`. ProfileStatus *string `pulumi:"profileStatus"` // The name of the resource group in which to create the Traffic Manager profile. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Specifies the algorithm used to route traffic. Possible values are `Geographic`, `Weighted`, `Performance`, `Priority`, `Subnet` and `MultiValue`. // * `Geographic` - Traffic is routed based on Geographic regions specified in the Endpoint. // * `MultiValue` - All healthy Endpoints are returned. MultiValue routing method works only if all the endpoints of type `External` and are specified as IPv4 or IPv6 addresses. // * `Performance` - Traffic is routed via the User's closest Endpoint // * `Priority` - Traffic is routed to the Endpoint with the lowest `priority` value. // * `Subnet` - Traffic is routed based on a mapping of sets of end-user IP address ranges to a specific Endpoint within a Traffic Manager profile. // * `Weighted` - Traffic is spread across Endpoints proportional to their `weight` value. TrafficRoutingMethod *string `pulumi:"trafficRoutingMethod"` // Indicates whether Traffic View is enabled for the Traffic Manager profile. TrafficViewEnabled *bool `pulumi:"trafficViewEnabled"` } type TrafficManagerProfileState struct { // This block specifies the DNS configuration of the Profile. One `dnsConfig` block as defined below. DnsConfig TrafficManagerProfileDnsConfigPtrInput // The FQDN of the created Profile. Fqdn pulumi.StringPtrInput // The amount of endpoints to return for DNS queries to this Profile. Possible values range from `1` to `8`. // // > **Note:** `maxReturn` must be set when the `trafficRoutingMethod` is `MultiValue`. MaxReturn pulumi.IntPtrInput // This block specifies the Endpoint monitoring configuration for the Profile. One `monitorConfig` block as defined below. MonitorConfig TrafficManagerProfileMonitorConfigPtrInput // The name of the Traffic Manager profile. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The status of the profile, can be set to either `Enabled` or `Disabled`. Defaults to `Enabled`. ProfileStatus pulumi.StringPtrInput // The name of the resource group in which to create the Traffic Manager profile. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Specifies the algorithm used to route traffic. Possible values are `Geographic`, `Weighted`, `Performance`, `Priority`, `Subnet` and `MultiValue`. // * `Geographic` - Traffic is routed based on Geographic regions specified in the Endpoint. // * `MultiValue` - All healthy Endpoints are returned. MultiValue routing method works only if all the endpoints of type `External` and are specified as IPv4 or IPv6 addresses. // * `Performance` - Traffic is routed via the User's closest Endpoint // * `Priority` - Traffic is routed to the Endpoint with the lowest `priority` value. // * `Subnet` - Traffic is routed based on a mapping of sets of end-user IP address ranges to a specific Endpoint within a Traffic Manager profile. // * `Weighted` - Traffic is spread across Endpoints proportional to their `weight` value. TrafficRoutingMethod pulumi.StringPtrInput // Indicates whether Traffic View is enabled for the Traffic Manager profile. TrafficViewEnabled pulumi.BoolPtrInput } func (TrafficManagerProfileState) ElementType() reflect.Type { return reflect.TypeOf((*trafficManagerProfileState)(nil)).Elem() } type trafficManagerProfileArgs struct { // This block specifies the DNS configuration of the Profile. One `dnsConfig` block as defined below. DnsConfig TrafficManagerProfileDnsConfig `pulumi:"dnsConfig"` // The amount of endpoints to return for DNS queries to this Profile. Possible values range from `1` to `8`. // // > **Note:** `maxReturn` must be set when the `trafficRoutingMethod` is `MultiValue`. MaxReturn *int `pulumi:"maxReturn"` // This block specifies the Endpoint monitoring configuration for the Profile. One `monitorConfig` block as defined below. MonitorConfig TrafficManagerProfileMonitorConfig `pulumi:"monitorConfig"` // The name of the Traffic Manager profile. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The status of the profile, can be set to either `Enabled` or `Disabled`. Defaults to `Enabled`. ProfileStatus *string `pulumi:"profileStatus"` // The name of the resource group in which to create the Traffic Manager profile. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Specifies the algorithm used to route traffic. Possible values are `Geographic`, `Weighted`, `Performance`, `Priority`, `Subnet` and `MultiValue`. // * `Geographic` - Traffic is routed based on Geographic regions specified in the Endpoint. // * `MultiValue` - All healthy Endpoints are returned. MultiValue routing method works only if all the endpoints of type `External` and are specified as IPv4 or IPv6 addresses. // * `Performance` - Traffic is routed via the User's closest Endpoint // * `Priority` - Traffic is routed to the Endpoint with the lowest `priority` value. // * `Subnet` - Traffic is routed based on a mapping of sets of end-user IP address ranges to a specific Endpoint within a Traffic Manager profile. // * `Weighted` - Traffic is spread across Endpoints proportional to their `weight` value. TrafficRoutingMethod string `pulumi:"trafficRoutingMethod"` // Indicates whether Traffic View is enabled for the Traffic Manager profile. TrafficViewEnabled *bool `pulumi:"trafficViewEnabled"` } // The set of arguments for constructing a TrafficManagerProfile resource. type TrafficManagerProfileArgs struct { // This block specifies the DNS configuration of the Profile. One `dnsConfig` block as defined below. DnsConfig TrafficManagerProfileDnsConfigInput // The amount of endpoints to return for DNS queries to this Profile. Possible values range from `1` to `8`. // // > **Note:** `maxReturn` must be set when the `trafficRoutingMethod` is `MultiValue`. MaxReturn pulumi.IntPtrInput // This block specifies the Endpoint monitoring configuration for the Profile. One `monitorConfig` block as defined below. MonitorConfig TrafficManagerProfileMonitorConfigInput // The name of the Traffic Manager profile. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The status of the profile, can be set to either `Enabled` or `Disabled`. Defaults to `Enabled`. ProfileStatus pulumi.StringPtrInput // The name of the resource group in which to create the Traffic Manager profile. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Specifies the algorithm used to route traffic. Possible values are `Geographic`, `Weighted`, `Performance`, `Priority`, `Subnet` and `MultiValue`. // * `Geographic` - Traffic is routed based on Geographic regions specified in the Endpoint. // * `MultiValue` - All healthy Endpoints are returned. MultiValue routing method works only if all the endpoints of type `External` and are specified as IPv4 or IPv6 addresses. // * `Performance` - Traffic is routed via the User's closest Endpoint // * `Priority` - Traffic is routed to the Endpoint with the lowest `priority` value. // * `Subnet` - Traffic is routed based on a mapping of sets of end-user IP address ranges to a specific Endpoint within a Traffic Manager profile. // * `Weighted` - Traffic is spread across Endpoints proportional to their `weight` value. TrafficRoutingMethod pulumi.StringInput // Indicates whether Traffic View is enabled for the Traffic Manager profile. TrafficViewEnabled pulumi.BoolPtrInput } func (TrafficManagerProfileArgs) ElementType() reflect.Type { return reflect.TypeOf((*trafficManagerProfileArgs)(nil)).Elem() } type TrafficManagerProfileInput interface { pulumi.Input ToTrafficManagerProfileOutput() TrafficManagerProfileOutput ToTrafficManagerProfileOutputWithContext(ctx context.Context) TrafficManagerProfileOutput } func (*TrafficManagerProfile) ElementType() reflect.Type { return reflect.TypeOf((**TrafficManagerProfile)(nil)).Elem() } func (i *TrafficManagerProfile) ToTrafficManagerProfileOutput() TrafficManagerProfileOutput { return i.ToTrafficManagerProfileOutputWithContext(context.Background()) } func (i *TrafficManagerProfile) ToTrafficManagerProfileOutputWithContext(ctx context.Context) TrafficManagerProfileOutput { return pulumi.ToOutputWithContext(ctx, i).(TrafficManagerProfileOutput) } // TrafficManagerProfileArrayInput is an input type that accepts TrafficManagerProfileArray and TrafficManagerProfileArrayOutput values. // You can construct a concrete instance of `TrafficManagerProfileArrayInput` via: // // TrafficManagerProfileArray{ TrafficManagerProfileArgs{...} } type TrafficManagerProfileArrayInput interface { pulumi.Input ToTrafficManagerProfileArrayOutput() TrafficManagerProfileArrayOutput ToTrafficManagerProfileArrayOutputWithContext(context.Context) TrafficManagerProfileArrayOutput } type TrafficManagerProfileArray []TrafficManagerProfileInput func (TrafficManagerProfileArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*TrafficManagerProfile)(nil)).Elem() } func (i TrafficManagerProfileArray) ToTrafficManagerProfileArrayOutput() TrafficManagerProfileArrayOutput { return i.ToTrafficManagerProfileArrayOutputWithContext(context.Background()) } func (i TrafficManagerProfileArray) ToTrafficManagerProfileArrayOutputWithContext(ctx context.Context) TrafficManagerProfileArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(TrafficManagerProfileArrayOutput) } // TrafficManagerProfileMapInput is an input type that accepts TrafficManagerProfileMap and TrafficManagerProfileMapOutput values. // You can construct a concrete instance of `TrafficManagerProfileMapInput` via: // // TrafficManagerProfileMap{ "key": TrafficManagerProfileArgs{...} } type TrafficManagerProfileMapInput interface { pulumi.Input ToTrafficManagerProfileMapOutput() TrafficManagerProfileMapOutput ToTrafficManagerProfileMapOutputWithContext(context.Context) TrafficManagerProfileMapOutput } type TrafficManagerProfileMap map[string]TrafficManagerProfileInput func (TrafficManagerProfileMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*TrafficManagerProfile)(nil)).Elem() } func (i TrafficManagerProfileMap) ToTrafficManagerProfileMapOutput() TrafficManagerProfileMapOutput { return i.ToTrafficManagerProfileMapOutputWithContext(context.Background()) } func (i TrafficManagerProfileMap) ToTrafficManagerProfileMapOutputWithContext(ctx context.Context) TrafficManagerProfileMapOutput { return pulumi.ToOutputWithContext(ctx, i).(TrafficManagerProfileMapOutput) } type TrafficManagerProfileOutput struct{ *pulumi.OutputState } func (TrafficManagerProfileOutput) ElementType() reflect.Type { return reflect.TypeOf((**TrafficManagerProfile)(nil)).Elem() } func (o TrafficManagerProfileOutput) ToTrafficManagerProfileOutput() TrafficManagerProfileOutput { return o } func (o TrafficManagerProfileOutput) ToTrafficManagerProfileOutputWithContext(ctx context.Context) TrafficManagerProfileOutput { return o } // This block specifies the DNS configuration of the Profile. One `dnsConfig` block as defined below. func (o TrafficManagerProfileOutput) DnsConfig() TrafficManagerProfileDnsConfigOutput { return o.ApplyT(func(v *TrafficManagerProfile) TrafficManagerProfileDnsConfigOutput { return v.DnsConfig }).(TrafficManagerProfileDnsConfigOutput) } // The FQDN of the created Profile. func (o TrafficManagerProfileOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v *TrafficManagerProfile) pulumi.StringOutput { return v.Fqdn }).(pulumi.StringOutput) } // The amount of endpoints to return for DNS queries to this Profile. Possible values range from `1` to `8`. // // > **Note:** `maxReturn` must be set when the `trafficRoutingMethod` is `MultiValue`. func (o TrafficManagerProfileOutput) MaxReturn() pulumi.IntPtrOutput { return o.ApplyT(func(v *TrafficManagerProfile) pulumi.IntPtrOutput { return v.MaxReturn }).(pulumi.IntPtrOutput) } // This block specifies the Endpoint monitoring configuration for the Profile. One `monitorConfig` block as defined below. func (o TrafficManagerProfileOutput) MonitorConfig() TrafficManagerProfileMonitorConfigOutput { return o.ApplyT(func(v *TrafficManagerProfile) TrafficManagerProfileMonitorConfigOutput { return v.MonitorConfig }).(TrafficManagerProfileMonitorConfigOutput) } // The name of the Traffic Manager profile. Changing this forces a new resource to be created. func (o TrafficManagerProfileOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *TrafficManagerProfile) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The status of the profile, can be set to either `Enabled` or `Disabled`. Defaults to `Enabled`. func (o TrafficManagerProfileOutput) ProfileStatus() pulumi.StringPtrOutput { return o.ApplyT(func(v *TrafficManagerProfile) pulumi.StringPtrOutput { return v.ProfileStatus }).(pulumi.StringPtrOutput) } // The name of the resource group in which to create the Traffic Manager profile. Changing this forces a new resource to be created. func (o TrafficManagerProfileOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *TrafficManagerProfile) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o TrafficManagerProfileOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *TrafficManagerProfile) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // Specifies the algorithm used to route traffic. Possible values are `Geographic`, `Weighted`, `Performance`, `Priority`, `Subnet` and `MultiValue`. // * `Geographic` - Traffic is routed based on Geographic regions specified in the Endpoint. // * `MultiValue` - All healthy Endpoints are returned. MultiValue routing method works only if all the endpoints of type `External` and are specified as IPv4 or IPv6 addresses. // * `Performance` - Traffic is routed via the User's closest Endpoint // * `Priority` - Traffic is routed to the Endpoint with the lowest `priority` value. // * `Subnet` - Traffic is routed based on a mapping of sets of end-user IP address ranges to a specific Endpoint within a Traffic Manager profile. // * `Weighted` - Traffic is spread across Endpoints proportional to their `weight` value. func (o TrafficManagerProfileOutput) TrafficRoutingMethod() pulumi.StringOutput { return o.ApplyT(func(v *TrafficManagerProfile) pulumi.StringOutput { return v.TrafficRoutingMethod }).(pulumi.StringOutput) } // Indicates whether Traffic View is enabled for the Traffic Manager profile. func (o TrafficManagerProfileOutput) TrafficViewEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *TrafficManagerProfile) pulumi.BoolPtrOutput { return v.TrafficViewEnabled }).(pulumi.BoolPtrOutput) } type TrafficManagerProfileArrayOutput struct{ *pulumi.OutputState } func (TrafficManagerProfileArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*TrafficManagerProfile)(nil)).Elem() } func (o TrafficManagerProfileArrayOutput) ToTrafficManagerProfileArrayOutput() TrafficManagerProfileArrayOutput { return o } func (o TrafficManagerProfileArrayOutput) ToTrafficManagerProfileArrayOutputWithContext(ctx context.Context) TrafficManagerProfileArrayOutput { return o } func (o TrafficManagerProfileArrayOutput) Index(i pulumi.IntInput) TrafficManagerProfileOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TrafficManagerProfile { return vs[0].([]*TrafficManagerProfile)[vs[1].(int)] }).(TrafficManagerProfileOutput) } type TrafficManagerProfileMapOutput struct{ *pulumi.OutputState } func (TrafficManagerProfileMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*TrafficManagerProfile)(nil)).Elem() } func (o TrafficManagerProfileMapOutput) ToTrafficManagerProfileMapOutput() TrafficManagerProfileMapOutput { return o } func (o TrafficManagerProfileMapOutput) ToTrafficManagerProfileMapOutputWithContext(ctx context.Context) TrafficManagerProfileMapOutput { return o } func (o TrafficManagerProfileMapOutput) MapIndex(k pulumi.StringInput) TrafficManagerProfileOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TrafficManagerProfile { return vs[0].(map[string]*TrafficManagerProfile)[vs[1].(string)] }).(TrafficManagerProfileOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*TrafficManagerProfileInput)(nil)).Elem(), &TrafficManagerProfile{}) pulumi.RegisterInputType(reflect.TypeOf((*TrafficManagerProfileArrayInput)(nil)).Elem(), TrafficManagerProfileArray{}) pulumi.RegisterInputType(reflect.TypeOf((*TrafficManagerProfileMapInput)(nil)).Elem(), TrafficManagerProfileMap{}) pulumi.RegisterOutputType(TrafficManagerProfileOutput{}) pulumi.RegisterOutputType(TrafficManagerProfileArrayOutput{}) pulumi.RegisterOutputType(TrafficManagerProfileMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/routeServer.go
sdk/go/azure/network/routeServer.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Azure Route Server // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-vn"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // ResourceGroupName: example.Name, // Location: example.Location, // Tags: pulumi.StringMap{ // "environment": pulumi.String("Production"), // }, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("RouteServerSubnet"), // VirtualNetworkName: exampleVirtualNetwork.Name, // ResourceGroupName: example.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.1.0/24"), // }, // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("example-pip"), // ResourceGroupName: example.Name, // Location: example.Location, // AllocationMethod: pulumi.String("Static"), // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // _, err = network.NewRouteServer(ctx, "example", &network.RouteServerArgs{ // Name: pulumi.String("example-routerserver"), // ResourceGroupName: example.Name, // Location: example.Location, // Sku: pulumi.String("Standard"), // PublicIpAddressId: examplePublicIp.ID(), // SubnetId: exampleSubnet.ID(), // BranchToBranchTrafficEnabled: pulumi.Bool(true), // HubRoutingPreference: pulumi.String("ASPath"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Route Server can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/routeServer:RouteServer example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/virtualHubs/routeServer1 // ``` type RouteServer struct { pulumi.CustomResourceState // Whether to enable route exchange between Azure Route Server and the gateway(s). BranchToBranchTrafficEnabled pulumi.BoolPtrOutput `pulumi:"branchToBranchTrafficEnabled"` // The hub routing preference. Valid values are `ASPath`, `ExpressRoute` or `VpnGateway`. Defaults to `ExpressRoute`. HubRoutingPreference pulumi.StringPtrOutput `pulumi:"hubRoutingPreference"` // Specifies the supported Azure location where the Route Server should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the Route Server. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the Public IP Address. This option is required since September 1st 2021. Changing this forces a new resource to be created. PublicIpAddressId pulumi.StringOutput `pulumi:"publicIpAddressId"` // Specifies the name of the Resource Group where the Route Server should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` RoutingState pulumi.StringOutput `pulumi:"routingState"` // The SKU of the Route Server. The only possible value is `Standard`. Changing this forces a new resource to be created. Sku pulumi.StringOutput `pulumi:"sku"` // The ID of the Subnet that the Route Server will reside. Changing this forces a new resource to be created. // // > **Note:** Azure Route Server requires a dedicated subnet named RouteServerSubnet. The subnet size has to be at least /27 or short prefix (such as /26 or /25) and cannot be attached to any security group, otherwise, you'll receive an error message when deploying the Route Server. SubnetId pulumi.StringOutput `pulumi:"subnetId"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` VirtualRouterAsn pulumi.IntOutput `pulumi:"virtualRouterAsn"` VirtualRouterIps pulumi.StringArrayOutput `pulumi:"virtualRouterIps"` } // NewRouteServer registers a new resource with the given unique name, arguments, and options. func NewRouteServer(ctx *pulumi.Context, name string, args *RouteServerArgs, opts ...pulumi.ResourceOption) (*RouteServer, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.PublicIpAddressId == nil { return nil, errors.New("invalid value for required argument 'PublicIpAddressId'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Sku == nil { return nil, errors.New("invalid value for required argument 'Sku'") } if args.SubnetId == nil { return nil, errors.New("invalid value for required argument 'SubnetId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource RouteServer err := ctx.RegisterResource("azure:network/routeServer:RouteServer", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetRouteServer gets an existing RouteServer resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetRouteServer(ctx *pulumi.Context, name string, id pulumi.IDInput, state *RouteServerState, opts ...pulumi.ResourceOption) (*RouteServer, error) { var resource RouteServer err := ctx.ReadResource("azure:network/routeServer:RouteServer", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering RouteServer resources. type routeServerState struct { // Whether to enable route exchange between Azure Route Server and the gateway(s). BranchToBranchTrafficEnabled *bool `pulumi:"branchToBranchTrafficEnabled"` // The hub routing preference. Valid values are `ASPath`, `ExpressRoute` or `VpnGateway`. Defaults to `ExpressRoute`. HubRoutingPreference *string `pulumi:"hubRoutingPreference"` // Specifies the supported Azure location where the Route Server should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the Route Server. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the Public IP Address. This option is required since September 1st 2021. Changing this forces a new resource to be created. PublicIpAddressId *string `pulumi:"publicIpAddressId"` // Specifies the name of the Resource Group where the Route Server should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` RoutingState *string `pulumi:"routingState"` // The SKU of the Route Server. The only possible value is `Standard`. Changing this forces a new resource to be created. Sku *string `pulumi:"sku"` // The ID of the Subnet that the Route Server will reside. Changing this forces a new resource to be created. // // > **Note:** Azure Route Server requires a dedicated subnet named RouteServerSubnet. The subnet size has to be at least /27 or short prefix (such as /26 or /25) and cannot be attached to any security group, otherwise, you'll receive an error message when deploying the Route Server. SubnetId *string `pulumi:"subnetId"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` VirtualRouterAsn *int `pulumi:"virtualRouterAsn"` VirtualRouterIps []string `pulumi:"virtualRouterIps"` } type RouteServerState struct { // Whether to enable route exchange between Azure Route Server and the gateway(s). BranchToBranchTrafficEnabled pulumi.BoolPtrInput // The hub routing preference. Valid values are `ASPath`, `ExpressRoute` or `VpnGateway`. Defaults to `ExpressRoute`. HubRoutingPreference pulumi.StringPtrInput // Specifies the supported Azure location where the Route Server should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the Route Server. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the Public IP Address. This option is required since September 1st 2021. Changing this forces a new resource to be created. PublicIpAddressId pulumi.StringPtrInput // Specifies the name of the Resource Group where the Route Server should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput RoutingState pulumi.StringPtrInput // The SKU of the Route Server. The only possible value is `Standard`. Changing this forces a new resource to be created. Sku pulumi.StringPtrInput // The ID of the Subnet that the Route Server will reside. Changing this forces a new resource to be created. // // > **Note:** Azure Route Server requires a dedicated subnet named RouteServerSubnet. The subnet size has to be at least /27 or short prefix (such as /26 or /25) and cannot be attached to any security group, otherwise, you'll receive an error message when deploying the Route Server. SubnetId pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput VirtualRouterAsn pulumi.IntPtrInput VirtualRouterIps pulumi.StringArrayInput } func (RouteServerState) ElementType() reflect.Type { return reflect.TypeOf((*routeServerState)(nil)).Elem() } type routeServerArgs struct { // Whether to enable route exchange between Azure Route Server and the gateway(s). BranchToBranchTrafficEnabled *bool `pulumi:"branchToBranchTrafficEnabled"` // The hub routing preference. Valid values are `ASPath`, `ExpressRoute` or `VpnGateway`. Defaults to `ExpressRoute`. HubRoutingPreference *string `pulumi:"hubRoutingPreference"` // Specifies the supported Azure location where the Route Server should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the Route Server. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the Public IP Address. This option is required since September 1st 2021. Changing this forces a new resource to be created. PublicIpAddressId string `pulumi:"publicIpAddressId"` // Specifies the name of the Resource Group where the Route Server should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The SKU of the Route Server. The only possible value is `Standard`. Changing this forces a new resource to be created. Sku string `pulumi:"sku"` // The ID of the Subnet that the Route Server will reside. Changing this forces a new resource to be created. // // > **Note:** Azure Route Server requires a dedicated subnet named RouteServerSubnet. The subnet size has to be at least /27 or short prefix (such as /26 or /25) and cannot be attached to any security group, otherwise, you'll receive an error message when deploying the Route Server. SubnetId string `pulumi:"subnetId"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a RouteServer resource. type RouteServerArgs struct { // Whether to enable route exchange between Azure Route Server and the gateway(s). BranchToBranchTrafficEnabled pulumi.BoolPtrInput // The hub routing preference. Valid values are `ASPath`, `ExpressRoute` or `VpnGateway`. Defaults to `ExpressRoute`. HubRoutingPreference pulumi.StringPtrInput // Specifies the supported Azure location where the Route Server should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the Route Server. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the Public IP Address. This option is required since September 1st 2021. Changing this forces a new resource to be created. PublicIpAddressId pulumi.StringInput // Specifies the name of the Resource Group where the Route Server should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The SKU of the Route Server. The only possible value is `Standard`. Changing this forces a new resource to be created. Sku pulumi.StringInput // The ID of the Subnet that the Route Server will reside. Changing this forces a new resource to be created. // // > **Note:** Azure Route Server requires a dedicated subnet named RouteServerSubnet. The subnet size has to be at least /27 or short prefix (such as /26 or /25) and cannot be attached to any security group, otherwise, you'll receive an error message when deploying the Route Server. SubnetId pulumi.StringInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (RouteServerArgs) ElementType() reflect.Type { return reflect.TypeOf((*routeServerArgs)(nil)).Elem() } type RouteServerInput interface { pulumi.Input ToRouteServerOutput() RouteServerOutput ToRouteServerOutputWithContext(ctx context.Context) RouteServerOutput } func (*RouteServer) ElementType() reflect.Type { return reflect.TypeOf((**RouteServer)(nil)).Elem() } func (i *RouteServer) ToRouteServerOutput() RouteServerOutput { return i.ToRouteServerOutputWithContext(context.Background()) } func (i *RouteServer) ToRouteServerOutputWithContext(ctx context.Context) RouteServerOutput { return pulumi.ToOutputWithContext(ctx, i).(RouteServerOutput) } // RouteServerArrayInput is an input type that accepts RouteServerArray and RouteServerArrayOutput values. // You can construct a concrete instance of `RouteServerArrayInput` via: // // RouteServerArray{ RouteServerArgs{...} } type RouteServerArrayInput interface { pulumi.Input ToRouteServerArrayOutput() RouteServerArrayOutput ToRouteServerArrayOutputWithContext(context.Context) RouteServerArrayOutput } type RouteServerArray []RouteServerInput func (RouteServerArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*RouteServer)(nil)).Elem() } func (i RouteServerArray) ToRouteServerArrayOutput() RouteServerArrayOutput { return i.ToRouteServerArrayOutputWithContext(context.Background()) } func (i RouteServerArray) ToRouteServerArrayOutputWithContext(ctx context.Context) RouteServerArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(RouteServerArrayOutput) } // RouteServerMapInput is an input type that accepts RouteServerMap and RouteServerMapOutput values. // You can construct a concrete instance of `RouteServerMapInput` via: // // RouteServerMap{ "key": RouteServerArgs{...} } type RouteServerMapInput interface { pulumi.Input ToRouteServerMapOutput() RouteServerMapOutput ToRouteServerMapOutputWithContext(context.Context) RouteServerMapOutput } type RouteServerMap map[string]RouteServerInput func (RouteServerMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*RouteServer)(nil)).Elem() } func (i RouteServerMap) ToRouteServerMapOutput() RouteServerMapOutput { return i.ToRouteServerMapOutputWithContext(context.Background()) } func (i RouteServerMap) ToRouteServerMapOutputWithContext(ctx context.Context) RouteServerMapOutput { return pulumi.ToOutputWithContext(ctx, i).(RouteServerMapOutput) } type RouteServerOutput struct{ *pulumi.OutputState } func (RouteServerOutput) ElementType() reflect.Type { return reflect.TypeOf((**RouteServer)(nil)).Elem() } func (o RouteServerOutput) ToRouteServerOutput() RouteServerOutput { return o } func (o RouteServerOutput) ToRouteServerOutputWithContext(ctx context.Context) RouteServerOutput { return o } // Whether to enable route exchange between Azure Route Server and the gateway(s). func (o RouteServerOutput) BranchToBranchTrafficEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *RouteServer) pulumi.BoolPtrOutput { return v.BranchToBranchTrafficEnabled }).(pulumi.BoolPtrOutput) } // The hub routing preference. Valid values are `ASPath`, `ExpressRoute` or `VpnGateway`. Defaults to `ExpressRoute`. func (o RouteServerOutput) HubRoutingPreference() pulumi.StringPtrOutput { return o.ApplyT(func(v *RouteServer) pulumi.StringPtrOutput { return v.HubRoutingPreference }).(pulumi.StringPtrOutput) } // Specifies the supported Azure location where the Route Server should exist. Changing this forces a new resource to be created. func (o RouteServerOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *RouteServer) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name of the Route Server. Changing this forces a new resource to be created. func (o RouteServerOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *RouteServer) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the Public IP Address. This option is required since September 1st 2021. Changing this forces a new resource to be created. func (o RouteServerOutput) PublicIpAddressId() pulumi.StringOutput { return o.ApplyT(func(v *RouteServer) pulumi.StringOutput { return v.PublicIpAddressId }).(pulumi.StringOutput) } // Specifies the name of the Resource Group where the Route Server should exist. Changing this forces a new resource to be created. func (o RouteServerOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *RouteServer) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } func (o RouteServerOutput) RoutingState() pulumi.StringOutput { return o.ApplyT(func(v *RouteServer) pulumi.StringOutput { return v.RoutingState }).(pulumi.StringOutput) } // The SKU of the Route Server. The only possible value is `Standard`. Changing this forces a new resource to be created. func (o RouteServerOutput) Sku() pulumi.StringOutput { return o.ApplyT(func(v *RouteServer) pulumi.StringOutput { return v.Sku }).(pulumi.StringOutput) } // The ID of the Subnet that the Route Server will reside. Changing this forces a new resource to be created. // // > **Note:** Azure Route Server requires a dedicated subnet named RouteServerSubnet. The subnet size has to be at least /27 or short prefix (such as /26 or /25) and cannot be attached to any security group, otherwise, you'll receive an error message when deploying the Route Server. func (o RouteServerOutput) SubnetId() pulumi.StringOutput { return o.ApplyT(func(v *RouteServer) pulumi.StringOutput { return v.SubnetId }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o RouteServerOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *RouteServer) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } func (o RouteServerOutput) VirtualRouterAsn() pulumi.IntOutput { return o.ApplyT(func(v *RouteServer) pulumi.IntOutput { return v.VirtualRouterAsn }).(pulumi.IntOutput) } func (o RouteServerOutput) VirtualRouterIps() pulumi.StringArrayOutput { return o.ApplyT(func(v *RouteServer) pulumi.StringArrayOutput { return v.VirtualRouterIps }).(pulumi.StringArrayOutput) } type RouteServerArrayOutput struct{ *pulumi.OutputState } func (RouteServerArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*RouteServer)(nil)).Elem() } func (o RouteServerArrayOutput) ToRouteServerArrayOutput() RouteServerArrayOutput { return o } func (o RouteServerArrayOutput) ToRouteServerArrayOutputWithContext(ctx context.Context) RouteServerArrayOutput { return o } func (o RouteServerArrayOutput) Index(i pulumi.IntInput) RouteServerOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *RouteServer { return vs[0].([]*RouteServer)[vs[1].(int)] }).(RouteServerOutput) } type RouteServerMapOutput struct{ *pulumi.OutputState } func (RouteServerMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*RouteServer)(nil)).Elem() } func (o RouteServerMapOutput) ToRouteServerMapOutput() RouteServerMapOutput { return o } func (o RouteServerMapOutput) ToRouteServerMapOutputWithContext(ctx context.Context) RouteServerMapOutput { return o } func (o RouteServerMapOutput) MapIndex(k pulumi.StringInput) RouteServerOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *RouteServer { return vs[0].(map[string]*RouteServer)[vs[1].(string)] }).(RouteServerOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*RouteServerInput)(nil)).Elem(), &RouteServer{}) pulumi.RegisterInputType(reflect.TypeOf((*RouteServerArrayInput)(nil)).Elem(), RouteServerArray{}) pulumi.RegisterInputType(reflect.TypeOf((*RouteServerMapInput)(nil)).Elem(), RouteServerMap{}) pulumi.RegisterOutputType(RouteServerOutput{}) pulumi.RegisterOutputType(RouteServerArrayOutput{}) pulumi.RegisterOutputType(RouteServerMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/init.go
sdk/go/azure/network/init.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "fmt" "github.com/blang/semver" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) type module struct { version semver.Version } func (m *module) Version() semver.Version { return m.version } func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) { switch typ { case "azure:network/applicationGateway:ApplicationGateway": r = &ApplicationGateway{} case "azure:network/applicationSecurityGroup:ApplicationSecurityGroup": r = &ApplicationSecurityGroup{} case "azure:network/bgpConnection:BgpConnection": r = &BgpConnection{} case "azure:network/ddosProtectionPlan:DdosProtectionPlan": r = &DdosProtectionPlan{} case "azure:network/expressRouteCircuit:ExpressRouteCircuit": r = &ExpressRouteCircuit{} case "azure:network/expressRouteCircuitAuthorization:ExpressRouteCircuitAuthorization": r = &ExpressRouteCircuitAuthorization{} case "azure:network/expressRouteCircuitConnection:ExpressRouteCircuitConnection": r = &ExpressRouteCircuitConnection{} case "azure:network/expressRouteCircuitPeering:ExpressRouteCircuitPeering": r = &ExpressRouteCircuitPeering{} case "azure:network/expressRouteConnection:ExpressRouteConnection": r = &ExpressRouteConnection{} case "azure:network/expressRouteGateway:ExpressRouteGateway": r = &ExpressRouteGateway{} case "azure:network/expressRoutePort:ExpressRoutePort": r = &ExpressRoutePort{} case "azure:network/expressRoutePortAuthorization:ExpressRoutePortAuthorization": r = &ExpressRoutePortAuthorization{} case "azure:network/firewall:Firewall": r = &Firewall{} case "azure:network/firewallApplicationRuleCollection:FirewallApplicationRuleCollection": r = &FirewallApplicationRuleCollection{} case "azure:network/firewallNatRuleCollection:FirewallNatRuleCollection": r = &FirewallNatRuleCollection{} case "azure:network/firewallNetworkRuleCollection:FirewallNetworkRuleCollection": r = &FirewallNetworkRuleCollection{} case "azure:network/firewallPolicy:FirewallPolicy": r = &FirewallPolicy{} case "azure:network/firewallPolicyRuleCollectionGroup:FirewallPolicyRuleCollectionGroup": r = &FirewallPolicyRuleCollectionGroup{} case "azure:network/iPGroup:IPGroup": r = &IPGroup{} case "azure:network/iPGroupCIDR:IPGroupCIDR": r = &IPGroupCIDR{} case "azure:network/localNetworkGateway:LocalNetworkGateway": r = &LocalNetworkGateway{} case "azure:network/natGateway:NatGateway": r = &NatGateway{} case "azure:network/natGatewayPublicIpAssociation:NatGatewayPublicIpAssociation": r = &NatGatewayPublicIpAssociation{} case "azure:network/natGatewayPublicIpPrefixAssociation:NatGatewayPublicIpPrefixAssociation": r = &NatGatewayPublicIpPrefixAssociation{} case "azure:network/networkConnectionMonitor:NetworkConnectionMonitor": r = &NetworkConnectionMonitor{} case "azure:network/networkInterface:NetworkInterface": r = &NetworkInterface{} case "azure:network/networkInterfaceApplicationGatewayBackendAddressPoolAssociation:NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation": r = &NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation{} case "azure:network/networkInterfaceApplicationSecurityGroupAssociation:NetworkInterfaceApplicationSecurityGroupAssociation": r = &NetworkInterfaceApplicationSecurityGroupAssociation{} case "azure:network/networkInterfaceBackendAddressPoolAssociation:NetworkInterfaceBackendAddressPoolAssociation": r = &NetworkInterfaceBackendAddressPoolAssociation{} case "azure:network/networkInterfaceNatRuleAssociation:NetworkInterfaceNatRuleAssociation": r = &NetworkInterfaceNatRuleAssociation{} case "azure:network/networkInterfaceSecurityGroupAssociation:NetworkInterfaceSecurityGroupAssociation": r = &NetworkInterfaceSecurityGroupAssociation{} case "azure:network/networkManager:NetworkManager": r = &NetworkManager{} case "azure:network/networkManagerAdminRule:NetworkManagerAdminRule": r = &NetworkManagerAdminRule{} case "azure:network/networkManagerAdminRuleCollection:NetworkManagerAdminRuleCollection": r = &NetworkManagerAdminRuleCollection{} case "azure:network/networkManagerConnectivityConfiguration:NetworkManagerConnectivityConfiguration": r = &NetworkManagerConnectivityConfiguration{} case "azure:network/networkManagerDeployment:NetworkManagerDeployment": r = &NetworkManagerDeployment{} case "azure:network/networkManagerIpamPool:NetworkManagerIpamPool": r = &NetworkManagerIpamPool{} case "azure:network/networkManagerIpamPoolStaticCidr:NetworkManagerIpamPoolStaticCidr": r = &NetworkManagerIpamPoolStaticCidr{} case "azure:network/networkManagerManagementGroupConnection:NetworkManagerManagementGroupConnection": r = &NetworkManagerManagementGroupConnection{} case "azure:network/networkManagerNetworkGroup:NetworkManagerNetworkGroup": r = &NetworkManagerNetworkGroup{} case "azure:network/networkManagerRoutingConfiguration:NetworkManagerRoutingConfiguration": r = &NetworkManagerRoutingConfiguration{} case "azure:network/networkManagerRoutingRule:NetworkManagerRoutingRule": r = &NetworkManagerRoutingRule{} case "azure:network/networkManagerRoutingRuleCollection:NetworkManagerRoutingRuleCollection": r = &NetworkManagerRoutingRuleCollection{} case "azure:network/networkManagerScopeConnection:NetworkManagerScopeConnection": r = &NetworkManagerScopeConnection{} case "azure:network/networkManagerSecurityAdminConfiguration:NetworkManagerSecurityAdminConfiguration": r = &NetworkManagerSecurityAdminConfiguration{} case "azure:network/networkManagerStaticMember:NetworkManagerStaticMember": r = &NetworkManagerStaticMember{} case "azure:network/networkManagerSubscriptionConnection:NetworkManagerSubscriptionConnection": r = &NetworkManagerSubscriptionConnection{} case "azure:network/networkManagerVerifierWorkspace:NetworkManagerVerifierWorkspace": r = &NetworkManagerVerifierWorkspace{} case "azure:network/networkManagerVerifierWorkspaceReachabilityAnalysisIntent:NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent": r = &NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent{} case "azure:network/networkSecurityGroup:NetworkSecurityGroup": r = &NetworkSecurityGroup{} case "azure:network/networkSecurityRule:NetworkSecurityRule": r = &NetworkSecurityRule{} case "azure:network/networkWatcher:NetworkWatcher": r = &NetworkWatcher{} case "azure:network/networkWatcherFlowLog:NetworkWatcherFlowLog": r = &NetworkWatcherFlowLog{} case "azure:network/pointToPointVpnGateway:PointToPointVpnGateway": r = &PointToPointVpnGateway{} case "azure:network/profile:Profile": r = &Profile{} case "azure:network/publicIp:PublicIp": r = &PublicIp{} case "azure:network/publicIpPrefix:PublicIpPrefix": r = &PublicIpPrefix{} case "azure:network/route:Route": r = &Route{} case "azure:network/routeFilter:RouteFilter": r = &RouteFilter{} case "azure:network/routeMap:RouteMap": r = &RouteMapResource{} case "azure:network/routeServer:RouteServer": r = &RouteServer{} case "azure:network/routeServerBgpConnection:RouteServerBgpConnection": r = &RouteServerBgpConnection{} case "azure:network/routeTable:RouteTable": r = &RouteTable{} case "azure:network/routingIntent:RoutingIntent": r = &RoutingIntent{} case "azure:network/securityPartnerProvider:SecurityPartnerProvider": r = &SecurityPartnerProvider{} case "azure:network/subnet:Subnet": r = &Subnet{} case "azure:network/subnetNatGatewayAssociation:SubnetNatGatewayAssociation": r = &SubnetNatGatewayAssociation{} case "azure:network/subnetNetworkSecurityGroupAssociation:SubnetNetworkSecurityGroupAssociation": r = &SubnetNetworkSecurityGroupAssociation{} case "azure:network/subnetRouteTableAssociation:SubnetRouteTableAssociation": r = &SubnetRouteTableAssociation{} case "azure:network/subnetServiceEndpointStoragePolicy:SubnetServiceEndpointStoragePolicy": r = &SubnetServiceEndpointStoragePolicy{} case "azure:network/trafficManagerAzureEndpoint:TrafficManagerAzureEndpoint": r = &TrafficManagerAzureEndpoint{} case "azure:network/trafficManagerExternalEndpoint:TrafficManagerExternalEndpoint": r = &TrafficManagerExternalEndpoint{} case "azure:network/trafficManagerNestedEndpoint:TrafficManagerNestedEndpoint": r = &TrafficManagerNestedEndpoint{} case "azure:network/trafficManagerProfile:TrafficManagerProfile": r = &TrafficManagerProfile{} case "azure:network/virtualHub:VirtualHub": r = &VirtualHub{} case "azure:network/virtualHubConnection:VirtualHubConnection": r = &VirtualHubConnection{} case "azure:network/virtualHubIp:VirtualHubIp": r = &VirtualHubIp{} case "azure:network/virtualHubRouteTable:VirtualHubRouteTable": r = &VirtualHubRouteTable{} case "azure:network/virtualHubRouteTableRoute:VirtualHubRouteTableRoute": r = &VirtualHubRouteTableRoute{} case "azure:network/virtualNetwork:VirtualNetwork": r = &VirtualNetwork{} case "azure:network/virtualNetworkDnsServers:VirtualNetworkDnsServers": r = &VirtualNetworkDnsServers{} case "azure:network/virtualNetworkGateway:VirtualNetworkGateway": r = &VirtualNetworkGateway{} case "azure:network/virtualNetworkGatewayConnection:VirtualNetworkGatewayConnection": r = &VirtualNetworkGatewayConnection{} case "azure:network/virtualNetworkGatewayNatRule:VirtualNetworkGatewayNatRule": r = &VirtualNetworkGatewayNatRule{} case "azure:network/virtualNetworkPeering:VirtualNetworkPeering": r = &VirtualNetworkPeering{} case "azure:network/virtualWan:VirtualWan": r = &VirtualWan{} case "azure:network/vnpGatewayNatRule:VnpGatewayNatRule": r = &VnpGatewayNatRule{} case "azure:network/vpnGateway:VpnGateway": r = &VpnGateway{} case "azure:network/vpnGatewayConnection:VpnGatewayConnection": r = &VpnGatewayConnection{} case "azure:network/vpnServerConfiguration:VpnServerConfiguration": r = &VpnServerConfiguration{} case "azure:network/vpnServerConfigurationPolicyGroup:VpnServerConfigurationPolicyGroup": r = &VpnServerConfigurationPolicyGroup{} case "azure:network/vpnSite:VpnSite": r = &VpnSite{} default: return nil, fmt.Errorf("unknown resource type: %s", typ) } err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn)) return } func init() { version, err := internal.PkgVersion() if err != nil { version = semver.Version{Major: 1} } pulumi.RegisterResourceModule( "azure", "network/applicationGateway", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/applicationSecurityGroup", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/bgpConnection", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/ddosProtectionPlan", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/expressRouteCircuit", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/expressRouteCircuitAuthorization", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/expressRouteCircuitConnection", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/expressRouteCircuitPeering", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/expressRouteConnection", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/expressRouteGateway", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/expressRoutePort", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/expressRoutePortAuthorization", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/firewall", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/firewallApplicationRuleCollection", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/firewallNatRuleCollection", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/firewallNetworkRuleCollection", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/firewallPolicy", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/firewallPolicyRuleCollectionGroup", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/iPGroup", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/iPGroupCIDR", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/localNetworkGateway", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/natGateway", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/natGatewayPublicIpAssociation", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/natGatewayPublicIpPrefixAssociation", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/networkConnectionMonitor", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/networkInterface", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/networkInterfaceApplicationGatewayBackendAddressPoolAssociation", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/networkInterfaceApplicationSecurityGroupAssociation", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/networkInterfaceBackendAddressPoolAssociation", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/networkInterfaceNatRuleAssociation", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/networkInterfaceSecurityGroupAssociation", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/networkManager", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/networkManagerAdminRule", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/networkManagerAdminRuleCollection", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/networkManagerConnectivityConfiguration", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/networkManagerDeployment", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/networkManagerIpamPool", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/networkManagerIpamPoolStaticCidr", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/networkManagerManagementGroupConnection", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/networkManagerNetworkGroup", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/networkManagerRoutingConfiguration", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/networkManagerRoutingRule", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/networkManagerRoutingRuleCollection", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/networkManagerScopeConnection", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/networkManagerSecurityAdminConfiguration", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/networkManagerStaticMember", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/networkManagerSubscriptionConnection", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/networkManagerVerifierWorkspace", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/networkManagerVerifierWorkspaceReachabilityAnalysisIntent", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/networkSecurityGroup", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/networkSecurityRule", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/networkWatcher", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/networkWatcherFlowLog", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/pointToPointVpnGateway", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/profile", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/publicIp", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/publicIpPrefix", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/route", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/routeFilter", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/routeMap", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/routeServer", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/routeServerBgpConnection", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/routeTable", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/routingIntent", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/securityPartnerProvider", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/subnet", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/subnetNatGatewayAssociation", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/subnetNetworkSecurityGroupAssociation", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/subnetRouteTableAssociation", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/subnetServiceEndpointStoragePolicy", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/trafficManagerAzureEndpoint", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/trafficManagerExternalEndpoint", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/trafficManagerNestedEndpoint", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/trafficManagerProfile", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/virtualHub", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/virtualHubConnection", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/virtualHubIp", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/virtualHubRouteTable", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/virtualHubRouteTableRoute", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/virtualNetwork", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/virtualNetworkDnsServers", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/virtualNetworkGateway", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/virtualNetworkGatewayConnection", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/virtualNetworkGatewayNatRule", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/virtualNetworkPeering", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/virtualWan", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/vnpGatewayNatRule", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/vpnGateway", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/vpnGatewayConnection", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/vpnServerConfiguration", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/vpnServerConfigurationPolicyGroup", &module{version}, ) pulumi.RegisterResourceModule( "azure", "network/vpnSite", &module{version}, ) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getVpnServerConfiguration.go
sdk/go/azure/network/getVpnServerConfiguration.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing VPN Server Configuration. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.LookupVpnServerConfiguration(ctx, &network.LookupVpnServerConfigurationArgs{ // Name: "existing-local-vpn-server-configuration", // ResourceGroupName: "existing-resource-group", // }, nil) // if err != nil { // return err // } // ctx.Export("azurermVpnServerConfiguration", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func LookupVpnServerConfiguration(ctx *pulumi.Context, args *LookupVpnServerConfigurationArgs, opts ...pulumi.InvokeOption) (*LookupVpnServerConfigurationResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupVpnServerConfigurationResult err := ctx.Invoke("azure:network/getVpnServerConfiguration:getVpnServerConfiguration", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getVpnServerConfiguration. type LookupVpnServerConfigurationArgs struct { // The Name of the VPN Server Configuration. Name string `pulumi:"name"` // The name of the Resource Group where the VPN Server Configuration exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getVpnServerConfiguration. type LookupVpnServerConfigurationResult struct { // A `azureActiveDirectoryAuthentication` block as defined below. AzureActiveDirectoryAuthentications []GetVpnServerConfigurationAzureActiveDirectoryAuthentication `pulumi:"azureActiveDirectoryAuthentications"` // One or more `clientRevokedCertificate` blocks as defined below. ClientRevokedCertificates []GetVpnServerConfigurationClientRevokedCertificate `pulumi:"clientRevokedCertificates"` // One or more `clientRootCertificate` blocks as defined below. ClientRootCertificates []GetVpnServerConfigurationClientRootCertificate `pulumi:"clientRootCertificates"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The `bgpSettings` block as defined below. IpsecPolicies []GetVpnServerConfigurationIpsecPolicy `pulumi:"ipsecPolicies"` // The Azure Region where the VPN Server Configuration exists. Location string `pulumi:"location"` // The name used to uniquely identify this certificate. Name string `pulumi:"name"` // A `radius` block as defined below. Radii []GetVpnServerConfigurationRadius `pulumi:"radii"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the VPN Server Configuration. Tags map[string]string `pulumi:"tags"` // The list of Authentication Types applicable for the VPN Server Configuration. VpnAuthenticationTypes []string `pulumi:"vpnAuthenticationTypes"` // The list of VPN Protocols to use for the VPN Server Configuration. VpnProtocols []string `pulumi:"vpnProtocols"` } func LookupVpnServerConfigurationOutput(ctx *pulumi.Context, args LookupVpnServerConfigurationOutputArgs, opts ...pulumi.InvokeOption) LookupVpnServerConfigurationResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupVpnServerConfigurationResultOutput, error) { args := v.(LookupVpnServerConfigurationArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getVpnServerConfiguration:getVpnServerConfiguration", args, LookupVpnServerConfigurationResultOutput{}, options).(LookupVpnServerConfigurationResultOutput), nil }).(LookupVpnServerConfigurationResultOutput) } // A collection of arguments for invoking getVpnServerConfiguration. type LookupVpnServerConfigurationOutputArgs struct { // The Name of the VPN Server Configuration. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group where the VPN Server Configuration exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupVpnServerConfigurationOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupVpnServerConfigurationArgs)(nil)).Elem() } // A collection of values returned by getVpnServerConfiguration. type LookupVpnServerConfigurationResultOutput struct{ *pulumi.OutputState } func (LookupVpnServerConfigurationResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupVpnServerConfigurationResult)(nil)).Elem() } func (o LookupVpnServerConfigurationResultOutput) ToLookupVpnServerConfigurationResultOutput() LookupVpnServerConfigurationResultOutput { return o } func (o LookupVpnServerConfigurationResultOutput) ToLookupVpnServerConfigurationResultOutputWithContext(ctx context.Context) LookupVpnServerConfigurationResultOutput { return o } // A `azureActiveDirectoryAuthentication` block as defined below. func (o LookupVpnServerConfigurationResultOutput) AzureActiveDirectoryAuthentications() GetVpnServerConfigurationAzureActiveDirectoryAuthenticationArrayOutput { return o.ApplyT(func(v LookupVpnServerConfigurationResult) []GetVpnServerConfigurationAzureActiveDirectoryAuthentication { return v.AzureActiveDirectoryAuthentications }).(GetVpnServerConfigurationAzureActiveDirectoryAuthenticationArrayOutput) } // One or more `clientRevokedCertificate` blocks as defined below. func (o LookupVpnServerConfigurationResultOutput) ClientRevokedCertificates() GetVpnServerConfigurationClientRevokedCertificateArrayOutput { return o.ApplyT(func(v LookupVpnServerConfigurationResult) []GetVpnServerConfigurationClientRevokedCertificate { return v.ClientRevokedCertificates }).(GetVpnServerConfigurationClientRevokedCertificateArrayOutput) } // One or more `clientRootCertificate` blocks as defined below. func (o LookupVpnServerConfigurationResultOutput) ClientRootCertificates() GetVpnServerConfigurationClientRootCertificateArrayOutput { return o.ApplyT(func(v LookupVpnServerConfigurationResult) []GetVpnServerConfigurationClientRootCertificate { return v.ClientRootCertificates }).(GetVpnServerConfigurationClientRootCertificateArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupVpnServerConfigurationResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupVpnServerConfigurationResult) string { return v.Id }).(pulumi.StringOutput) } // The `bgpSettings` block as defined below. func (o LookupVpnServerConfigurationResultOutput) IpsecPolicies() GetVpnServerConfigurationIpsecPolicyArrayOutput { return o.ApplyT(func(v LookupVpnServerConfigurationResult) []GetVpnServerConfigurationIpsecPolicy { return v.IpsecPolicies }).(GetVpnServerConfigurationIpsecPolicyArrayOutput) } // The Azure Region where the VPN Server Configuration exists. func (o LookupVpnServerConfigurationResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupVpnServerConfigurationResult) string { return v.Location }).(pulumi.StringOutput) } // The name used to uniquely identify this certificate. func (o LookupVpnServerConfigurationResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupVpnServerConfigurationResult) string { return v.Name }).(pulumi.StringOutput) } // A `radius` block as defined below. func (o LookupVpnServerConfigurationResultOutput) Radii() GetVpnServerConfigurationRadiusArrayOutput { return o.ApplyT(func(v LookupVpnServerConfigurationResult) []GetVpnServerConfigurationRadius { return v.Radii }).(GetVpnServerConfigurationRadiusArrayOutput) } func (o LookupVpnServerConfigurationResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupVpnServerConfigurationResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the VPN Server Configuration. func (o LookupVpnServerConfigurationResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupVpnServerConfigurationResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The list of Authentication Types applicable for the VPN Server Configuration. func (o LookupVpnServerConfigurationResultOutput) VpnAuthenticationTypes() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupVpnServerConfigurationResult) []string { return v.VpnAuthenticationTypes }).(pulumi.StringArrayOutput) } // The list of VPN Protocols to use for the VPN Server Configuration. func (o LookupVpnServerConfigurationResultOutput) VpnProtocols() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupVpnServerConfigurationResult) []string { return v.VpnProtocols }).(pulumi.StringArrayOutput) } func init() { pulumi.RegisterOutputType(LookupVpnServerConfigurationResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/networkManagerVerifierWorkspace.go
sdk/go/azure/network/networkManagerVerifierWorkspace.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Network Manager Verifier Workspace. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // exampleNetworkManager, err := network.NewNetworkManager(ctx, "example", &network.NetworkManagerArgs{ // Name: pulumi.String("example-nm"), // ResourceGroupName: example.Name, // Location: example.Location, // Scope: &network.NetworkManagerScopeArgs{ // SubscriptionIds: pulumi.StringArray{ // pulumi.String(current.Id), // }, // }, // ScopeAccesses: pulumi.StringArray{ // pulumi.String("Connectivity"), // }, // }) // if err != nil { // return err // } // _, err = network.NewNetworkManagerVerifierWorkspace(ctx, "example", &network.NetworkManagerVerifierWorkspaceArgs{ // Name: pulumi.String("example"), // NetworkManagerId: exampleNetworkManager.ID(), // Location: example.Location, // Description: pulumi.String("This is an example verifier workspace"), // Tags: pulumi.StringMap{ // "foo": pulumi.String("bar"), // "env": pulumi.String("example"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Network Manager Verifier Workspaces can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/networkManagerVerifierWorkspace:NetworkManagerVerifierWorkspace example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/manager1/verifierWorkspaces/workspace1 // ``` type NetworkManagerVerifierWorkspace struct { pulumi.CustomResourceState // The Description of the Network Manager Verifier Workspace. Description pulumi.StringPtrOutput `pulumi:"description"` // The Azure Region where the Network Manager Verifier Workspace should exist. Changing this forces a new Network Manager Verifier Workspace to be created. Location pulumi.StringOutput `pulumi:"location"` // The name which should be used for this Network Manager Verifier Workspace. Changing this forces a new Network Manager Verifier Workspace to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the Network Manager. Changing this forces a new Network Manager Verifier Workspace to be created. NetworkManagerId pulumi.StringOutput `pulumi:"networkManagerId"` // A mapping of tags which should be assigned to the Network Manager Verifier Workspace. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewNetworkManagerVerifierWorkspace registers a new resource with the given unique name, arguments, and options. func NewNetworkManagerVerifierWorkspace(ctx *pulumi.Context, name string, args *NetworkManagerVerifierWorkspaceArgs, opts ...pulumi.ResourceOption) (*NetworkManagerVerifierWorkspace, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.NetworkManagerId == nil { return nil, errors.New("invalid value for required argument 'NetworkManagerId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkManagerVerifierWorkspace err := ctx.RegisterResource("azure:network/networkManagerVerifierWorkspace:NetworkManagerVerifierWorkspace", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkManagerVerifierWorkspace gets an existing NetworkManagerVerifierWorkspace resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetNetworkManagerVerifierWorkspace(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkManagerVerifierWorkspaceState, opts ...pulumi.ResourceOption) (*NetworkManagerVerifierWorkspace, error) { var resource NetworkManagerVerifierWorkspace err := ctx.ReadResource("azure:network/networkManagerVerifierWorkspace:NetworkManagerVerifierWorkspace", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkManagerVerifierWorkspace resources. type networkManagerVerifierWorkspaceState struct { // The Description of the Network Manager Verifier Workspace. Description *string `pulumi:"description"` // The Azure Region where the Network Manager Verifier Workspace should exist. Changing this forces a new Network Manager Verifier Workspace to be created. Location *string `pulumi:"location"` // The name which should be used for this Network Manager Verifier Workspace. Changing this forces a new Network Manager Verifier Workspace to be created. Name *string `pulumi:"name"` // The ID of the Network Manager. Changing this forces a new Network Manager Verifier Workspace to be created. NetworkManagerId *string `pulumi:"networkManagerId"` // A mapping of tags which should be assigned to the Network Manager Verifier Workspace. Tags map[string]string `pulumi:"tags"` } type NetworkManagerVerifierWorkspaceState struct { // The Description of the Network Manager Verifier Workspace. Description pulumi.StringPtrInput // The Azure Region where the Network Manager Verifier Workspace should exist. Changing this forces a new Network Manager Verifier Workspace to be created. Location pulumi.StringPtrInput // The name which should be used for this Network Manager Verifier Workspace. Changing this forces a new Network Manager Verifier Workspace to be created. Name pulumi.StringPtrInput // The ID of the Network Manager. Changing this forces a new Network Manager Verifier Workspace to be created. NetworkManagerId pulumi.StringPtrInput // A mapping of tags which should be assigned to the Network Manager Verifier Workspace. Tags pulumi.StringMapInput } func (NetworkManagerVerifierWorkspaceState) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerVerifierWorkspaceState)(nil)).Elem() } type networkManagerVerifierWorkspaceArgs struct { // The Description of the Network Manager Verifier Workspace. Description *string `pulumi:"description"` // The Azure Region where the Network Manager Verifier Workspace should exist. Changing this forces a new Network Manager Verifier Workspace to be created. Location *string `pulumi:"location"` // The name which should be used for this Network Manager Verifier Workspace. Changing this forces a new Network Manager Verifier Workspace to be created. Name *string `pulumi:"name"` // The ID of the Network Manager. Changing this forces a new Network Manager Verifier Workspace to be created. NetworkManagerId string `pulumi:"networkManagerId"` // A mapping of tags which should be assigned to the Network Manager Verifier Workspace. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a NetworkManagerVerifierWorkspace resource. type NetworkManagerVerifierWorkspaceArgs struct { // The Description of the Network Manager Verifier Workspace. Description pulumi.StringPtrInput // The Azure Region where the Network Manager Verifier Workspace should exist. Changing this forces a new Network Manager Verifier Workspace to be created. Location pulumi.StringPtrInput // The name which should be used for this Network Manager Verifier Workspace. Changing this forces a new Network Manager Verifier Workspace to be created. Name pulumi.StringPtrInput // The ID of the Network Manager. Changing this forces a new Network Manager Verifier Workspace to be created. NetworkManagerId pulumi.StringInput // A mapping of tags which should be assigned to the Network Manager Verifier Workspace. Tags pulumi.StringMapInput } func (NetworkManagerVerifierWorkspaceArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerVerifierWorkspaceArgs)(nil)).Elem() } type NetworkManagerVerifierWorkspaceInput interface { pulumi.Input ToNetworkManagerVerifierWorkspaceOutput() NetworkManagerVerifierWorkspaceOutput ToNetworkManagerVerifierWorkspaceOutputWithContext(ctx context.Context) NetworkManagerVerifierWorkspaceOutput } func (*NetworkManagerVerifierWorkspace) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerVerifierWorkspace)(nil)).Elem() } func (i *NetworkManagerVerifierWorkspace) ToNetworkManagerVerifierWorkspaceOutput() NetworkManagerVerifierWorkspaceOutput { return i.ToNetworkManagerVerifierWorkspaceOutputWithContext(context.Background()) } func (i *NetworkManagerVerifierWorkspace) ToNetworkManagerVerifierWorkspaceOutputWithContext(ctx context.Context) NetworkManagerVerifierWorkspaceOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerVerifierWorkspaceOutput) } // NetworkManagerVerifierWorkspaceArrayInput is an input type that accepts NetworkManagerVerifierWorkspaceArray and NetworkManagerVerifierWorkspaceArrayOutput values. // You can construct a concrete instance of `NetworkManagerVerifierWorkspaceArrayInput` via: // // NetworkManagerVerifierWorkspaceArray{ NetworkManagerVerifierWorkspaceArgs{...} } type NetworkManagerVerifierWorkspaceArrayInput interface { pulumi.Input ToNetworkManagerVerifierWorkspaceArrayOutput() NetworkManagerVerifierWorkspaceArrayOutput ToNetworkManagerVerifierWorkspaceArrayOutputWithContext(context.Context) NetworkManagerVerifierWorkspaceArrayOutput } type NetworkManagerVerifierWorkspaceArray []NetworkManagerVerifierWorkspaceInput func (NetworkManagerVerifierWorkspaceArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerVerifierWorkspace)(nil)).Elem() } func (i NetworkManagerVerifierWorkspaceArray) ToNetworkManagerVerifierWorkspaceArrayOutput() NetworkManagerVerifierWorkspaceArrayOutput { return i.ToNetworkManagerVerifierWorkspaceArrayOutputWithContext(context.Background()) } func (i NetworkManagerVerifierWorkspaceArray) ToNetworkManagerVerifierWorkspaceArrayOutputWithContext(ctx context.Context) NetworkManagerVerifierWorkspaceArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerVerifierWorkspaceArrayOutput) } // NetworkManagerVerifierWorkspaceMapInput is an input type that accepts NetworkManagerVerifierWorkspaceMap and NetworkManagerVerifierWorkspaceMapOutput values. // You can construct a concrete instance of `NetworkManagerVerifierWorkspaceMapInput` via: // // NetworkManagerVerifierWorkspaceMap{ "key": NetworkManagerVerifierWorkspaceArgs{...} } type NetworkManagerVerifierWorkspaceMapInput interface { pulumi.Input ToNetworkManagerVerifierWorkspaceMapOutput() NetworkManagerVerifierWorkspaceMapOutput ToNetworkManagerVerifierWorkspaceMapOutputWithContext(context.Context) NetworkManagerVerifierWorkspaceMapOutput } type NetworkManagerVerifierWorkspaceMap map[string]NetworkManagerVerifierWorkspaceInput func (NetworkManagerVerifierWorkspaceMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerVerifierWorkspace)(nil)).Elem() } func (i NetworkManagerVerifierWorkspaceMap) ToNetworkManagerVerifierWorkspaceMapOutput() NetworkManagerVerifierWorkspaceMapOutput { return i.ToNetworkManagerVerifierWorkspaceMapOutputWithContext(context.Background()) } func (i NetworkManagerVerifierWorkspaceMap) ToNetworkManagerVerifierWorkspaceMapOutputWithContext(ctx context.Context) NetworkManagerVerifierWorkspaceMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerVerifierWorkspaceMapOutput) } type NetworkManagerVerifierWorkspaceOutput struct{ *pulumi.OutputState } func (NetworkManagerVerifierWorkspaceOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerVerifierWorkspace)(nil)).Elem() } func (o NetworkManagerVerifierWorkspaceOutput) ToNetworkManagerVerifierWorkspaceOutput() NetworkManagerVerifierWorkspaceOutput { return o } func (o NetworkManagerVerifierWorkspaceOutput) ToNetworkManagerVerifierWorkspaceOutputWithContext(ctx context.Context) NetworkManagerVerifierWorkspaceOutput { return o } // The Description of the Network Manager Verifier Workspace. func (o NetworkManagerVerifierWorkspaceOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkManagerVerifierWorkspace) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // The Azure Region where the Network Manager Verifier Workspace should exist. Changing this forces a new Network Manager Verifier Workspace to be created. func (o NetworkManagerVerifierWorkspaceOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerVerifierWorkspace) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name which should be used for this Network Manager Verifier Workspace. Changing this forces a new Network Manager Verifier Workspace to be created. func (o NetworkManagerVerifierWorkspaceOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerVerifierWorkspace) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the Network Manager. Changing this forces a new Network Manager Verifier Workspace to be created. func (o NetworkManagerVerifierWorkspaceOutput) NetworkManagerId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerVerifierWorkspace) pulumi.StringOutput { return v.NetworkManagerId }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Network Manager Verifier Workspace. func (o NetworkManagerVerifierWorkspaceOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *NetworkManagerVerifierWorkspace) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type NetworkManagerVerifierWorkspaceArrayOutput struct{ *pulumi.OutputState } func (NetworkManagerVerifierWorkspaceArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerVerifierWorkspace)(nil)).Elem() } func (o NetworkManagerVerifierWorkspaceArrayOutput) ToNetworkManagerVerifierWorkspaceArrayOutput() NetworkManagerVerifierWorkspaceArrayOutput { return o } func (o NetworkManagerVerifierWorkspaceArrayOutput) ToNetworkManagerVerifierWorkspaceArrayOutputWithContext(ctx context.Context) NetworkManagerVerifierWorkspaceArrayOutput { return o } func (o NetworkManagerVerifierWorkspaceArrayOutput) Index(i pulumi.IntInput) NetworkManagerVerifierWorkspaceOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkManagerVerifierWorkspace { return vs[0].([]*NetworkManagerVerifierWorkspace)[vs[1].(int)] }).(NetworkManagerVerifierWorkspaceOutput) } type NetworkManagerVerifierWorkspaceMapOutput struct{ *pulumi.OutputState } func (NetworkManagerVerifierWorkspaceMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerVerifierWorkspace)(nil)).Elem() } func (o NetworkManagerVerifierWorkspaceMapOutput) ToNetworkManagerVerifierWorkspaceMapOutput() NetworkManagerVerifierWorkspaceMapOutput { return o } func (o NetworkManagerVerifierWorkspaceMapOutput) ToNetworkManagerVerifierWorkspaceMapOutputWithContext(ctx context.Context) NetworkManagerVerifierWorkspaceMapOutput { return o } func (o NetworkManagerVerifierWorkspaceMapOutput) MapIndex(k pulumi.StringInput) NetworkManagerVerifierWorkspaceOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkManagerVerifierWorkspace { return vs[0].(map[string]*NetworkManagerVerifierWorkspace)[vs[1].(string)] }).(NetworkManagerVerifierWorkspaceOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerVerifierWorkspaceInput)(nil)).Elem(), &NetworkManagerVerifierWorkspace{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerVerifierWorkspaceArrayInput)(nil)).Elem(), NetworkManagerVerifierWorkspaceArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerVerifierWorkspaceMapInput)(nil)).Elem(), NetworkManagerVerifierWorkspaceMap{}) pulumi.RegisterOutputType(NetworkManagerVerifierWorkspaceOutput{}) pulumi.RegisterOutputType(NetworkManagerVerifierWorkspaceArrayOutput{}) pulumi.RegisterOutputType(NetworkManagerVerifierWorkspaceMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/virtualNetworkGatewayNatRule.go
sdk/go/azure/network/virtualNetworkGatewayNatRule.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Virtual Network Gateway Nat Rule. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-vnet"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("GatewaySubnet"), // ResourceGroupName: exampleResourceGroup.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.1.0/24"), // }, // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("example-pip"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // AllocationMethod: pulumi.String("Dynamic"), // }) // if err != nil { // return err // } // exampleVirtualNetworkGateway, err := network.NewVirtualNetworkGateway(ctx, "example", &network.VirtualNetworkGatewayArgs{ // Name: pulumi.String("example-vnetgw"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // Type: pulumi.String("Vpn"), // VpnType: pulumi.String("RouteBased"), // Sku: pulumi.String("Basic"), // IpConfigurations: network.VirtualNetworkGatewayIpConfigurationArray{ // &network.VirtualNetworkGatewayIpConfigurationArgs{ // PublicIpAddressId: examplePublicIp.ID(), // PrivateIpAddressAllocation: pulumi.String("Dynamic"), // SubnetId: exampleSubnet.ID(), // }, // }, // }) // if err != nil { // return err // } // example := network.LookupVirtualNetworkGatewayOutput(ctx, network.GetVirtualNetworkGatewayOutputArgs{ // Name: exampleVirtualNetworkGateway.Name, // ResourceGroupName: exampleVirtualNetworkGateway.ResourceGroupName, // }, nil) // _, err = network.NewVirtualNetworkGatewayNatRule(ctx, "example", &network.VirtualNetworkGatewayNatRuleArgs{ // Name: pulumi.String("example-vnetgwnatrule"), // ResourceGroupName: exampleResourceGroup.Name, // VirtualNetworkGatewayId: pulumi.String(example.ApplyT(func(example network.GetVirtualNetworkGatewayResult) (*string, error) { // return &example.Id, nil // }).(pulumi.StringPtrOutput)), // Mode: pulumi.String("EgressSnat"), // Type: pulumi.String("Dynamic"), // IpConfigurationId: pulumi.String(example.ApplyT(func(example network.GetVirtualNetworkGatewayResult) (*string, error) { // return &example.IpConfigurations[0].Id, nil // }).(pulumi.StringPtrOutput)), // ExternalMappings: network.VirtualNetworkGatewayNatRuleExternalMappingArray{ // &network.VirtualNetworkGatewayNatRuleExternalMappingArgs{ // AddressSpace: pulumi.String("10.2.0.0/26"), // PortRange: pulumi.String("200"), // }, // }, // InternalMappings: network.VirtualNetworkGatewayNatRuleInternalMappingArray{ // &network.VirtualNetworkGatewayNatRuleInternalMappingArgs{ // AddressSpace: pulumi.String("10.4.0.0/26"), // PortRange: pulumi.String("400"), // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Virtual Network Gateway Nat Rules can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/virtualNetworkGatewayNatRule:VirtualNetworkGatewayNatRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.Network/virtualNetworkGateways/gw1/natRules/rule1 // ``` type VirtualNetworkGatewayNatRule struct { pulumi.CustomResourceState // One or more `externalMapping` blocks as documented below. ExternalMappings VirtualNetworkGatewayNatRuleExternalMappingArrayOutput `pulumi:"externalMappings"` // One or more `internalMapping` blocks as documented below. InternalMappings VirtualNetworkGatewayNatRuleInternalMappingArrayOutput `pulumi:"internalMappings"` // The ID of the IP Configuration this Virtual Network Gateway Nat Rule applies to. IpConfigurationId pulumi.StringPtrOutput `pulumi:"ipConfigurationId"` // The source Nat direction of the Virtual Network Gateway Nat. Possible values are `EgressSnat` and `IngressSnat`. Defaults to `EgressSnat`. Changing this forces a new resource to be created. Mode pulumi.StringPtrOutput `pulumi:"mode"` // The name which should be used for this Virtual Network Gateway Nat Rule. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The Name of the Resource Group in which this Virtual Network Gateway Nat Rule should be created. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The type of the Virtual Network Gateway Nat Rule. Possible values are `Dynamic` and `Static`. Defaults to `Static`. Changing this forces a new resource to be created. Type pulumi.StringPtrOutput `pulumi:"type"` // The ID of the Virtual Network Gateway that this Virtual Network Gateway Nat Rule belongs to. Changing this forces a new resource to be created. VirtualNetworkGatewayId pulumi.StringOutput `pulumi:"virtualNetworkGatewayId"` } // NewVirtualNetworkGatewayNatRule registers a new resource with the given unique name, arguments, and options. func NewVirtualNetworkGatewayNatRule(ctx *pulumi.Context, name string, args *VirtualNetworkGatewayNatRuleArgs, opts ...pulumi.ResourceOption) (*VirtualNetworkGatewayNatRule, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ExternalMappings == nil { return nil, errors.New("invalid value for required argument 'ExternalMappings'") } if args.InternalMappings == nil { return nil, errors.New("invalid value for required argument 'InternalMappings'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.VirtualNetworkGatewayId == nil { return nil, errors.New("invalid value for required argument 'VirtualNetworkGatewayId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource VirtualNetworkGatewayNatRule err := ctx.RegisterResource("azure:network/virtualNetworkGatewayNatRule:VirtualNetworkGatewayNatRule", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVirtualNetworkGatewayNatRule gets an existing VirtualNetworkGatewayNatRule resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetVirtualNetworkGatewayNatRule(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VirtualNetworkGatewayNatRuleState, opts ...pulumi.ResourceOption) (*VirtualNetworkGatewayNatRule, error) { var resource VirtualNetworkGatewayNatRule err := ctx.ReadResource("azure:network/virtualNetworkGatewayNatRule:VirtualNetworkGatewayNatRule", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VirtualNetworkGatewayNatRule resources. type virtualNetworkGatewayNatRuleState struct { // One or more `externalMapping` blocks as documented below. ExternalMappings []VirtualNetworkGatewayNatRuleExternalMapping `pulumi:"externalMappings"` // One or more `internalMapping` blocks as documented below. InternalMappings []VirtualNetworkGatewayNatRuleInternalMapping `pulumi:"internalMappings"` // The ID of the IP Configuration this Virtual Network Gateway Nat Rule applies to. IpConfigurationId *string `pulumi:"ipConfigurationId"` // The source Nat direction of the Virtual Network Gateway Nat. Possible values are `EgressSnat` and `IngressSnat`. Defaults to `EgressSnat`. Changing this forces a new resource to be created. Mode *string `pulumi:"mode"` // The name which should be used for this Virtual Network Gateway Nat Rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The Name of the Resource Group in which this Virtual Network Gateway Nat Rule should be created. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The type of the Virtual Network Gateway Nat Rule. Possible values are `Dynamic` and `Static`. Defaults to `Static`. Changing this forces a new resource to be created. Type *string `pulumi:"type"` // The ID of the Virtual Network Gateway that this Virtual Network Gateway Nat Rule belongs to. Changing this forces a new resource to be created. VirtualNetworkGatewayId *string `pulumi:"virtualNetworkGatewayId"` } type VirtualNetworkGatewayNatRuleState struct { // One or more `externalMapping` blocks as documented below. ExternalMappings VirtualNetworkGatewayNatRuleExternalMappingArrayInput // One or more `internalMapping` blocks as documented below. InternalMappings VirtualNetworkGatewayNatRuleInternalMappingArrayInput // The ID of the IP Configuration this Virtual Network Gateway Nat Rule applies to. IpConfigurationId pulumi.StringPtrInput // The source Nat direction of the Virtual Network Gateway Nat. Possible values are `EgressSnat` and `IngressSnat`. Defaults to `EgressSnat`. Changing this forces a new resource to be created. Mode pulumi.StringPtrInput // The name which should be used for this Virtual Network Gateway Nat Rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The Name of the Resource Group in which this Virtual Network Gateway Nat Rule should be created. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The type of the Virtual Network Gateway Nat Rule. Possible values are `Dynamic` and `Static`. Defaults to `Static`. Changing this forces a new resource to be created. Type pulumi.StringPtrInput // The ID of the Virtual Network Gateway that this Virtual Network Gateway Nat Rule belongs to. Changing this forces a new resource to be created. VirtualNetworkGatewayId pulumi.StringPtrInput } func (VirtualNetworkGatewayNatRuleState) ElementType() reflect.Type { return reflect.TypeOf((*virtualNetworkGatewayNatRuleState)(nil)).Elem() } type virtualNetworkGatewayNatRuleArgs struct { // One or more `externalMapping` blocks as documented below. ExternalMappings []VirtualNetworkGatewayNatRuleExternalMapping `pulumi:"externalMappings"` // One or more `internalMapping` blocks as documented below. InternalMappings []VirtualNetworkGatewayNatRuleInternalMapping `pulumi:"internalMappings"` // The ID of the IP Configuration this Virtual Network Gateway Nat Rule applies to. IpConfigurationId *string `pulumi:"ipConfigurationId"` // The source Nat direction of the Virtual Network Gateway Nat. Possible values are `EgressSnat` and `IngressSnat`. Defaults to `EgressSnat`. Changing this forces a new resource to be created. Mode *string `pulumi:"mode"` // The name which should be used for this Virtual Network Gateway Nat Rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The Name of the Resource Group in which this Virtual Network Gateway Nat Rule should be created. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The type of the Virtual Network Gateway Nat Rule. Possible values are `Dynamic` and `Static`. Defaults to `Static`. Changing this forces a new resource to be created. Type *string `pulumi:"type"` // The ID of the Virtual Network Gateway that this Virtual Network Gateway Nat Rule belongs to. Changing this forces a new resource to be created. VirtualNetworkGatewayId string `pulumi:"virtualNetworkGatewayId"` } // The set of arguments for constructing a VirtualNetworkGatewayNatRule resource. type VirtualNetworkGatewayNatRuleArgs struct { // One or more `externalMapping` blocks as documented below. ExternalMappings VirtualNetworkGatewayNatRuleExternalMappingArrayInput // One or more `internalMapping` blocks as documented below. InternalMappings VirtualNetworkGatewayNatRuleInternalMappingArrayInput // The ID of the IP Configuration this Virtual Network Gateway Nat Rule applies to. IpConfigurationId pulumi.StringPtrInput // The source Nat direction of the Virtual Network Gateway Nat. Possible values are `EgressSnat` and `IngressSnat`. Defaults to `EgressSnat`. Changing this forces a new resource to be created. Mode pulumi.StringPtrInput // The name which should be used for this Virtual Network Gateway Nat Rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The Name of the Resource Group in which this Virtual Network Gateway Nat Rule should be created. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The type of the Virtual Network Gateway Nat Rule. Possible values are `Dynamic` and `Static`. Defaults to `Static`. Changing this forces a new resource to be created. Type pulumi.StringPtrInput // The ID of the Virtual Network Gateway that this Virtual Network Gateway Nat Rule belongs to. Changing this forces a new resource to be created. VirtualNetworkGatewayId pulumi.StringInput } func (VirtualNetworkGatewayNatRuleArgs) ElementType() reflect.Type { return reflect.TypeOf((*virtualNetworkGatewayNatRuleArgs)(nil)).Elem() } type VirtualNetworkGatewayNatRuleInput interface { pulumi.Input ToVirtualNetworkGatewayNatRuleOutput() VirtualNetworkGatewayNatRuleOutput ToVirtualNetworkGatewayNatRuleOutputWithContext(ctx context.Context) VirtualNetworkGatewayNatRuleOutput } func (*VirtualNetworkGatewayNatRule) ElementType() reflect.Type { return reflect.TypeOf((**VirtualNetworkGatewayNatRule)(nil)).Elem() } func (i *VirtualNetworkGatewayNatRule) ToVirtualNetworkGatewayNatRuleOutput() VirtualNetworkGatewayNatRuleOutput { return i.ToVirtualNetworkGatewayNatRuleOutputWithContext(context.Background()) } func (i *VirtualNetworkGatewayNatRule) ToVirtualNetworkGatewayNatRuleOutputWithContext(ctx context.Context) VirtualNetworkGatewayNatRuleOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualNetworkGatewayNatRuleOutput) } // VirtualNetworkGatewayNatRuleArrayInput is an input type that accepts VirtualNetworkGatewayNatRuleArray and VirtualNetworkGatewayNatRuleArrayOutput values. // You can construct a concrete instance of `VirtualNetworkGatewayNatRuleArrayInput` via: // // VirtualNetworkGatewayNatRuleArray{ VirtualNetworkGatewayNatRuleArgs{...} } type VirtualNetworkGatewayNatRuleArrayInput interface { pulumi.Input ToVirtualNetworkGatewayNatRuleArrayOutput() VirtualNetworkGatewayNatRuleArrayOutput ToVirtualNetworkGatewayNatRuleArrayOutputWithContext(context.Context) VirtualNetworkGatewayNatRuleArrayOutput } type VirtualNetworkGatewayNatRuleArray []VirtualNetworkGatewayNatRuleInput func (VirtualNetworkGatewayNatRuleArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualNetworkGatewayNatRule)(nil)).Elem() } func (i VirtualNetworkGatewayNatRuleArray) ToVirtualNetworkGatewayNatRuleArrayOutput() VirtualNetworkGatewayNatRuleArrayOutput { return i.ToVirtualNetworkGatewayNatRuleArrayOutputWithContext(context.Background()) } func (i VirtualNetworkGatewayNatRuleArray) ToVirtualNetworkGatewayNatRuleArrayOutputWithContext(ctx context.Context) VirtualNetworkGatewayNatRuleArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualNetworkGatewayNatRuleArrayOutput) } // VirtualNetworkGatewayNatRuleMapInput is an input type that accepts VirtualNetworkGatewayNatRuleMap and VirtualNetworkGatewayNatRuleMapOutput values. // You can construct a concrete instance of `VirtualNetworkGatewayNatRuleMapInput` via: // // VirtualNetworkGatewayNatRuleMap{ "key": VirtualNetworkGatewayNatRuleArgs{...} } type VirtualNetworkGatewayNatRuleMapInput interface { pulumi.Input ToVirtualNetworkGatewayNatRuleMapOutput() VirtualNetworkGatewayNatRuleMapOutput ToVirtualNetworkGatewayNatRuleMapOutputWithContext(context.Context) VirtualNetworkGatewayNatRuleMapOutput } type VirtualNetworkGatewayNatRuleMap map[string]VirtualNetworkGatewayNatRuleInput func (VirtualNetworkGatewayNatRuleMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualNetworkGatewayNatRule)(nil)).Elem() } func (i VirtualNetworkGatewayNatRuleMap) ToVirtualNetworkGatewayNatRuleMapOutput() VirtualNetworkGatewayNatRuleMapOutput { return i.ToVirtualNetworkGatewayNatRuleMapOutputWithContext(context.Background()) } func (i VirtualNetworkGatewayNatRuleMap) ToVirtualNetworkGatewayNatRuleMapOutputWithContext(ctx context.Context) VirtualNetworkGatewayNatRuleMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualNetworkGatewayNatRuleMapOutput) } type VirtualNetworkGatewayNatRuleOutput struct{ *pulumi.OutputState } func (VirtualNetworkGatewayNatRuleOutput) ElementType() reflect.Type { return reflect.TypeOf((**VirtualNetworkGatewayNatRule)(nil)).Elem() } func (o VirtualNetworkGatewayNatRuleOutput) ToVirtualNetworkGatewayNatRuleOutput() VirtualNetworkGatewayNatRuleOutput { return o } func (o VirtualNetworkGatewayNatRuleOutput) ToVirtualNetworkGatewayNatRuleOutputWithContext(ctx context.Context) VirtualNetworkGatewayNatRuleOutput { return o } // One or more `externalMapping` blocks as documented below. func (o VirtualNetworkGatewayNatRuleOutput) ExternalMappings() VirtualNetworkGatewayNatRuleExternalMappingArrayOutput { return o.ApplyT(func(v *VirtualNetworkGatewayNatRule) VirtualNetworkGatewayNatRuleExternalMappingArrayOutput { return v.ExternalMappings }).(VirtualNetworkGatewayNatRuleExternalMappingArrayOutput) } // One or more `internalMapping` blocks as documented below. func (o VirtualNetworkGatewayNatRuleOutput) InternalMappings() VirtualNetworkGatewayNatRuleInternalMappingArrayOutput { return o.ApplyT(func(v *VirtualNetworkGatewayNatRule) VirtualNetworkGatewayNatRuleInternalMappingArrayOutput { return v.InternalMappings }).(VirtualNetworkGatewayNatRuleInternalMappingArrayOutput) } // The ID of the IP Configuration this Virtual Network Gateway Nat Rule applies to. func (o VirtualNetworkGatewayNatRuleOutput) IpConfigurationId() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualNetworkGatewayNatRule) pulumi.StringPtrOutput { return v.IpConfigurationId }).(pulumi.StringPtrOutput) } // The source Nat direction of the Virtual Network Gateway Nat. Possible values are `EgressSnat` and `IngressSnat`. Defaults to `EgressSnat`. Changing this forces a new resource to be created. func (o VirtualNetworkGatewayNatRuleOutput) Mode() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualNetworkGatewayNatRule) pulumi.StringPtrOutput { return v.Mode }).(pulumi.StringPtrOutput) } // The name which should be used for this Virtual Network Gateway Nat Rule. Changing this forces a new resource to be created. func (o VirtualNetworkGatewayNatRuleOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *VirtualNetworkGatewayNatRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The Name of the Resource Group in which this Virtual Network Gateway Nat Rule should be created. Changing this forces a new resource to be created. func (o VirtualNetworkGatewayNatRuleOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *VirtualNetworkGatewayNatRule) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The type of the Virtual Network Gateway Nat Rule. Possible values are `Dynamic` and `Static`. Defaults to `Static`. Changing this forces a new resource to be created. func (o VirtualNetworkGatewayNatRuleOutput) Type() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualNetworkGatewayNatRule) pulumi.StringPtrOutput { return v.Type }).(pulumi.StringPtrOutput) } // The ID of the Virtual Network Gateway that this Virtual Network Gateway Nat Rule belongs to. Changing this forces a new resource to be created. func (o VirtualNetworkGatewayNatRuleOutput) VirtualNetworkGatewayId() pulumi.StringOutput { return o.ApplyT(func(v *VirtualNetworkGatewayNatRule) pulumi.StringOutput { return v.VirtualNetworkGatewayId }).(pulumi.StringOutput) } type VirtualNetworkGatewayNatRuleArrayOutput struct{ *pulumi.OutputState } func (VirtualNetworkGatewayNatRuleArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualNetworkGatewayNatRule)(nil)).Elem() } func (o VirtualNetworkGatewayNatRuleArrayOutput) ToVirtualNetworkGatewayNatRuleArrayOutput() VirtualNetworkGatewayNatRuleArrayOutput { return o } func (o VirtualNetworkGatewayNatRuleArrayOutput) ToVirtualNetworkGatewayNatRuleArrayOutputWithContext(ctx context.Context) VirtualNetworkGatewayNatRuleArrayOutput { return o } func (o VirtualNetworkGatewayNatRuleArrayOutput) Index(i pulumi.IntInput) VirtualNetworkGatewayNatRuleOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VirtualNetworkGatewayNatRule { return vs[0].([]*VirtualNetworkGatewayNatRule)[vs[1].(int)] }).(VirtualNetworkGatewayNatRuleOutput) } type VirtualNetworkGatewayNatRuleMapOutput struct{ *pulumi.OutputState } func (VirtualNetworkGatewayNatRuleMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualNetworkGatewayNatRule)(nil)).Elem() } func (o VirtualNetworkGatewayNatRuleMapOutput) ToVirtualNetworkGatewayNatRuleMapOutput() VirtualNetworkGatewayNatRuleMapOutput { return o } func (o VirtualNetworkGatewayNatRuleMapOutput) ToVirtualNetworkGatewayNatRuleMapOutputWithContext(ctx context.Context) VirtualNetworkGatewayNatRuleMapOutput { return o } func (o VirtualNetworkGatewayNatRuleMapOutput) MapIndex(k pulumi.StringInput) VirtualNetworkGatewayNatRuleOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VirtualNetworkGatewayNatRule { return vs[0].(map[string]*VirtualNetworkGatewayNatRule)[vs[1].(string)] }).(VirtualNetworkGatewayNatRuleOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VirtualNetworkGatewayNatRuleInput)(nil)).Elem(), &VirtualNetworkGatewayNatRule{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualNetworkGatewayNatRuleArrayInput)(nil)).Elem(), VirtualNetworkGatewayNatRuleArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualNetworkGatewayNatRuleMapInput)(nil)).Elem(), VirtualNetworkGatewayNatRuleMap{}) pulumi.RegisterOutputType(VirtualNetworkGatewayNatRuleOutput{}) pulumi.RegisterOutputType(VirtualNetworkGatewayNatRuleArrayOutput{}) pulumi.RegisterOutputType(VirtualNetworkGatewayNatRuleMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/networkInterfaceBackendAddressPoolAssociation.go
sdk/go/azure/network/networkInterfaceBackendAddressPoolAssociation.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages the association between a Network Interface and a Load Balancer's Backend Address Pool. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/lb" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-network"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("internal"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("example-pip"), // Location: example.Location, // ResourceGroupName: example.Name, // AllocationMethod: pulumi.String("Static"), // }) // if err != nil { // return err // } // exampleLoadBalancer, err := lb.NewLoadBalancer(ctx, "example", &lb.LoadBalancerArgs{ // Name: pulumi.String("example-lb"), // Location: example.Location, // ResourceGroupName: example.Name, // FrontendIpConfigurations: lb.LoadBalancerFrontendIpConfigurationArray{ // &lb.LoadBalancerFrontendIpConfigurationArgs{ // Name: pulumi.String("primary"), // PublicIpAddressId: examplePublicIp.ID(), // }, // }, // }) // if err != nil { // return err // } // exampleBackendAddressPool, err := lb.NewBackendAddressPool(ctx, "example", &lb.BackendAddressPoolArgs{ // LoadbalancerId: exampleLoadBalancer.ID(), // Name: pulumi.String("acctestpool"), // }) // if err != nil { // return err // } // exampleNetworkInterface, err := network.NewNetworkInterface(ctx, "example", &network.NetworkInterfaceArgs{ // Name: pulumi.String("example-nic"), // Location: example.Location, // ResourceGroupName: example.Name, // IpConfigurations: network.NetworkInterfaceIpConfigurationArray{ // &network.NetworkInterfaceIpConfigurationArgs{ // Name: pulumi.String("testconfiguration1"), // SubnetId: exampleSubnet.ID(), // PrivateIpAddressAllocation: pulumi.String("Dynamic"), // }, // }, // }) // if err != nil { // return err // } // _, err = network.NewNetworkInterfaceBackendAddressPoolAssociation(ctx, "example", &network.NetworkInterfaceBackendAddressPoolAssociationArgs{ // NetworkInterfaceId: exampleNetworkInterface.ID(), // IpConfigurationName: pulumi.String("testconfiguration1"), // BackendAddressPoolId: exampleBackendAddressPool.ID(), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Associations between Network Interfaces and Load Balancer Backend Address Pools can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/networkInterfaceBackendAddressPoolAssociation:NetworkInterfaceBackendAddressPoolAssociation association1 "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/networkInterfaces/nic1/ipConfigurations/example|/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/loadBalancers/lb1/backendAddressPools/pool1" // ``` type NetworkInterfaceBackendAddressPoolAssociation struct { pulumi.CustomResourceState // The ID of the Load Balancer Backend Address Pool which this Network Interface should be connected to. Changing this forces a new resource to be created. BackendAddressPoolId pulumi.StringOutput `pulumi:"backendAddressPoolId"` // The Name of the IP Configuration within the Network Interface which should be connected to the Backend Address Pool. Changing this forces a new resource to be created. IpConfigurationName pulumi.StringOutput `pulumi:"ipConfigurationName"` // The ID of the Network Interface. Changing this forces a new resource to be created. NetworkInterfaceId pulumi.StringOutput `pulumi:"networkInterfaceId"` } // NewNetworkInterfaceBackendAddressPoolAssociation registers a new resource with the given unique name, arguments, and options. func NewNetworkInterfaceBackendAddressPoolAssociation(ctx *pulumi.Context, name string, args *NetworkInterfaceBackendAddressPoolAssociationArgs, opts ...pulumi.ResourceOption) (*NetworkInterfaceBackendAddressPoolAssociation, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.BackendAddressPoolId == nil { return nil, errors.New("invalid value for required argument 'BackendAddressPoolId'") } if args.IpConfigurationName == nil { return nil, errors.New("invalid value for required argument 'IpConfigurationName'") } if args.NetworkInterfaceId == nil { return nil, errors.New("invalid value for required argument 'NetworkInterfaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkInterfaceBackendAddressPoolAssociation err := ctx.RegisterResource("azure:network/networkInterfaceBackendAddressPoolAssociation:NetworkInterfaceBackendAddressPoolAssociation", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkInterfaceBackendAddressPoolAssociation gets an existing NetworkInterfaceBackendAddressPoolAssociation resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetNetworkInterfaceBackendAddressPoolAssociation(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkInterfaceBackendAddressPoolAssociationState, opts ...pulumi.ResourceOption) (*NetworkInterfaceBackendAddressPoolAssociation, error) { var resource NetworkInterfaceBackendAddressPoolAssociation err := ctx.ReadResource("azure:network/networkInterfaceBackendAddressPoolAssociation:NetworkInterfaceBackendAddressPoolAssociation", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkInterfaceBackendAddressPoolAssociation resources. type networkInterfaceBackendAddressPoolAssociationState struct { // The ID of the Load Balancer Backend Address Pool which this Network Interface should be connected to. Changing this forces a new resource to be created. BackendAddressPoolId *string `pulumi:"backendAddressPoolId"` // The Name of the IP Configuration within the Network Interface which should be connected to the Backend Address Pool. Changing this forces a new resource to be created. IpConfigurationName *string `pulumi:"ipConfigurationName"` // The ID of the Network Interface. Changing this forces a new resource to be created. NetworkInterfaceId *string `pulumi:"networkInterfaceId"` } type NetworkInterfaceBackendAddressPoolAssociationState struct { // The ID of the Load Balancer Backend Address Pool which this Network Interface should be connected to. Changing this forces a new resource to be created. BackendAddressPoolId pulumi.StringPtrInput // The Name of the IP Configuration within the Network Interface which should be connected to the Backend Address Pool. Changing this forces a new resource to be created. IpConfigurationName pulumi.StringPtrInput // The ID of the Network Interface. Changing this forces a new resource to be created. NetworkInterfaceId pulumi.StringPtrInput } func (NetworkInterfaceBackendAddressPoolAssociationState) ElementType() reflect.Type { return reflect.TypeOf((*networkInterfaceBackendAddressPoolAssociationState)(nil)).Elem() } type networkInterfaceBackendAddressPoolAssociationArgs struct { // The ID of the Load Balancer Backend Address Pool which this Network Interface should be connected to. Changing this forces a new resource to be created. BackendAddressPoolId string `pulumi:"backendAddressPoolId"` // The Name of the IP Configuration within the Network Interface which should be connected to the Backend Address Pool. Changing this forces a new resource to be created. IpConfigurationName string `pulumi:"ipConfigurationName"` // The ID of the Network Interface. Changing this forces a new resource to be created. NetworkInterfaceId string `pulumi:"networkInterfaceId"` } // The set of arguments for constructing a NetworkInterfaceBackendAddressPoolAssociation resource. type NetworkInterfaceBackendAddressPoolAssociationArgs struct { // The ID of the Load Balancer Backend Address Pool which this Network Interface should be connected to. Changing this forces a new resource to be created. BackendAddressPoolId pulumi.StringInput // The Name of the IP Configuration within the Network Interface which should be connected to the Backend Address Pool. Changing this forces a new resource to be created. IpConfigurationName pulumi.StringInput // The ID of the Network Interface. Changing this forces a new resource to be created. NetworkInterfaceId pulumi.StringInput } func (NetworkInterfaceBackendAddressPoolAssociationArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkInterfaceBackendAddressPoolAssociationArgs)(nil)).Elem() } type NetworkInterfaceBackendAddressPoolAssociationInput interface { pulumi.Input ToNetworkInterfaceBackendAddressPoolAssociationOutput() NetworkInterfaceBackendAddressPoolAssociationOutput ToNetworkInterfaceBackendAddressPoolAssociationOutputWithContext(ctx context.Context) NetworkInterfaceBackendAddressPoolAssociationOutput } func (*NetworkInterfaceBackendAddressPoolAssociation) ElementType() reflect.Type { return reflect.TypeOf((**NetworkInterfaceBackendAddressPoolAssociation)(nil)).Elem() } func (i *NetworkInterfaceBackendAddressPoolAssociation) ToNetworkInterfaceBackendAddressPoolAssociationOutput() NetworkInterfaceBackendAddressPoolAssociationOutput { return i.ToNetworkInterfaceBackendAddressPoolAssociationOutputWithContext(context.Background()) } func (i *NetworkInterfaceBackendAddressPoolAssociation) ToNetworkInterfaceBackendAddressPoolAssociationOutputWithContext(ctx context.Context) NetworkInterfaceBackendAddressPoolAssociationOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkInterfaceBackendAddressPoolAssociationOutput) } // NetworkInterfaceBackendAddressPoolAssociationArrayInput is an input type that accepts NetworkInterfaceBackendAddressPoolAssociationArray and NetworkInterfaceBackendAddressPoolAssociationArrayOutput values. // You can construct a concrete instance of `NetworkInterfaceBackendAddressPoolAssociationArrayInput` via: // // NetworkInterfaceBackendAddressPoolAssociationArray{ NetworkInterfaceBackendAddressPoolAssociationArgs{...} } type NetworkInterfaceBackendAddressPoolAssociationArrayInput interface { pulumi.Input ToNetworkInterfaceBackendAddressPoolAssociationArrayOutput() NetworkInterfaceBackendAddressPoolAssociationArrayOutput ToNetworkInterfaceBackendAddressPoolAssociationArrayOutputWithContext(context.Context) NetworkInterfaceBackendAddressPoolAssociationArrayOutput } type NetworkInterfaceBackendAddressPoolAssociationArray []NetworkInterfaceBackendAddressPoolAssociationInput func (NetworkInterfaceBackendAddressPoolAssociationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkInterfaceBackendAddressPoolAssociation)(nil)).Elem() } func (i NetworkInterfaceBackendAddressPoolAssociationArray) ToNetworkInterfaceBackendAddressPoolAssociationArrayOutput() NetworkInterfaceBackendAddressPoolAssociationArrayOutput { return i.ToNetworkInterfaceBackendAddressPoolAssociationArrayOutputWithContext(context.Background()) } func (i NetworkInterfaceBackendAddressPoolAssociationArray) ToNetworkInterfaceBackendAddressPoolAssociationArrayOutputWithContext(ctx context.Context) NetworkInterfaceBackendAddressPoolAssociationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkInterfaceBackendAddressPoolAssociationArrayOutput) } // NetworkInterfaceBackendAddressPoolAssociationMapInput is an input type that accepts NetworkInterfaceBackendAddressPoolAssociationMap and NetworkInterfaceBackendAddressPoolAssociationMapOutput values. // You can construct a concrete instance of `NetworkInterfaceBackendAddressPoolAssociationMapInput` via: // // NetworkInterfaceBackendAddressPoolAssociationMap{ "key": NetworkInterfaceBackendAddressPoolAssociationArgs{...} } type NetworkInterfaceBackendAddressPoolAssociationMapInput interface { pulumi.Input ToNetworkInterfaceBackendAddressPoolAssociationMapOutput() NetworkInterfaceBackendAddressPoolAssociationMapOutput ToNetworkInterfaceBackendAddressPoolAssociationMapOutputWithContext(context.Context) NetworkInterfaceBackendAddressPoolAssociationMapOutput } type NetworkInterfaceBackendAddressPoolAssociationMap map[string]NetworkInterfaceBackendAddressPoolAssociationInput func (NetworkInterfaceBackendAddressPoolAssociationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkInterfaceBackendAddressPoolAssociation)(nil)).Elem() } func (i NetworkInterfaceBackendAddressPoolAssociationMap) ToNetworkInterfaceBackendAddressPoolAssociationMapOutput() NetworkInterfaceBackendAddressPoolAssociationMapOutput { return i.ToNetworkInterfaceBackendAddressPoolAssociationMapOutputWithContext(context.Background()) } func (i NetworkInterfaceBackendAddressPoolAssociationMap) ToNetworkInterfaceBackendAddressPoolAssociationMapOutputWithContext(ctx context.Context) NetworkInterfaceBackendAddressPoolAssociationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkInterfaceBackendAddressPoolAssociationMapOutput) } type NetworkInterfaceBackendAddressPoolAssociationOutput struct{ *pulumi.OutputState } func (NetworkInterfaceBackendAddressPoolAssociationOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkInterfaceBackendAddressPoolAssociation)(nil)).Elem() } func (o NetworkInterfaceBackendAddressPoolAssociationOutput) ToNetworkInterfaceBackendAddressPoolAssociationOutput() NetworkInterfaceBackendAddressPoolAssociationOutput { return o } func (o NetworkInterfaceBackendAddressPoolAssociationOutput) ToNetworkInterfaceBackendAddressPoolAssociationOutputWithContext(ctx context.Context) NetworkInterfaceBackendAddressPoolAssociationOutput { return o } // The ID of the Load Balancer Backend Address Pool which this Network Interface should be connected to. Changing this forces a new resource to be created. func (o NetworkInterfaceBackendAddressPoolAssociationOutput) BackendAddressPoolId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkInterfaceBackendAddressPoolAssociation) pulumi.StringOutput { return v.BackendAddressPoolId }).(pulumi.StringOutput) } // The Name of the IP Configuration within the Network Interface which should be connected to the Backend Address Pool. Changing this forces a new resource to be created. func (o NetworkInterfaceBackendAddressPoolAssociationOutput) IpConfigurationName() pulumi.StringOutput { return o.ApplyT(func(v *NetworkInterfaceBackendAddressPoolAssociation) pulumi.StringOutput { return v.IpConfigurationName }).(pulumi.StringOutput) } // The ID of the Network Interface. Changing this forces a new resource to be created. func (o NetworkInterfaceBackendAddressPoolAssociationOutput) NetworkInterfaceId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkInterfaceBackendAddressPoolAssociation) pulumi.StringOutput { return v.NetworkInterfaceId }).(pulumi.StringOutput) } type NetworkInterfaceBackendAddressPoolAssociationArrayOutput struct{ *pulumi.OutputState } func (NetworkInterfaceBackendAddressPoolAssociationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkInterfaceBackendAddressPoolAssociation)(nil)).Elem() } func (o NetworkInterfaceBackendAddressPoolAssociationArrayOutput) ToNetworkInterfaceBackendAddressPoolAssociationArrayOutput() NetworkInterfaceBackendAddressPoolAssociationArrayOutput { return o } func (o NetworkInterfaceBackendAddressPoolAssociationArrayOutput) ToNetworkInterfaceBackendAddressPoolAssociationArrayOutputWithContext(ctx context.Context) NetworkInterfaceBackendAddressPoolAssociationArrayOutput { return o } func (o NetworkInterfaceBackendAddressPoolAssociationArrayOutput) Index(i pulumi.IntInput) NetworkInterfaceBackendAddressPoolAssociationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkInterfaceBackendAddressPoolAssociation { return vs[0].([]*NetworkInterfaceBackendAddressPoolAssociation)[vs[1].(int)] }).(NetworkInterfaceBackendAddressPoolAssociationOutput) } type NetworkInterfaceBackendAddressPoolAssociationMapOutput struct{ *pulumi.OutputState } func (NetworkInterfaceBackendAddressPoolAssociationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkInterfaceBackendAddressPoolAssociation)(nil)).Elem() } func (o NetworkInterfaceBackendAddressPoolAssociationMapOutput) ToNetworkInterfaceBackendAddressPoolAssociationMapOutput() NetworkInterfaceBackendAddressPoolAssociationMapOutput { return o } func (o NetworkInterfaceBackendAddressPoolAssociationMapOutput) ToNetworkInterfaceBackendAddressPoolAssociationMapOutputWithContext(ctx context.Context) NetworkInterfaceBackendAddressPoolAssociationMapOutput { return o } func (o NetworkInterfaceBackendAddressPoolAssociationMapOutput) MapIndex(k pulumi.StringInput) NetworkInterfaceBackendAddressPoolAssociationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkInterfaceBackendAddressPoolAssociation { return vs[0].(map[string]*NetworkInterfaceBackendAddressPoolAssociation)[vs[1].(string)] }).(NetworkInterfaceBackendAddressPoolAssociationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkInterfaceBackendAddressPoolAssociationInput)(nil)).Elem(), &NetworkInterfaceBackendAddressPoolAssociation{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkInterfaceBackendAddressPoolAssociationArrayInput)(nil)).Elem(), NetworkInterfaceBackendAddressPoolAssociationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkInterfaceBackendAddressPoolAssociationMapInput)(nil)).Elem(), NetworkInterfaceBackendAddressPoolAssociationMap{}) pulumi.RegisterOutputType(NetworkInterfaceBackendAddressPoolAssociationOutput{}) pulumi.RegisterOutputType(NetworkInterfaceBackendAddressPoolAssociationArrayOutput{}) pulumi.RegisterOutputType(NetworkInterfaceBackendAddressPoolAssociationMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/bgpConnection.go
sdk/go/azure/network/bgpConnection.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Bgp Connection for a Virtual Hub. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualHub, err := network.NewVirtualHub(ctx, "example", &network.VirtualHubArgs{ // Name: pulumi.String("example-vhub"), // ResourceGroupName: example.Name, // Location: example.Location, // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("example-pip"), // Location: example.Location, // ResourceGroupName: example.Name, // AllocationMethod: pulumi.String("Static"), // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-vnet"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.5.0.0/16"), // }, // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("RouteServerSubnet"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.5.1.0/24"), // }, // }) // if err != nil { // return err // } // exampleVirtualHubIp, err := network.NewVirtualHubIp(ctx, "example", &network.VirtualHubIpArgs{ // Name: pulumi.String("example-vhubip"), // VirtualHubId: exampleVirtualHub.ID(), // PrivateIpAddress: pulumi.String("10.5.1.18"), // PrivateIpAllocationMethod: pulumi.String("Static"), // PublicIpAddressId: examplePublicIp.ID(), // SubnetId: exampleSubnet.ID(), // }) // if err != nil { // return err // } // _, err = network.NewBgpConnection(ctx, "example", &network.BgpConnectionArgs{ // Name: pulumi.String("example-vhub-bgpconnection"), // VirtualHubId: exampleVirtualHub.ID(), // PeerAsn: pulumi.Int(65514), // PeerIp: pulumi.String("169.254.21.5"), // }, pulumi.DependsOn([]pulumi.Resource{ // exampleVirtualHubIp, // })) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Virtual Hub Bgp Connections can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/bgpConnection:BgpConnection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/virtualHubs/virtualHub1/bgpConnections/connection1 // ``` type BgpConnection struct { pulumi.CustomResourceState // The name which should be used for this Virtual Hub Bgp Connection. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The peer autonomous system number for the Virtual Hub Bgp Connection. Changing this forces a new resource to be created. PeerAsn pulumi.IntOutput `pulumi:"peerAsn"` // The peer IP address for the Virtual Hub Bgp Connection. Changing this forces a new resource to be created. PeerIp pulumi.StringOutput `pulumi:"peerIp"` // The ID of the Virtual Hub within which this Bgp connection should be created. Changing this forces a new resource to be created. VirtualHubId pulumi.StringOutput `pulumi:"virtualHubId"` // The ID of virtual network connection. VirtualNetworkConnectionId pulumi.StringPtrOutput `pulumi:"virtualNetworkConnectionId"` } // NewBgpConnection registers a new resource with the given unique name, arguments, and options. func NewBgpConnection(ctx *pulumi.Context, name string, args *BgpConnectionArgs, opts ...pulumi.ResourceOption) (*BgpConnection, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.PeerAsn == nil { return nil, errors.New("invalid value for required argument 'PeerAsn'") } if args.PeerIp == nil { return nil, errors.New("invalid value for required argument 'PeerIp'") } if args.VirtualHubId == nil { return nil, errors.New("invalid value for required argument 'VirtualHubId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource BgpConnection err := ctx.RegisterResource("azure:network/bgpConnection:BgpConnection", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetBgpConnection gets an existing BgpConnection resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetBgpConnection(ctx *pulumi.Context, name string, id pulumi.IDInput, state *BgpConnectionState, opts ...pulumi.ResourceOption) (*BgpConnection, error) { var resource BgpConnection err := ctx.ReadResource("azure:network/bgpConnection:BgpConnection", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering BgpConnection resources. type bgpConnectionState struct { // The name which should be used for this Virtual Hub Bgp Connection. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The peer autonomous system number for the Virtual Hub Bgp Connection. Changing this forces a new resource to be created. PeerAsn *int `pulumi:"peerAsn"` // The peer IP address for the Virtual Hub Bgp Connection. Changing this forces a new resource to be created. PeerIp *string `pulumi:"peerIp"` // The ID of the Virtual Hub within which this Bgp connection should be created. Changing this forces a new resource to be created. VirtualHubId *string `pulumi:"virtualHubId"` // The ID of virtual network connection. VirtualNetworkConnectionId *string `pulumi:"virtualNetworkConnectionId"` } type BgpConnectionState struct { // The name which should be used for this Virtual Hub Bgp Connection. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The peer autonomous system number for the Virtual Hub Bgp Connection. Changing this forces a new resource to be created. PeerAsn pulumi.IntPtrInput // The peer IP address for the Virtual Hub Bgp Connection. Changing this forces a new resource to be created. PeerIp pulumi.StringPtrInput // The ID of the Virtual Hub within which this Bgp connection should be created. Changing this forces a new resource to be created. VirtualHubId pulumi.StringPtrInput // The ID of virtual network connection. VirtualNetworkConnectionId pulumi.StringPtrInput } func (BgpConnectionState) ElementType() reflect.Type { return reflect.TypeOf((*bgpConnectionState)(nil)).Elem() } type bgpConnectionArgs struct { // The name which should be used for this Virtual Hub Bgp Connection. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The peer autonomous system number for the Virtual Hub Bgp Connection. Changing this forces a new resource to be created. PeerAsn int `pulumi:"peerAsn"` // The peer IP address for the Virtual Hub Bgp Connection. Changing this forces a new resource to be created. PeerIp string `pulumi:"peerIp"` // The ID of the Virtual Hub within which this Bgp connection should be created. Changing this forces a new resource to be created. VirtualHubId string `pulumi:"virtualHubId"` // The ID of virtual network connection. VirtualNetworkConnectionId *string `pulumi:"virtualNetworkConnectionId"` } // The set of arguments for constructing a BgpConnection resource. type BgpConnectionArgs struct { // The name which should be used for this Virtual Hub Bgp Connection. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The peer autonomous system number for the Virtual Hub Bgp Connection. Changing this forces a new resource to be created. PeerAsn pulumi.IntInput // The peer IP address for the Virtual Hub Bgp Connection. Changing this forces a new resource to be created. PeerIp pulumi.StringInput // The ID of the Virtual Hub within which this Bgp connection should be created. Changing this forces a new resource to be created. VirtualHubId pulumi.StringInput // The ID of virtual network connection. VirtualNetworkConnectionId pulumi.StringPtrInput } func (BgpConnectionArgs) ElementType() reflect.Type { return reflect.TypeOf((*bgpConnectionArgs)(nil)).Elem() } type BgpConnectionInput interface { pulumi.Input ToBgpConnectionOutput() BgpConnectionOutput ToBgpConnectionOutputWithContext(ctx context.Context) BgpConnectionOutput } func (*BgpConnection) ElementType() reflect.Type { return reflect.TypeOf((**BgpConnection)(nil)).Elem() } func (i *BgpConnection) ToBgpConnectionOutput() BgpConnectionOutput { return i.ToBgpConnectionOutputWithContext(context.Background()) } func (i *BgpConnection) ToBgpConnectionOutputWithContext(ctx context.Context) BgpConnectionOutput { return pulumi.ToOutputWithContext(ctx, i).(BgpConnectionOutput) } // BgpConnectionArrayInput is an input type that accepts BgpConnectionArray and BgpConnectionArrayOutput values. // You can construct a concrete instance of `BgpConnectionArrayInput` via: // // BgpConnectionArray{ BgpConnectionArgs{...} } type BgpConnectionArrayInput interface { pulumi.Input ToBgpConnectionArrayOutput() BgpConnectionArrayOutput ToBgpConnectionArrayOutputWithContext(context.Context) BgpConnectionArrayOutput } type BgpConnectionArray []BgpConnectionInput func (BgpConnectionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*BgpConnection)(nil)).Elem() } func (i BgpConnectionArray) ToBgpConnectionArrayOutput() BgpConnectionArrayOutput { return i.ToBgpConnectionArrayOutputWithContext(context.Background()) } func (i BgpConnectionArray) ToBgpConnectionArrayOutputWithContext(ctx context.Context) BgpConnectionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(BgpConnectionArrayOutput) } // BgpConnectionMapInput is an input type that accepts BgpConnectionMap and BgpConnectionMapOutput values. // You can construct a concrete instance of `BgpConnectionMapInput` via: // // BgpConnectionMap{ "key": BgpConnectionArgs{...} } type BgpConnectionMapInput interface { pulumi.Input ToBgpConnectionMapOutput() BgpConnectionMapOutput ToBgpConnectionMapOutputWithContext(context.Context) BgpConnectionMapOutput } type BgpConnectionMap map[string]BgpConnectionInput func (BgpConnectionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*BgpConnection)(nil)).Elem() } func (i BgpConnectionMap) ToBgpConnectionMapOutput() BgpConnectionMapOutput { return i.ToBgpConnectionMapOutputWithContext(context.Background()) } func (i BgpConnectionMap) ToBgpConnectionMapOutputWithContext(ctx context.Context) BgpConnectionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(BgpConnectionMapOutput) } type BgpConnectionOutput struct{ *pulumi.OutputState } func (BgpConnectionOutput) ElementType() reflect.Type { return reflect.TypeOf((**BgpConnection)(nil)).Elem() } func (o BgpConnectionOutput) ToBgpConnectionOutput() BgpConnectionOutput { return o } func (o BgpConnectionOutput) ToBgpConnectionOutputWithContext(ctx context.Context) BgpConnectionOutput { return o } // The name which should be used for this Virtual Hub Bgp Connection. Changing this forces a new resource to be created. func (o BgpConnectionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *BgpConnection) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The peer autonomous system number for the Virtual Hub Bgp Connection. Changing this forces a new resource to be created. func (o BgpConnectionOutput) PeerAsn() pulumi.IntOutput { return o.ApplyT(func(v *BgpConnection) pulumi.IntOutput { return v.PeerAsn }).(pulumi.IntOutput) } // The peer IP address for the Virtual Hub Bgp Connection. Changing this forces a new resource to be created. func (o BgpConnectionOutput) PeerIp() pulumi.StringOutput { return o.ApplyT(func(v *BgpConnection) pulumi.StringOutput { return v.PeerIp }).(pulumi.StringOutput) } // The ID of the Virtual Hub within which this Bgp connection should be created. Changing this forces a new resource to be created. func (o BgpConnectionOutput) VirtualHubId() pulumi.StringOutput { return o.ApplyT(func(v *BgpConnection) pulumi.StringOutput { return v.VirtualHubId }).(pulumi.StringOutput) } // The ID of virtual network connection. func (o BgpConnectionOutput) VirtualNetworkConnectionId() pulumi.StringPtrOutput { return o.ApplyT(func(v *BgpConnection) pulumi.StringPtrOutput { return v.VirtualNetworkConnectionId }).(pulumi.StringPtrOutput) } type BgpConnectionArrayOutput struct{ *pulumi.OutputState } func (BgpConnectionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*BgpConnection)(nil)).Elem() } func (o BgpConnectionArrayOutput) ToBgpConnectionArrayOutput() BgpConnectionArrayOutput { return o } func (o BgpConnectionArrayOutput) ToBgpConnectionArrayOutputWithContext(ctx context.Context) BgpConnectionArrayOutput { return o } func (o BgpConnectionArrayOutput) Index(i pulumi.IntInput) BgpConnectionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *BgpConnection { return vs[0].([]*BgpConnection)[vs[1].(int)] }).(BgpConnectionOutput) } type BgpConnectionMapOutput struct{ *pulumi.OutputState } func (BgpConnectionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*BgpConnection)(nil)).Elem() } func (o BgpConnectionMapOutput) ToBgpConnectionMapOutput() BgpConnectionMapOutput { return o } func (o BgpConnectionMapOutput) ToBgpConnectionMapOutputWithContext(ctx context.Context) BgpConnectionMapOutput { return o } func (o BgpConnectionMapOutput) MapIndex(k pulumi.StringInput) BgpConnectionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *BgpConnection { return vs[0].(map[string]*BgpConnection)[vs[1].(string)] }).(BgpConnectionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*BgpConnectionInput)(nil)).Elem(), &BgpConnection{}) pulumi.RegisterInputType(reflect.TypeOf((*BgpConnectionArrayInput)(nil)).Elem(), BgpConnectionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*BgpConnectionMapInput)(nil)).Elem(), BgpConnectionMap{}) pulumi.RegisterOutputType(BgpConnectionOutput{}) pulumi.RegisterOutputType(BgpConnectionArrayOutput{}) pulumi.RegisterOutputType(BgpConnectionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/vpnSite.go
sdk/go/azure/network/vpnSite.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a VPN Site. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualWan, err := network.NewVirtualWan(ctx, "example", &network.VirtualWanArgs{ // Name: pulumi.String("example-vwan"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // _, err = network.NewVpnSite(ctx, "example", &network.VpnSiteArgs{ // Name: pulumi.String("site1"), // ResourceGroupName: example.Name, // Location: example.Location, // VirtualWanId: exampleVirtualWan.ID(), // AddressCidrs: pulumi.StringArray{ // pulumi.String("10.0.0.0/24"), // }, // Links: network.VpnSiteLinkArray{ // &network.VpnSiteLinkArgs{ // Name: pulumi.String("link1"), // IpAddress: pulumi.String("10.0.0.1"), // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // VPN Sites can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/vpnSite:VpnSite example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/vpnSites/site1 // ``` type VpnSite struct { pulumi.CustomResourceState // Specifies a list of IP address CIDRs that are located on your on-premises site. Traffic destined for these address spaces is routed to your local site. // // > **Note:** The `addressCidrs` has to be set when the `link.bgp` isn't specified. AddressCidrs pulumi.StringArrayOutput `pulumi:"addressCidrs"` // The model of the VPN device. DeviceModel pulumi.StringPtrOutput `pulumi:"deviceModel"` // The name of the VPN device vendor. DeviceVendor pulumi.StringPtrOutput `pulumi:"deviceVendor"` // One or more `link` blocks as defined below. Links VpnSiteLinkArrayOutput `pulumi:"links"` // The Azure Region where the VPN Site should exist. Changing this forces a new VPN Site to be created. Location pulumi.StringOutput `pulumi:"location"` // The name which should be used for this VPN Site. Changing this forces a new VPN Site to be created. Name pulumi.StringOutput `pulumi:"name"` // An `o365Policy` block as defined below. O365Policy VpnSiteO365PolicyOutput `pulumi:"o365Policy"` // The name of the Resource Group where the VPN Site should exist. Changing this forces a new VPN Site to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the VPN Site. Tags pulumi.StringMapOutput `pulumi:"tags"` // The ID of the Virtual Wan where this VPN site resides in. Changing this forces a new VPN Site to be created. VirtualWanId pulumi.StringOutput `pulumi:"virtualWanId"` } // NewVpnSite registers a new resource with the given unique name, arguments, and options. func NewVpnSite(ctx *pulumi.Context, name string, args *VpnSiteArgs, opts ...pulumi.ResourceOption) (*VpnSite, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.VirtualWanId == nil { return nil, errors.New("invalid value for required argument 'VirtualWanId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource VpnSite err := ctx.RegisterResource("azure:network/vpnSite:VpnSite", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVpnSite gets an existing VpnSite resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetVpnSite(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VpnSiteState, opts ...pulumi.ResourceOption) (*VpnSite, error) { var resource VpnSite err := ctx.ReadResource("azure:network/vpnSite:VpnSite", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VpnSite resources. type vpnSiteState struct { // Specifies a list of IP address CIDRs that are located on your on-premises site. Traffic destined for these address spaces is routed to your local site. // // > **Note:** The `addressCidrs` has to be set when the `link.bgp` isn't specified. AddressCidrs []string `pulumi:"addressCidrs"` // The model of the VPN device. DeviceModel *string `pulumi:"deviceModel"` // The name of the VPN device vendor. DeviceVendor *string `pulumi:"deviceVendor"` // One or more `link` blocks as defined below. Links []VpnSiteLink `pulumi:"links"` // The Azure Region where the VPN Site should exist. Changing this forces a new VPN Site to be created. Location *string `pulumi:"location"` // The name which should be used for this VPN Site. Changing this forces a new VPN Site to be created. Name *string `pulumi:"name"` // An `o365Policy` block as defined below. O365Policy *VpnSiteO365Policy `pulumi:"o365Policy"` // The name of the Resource Group where the VPN Site should exist. Changing this forces a new VPN Site to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the VPN Site. Tags map[string]string `pulumi:"tags"` // The ID of the Virtual Wan where this VPN site resides in. Changing this forces a new VPN Site to be created. VirtualWanId *string `pulumi:"virtualWanId"` } type VpnSiteState struct { // Specifies a list of IP address CIDRs that are located on your on-premises site. Traffic destined for these address spaces is routed to your local site. // // > **Note:** The `addressCidrs` has to be set when the `link.bgp` isn't specified. AddressCidrs pulumi.StringArrayInput // The model of the VPN device. DeviceModel pulumi.StringPtrInput // The name of the VPN device vendor. DeviceVendor pulumi.StringPtrInput // One or more `link` blocks as defined below. Links VpnSiteLinkArrayInput // The Azure Region where the VPN Site should exist. Changing this forces a new VPN Site to be created. Location pulumi.StringPtrInput // The name which should be used for this VPN Site. Changing this forces a new VPN Site to be created. Name pulumi.StringPtrInput // An `o365Policy` block as defined below. O365Policy VpnSiteO365PolicyPtrInput // The name of the Resource Group where the VPN Site should exist. Changing this forces a new VPN Site to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags which should be assigned to the VPN Site. Tags pulumi.StringMapInput // The ID of the Virtual Wan where this VPN site resides in. Changing this forces a new VPN Site to be created. VirtualWanId pulumi.StringPtrInput } func (VpnSiteState) ElementType() reflect.Type { return reflect.TypeOf((*vpnSiteState)(nil)).Elem() } type vpnSiteArgs struct { // Specifies a list of IP address CIDRs that are located on your on-premises site. Traffic destined for these address spaces is routed to your local site. // // > **Note:** The `addressCidrs` has to be set when the `link.bgp` isn't specified. AddressCidrs []string `pulumi:"addressCidrs"` // The model of the VPN device. DeviceModel *string `pulumi:"deviceModel"` // The name of the VPN device vendor. DeviceVendor *string `pulumi:"deviceVendor"` // One or more `link` blocks as defined below. Links []VpnSiteLink `pulumi:"links"` // The Azure Region where the VPN Site should exist. Changing this forces a new VPN Site to be created. Location *string `pulumi:"location"` // The name which should be used for this VPN Site. Changing this forces a new VPN Site to be created. Name *string `pulumi:"name"` // An `o365Policy` block as defined below. O365Policy *VpnSiteO365Policy `pulumi:"o365Policy"` // The name of the Resource Group where the VPN Site should exist. Changing this forces a new VPN Site to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the VPN Site. Tags map[string]string `pulumi:"tags"` // The ID of the Virtual Wan where this VPN site resides in. Changing this forces a new VPN Site to be created. VirtualWanId string `pulumi:"virtualWanId"` } // The set of arguments for constructing a VpnSite resource. type VpnSiteArgs struct { // Specifies a list of IP address CIDRs that are located on your on-premises site. Traffic destined for these address spaces is routed to your local site. // // > **Note:** The `addressCidrs` has to be set when the `link.bgp` isn't specified. AddressCidrs pulumi.StringArrayInput // The model of the VPN device. DeviceModel pulumi.StringPtrInput // The name of the VPN device vendor. DeviceVendor pulumi.StringPtrInput // One or more `link` blocks as defined below. Links VpnSiteLinkArrayInput // The Azure Region where the VPN Site should exist. Changing this forces a new VPN Site to be created. Location pulumi.StringPtrInput // The name which should be used for this VPN Site. Changing this forces a new VPN Site to be created. Name pulumi.StringPtrInput // An `o365Policy` block as defined below. O365Policy VpnSiteO365PolicyPtrInput // The name of the Resource Group where the VPN Site should exist. Changing this forces a new VPN Site to be created. ResourceGroupName pulumi.StringInput // A mapping of tags which should be assigned to the VPN Site. Tags pulumi.StringMapInput // The ID of the Virtual Wan where this VPN site resides in. Changing this forces a new VPN Site to be created. VirtualWanId pulumi.StringInput } func (VpnSiteArgs) ElementType() reflect.Type { return reflect.TypeOf((*vpnSiteArgs)(nil)).Elem() } type VpnSiteInput interface { pulumi.Input ToVpnSiteOutput() VpnSiteOutput ToVpnSiteOutputWithContext(ctx context.Context) VpnSiteOutput } func (*VpnSite) ElementType() reflect.Type { return reflect.TypeOf((**VpnSite)(nil)).Elem() } func (i *VpnSite) ToVpnSiteOutput() VpnSiteOutput { return i.ToVpnSiteOutputWithContext(context.Background()) } func (i *VpnSite) ToVpnSiteOutputWithContext(ctx context.Context) VpnSiteOutput { return pulumi.ToOutputWithContext(ctx, i).(VpnSiteOutput) } // VpnSiteArrayInput is an input type that accepts VpnSiteArray and VpnSiteArrayOutput values. // You can construct a concrete instance of `VpnSiteArrayInput` via: // // VpnSiteArray{ VpnSiteArgs{...} } type VpnSiteArrayInput interface { pulumi.Input ToVpnSiteArrayOutput() VpnSiteArrayOutput ToVpnSiteArrayOutputWithContext(context.Context) VpnSiteArrayOutput } type VpnSiteArray []VpnSiteInput func (VpnSiteArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VpnSite)(nil)).Elem() } func (i VpnSiteArray) ToVpnSiteArrayOutput() VpnSiteArrayOutput { return i.ToVpnSiteArrayOutputWithContext(context.Background()) } func (i VpnSiteArray) ToVpnSiteArrayOutputWithContext(ctx context.Context) VpnSiteArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VpnSiteArrayOutput) } // VpnSiteMapInput is an input type that accepts VpnSiteMap and VpnSiteMapOutput values. // You can construct a concrete instance of `VpnSiteMapInput` via: // // VpnSiteMap{ "key": VpnSiteArgs{...} } type VpnSiteMapInput interface { pulumi.Input ToVpnSiteMapOutput() VpnSiteMapOutput ToVpnSiteMapOutputWithContext(context.Context) VpnSiteMapOutput } type VpnSiteMap map[string]VpnSiteInput func (VpnSiteMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VpnSite)(nil)).Elem() } func (i VpnSiteMap) ToVpnSiteMapOutput() VpnSiteMapOutput { return i.ToVpnSiteMapOutputWithContext(context.Background()) } func (i VpnSiteMap) ToVpnSiteMapOutputWithContext(ctx context.Context) VpnSiteMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VpnSiteMapOutput) } type VpnSiteOutput struct{ *pulumi.OutputState } func (VpnSiteOutput) ElementType() reflect.Type { return reflect.TypeOf((**VpnSite)(nil)).Elem() } func (o VpnSiteOutput) ToVpnSiteOutput() VpnSiteOutput { return o } func (o VpnSiteOutput) ToVpnSiteOutputWithContext(ctx context.Context) VpnSiteOutput { return o } // Specifies a list of IP address CIDRs that are located on your on-premises site. Traffic destined for these address spaces is routed to your local site. // // > **Note:** The `addressCidrs` has to be set when the `link.bgp` isn't specified. func (o VpnSiteOutput) AddressCidrs() pulumi.StringArrayOutput { return o.ApplyT(func(v *VpnSite) pulumi.StringArrayOutput { return v.AddressCidrs }).(pulumi.StringArrayOutput) } // The model of the VPN device. func (o VpnSiteOutput) DeviceModel() pulumi.StringPtrOutput { return o.ApplyT(func(v *VpnSite) pulumi.StringPtrOutput { return v.DeviceModel }).(pulumi.StringPtrOutput) } // The name of the VPN device vendor. func (o VpnSiteOutput) DeviceVendor() pulumi.StringPtrOutput { return o.ApplyT(func(v *VpnSite) pulumi.StringPtrOutput { return v.DeviceVendor }).(pulumi.StringPtrOutput) } // One or more `link` blocks as defined below. func (o VpnSiteOutput) Links() VpnSiteLinkArrayOutput { return o.ApplyT(func(v *VpnSite) VpnSiteLinkArrayOutput { return v.Links }).(VpnSiteLinkArrayOutput) } // The Azure Region where the VPN Site should exist. Changing this forces a new VPN Site to be created. func (o VpnSiteOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *VpnSite) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name which should be used for this VPN Site. Changing this forces a new VPN Site to be created. func (o VpnSiteOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *VpnSite) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // An `o365Policy` block as defined below. func (o VpnSiteOutput) O365Policy() VpnSiteO365PolicyOutput { return o.ApplyT(func(v *VpnSite) VpnSiteO365PolicyOutput { return v.O365Policy }).(VpnSiteO365PolicyOutput) } // The name of the Resource Group where the VPN Site should exist. Changing this forces a new VPN Site to be created. func (o VpnSiteOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *VpnSite) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the VPN Site. func (o VpnSiteOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *VpnSite) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The ID of the Virtual Wan where this VPN site resides in. Changing this forces a new VPN Site to be created. func (o VpnSiteOutput) VirtualWanId() pulumi.StringOutput { return o.ApplyT(func(v *VpnSite) pulumi.StringOutput { return v.VirtualWanId }).(pulumi.StringOutput) } type VpnSiteArrayOutput struct{ *pulumi.OutputState } func (VpnSiteArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*VpnSite)(nil)).Elem() } func (o VpnSiteArrayOutput) ToVpnSiteArrayOutput() VpnSiteArrayOutput { return o } func (o VpnSiteArrayOutput) ToVpnSiteArrayOutputWithContext(ctx context.Context) VpnSiteArrayOutput { return o } func (o VpnSiteArrayOutput) Index(i pulumi.IntInput) VpnSiteOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VpnSite { return vs[0].([]*VpnSite)[vs[1].(int)] }).(VpnSiteOutput) } type VpnSiteMapOutput struct{ *pulumi.OutputState } func (VpnSiteMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VpnSite)(nil)).Elem() } func (o VpnSiteMapOutput) ToVpnSiteMapOutput() VpnSiteMapOutput { return o } func (o VpnSiteMapOutput) ToVpnSiteMapOutputWithContext(ctx context.Context) VpnSiteMapOutput { return o } func (o VpnSiteMapOutput) MapIndex(k pulumi.StringInput) VpnSiteOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VpnSite { return vs[0].(map[string]*VpnSite)[vs[1].(string)] }).(VpnSiteOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VpnSiteInput)(nil)).Elem(), &VpnSite{}) pulumi.RegisterInputType(reflect.TypeOf((*VpnSiteArrayInput)(nil)).Elem(), VpnSiteArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VpnSiteMapInput)(nil)).Elem(), VpnSiteMap{}) pulumi.RegisterOutputType(VpnSiteOutput{}) pulumi.RegisterOutputType(VpnSiteArrayOutput{}) pulumi.RegisterOutputType(VpnSiteMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/vpnServerConfiguration.go
sdk/go/azure/network/vpnServerConfiguration.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a VPN Server Configuration. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = network.NewVpnServerConfiguration(ctx, "test", &network.VpnServerConfigurationArgs{ // Name: pulumi.String("example-config"), // ResourceGroupName: example.Name, // Location: example.Location, // VpnAuthenticationTypes: pulumi.StringArray{ // pulumi.String("Certificate"), // }, // ClientRootCertificates: network.VpnServerConfigurationClientRootCertificateArray{ // &network.VpnServerConfigurationClientRootCertificateArgs{ // Name: pulumi.String("DigiCert-Federated-ID-Root-CA"), // PublicCertData: pulumi.String(`MIIDuzCCAqOgAwIBAgIQCHTZWCM+IlfFIRXIvyKSrjANBgkqhkiG9w0BAQsFADBn // // MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 // d3cuZGlnaWNlcnQuY29tMSYwJAYDVQQDEx1EaWdpQ2VydCBGZWRlcmF0ZWQgSUQg // Um9vdCBDQTAeFw0xMzAxMTUxMjAwMDBaFw0zMzAxMTUxMjAwMDBaMGcxCzAJBgNV // BAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdp // Y2VydC5jb20xJjAkBgNVBAMTHURpZ2lDZXJ0IEZlZGVyYXRlZCBJRCBSb290IENB // MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvAEB4pcCqnNNOWE6Ur5j // QPUH+1y1F9KdHTRSza6k5iDlXq1kGS1qAkuKtw9JsiNRrjltmFnzMZRBbX8Tlfl8 // zAhBmb6dDduDGED01kBsTkgywYPxXVTKec0WxYEEF0oMn4wSYNl0lt2eJAKHXjNf // GTwiibdP8CUR2ghSM2sUTI8Nt1Omfc4SMHhGhYD64uJMbX98THQ/4LMGuYegou+d // GTiahfHtjn7AboSEknwAMJHCh5RlYZZ6B1O4QbKJ+34Q0eKgnI3X6Vc9u0zf6DH8 // Dk+4zQDYRRTqTnVO3VT8jzqDlCRuNtq6YvryOWN74/dq8LQhUnXHvFyrsdMaE1X2 // DwIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNV // HQ4EFgQUGRdkFnbGt1EWjKwbUne+5OaZvRYwHwYDVR0jBBgwFoAUGRdkFnbGt1EW // jKwbUne+5OaZvRYwDQYJKoZIhvcNAQELBQADggEBAHcqsHkrjpESqfuVTRiptJfP // 9JbdtWqRTmOf6uJi2c8YVqI6XlKXsD8C1dUUaaHKLUJzvKiazibVuBwMIT84AyqR // QELn3e0BtgEymEygMU569b01ZPxoFSnNXc7qDZBDef8WfqAV/sxkTi8L9BkmFYfL // uGLOhRJOFprPdoDIUBB+tmCl3oDcBy3vnUeOEioz8zAkprcb3GHwHAK+vHmmfgcn // WsfMLH4JCLa/tRYL+Rw/N3ybCkDp00s0WUZ+AoDywSl0Q/ZEnNY0MsFiw6LyIdbq // M/s/1JRtO3bDSzD9TazRVzn2oBqzSa8VgIo5C1nOnoAKJTlsClJKvIhnRlaLQqk= // `), // // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // VPN Server Configurations can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/vpnServerConfiguration:VpnServerConfiguration config1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/vpnServerConfigurations/config1 // ``` type VpnServerConfiguration struct { pulumi.CustomResourceState AzureActiveDirectoryAuthentications VpnServerConfigurationAzureActiveDirectoryAuthenticationArrayOutput `pulumi:"azureActiveDirectoryAuthentications"` ClientRevokedCertificates VpnServerConfigurationClientRevokedCertificateArrayOutput `pulumi:"clientRevokedCertificates"` ClientRootCertificates VpnServerConfigurationClientRootCertificateArrayOutput `pulumi:"clientRootCertificates"` // A `ipsecPolicy` block as defined below. IpsecPolicy VpnServerConfigurationIpsecPolicyPtrOutput `pulumi:"ipsecPolicy"` // The Azure location where this VPN Server Configuration should be created. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The Name which should be used for this VPN Server Configuration. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` Radius VpnServerConfigurationRadiusPtrOutput `pulumi:"radius"` // The Name of the Resource Group in which this VPN Server Configuration should be created. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // A list of Authentication Types applicable for this VPN Server Configuration. Possible values are `AAD` (Azure Active Directory), `Certificate` and `Radius`. VpnAuthenticationTypes pulumi.StringArrayOutput `pulumi:"vpnAuthenticationTypes"` // A list of VPN Protocols to use for this Server Configuration. Possible values are `IkeV2` and `OpenVPN`. VpnProtocols pulumi.StringArrayOutput `pulumi:"vpnProtocols"` } // NewVpnServerConfiguration registers a new resource with the given unique name, arguments, and options. func NewVpnServerConfiguration(ctx *pulumi.Context, name string, args *VpnServerConfigurationArgs, opts ...pulumi.ResourceOption) (*VpnServerConfiguration, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.VpnAuthenticationTypes == nil { return nil, errors.New("invalid value for required argument 'VpnAuthenticationTypes'") } opts = internal.PkgResourceDefaultOpts(opts) var resource VpnServerConfiguration err := ctx.RegisterResource("azure:network/vpnServerConfiguration:VpnServerConfiguration", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVpnServerConfiguration gets an existing VpnServerConfiguration resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetVpnServerConfiguration(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VpnServerConfigurationState, opts ...pulumi.ResourceOption) (*VpnServerConfiguration, error) { var resource VpnServerConfiguration err := ctx.ReadResource("azure:network/vpnServerConfiguration:VpnServerConfiguration", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VpnServerConfiguration resources. type vpnServerConfigurationState struct { AzureActiveDirectoryAuthentications []VpnServerConfigurationAzureActiveDirectoryAuthentication `pulumi:"azureActiveDirectoryAuthentications"` ClientRevokedCertificates []VpnServerConfigurationClientRevokedCertificate `pulumi:"clientRevokedCertificates"` ClientRootCertificates []VpnServerConfigurationClientRootCertificate `pulumi:"clientRootCertificates"` // A `ipsecPolicy` block as defined below. IpsecPolicy *VpnServerConfigurationIpsecPolicy `pulumi:"ipsecPolicy"` // The Azure location where this VPN Server Configuration should be created. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The Name which should be used for this VPN Server Configuration. Changing this forces a new resource to be created. Name *string `pulumi:"name"` Radius *VpnServerConfigurationRadius `pulumi:"radius"` // The Name of the Resource Group in which this VPN Server Configuration should be created. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // A list of Authentication Types applicable for this VPN Server Configuration. Possible values are `AAD` (Azure Active Directory), `Certificate` and `Radius`. VpnAuthenticationTypes []string `pulumi:"vpnAuthenticationTypes"` // A list of VPN Protocols to use for this Server Configuration. Possible values are `IkeV2` and `OpenVPN`. VpnProtocols []string `pulumi:"vpnProtocols"` } type VpnServerConfigurationState struct { AzureActiveDirectoryAuthentications VpnServerConfigurationAzureActiveDirectoryAuthenticationArrayInput ClientRevokedCertificates VpnServerConfigurationClientRevokedCertificateArrayInput ClientRootCertificates VpnServerConfigurationClientRootCertificateArrayInput // A `ipsecPolicy` block as defined below. IpsecPolicy VpnServerConfigurationIpsecPolicyPtrInput // The Azure location where this VPN Server Configuration should be created. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The Name which should be used for this VPN Server Configuration. Changing this forces a new resource to be created. Name pulumi.StringPtrInput Radius VpnServerConfigurationRadiusPtrInput // The Name of the Resource Group in which this VPN Server Configuration should be created. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // A list of Authentication Types applicable for this VPN Server Configuration. Possible values are `AAD` (Azure Active Directory), `Certificate` and `Radius`. VpnAuthenticationTypes pulumi.StringArrayInput // A list of VPN Protocols to use for this Server Configuration. Possible values are `IkeV2` and `OpenVPN`. VpnProtocols pulumi.StringArrayInput } func (VpnServerConfigurationState) ElementType() reflect.Type { return reflect.TypeOf((*vpnServerConfigurationState)(nil)).Elem() } type vpnServerConfigurationArgs struct { AzureActiveDirectoryAuthentications []VpnServerConfigurationAzureActiveDirectoryAuthentication `pulumi:"azureActiveDirectoryAuthentications"` ClientRevokedCertificates []VpnServerConfigurationClientRevokedCertificate `pulumi:"clientRevokedCertificates"` ClientRootCertificates []VpnServerConfigurationClientRootCertificate `pulumi:"clientRootCertificates"` // A `ipsecPolicy` block as defined below. IpsecPolicy *VpnServerConfigurationIpsecPolicy `pulumi:"ipsecPolicy"` // The Azure location where this VPN Server Configuration should be created. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The Name which should be used for this VPN Server Configuration. Changing this forces a new resource to be created. Name *string `pulumi:"name"` Radius *VpnServerConfigurationRadius `pulumi:"radius"` // The Name of the Resource Group in which this VPN Server Configuration should be created. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // A list of Authentication Types applicable for this VPN Server Configuration. Possible values are `AAD` (Azure Active Directory), `Certificate` and `Radius`. VpnAuthenticationTypes []string `pulumi:"vpnAuthenticationTypes"` // A list of VPN Protocols to use for this Server Configuration. Possible values are `IkeV2` and `OpenVPN`. VpnProtocols []string `pulumi:"vpnProtocols"` } // The set of arguments for constructing a VpnServerConfiguration resource. type VpnServerConfigurationArgs struct { AzureActiveDirectoryAuthentications VpnServerConfigurationAzureActiveDirectoryAuthenticationArrayInput ClientRevokedCertificates VpnServerConfigurationClientRevokedCertificateArrayInput ClientRootCertificates VpnServerConfigurationClientRootCertificateArrayInput // A `ipsecPolicy` block as defined below. IpsecPolicy VpnServerConfigurationIpsecPolicyPtrInput // The Azure location where this VPN Server Configuration should be created. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The Name which should be used for this VPN Server Configuration. Changing this forces a new resource to be created. Name pulumi.StringPtrInput Radius VpnServerConfigurationRadiusPtrInput // The Name of the Resource Group in which this VPN Server Configuration should be created. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // A list of Authentication Types applicable for this VPN Server Configuration. Possible values are `AAD` (Azure Active Directory), `Certificate` and `Radius`. VpnAuthenticationTypes pulumi.StringArrayInput // A list of VPN Protocols to use for this Server Configuration. Possible values are `IkeV2` and `OpenVPN`. VpnProtocols pulumi.StringArrayInput } func (VpnServerConfigurationArgs) ElementType() reflect.Type { return reflect.TypeOf((*vpnServerConfigurationArgs)(nil)).Elem() } type VpnServerConfigurationInput interface { pulumi.Input ToVpnServerConfigurationOutput() VpnServerConfigurationOutput ToVpnServerConfigurationOutputWithContext(ctx context.Context) VpnServerConfigurationOutput } func (*VpnServerConfiguration) ElementType() reflect.Type { return reflect.TypeOf((**VpnServerConfiguration)(nil)).Elem() } func (i *VpnServerConfiguration) ToVpnServerConfigurationOutput() VpnServerConfigurationOutput { return i.ToVpnServerConfigurationOutputWithContext(context.Background()) } func (i *VpnServerConfiguration) ToVpnServerConfigurationOutputWithContext(ctx context.Context) VpnServerConfigurationOutput { return pulumi.ToOutputWithContext(ctx, i).(VpnServerConfigurationOutput) } // VpnServerConfigurationArrayInput is an input type that accepts VpnServerConfigurationArray and VpnServerConfigurationArrayOutput values. // You can construct a concrete instance of `VpnServerConfigurationArrayInput` via: // // VpnServerConfigurationArray{ VpnServerConfigurationArgs{...} } type VpnServerConfigurationArrayInput interface { pulumi.Input ToVpnServerConfigurationArrayOutput() VpnServerConfigurationArrayOutput ToVpnServerConfigurationArrayOutputWithContext(context.Context) VpnServerConfigurationArrayOutput } type VpnServerConfigurationArray []VpnServerConfigurationInput func (VpnServerConfigurationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VpnServerConfiguration)(nil)).Elem() } func (i VpnServerConfigurationArray) ToVpnServerConfigurationArrayOutput() VpnServerConfigurationArrayOutput { return i.ToVpnServerConfigurationArrayOutputWithContext(context.Background()) } func (i VpnServerConfigurationArray) ToVpnServerConfigurationArrayOutputWithContext(ctx context.Context) VpnServerConfigurationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VpnServerConfigurationArrayOutput) } // VpnServerConfigurationMapInput is an input type that accepts VpnServerConfigurationMap and VpnServerConfigurationMapOutput values. // You can construct a concrete instance of `VpnServerConfigurationMapInput` via: // // VpnServerConfigurationMap{ "key": VpnServerConfigurationArgs{...} } type VpnServerConfigurationMapInput interface { pulumi.Input ToVpnServerConfigurationMapOutput() VpnServerConfigurationMapOutput ToVpnServerConfigurationMapOutputWithContext(context.Context) VpnServerConfigurationMapOutput } type VpnServerConfigurationMap map[string]VpnServerConfigurationInput func (VpnServerConfigurationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VpnServerConfiguration)(nil)).Elem() } func (i VpnServerConfigurationMap) ToVpnServerConfigurationMapOutput() VpnServerConfigurationMapOutput { return i.ToVpnServerConfigurationMapOutputWithContext(context.Background()) } func (i VpnServerConfigurationMap) ToVpnServerConfigurationMapOutputWithContext(ctx context.Context) VpnServerConfigurationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VpnServerConfigurationMapOutput) } type VpnServerConfigurationOutput struct{ *pulumi.OutputState } func (VpnServerConfigurationOutput) ElementType() reflect.Type { return reflect.TypeOf((**VpnServerConfiguration)(nil)).Elem() } func (o VpnServerConfigurationOutput) ToVpnServerConfigurationOutput() VpnServerConfigurationOutput { return o } func (o VpnServerConfigurationOutput) ToVpnServerConfigurationOutputWithContext(ctx context.Context) VpnServerConfigurationOutput { return o } func (o VpnServerConfigurationOutput) AzureActiveDirectoryAuthentications() VpnServerConfigurationAzureActiveDirectoryAuthenticationArrayOutput { return o.ApplyT(func(v *VpnServerConfiguration) VpnServerConfigurationAzureActiveDirectoryAuthenticationArrayOutput { return v.AzureActiveDirectoryAuthentications }).(VpnServerConfigurationAzureActiveDirectoryAuthenticationArrayOutput) } func (o VpnServerConfigurationOutput) ClientRevokedCertificates() VpnServerConfigurationClientRevokedCertificateArrayOutput { return o.ApplyT(func(v *VpnServerConfiguration) VpnServerConfigurationClientRevokedCertificateArrayOutput { return v.ClientRevokedCertificates }).(VpnServerConfigurationClientRevokedCertificateArrayOutput) } func (o VpnServerConfigurationOutput) ClientRootCertificates() VpnServerConfigurationClientRootCertificateArrayOutput { return o.ApplyT(func(v *VpnServerConfiguration) VpnServerConfigurationClientRootCertificateArrayOutput { return v.ClientRootCertificates }).(VpnServerConfigurationClientRootCertificateArrayOutput) } // A `ipsecPolicy` block as defined below. func (o VpnServerConfigurationOutput) IpsecPolicy() VpnServerConfigurationIpsecPolicyPtrOutput { return o.ApplyT(func(v *VpnServerConfiguration) VpnServerConfigurationIpsecPolicyPtrOutput { return v.IpsecPolicy }).(VpnServerConfigurationIpsecPolicyPtrOutput) } // The Azure location where this VPN Server Configuration should be created. Changing this forces a new resource to be created. func (o VpnServerConfigurationOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *VpnServerConfiguration) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The Name which should be used for this VPN Server Configuration. Changing this forces a new resource to be created. func (o VpnServerConfigurationOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *VpnServerConfiguration) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } func (o VpnServerConfigurationOutput) Radius() VpnServerConfigurationRadiusPtrOutput { return o.ApplyT(func(v *VpnServerConfiguration) VpnServerConfigurationRadiusPtrOutput { return v.Radius }).(VpnServerConfigurationRadiusPtrOutput) } // The Name of the Resource Group in which this VPN Server Configuration should be created. Changing this forces a new resource to be created. func (o VpnServerConfigurationOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *VpnServerConfiguration) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o VpnServerConfigurationOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *VpnServerConfiguration) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // A list of Authentication Types applicable for this VPN Server Configuration. Possible values are `AAD` (Azure Active Directory), `Certificate` and `Radius`. func (o VpnServerConfigurationOutput) VpnAuthenticationTypes() pulumi.StringArrayOutput { return o.ApplyT(func(v *VpnServerConfiguration) pulumi.StringArrayOutput { return v.VpnAuthenticationTypes }).(pulumi.StringArrayOutput) } // A list of VPN Protocols to use for this Server Configuration. Possible values are `IkeV2` and `OpenVPN`. func (o VpnServerConfigurationOutput) VpnProtocols() pulumi.StringArrayOutput { return o.ApplyT(func(v *VpnServerConfiguration) pulumi.StringArrayOutput { return v.VpnProtocols }).(pulumi.StringArrayOutput) } type VpnServerConfigurationArrayOutput struct{ *pulumi.OutputState } func (VpnServerConfigurationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*VpnServerConfiguration)(nil)).Elem() } func (o VpnServerConfigurationArrayOutput) ToVpnServerConfigurationArrayOutput() VpnServerConfigurationArrayOutput { return o } func (o VpnServerConfigurationArrayOutput) ToVpnServerConfigurationArrayOutputWithContext(ctx context.Context) VpnServerConfigurationArrayOutput { return o } func (o VpnServerConfigurationArrayOutput) Index(i pulumi.IntInput) VpnServerConfigurationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VpnServerConfiguration { return vs[0].([]*VpnServerConfiguration)[vs[1].(int)] }).(VpnServerConfigurationOutput) } type VpnServerConfigurationMapOutput struct{ *pulumi.OutputState } func (VpnServerConfigurationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VpnServerConfiguration)(nil)).Elem() } func (o VpnServerConfigurationMapOutput) ToVpnServerConfigurationMapOutput() VpnServerConfigurationMapOutput { return o } func (o VpnServerConfigurationMapOutput) ToVpnServerConfigurationMapOutputWithContext(ctx context.Context) VpnServerConfigurationMapOutput { return o } func (o VpnServerConfigurationMapOutput) MapIndex(k pulumi.StringInput) VpnServerConfigurationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VpnServerConfiguration { return vs[0].(map[string]*VpnServerConfiguration)[vs[1].(string)] }).(VpnServerConfigurationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VpnServerConfigurationInput)(nil)).Elem(), &VpnServerConfiguration{}) pulumi.RegisterInputType(reflect.TypeOf((*VpnServerConfigurationArrayInput)(nil)).Elem(), VpnServerConfigurationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VpnServerConfigurationMapInput)(nil)).Elem(), VpnServerConfigurationMap{}) pulumi.RegisterOutputType(VpnServerConfigurationOutput{}) pulumi.RegisterOutputType(VpnServerConfigurationArrayOutput{}) pulumi.RegisterOutputType(VpnServerConfigurationMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/pulumiTypes.go
sdk/go/azure/network/pulumiTypes.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) var _ = internal.GetEnvOrDefault type ApplicationGatewayAuthenticationCertificate struct { // The contents of the Authentication Certificate which should be used. Data string `pulumi:"data"` // The ID of the Rewrite Rule Set Id *string `pulumi:"id"` // The Name of the Authentication Certificate to use. Name string `pulumi:"name"` } // ApplicationGatewayAuthenticationCertificateInput is an input type that accepts ApplicationGatewayAuthenticationCertificateArgs and ApplicationGatewayAuthenticationCertificateOutput values. // You can construct a concrete instance of `ApplicationGatewayAuthenticationCertificateInput` via: // // ApplicationGatewayAuthenticationCertificateArgs{...} type ApplicationGatewayAuthenticationCertificateInput interface { pulumi.Input ToApplicationGatewayAuthenticationCertificateOutput() ApplicationGatewayAuthenticationCertificateOutput ToApplicationGatewayAuthenticationCertificateOutputWithContext(context.Context) ApplicationGatewayAuthenticationCertificateOutput } type ApplicationGatewayAuthenticationCertificateArgs struct { // The contents of the Authentication Certificate which should be used. Data pulumi.StringInput `pulumi:"data"` // The ID of the Rewrite Rule Set Id pulumi.StringPtrInput `pulumi:"id"` // The Name of the Authentication Certificate to use. Name pulumi.StringInput `pulumi:"name"` } func (ApplicationGatewayAuthenticationCertificateArgs) ElementType() reflect.Type { return reflect.TypeOf((*ApplicationGatewayAuthenticationCertificate)(nil)).Elem() } func (i ApplicationGatewayAuthenticationCertificateArgs) ToApplicationGatewayAuthenticationCertificateOutput() ApplicationGatewayAuthenticationCertificateOutput { return i.ToApplicationGatewayAuthenticationCertificateOutputWithContext(context.Background()) } func (i ApplicationGatewayAuthenticationCertificateArgs) ToApplicationGatewayAuthenticationCertificateOutputWithContext(ctx context.Context) ApplicationGatewayAuthenticationCertificateOutput { return pulumi.ToOutputWithContext(ctx, i).(ApplicationGatewayAuthenticationCertificateOutput) } // ApplicationGatewayAuthenticationCertificateArrayInput is an input type that accepts ApplicationGatewayAuthenticationCertificateArray and ApplicationGatewayAuthenticationCertificateArrayOutput values. // You can construct a concrete instance of `ApplicationGatewayAuthenticationCertificateArrayInput` via: // // ApplicationGatewayAuthenticationCertificateArray{ ApplicationGatewayAuthenticationCertificateArgs{...} } type ApplicationGatewayAuthenticationCertificateArrayInput interface { pulumi.Input ToApplicationGatewayAuthenticationCertificateArrayOutput() ApplicationGatewayAuthenticationCertificateArrayOutput ToApplicationGatewayAuthenticationCertificateArrayOutputWithContext(context.Context) ApplicationGatewayAuthenticationCertificateArrayOutput } type ApplicationGatewayAuthenticationCertificateArray []ApplicationGatewayAuthenticationCertificateInput func (ApplicationGatewayAuthenticationCertificateArray) ElementType() reflect.Type { return reflect.TypeOf((*[]ApplicationGatewayAuthenticationCertificate)(nil)).Elem() } func (i ApplicationGatewayAuthenticationCertificateArray) ToApplicationGatewayAuthenticationCertificateArrayOutput() ApplicationGatewayAuthenticationCertificateArrayOutput { return i.ToApplicationGatewayAuthenticationCertificateArrayOutputWithContext(context.Background()) } func (i ApplicationGatewayAuthenticationCertificateArray) ToApplicationGatewayAuthenticationCertificateArrayOutputWithContext(ctx context.Context) ApplicationGatewayAuthenticationCertificateArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ApplicationGatewayAuthenticationCertificateArrayOutput) } type ApplicationGatewayAuthenticationCertificateOutput struct{ *pulumi.OutputState } func (ApplicationGatewayAuthenticationCertificateOutput) ElementType() reflect.Type { return reflect.TypeOf((*ApplicationGatewayAuthenticationCertificate)(nil)).Elem() } func (o ApplicationGatewayAuthenticationCertificateOutput) ToApplicationGatewayAuthenticationCertificateOutput() ApplicationGatewayAuthenticationCertificateOutput { return o } func (o ApplicationGatewayAuthenticationCertificateOutput) ToApplicationGatewayAuthenticationCertificateOutputWithContext(ctx context.Context) ApplicationGatewayAuthenticationCertificateOutput { return o } // The contents of the Authentication Certificate which should be used. func (o ApplicationGatewayAuthenticationCertificateOutput) Data() pulumi.StringOutput { return o.ApplyT(func(v ApplicationGatewayAuthenticationCertificate) string { return v.Data }).(pulumi.StringOutput) } // The ID of the Rewrite Rule Set func (o ApplicationGatewayAuthenticationCertificateOutput) Id() pulumi.StringPtrOutput { return o.ApplyT(func(v ApplicationGatewayAuthenticationCertificate) *string { return v.Id }).(pulumi.StringPtrOutput) } // The Name of the Authentication Certificate to use. func (o ApplicationGatewayAuthenticationCertificateOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v ApplicationGatewayAuthenticationCertificate) string { return v.Name }).(pulumi.StringOutput) } type ApplicationGatewayAuthenticationCertificateArrayOutput struct{ *pulumi.OutputState } func (ApplicationGatewayAuthenticationCertificateArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]ApplicationGatewayAuthenticationCertificate)(nil)).Elem() } func (o ApplicationGatewayAuthenticationCertificateArrayOutput) ToApplicationGatewayAuthenticationCertificateArrayOutput() ApplicationGatewayAuthenticationCertificateArrayOutput { return o } func (o ApplicationGatewayAuthenticationCertificateArrayOutput) ToApplicationGatewayAuthenticationCertificateArrayOutputWithContext(ctx context.Context) ApplicationGatewayAuthenticationCertificateArrayOutput { return o } func (o ApplicationGatewayAuthenticationCertificateArrayOutput) Index(i pulumi.IntInput) ApplicationGatewayAuthenticationCertificateOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) ApplicationGatewayAuthenticationCertificate { return vs[0].([]ApplicationGatewayAuthenticationCertificate)[vs[1].(int)] }).(ApplicationGatewayAuthenticationCertificateOutput) } type ApplicationGatewayAutoscaleConfiguration struct { // Maximum capacity for autoscaling. Accepted values are in the range `2` to `125`. MaxCapacity *int `pulumi:"maxCapacity"` // Minimum capacity for autoscaling. Accepted values are in the range `0` to `100`. MinCapacity int `pulumi:"minCapacity"` } // ApplicationGatewayAutoscaleConfigurationInput is an input type that accepts ApplicationGatewayAutoscaleConfigurationArgs and ApplicationGatewayAutoscaleConfigurationOutput values. // You can construct a concrete instance of `ApplicationGatewayAutoscaleConfigurationInput` via: // // ApplicationGatewayAutoscaleConfigurationArgs{...} type ApplicationGatewayAutoscaleConfigurationInput interface { pulumi.Input ToApplicationGatewayAutoscaleConfigurationOutput() ApplicationGatewayAutoscaleConfigurationOutput ToApplicationGatewayAutoscaleConfigurationOutputWithContext(context.Context) ApplicationGatewayAutoscaleConfigurationOutput } type ApplicationGatewayAutoscaleConfigurationArgs struct { // Maximum capacity for autoscaling. Accepted values are in the range `2` to `125`. MaxCapacity pulumi.IntPtrInput `pulumi:"maxCapacity"` // Minimum capacity for autoscaling. Accepted values are in the range `0` to `100`. MinCapacity pulumi.IntInput `pulumi:"minCapacity"` } func (ApplicationGatewayAutoscaleConfigurationArgs) ElementType() reflect.Type { return reflect.TypeOf((*ApplicationGatewayAutoscaleConfiguration)(nil)).Elem() } func (i ApplicationGatewayAutoscaleConfigurationArgs) ToApplicationGatewayAutoscaleConfigurationOutput() ApplicationGatewayAutoscaleConfigurationOutput { return i.ToApplicationGatewayAutoscaleConfigurationOutputWithContext(context.Background()) } func (i ApplicationGatewayAutoscaleConfigurationArgs) ToApplicationGatewayAutoscaleConfigurationOutputWithContext(ctx context.Context) ApplicationGatewayAutoscaleConfigurationOutput { return pulumi.ToOutputWithContext(ctx, i).(ApplicationGatewayAutoscaleConfigurationOutput) } func (i ApplicationGatewayAutoscaleConfigurationArgs) ToApplicationGatewayAutoscaleConfigurationPtrOutput() ApplicationGatewayAutoscaleConfigurationPtrOutput { return i.ToApplicationGatewayAutoscaleConfigurationPtrOutputWithContext(context.Background()) } func (i ApplicationGatewayAutoscaleConfigurationArgs) ToApplicationGatewayAutoscaleConfigurationPtrOutputWithContext(ctx context.Context) ApplicationGatewayAutoscaleConfigurationPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ApplicationGatewayAutoscaleConfigurationOutput).ToApplicationGatewayAutoscaleConfigurationPtrOutputWithContext(ctx) } // ApplicationGatewayAutoscaleConfigurationPtrInput is an input type that accepts ApplicationGatewayAutoscaleConfigurationArgs, ApplicationGatewayAutoscaleConfigurationPtr and ApplicationGatewayAutoscaleConfigurationPtrOutput values. // You can construct a concrete instance of `ApplicationGatewayAutoscaleConfigurationPtrInput` via: // // ApplicationGatewayAutoscaleConfigurationArgs{...} // // or: // // nil type ApplicationGatewayAutoscaleConfigurationPtrInput interface { pulumi.Input ToApplicationGatewayAutoscaleConfigurationPtrOutput() ApplicationGatewayAutoscaleConfigurationPtrOutput ToApplicationGatewayAutoscaleConfigurationPtrOutputWithContext(context.Context) ApplicationGatewayAutoscaleConfigurationPtrOutput } type applicationGatewayAutoscaleConfigurationPtrType ApplicationGatewayAutoscaleConfigurationArgs func ApplicationGatewayAutoscaleConfigurationPtr(v *ApplicationGatewayAutoscaleConfigurationArgs) ApplicationGatewayAutoscaleConfigurationPtrInput { return (*applicationGatewayAutoscaleConfigurationPtrType)(v) } func (*applicationGatewayAutoscaleConfigurationPtrType) ElementType() reflect.Type { return reflect.TypeOf((**ApplicationGatewayAutoscaleConfiguration)(nil)).Elem() } func (i *applicationGatewayAutoscaleConfigurationPtrType) ToApplicationGatewayAutoscaleConfigurationPtrOutput() ApplicationGatewayAutoscaleConfigurationPtrOutput { return i.ToApplicationGatewayAutoscaleConfigurationPtrOutputWithContext(context.Background()) } func (i *applicationGatewayAutoscaleConfigurationPtrType) ToApplicationGatewayAutoscaleConfigurationPtrOutputWithContext(ctx context.Context) ApplicationGatewayAutoscaleConfigurationPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ApplicationGatewayAutoscaleConfigurationPtrOutput) } type ApplicationGatewayAutoscaleConfigurationOutput struct{ *pulumi.OutputState } func (ApplicationGatewayAutoscaleConfigurationOutput) ElementType() reflect.Type { return reflect.TypeOf((*ApplicationGatewayAutoscaleConfiguration)(nil)).Elem() } func (o ApplicationGatewayAutoscaleConfigurationOutput) ToApplicationGatewayAutoscaleConfigurationOutput() ApplicationGatewayAutoscaleConfigurationOutput { return o } func (o ApplicationGatewayAutoscaleConfigurationOutput) ToApplicationGatewayAutoscaleConfigurationOutputWithContext(ctx context.Context) ApplicationGatewayAutoscaleConfigurationOutput { return o } func (o ApplicationGatewayAutoscaleConfigurationOutput) ToApplicationGatewayAutoscaleConfigurationPtrOutput() ApplicationGatewayAutoscaleConfigurationPtrOutput { return o.ToApplicationGatewayAutoscaleConfigurationPtrOutputWithContext(context.Background()) } func (o ApplicationGatewayAutoscaleConfigurationOutput) ToApplicationGatewayAutoscaleConfigurationPtrOutputWithContext(ctx context.Context) ApplicationGatewayAutoscaleConfigurationPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v ApplicationGatewayAutoscaleConfiguration) *ApplicationGatewayAutoscaleConfiguration { return &v }).(ApplicationGatewayAutoscaleConfigurationPtrOutput) } // Maximum capacity for autoscaling. Accepted values are in the range `2` to `125`. func (o ApplicationGatewayAutoscaleConfigurationOutput) MaxCapacity() pulumi.IntPtrOutput { return o.ApplyT(func(v ApplicationGatewayAutoscaleConfiguration) *int { return v.MaxCapacity }).(pulumi.IntPtrOutput) } // Minimum capacity for autoscaling. Accepted values are in the range `0` to `100`. func (o ApplicationGatewayAutoscaleConfigurationOutput) MinCapacity() pulumi.IntOutput { return o.ApplyT(func(v ApplicationGatewayAutoscaleConfiguration) int { return v.MinCapacity }).(pulumi.IntOutput) } type ApplicationGatewayAutoscaleConfigurationPtrOutput struct{ *pulumi.OutputState } func (ApplicationGatewayAutoscaleConfigurationPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**ApplicationGatewayAutoscaleConfiguration)(nil)).Elem() } func (o ApplicationGatewayAutoscaleConfigurationPtrOutput) ToApplicationGatewayAutoscaleConfigurationPtrOutput() ApplicationGatewayAutoscaleConfigurationPtrOutput { return o } func (o ApplicationGatewayAutoscaleConfigurationPtrOutput) ToApplicationGatewayAutoscaleConfigurationPtrOutputWithContext(ctx context.Context) ApplicationGatewayAutoscaleConfigurationPtrOutput { return o } func (o ApplicationGatewayAutoscaleConfigurationPtrOutput) Elem() ApplicationGatewayAutoscaleConfigurationOutput { return o.ApplyT(func(v *ApplicationGatewayAutoscaleConfiguration) ApplicationGatewayAutoscaleConfiguration { if v != nil { return *v } var ret ApplicationGatewayAutoscaleConfiguration return ret }).(ApplicationGatewayAutoscaleConfigurationOutput) } // Maximum capacity for autoscaling. Accepted values are in the range `2` to `125`. func (o ApplicationGatewayAutoscaleConfigurationPtrOutput) MaxCapacity() pulumi.IntPtrOutput { return o.ApplyT(func(v *ApplicationGatewayAutoscaleConfiguration) *int { if v == nil { return nil } return v.MaxCapacity }).(pulumi.IntPtrOutput) } // Minimum capacity for autoscaling. Accepted values are in the range `0` to `100`. func (o ApplicationGatewayAutoscaleConfigurationPtrOutput) MinCapacity() pulumi.IntPtrOutput { return o.ApplyT(func(v *ApplicationGatewayAutoscaleConfiguration) *int { if v == nil { return nil } return &v.MinCapacity }).(pulumi.IntPtrOutput) } type ApplicationGatewayBackendAddressPool struct { // A list of FQDN's which should be part of the Backend Address Pool. Fqdns []string `pulumi:"fqdns"` // The ID of the Rewrite Rule Set Id *string `pulumi:"id"` // A list of IP Addresses which should be part of the Backend Address Pool. IpAddresses []string `pulumi:"ipAddresses"` // The name of the Backend Address Pool. Name string `pulumi:"name"` } // ApplicationGatewayBackendAddressPoolInput is an input type that accepts ApplicationGatewayBackendAddressPoolArgs and ApplicationGatewayBackendAddressPoolOutput values. // You can construct a concrete instance of `ApplicationGatewayBackendAddressPoolInput` via: // // ApplicationGatewayBackendAddressPoolArgs{...} type ApplicationGatewayBackendAddressPoolInput interface { pulumi.Input ToApplicationGatewayBackendAddressPoolOutput() ApplicationGatewayBackendAddressPoolOutput ToApplicationGatewayBackendAddressPoolOutputWithContext(context.Context) ApplicationGatewayBackendAddressPoolOutput } type ApplicationGatewayBackendAddressPoolArgs struct { // A list of FQDN's which should be part of the Backend Address Pool. Fqdns pulumi.StringArrayInput `pulumi:"fqdns"` // The ID of the Rewrite Rule Set Id pulumi.StringPtrInput `pulumi:"id"` // A list of IP Addresses which should be part of the Backend Address Pool. IpAddresses pulumi.StringArrayInput `pulumi:"ipAddresses"` // The name of the Backend Address Pool. Name pulumi.StringInput `pulumi:"name"` } func (ApplicationGatewayBackendAddressPoolArgs) ElementType() reflect.Type { return reflect.TypeOf((*ApplicationGatewayBackendAddressPool)(nil)).Elem() } func (i ApplicationGatewayBackendAddressPoolArgs) ToApplicationGatewayBackendAddressPoolOutput() ApplicationGatewayBackendAddressPoolOutput { return i.ToApplicationGatewayBackendAddressPoolOutputWithContext(context.Background()) } func (i ApplicationGatewayBackendAddressPoolArgs) ToApplicationGatewayBackendAddressPoolOutputWithContext(ctx context.Context) ApplicationGatewayBackendAddressPoolOutput { return pulumi.ToOutputWithContext(ctx, i).(ApplicationGatewayBackendAddressPoolOutput) } // ApplicationGatewayBackendAddressPoolArrayInput is an input type that accepts ApplicationGatewayBackendAddressPoolArray and ApplicationGatewayBackendAddressPoolArrayOutput values. // You can construct a concrete instance of `ApplicationGatewayBackendAddressPoolArrayInput` via: // // ApplicationGatewayBackendAddressPoolArray{ ApplicationGatewayBackendAddressPoolArgs{...} } type ApplicationGatewayBackendAddressPoolArrayInput interface { pulumi.Input ToApplicationGatewayBackendAddressPoolArrayOutput() ApplicationGatewayBackendAddressPoolArrayOutput ToApplicationGatewayBackendAddressPoolArrayOutputWithContext(context.Context) ApplicationGatewayBackendAddressPoolArrayOutput } type ApplicationGatewayBackendAddressPoolArray []ApplicationGatewayBackendAddressPoolInput func (ApplicationGatewayBackendAddressPoolArray) ElementType() reflect.Type { return reflect.TypeOf((*[]ApplicationGatewayBackendAddressPool)(nil)).Elem() } func (i ApplicationGatewayBackendAddressPoolArray) ToApplicationGatewayBackendAddressPoolArrayOutput() ApplicationGatewayBackendAddressPoolArrayOutput { return i.ToApplicationGatewayBackendAddressPoolArrayOutputWithContext(context.Background()) } func (i ApplicationGatewayBackendAddressPoolArray) ToApplicationGatewayBackendAddressPoolArrayOutputWithContext(ctx context.Context) ApplicationGatewayBackendAddressPoolArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ApplicationGatewayBackendAddressPoolArrayOutput) } type ApplicationGatewayBackendAddressPoolOutput struct{ *pulumi.OutputState } func (ApplicationGatewayBackendAddressPoolOutput) ElementType() reflect.Type { return reflect.TypeOf((*ApplicationGatewayBackendAddressPool)(nil)).Elem() } func (o ApplicationGatewayBackendAddressPoolOutput) ToApplicationGatewayBackendAddressPoolOutput() ApplicationGatewayBackendAddressPoolOutput { return o } func (o ApplicationGatewayBackendAddressPoolOutput) ToApplicationGatewayBackendAddressPoolOutputWithContext(ctx context.Context) ApplicationGatewayBackendAddressPoolOutput { return o } // A list of FQDN's which should be part of the Backend Address Pool. func (o ApplicationGatewayBackendAddressPoolOutput) Fqdns() pulumi.StringArrayOutput { return o.ApplyT(func(v ApplicationGatewayBackendAddressPool) []string { return v.Fqdns }).(pulumi.StringArrayOutput) } // The ID of the Rewrite Rule Set func (o ApplicationGatewayBackendAddressPoolOutput) Id() pulumi.StringPtrOutput { return o.ApplyT(func(v ApplicationGatewayBackendAddressPool) *string { return v.Id }).(pulumi.StringPtrOutput) } // A list of IP Addresses which should be part of the Backend Address Pool. func (o ApplicationGatewayBackendAddressPoolOutput) IpAddresses() pulumi.StringArrayOutput { return o.ApplyT(func(v ApplicationGatewayBackendAddressPool) []string { return v.IpAddresses }).(pulumi.StringArrayOutput) } // The name of the Backend Address Pool. func (o ApplicationGatewayBackendAddressPoolOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v ApplicationGatewayBackendAddressPool) string { return v.Name }).(pulumi.StringOutput) } type ApplicationGatewayBackendAddressPoolArrayOutput struct{ *pulumi.OutputState } func (ApplicationGatewayBackendAddressPoolArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]ApplicationGatewayBackendAddressPool)(nil)).Elem() } func (o ApplicationGatewayBackendAddressPoolArrayOutput) ToApplicationGatewayBackendAddressPoolArrayOutput() ApplicationGatewayBackendAddressPoolArrayOutput { return o } func (o ApplicationGatewayBackendAddressPoolArrayOutput) ToApplicationGatewayBackendAddressPoolArrayOutputWithContext(ctx context.Context) ApplicationGatewayBackendAddressPoolArrayOutput { return o } func (o ApplicationGatewayBackendAddressPoolArrayOutput) Index(i pulumi.IntInput) ApplicationGatewayBackendAddressPoolOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) ApplicationGatewayBackendAddressPool { return vs[0].([]ApplicationGatewayBackendAddressPool)[vs[1].(int)] }).(ApplicationGatewayBackendAddressPoolOutput) } type ApplicationGatewayBackendHttpSetting struct { // The name of the affinity cookie. AffinityCookieName *string `pulumi:"affinityCookieName"` // One or more `authenticationCertificateBackend` blocks as defined below. AuthenticationCertificates []ApplicationGatewayBackendHttpSettingAuthenticationCertificate `pulumi:"authenticationCertificates"` // A `connectionDraining` block as defined below. ConnectionDraining *ApplicationGatewayBackendHttpSettingConnectionDraining `pulumi:"connectionDraining"` // Is Cookie-Based Affinity enabled? Possible values are `Enabled` and `Disabled`. CookieBasedAffinity string `pulumi:"cookieBasedAffinity"` // Whether to use a dedicated backend connection. Defaults to `false`. DedicatedBackendConnectionEnabled *bool `pulumi:"dedicatedBackendConnectionEnabled"` // Host header to be sent to the backend servers. Cannot be set if `pickHostNameFromBackendAddress` is set to `true`. HostName *string `pulumi:"hostName"` // The ID of the Rewrite Rule Set Id *string `pulumi:"id"` // The name of the Authentication Certificate. Name string `pulumi:"name"` // The Path which should be used as a prefix for all HTTP requests. Path *string `pulumi:"path"` // Whether host header should be picked from the host name of the backend server. Defaults to `false`. PickHostNameFromBackendAddress *bool `pulumi:"pickHostNameFromBackendAddress"` // The port which should be used for this Backend HTTP Settings Collection. Port int `pulumi:"port"` // The ID of the associated Probe. ProbeId *string `pulumi:"probeId"` // The name of an associated HTTP Probe. ProbeName *string `pulumi:"probeName"` // The Protocol which should be used. Possible values are `Http` and `Https`. Protocol string `pulumi:"protocol"` // The request timeout in seconds, which must be between 1 and 86400 seconds. Defaults to `30`. RequestTimeout *int `pulumi:"requestTimeout"` // A list of `trustedRootCertificate` names. TrustedRootCertificateNames []string `pulumi:"trustedRootCertificateNames"` } // ApplicationGatewayBackendHttpSettingInput is an input type that accepts ApplicationGatewayBackendHttpSettingArgs and ApplicationGatewayBackendHttpSettingOutput values. // You can construct a concrete instance of `ApplicationGatewayBackendHttpSettingInput` via: // // ApplicationGatewayBackendHttpSettingArgs{...} type ApplicationGatewayBackendHttpSettingInput interface { pulumi.Input ToApplicationGatewayBackendHttpSettingOutput() ApplicationGatewayBackendHttpSettingOutput ToApplicationGatewayBackendHttpSettingOutputWithContext(context.Context) ApplicationGatewayBackendHttpSettingOutput } type ApplicationGatewayBackendHttpSettingArgs struct { // The name of the affinity cookie. AffinityCookieName pulumi.StringPtrInput `pulumi:"affinityCookieName"` // One or more `authenticationCertificateBackend` blocks as defined below. AuthenticationCertificates ApplicationGatewayBackendHttpSettingAuthenticationCertificateArrayInput `pulumi:"authenticationCertificates"` // A `connectionDraining` block as defined below. ConnectionDraining ApplicationGatewayBackendHttpSettingConnectionDrainingPtrInput `pulumi:"connectionDraining"` // Is Cookie-Based Affinity enabled? Possible values are `Enabled` and `Disabled`. CookieBasedAffinity pulumi.StringInput `pulumi:"cookieBasedAffinity"` // Whether to use a dedicated backend connection. Defaults to `false`. DedicatedBackendConnectionEnabled pulumi.BoolPtrInput `pulumi:"dedicatedBackendConnectionEnabled"` // Host header to be sent to the backend servers. Cannot be set if `pickHostNameFromBackendAddress` is set to `true`. HostName pulumi.StringPtrInput `pulumi:"hostName"` // The ID of the Rewrite Rule Set Id pulumi.StringPtrInput `pulumi:"id"` // The name of the Authentication Certificate. Name pulumi.StringInput `pulumi:"name"` // The Path which should be used as a prefix for all HTTP requests. Path pulumi.StringPtrInput `pulumi:"path"` // Whether host header should be picked from the host name of the backend server. Defaults to `false`. PickHostNameFromBackendAddress pulumi.BoolPtrInput `pulumi:"pickHostNameFromBackendAddress"` // The port which should be used for this Backend HTTP Settings Collection. Port pulumi.IntInput `pulumi:"port"` // The ID of the associated Probe. ProbeId pulumi.StringPtrInput `pulumi:"probeId"` // The name of an associated HTTP Probe. ProbeName pulumi.StringPtrInput `pulumi:"probeName"` // The Protocol which should be used. Possible values are `Http` and `Https`. Protocol pulumi.StringInput `pulumi:"protocol"` // The request timeout in seconds, which must be between 1 and 86400 seconds. Defaults to `30`. RequestTimeout pulumi.IntPtrInput `pulumi:"requestTimeout"` // A list of `trustedRootCertificate` names. TrustedRootCertificateNames pulumi.StringArrayInput `pulumi:"trustedRootCertificateNames"` } func (ApplicationGatewayBackendHttpSettingArgs) ElementType() reflect.Type { return reflect.TypeOf((*ApplicationGatewayBackendHttpSetting)(nil)).Elem() } func (i ApplicationGatewayBackendHttpSettingArgs) ToApplicationGatewayBackendHttpSettingOutput() ApplicationGatewayBackendHttpSettingOutput { return i.ToApplicationGatewayBackendHttpSettingOutputWithContext(context.Background()) } func (i ApplicationGatewayBackendHttpSettingArgs) ToApplicationGatewayBackendHttpSettingOutputWithContext(ctx context.Context) ApplicationGatewayBackendHttpSettingOutput { return pulumi.ToOutputWithContext(ctx, i).(ApplicationGatewayBackendHttpSettingOutput) } // ApplicationGatewayBackendHttpSettingArrayInput is an input type that accepts ApplicationGatewayBackendHttpSettingArray and ApplicationGatewayBackendHttpSettingArrayOutput values. // You can construct a concrete instance of `ApplicationGatewayBackendHttpSettingArrayInput` via: // // ApplicationGatewayBackendHttpSettingArray{ ApplicationGatewayBackendHttpSettingArgs{...} } type ApplicationGatewayBackendHttpSettingArrayInput interface { pulumi.Input ToApplicationGatewayBackendHttpSettingArrayOutput() ApplicationGatewayBackendHttpSettingArrayOutput ToApplicationGatewayBackendHttpSettingArrayOutputWithContext(context.Context) ApplicationGatewayBackendHttpSettingArrayOutput } type ApplicationGatewayBackendHttpSettingArray []ApplicationGatewayBackendHttpSettingInput func (ApplicationGatewayBackendHttpSettingArray) ElementType() reflect.Type { return reflect.TypeOf((*[]ApplicationGatewayBackendHttpSetting)(nil)).Elem() } func (i ApplicationGatewayBackendHttpSettingArray) ToApplicationGatewayBackendHttpSettingArrayOutput() ApplicationGatewayBackendHttpSettingArrayOutput { return i.ToApplicationGatewayBackendHttpSettingArrayOutputWithContext(context.Background()) } func (i ApplicationGatewayBackendHttpSettingArray) ToApplicationGatewayBackendHttpSettingArrayOutputWithContext(ctx context.Context) ApplicationGatewayBackendHttpSettingArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ApplicationGatewayBackendHttpSettingArrayOutput) } type ApplicationGatewayBackendHttpSettingOutput struct{ *pulumi.OutputState } func (ApplicationGatewayBackendHttpSettingOutput) ElementType() reflect.Type { return reflect.TypeOf((*ApplicationGatewayBackendHttpSetting)(nil)).Elem() } func (o ApplicationGatewayBackendHttpSettingOutput) ToApplicationGatewayBackendHttpSettingOutput() ApplicationGatewayBackendHttpSettingOutput { return o } func (o ApplicationGatewayBackendHttpSettingOutput) ToApplicationGatewayBackendHttpSettingOutputWithContext(ctx context.Context) ApplicationGatewayBackendHttpSettingOutput { return o } // The name of the affinity cookie. func (o ApplicationGatewayBackendHttpSettingOutput) AffinityCookieName() pulumi.StringPtrOutput { return o.ApplyT(func(v ApplicationGatewayBackendHttpSetting) *string { return v.AffinityCookieName }).(pulumi.StringPtrOutput) } // One or more `authenticationCertificateBackend` blocks as defined below. func (o ApplicationGatewayBackendHttpSettingOutput) AuthenticationCertificates() ApplicationGatewayBackendHttpSettingAuthenticationCertificateArrayOutput { return o.ApplyT(func(v ApplicationGatewayBackendHttpSetting) []ApplicationGatewayBackendHttpSettingAuthenticationCertificate { return v.AuthenticationCertificates }).(ApplicationGatewayBackendHttpSettingAuthenticationCertificateArrayOutput) } // A `connectionDraining` block as defined below. func (o ApplicationGatewayBackendHttpSettingOutput) ConnectionDraining() ApplicationGatewayBackendHttpSettingConnectionDrainingPtrOutput { return o.ApplyT(func(v ApplicationGatewayBackendHttpSetting) *ApplicationGatewayBackendHttpSettingConnectionDraining { return v.ConnectionDraining }).(ApplicationGatewayBackendHttpSettingConnectionDrainingPtrOutput) } // Is Cookie-Based Affinity enabled? Possible values are `Enabled` and `Disabled`. func (o ApplicationGatewayBackendHttpSettingOutput) CookieBasedAffinity() pulumi.StringOutput { return o.ApplyT(func(v ApplicationGatewayBackendHttpSetting) string { return v.CookieBasedAffinity }).(pulumi.StringOutput) } // Whether to use a dedicated backend connection. Defaults to `false`. func (o ApplicationGatewayBackendHttpSettingOutput) DedicatedBackendConnectionEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v ApplicationGatewayBackendHttpSetting) *bool { return v.DedicatedBackendConnectionEnabled }).(pulumi.BoolPtrOutput) } // Host header to be sent to the backend servers. Cannot be set if `pickHostNameFromBackendAddress` is set to `true`. func (o ApplicationGatewayBackendHttpSettingOutput) HostName() pulumi.StringPtrOutput { return o.ApplyT(func(v ApplicationGatewayBackendHttpSetting) *string { return v.HostName }).(pulumi.StringPtrOutput) } // The ID of the Rewrite Rule Set func (o ApplicationGatewayBackendHttpSettingOutput) Id() pulumi.StringPtrOutput { return o.ApplyT(func(v ApplicationGatewayBackendHttpSetting) *string { return v.Id }).(pulumi.StringPtrOutput) } // The name of the Authentication Certificate. func (o ApplicationGatewayBackendHttpSettingOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v ApplicationGatewayBackendHttpSetting) string { return v.Name }).(pulumi.StringOutput) } // The Path which should be used as a prefix for all HTTP requests. func (o ApplicationGatewayBackendHttpSettingOutput) Path() pulumi.StringPtrOutput { return o.ApplyT(func(v ApplicationGatewayBackendHttpSetting) *string { return v.Path }).(pulumi.StringPtrOutput) } // Whether host header should be picked from the host name of the backend server. Defaults to `false`. func (o ApplicationGatewayBackendHttpSettingOutput) PickHostNameFromBackendAddress() pulumi.BoolPtrOutput { return o.ApplyT(func(v ApplicationGatewayBackendHttpSetting) *bool { return v.PickHostNameFromBackendAddress }).(pulumi.BoolPtrOutput) } // The port which should be used for this Backend HTTP Settings Collection. func (o ApplicationGatewayBackendHttpSettingOutput) Port() pulumi.IntOutput { return o.ApplyT(func(v ApplicationGatewayBackendHttpSetting) int { return v.Port }).(pulumi.IntOutput) } // The ID of the associated Probe. func (o ApplicationGatewayBackendHttpSettingOutput) ProbeId() pulumi.StringPtrOutput { return o.ApplyT(func(v ApplicationGatewayBackendHttpSetting) *string { return v.ProbeId }).(pulumi.StringPtrOutput) } // The name of an associated HTTP Probe. func (o ApplicationGatewayBackendHttpSettingOutput) ProbeName() pulumi.StringPtrOutput { return o.ApplyT(func(v ApplicationGatewayBackendHttpSetting) *string { return v.ProbeName }).(pulumi.StringPtrOutput) } // The Protocol which should be used. Possible values are `Http` and `Https`. func (o ApplicationGatewayBackendHttpSettingOutput) Protocol() pulumi.StringOutput { return o.ApplyT(func(v ApplicationGatewayBackendHttpSetting) string { return v.Protocol }).(pulumi.StringOutput) } // The request timeout in seconds, which must be between 1 and 86400 seconds. Defaults to `30`. func (o ApplicationGatewayBackendHttpSettingOutput) RequestTimeout() pulumi.IntPtrOutput { return o.ApplyT(func(v ApplicationGatewayBackendHttpSetting) *int { return v.RequestTimeout }).(pulumi.IntPtrOutput) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
true
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/expressRoutePort.go
sdk/go/azure/network/expressRoutePort.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Express Route Port. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West US"), // }) // if err != nil { // return err // } // _, err = network.NewExpressRoutePort(ctx, "example", &network.ExpressRoutePortArgs{ // Name: pulumi.String("port1"), // ResourceGroupName: example.Name, // Location: example.Location, // PeeringLocation: pulumi.String("Airtel-Chennai-CLS"), // BandwidthInGbps: pulumi.Int(10), // Encapsulation: pulumi.String("Dot1Q"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Express Route Ports can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/expressRoutePort:ExpressRoutePort example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/expressRoutePorts/port1 // ``` type ExpressRoutePort struct { pulumi.CustomResourceState // Bandwidth of the Express Route Port in Gbps. Changing this forces a new Express Route Port to be created. BandwidthInGbps pulumi.IntOutput `pulumi:"bandwidthInGbps"` // The billing type of the Express Route Port. Possible values are `MeteredData` and `UnlimitedData`. Defaults to `MeteredData`. BillingType pulumi.StringPtrOutput `pulumi:"billingType"` // The encapsulation method used for the Express Route Port. Changing this forces a new Express Route Port to be created. Possible values are: `Dot1Q`, `QinQ`. Encapsulation pulumi.StringOutput `pulumi:"encapsulation"` // The EtherType of the Express Route Port. Ethertype pulumi.StringOutput `pulumi:"ethertype"` // The resource GUID of the Express Route Port. Guid pulumi.StringOutput `pulumi:"guid"` // An `identity` block as defined below. Identity ExpressRoutePortIdentityPtrOutput `pulumi:"identity"` // A list of `link` blocks as defined below. Link1 ExpressRoutePortLink1Output `pulumi:"link1"` // A list of `link` blocks as defined below. Link2 ExpressRoutePortLink2Output `pulumi:"link2"` // The Azure Region where the Express Route Port should exist. Changing this forces a new Express Route Port to be created. Location pulumi.StringOutput `pulumi:"location"` // The maximum transmission unit of the Express Route Port. Mtu pulumi.StringOutput `pulumi:"mtu"` // The name which should be used for this Express Route Port. Changing this forces a new Express Route Port to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the peering location that this Express Route Port is physically mapped to. Changing this forces a new Express Route Port to be created. PeeringLocation pulumi.StringOutput `pulumi:"peeringLocation"` // The name of the Resource Group where the Express Route Port should exist. Changing this forces a new Express Route Port to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Express Route Port. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewExpressRoutePort registers a new resource with the given unique name, arguments, and options. func NewExpressRoutePort(ctx *pulumi.Context, name string, args *ExpressRoutePortArgs, opts ...pulumi.ResourceOption) (*ExpressRoutePort, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.BandwidthInGbps == nil { return nil, errors.New("invalid value for required argument 'BandwidthInGbps'") } if args.Encapsulation == nil { return nil, errors.New("invalid value for required argument 'Encapsulation'") } if args.PeeringLocation == nil { return nil, errors.New("invalid value for required argument 'PeeringLocation'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ExpressRoutePort err := ctx.RegisterResource("azure:network/expressRoutePort:ExpressRoutePort", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetExpressRoutePort gets an existing ExpressRoutePort resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetExpressRoutePort(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ExpressRoutePortState, opts ...pulumi.ResourceOption) (*ExpressRoutePort, error) { var resource ExpressRoutePort err := ctx.ReadResource("azure:network/expressRoutePort:ExpressRoutePort", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ExpressRoutePort resources. type expressRoutePortState struct { // Bandwidth of the Express Route Port in Gbps. Changing this forces a new Express Route Port to be created. BandwidthInGbps *int `pulumi:"bandwidthInGbps"` // The billing type of the Express Route Port. Possible values are `MeteredData` and `UnlimitedData`. Defaults to `MeteredData`. BillingType *string `pulumi:"billingType"` // The encapsulation method used for the Express Route Port. Changing this forces a new Express Route Port to be created. Possible values are: `Dot1Q`, `QinQ`. Encapsulation *string `pulumi:"encapsulation"` // The EtherType of the Express Route Port. Ethertype *string `pulumi:"ethertype"` // The resource GUID of the Express Route Port. Guid *string `pulumi:"guid"` // An `identity` block as defined below. Identity *ExpressRoutePortIdentity `pulumi:"identity"` // A list of `link` blocks as defined below. Link1 *ExpressRoutePortLink1 `pulumi:"link1"` // A list of `link` blocks as defined below. Link2 *ExpressRoutePortLink2 `pulumi:"link2"` // The Azure Region where the Express Route Port should exist. Changing this forces a new Express Route Port to be created. Location *string `pulumi:"location"` // The maximum transmission unit of the Express Route Port. Mtu *string `pulumi:"mtu"` // The name which should be used for this Express Route Port. Changing this forces a new Express Route Port to be created. Name *string `pulumi:"name"` // The name of the peering location that this Express Route Port is physically mapped to. Changing this forces a new Express Route Port to be created. PeeringLocation *string `pulumi:"peeringLocation"` // The name of the Resource Group where the Express Route Port should exist. Changing this forces a new Express Route Port to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Express Route Port. Tags map[string]string `pulumi:"tags"` } type ExpressRoutePortState struct { // Bandwidth of the Express Route Port in Gbps. Changing this forces a new Express Route Port to be created. BandwidthInGbps pulumi.IntPtrInput // The billing type of the Express Route Port. Possible values are `MeteredData` and `UnlimitedData`. Defaults to `MeteredData`. BillingType pulumi.StringPtrInput // The encapsulation method used for the Express Route Port. Changing this forces a new Express Route Port to be created. Possible values are: `Dot1Q`, `QinQ`. Encapsulation pulumi.StringPtrInput // The EtherType of the Express Route Port. Ethertype pulumi.StringPtrInput // The resource GUID of the Express Route Port. Guid pulumi.StringPtrInput // An `identity` block as defined below. Identity ExpressRoutePortIdentityPtrInput // A list of `link` blocks as defined below. Link1 ExpressRoutePortLink1PtrInput // A list of `link` blocks as defined below. Link2 ExpressRoutePortLink2PtrInput // The Azure Region where the Express Route Port should exist. Changing this forces a new Express Route Port to be created. Location pulumi.StringPtrInput // The maximum transmission unit of the Express Route Port. Mtu pulumi.StringPtrInput // The name which should be used for this Express Route Port. Changing this forces a new Express Route Port to be created. Name pulumi.StringPtrInput // The name of the peering location that this Express Route Port is physically mapped to. Changing this forces a new Express Route Port to be created. PeeringLocation pulumi.StringPtrInput // The name of the Resource Group where the Express Route Port should exist. Changing this forces a new Express Route Port to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags which should be assigned to the Express Route Port. Tags pulumi.StringMapInput } func (ExpressRoutePortState) ElementType() reflect.Type { return reflect.TypeOf((*expressRoutePortState)(nil)).Elem() } type expressRoutePortArgs struct { // Bandwidth of the Express Route Port in Gbps. Changing this forces a new Express Route Port to be created. BandwidthInGbps int `pulumi:"bandwidthInGbps"` // The billing type of the Express Route Port. Possible values are `MeteredData` and `UnlimitedData`. Defaults to `MeteredData`. BillingType *string `pulumi:"billingType"` // The encapsulation method used for the Express Route Port. Changing this forces a new Express Route Port to be created. Possible values are: `Dot1Q`, `QinQ`. Encapsulation string `pulumi:"encapsulation"` // An `identity` block as defined below. Identity *ExpressRoutePortIdentity `pulumi:"identity"` // A list of `link` blocks as defined below. Link1 *ExpressRoutePortLink1 `pulumi:"link1"` // A list of `link` blocks as defined below. Link2 *ExpressRoutePortLink2 `pulumi:"link2"` // The Azure Region where the Express Route Port should exist. Changing this forces a new Express Route Port to be created. Location *string `pulumi:"location"` // The name which should be used for this Express Route Port. Changing this forces a new Express Route Port to be created. Name *string `pulumi:"name"` // The name of the peering location that this Express Route Port is physically mapped to. Changing this forces a new Express Route Port to be created. PeeringLocation string `pulumi:"peeringLocation"` // The name of the Resource Group where the Express Route Port should exist. Changing this forces a new Express Route Port to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Express Route Port. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a ExpressRoutePort resource. type ExpressRoutePortArgs struct { // Bandwidth of the Express Route Port in Gbps. Changing this forces a new Express Route Port to be created. BandwidthInGbps pulumi.IntInput // The billing type of the Express Route Port. Possible values are `MeteredData` and `UnlimitedData`. Defaults to `MeteredData`. BillingType pulumi.StringPtrInput // The encapsulation method used for the Express Route Port. Changing this forces a new Express Route Port to be created. Possible values are: `Dot1Q`, `QinQ`. Encapsulation pulumi.StringInput // An `identity` block as defined below. Identity ExpressRoutePortIdentityPtrInput // A list of `link` blocks as defined below. Link1 ExpressRoutePortLink1PtrInput // A list of `link` blocks as defined below. Link2 ExpressRoutePortLink2PtrInput // The Azure Region where the Express Route Port should exist. Changing this forces a new Express Route Port to be created. Location pulumi.StringPtrInput // The name which should be used for this Express Route Port. Changing this forces a new Express Route Port to be created. Name pulumi.StringPtrInput // The name of the peering location that this Express Route Port is physically mapped to. Changing this forces a new Express Route Port to be created. PeeringLocation pulumi.StringInput // The name of the Resource Group where the Express Route Port should exist. Changing this forces a new Express Route Port to be created. ResourceGroupName pulumi.StringInput // A mapping of tags which should be assigned to the Express Route Port. Tags pulumi.StringMapInput } func (ExpressRoutePortArgs) ElementType() reflect.Type { return reflect.TypeOf((*expressRoutePortArgs)(nil)).Elem() } type ExpressRoutePortInput interface { pulumi.Input ToExpressRoutePortOutput() ExpressRoutePortOutput ToExpressRoutePortOutputWithContext(ctx context.Context) ExpressRoutePortOutput } func (*ExpressRoutePort) ElementType() reflect.Type { return reflect.TypeOf((**ExpressRoutePort)(nil)).Elem() } func (i *ExpressRoutePort) ToExpressRoutePortOutput() ExpressRoutePortOutput { return i.ToExpressRoutePortOutputWithContext(context.Background()) } func (i *ExpressRoutePort) ToExpressRoutePortOutputWithContext(ctx context.Context) ExpressRoutePortOutput { return pulumi.ToOutputWithContext(ctx, i).(ExpressRoutePortOutput) } // ExpressRoutePortArrayInput is an input type that accepts ExpressRoutePortArray and ExpressRoutePortArrayOutput values. // You can construct a concrete instance of `ExpressRoutePortArrayInput` via: // // ExpressRoutePortArray{ ExpressRoutePortArgs{...} } type ExpressRoutePortArrayInput interface { pulumi.Input ToExpressRoutePortArrayOutput() ExpressRoutePortArrayOutput ToExpressRoutePortArrayOutputWithContext(context.Context) ExpressRoutePortArrayOutput } type ExpressRoutePortArray []ExpressRoutePortInput func (ExpressRoutePortArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ExpressRoutePort)(nil)).Elem() } func (i ExpressRoutePortArray) ToExpressRoutePortArrayOutput() ExpressRoutePortArrayOutput { return i.ToExpressRoutePortArrayOutputWithContext(context.Background()) } func (i ExpressRoutePortArray) ToExpressRoutePortArrayOutputWithContext(ctx context.Context) ExpressRoutePortArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ExpressRoutePortArrayOutput) } // ExpressRoutePortMapInput is an input type that accepts ExpressRoutePortMap and ExpressRoutePortMapOutput values. // You can construct a concrete instance of `ExpressRoutePortMapInput` via: // // ExpressRoutePortMap{ "key": ExpressRoutePortArgs{...} } type ExpressRoutePortMapInput interface { pulumi.Input ToExpressRoutePortMapOutput() ExpressRoutePortMapOutput ToExpressRoutePortMapOutputWithContext(context.Context) ExpressRoutePortMapOutput } type ExpressRoutePortMap map[string]ExpressRoutePortInput func (ExpressRoutePortMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ExpressRoutePort)(nil)).Elem() } func (i ExpressRoutePortMap) ToExpressRoutePortMapOutput() ExpressRoutePortMapOutput { return i.ToExpressRoutePortMapOutputWithContext(context.Background()) } func (i ExpressRoutePortMap) ToExpressRoutePortMapOutputWithContext(ctx context.Context) ExpressRoutePortMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ExpressRoutePortMapOutput) } type ExpressRoutePortOutput struct{ *pulumi.OutputState } func (ExpressRoutePortOutput) ElementType() reflect.Type { return reflect.TypeOf((**ExpressRoutePort)(nil)).Elem() } func (o ExpressRoutePortOutput) ToExpressRoutePortOutput() ExpressRoutePortOutput { return o } func (o ExpressRoutePortOutput) ToExpressRoutePortOutputWithContext(ctx context.Context) ExpressRoutePortOutput { return o } // Bandwidth of the Express Route Port in Gbps. Changing this forces a new Express Route Port to be created. func (o ExpressRoutePortOutput) BandwidthInGbps() pulumi.IntOutput { return o.ApplyT(func(v *ExpressRoutePort) pulumi.IntOutput { return v.BandwidthInGbps }).(pulumi.IntOutput) } // The billing type of the Express Route Port. Possible values are `MeteredData` and `UnlimitedData`. Defaults to `MeteredData`. func (o ExpressRoutePortOutput) BillingType() pulumi.StringPtrOutput { return o.ApplyT(func(v *ExpressRoutePort) pulumi.StringPtrOutput { return v.BillingType }).(pulumi.StringPtrOutput) } // The encapsulation method used for the Express Route Port. Changing this forces a new Express Route Port to be created. Possible values are: `Dot1Q`, `QinQ`. func (o ExpressRoutePortOutput) Encapsulation() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRoutePort) pulumi.StringOutput { return v.Encapsulation }).(pulumi.StringOutput) } // The EtherType of the Express Route Port. func (o ExpressRoutePortOutput) Ethertype() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRoutePort) pulumi.StringOutput { return v.Ethertype }).(pulumi.StringOutput) } // The resource GUID of the Express Route Port. func (o ExpressRoutePortOutput) Guid() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRoutePort) pulumi.StringOutput { return v.Guid }).(pulumi.StringOutput) } // An `identity` block as defined below. func (o ExpressRoutePortOutput) Identity() ExpressRoutePortIdentityPtrOutput { return o.ApplyT(func(v *ExpressRoutePort) ExpressRoutePortIdentityPtrOutput { return v.Identity }).(ExpressRoutePortIdentityPtrOutput) } // A list of `link` blocks as defined below. func (o ExpressRoutePortOutput) Link1() ExpressRoutePortLink1Output { return o.ApplyT(func(v *ExpressRoutePort) ExpressRoutePortLink1Output { return v.Link1 }).(ExpressRoutePortLink1Output) } // A list of `link` blocks as defined below. func (o ExpressRoutePortOutput) Link2() ExpressRoutePortLink2Output { return o.ApplyT(func(v *ExpressRoutePort) ExpressRoutePortLink2Output { return v.Link2 }).(ExpressRoutePortLink2Output) } // The Azure Region where the Express Route Port should exist. Changing this forces a new Express Route Port to be created. func (o ExpressRoutePortOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRoutePort) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The maximum transmission unit of the Express Route Port. func (o ExpressRoutePortOutput) Mtu() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRoutePort) pulumi.StringOutput { return v.Mtu }).(pulumi.StringOutput) } // The name which should be used for this Express Route Port. Changing this forces a new Express Route Port to be created. func (o ExpressRoutePortOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRoutePort) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the peering location that this Express Route Port is physically mapped to. Changing this forces a new Express Route Port to be created. func (o ExpressRoutePortOutput) PeeringLocation() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRoutePort) pulumi.StringOutput { return v.PeeringLocation }).(pulumi.StringOutput) } // The name of the Resource Group where the Express Route Port should exist. Changing this forces a new Express Route Port to be created. func (o ExpressRoutePortOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRoutePort) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Express Route Port. func (o ExpressRoutePortOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *ExpressRoutePort) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type ExpressRoutePortArrayOutput struct{ *pulumi.OutputState } func (ExpressRoutePortArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ExpressRoutePort)(nil)).Elem() } func (o ExpressRoutePortArrayOutput) ToExpressRoutePortArrayOutput() ExpressRoutePortArrayOutput { return o } func (o ExpressRoutePortArrayOutput) ToExpressRoutePortArrayOutputWithContext(ctx context.Context) ExpressRoutePortArrayOutput { return o } func (o ExpressRoutePortArrayOutput) Index(i pulumi.IntInput) ExpressRoutePortOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ExpressRoutePort { return vs[0].([]*ExpressRoutePort)[vs[1].(int)] }).(ExpressRoutePortOutput) } type ExpressRoutePortMapOutput struct{ *pulumi.OutputState } func (ExpressRoutePortMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ExpressRoutePort)(nil)).Elem() } func (o ExpressRoutePortMapOutput) ToExpressRoutePortMapOutput() ExpressRoutePortMapOutput { return o } func (o ExpressRoutePortMapOutput) ToExpressRoutePortMapOutputWithContext(ctx context.Context) ExpressRoutePortMapOutput { return o } func (o ExpressRoutePortMapOutput) MapIndex(k pulumi.StringInput) ExpressRoutePortOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ExpressRoutePort { return vs[0].(map[string]*ExpressRoutePort)[vs[1].(string)] }).(ExpressRoutePortOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ExpressRoutePortInput)(nil)).Elem(), &ExpressRoutePort{}) pulumi.RegisterInputType(reflect.TypeOf((*ExpressRoutePortArrayInput)(nil)).Elem(), ExpressRoutePortArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ExpressRoutePortMapInput)(nil)).Elem(), ExpressRoutePortMap{}) pulumi.RegisterOutputType(ExpressRoutePortOutput{}) pulumi.RegisterOutputType(ExpressRoutePortArrayOutput{}) pulumi.RegisterOutputType(ExpressRoutePortMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/expressRouteCircuit.go
sdk/go/azure/network/expressRouteCircuit.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an ExpressRoute circuit. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("exprtTest"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = network.NewExpressRouteCircuit(ctx, "example", &network.ExpressRouteCircuitArgs{ // Name: pulumi.String("expressRoute1"), // ResourceGroupName: example.Name, // Location: example.Location, // ServiceProviderName: pulumi.String("Equinix"), // PeeringLocation: pulumi.String("Silicon Valley"), // BandwidthInMbps: pulumi.Int(50), // Sku: &network.ExpressRouteCircuitSkuArgs{ // Tier: pulumi.String("Standard"), // Family: pulumi.String("MeteredData"), // }, // Tags: pulumi.StringMap{ // "environment": pulumi.String("Production"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // ExpressRoute circuits can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/expressRouteCircuit:ExpressRouteCircuit myExpressRoute /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/expressRouteCircuits/myExpressRoute // ``` type ExpressRouteCircuit struct { pulumi.CustomResourceState // Allow the circuit to interact with classic (RDFE) resources. Defaults to `false`. AllowClassicOperations pulumi.BoolPtrOutput `pulumi:"allowClassicOperations"` // The authorization key. This can be used to set up an ExpressRoute Circuit with an ExpressRoute Port from another subscription. AuthorizationKey pulumi.StringPtrOutput `pulumi:"authorizationKey"` // The bandwidth in Gbps of the circuit being created on the Express Route Port. // // > **Note:** The `expressRoutePortId` and the `bandwidthInGbps` should be set together and they conflict with `serviceProviderName`, `peeringLocation` and `bandwidthInMbps`. BandwidthInGbps pulumi.Float64PtrOutput `pulumi:"bandwidthInGbps"` // The bandwidth in Mbps of the circuit being created on the Service Provider. // // > **Note:** Once you increase your bandwidth, you will not be able to decrease it to its previous value. // // > **Note:** The `serviceProviderName`, the `peeringLocation` and the `bandwidthInMbps` should be set together and they conflict with `expressRoutePortId` and `bandwidthInGbps`. BandwidthInMbps pulumi.IntPtrOutput `pulumi:"bandwidthInMbps"` // The ID of the Express Route Port this Express Route Circuit is based on. Changing this forces a new resource to be created. ExpressRoutePortId pulumi.StringPtrOutput `pulumi:"expressRoutePortId"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the ExpressRoute circuit. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the peering location and **not** the Azure resource location. Changing this forces a new resource to be created. PeeringLocation pulumi.StringPtrOutput `pulumi:"peeringLocation"` // Enable [rate limiting](https://learn.microsoft.com/en-us/azure/expressroute/rate-limit) for the circuit. Only works with ExpressRoute Ports. Defaults to `false`. RateLimitingEnabled pulumi.BoolPtrOutput `pulumi:"rateLimitingEnabled"` // The name of the resource group in which to create the ExpressRoute circuit. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The string needed by the service provider to provision the ExpressRoute circuit. ServiceKey pulumi.StringOutput `pulumi:"serviceKey"` // The name of the ExpressRoute Service Provider. Changing this forces a new resource to be created. ServiceProviderName pulumi.StringPtrOutput `pulumi:"serviceProviderName"` // The ExpressRoute circuit provisioning state from your chosen service provider. Possible values are `NotProvisioned`, `Provisioning`, `Provisioned`, and `Deprovisioning`. ServiceProviderProvisioningState pulumi.StringOutput `pulumi:"serviceProviderProvisioningState"` // A `sku` block for the ExpressRoute circuit as documented below. Sku ExpressRouteCircuitSkuOutput `pulumi:"sku"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewExpressRouteCircuit registers a new resource with the given unique name, arguments, and options. func NewExpressRouteCircuit(ctx *pulumi.Context, name string, args *ExpressRouteCircuitArgs, opts ...pulumi.ResourceOption) (*ExpressRouteCircuit, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Sku == nil { return nil, errors.New("invalid value for required argument 'Sku'") } if args.AuthorizationKey != nil { args.AuthorizationKey = pulumi.ToSecret(args.AuthorizationKey).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "authorizationKey", "serviceKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource ExpressRouteCircuit err := ctx.RegisterResource("azure:network/expressRouteCircuit:ExpressRouteCircuit", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetExpressRouteCircuit gets an existing ExpressRouteCircuit resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetExpressRouteCircuit(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ExpressRouteCircuitState, opts ...pulumi.ResourceOption) (*ExpressRouteCircuit, error) { var resource ExpressRouteCircuit err := ctx.ReadResource("azure:network/expressRouteCircuit:ExpressRouteCircuit", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ExpressRouteCircuit resources. type expressRouteCircuitState struct { // Allow the circuit to interact with classic (RDFE) resources. Defaults to `false`. AllowClassicOperations *bool `pulumi:"allowClassicOperations"` // The authorization key. This can be used to set up an ExpressRoute Circuit with an ExpressRoute Port from another subscription. AuthorizationKey *string `pulumi:"authorizationKey"` // The bandwidth in Gbps of the circuit being created on the Express Route Port. // // > **Note:** The `expressRoutePortId` and the `bandwidthInGbps` should be set together and they conflict with `serviceProviderName`, `peeringLocation` and `bandwidthInMbps`. BandwidthInGbps *float64 `pulumi:"bandwidthInGbps"` // The bandwidth in Mbps of the circuit being created on the Service Provider. // // > **Note:** Once you increase your bandwidth, you will not be able to decrease it to its previous value. // // > **Note:** The `serviceProviderName`, the `peeringLocation` and the `bandwidthInMbps` should be set together and they conflict with `expressRoutePortId` and `bandwidthInGbps`. BandwidthInMbps *int `pulumi:"bandwidthInMbps"` // The ID of the Express Route Port this Express Route Circuit is based on. Changing this forces a new resource to be created. ExpressRoutePortId *string `pulumi:"expressRoutePortId"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the ExpressRoute circuit. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the peering location and **not** the Azure resource location. Changing this forces a new resource to be created. PeeringLocation *string `pulumi:"peeringLocation"` // Enable [rate limiting](https://learn.microsoft.com/en-us/azure/expressroute/rate-limit) for the circuit. Only works with ExpressRoute Ports. Defaults to `false`. RateLimitingEnabled *bool `pulumi:"rateLimitingEnabled"` // The name of the resource group in which to create the ExpressRoute circuit. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The string needed by the service provider to provision the ExpressRoute circuit. ServiceKey *string `pulumi:"serviceKey"` // The name of the ExpressRoute Service Provider. Changing this forces a new resource to be created. ServiceProviderName *string `pulumi:"serviceProviderName"` // The ExpressRoute circuit provisioning state from your chosen service provider. Possible values are `NotProvisioned`, `Provisioning`, `Provisioned`, and `Deprovisioning`. ServiceProviderProvisioningState *string `pulumi:"serviceProviderProvisioningState"` // A `sku` block for the ExpressRoute circuit as documented below. Sku *ExpressRouteCircuitSku `pulumi:"sku"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } type ExpressRouteCircuitState struct { // Allow the circuit to interact with classic (RDFE) resources. Defaults to `false`. AllowClassicOperations pulumi.BoolPtrInput // The authorization key. This can be used to set up an ExpressRoute Circuit with an ExpressRoute Port from another subscription. AuthorizationKey pulumi.StringPtrInput // The bandwidth in Gbps of the circuit being created on the Express Route Port. // // > **Note:** The `expressRoutePortId` and the `bandwidthInGbps` should be set together and they conflict with `serviceProviderName`, `peeringLocation` and `bandwidthInMbps`. BandwidthInGbps pulumi.Float64PtrInput // The bandwidth in Mbps of the circuit being created on the Service Provider. // // > **Note:** Once you increase your bandwidth, you will not be able to decrease it to its previous value. // // > **Note:** The `serviceProviderName`, the `peeringLocation` and the `bandwidthInMbps` should be set together and they conflict with `expressRoutePortId` and `bandwidthInGbps`. BandwidthInMbps pulumi.IntPtrInput // The ID of the Express Route Port this Express Route Circuit is based on. Changing this forces a new resource to be created. ExpressRoutePortId pulumi.StringPtrInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the ExpressRoute circuit. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the peering location and **not** the Azure resource location. Changing this forces a new resource to be created. PeeringLocation pulumi.StringPtrInput // Enable [rate limiting](https://learn.microsoft.com/en-us/azure/expressroute/rate-limit) for the circuit. Only works with ExpressRoute Ports. Defaults to `false`. RateLimitingEnabled pulumi.BoolPtrInput // The name of the resource group in which to create the ExpressRoute circuit. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The string needed by the service provider to provision the ExpressRoute circuit. ServiceKey pulumi.StringPtrInput // The name of the ExpressRoute Service Provider. Changing this forces a new resource to be created. ServiceProviderName pulumi.StringPtrInput // The ExpressRoute circuit provisioning state from your chosen service provider. Possible values are `NotProvisioned`, `Provisioning`, `Provisioned`, and `Deprovisioning`. ServiceProviderProvisioningState pulumi.StringPtrInput // A `sku` block for the ExpressRoute circuit as documented below. Sku ExpressRouteCircuitSkuPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (ExpressRouteCircuitState) ElementType() reflect.Type { return reflect.TypeOf((*expressRouteCircuitState)(nil)).Elem() } type expressRouteCircuitArgs struct { // Allow the circuit to interact with classic (RDFE) resources. Defaults to `false`. AllowClassicOperations *bool `pulumi:"allowClassicOperations"` // The authorization key. This can be used to set up an ExpressRoute Circuit with an ExpressRoute Port from another subscription. AuthorizationKey *string `pulumi:"authorizationKey"` // The bandwidth in Gbps of the circuit being created on the Express Route Port. // // > **Note:** The `expressRoutePortId` and the `bandwidthInGbps` should be set together and they conflict with `serviceProviderName`, `peeringLocation` and `bandwidthInMbps`. BandwidthInGbps *float64 `pulumi:"bandwidthInGbps"` // The bandwidth in Mbps of the circuit being created on the Service Provider. // // > **Note:** Once you increase your bandwidth, you will not be able to decrease it to its previous value. // // > **Note:** The `serviceProviderName`, the `peeringLocation` and the `bandwidthInMbps` should be set together and they conflict with `expressRoutePortId` and `bandwidthInGbps`. BandwidthInMbps *int `pulumi:"bandwidthInMbps"` // The ID of the Express Route Port this Express Route Circuit is based on. Changing this forces a new resource to be created. ExpressRoutePortId *string `pulumi:"expressRoutePortId"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the ExpressRoute circuit. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the peering location and **not** the Azure resource location. Changing this forces a new resource to be created. PeeringLocation *string `pulumi:"peeringLocation"` // Enable [rate limiting](https://learn.microsoft.com/en-us/azure/expressroute/rate-limit) for the circuit. Only works with ExpressRoute Ports. Defaults to `false`. RateLimitingEnabled *bool `pulumi:"rateLimitingEnabled"` // The name of the resource group in which to create the ExpressRoute circuit. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The name of the ExpressRoute Service Provider. Changing this forces a new resource to be created. ServiceProviderName *string `pulumi:"serviceProviderName"` // A `sku` block for the ExpressRoute circuit as documented below. Sku ExpressRouteCircuitSku `pulumi:"sku"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a ExpressRouteCircuit resource. type ExpressRouteCircuitArgs struct { // Allow the circuit to interact with classic (RDFE) resources. Defaults to `false`. AllowClassicOperations pulumi.BoolPtrInput // The authorization key. This can be used to set up an ExpressRoute Circuit with an ExpressRoute Port from another subscription. AuthorizationKey pulumi.StringPtrInput // The bandwidth in Gbps of the circuit being created on the Express Route Port. // // > **Note:** The `expressRoutePortId` and the `bandwidthInGbps` should be set together and they conflict with `serviceProviderName`, `peeringLocation` and `bandwidthInMbps`. BandwidthInGbps pulumi.Float64PtrInput // The bandwidth in Mbps of the circuit being created on the Service Provider. // // > **Note:** Once you increase your bandwidth, you will not be able to decrease it to its previous value. // // > **Note:** The `serviceProviderName`, the `peeringLocation` and the `bandwidthInMbps` should be set together and they conflict with `expressRoutePortId` and `bandwidthInGbps`. BandwidthInMbps pulumi.IntPtrInput // The ID of the Express Route Port this Express Route Circuit is based on. Changing this forces a new resource to be created. ExpressRoutePortId pulumi.StringPtrInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the ExpressRoute circuit. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the peering location and **not** the Azure resource location. Changing this forces a new resource to be created. PeeringLocation pulumi.StringPtrInput // Enable [rate limiting](https://learn.microsoft.com/en-us/azure/expressroute/rate-limit) for the circuit. Only works with ExpressRoute Ports. Defaults to `false`. RateLimitingEnabled pulumi.BoolPtrInput // The name of the resource group in which to create the ExpressRoute circuit. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The name of the ExpressRoute Service Provider. Changing this forces a new resource to be created. ServiceProviderName pulumi.StringPtrInput // A `sku` block for the ExpressRoute circuit as documented below. Sku ExpressRouteCircuitSkuInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (ExpressRouteCircuitArgs) ElementType() reflect.Type { return reflect.TypeOf((*expressRouteCircuitArgs)(nil)).Elem() } type ExpressRouteCircuitInput interface { pulumi.Input ToExpressRouteCircuitOutput() ExpressRouteCircuitOutput ToExpressRouteCircuitOutputWithContext(ctx context.Context) ExpressRouteCircuitOutput } func (*ExpressRouteCircuit) ElementType() reflect.Type { return reflect.TypeOf((**ExpressRouteCircuit)(nil)).Elem() } func (i *ExpressRouteCircuit) ToExpressRouteCircuitOutput() ExpressRouteCircuitOutput { return i.ToExpressRouteCircuitOutputWithContext(context.Background()) } func (i *ExpressRouteCircuit) ToExpressRouteCircuitOutputWithContext(ctx context.Context) ExpressRouteCircuitOutput { return pulumi.ToOutputWithContext(ctx, i).(ExpressRouteCircuitOutput) } // ExpressRouteCircuitArrayInput is an input type that accepts ExpressRouteCircuitArray and ExpressRouteCircuitArrayOutput values. // You can construct a concrete instance of `ExpressRouteCircuitArrayInput` via: // // ExpressRouteCircuitArray{ ExpressRouteCircuitArgs{...} } type ExpressRouteCircuitArrayInput interface { pulumi.Input ToExpressRouteCircuitArrayOutput() ExpressRouteCircuitArrayOutput ToExpressRouteCircuitArrayOutputWithContext(context.Context) ExpressRouteCircuitArrayOutput } type ExpressRouteCircuitArray []ExpressRouteCircuitInput func (ExpressRouteCircuitArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ExpressRouteCircuit)(nil)).Elem() } func (i ExpressRouteCircuitArray) ToExpressRouteCircuitArrayOutput() ExpressRouteCircuitArrayOutput { return i.ToExpressRouteCircuitArrayOutputWithContext(context.Background()) } func (i ExpressRouteCircuitArray) ToExpressRouteCircuitArrayOutputWithContext(ctx context.Context) ExpressRouteCircuitArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ExpressRouteCircuitArrayOutput) } // ExpressRouteCircuitMapInput is an input type that accepts ExpressRouteCircuitMap and ExpressRouteCircuitMapOutput values. // You can construct a concrete instance of `ExpressRouteCircuitMapInput` via: // // ExpressRouteCircuitMap{ "key": ExpressRouteCircuitArgs{...} } type ExpressRouteCircuitMapInput interface { pulumi.Input ToExpressRouteCircuitMapOutput() ExpressRouteCircuitMapOutput ToExpressRouteCircuitMapOutputWithContext(context.Context) ExpressRouteCircuitMapOutput } type ExpressRouteCircuitMap map[string]ExpressRouteCircuitInput func (ExpressRouteCircuitMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ExpressRouteCircuit)(nil)).Elem() } func (i ExpressRouteCircuitMap) ToExpressRouteCircuitMapOutput() ExpressRouteCircuitMapOutput { return i.ToExpressRouteCircuitMapOutputWithContext(context.Background()) } func (i ExpressRouteCircuitMap) ToExpressRouteCircuitMapOutputWithContext(ctx context.Context) ExpressRouteCircuitMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ExpressRouteCircuitMapOutput) } type ExpressRouteCircuitOutput struct{ *pulumi.OutputState } func (ExpressRouteCircuitOutput) ElementType() reflect.Type { return reflect.TypeOf((**ExpressRouteCircuit)(nil)).Elem() } func (o ExpressRouteCircuitOutput) ToExpressRouteCircuitOutput() ExpressRouteCircuitOutput { return o } func (o ExpressRouteCircuitOutput) ToExpressRouteCircuitOutputWithContext(ctx context.Context) ExpressRouteCircuitOutput { return o } // Allow the circuit to interact with classic (RDFE) resources. Defaults to `false`. func (o ExpressRouteCircuitOutput) AllowClassicOperations() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ExpressRouteCircuit) pulumi.BoolPtrOutput { return v.AllowClassicOperations }).(pulumi.BoolPtrOutput) } // The authorization key. This can be used to set up an ExpressRoute Circuit with an ExpressRoute Port from another subscription. func (o ExpressRouteCircuitOutput) AuthorizationKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *ExpressRouteCircuit) pulumi.StringPtrOutput { return v.AuthorizationKey }).(pulumi.StringPtrOutput) } // The bandwidth in Gbps of the circuit being created on the Express Route Port. // // > **Note:** The `expressRoutePortId` and the `bandwidthInGbps` should be set together and they conflict with `serviceProviderName`, `peeringLocation` and `bandwidthInMbps`. func (o ExpressRouteCircuitOutput) BandwidthInGbps() pulumi.Float64PtrOutput { return o.ApplyT(func(v *ExpressRouteCircuit) pulumi.Float64PtrOutput { return v.BandwidthInGbps }).(pulumi.Float64PtrOutput) } // The bandwidth in Mbps of the circuit being created on the Service Provider. // // > **Note:** Once you increase your bandwidth, you will not be able to decrease it to its previous value. // // > **Note:** The `serviceProviderName`, the `peeringLocation` and the `bandwidthInMbps` should be set together and they conflict with `expressRoutePortId` and `bandwidthInGbps`. func (o ExpressRouteCircuitOutput) BandwidthInMbps() pulumi.IntPtrOutput { return o.ApplyT(func(v *ExpressRouteCircuit) pulumi.IntPtrOutput { return v.BandwidthInMbps }).(pulumi.IntPtrOutput) } // The ID of the Express Route Port this Express Route Circuit is based on. Changing this forces a new resource to be created. func (o ExpressRouteCircuitOutput) ExpressRoutePortId() pulumi.StringPtrOutput { return o.ApplyT(func(v *ExpressRouteCircuit) pulumi.StringPtrOutput { return v.ExpressRoutePortId }).(pulumi.StringPtrOutput) } // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. func (o ExpressRouteCircuitOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteCircuit) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name of the ExpressRoute circuit. Changing this forces a new resource to be created. func (o ExpressRouteCircuitOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteCircuit) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the peering location and **not** the Azure resource location. Changing this forces a new resource to be created. func (o ExpressRouteCircuitOutput) PeeringLocation() pulumi.StringPtrOutput { return o.ApplyT(func(v *ExpressRouteCircuit) pulumi.StringPtrOutput { return v.PeeringLocation }).(pulumi.StringPtrOutput) } // Enable [rate limiting](https://learn.microsoft.com/en-us/azure/expressroute/rate-limit) for the circuit. Only works with ExpressRoute Ports. Defaults to `false`. func (o ExpressRouteCircuitOutput) RateLimitingEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ExpressRouteCircuit) pulumi.BoolPtrOutput { return v.RateLimitingEnabled }).(pulumi.BoolPtrOutput) } // The name of the resource group in which to create the ExpressRoute circuit. Changing this forces a new resource to be created. func (o ExpressRouteCircuitOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteCircuit) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The string needed by the service provider to provision the ExpressRoute circuit. func (o ExpressRouteCircuitOutput) ServiceKey() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteCircuit) pulumi.StringOutput { return v.ServiceKey }).(pulumi.StringOutput) } // The name of the ExpressRoute Service Provider. Changing this forces a new resource to be created. func (o ExpressRouteCircuitOutput) ServiceProviderName() pulumi.StringPtrOutput { return o.ApplyT(func(v *ExpressRouteCircuit) pulumi.StringPtrOutput { return v.ServiceProviderName }).(pulumi.StringPtrOutput) } // The ExpressRoute circuit provisioning state from your chosen service provider. Possible values are `NotProvisioned`, `Provisioning`, `Provisioned`, and `Deprovisioning`. func (o ExpressRouteCircuitOutput) ServiceProviderProvisioningState() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteCircuit) pulumi.StringOutput { return v.ServiceProviderProvisioningState }).(pulumi.StringOutput) } // A `sku` block for the ExpressRoute circuit as documented below. func (o ExpressRouteCircuitOutput) Sku() ExpressRouteCircuitSkuOutput { return o.ApplyT(func(v *ExpressRouteCircuit) ExpressRouteCircuitSkuOutput { return v.Sku }).(ExpressRouteCircuitSkuOutput) } // A mapping of tags to assign to the resource. func (o ExpressRouteCircuitOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *ExpressRouteCircuit) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type ExpressRouteCircuitArrayOutput struct{ *pulumi.OutputState } func (ExpressRouteCircuitArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ExpressRouteCircuit)(nil)).Elem() } func (o ExpressRouteCircuitArrayOutput) ToExpressRouteCircuitArrayOutput() ExpressRouteCircuitArrayOutput { return o } func (o ExpressRouteCircuitArrayOutput) ToExpressRouteCircuitArrayOutputWithContext(ctx context.Context) ExpressRouteCircuitArrayOutput { return o } func (o ExpressRouteCircuitArrayOutput) Index(i pulumi.IntInput) ExpressRouteCircuitOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ExpressRouteCircuit { return vs[0].([]*ExpressRouteCircuit)[vs[1].(int)] }).(ExpressRouteCircuitOutput) } type ExpressRouteCircuitMapOutput struct{ *pulumi.OutputState } func (ExpressRouteCircuitMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ExpressRouteCircuit)(nil)).Elem() } func (o ExpressRouteCircuitMapOutput) ToExpressRouteCircuitMapOutput() ExpressRouteCircuitMapOutput { return o } func (o ExpressRouteCircuitMapOutput) ToExpressRouteCircuitMapOutputWithContext(ctx context.Context) ExpressRouteCircuitMapOutput { return o } func (o ExpressRouteCircuitMapOutput) MapIndex(k pulumi.StringInput) ExpressRouteCircuitOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ExpressRouteCircuit { return vs[0].(map[string]*ExpressRouteCircuit)[vs[1].(string)] }).(ExpressRouteCircuitOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ExpressRouteCircuitInput)(nil)).Elem(), &ExpressRouteCircuit{}) pulumi.RegisterInputType(reflect.TypeOf((*ExpressRouteCircuitArrayInput)(nil)).Elem(), ExpressRouteCircuitArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ExpressRouteCircuitMapInput)(nil)).Elem(), ExpressRouteCircuitMap{}) pulumi.RegisterOutputType(ExpressRouteCircuitOutput{}) pulumi.RegisterOutputType(ExpressRouteCircuitArrayOutput{}) pulumi.RegisterOutputType(ExpressRouteCircuitMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/trafficManagerAzureEndpoint.go
sdk/go/azure/network/trafficManagerAzureEndpoint.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Azure Endpoint within a Traffic Manager Profile. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("example-public-ip"), // Location: example.Location, // ResourceGroupName: example.Name, // AllocationMethod: pulumi.String("Static"), // DomainNameLabel: pulumi.String("example-public-ip"), // }) // if err != nil { // return err // } // exampleTrafficManagerProfile, err := network.NewTrafficManagerProfile(ctx, "example", &network.TrafficManagerProfileArgs{ // Name: pulumi.String("example-profile"), // ResourceGroupName: example.Name, // TrafficRoutingMethod: pulumi.String("Weighted"), // DnsConfig: &network.TrafficManagerProfileDnsConfigArgs{ // RelativeName: pulumi.String("example-profile"), // Ttl: pulumi.Int(100), // }, // MonitorConfig: &network.TrafficManagerProfileMonitorConfigArgs{ // Protocol: pulumi.String("HTTP"), // Port: pulumi.Int(80), // Path: pulumi.String("/"), // IntervalInSeconds: pulumi.Int(30), // TimeoutInSeconds: pulumi.Int(9), // ToleratedNumberOfFailures: pulumi.Int(3), // }, // Tags: pulumi.StringMap{ // "environment": pulumi.String("Production"), // }, // }) // if err != nil { // return err // } // _, err = network.NewTrafficManagerAzureEndpoint(ctx, "example", &network.TrafficManagerAzureEndpointArgs{ // Name: pulumi.String("example-endpoint"), // ProfileId: exampleTrafficManagerProfile.ID(), // AlwaysServeEnabled: pulumi.Bool(true), // Weight: pulumi.Int(100), // TargetResourceId: examplePublicIp.ID(), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2022-04-01 // // ## Import // // Azure Endpoints can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/trafficManagerAzureEndpoint:TrafficManagerAzureEndpoint example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-resources/providers/Microsoft.Network/trafficManagerProfiles/example-profile/AzureEndpoints/example-endpoint // ``` type TrafficManagerAzureEndpoint struct { pulumi.CustomResourceState // If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method. Defaults to `false`. AlwaysServeEnabled pulumi.BoolPtrOutput `pulumi:"alwaysServeEnabled"` // One or more `customHeader` blocks as defined below. CustomHeaders TrafficManagerAzureEndpointCustomHeaderArrayOutput `pulumi:"customHeaders"` // Is the endpoint enabled? Defaults to `true`. Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` // A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault). GeoMappings pulumi.StringArrayOutput `pulumi:"geoMappings"` // The name of the Azure Endpoint. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation. Priority pulumi.IntOutput `pulumi:"priority"` // The ID of the Traffic Manager Profile that this Azure Endpoint should be created within. Changing this forces a new resource to be created. ProfileId pulumi.StringOutput `pulumi:"profileId"` // One or more `subnet` blocks as defined below. Changing this forces a new resource to be created. Subnets TrafficManagerAzureEndpointSubnetArrayOutput `pulumi:"subnets"` // The ID of the Azure Resource which should be used as a target. TargetResourceId pulumi.StringOutput `pulumi:"targetResourceId"` // Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`. Weight pulumi.IntPtrOutput `pulumi:"weight"` } // NewTrafficManagerAzureEndpoint registers a new resource with the given unique name, arguments, and options. func NewTrafficManagerAzureEndpoint(ctx *pulumi.Context, name string, args *TrafficManagerAzureEndpointArgs, opts ...pulumi.ResourceOption) (*TrafficManagerAzureEndpoint, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ProfileId == nil { return nil, errors.New("invalid value for required argument 'ProfileId'") } if args.TargetResourceId == nil { return nil, errors.New("invalid value for required argument 'TargetResourceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource TrafficManagerAzureEndpoint err := ctx.RegisterResource("azure:network/trafficManagerAzureEndpoint:TrafficManagerAzureEndpoint", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetTrafficManagerAzureEndpoint gets an existing TrafficManagerAzureEndpoint resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetTrafficManagerAzureEndpoint(ctx *pulumi.Context, name string, id pulumi.IDInput, state *TrafficManagerAzureEndpointState, opts ...pulumi.ResourceOption) (*TrafficManagerAzureEndpoint, error) { var resource TrafficManagerAzureEndpoint err := ctx.ReadResource("azure:network/trafficManagerAzureEndpoint:TrafficManagerAzureEndpoint", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering TrafficManagerAzureEndpoint resources. type trafficManagerAzureEndpointState struct { // If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method. Defaults to `false`. AlwaysServeEnabled *bool `pulumi:"alwaysServeEnabled"` // One or more `customHeader` blocks as defined below. CustomHeaders []TrafficManagerAzureEndpointCustomHeader `pulumi:"customHeaders"` // Is the endpoint enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault). GeoMappings []string `pulumi:"geoMappings"` // The name of the Azure Endpoint. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation. Priority *int `pulumi:"priority"` // The ID of the Traffic Manager Profile that this Azure Endpoint should be created within. Changing this forces a new resource to be created. ProfileId *string `pulumi:"profileId"` // One or more `subnet` blocks as defined below. Changing this forces a new resource to be created. Subnets []TrafficManagerAzureEndpointSubnet `pulumi:"subnets"` // The ID of the Azure Resource which should be used as a target. TargetResourceId *string `pulumi:"targetResourceId"` // Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`. Weight *int `pulumi:"weight"` } type TrafficManagerAzureEndpointState struct { // If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method. Defaults to `false`. AlwaysServeEnabled pulumi.BoolPtrInput // One or more `customHeader` blocks as defined below. CustomHeaders TrafficManagerAzureEndpointCustomHeaderArrayInput // Is the endpoint enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault). GeoMappings pulumi.StringArrayInput // The name of the Azure Endpoint. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation. Priority pulumi.IntPtrInput // The ID of the Traffic Manager Profile that this Azure Endpoint should be created within. Changing this forces a new resource to be created. ProfileId pulumi.StringPtrInput // One or more `subnet` blocks as defined below. Changing this forces a new resource to be created. Subnets TrafficManagerAzureEndpointSubnetArrayInput // The ID of the Azure Resource which should be used as a target. TargetResourceId pulumi.StringPtrInput // Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`. Weight pulumi.IntPtrInput } func (TrafficManagerAzureEndpointState) ElementType() reflect.Type { return reflect.TypeOf((*trafficManagerAzureEndpointState)(nil)).Elem() } type trafficManagerAzureEndpointArgs struct { // If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method. Defaults to `false`. AlwaysServeEnabled *bool `pulumi:"alwaysServeEnabled"` // One or more `customHeader` blocks as defined below. CustomHeaders []TrafficManagerAzureEndpointCustomHeader `pulumi:"customHeaders"` // Is the endpoint enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault). GeoMappings []string `pulumi:"geoMappings"` // The name of the Azure Endpoint. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation. Priority *int `pulumi:"priority"` // The ID of the Traffic Manager Profile that this Azure Endpoint should be created within. Changing this forces a new resource to be created. ProfileId string `pulumi:"profileId"` // One or more `subnet` blocks as defined below. Changing this forces a new resource to be created. Subnets []TrafficManagerAzureEndpointSubnet `pulumi:"subnets"` // The ID of the Azure Resource which should be used as a target. TargetResourceId string `pulumi:"targetResourceId"` // Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`. Weight *int `pulumi:"weight"` } // The set of arguments for constructing a TrafficManagerAzureEndpoint resource. type TrafficManagerAzureEndpointArgs struct { // If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method. Defaults to `false`. AlwaysServeEnabled pulumi.BoolPtrInput // One or more `customHeader` blocks as defined below. CustomHeaders TrafficManagerAzureEndpointCustomHeaderArrayInput // Is the endpoint enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault). GeoMappings pulumi.StringArrayInput // The name of the Azure Endpoint. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation. Priority pulumi.IntPtrInput // The ID of the Traffic Manager Profile that this Azure Endpoint should be created within. Changing this forces a new resource to be created. ProfileId pulumi.StringInput // One or more `subnet` blocks as defined below. Changing this forces a new resource to be created. Subnets TrafficManagerAzureEndpointSubnetArrayInput // The ID of the Azure Resource which should be used as a target. TargetResourceId pulumi.StringInput // Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`. Weight pulumi.IntPtrInput } func (TrafficManagerAzureEndpointArgs) ElementType() reflect.Type { return reflect.TypeOf((*trafficManagerAzureEndpointArgs)(nil)).Elem() } type TrafficManagerAzureEndpointInput interface { pulumi.Input ToTrafficManagerAzureEndpointOutput() TrafficManagerAzureEndpointOutput ToTrafficManagerAzureEndpointOutputWithContext(ctx context.Context) TrafficManagerAzureEndpointOutput } func (*TrafficManagerAzureEndpoint) ElementType() reflect.Type { return reflect.TypeOf((**TrafficManagerAzureEndpoint)(nil)).Elem() } func (i *TrafficManagerAzureEndpoint) ToTrafficManagerAzureEndpointOutput() TrafficManagerAzureEndpointOutput { return i.ToTrafficManagerAzureEndpointOutputWithContext(context.Background()) } func (i *TrafficManagerAzureEndpoint) ToTrafficManagerAzureEndpointOutputWithContext(ctx context.Context) TrafficManagerAzureEndpointOutput { return pulumi.ToOutputWithContext(ctx, i).(TrafficManagerAzureEndpointOutput) } // TrafficManagerAzureEndpointArrayInput is an input type that accepts TrafficManagerAzureEndpointArray and TrafficManagerAzureEndpointArrayOutput values. // You can construct a concrete instance of `TrafficManagerAzureEndpointArrayInput` via: // // TrafficManagerAzureEndpointArray{ TrafficManagerAzureEndpointArgs{...} } type TrafficManagerAzureEndpointArrayInput interface { pulumi.Input ToTrafficManagerAzureEndpointArrayOutput() TrafficManagerAzureEndpointArrayOutput ToTrafficManagerAzureEndpointArrayOutputWithContext(context.Context) TrafficManagerAzureEndpointArrayOutput } type TrafficManagerAzureEndpointArray []TrafficManagerAzureEndpointInput func (TrafficManagerAzureEndpointArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*TrafficManagerAzureEndpoint)(nil)).Elem() } func (i TrafficManagerAzureEndpointArray) ToTrafficManagerAzureEndpointArrayOutput() TrafficManagerAzureEndpointArrayOutput { return i.ToTrafficManagerAzureEndpointArrayOutputWithContext(context.Background()) } func (i TrafficManagerAzureEndpointArray) ToTrafficManagerAzureEndpointArrayOutputWithContext(ctx context.Context) TrafficManagerAzureEndpointArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(TrafficManagerAzureEndpointArrayOutput) } // TrafficManagerAzureEndpointMapInput is an input type that accepts TrafficManagerAzureEndpointMap and TrafficManagerAzureEndpointMapOutput values. // You can construct a concrete instance of `TrafficManagerAzureEndpointMapInput` via: // // TrafficManagerAzureEndpointMap{ "key": TrafficManagerAzureEndpointArgs{...} } type TrafficManagerAzureEndpointMapInput interface { pulumi.Input ToTrafficManagerAzureEndpointMapOutput() TrafficManagerAzureEndpointMapOutput ToTrafficManagerAzureEndpointMapOutputWithContext(context.Context) TrafficManagerAzureEndpointMapOutput } type TrafficManagerAzureEndpointMap map[string]TrafficManagerAzureEndpointInput func (TrafficManagerAzureEndpointMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*TrafficManagerAzureEndpoint)(nil)).Elem() } func (i TrafficManagerAzureEndpointMap) ToTrafficManagerAzureEndpointMapOutput() TrafficManagerAzureEndpointMapOutput { return i.ToTrafficManagerAzureEndpointMapOutputWithContext(context.Background()) } func (i TrafficManagerAzureEndpointMap) ToTrafficManagerAzureEndpointMapOutputWithContext(ctx context.Context) TrafficManagerAzureEndpointMapOutput { return pulumi.ToOutputWithContext(ctx, i).(TrafficManagerAzureEndpointMapOutput) } type TrafficManagerAzureEndpointOutput struct{ *pulumi.OutputState } func (TrafficManagerAzureEndpointOutput) ElementType() reflect.Type { return reflect.TypeOf((**TrafficManagerAzureEndpoint)(nil)).Elem() } func (o TrafficManagerAzureEndpointOutput) ToTrafficManagerAzureEndpointOutput() TrafficManagerAzureEndpointOutput { return o } func (o TrafficManagerAzureEndpointOutput) ToTrafficManagerAzureEndpointOutputWithContext(ctx context.Context) TrafficManagerAzureEndpointOutput { return o } // If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method. Defaults to `false`. func (o TrafficManagerAzureEndpointOutput) AlwaysServeEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *TrafficManagerAzureEndpoint) pulumi.BoolPtrOutput { return v.AlwaysServeEnabled }).(pulumi.BoolPtrOutput) } // One or more `customHeader` blocks as defined below. func (o TrafficManagerAzureEndpointOutput) CustomHeaders() TrafficManagerAzureEndpointCustomHeaderArrayOutput { return o.ApplyT(func(v *TrafficManagerAzureEndpoint) TrafficManagerAzureEndpointCustomHeaderArrayOutput { return v.CustomHeaders }).(TrafficManagerAzureEndpointCustomHeaderArrayOutput) } // Is the endpoint enabled? Defaults to `true`. func (o TrafficManagerAzureEndpointOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *TrafficManagerAzureEndpoint) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput) } // A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault). func (o TrafficManagerAzureEndpointOutput) GeoMappings() pulumi.StringArrayOutput { return o.ApplyT(func(v *TrafficManagerAzureEndpoint) pulumi.StringArrayOutput { return v.GeoMappings }).(pulumi.StringArrayOutput) } // The name of the Azure Endpoint. Changing this forces a new resource to be created. func (o TrafficManagerAzureEndpointOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *TrafficManagerAzureEndpoint) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation. func (o TrafficManagerAzureEndpointOutput) Priority() pulumi.IntOutput { return o.ApplyT(func(v *TrafficManagerAzureEndpoint) pulumi.IntOutput { return v.Priority }).(pulumi.IntOutput) } // The ID of the Traffic Manager Profile that this Azure Endpoint should be created within. Changing this forces a new resource to be created. func (o TrafficManagerAzureEndpointOutput) ProfileId() pulumi.StringOutput { return o.ApplyT(func(v *TrafficManagerAzureEndpoint) pulumi.StringOutput { return v.ProfileId }).(pulumi.StringOutput) } // One or more `subnet` blocks as defined below. Changing this forces a new resource to be created. func (o TrafficManagerAzureEndpointOutput) Subnets() TrafficManagerAzureEndpointSubnetArrayOutput { return o.ApplyT(func(v *TrafficManagerAzureEndpoint) TrafficManagerAzureEndpointSubnetArrayOutput { return v.Subnets }).(TrafficManagerAzureEndpointSubnetArrayOutput) } // The ID of the Azure Resource which should be used as a target. func (o TrafficManagerAzureEndpointOutput) TargetResourceId() pulumi.StringOutput { return o.ApplyT(func(v *TrafficManagerAzureEndpoint) pulumi.StringOutput { return v.TargetResourceId }).(pulumi.StringOutput) } // Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`. func (o TrafficManagerAzureEndpointOutput) Weight() pulumi.IntPtrOutput { return o.ApplyT(func(v *TrafficManagerAzureEndpoint) pulumi.IntPtrOutput { return v.Weight }).(pulumi.IntPtrOutput) } type TrafficManagerAzureEndpointArrayOutput struct{ *pulumi.OutputState } func (TrafficManagerAzureEndpointArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*TrafficManagerAzureEndpoint)(nil)).Elem() } func (o TrafficManagerAzureEndpointArrayOutput) ToTrafficManagerAzureEndpointArrayOutput() TrafficManagerAzureEndpointArrayOutput { return o } func (o TrafficManagerAzureEndpointArrayOutput) ToTrafficManagerAzureEndpointArrayOutputWithContext(ctx context.Context) TrafficManagerAzureEndpointArrayOutput { return o } func (o TrafficManagerAzureEndpointArrayOutput) Index(i pulumi.IntInput) TrafficManagerAzureEndpointOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TrafficManagerAzureEndpoint { return vs[0].([]*TrafficManagerAzureEndpoint)[vs[1].(int)] }).(TrafficManagerAzureEndpointOutput) } type TrafficManagerAzureEndpointMapOutput struct{ *pulumi.OutputState } func (TrafficManagerAzureEndpointMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*TrafficManagerAzureEndpoint)(nil)).Elem() } func (o TrafficManagerAzureEndpointMapOutput) ToTrafficManagerAzureEndpointMapOutput() TrafficManagerAzureEndpointMapOutput { return o } func (o TrafficManagerAzureEndpointMapOutput) ToTrafficManagerAzureEndpointMapOutputWithContext(ctx context.Context) TrafficManagerAzureEndpointMapOutput { return o } func (o TrafficManagerAzureEndpointMapOutput) MapIndex(k pulumi.StringInput) TrafficManagerAzureEndpointOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TrafficManagerAzureEndpoint { return vs[0].(map[string]*TrafficManagerAzureEndpoint)[vs[1].(string)] }).(TrafficManagerAzureEndpointOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*TrafficManagerAzureEndpointInput)(nil)).Elem(), &TrafficManagerAzureEndpoint{}) pulumi.RegisterInputType(reflect.TypeOf((*TrafficManagerAzureEndpointArrayInput)(nil)).Elem(), TrafficManagerAzureEndpointArray{}) pulumi.RegisterInputType(reflect.TypeOf((*TrafficManagerAzureEndpointMapInput)(nil)).Elem(), TrafficManagerAzureEndpointMap{}) pulumi.RegisterOutputType(TrafficManagerAzureEndpointOutput{}) pulumi.RegisterOutputType(TrafficManagerAzureEndpointArrayOutput{}) pulumi.RegisterOutputType(TrafficManagerAzureEndpointMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/networkManagerScopeConnection.go
sdk/go/azure/network/networkManagerScopeConnection.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Network Manager Scope Connection which may cross tenants. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // currentGetSubscription, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // alt, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{ // SubscriptionId: pulumi.StringRef("00000000-0000-0000-0000-000000000000"), // }, nil) // if err != nil { // return err // } // exampleNetworkManager, err := network.NewNetworkManager(ctx, "example", &network.NetworkManagerArgs{ // Name: pulumi.String("example-networkmanager"), // Location: example.Location, // ResourceGroupName: example.Name, // Scope: &network.NetworkManagerScopeArgs{ // SubscriptionIds: pulumi.StringArray{ // pulumi.String(currentGetSubscription.Id), // }, // }, // ScopeAccesses: pulumi.StringArray{ // pulumi.String("SecurityAdmin"), // }, // }) // if err != nil { // return err // } // _, err = network.NewNetworkManagerScopeConnection(ctx, "example", &network.NetworkManagerScopeConnectionArgs{ // Name: pulumi.String("example-nsc"), // NetworkManagerId: exampleNetworkManager.ID(), // TenantId: pulumi.String(current.TenantId), // TargetScopeId: pulumi.String(alt.Id), // Description: pulumi.String("example"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Network Manager Scope Connection can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/networkManagerScopeConnection:NetworkManagerScopeConnection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Network/networkManagers/networkManager1/scopeConnections/scopeConnection1 // ``` type NetworkManagerScopeConnection struct { pulumi.CustomResourceState // The Connection state of the Network Manager Scope Connection. ConnectionState pulumi.StringOutput `pulumi:"connectionState"` // A description of the Network Manager Scope Connection. Description pulumi.StringPtrOutput `pulumi:"description"` // Specifies the name which should be used for this Network Manager Scope Connection. Changing this forces a new Network Manager Scope Connection to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the ID of the Network Manager Scope Connection. Changing this forces a new Network Manager Scope Connection to be created. NetworkManagerId pulumi.StringOutput `pulumi:"networkManagerId"` // Specifies the Resource ID of the target scope which the Network Manager is connected to. It should be either Subscription ID or Management Group ID. TargetScopeId pulumi.StringOutput `pulumi:"targetScopeId"` // Specifies the Tenant ID of the Resource which the Network Manager is connected to. TenantId pulumi.StringOutput `pulumi:"tenantId"` } // NewNetworkManagerScopeConnection registers a new resource with the given unique name, arguments, and options. func NewNetworkManagerScopeConnection(ctx *pulumi.Context, name string, args *NetworkManagerScopeConnectionArgs, opts ...pulumi.ResourceOption) (*NetworkManagerScopeConnection, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.NetworkManagerId == nil { return nil, errors.New("invalid value for required argument 'NetworkManagerId'") } if args.TargetScopeId == nil { return nil, errors.New("invalid value for required argument 'TargetScopeId'") } if args.TenantId == nil { return nil, errors.New("invalid value for required argument 'TenantId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkManagerScopeConnection err := ctx.RegisterResource("azure:network/networkManagerScopeConnection:NetworkManagerScopeConnection", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkManagerScopeConnection gets an existing NetworkManagerScopeConnection resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetNetworkManagerScopeConnection(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkManagerScopeConnectionState, opts ...pulumi.ResourceOption) (*NetworkManagerScopeConnection, error) { var resource NetworkManagerScopeConnection err := ctx.ReadResource("azure:network/networkManagerScopeConnection:NetworkManagerScopeConnection", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkManagerScopeConnection resources. type networkManagerScopeConnectionState struct { // The Connection state of the Network Manager Scope Connection. ConnectionState *string `pulumi:"connectionState"` // A description of the Network Manager Scope Connection. Description *string `pulumi:"description"` // Specifies the name which should be used for this Network Manager Scope Connection. Changing this forces a new Network Manager Scope Connection to be created. Name *string `pulumi:"name"` // Specifies the ID of the Network Manager Scope Connection. Changing this forces a new Network Manager Scope Connection to be created. NetworkManagerId *string `pulumi:"networkManagerId"` // Specifies the Resource ID of the target scope which the Network Manager is connected to. It should be either Subscription ID or Management Group ID. TargetScopeId *string `pulumi:"targetScopeId"` // Specifies the Tenant ID of the Resource which the Network Manager is connected to. TenantId *string `pulumi:"tenantId"` } type NetworkManagerScopeConnectionState struct { // The Connection state of the Network Manager Scope Connection. ConnectionState pulumi.StringPtrInput // A description of the Network Manager Scope Connection. Description pulumi.StringPtrInput // Specifies the name which should be used for this Network Manager Scope Connection. Changing this forces a new Network Manager Scope Connection to be created. Name pulumi.StringPtrInput // Specifies the ID of the Network Manager Scope Connection. Changing this forces a new Network Manager Scope Connection to be created. NetworkManagerId pulumi.StringPtrInput // Specifies the Resource ID of the target scope which the Network Manager is connected to. It should be either Subscription ID or Management Group ID. TargetScopeId pulumi.StringPtrInput // Specifies the Tenant ID of the Resource which the Network Manager is connected to. TenantId pulumi.StringPtrInput } func (NetworkManagerScopeConnectionState) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerScopeConnectionState)(nil)).Elem() } type networkManagerScopeConnectionArgs struct { // A description of the Network Manager Scope Connection. Description *string `pulumi:"description"` // Specifies the name which should be used for this Network Manager Scope Connection. Changing this forces a new Network Manager Scope Connection to be created. Name *string `pulumi:"name"` // Specifies the ID of the Network Manager Scope Connection. Changing this forces a new Network Manager Scope Connection to be created. NetworkManagerId string `pulumi:"networkManagerId"` // Specifies the Resource ID of the target scope which the Network Manager is connected to. It should be either Subscription ID or Management Group ID. TargetScopeId string `pulumi:"targetScopeId"` // Specifies the Tenant ID of the Resource which the Network Manager is connected to. TenantId string `pulumi:"tenantId"` } // The set of arguments for constructing a NetworkManagerScopeConnection resource. type NetworkManagerScopeConnectionArgs struct { // A description of the Network Manager Scope Connection. Description pulumi.StringPtrInput // Specifies the name which should be used for this Network Manager Scope Connection. Changing this forces a new Network Manager Scope Connection to be created. Name pulumi.StringPtrInput // Specifies the ID of the Network Manager Scope Connection. Changing this forces a new Network Manager Scope Connection to be created. NetworkManagerId pulumi.StringInput // Specifies the Resource ID of the target scope which the Network Manager is connected to. It should be either Subscription ID or Management Group ID. TargetScopeId pulumi.StringInput // Specifies the Tenant ID of the Resource which the Network Manager is connected to. TenantId pulumi.StringInput } func (NetworkManagerScopeConnectionArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerScopeConnectionArgs)(nil)).Elem() } type NetworkManagerScopeConnectionInput interface { pulumi.Input ToNetworkManagerScopeConnectionOutput() NetworkManagerScopeConnectionOutput ToNetworkManagerScopeConnectionOutputWithContext(ctx context.Context) NetworkManagerScopeConnectionOutput } func (*NetworkManagerScopeConnection) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerScopeConnection)(nil)).Elem() } func (i *NetworkManagerScopeConnection) ToNetworkManagerScopeConnectionOutput() NetworkManagerScopeConnectionOutput { return i.ToNetworkManagerScopeConnectionOutputWithContext(context.Background()) } func (i *NetworkManagerScopeConnection) ToNetworkManagerScopeConnectionOutputWithContext(ctx context.Context) NetworkManagerScopeConnectionOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerScopeConnectionOutput) } // NetworkManagerScopeConnectionArrayInput is an input type that accepts NetworkManagerScopeConnectionArray and NetworkManagerScopeConnectionArrayOutput values. // You can construct a concrete instance of `NetworkManagerScopeConnectionArrayInput` via: // // NetworkManagerScopeConnectionArray{ NetworkManagerScopeConnectionArgs{...} } type NetworkManagerScopeConnectionArrayInput interface { pulumi.Input ToNetworkManagerScopeConnectionArrayOutput() NetworkManagerScopeConnectionArrayOutput ToNetworkManagerScopeConnectionArrayOutputWithContext(context.Context) NetworkManagerScopeConnectionArrayOutput } type NetworkManagerScopeConnectionArray []NetworkManagerScopeConnectionInput func (NetworkManagerScopeConnectionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerScopeConnection)(nil)).Elem() } func (i NetworkManagerScopeConnectionArray) ToNetworkManagerScopeConnectionArrayOutput() NetworkManagerScopeConnectionArrayOutput { return i.ToNetworkManagerScopeConnectionArrayOutputWithContext(context.Background()) } func (i NetworkManagerScopeConnectionArray) ToNetworkManagerScopeConnectionArrayOutputWithContext(ctx context.Context) NetworkManagerScopeConnectionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerScopeConnectionArrayOutput) } // NetworkManagerScopeConnectionMapInput is an input type that accepts NetworkManagerScopeConnectionMap and NetworkManagerScopeConnectionMapOutput values. // You can construct a concrete instance of `NetworkManagerScopeConnectionMapInput` via: // // NetworkManagerScopeConnectionMap{ "key": NetworkManagerScopeConnectionArgs{...} } type NetworkManagerScopeConnectionMapInput interface { pulumi.Input ToNetworkManagerScopeConnectionMapOutput() NetworkManagerScopeConnectionMapOutput ToNetworkManagerScopeConnectionMapOutputWithContext(context.Context) NetworkManagerScopeConnectionMapOutput } type NetworkManagerScopeConnectionMap map[string]NetworkManagerScopeConnectionInput func (NetworkManagerScopeConnectionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerScopeConnection)(nil)).Elem() } func (i NetworkManagerScopeConnectionMap) ToNetworkManagerScopeConnectionMapOutput() NetworkManagerScopeConnectionMapOutput { return i.ToNetworkManagerScopeConnectionMapOutputWithContext(context.Background()) } func (i NetworkManagerScopeConnectionMap) ToNetworkManagerScopeConnectionMapOutputWithContext(ctx context.Context) NetworkManagerScopeConnectionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerScopeConnectionMapOutput) } type NetworkManagerScopeConnectionOutput struct{ *pulumi.OutputState } func (NetworkManagerScopeConnectionOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerScopeConnection)(nil)).Elem() } func (o NetworkManagerScopeConnectionOutput) ToNetworkManagerScopeConnectionOutput() NetworkManagerScopeConnectionOutput { return o } func (o NetworkManagerScopeConnectionOutput) ToNetworkManagerScopeConnectionOutputWithContext(ctx context.Context) NetworkManagerScopeConnectionOutput { return o } // The Connection state of the Network Manager Scope Connection. func (o NetworkManagerScopeConnectionOutput) ConnectionState() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerScopeConnection) pulumi.StringOutput { return v.ConnectionState }).(pulumi.StringOutput) } // A description of the Network Manager Scope Connection. func (o NetworkManagerScopeConnectionOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkManagerScopeConnection) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // Specifies the name which should be used for this Network Manager Scope Connection. Changing this forces a new Network Manager Scope Connection to be created. func (o NetworkManagerScopeConnectionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerScopeConnection) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the ID of the Network Manager Scope Connection. Changing this forces a new Network Manager Scope Connection to be created. func (o NetworkManagerScopeConnectionOutput) NetworkManagerId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerScopeConnection) pulumi.StringOutput { return v.NetworkManagerId }).(pulumi.StringOutput) } // Specifies the Resource ID of the target scope which the Network Manager is connected to. It should be either Subscription ID or Management Group ID. func (o NetworkManagerScopeConnectionOutput) TargetScopeId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerScopeConnection) pulumi.StringOutput { return v.TargetScopeId }).(pulumi.StringOutput) } // Specifies the Tenant ID of the Resource which the Network Manager is connected to. func (o NetworkManagerScopeConnectionOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerScopeConnection) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput) } type NetworkManagerScopeConnectionArrayOutput struct{ *pulumi.OutputState } func (NetworkManagerScopeConnectionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerScopeConnection)(nil)).Elem() } func (o NetworkManagerScopeConnectionArrayOutput) ToNetworkManagerScopeConnectionArrayOutput() NetworkManagerScopeConnectionArrayOutput { return o } func (o NetworkManagerScopeConnectionArrayOutput) ToNetworkManagerScopeConnectionArrayOutputWithContext(ctx context.Context) NetworkManagerScopeConnectionArrayOutput { return o } func (o NetworkManagerScopeConnectionArrayOutput) Index(i pulumi.IntInput) NetworkManagerScopeConnectionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkManagerScopeConnection { return vs[0].([]*NetworkManagerScopeConnection)[vs[1].(int)] }).(NetworkManagerScopeConnectionOutput) } type NetworkManagerScopeConnectionMapOutput struct{ *pulumi.OutputState } func (NetworkManagerScopeConnectionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerScopeConnection)(nil)).Elem() } func (o NetworkManagerScopeConnectionMapOutput) ToNetworkManagerScopeConnectionMapOutput() NetworkManagerScopeConnectionMapOutput { return o } func (o NetworkManagerScopeConnectionMapOutput) ToNetworkManagerScopeConnectionMapOutputWithContext(ctx context.Context) NetworkManagerScopeConnectionMapOutput { return o } func (o NetworkManagerScopeConnectionMapOutput) MapIndex(k pulumi.StringInput) NetworkManagerScopeConnectionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkManagerScopeConnection { return vs[0].(map[string]*NetworkManagerScopeConnection)[vs[1].(string)] }).(NetworkManagerScopeConnectionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerScopeConnectionInput)(nil)).Elem(), &NetworkManagerScopeConnection{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerScopeConnectionArrayInput)(nil)).Elem(), NetworkManagerScopeConnectionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerScopeConnectionMapInput)(nil)).Elem(), NetworkManagerScopeConnectionMap{}) pulumi.RegisterOutputType(NetworkManagerScopeConnectionOutput{}) pulumi.RegisterOutputType(NetworkManagerScopeConnectionArrayOutput{}) pulumi.RegisterOutputType(NetworkManagerScopeConnectionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/vpnServerConfigurationPolicyGroup.go
sdk/go/azure/network/vpnServerConfigurationPolicyGroup.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a VPN Server Configuration Policy Group. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVpnServerConfiguration, err := network.NewVpnServerConfiguration(ctx, "example", &network.VpnServerConfigurationArgs{ // Name: pulumi.String("example-VPNSC"), // ResourceGroupName: example.Name, // Location: example.Location, // VpnAuthenticationTypes: pulumi.StringArray{ // pulumi.String("Radius"), // }, // Radius: &network.VpnServerConfigurationRadiusArgs{ // Servers: network.VpnServerConfigurationRadiusServerArray{ // &network.VpnServerConfigurationRadiusServerArgs{ // Address: pulumi.String("10.105.1.1"), // Secret: pulumi.String("vindicators-the-return-of-worldender"), // Score: pulumi.Int(15), // }, // }, // }, // }) // if err != nil { // return err // } // _, err = network.NewVpnServerConfigurationPolicyGroup(ctx, "example", &network.VpnServerConfigurationPolicyGroupArgs{ // Name: pulumi.String("example-VPNSCPG"), // VpnServerConfigurationId: exampleVpnServerConfiguration.ID(), // Policies: network.VpnServerConfigurationPolicyGroupPolicyArray{ // &network.VpnServerConfigurationPolicyGroupPolicyArgs{ // Name: pulumi.String("policy1"), // Type: pulumi.String("RadiusAzureGroupId"), // Value: pulumi.String("6ad1bd08"), // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // VPN Server Configuration Policy Groups can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/vpnServerConfigurationPolicyGroup:VpnServerConfigurationPolicyGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.Network/vpnServerConfigurations/serverConfiguration1/configurationPolicyGroups/configurationPolicyGroup1 // ``` type VpnServerConfigurationPolicyGroup struct { pulumi.CustomResourceState // Is this a default VPN Server Configuration Policy Group? Defaults to `false`. Changing this forces a new resource to be created. IsDefault pulumi.BoolPtrOutput `pulumi:"isDefault"` // The Name which should be used for this VPN Server Configuration Policy Group. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // One or more `policy` blocks as documented below. Policies VpnServerConfigurationPolicyGroupPolicyArrayOutput `pulumi:"policies"` // The priority of this VPN Server Configuration Policy Group. Defaults to `0`. Priority pulumi.IntPtrOutput `pulumi:"priority"` // The ID of the VPN Server Configuration that the VPN Server Configuration Policy Group belongs to. Changing this forces a new resource to be created. VpnServerConfigurationId pulumi.StringOutput `pulumi:"vpnServerConfigurationId"` } // NewVpnServerConfigurationPolicyGroup registers a new resource with the given unique name, arguments, and options. func NewVpnServerConfigurationPolicyGroup(ctx *pulumi.Context, name string, args *VpnServerConfigurationPolicyGroupArgs, opts ...pulumi.ResourceOption) (*VpnServerConfigurationPolicyGroup, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Policies == nil { return nil, errors.New("invalid value for required argument 'Policies'") } if args.VpnServerConfigurationId == nil { return nil, errors.New("invalid value for required argument 'VpnServerConfigurationId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource VpnServerConfigurationPolicyGroup err := ctx.RegisterResource("azure:network/vpnServerConfigurationPolicyGroup:VpnServerConfigurationPolicyGroup", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVpnServerConfigurationPolicyGroup gets an existing VpnServerConfigurationPolicyGroup resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetVpnServerConfigurationPolicyGroup(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VpnServerConfigurationPolicyGroupState, opts ...pulumi.ResourceOption) (*VpnServerConfigurationPolicyGroup, error) { var resource VpnServerConfigurationPolicyGroup err := ctx.ReadResource("azure:network/vpnServerConfigurationPolicyGroup:VpnServerConfigurationPolicyGroup", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VpnServerConfigurationPolicyGroup resources. type vpnServerConfigurationPolicyGroupState struct { // Is this a default VPN Server Configuration Policy Group? Defaults to `false`. Changing this forces a new resource to be created. IsDefault *bool `pulumi:"isDefault"` // The Name which should be used for this VPN Server Configuration Policy Group. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // One or more `policy` blocks as documented below. Policies []VpnServerConfigurationPolicyGroupPolicy `pulumi:"policies"` // The priority of this VPN Server Configuration Policy Group. Defaults to `0`. Priority *int `pulumi:"priority"` // The ID of the VPN Server Configuration that the VPN Server Configuration Policy Group belongs to. Changing this forces a new resource to be created. VpnServerConfigurationId *string `pulumi:"vpnServerConfigurationId"` } type VpnServerConfigurationPolicyGroupState struct { // Is this a default VPN Server Configuration Policy Group? Defaults to `false`. Changing this forces a new resource to be created. IsDefault pulumi.BoolPtrInput // The Name which should be used for this VPN Server Configuration Policy Group. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // One or more `policy` blocks as documented below. Policies VpnServerConfigurationPolicyGroupPolicyArrayInput // The priority of this VPN Server Configuration Policy Group. Defaults to `0`. Priority pulumi.IntPtrInput // The ID of the VPN Server Configuration that the VPN Server Configuration Policy Group belongs to. Changing this forces a new resource to be created. VpnServerConfigurationId pulumi.StringPtrInput } func (VpnServerConfigurationPolicyGroupState) ElementType() reflect.Type { return reflect.TypeOf((*vpnServerConfigurationPolicyGroupState)(nil)).Elem() } type vpnServerConfigurationPolicyGroupArgs struct { // Is this a default VPN Server Configuration Policy Group? Defaults to `false`. Changing this forces a new resource to be created. IsDefault *bool `pulumi:"isDefault"` // The Name which should be used for this VPN Server Configuration Policy Group. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // One or more `policy` blocks as documented below. Policies []VpnServerConfigurationPolicyGroupPolicy `pulumi:"policies"` // The priority of this VPN Server Configuration Policy Group. Defaults to `0`. Priority *int `pulumi:"priority"` // The ID of the VPN Server Configuration that the VPN Server Configuration Policy Group belongs to. Changing this forces a new resource to be created. VpnServerConfigurationId string `pulumi:"vpnServerConfigurationId"` } // The set of arguments for constructing a VpnServerConfigurationPolicyGroup resource. type VpnServerConfigurationPolicyGroupArgs struct { // Is this a default VPN Server Configuration Policy Group? Defaults to `false`. Changing this forces a new resource to be created. IsDefault pulumi.BoolPtrInput // The Name which should be used for this VPN Server Configuration Policy Group. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // One or more `policy` blocks as documented below. Policies VpnServerConfigurationPolicyGroupPolicyArrayInput // The priority of this VPN Server Configuration Policy Group. Defaults to `0`. Priority pulumi.IntPtrInput // The ID of the VPN Server Configuration that the VPN Server Configuration Policy Group belongs to. Changing this forces a new resource to be created. VpnServerConfigurationId pulumi.StringInput } func (VpnServerConfigurationPolicyGroupArgs) ElementType() reflect.Type { return reflect.TypeOf((*vpnServerConfigurationPolicyGroupArgs)(nil)).Elem() } type VpnServerConfigurationPolicyGroupInput interface { pulumi.Input ToVpnServerConfigurationPolicyGroupOutput() VpnServerConfigurationPolicyGroupOutput ToVpnServerConfigurationPolicyGroupOutputWithContext(ctx context.Context) VpnServerConfigurationPolicyGroupOutput } func (*VpnServerConfigurationPolicyGroup) ElementType() reflect.Type { return reflect.TypeOf((**VpnServerConfigurationPolicyGroup)(nil)).Elem() } func (i *VpnServerConfigurationPolicyGroup) ToVpnServerConfigurationPolicyGroupOutput() VpnServerConfigurationPolicyGroupOutput { return i.ToVpnServerConfigurationPolicyGroupOutputWithContext(context.Background()) } func (i *VpnServerConfigurationPolicyGroup) ToVpnServerConfigurationPolicyGroupOutputWithContext(ctx context.Context) VpnServerConfigurationPolicyGroupOutput { return pulumi.ToOutputWithContext(ctx, i).(VpnServerConfigurationPolicyGroupOutput) } // VpnServerConfigurationPolicyGroupArrayInput is an input type that accepts VpnServerConfigurationPolicyGroupArray and VpnServerConfigurationPolicyGroupArrayOutput values. // You can construct a concrete instance of `VpnServerConfigurationPolicyGroupArrayInput` via: // // VpnServerConfigurationPolicyGroupArray{ VpnServerConfigurationPolicyGroupArgs{...} } type VpnServerConfigurationPolicyGroupArrayInput interface { pulumi.Input ToVpnServerConfigurationPolicyGroupArrayOutput() VpnServerConfigurationPolicyGroupArrayOutput ToVpnServerConfigurationPolicyGroupArrayOutputWithContext(context.Context) VpnServerConfigurationPolicyGroupArrayOutput } type VpnServerConfigurationPolicyGroupArray []VpnServerConfigurationPolicyGroupInput func (VpnServerConfigurationPolicyGroupArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VpnServerConfigurationPolicyGroup)(nil)).Elem() } func (i VpnServerConfigurationPolicyGroupArray) ToVpnServerConfigurationPolicyGroupArrayOutput() VpnServerConfigurationPolicyGroupArrayOutput { return i.ToVpnServerConfigurationPolicyGroupArrayOutputWithContext(context.Background()) } func (i VpnServerConfigurationPolicyGroupArray) ToVpnServerConfigurationPolicyGroupArrayOutputWithContext(ctx context.Context) VpnServerConfigurationPolicyGroupArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VpnServerConfigurationPolicyGroupArrayOutput) } // VpnServerConfigurationPolicyGroupMapInput is an input type that accepts VpnServerConfigurationPolicyGroupMap and VpnServerConfigurationPolicyGroupMapOutput values. // You can construct a concrete instance of `VpnServerConfigurationPolicyGroupMapInput` via: // // VpnServerConfigurationPolicyGroupMap{ "key": VpnServerConfigurationPolicyGroupArgs{...} } type VpnServerConfigurationPolicyGroupMapInput interface { pulumi.Input ToVpnServerConfigurationPolicyGroupMapOutput() VpnServerConfigurationPolicyGroupMapOutput ToVpnServerConfigurationPolicyGroupMapOutputWithContext(context.Context) VpnServerConfigurationPolicyGroupMapOutput } type VpnServerConfigurationPolicyGroupMap map[string]VpnServerConfigurationPolicyGroupInput func (VpnServerConfigurationPolicyGroupMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VpnServerConfigurationPolicyGroup)(nil)).Elem() } func (i VpnServerConfigurationPolicyGroupMap) ToVpnServerConfigurationPolicyGroupMapOutput() VpnServerConfigurationPolicyGroupMapOutput { return i.ToVpnServerConfigurationPolicyGroupMapOutputWithContext(context.Background()) } func (i VpnServerConfigurationPolicyGroupMap) ToVpnServerConfigurationPolicyGroupMapOutputWithContext(ctx context.Context) VpnServerConfigurationPolicyGroupMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VpnServerConfigurationPolicyGroupMapOutput) } type VpnServerConfigurationPolicyGroupOutput struct{ *pulumi.OutputState } func (VpnServerConfigurationPolicyGroupOutput) ElementType() reflect.Type { return reflect.TypeOf((**VpnServerConfigurationPolicyGroup)(nil)).Elem() } func (o VpnServerConfigurationPolicyGroupOutput) ToVpnServerConfigurationPolicyGroupOutput() VpnServerConfigurationPolicyGroupOutput { return o } func (o VpnServerConfigurationPolicyGroupOutput) ToVpnServerConfigurationPolicyGroupOutputWithContext(ctx context.Context) VpnServerConfigurationPolicyGroupOutput { return o } // Is this a default VPN Server Configuration Policy Group? Defaults to `false`. Changing this forces a new resource to be created. func (o VpnServerConfigurationPolicyGroupOutput) IsDefault() pulumi.BoolPtrOutput { return o.ApplyT(func(v *VpnServerConfigurationPolicyGroup) pulumi.BoolPtrOutput { return v.IsDefault }).(pulumi.BoolPtrOutput) } // The Name which should be used for this VPN Server Configuration Policy Group. Changing this forces a new resource to be created. func (o VpnServerConfigurationPolicyGroupOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *VpnServerConfigurationPolicyGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // One or more `policy` blocks as documented below. func (o VpnServerConfigurationPolicyGroupOutput) Policies() VpnServerConfigurationPolicyGroupPolicyArrayOutput { return o.ApplyT(func(v *VpnServerConfigurationPolicyGroup) VpnServerConfigurationPolicyGroupPolicyArrayOutput { return v.Policies }).(VpnServerConfigurationPolicyGroupPolicyArrayOutput) } // The priority of this VPN Server Configuration Policy Group. Defaults to `0`. func (o VpnServerConfigurationPolicyGroupOutput) Priority() pulumi.IntPtrOutput { return o.ApplyT(func(v *VpnServerConfigurationPolicyGroup) pulumi.IntPtrOutput { return v.Priority }).(pulumi.IntPtrOutput) } // The ID of the VPN Server Configuration that the VPN Server Configuration Policy Group belongs to. Changing this forces a new resource to be created. func (o VpnServerConfigurationPolicyGroupOutput) VpnServerConfigurationId() pulumi.StringOutput { return o.ApplyT(func(v *VpnServerConfigurationPolicyGroup) pulumi.StringOutput { return v.VpnServerConfigurationId }).(pulumi.StringOutput) } type VpnServerConfigurationPolicyGroupArrayOutput struct{ *pulumi.OutputState } func (VpnServerConfigurationPolicyGroupArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*VpnServerConfigurationPolicyGroup)(nil)).Elem() } func (o VpnServerConfigurationPolicyGroupArrayOutput) ToVpnServerConfigurationPolicyGroupArrayOutput() VpnServerConfigurationPolicyGroupArrayOutput { return o } func (o VpnServerConfigurationPolicyGroupArrayOutput) ToVpnServerConfigurationPolicyGroupArrayOutputWithContext(ctx context.Context) VpnServerConfigurationPolicyGroupArrayOutput { return o } func (o VpnServerConfigurationPolicyGroupArrayOutput) Index(i pulumi.IntInput) VpnServerConfigurationPolicyGroupOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VpnServerConfigurationPolicyGroup { return vs[0].([]*VpnServerConfigurationPolicyGroup)[vs[1].(int)] }).(VpnServerConfigurationPolicyGroupOutput) } type VpnServerConfigurationPolicyGroupMapOutput struct{ *pulumi.OutputState } func (VpnServerConfigurationPolicyGroupMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VpnServerConfigurationPolicyGroup)(nil)).Elem() } func (o VpnServerConfigurationPolicyGroupMapOutput) ToVpnServerConfigurationPolicyGroupMapOutput() VpnServerConfigurationPolicyGroupMapOutput { return o } func (o VpnServerConfigurationPolicyGroupMapOutput) ToVpnServerConfigurationPolicyGroupMapOutputWithContext(ctx context.Context) VpnServerConfigurationPolicyGroupMapOutput { return o } func (o VpnServerConfigurationPolicyGroupMapOutput) MapIndex(k pulumi.StringInput) VpnServerConfigurationPolicyGroupOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VpnServerConfigurationPolicyGroup { return vs[0].(map[string]*VpnServerConfigurationPolicyGroup)[vs[1].(string)] }).(VpnServerConfigurationPolicyGroupOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VpnServerConfigurationPolicyGroupInput)(nil)).Elem(), &VpnServerConfigurationPolicyGroup{}) pulumi.RegisterInputType(reflect.TypeOf((*VpnServerConfigurationPolicyGroupArrayInput)(nil)).Elem(), VpnServerConfigurationPolicyGroupArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VpnServerConfigurationPolicyGroupMapInput)(nil)).Elem(), VpnServerConfigurationPolicyGroupMap{}) pulumi.RegisterOutputType(VpnServerConfigurationPolicyGroupOutput{}) pulumi.RegisterOutputType(VpnServerConfigurationPolicyGroupArrayOutput{}) pulumi.RegisterOutputType(VpnServerConfigurationPolicyGroupMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/networkInterfaceApplicationSecurityGroupAssociation.go
sdk/go/azure/network/networkInterfaceApplicationSecurityGroupAssociation.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages the association between a Network Interface and a Application Security Group. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-network"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("internal"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.1.0/24"), // }, // }) // if err != nil { // return err // } // exampleApplicationSecurityGroup, err := network.NewApplicationSecurityGroup(ctx, "example", &network.ApplicationSecurityGroupArgs{ // Name: pulumi.String("example-asg"), // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleNetworkInterface, err := network.NewNetworkInterface(ctx, "example", &network.NetworkInterfaceArgs{ // Name: pulumi.String("example-nic"), // Location: example.Location, // ResourceGroupName: example.Name, // IpConfigurations: network.NetworkInterfaceIpConfigurationArray{ // &network.NetworkInterfaceIpConfigurationArgs{ // Name: pulumi.String("testconfiguration1"), // SubnetId: exampleSubnet.ID(), // PrivateIpAddressAllocation: pulumi.String("Dynamic"), // }, // }, // }) // if err != nil { // return err // } // _, err = network.NewNetworkInterfaceApplicationSecurityGroupAssociation(ctx, "example", &network.NetworkInterfaceApplicationSecurityGroupAssociationArgs{ // NetworkInterfaceId: exampleNetworkInterface.ID(), // ApplicationSecurityGroupId: exampleApplicationSecurityGroup.ID(), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Associations between Network Interfaces and Application Security Groups can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/networkInterfaceApplicationSecurityGroupAssociation:NetworkInterfaceApplicationSecurityGroupAssociation association1 "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/networkInterfaces/nic1|/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/applicationSecurityGroups/securityGroup1" // ``` type NetworkInterfaceApplicationSecurityGroupAssociation struct { pulumi.CustomResourceState // The ID of the Application Security Group which this Network Interface which should be connected to. Changing this forces a new resource to be created. ApplicationSecurityGroupId pulumi.StringOutput `pulumi:"applicationSecurityGroupId"` // The ID of the Network Interface. Changing this forces a new resource to be created. NetworkInterfaceId pulumi.StringOutput `pulumi:"networkInterfaceId"` } // NewNetworkInterfaceApplicationSecurityGroupAssociation registers a new resource with the given unique name, arguments, and options. func NewNetworkInterfaceApplicationSecurityGroupAssociation(ctx *pulumi.Context, name string, args *NetworkInterfaceApplicationSecurityGroupAssociationArgs, opts ...pulumi.ResourceOption) (*NetworkInterfaceApplicationSecurityGroupAssociation, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ApplicationSecurityGroupId == nil { return nil, errors.New("invalid value for required argument 'ApplicationSecurityGroupId'") } if args.NetworkInterfaceId == nil { return nil, errors.New("invalid value for required argument 'NetworkInterfaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkInterfaceApplicationSecurityGroupAssociation err := ctx.RegisterResource("azure:network/networkInterfaceApplicationSecurityGroupAssociation:NetworkInterfaceApplicationSecurityGroupAssociation", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkInterfaceApplicationSecurityGroupAssociation gets an existing NetworkInterfaceApplicationSecurityGroupAssociation resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetNetworkInterfaceApplicationSecurityGroupAssociation(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkInterfaceApplicationSecurityGroupAssociationState, opts ...pulumi.ResourceOption) (*NetworkInterfaceApplicationSecurityGroupAssociation, error) { var resource NetworkInterfaceApplicationSecurityGroupAssociation err := ctx.ReadResource("azure:network/networkInterfaceApplicationSecurityGroupAssociation:NetworkInterfaceApplicationSecurityGroupAssociation", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkInterfaceApplicationSecurityGroupAssociation resources. type networkInterfaceApplicationSecurityGroupAssociationState struct { // The ID of the Application Security Group which this Network Interface which should be connected to. Changing this forces a new resource to be created. ApplicationSecurityGroupId *string `pulumi:"applicationSecurityGroupId"` // The ID of the Network Interface. Changing this forces a new resource to be created. NetworkInterfaceId *string `pulumi:"networkInterfaceId"` } type NetworkInterfaceApplicationSecurityGroupAssociationState struct { // The ID of the Application Security Group which this Network Interface which should be connected to. Changing this forces a new resource to be created. ApplicationSecurityGroupId pulumi.StringPtrInput // The ID of the Network Interface. Changing this forces a new resource to be created. NetworkInterfaceId pulumi.StringPtrInput } func (NetworkInterfaceApplicationSecurityGroupAssociationState) ElementType() reflect.Type { return reflect.TypeOf((*networkInterfaceApplicationSecurityGroupAssociationState)(nil)).Elem() } type networkInterfaceApplicationSecurityGroupAssociationArgs struct { // The ID of the Application Security Group which this Network Interface which should be connected to. Changing this forces a new resource to be created. ApplicationSecurityGroupId string `pulumi:"applicationSecurityGroupId"` // The ID of the Network Interface. Changing this forces a new resource to be created. NetworkInterfaceId string `pulumi:"networkInterfaceId"` } // The set of arguments for constructing a NetworkInterfaceApplicationSecurityGroupAssociation resource. type NetworkInterfaceApplicationSecurityGroupAssociationArgs struct { // The ID of the Application Security Group which this Network Interface which should be connected to. Changing this forces a new resource to be created. ApplicationSecurityGroupId pulumi.StringInput // The ID of the Network Interface. Changing this forces a new resource to be created. NetworkInterfaceId pulumi.StringInput } func (NetworkInterfaceApplicationSecurityGroupAssociationArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkInterfaceApplicationSecurityGroupAssociationArgs)(nil)).Elem() } type NetworkInterfaceApplicationSecurityGroupAssociationInput interface { pulumi.Input ToNetworkInterfaceApplicationSecurityGroupAssociationOutput() NetworkInterfaceApplicationSecurityGroupAssociationOutput ToNetworkInterfaceApplicationSecurityGroupAssociationOutputWithContext(ctx context.Context) NetworkInterfaceApplicationSecurityGroupAssociationOutput } func (*NetworkInterfaceApplicationSecurityGroupAssociation) ElementType() reflect.Type { return reflect.TypeOf((**NetworkInterfaceApplicationSecurityGroupAssociation)(nil)).Elem() } func (i *NetworkInterfaceApplicationSecurityGroupAssociation) ToNetworkInterfaceApplicationSecurityGroupAssociationOutput() NetworkInterfaceApplicationSecurityGroupAssociationOutput { return i.ToNetworkInterfaceApplicationSecurityGroupAssociationOutputWithContext(context.Background()) } func (i *NetworkInterfaceApplicationSecurityGroupAssociation) ToNetworkInterfaceApplicationSecurityGroupAssociationOutputWithContext(ctx context.Context) NetworkInterfaceApplicationSecurityGroupAssociationOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkInterfaceApplicationSecurityGroupAssociationOutput) } // NetworkInterfaceApplicationSecurityGroupAssociationArrayInput is an input type that accepts NetworkInterfaceApplicationSecurityGroupAssociationArray and NetworkInterfaceApplicationSecurityGroupAssociationArrayOutput values. // You can construct a concrete instance of `NetworkInterfaceApplicationSecurityGroupAssociationArrayInput` via: // // NetworkInterfaceApplicationSecurityGroupAssociationArray{ NetworkInterfaceApplicationSecurityGroupAssociationArgs{...} } type NetworkInterfaceApplicationSecurityGroupAssociationArrayInput interface { pulumi.Input ToNetworkInterfaceApplicationSecurityGroupAssociationArrayOutput() NetworkInterfaceApplicationSecurityGroupAssociationArrayOutput ToNetworkInterfaceApplicationSecurityGroupAssociationArrayOutputWithContext(context.Context) NetworkInterfaceApplicationSecurityGroupAssociationArrayOutput } type NetworkInterfaceApplicationSecurityGroupAssociationArray []NetworkInterfaceApplicationSecurityGroupAssociationInput func (NetworkInterfaceApplicationSecurityGroupAssociationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkInterfaceApplicationSecurityGroupAssociation)(nil)).Elem() } func (i NetworkInterfaceApplicationSecurityGroupAssociationArray) ToNetworkInterfaceApplicationSecurityGroupAssociationArrayOutput() NetworkInterfaceApplicationSecurityGroupAssociationArrayOutput { return i.ToNetworkInterfaceApplicationSecurityGroupAssociationArrayOutputWithContext(context.Background()) } func (i NetworkInterfaceApplicationSecurityGroupAssociationArray) ToNetworkInterfaceApplicationSecurityGroupAssociationArrayOutputWithContext(ctx context.Context) NetworkInterfaceApplicationSecurityGroupAssociationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkInterfaceApplicationSecurityGroupAssociationArrayOutput) } // NetworkInterfaceApplicationSecurityGroupAssociationMapInput is an input type that accepts NetworkInterfaceApplicationSecurityGroupAssociationMap and NetworkInterfaceApplicationSecurityGroupAssociationMapOutput values. // You can construct a concrete instance of `NetworkInterfaceApplicationSecurityGroupAssociationMapInput` via: // // NetworkInterfaceApplicationSecurityGroupAssociationMap{ "key": NetworkInterfaceApplicationSecurityGroupAssociationArgs{...} } type NetworkInterfaceApplicationSecurityGroupAssociationMapInput interface { pulumi.Input ToNetworkInterfaceApplicationSecurityGroupAssociationMapOutput() NetworkInterfaceApplicationSecurityGroupAssociationMapOutput ToNetworkInterfaceApplicationSecurityGroupAssociationMapOutputWithContext(context.Context) NetworkInterfaceApplicationSecurityGroupAssociationMapOutput } type NetworkInterfaceApplicationSecurityGroupAssociationMap map[string]NetworkInterfaceApplicationSecurityGroupAssociationInput func (NetworkInterfaceApplicationSecurityGroupAssociationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkInterfaceApplicationSecurityGroupAssociation)(nil)).Elem() } func (i NetworkInterfaceApplicationSecurityGroupAssociationMap) ToNetworkInterfaceApplicationSecurityGroupAssociationMapOutput() NetworkInterfaceApplicationSecurityGroupAssociationMapOutput { return i.ToNetworkInterfaceApplicationSecurityGroupAssociationMapOutputWithContext(context.Background()) } func (i NetworkInterfaceApplicationSecurityGroupAssociationMap) ToNetworkInterfaceApplicationSecurityGroupAssociationMapOutputWithContext(ctx context.Context) NetworkInterfaceApplicationSecurityGroupAssociationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkInterfaceApplicationSecurityGroupAssociationMapOutput) } type NetworkInterfaceApplicationSecurityGroupAssociationOutput struct{ *pulumi.OutputState } func (NetworkInterfaceApplicationSecurityGroupAssociationOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkInterfaceApplicationSecurityGroupAssociation)(nil)).Elem() } func (o NetworkInterfaceApplicationSecurityGroupAssociationOutput) ToNetworkInterfaceApplicationSecurityGroupAssociationOutput() NetworkInterfaceApplicationSecurityGroupAssociationOutput { return o } func (o NetworkInterfaceApplicationSecurityGroupAssociationOutput) ToNetworkInterfaceApplicationSecurityGroupAssociationOutputWithContext(ctx context.Context) NetworkInterfaceApplicationSecurityGroupAssociationOutput { return o } // The ID of the Application Security Group which this Network Interface which should be connected to. Changing this forces a new resource to be created. func (o NetworkInterfaceApplicationSecurityGroupAssociationOutput) ApplicationSecurityGroupId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkInterfaceApplicationSecurityGroupAssociation) pulumi.StringOutput { return v.ApplicationSecurityGroupId }).(pulumi.StringOutput) } // The ID of the Network Interface. Changing this forces a new resource to be created. func (o NetworkInterfaceApplicationSecurityGroupAssociationOutput) NetworkInterfaceId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkInterfaceApplicationSecurityGroupAssociation) pulumi.StringOutput { return v.NetworkInterfaceId }).(pulumi.StringOutput) } type NetworkInterfaceApplicationSecurityGroupAssociationArrayOutput struct{ *pulumi.OutputState } func (NetworkInterfaceApplicationSecurityGroupAssociationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkInterfaceApplicationSecurityGroupAssociation)(nil)).Elem() } func (o NetworkInterfaceApplicationSecurityGroupAssociationArrayOutput) ToNetworkInterfaceApplicationSecurityGroupAssociationArrayOutput() NetworkInterfaceApplicationSecurityGroupAssociationArrayOutput { return o } func (o NetworkInterfaceApplicationSecurityGroupAssociationArrayOutput) ToNetworkInterfaceApplicationSecurityGroupAssociationArrayOutputWithContext(ctx context.Context) NetworkInterfaceApplicationSecurityGroupAssociationArrayOutput { return o } func (o NetworkInterfaceApplicationSecurityGroupAssociationArrayOutput) Index(i pulumi.IntInput) NetworkInterfaceApplicationSecurityGroupAssociationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkInterfaceApplicationSecurityGroupAssociation { return vs[0].([]*NetworkInterfaceApplicationSecurityGroupAssociation)[vs[1].(int)] }).(NetworkInterfaceApplicationSecurityGroupAssociationOutput) } type NetworkInterfaceApplicationSecurityGroupAssociationMapOutput struct{ *pulumi.OutputState } func (NetworkInterfaceApplicationSecurityGroupAssociationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkInterfaceApplicationSecurityGroupAssociation)(nil)).Elem() } func (o NetworkInterfaceApplicationSecurityGroupAssociationMapOutput) ToNetworkInterfaceApplicationSecurityGroupAssociationMapOutput() NetworkInterfaceApplicationSecurityGroupAssociationMapOutput { return o } func (o NetworkInterfaceApplicationSecurityGroupAssociationMapOutput) ToNetworkInterfaceApplicationSecurityGroupAssociationMapOutputWithContext(ctx context.Context) NetworkInterfaceApplicationSecurityGroupAssociationMapOutput { return o } func (o NetworkInterfaceApplicationSecurityGroupAssociationMapOutput) MapIndex(k pulumi.StringInput) NetworkInterfaceApplicationSecurityGroupAssociationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkInterfaceApplicationSecurityGroupAssociation { return vs[0].(map[string]*NetworkInterfaceApplicationSecurityGroupAssociation)[vs[1].(string)] }).(NetworkInterfaceApplicationSecurityGroupAssociationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkInterfaceApplicationSecurityGroupAssociationInput)(nil)).Elem(), &NetworkInterfaceApplicationSecurityGroupAssociation{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkInterfaceApplicationSecurityGroupAssociationArrayInput)(nil)).Elem(), NetworkInterfaceApplicationSecurityGroupAssociationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkInterfaceApplicationSecurityGroupAssociationMapInput)(nil)).Elem(), NetworkInterfaceApplicationSecurityGroupAssociationMap{}) pulumi.RegisterOutputType(NetworkInterfaceApplicationSecurityGroupAssociationOutput{}) pulumi.RegisterOutputType(NetworkInterfaceApplicationSecurityGroupAssociationArrayOutput{}) pulumi.RegisterOutputType(NetworkInterfaceApplicationSecurityGroupAssociationMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/networkManagerConnectivityConfiguration.go
sdk/go/azure/network/networkManagerConnectivityConfiguration.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Network Manager Connectivity Configuration. // // > **Note:** The `network.NetworkManagerConnectivityConfiguration` deployment may modify or delete existing Network Peering resource. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // exampleNetworkManager, err := network.NewNetworkManager(ctx, "example", &network.NetworkManagerArgs{ // Name: pulumi.String("example-network-manager"), // Location: example.Location, // ResourceGroupName: example.Name, // Scope: &network.NetworkManagerScopeArgs{ // SubscriptionIds: pulumi.StringArray{ // pulumi.String(current.Id), // }, // }, // ScopeAccesses: pulumi.StringArray{ // pulumi.String("Connectivity"), // pulumi.String("SecurityAdmin"), // }, // Description: pulumi.String("example network manager"), // }) // if err != nil { // return err // } // exampleNetworkManagerNetworkGroup, err := network.NewNetworkManagerNetworkGroup(ctx, "example", &network.NetworkManagerNetworkGroupArgs{ // Name: pulumi.String("example-group"), // NetworkManagerId: exampleNetworkManager.ID(), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-net"), // Location: example.Location, // ResourceGroupName: example.Name, // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // FlowTimeoutInMinutes: pulumi.Int(10), // }) // if err != nil { // return err // } // example2, err := network.NewNetworkManagerNetworkGroup(ctx, "example2", &network.NetworkManagerNetworkGroupArgs{ // Name: pulumi.String("example-group2"), // NetworkManagerId: exampleNetworkManager.ID(), // }) // if err != nil { // return err // } // _, err = network.NewNetworkManagerConnectivityConfiguration(ctx, "example", &network.NetworkManagerConnectivityConfigurationArgs{ // Name: pulumi.String("example-connectivity-conf"), // NetworkManagerId: exampleNetworkManager.ID(), // ConnectivityTopology: pulumi.String("HubAndSpoke"), // AppliesToGroups: network.NetworkManagerConnectivityConfigurationAppliesToGroupArray{ // &network.NetworkManagerConnectivityConfigurationAppliesToGroupArgs{ // GroupConnectivity: pulumi.String("DirectlyConnected"), // NetworkGroupId: exampleNetworkManagerNetworkGroup.ID(), // }, // &network.NetworkManagerConnectivityConfigurationAppliesToGroupArgs{ // GroupConnectivity: pulumi.String("DirectlyConnected"), // NetworkGroupId: example2.ID(), // }, // }, // Hub: &network.NetworkManagerConnectivityConfigurationHubArgs{ // ResourceId: exampleVirtualNetwork.ID(), // ResourceType: pulumi.String("Microsoft.Network/virtualNetworks"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Network Manager Connectivity Configuration can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/networkManagerConnectivityConfiguration:NetworkManagerConnectivityConfiguration example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Network/networkManagers/networkManager1/connectivityConfigurations/configuration1 // ``` type NetworkManagerConnectivityConfiguration struct { pulumi.CustomResourceState // One or more `appliesToGroup` blocks as defined below. AppliesToGroups NetworkManagerConnectivityConfigurationAppliesToGroupArrayOutput `pulumi:"appliesToGroups"` // Specifies the connectivity topology type. Possible values are `HubAndSpoke` and `Mesh`. ConnectivityTopology pulumi.StringOutput `pulumi:"connectivityTopology"` // Indicates whether to remove current existing Virtual Network Peering in the Connectivity Configuration affected scope. Possible values are `true` and `false`. DeleteExistingPeeringEnabled pulumi.BoolPtrOutput `pulumi:"deleteExistingPeeringEnabled"` // A description of the Connectivity Configuration. Description pulumi.StringPtrOutput `pulumi:"description"` // Indicates whether to global mesh is supported. Possible values are `true` and `false`. GlobalMeshEnabled pulumi.BoolPtrOutput `pulumi:"globalMeshEnabled"` // A `hub` block as defined below. Hub NetworkManagerConnectivityConfigurationHubPtrOutput `pulumi:"hub"` // Specifies the name which should be used for this Network Manager Connectivity Configuration. Changing this forces a new Network Manager Connectivity Configuration to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the ID of the Network Manager. Changing this forces a new Network Manager Connectivity Configuration to be created. NetworkManagerId pulumi.StringOutput `pulumi:"networkManagerId"` } // NewNetworkManagerConnectivityConfiguration registers a new resource with the given unique name, arguments, and options. func NewNetworkManagerConnectivityConfiguration(ctx *pulumi.Context, name string, args *NetworkManagerConnectivityConfigurationArgs, opts ...pulumi.ResourceOption) (*NetworkManagerConnectivityConfiguration, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.AppliesToGroups == nil { return nil, errors.New("invalid value for required argument 'AppliesToGroups'") } if args.ConnectivityTopology == nil { return nil, errors.New("invalid value for required argument 'ConnectivityTopology'") } if args.NetworkManagerId == nil { return nil, errors.New("invalid value for required argument 'NetworkManagerId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkManagerConnectivityConfiguration err := ctx.RegisterResource("azure:network/networkManagerConnectivityConfiguration:NetworkManagerConnectivityConfiguration", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkManagerConnectivityConfiguration gets an existing NetworkManagerConnectivityConfiguration resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetNetworkManagerConnectivityConfiguration(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkManagerConnectivityConfigurationState, opts ...pulumi.ResourceOption) (*NetworkManagerConnectivityConfiguration, error) { var resource NetworkManagerConnectivityConfiguration err := ctx.ReadResource("azure:network/networkManagerConnectivityConfiguration:NetworkManagerConnectivityConfiguration", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkManagerConnectivityConfiguration resources. type networkManagerConnectivityConfigurationState struct { // One or more `appliesToGroup` blocks as defined below. AppliesToGroups []NetworkManagerConnectivityConfigurationAppliesToGroup `pulumi:"appliesToGroups"` // Specifies the connectivity topology type. Possible values are `HubAndSpoke` and `Mesh`. ConnectivityTopology *string `pulumi:"connectivityTopology"` // Indicates whether to remove current existing Virtual Network Peering in the Connectivity Configuration affected scope. Possible values are `true` and `false`. DeleteExistingPeeringEnabled *bool `pulumi:"deleteExistingPeeringEnabled"` // A description of the Connectivity Configuration. Description *string `pulumi:"description"` // Indicates whether to global mesh is supported. Possible values are `true` and `false`. GlobalMeshEnabled *bool `pulumi:"globalMeshEnabled"` // A `hub` block as defined below. Hub *NetworkManagerConnectivityConfigurationHub `pulumi:"hub"` // Specifies the name which should be used for this Network Manager Connectivity Configuration. Changing this forces a new Network Manager Connectivity Configuration to be created. Name *string `pulumi:"name"` // Specifies the ID of the Network Manager. Changing this forces a new Network Manager Connectivity Configuration to be created. NetworkManagerId *string `pulumi:"networkManagerId"` } type NetworkManagerConnectivityConfigurationState struct { // One or more `appliesToGroup` blocks as defined below. AppliesToGroups NetworkManagerConnectivityConfigurationAppliesToGroupArrayInput // Specifies the connectivity topology type. Possible values are `HubAndSpoke` and `Mesh`. ConnectivityTopology pulumi.StringPtrInput // Indicates whether to remove current existing Virtual Network Peering in the Connectivity Configuration affected scope. Possible values are `true` and `false`. DeleteExistingPeeringEnabled pulumi.BoolPtrInput // A description of the Connectivity Configuration. Description pulumi.StringPtrInput // Indicates whether to global mesh is supported. Possible values are `true` and `false`. GlobalMeshEnabled pulumi.BoolPtrInput // A `hub` block as defined below. Hub NetworkManagerConnectivityConfigurationHubPtrInput // Specifies the name which should be used for this Network Manager Connectivity Configuration. Changing this forces a new Network Manager Connectivity Configuration to be created. Name pulumi.StringPtrInput // Specifies the ID of the Network Manager. Changing this forces a new Network Manager Connectivity Configuration to be created. NetworkManagerId pulumi.StringPtrInput } func (NetworkManagerConnectivityConfigurationState) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerConnectivityConfigurationState)(nil)).Elem() } type networkManagerConnectivityConfigurationArgs struct { // One or more `appliesToGroup` blocks as defined below. AppliesToGroups []NetworkManagerConnectivityConfigurationAppliesToGroup `pulumi:"appliesToGroups"` // Specifies the connectivity topology type. Possible values are `HubAndSpoke` and `Mesh`. ConnectivityTopology string `pulumi:"connectivityTopology"` // Indicates whether to remove current existing Virtual Network Peering in the Connectivity Configuration affected scope. Possible values are `true` and `false`. DeleteExistingPeeringEnabled *bool `pulumi:"deleteExistingPeeringEnabled"` // A description of the Connectivity Configuration. Description *string `pulumi:"description"` // Indicates whether to global mesh is supported. Possible values are `true` and `false`. GlobalMeshEnabled *bool `pulumi:"globalMeshEnabled"` // A `hub` block as defined below. Hub *NetworkManagerConnectivityConfigurationHub `pulumi:"hub"` // Specifies the name which should be used for this Network Manager Connectivity Configuration. Changing this forces a new Network Manager Connectivity Configuration to be created. Name *string `pulumi:"name"` // Specifies the ID of the Network Manager. Changing this forces a new Network Manager Connectivity Configuration to be created. NetworkManagerId string `pulumi:"networkManagerId"` } // The set of arguments for constructing a NetworkManagerConnectivityConfiguration resource. type NetworkManagerConnectivityConfigurationArgs struct { // One or more `appliesToGroup` blocks as defined below. AppliesToGroups NetworkManagerConnectivityConfigurationAppliesToGroupArrayInput // Specifies the connectivity topology type. Possible values are `HubAndSpoke` and `Mesh`. ConnectivityTopology pulumi.StringInput // Indicates whether to remove current existing Virtual Network Peering in the Connectivity Configuration affected scope. Possible values are `true` and `false`. DeleteExistingPeeringEnabled pulumi.BoolPtrInput // A description of the Connectivity Configuration. Description pulumi.StringPtrInput // Indicates whether to global mesh is supported. Possible values are `true` and `false`. GlobalMeshEnabled pulumi.BoolPtrInput // A `hub` block as defined below. Hub NetworkManagerConnectivityConfigurationHubPtrInput // Specifies the name which should be used for this Network Manager Connectivity Configuration. Changing this forces a new Network Manager Connectivity Configuration to be created. Name pulumi.StringPtrInput // Specifies the ID of the Network Manager. Changing this forces a new Network Manager Connectivity Configuration to be created. NetworkManagerId pulumi.StringInput } func (NetworkManagerConnectivityConfigurationArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerConnectivityConfigurationArgs)(nil)).Elem() } type NetworkManagerConnectivityConfigurationInput interface { pulumi.Input ToNetworkManagerConnectivityConfigurationOutput() NetworkManagerConnectivityConfigurationOutput ToNetworkManagerConnectivityConfigurationOutputWithContext(ctx context.Context) NetworkManagerConnectivityConfigurationOutput } func (*NetworkManagerConnectivityConfiguration) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerConnectivityConfiguration)(nil)).Elem() } func (i *NetworkManagerConnectivityConfiguration) ToNetworkManagerConnectivityConfigurationOutput() NetworkManagerConnectivityConfigurationOutput { return i.ToNetworkManagerConnectivityConfigurationOutputWithContext(context.Background()) } func (i *NetworkManagerConnectivityConfiguration) ToNetworkManagerConnectivityConfigurationOutputWithContext(ctx context.Context) NetworkManagerConnectivityConfigurationOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerConnectivityConfigurationOutput) } // NetworkManagerConnectivityConfigurationArrayInput is an input type that accepts NetworkManagerConnectivityConfigurationArray and NetworkManagerConnectivityConfigurationArrayOutput values. // You can construct a concrete instance of `NetworkManagerConnectivityConfigurationArrayInput` via: // // NetworkManagerConnectivityConfigurationArray{ NetworkManagerConnectivityConfigurationArgs{...} } type NetworkManagerConnectivityConfigurationArrayInput interface { pulumi.Input ToNetworkManagerConnectivityConfigurationArrayOutput() NetworkManagerConnectivityConfigurationArrayOutput ToNetworkManagerConnectivityConfigurationArrayOutputWithContext(context.Context) NetworkManagerConnectivityConfigurationArrayOutput } type NetworkManagerConnectivityConfigurationArray []NetworkManagerConnectivityConfigurationInput func (NetworkManagerConnectivityConfigurationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerConnectivityConfiguration)(nil)).Elem() } func (i NetworkManagerConnectivityConfigurationArray) ToNetworkManagerConnectivityConfigurationArrayOutput() NetworkManagerConnectivityConfigurationArrayOutput { return i.ToNetworkManagerConnectivityConfigurationArrayOutputWithContext(context.Background()) } func (i NetworkManagerConnectivityConfigurationArray) ToNetworkManagerConnectivityConfigurationArrayOutputWithContext(ctx context.Context) NetworkManagerConnectivityConfigurationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerConnectivityConfigurationArrayOutput) } // NetworkManagerConnectivityConfigurationMapInput is an input type that accepts NetworkManagerConnectivityConfigurationMap and NetworkManagerConnectivityConfigurationMapOutput values. // You can construct a concrete instance of `NetworkManagerConnectivityConfigurationMapInput` via: // // NetworkManagerConnectivityConfigurationMap{ "key": NetworkManagerConnectivityConfigurationArgs{...} } type NetworkManagerConnectivityConfigurationMapInput interface { pulumi.Input ToNetworkManagerConnectivityConfigurationMapOutput() NetworkManagerConnectivityConfigurationMapOutput ToNetworkManagerConnectivityConfigurationMapOutputWithContext(context.Context) NetworkManagerConnectivityConfigurationMapOutput } type NetworkManagerConnectivityConfigurationMap map[string]NetworkManagerConnectivityConfigurationInput func (NetworkManagerConnectivityConfigurationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerConnectivityConfiguration)(nil)).Elem() } func (i NetworkManagerConnectivityConfigurationMap) ToNetworkManagerConnectivityConfigurationMapOutput() NetworkManagerConnectivityConfigurationMapOutput { return i.ToNetworkManagerConnectivityConfigurationMapOutputWithContext(context.Background()) } func (i NetworkManagerConnectivityConfigurationMap) ToNetworkManagerConnectivityConfigurationMapOutputWithContext(ctx context.Context) NetworkManagerConnectivityConfigurationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerConnectivityConfigurationMapOutput) } type NetworkManagerConnectivityConfigurationOutput struct{ *pulumi.OutputState } func (NetworkManagerConnectivityConfigurationOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerConnectivityConfiguration)(nil)).Elem() } func (o NetworkManagerConnectivityConfigurationOutput) ToNetworkManagerConnectivityConfigurationOutput() NetworkManagerConnectivityConfigurationOutput { return o } func (o NetworkManagerConnectivityConfigurationOutput) ToNetworkManagerConnectivityConfigurationOutputWithContext(ctx context.Context) NetworkManagerConnectivityConfigurationOutput { return o } // One or more `appliesToGroup` blocks as defined below. func (o NetworkManagerConnectivityConfigurationOutput) AppliesToGroups() NetworkManagerConnectivityConfigurationAppliesToGroupArrayOutput { return o.ApplyT(func(v *NetworkManagerConnectivityConfiguration) NetworkManagerConnectivityConfigurationAppliesToGroupArrayOutput { return v.AppliesToGroups }).(NetworkManagerConnectivityConfigurationAppliesToGroupArrayOutput) } // Specifies the connectivity topology type. Possible values are `HubAndSpoke` and `Mesh`. func (o NetworkManagerConnectivityConfigurationOutput) ConnectivityTopology() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerConnectivityConfiguration) pulumi.StringOutput { return v.ConnectivityTopology }).(pulumi.StringOutput) } // Indicates whether to remove current existing Virtual Network Peering in the Connectivity Configuration affected scope. Possible values are `true` and `false`. func (o NetworkManagerConnectivityConfigurationOutput) DeleteExistingPeeringEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *NetworkManagerConnectivityConfiguration) pulumi.BoolPtrOutput { return v.DeleteExistingPeeringEnabled }).(pulumi.BoolPtrOutput) } // A description of the Connectivity Configuration. func (o NetworkManagerConnectivityConfigurationOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkManagerConnectivityConfiguration) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // Indicates whether to global mesh is supported. Possible values are `true` and `false`. func (o NetworkManagerConnectivityConfigurationOutput) GlobalMeshEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *NetworkManagerConnectivityConfiguration) pulumi.BoolPtrOutput { return v.GlobalMeshEnabled }).(pulumi.BoolPtrOutput) } // A `hub` block as defined below. func (o NetworkManagerConnectivityConfigurationOutput) Hub() NetworkManagerConnectivityConfigurationHubPtrOutput { return o.ApplyT(func(v *NetworkManagerConnectivityConfiguration) NetworkManagerConnectivityConfigurationHubPtrOutput { return v.Hub }).(NetworkManagerConnectivityConfigurationHubPtrOutput) } // Specifies the name which should be used for this Network Manager Connectivity Configuration. Changing this forces a new Network Manager Connectivity Configuration to be created. func (o NetworkManagerConnectivityConfigurationOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerConnectivityConfiguration) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the ID of the Network Manager. Changing this forces a new Network Manager Connectivity Configuration to be created. func (o NetworkManagerConnectivityConfigurationOutput) NetworkManagerId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerConnectivityConfiguration) pulumi.StringOutput { return v.NetworkManagerId }).(pulumi.StringOutput) } type NetworkManagerConnectivityConfigurationArrayOutput struct{ *pulumi.OutputState } func (NetworkManagerConnectivityConfigurationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerConnectivityConfiguration)(nil)).Elem() } func (o NetworkManagerConnectivityConfigurationArrayOutput) ToNetworkManagerConnectivityConfigurationArrayOutput() NetworkManagerConnectivityConfigurationArrayOutput { return o } func (o NetworkManagerConnectivityConfigurationArrayOutput) ToNetworkManagerConnectivityConfigurationArrayOutputWithContext(ctx context.Context) NetworkManagerConnectivityConfigurationArrayOutput { return o } func (o NetworkManagerConnectivityConfigurationArrayOutput) Index(i pulumi.IntInput) NetworkManagerConnectivityConfigurationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkManagerConnectivityConfiguration { return vs[0].([]*NetworkManagerConnectivityConfiguration)[vs[1].(int)] }).(NetworkManagerConnectivityConfigurationOutput) } type NetworkManagerConnectivityConfigurationMapOutput struct{ *pulumi.OutputState } func (NetworkManagerConnectivityConfigurationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerConnectivityConfiguration)(nil)).Elem() } func (o NetworkManagerConnectivityConfigurationMapOutput) ToNetworkManagerConnectivityConfigurationMapOutput() NetworkManagerConnectivityConfigurationMapOutput { return o } func (o NetworkManagerConnectivityConfigurationMapOutput) ToNetworkManagerConnectivityConfigurationMapOutputWithContext(ctx context.Context) NetworkManagerConnectivityConfigurationMapOutput { return o } func (o NetworkManagerConnectivityConfigurationMapOutput) MapIndex(k pulumi.StringInput) NetworkManagerConnectivityConfigurationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkManagerConnectivityConfiguration { return vs[0].(map[string]*NetworkManagerConnectivityConfiguration)[vs[1].(string)] }).(NetworkManagerConnectivityConfigurationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerConnectivityConfigurationInput)(nil)).Elem(), &NetworkManagerConnectivityConfiguration{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerConnectivityConfigurationArrayInput)(nil)).Elem(), NetworkManagerConnectivityConfigurationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerConnectivityConfigurationMapInput)(nil)).Elem(), NetworkManagerConnectivityConfigurationMap{}) pulumi.RegisterOutputType(NetworkManagerConnectivityConfigurationOutput{}) pulumi.RegisterOutputType(NetworkManagerConnectivityConfigurationArrayOutput{}) pulumi.RegisterOutputType(NetworkManagerConnectivityConfigurationMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getTrafficManagerProfile.go
sdk/go/azure/network/getTrafficManagerProfile.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Traffic Manager Profile. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.LookupTrafficManagerProfile(ctx, &network.LookupTrafficManagerProfileArgs{ // Name: "test", // ResourceGroupName: "test", // }, nil) // if err != nil { // return err // } // ctx.Export("trafficRoutingMethod", example.TrafficRoutingMethod) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2022-04-01 func LookupTrafficManagerProfile(ctx *pulumi.Context, args *LookupTrafficManagerProfileArgs, opts ...pulumi.InvokeOption) (*LookupTrafficManagerProfileResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupTrafficManagerProfileResult err := ctx.Invoke("azure:network/getTrafficManagerProfile:getTrafficManagerProfile", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getTrafficManagerProfile. type LookupTrafficManagerProfileArgs struct { // Specifies the name of the Traffic Manager Profile. Name string `pulumi:"name"` // Specifies the name of the resource group the Traffic Manager Profile is located in. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Indicates whether Traffic View is enabled for the Traffic Manager profile. TrafficViewEnabled *bool `pulumi:"trafficViewEnabled"` } // A collection of values returned by getTrafficManagerProfile. type LookupTrafficManagerProfileResult struct { // This block specifies the DNS configuration of the Profile. DnsConfigs []GetTrafficManagerProfileDnsConfig `pulumi:"dnsConfigs"` // The FQDN of the created Profile. Fqdn string `pulumi:"fqdn"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // This block specifies the Endpoint monitoring configuration for the Profile. MonitorConfigs []GetTrafficManagerProfileMonitorConfig `pulumi:"monitorConfigs"` // The name of the custom header. Name string `pulumi:"name"` // The status of the profile. ProfileStatus string `pulumi:"profileStatus"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Specifies the algorithm used to route traffic. TrafficRoutingMethod string `pulumi:"trafficRoutingMethod"` // Indicates whether Traffic View is enabled for the Traffic Manager profile. TrafficViewEnabled *bool `pulumi:"trafficViewEnabled"` } func LookupTrafficManagerProfileOutput(ctx *pulumi.Context, args LookupTrafficManagerProfileOutputArgs, opts ...pulumi.InvokeOption) LookupTrafficManagerProfileResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupTrafficManagerProfileResultOutput, error) { args := v.(LookupTrafficManagerProfileArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getTrafficManagerProfile:getTrafficManagerProfile", args, LookupTrafficManagerProfileResultOutput{}, options).(LookupTrafficManagerProfileResultOutput), nil }).(LookupTrafficManagerProfileResultOutput) } // A collection of arguments for invoking getTrafficManagerProfile. type LookupTrafficManagerProfileOutputArgs struct { // Specifies the name of the Traffic Manager Profile. Name pulumi.StringInput `pulumi:"name"` // Specifies the name of the resource group the Traffic Manager Profile is located in. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput `pulumi:"tags"` // Indicates whether Traffic View is enabled for the Traffic Manager profile. TrafficViewEnabled pulumi.BoolPtrInput `pulumi:"trafficViewEnabled"` } func (LookupTrafficManagerProfileOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupTrafficManagerProfileArgs)(nil)).Elem() } // A collection of values returned by getTrafficManagerProfile. type LookupTrafficManagerProfileResultOutput struct{ *pulumi.OutputState } func (LookupTrafficManagerProfileResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupTrafficManagerProfileResult)(nil)).Elem() } func (o LookupTrafficManagerProfileResultOutput) ToLookupTrafficManagerProfileResultOutput() LookupTrafficManagerProfileResultOutput { return o } func (o LookupTrafficManagerProfileResultOutput) ToLookupTrafficManagerProfileResultOutputWithContext(ctx context.Context) LookupTrafficManagerProfileResultOutput { return o } // This block specifies the DNS configuration of the Profile. func (o LookupTrafficManagerProfileResultOutput) DnsConfigs() GetTrafficManagerProfileDnsConfigArrayOutput { return o.ApplyT(func(v LookupTrafficManagerProfileResult) []GetTrafficManagerProfileDnsConfig { return v.DnsConfigs }).(GetTrafficManagerProfileDnsConfigArrayOutput) } // The FQDN of the created Profile. func (o LookupTrafficManagerProfileResultOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v LookupTrafficManagerProfileResult) string { return v.Fqdn }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupTrafficManagerProfileResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupTrafficManagerProfileResult) string { return v.Id }).(pulumi.StringOutput) } // This block specifies the Endpoint monitoring configuration for the Profile. func (o LookupTrafficManagerProfileResultOutput) MonitorConfigs() GetTrafficManagerProfileMonitorConfigArrayOutput { return o.ApplyT(func(v LookupTrafficManagerProfileResult) []GetTrafficManagerProfileMonitorConfig { return v.MonitorConfigs }).(GetTrafficManagerProfileMonitorConfigArrayOutput) } // The name of the custom header. func (o LookupTrafficManagerProfileResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupTrafficManagerProfileResult) string { return v.Name }).(pulumi.StringOutput) } // The status of the profile. func (o LookupTrafficManagerProfileResultOutput) ProfileStatus() pulumi.StringOutput { return o.ApplyT(func(v LookupTrafficManagerProfileResult) string { return v.ProfileStatus }).(pulumi.StringOutput) } func (o LookupTrafficManagerProfileResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupTrafficManagerProfileResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o LookupTrafficManagerProfileResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupTrafficManagerProfileResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // Specifies the algorithm used to route traffic. func (o LookupTrafficManagerProfileResultOutput) TrafficRoutingMethod() pulumi.StringOutput { return o.ApplyT(func(v LookupTrafficManagerProfileResult) string { return v.TrafficRoutingMethod }).(pulumi.StringOutput) } // Indicates whether Traffic View is enabled for the Traffic Manager profile. func (o LookupTrafficManagerProfileResultOutput) TrafficViewEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v LookupTrafficManagerProfileResult) *bool { return v.TrafficViewEnabled }).(pulumi.BoolPtrOutput) } func init() { pulumi.RegisterOutputType(LookupTrafficManagerProfileResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getNetworkInterface.go
sdk/go/azure/network/getNetworkInterface.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Network Interface. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.LookupNetworkInterface(ctx, &network.LookupNetworkInterfaceArgs{ // Name: "acctest-nic", // ResourceGroupName: "networking", // }, nil) // if err != nil { // return err // } // ctx.Export("networkInterfaceId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func LookupNetworkInterface(ctx *pulumi.Context, args *LookupNetworkInterfaceArgs, opts ...pulumi.InvokeOption) (*LookupNetworkInterfaceResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupNetworkInterfaceResult err := ctx.Invoke("azure:network/getNetworkInterface:getNetworkInterface", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getNetworkInterface. type LookupNetworkInterfaceArgs struct { // Specifies the name of the Network Interface. Name string `pulumi:"name"` // Specifies the name of the resource group the Network Interface is located in. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getNetworkInterface. type LookupNetworkInterfaceResult struct { // Indicates if accelerated networking is set on the specified Network Interface. AcceleratedNetworkingEnabled bool `pulumi:"acceleratedNetworkingEnabled"` // List of DNS servers applied to the specified Network Interface. AppliedDnsServers []string `pulumi:"appliedDnsServers"` // The list of DNS servers used by the specified Network Interface. DnsServers []string `pulumi:"dnsServers"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The internal DNS name label of the specified Network Interface. InternalDnsNameLabel string `pulumi:"internalDnsNameLabel"` // One or more `ipConfiguration` blocks as defined below. IpConfigurations []GetNetworkInterfaceIpConfiguration `pulumi:"ipConfigurations"` // Indicate if IP forwarding is set on the specified Network Interface. IpForwardingEnabled bool `pulumi:"ipForwardingEnabled"` // The location of the specified Network Interface. Location string `pulumi:"location"` // The MAC address used by the specified Network Interface. MacAddress string `pulumi:"macAddress"` // The name of the IP Configuration. Name string `pulumi:"name"` // The ID of the network security group associated to the specified Network Interface. NetworkSecurityGroupId string `pulumi:"networkSecurityGroupId"` // The Private IP Address assigned to this Network Interface. PrivateIpAddress string `pulumi:"privateIpAddress"` // The list of private IP addresses associates to the specified Network Interface. PrivateIpAddresses []string `pulumi:"privateIpAddresses"` ResourceGroupName string `pulumi:"resourceGroupName"` // List the tags associated to the specified Network Interface. Tags map[string]string `pulumi:"tags"` // The ID of the virtual machine that the specified Network Interface is attached to. VirtualMachineId string `pulumi:"virtualMachineId"` } func LookupNetworkInterfaceOutput(ctx *pulumi.Context, args LookupNetworkInterfaceOutputArgs, opts ...pulumi.InvokeOption) LookupNetworkInterfaceResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupNetworkInterfaceResultOutput, error) { args := v.(LookupNetworkInterfaceArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getNetworkInterface:getNetworkInterface", args, LookupNetworkInterfaceResultOutput{}, options).(LookupNetworkInterfaceResultOutput), nil }).(LookupNetworkInterfaceResultOutput) } // A collection of arguments for invoking getNetworkInterface. type LookupNetworkInterfaceOutputArgs struct { // Specifies the name of the Network Interface. Name pulumi.StringInput `pulumi:"name"` // Specifies the name of the resource group the Network Interface is located in. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupNetworkInterfaceOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupNetworkInterfaceArgs)(nil)).Elem() } // A collection of values returned by getNetworkInterface. type LookupNetworkInterfaceResultOutput struct{ *pulumi.OutputState } func (LookupNetworkInterfaceResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupNetworkInterfaceResult)(nil)).Elem() } func (o LookupNetworkInterfaceResultOutput) ToLookupNetworkInterfaceResultOutput() LookupNetworkInterfaceResultOutput { return o } func (o LookupNetworkInterfaceResultOutput) ToLookupNetworkInterfaceResultOutputWithContext(ctx context.Context) LookupNetworkInterfaceResultOutput { return o } // Indicates if accelerated networking is set on the specified Network Interface. func (o LookupNetworkInterfaceResultOutput) AcceleratedNetworkingEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupNetworkInterfaceResult) bool { return v.AcceleratedNetworkingEnabled }).(pulumi.BoolOutput) } // List of DNS servers applied to the specified Network Interface. func (o LookupNetworkInterfaceResultOutput) AppliedDnsServers() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupNetworkInterfaceResult) []string { return v.AppliedDnsServers }).(pulumi.StringArrayOutput) } // The list of DNS servers used by the specified Network Interface. func (o LookupNetworkInterfaceResultOutput) DnsServers() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupNetworkInterfaceResult) []string { return v.DnsServers }).(pulumi.StringArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupNetworkInterfaceResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkInterfaceResult) string { return v.Id }).(pulumi.StringOutput) } // The internal DNS name label of the specified Network Interface. func (o LookupNetworkInterfaceResultOutput) InternalDnsNameLabel() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkInterfaceResult) string { return v.InternalDnsNameLabel }).(pulumi.StringOutput) } // One or more `ipConfiguration` blocks as defined below. func (o LookupNetworkInterfaceResultOutput) IpConfigurations() GetNetworkInterfaceIpConfigurationArrayOutput { return o.ApplyT(func(v LookupNetworkInterfaceResult) []GetNetworkInterfaceIpConfiguration { return v.IpConfigurations }).(GetNetworkInterfaceIpConfigurationArrayOutput) } // Indicate if IP forwarding is set on the specified Network Interface. func (o LookupNetworkInterfaceResultOutput) IpForwardingEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupNetworkInterfaceResult) bool { return v.IpForwardingEnabled }).(pulumi.BoolOutput) } // The location of the specified Network Interface. func (o LookupNetworkInterfaceResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkInterfaceResult) string { return v.Location }).(pulumi.StringOutput) } // The MAC address used by the specified Network Interface. func (o LookupNetworkInterfaceResultOutput) MacAddress() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkInterfaceResult) string { return v.MacAddress }).(pulumi.StringOutput) } // The name of the IP Configuration. func (o LookupNetworkInterfaceResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkInterfaceResult) string { return v.Name }).(pulumi.StringOutput) } // The ID of the network security group associated to the specified Network Interface. func (o LookupNetworkInterfaceResultOutput) NetworkSecurityGroupId() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkInterfaceResult) string { return v.NetworkSecurityGroupId }).(pulumi.StringOutput) } // The Private IP Address assigned to this Network Interface. func (o LookupNetworkInterfaceResultOutput) PrivateIpAddress() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkInterfaceResult) string { return v.PrivateIpAddress }).(pulumi.StringOutput) } // The list of private IP addresses associates to the specified Network Interface. func (o LookupNetworkInterfaceResultOutput) PrivateIpAddresses() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupNetworkInterfaceResult) []string { return v.PrivateIpAddresses }).(pulumi.StringArrayOutput) } func (o LookupNetworkInterfaceResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkInterfaceResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // List the tags associated to the specified Network Interface. func (o LookupNetworkInterfaceResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupNetworkInterfaceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The ID of the virtual machine that the specified Network Interface is attached to. func (o LookupNetworkInterfaceResultOutput) VirtualMachineId() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkInterfaceResult) string { return v.VirtualMachineId }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupNetworkInterfaceResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/subnetNetworkSecurityGroupAssociation.go
sdk/go/azure/network/subnetNetworkSecurityGroupAssociation.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Associates a Network Security Group with a Subnet within a Virtual Network. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-network"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("frontend"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // }) // if err != nil { // return err // } // exampleNetworkSecurityGroup, err := network.NewNetworkSecurityGroup(ctx, "example", &network.NetworkSecurityGroupArgs{ // Name: pulumi.String("example-nsg"), // Location: example.Location, // ResourceGroupName: example.Name, // SecurityRules: network.NetworkSecurityGroupSecurityRuleArray{ // &network.NetworkSecurityGroupSecurityRuleArgs{ // Name: pulumi.String("test123"), // Priority: pulumi.Int(100), // Direction: pulumi.String("Inbound"), // Access: pulumi.String("Allow"), // Protocol: pulumi.String("Tcp"), // SourcePortRange: pulumi.String("*"), // DestinationPortRange: pulumi.String("*"), // SourceAddressPrefix: pulumi.String("*"), // DestinationAddressPrefix: pulumi.String("*"), // }, // }, // }) // if err != nil { // return err // } // _, err = network.NewSubnetNetworkSecurityGroupAssociation(ctx, "example", &network.SubnetNetworkSecurityGroupAssociationArgs{ // SubnetId: exampleSubnet.ID(), // NetworkSecurityGroupId: exampleNetworkSecurityGroup.ID(), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Subnet `<->` Network Security Group Associations can be imported using the `resource id` of the Subnet, e.g. // // ```sh // $ pulumi import azure:network/subnetNetworkSecurityGroupAssociation:SubnetNetworkSecurityGroupAssociation association1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/virtualNetworks/myvnet1/subnets/mysubnet1 // ``` type SubnetNetworkSecurityGroupAssociation struct { pulumi.CustomResourceState // The ID of the Network Security Group which should be associated with the Subnet. Changing this forces a new resource to be created. NetworkSecurityGroupId pulumi.StringOutput `pulumi:"networkSecurityGroupId"` // The ID of the Subnet. Changing this forces a new resource to be created. SubnetId pulumi.StringOutput `pulumi:"subnetId"` } // NewSubnetNetworkSecurityGroupAssociation registers a new resource with the given unique name, arguments, and options. func NewSubnetNetworkSecurityGroupAssociation(ctx *pulumi.Context, name string, args *SubnetNetworkSecurityGroupAssociationArgs, opts ...pulumi.ResourceOption) (*SubnetNetworkSecurityGroupAssociation, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.NetworkSecurityGroupId == nil { return nil, errors.New("invalid value for required argument 'NetworkSecurityGroupId'") } if args.SubnetId == nil { return nil, errors.New("invalid value for required argument 'SubnetId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource SubnetNetworkSecurityGroupAssociation err := ctx.RegisterResource("azure:network/subnetNetworkSecurityGroupAssociation:SubnetNetworkSecurityGroupAssociation", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSubnetNetworkSecurityGroupAssociation gets an existing SubnetNetworkSecurityGroupAssociation resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetSubnetNetworkSecurityGroupAssociation(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SubnetNetworkSecurityGroupAssociationState, opts ...pulumi.ResourceOption) (*SubnetNetworkSecurityGroupAssociation, error) { var resource SubnetNetworkSecurityGroupAssociation err := ctx.ReadResource("azure:network/subnetNetworkSecurityGroupAssociation:SubnetNetworkSecurityGroupAssociation", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering SubnetNetworkSecurityGroupAssociation resources. type subnetNetworkSecurityGroupAssociationState struct { // The ID of the Network Security Group which should be associated with the Subnet. Changing this forces a new resource to be created. NetworkSecurityGroupId *string `pulumi:"networkSecurityGroupId"` // The ID of the Subnet. Changing this forces a new resource to be created. SubnetId *string `pulumi:"subnetId"` } type SubnetNetworkSecurityGroupAssociationState struct { // The ID of the Network Security Group which should be associated with the Subnet. Changing this forces a new resource to be created. NetworkSecurityGroupId pulumi.StringPtrInput // The ID of the Subnet. Changing this forces a new resource to be created. SubnetId pulumi.StringPtrInput } func (SubnetNetworkSecurityGroupAssociationState) ElementType() reflect.Type { return reflect.TypeOf((*subnetNetworkSecurityGroupAssociationState)(nil)).Elem() } type subnetNetworkSecurityGroupAssociationArgs struct { // The ID of the Network Security Group which should be associated with the Subnet. Changing this forces a new resource to be created. NetworkSecurityGroupId string `pulumi:"networkSecurityGroupId"` // The ID of the Subnet. Changing this forces a new resource to be created. SubnetId string `pulumi:"subnetId"` } // The set of arguments for constructing a SubnetNetworkSecurityGroupAssociation resource. type SubnetNetworkSecurityGroupAssociationArgs struct { // The ID of the Network Security Group which should be associated with the Subnet. Changing this forces a new resource to be created. NetworkSecurityGroupId pulumi.StringInput // The ID of the Subnet. Changing this forces a new resource to be created. SubnetId pulumi.StringInput } func (SubnetNetworkSecurityGroupAssociationArgs) ElementType() reflect.Type { return reflect.TypeOf((*subnetNetworkSecurityGroupAssociationArgs)(nil)).Elem() } type SubnetNetworkSecurityGroupAssociationInput interface { pulumi.Input ToSubnetNetworkSecurityGroupAssociationOutput() SubnetNetworkSecurityGroupAssociationOutput ToSubnetNetworkSecurityGroupAssociationOutputWithContext(ctx context.Context) SubnetNetworkSecurityGroupAssociationOutput } func (*SubnetNetworkSecurityGroupAssociation) ElementType() reflect.Type { return reflect.TypeOf((**SubnetNetworkSecurityGroupAssociation)(nil)).Elem() } func (i *SubnetNetworkSecurityGroupAssociation) ToSubnetNetworkSecurityGroupAssociationOutput() SubnetNetworkSecurityGroupAssociationOutput { return i.ToSubnetNetworkSecurityGroupAssociationOutputWithContext(context.Background()) } func (i *SubnetNetworkSecurityGroupAssociation) ToSubnetNetworkSecurityGroupAssociationOutputWithContext(ctx context.Context) SubnetNetworkSecurityGroupAssociationOutput { return pulumi.ToOutputWithContext(ctx, i).(SubnetNetworkSecurityGroupAssociationOutput) } // SubnetNetworkSecurityGroupAssociationArrayInput is an input type that accepts SubnetNetworkSecurityGroupAssociationArray and SubnetNetworkSecurityGroupAssociationArrayOutput values. // You can construct a concrete instance of `SubnetNetworkSecurityGroupAssociationArrayInput` via: // // SubnetNetworkSecurityGroupAssociationArray{ SubnetNetworkSecurityGroupAssociationArgs{...} } type SubnetNetworkSecurityGroupAssociationArrayInput interface { pulumi.Input ToSubnetNetworkSecurityGroupAssociationArrayOutput() SubnetNetworkSecurityGroupAssociationArrayOutput ToSubnetNetworkSecurityGroupAssociationArrayOutputWithContext(context.Context) SubnetNetworkSecurityGroupAssociationArrayOutput } type SubnetNetworkSecurityGroupAssociationArray []SubnetNetworkSecurityGroupAssociationInput func (SubnetNetworkSecurityGroupAssociationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*SubnetNetworkSecurityGroupAssociation)(nil)).Elem() } func (i SubnetNetworkSecurityGroupAssociationArray) ToSubnetNetworkSecurityGroupAssociationArrayOutput() SubnetNetworkSecurityGroupAssociationArrayOutput { return i.ToSubnetNetworkSecurityGroupAssociationArrayOutputWithContext(context.Background()) } func (i SubnetNetworkSecurityGroupAssociationArray) ToSubnetNetworkSecurityGroupAssociationArrayOutputWithContext(ctx context.Context) SubnetNetworkSecurityGroupAssociationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SubnetNetworkSecurityGroupAssociationArrayOutput) } // SubnetNetworkSecurityGroupAssociationMapInput is an input type that accepts SubnetNetworkSecurityGroupAssociationMap and SubnetNetworkSecurityGroupAssociationMapOutput values. // You can construct a concrete instance of `SubnetNetworkSecurityGroupAssociationMapInput` via: // // SubnetNetworkSecurityGroupAssociationMap{ "key": SubnetNetworkSecurityGroupAssociationArgs{...} } type SubnetNetworkSecurityGroupAssociationMapInput interface { pulumi.Input ToSubnetNetworkSecurityGroupAssociationMapOutput() SubnetNetworkSecurityGroupAssociationMapOutput ToSubnetNetworkSecurityGroupAssociationMapOutputWithContext(context.Context) SubnetNetworkSecurityGroupAssociationMapOutput } type SubnetNetworkSecurityGroupAssociationMap map[string]SubnetNetworkSecurityGroupAssociationInput func (SubnetNetworkSecurityGroupAssociationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SubnetNetworkSecurityGroupAssociation)(nil)).Elem() } func (i SubnetNetworkSecurityGroupAssociationMap) ToSubnetNetworkSecurityGroupAssociationMapOutput() SubnetNetworkSecurityGroupAssociationMapOutput { return i.ToSubnetNetworkSecurityGroupAssociationMapOutputWithContext(context.Background()) } func (i SubnetNetworkSecurityGroupAssociationMap) ToSubnetNetworkSecurityGroupAssociationMapOutputWithContext(ctx context.Context) SubnetNetworkSecurityGroupAssociationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SubnetNetworkSecurityGroupAssociationMapOutput) } type SubnetNetworkSecurityGroupAssociationOutput struct{ *pulumi.OutputState } func (SubnetNetworkSecurityGroupAssociationOutput) ElementType() reflect.Type { return reflect.TypeOf((**SubnetNetworkSecurityGroupAssociation)(nil)).Elem() } func (o SubnetNetworkSecurityGroupAssociationOutput) ToSubnetNetworkSecurityGroupAssociationOutput() SubnetNetworkSecurityGroupAssociationOutput { return o } func (o SubnetNetworkSecurityGroupAssociationOutput) ToSubnetNetworkSecurityGroupAssociationOutputWithContext(ctx context.Context) SubnetNetworkSecurityGroupAssociationOutput { return o } // The ID of the Network Security Group which should be associated with the Subnet. Changing this forces a new resource to be created. func (o SubnetNetworkSecurityGroupAssociationOutput) NetworkSecurityGroupId() pulumi.StringOutput { return o.ApplyT(func(v *SubnetNetworkSecurityGroupAssociation) pulumi.StringOutput { return v.NetworkSecurityGroupId }).(pulumi.StringOutput) } // The ID of the Subnet. Changing this forces a new resource to be created. func (o SubnetNetworkSecurityGroupAssociationOutput) SubnetId() pulumi.StringOutput { return o.ApplyT(func(v *SubnetNetworkSecurityGroupAssociation) pulumi.StringOutput { return v.SubnetId }).(pulumi.StringOutput) } type SubnetNetworkSecurityGroupAssociationArrayOutput struct{ *pulumi.OutputState } func (SubnetNetworkSecurityGroupAssociationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*SubnetNetworkSecurityGroupAssociation)(nil)).Elem() } func (o SubnetNetworkSecurityGroupAssociationArrayOutput) ToSubnetNetworkSecurityGroupAssociationArrayOutput() SubnetNetworkSecurityGroupAssociationArrayOutput { return o } func (o SubnetNetworkSecurityGroupAssociationArrayOutput) ToSubnetNetworkSecurityGroupAssociationArrayOutputWithContext(ctx context.Context) SubnetNetworkSecurityGroupAssociationArrayOutput { return o } func (o SubnetNetworkSecurityGroupAssociationArrayOutput) Index(i pulumi.IntInput) SubnetNetworkSecurityGroupAssociationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SubnetNetworkSecurityGroupAssociation { return vs[0].([]*SubnetNetworkSecurityGroupAssociation)[vs[1].(int)] }).(SubnetNetworkSecurityGroupAssociationOutput) } type SubnetNetworkSecurityGroupAssociationMapOutput struct{ *pulumi.OutputState } func (SubnetNetworkSecurityGroupAssociationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SubnetNetworkSecurityGroupAssociation)(nil)).Elem() } func (o SubnetNetworkSecurityGroupAssociationMapOutput) ToSubnetNetworkSecurityGroupAssociationMapOutput() SubnetNetworkSecurityGroupAssociationMapOutput { return o } func (o SubnetNetworkSecurityGroupAssociationMapOutput) ToSubnetNetworkSecurityGroupAssociationMapOutputWithContext(ctx context.Context) SubnetNetworkSecurityGroupAssociationMapOutput { return o } func (o SubnetNetworkSecurityGroupAssociationMapOutput) MapIndex(k pulumi.StringInput) SubnetNetworkSecurityGroupAssociationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SubnetNetworkSecurityGroupAssociation { return vs[0].(map[string]*SubnetNetworkSecurityGroupAssociation)[vs[1].(string)] }).(SubnetNetworkSecurityGroupAssociationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SubnetNetworkSecurityGroupAssociationInput)(nil)).Elem(), &SubnetNetworkSecurityGroupAssociation{}) pulumi.RegisterInputType(reflect.TypeOf((*SubnetNetworkSecurityGroupAssociationArrayInput)(nil)).Elem(), SubnetNetworkSecurityGroupAssociationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SubnetNetworkSecurityGroupAssociationMapInput)(nil)).Elem(), SubnetNetworkSecurityGroupAssociationMap{}) pulumi.RegisterOutputType(SubnetNetworkSecurityGroupAssociationOutput{}) pulumi.RegisterOutputType(SubnetNetworkSecurityGroupAssociationArrayOutput{}) pulumi.RegisterOutputType(SubnetNetworkSecurityGroupAssociationMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/profile.go
sdk/go/azure/network/profile.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Network Profile. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("examplegroup"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("examplevnet"), // Location: example.Location, // ResourceGroupName: example.Name, // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.1.0.0/16"), // }, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("examplesubnet"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.1.0.0/24"), // }, // Delegations: network.SubnetDelegationArray{ // &network.SubnetDelegationArgs{ // Name: pulumi.String("delegation"), // ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{ // Name: pulumi.String("Microsoft.ContainerInstance/containerGroups"), // Actions: pulumi.StringArray{ // pulumi.String("Microsoft.Network/virtualNetworks/subnets/action"), // }, // }, // }, // }, // }) // if err != nil { // return err // } // _, err = network.NewProfile(ctx, "example", &network.ProfileArgs{ // Name: pulumi.String("examplenetprofile"), // Location: example.Location, // ResourceGroupName: example.Name, // ContainerNetworkInterface: &network.ProfileContainerNetworkInterfaceArgs{ // Name: pulumi.String("examplecnic"), // IpConfigurations: network.ProfileContainerNetworkInterfaceIpConfigurationArray{ // &network.ProfileContainerNetworkInterfaceIpConfigurationArgs{ // Name: pulumi.String("exampleipconfig"), // SubnetId: exampleSubnet.ID(), // }, // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Network Profile can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/profile:Profile example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/networkProfiles/examplenetprofile // ``` type Profile struct { pulumi.CustomResourceState // A `containerNetworkInterface` block as documented below. ContainerNetworkInterface ProfileContainerNetworkInterfaceOutput `pulumi:"containerNetworkInterface"` // A list of Container Network Interface IDs. ContainerNetworkInterfaceIds pulumi.StringArrayOutput `pulumi:"containerNetworkInterfaceIds"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies the name of the Network Profile. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A mapping of tags assigned to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewProfile registers a new resource with the given unique name, arguments, and options. func NewProfile(ctx *pulumi.Context, name string, args *ProfileArgs, opts ...pulumi.ResourceOption) (*Profile, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ContainerNetworkInterface == nil { return nil, errors.New("invalid value for required argument 'ContainerNetworkInterface'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Profile err := ctx.RegisterResource("azure:network/profile:Profile", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetProfile gets an existing Profile resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetProfile(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ProfileState, opts ...pulumi.ResourceOption) (*Profile, error) { var resource Profile err := ctx.ReadResource("azure:network/profile:Profile", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Profile resources. type profileState struct { // A `containerNetworkInterface` block as documented below. ContainerNetworkInterface *ProfileContainerNetworkInterface `pulumi:"containerNetworkInterface"` // A list of Container Network Interface IDs. ContainerNetworkInterfaceIds []string `pulumi:"containerNetworkInterfaceIds"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of the Network Profile. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A mapping of tags assigned to the resource. Tags map[string]string `pulumi:"tags"` } type ProfileState struct { // A `containerNetworkInterface` block as documented below. ContainerNetworkInterface ProfileContainerNetworkInterfacePtrInput // A list of Container Network Interface IDs. ContainerNetworkInterfaceIds pulumi.StringArrayInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of the Network Profile. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags assigned to the resource. Tags pulumi.StringMapInput } func (ProfileState) ElementType() reflect.Type { return reflect.TypeOf((*profileState)(nil)).Elem() } type profileArgs struct { // A `containerNetworkInterface` block as documented below. ContainerNetworkInterface ProfileContainerNetworkInterface `pulumi:"containerNetworkInterface"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of the Network Profile. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags assigned to the resource. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a Profile resource. type ProfileArgs struct { // A `containerNetworkInterface` block as documented below. ContainerNetworkInterface ProfileContainerNetworkInterfaceInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of the Network Profile. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags assigned to the resource. Tags pulumi.StringMapInput } func (ProfileArgs) ElementType() reflect.Type { return reflect.TypeOf((*profileArgs)(nil)).Elem() } type ProfileInput interface { pulumi.Input ToProfileOutput() ProfileOutput ToProfileOutputWithContext(ctx context.Context) ProfileOutput } func (*Profile) ElementType() reflect.Type { return reflect.TypeOf((**Profile)(nil)).Elem() } func (i *Profile) ToProfileOutput() ProfileOutput { return i.ToProfileOutputWithContext(context.Background()) } func (i *Profile) ToProfileOutputWithContext(ctx context.Context) ProfileOutput { return pulumi.ToOutputWithContext(ctx, i).(ProfileOutput) } // ProfileArrayInput is an input type that accepts ProfileArray and ProfileArrayOutput values. // You can construct a concrete instance of `ProfileArrayInput` via: // // ProfileArray{ ProfileArgs{...} } type ProfileArrayInput interface { pulumi.Input ToProfileArrayOutput() ProfileArrayOutput ToProfileArrayOutputWithContext(context.Context) ProfileArrayOutput } type ProfileArray []ProfileInput func (ProfileArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Profile)(nil)).Elem() } func (i ProfileArray) ToProfileArrayOutput() ProfileArrayOutput { return i.ToProfileArrayOutputWithContext(context.Background()) } func (i ProfileArray) ToProfileArrayOutputWithContext(ctx context.Context) ProfileArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ProfileArrayOutput) } // ProfileMapInput is an input type that accepts ProfileMap and ProfileMapOutput values. // You can construct a concrete instance of `ProfileMapInput` via: // // ProfileMap{ "key": ProfileArgs{...} } type ProfileMapInput interface { pulumi.Input ToProfileMapOutput() ProfileMapOutput ToProfileMapOutputWithContext(context.Context) ProfileMapOutput } type ProfileMap map[string]ProfileInput func (ProfileMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Profile)(nil)).Elem() } func (i ProfileMap) ToProfileMapOutput() ProfileMapOutput { return i.ToProfileMapOutputWithContext(context.Background()) } func (i ProfileMap) ToProfileMapOutputWithContext(ctx context.Context) ProfileMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ProfileMapOutput) } type ProfileOutput struct{ *pulumi.OutputState } func (ProfileOutput) ElementType() reflect.Type { return reflect.TypeOf((**Profile)(nil)).Elem() } func (o ProfileOutput) ToProfileOutput() ProfileOutput { return o } func (o ProfileOutput) ToProfileOutputWithContext(ctx context.Context) ProfileOutput { return o } // A `containerNetworkInterface` block as documented below. func (o ProfileOutput) ContainerNetworkInterface() ProfileContainerNetworkInterfaceOutput { return o.ApplyT(func(v *Profile) ProfileContainerNetworkInterfaceOutput { return v.ContainerNetworkInterface }).(ProfileContainerNetworkInterfaceOutput) } // A list of Container Network Interface IDs. func (o ProfileOutput) ContainerNetworkInterfaceIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *Profile) pulumi.StringArrayOutput { return v.ContainerNetworkInterfaceIds }).(pulumi.StringArrayOutput) } // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. func (o ProfileOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Profile) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name of the Network Profile. Changing this forces a new resource to be created. func (o ProfileOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Profile) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. func (o ProfileOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Profile) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags assigned to the resource. func (o ProfileOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Profile) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type ProfileArrayOutput struct{ *pulumi.OutputState } func (ProfileArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Profile)(nil)).Elem() } func (o ProfileArrayOutput) ToProfileArrayOutput() ProfileArrayOutput { return o } func (o ProfileArrayOutput) ToProfileArrayOutputWithContext(ctx context.Context) ProfileArrayOutput { return o } func (o ProfileArrayOutput) Index(i pulumi.IntInput) ProfileOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Profile { return vs[0].([]*Profile)[vs[1].(int)] }).(ProfileOutput) } type ProfileMapOutput struct{ *pulumi.OutputState } func (ProfileMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Profile)(nil)).Elem() } func (o ProfileMapOutput) ToProfileMapOutput() ProfileMapOutput { return o } func (o ProfileMapOutput) ToProfileMapOutputWithContext(ctx context.Context) ProfileMapOutput { return o } func (o ProfileMapOutput) MapIndex(k pulumi.StringInput) ProfileOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Profile { return vs[0].(map[string]*Profile)[vs[1].(string)] }).(ProfileOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ProfileInput)(nil)).Elem(), &Profile{}) pulumi.RegisterInputType(reflect.TypeOf((*ProfileArrayInput)(nil)).Elem(), ProfileArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ProfileMapInput)(nil)).Elem(), ProfileMap{}) pulumi.RegisterOutputType(ProfileOutput{}) pulumi.RegisterOutputType(ProfileArrayOutput{}) pulumi.RegisterOutputType(ProfileMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getPublicIPs.go
sdk/go/azure/network/getPublicIPs.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about a set of existing Public IP Addresses. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := network.GetPublicIPs(ctx, &network.GetPublicIPsArgs{ // ResourceGroupName: "pip-test", // AttachmentStatus: pulumi.StringRef("Attached"), // }, nil) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func GetPublicIPs(ctx *pulumi.Context, args *GetPublicIPsArgs, opts ...pulumi.InvokeOption) (*GetPublicIPsResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetPublicIPsResult err := ctx.Invoke("azure:network/getPublicIPs:getPublicIPs", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getPublicIPs. type GetPublicIPsArgs struct { // The Allocation Type for the Public IP Address. Possible values include `Static` or `Dynamic`. AllocationType *string `pulumi:"allocationType"` // Filter to include IP Addresses which are attached to a device, such as a VM/LB (`Attached`) or unattached (`Unattached`). AttachmentStatus *string `pulumi:"attachmentStatus"` // A prefix match used for the IP Addresses `name` field, case sensitive. NamePrefix *string `pulumi:"namePrefix"` // Specifies the name of the resource group. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getPublicIPs. type GetPublicIPsResult struct { AllocationType *string `pulumi:"allocationType"` AttachmentStatus *string `pulumi:"attachmentStatus"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` NamePrefix *string `pulumi:"namePrefix"` // A List of `publicIps` blocks as defined below filtered by the criteria above. PublicIps []GetPublicIPsPublicIp `pulumi:"publicIps"` ResourceGroupName string `pulumi:"resourceGroupName"` } func GetPublicIPsOutput(ctx *pulumi.Context, args GetPublicIPsOutputArgs, opts ...pulumi.InvokeOption) GetPublicIPsResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetPublicIPsResultOutput, error) { args := v.(GetPublicIPsArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getPublicIPs:getPublicIPs", args, GetPublicIPsResultOutput{}, options).(GetPublicIPsResultOutput), nil }).(GetPublicIPsResultOutput) } // A collection of arguments for invoking getPublicIPs. type GetPublicIPsOutputArgs struct { // The Allocation Type for the Public IP Address. Possible values include `Static` or `Dynamic`. AllocationType pulumi.StringPtrInput `pulumi:"allocationType"` // Filter to include IP Addresses which are attached to a device, such as a VM/LB (`Attached`) or unattached (`Unattached`). AttachmentStatus pulumi.StringPtrInput `pulumi:"attachmentStatus"` // A prefix match used for the IP Addresses `name` field, case sensitive. NamePrefix pulumi.StringPtrInput `pulumi:"namePrefix"` // Specifies the name of the resource group. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (GetPublicIPsOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetPublicIPsArgs)(nil)).Elem() } // A collection of values returned by getPublicIPs. type GetPublicIPsResultOutput struct{ *pulumi.OutputState } func (GetPublicIPsResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetPublicIPsResult)(nil)).Elem() } func (o GetPublicIPsResultOutput) ToGetPublicIPsResultOutput() GetPublicIPsResultOutput { return o } func (o GetPublicIPsResultOutput) ToGetPublicIPsResultOutputWithContext(ctx context.Context) GetPublicIPsResultOutput { return o } func (o GetPublicIPsResultOutput) AllocationType() pulumi.StringPtrOutput { return o.ApplyT(func(v GetPublicIPsResult) *string { return v.AllocationType }).(pulumi.StringPtrOutput) } func (o GetPublicIPsResultOutput) AttachmentStatus() pulumi.StringPtrOutput { return o.ApplyT(func(v GetPublicIPsResult) *string { return v.AttachmentStatus }).(pulumi.StringPtrOutput) } // The provider-assigned unique ID for this managed resource. func (o GetPublicIPsResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetPublicIPsResult) string { return v.Id }).(pulumi.StringOutput) } func (o GetPublicIPsResultOutput) NamePrefix() pulumi.StringPtrOutput { return o.ApplyT(func(v GetPublicIPsResult) *string { return v.NamePrefix }).(pulumi.StringPtrOutput) } // A List of `publicIps` blocks as defined below filtered by the criteria above. func (o GetPublicIPsResultOutput) PublicIps() GetPublicIPsPublicIpArrayOutput { return o.ApplyT(func(v GetPublicIPsResult) []GetPublicIPsPublicIp { return v.PublicIps }).(GetPublicIPsPublicIpArrayOutput) } func (o GetPublicIPsResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v GetPublicIPsResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(GetPublicIPsResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/ipgroupCIDR.go
sdk/go/azure/network/ipgroupCIDR.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages IP Group CIDR records. // // > **Note:** Warning Do not use this resource at the same time as the `cidrs` property of the // `network.IPGroup` resource for the same IP Group. Doing so will cause a conflict and // CIDRS will be removed. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("test-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleIPGroup, err := network.NewIPGroup(ctx, "example", &network.IPGroupArgs{ // Name: pulumi.String("test-ipgroup"), // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // _, err = network.NewIPGroupCIDR(ctx, "example", &network.IPGroupCIDRArgs{ // IpGroupId: exampleIPGroup.ID(), // Cidr: pulumi.String("10.10.10.0/24"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // # IP Group CIDRs can be imported using the `resource id` of the IP Group and // // the CIDR value (`/` characters have to be replaced by `_`), e.g. // // ```sh // $ pulumi import azure:network/iPGroupCIDR:IPGroupCIDR example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Network/ipGroups/test-ipgroup/cidrs/10.1.0.0_24 // ``` type IPGroupCIDR struct { pulumi.CustomResourceState Cidr pulumi.StringOutput `pulumi:"cidr"` // The ID of the destination IP Group. // Changing this forces a new IP Group CIDR to be created. IpGroupId pulumi.StringOutput `pulumi:"ipGroupId"` } // NewIPGroupCIDR registers a new resource with the given unique name, arguments, and options. func NewIPGroupCIDR(ctx *pulumi.Context, name string, args *IPGroupCIDRArgs, opts ...pulumi.ResourceOption) (*IPGroupCIDR, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Cidr == nil { return nil, errors.New("invalid value for required argument 'Cidr'") } if args.IpGroupId == nil { return nil, errors.New("invalid value for required argument 'IpGroupId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource IPGroupCIDR err := ctx.RegisterResource("azure:network/iPGroupCIDR:IPGroupCIDR", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetIPGroupCIDR gets an existing IPGroupCIDR resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetIPGroupCIDR(ctx *pulumi.Context, name string, id pulumi.IDInput, state *IPGroupCIDRState, opts ...pulumi.ResourceOption) (*IPGroupCIDR, error) { var resource IPGroupCIDR err := ctx.ReadResource("azure:network/iPGroupCIDR:IPGroupCIDR", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering IPGroupCIDR resources. type ipgroupCIDRState struct { Cidr *string `pulumi:"cidr"` // The ID of the destination IP Group. // Changing this forces a new IP Group CIDR to be created. IpGroupId *string `pulumi:"ipGroupId"` } type IPGroupCIDRState struct { Cidr pulumi.StringPtrInput // The ID of the destination IP Group. // Changing this forces a new IP Group CIDR to be created. IpGroupId pulumi.StringPtrInput } func (IPGroupCIDRState) ElementType() reflect.Type { return reflect.TypeOf((*ipgroupCIDRState)(nil)).Elem() } type ipgroupCIDRArgs struct { Cidr string `pulumi:"cidr"` // The ID of the destination IP Group. // Changing this forces a new IP Group CIDR to be created. IpGroupId string `pulumi:"ipGroupId"` } // The set of arguments for constructing a IPGroupCIDR resource. type IPGroupCIDRArgs struct { Cidr pulumi.StringInput // The ID of the destination IP Group. // Changing this forces a new IP Group CIDR to be created. IpGroupId pulumi.StringInput } func (IPGroupCIDRArgs) ElementType() reflect.Type { return reflect.TypeOf((*ipgroupCIDRArgs)(nil)).Elem() } type IPGroupCIDRInput interface { pulumi.Input ToIPGroupCIDROutput() IPGroupCIDROutput ToIPGroupCIDROutputWithContext(ctx context.Context) IPGroupCIDROutput } func (*IPGroupCIDR) ElementType() reflect.Type { return reflect.TypeOf((**IPGroupCIDR)(nil)).Elem() } func (i *IPGroupCIDR) ToIPGroupCIDROutput() IPGroupCIDROutput { return i.ToIPGroupCIDROutputWithContext(context.Background()) } func (i *IPGroupCIDR) ToIPGroupCIDROutputWithContext(ctx context.Context) IPGroupCIDROutput { return pulumi.ToOutputWithContext(ctx, i).(IPGroupCIDROutput) } // IPGroupCIDRArrayInput is an input type that accepts IPGroupCIDRArray and IPGroupCIDRArrayOutput values. // You can construct a concrete instance of `IPGroupCIDRArrayInput` via: // // IPGroupCIDRArray{ IPGroupCIDRArgs{...} } type IPGroupCIDRArrayInput interface { pulumi.Input ToIPGroupCIDRArrayOutput() IPGroupCIDRArrayOutput ToIPGroupCIDRArrayOutputWithContext(context.Context) IPGroupCIDRArrayOutput } type IPGroupCIDRArray []IPGroupCIDRInput func (IPGroupCIDRArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*IPGroupCIDR)(nil)).Elem() } func (i IPGroupCIDRArray) ToIPGroupCIDRArrayOutput() IPGroupCIDRArrayOutput { return i.ToIPGroupCIDRArrayOutputWithContext(context.Background()) } func (i IPGroupCIDRArray) ToIPGroupCIDRArrayOutputWithContext(ctx context.Context) IPGroupCIDRArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(IPGroupCIDRArrayOutput) } // IPGroupCIDRMapInput is an input type that accepts IPGroupCIDRMap and IPGroupCIDRMapOutput values. // You can construct a concrete instance of `IPGroupCIDRMapInput` via: // // IPGroupCIDRMap{ "key": IPGroupCIDRArgs{...} } type IPGroupCIDRMapInput interface { pulumi.Input ToIPGroupCIDRMapOutput() IPGroupCIDRMapOutput ToIPGroupCIDRMapOutputWithContext(context.Context) IPGroupCIDRMapOutput } type IPGroupCIDRMap map[string]IPGroupCIDRInput func (IPGroupCIDRMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*IPGroupCIDR)(nil)).Elem() } func (i IPGroupCIDRMap) ToIPGroupCIDRMapOutput() IPGroupCIDRMapOutput { return i.ToIPGroupCIDRMapOutputWithContext(context.Background()) } func (i IPGroupCIDRMap) ToIPGroupCIDRMapOutputWithContext(ctx context.Context) IPGroupCIDRMapOutput { return pulumi.ToOutputWithContext(ctx, i).(IPGroupCIDRMapOutput) } type IPGroupCIDROutput struct{ *pulumi.OutputState } func (IPGroupCIDROutput) ElementType() reflect.Type { return reflect.TypeOf((**IPGroupCIDR)(nil)).Elem() } func (o IPGroupCIDROutput) ToIPGroupCIDROutput() IPGroupCIDROutput { return o } func (o IPGroupCIDROutput) ToIPGroupCIDROutputWithContext(ctx context.Context) IPGroupCIDROutput { return o } func (o IPGroupCIDROutput) Cidr() pulumi.StringOutput { return o.ApplyT(func(v *IPGroupCIDR) pulumi.StringOutput { return v.Cidr }).(pulumi.StringOutput) } // The ID of the destination IP Group. // Changing this forces a new IP Group CIDR to be created. func (o IPGroupCIDROutput) IpGroupId() pulumi.StringOutput { return o.ApplyT(func(v *IPGroupCIDR) pulumi.StringOutput { return v.IpGroupId }).(pulumi.StringOutput) } type IPGroupCIDRArrayOutput struct{ *pulumi.OutputState } func (IPGroupCIDRArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*IPGroupCIDR)(nil)).Elem() } func (o IPGroupCIDRArrayOutput) ToIPGroupCIDRArrayOutput() IPGroupCIDRArrayOutput { return o } func (o IPGroupCIDRArrayOutput) ToIPGroupCIDRArrayOutputWithContext(ctx context.Context) IPGroupCIDRArrayOutput { return o } func (o IPGroupCIDRArrayOutput) Index(i pulumi.IntInput) IPGroupCIDROutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *IPGroupCIDR { return vs[0].([]*IPGroupCIDR)[vs[1].(int)] }).(IPGroupCIDROutput) } type IPGroupCIDRMapOutput struct{ *pulumi.OutputState } func (IPGroupCIDRMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*IPGroupCIDR)(nil)).Elem() } func (o IPGroupCIDRMapOutput) ToIPGroupCIDRMapOutput() IPGroupCIDRMapOutput { return o } func (o IPGroupCIDRMapOutput) ToIPGroupCIDRMapOutputWithContext(ctx context.Context) IPGroupCIDRMapOutput { return o } func (o IPGroupCIDRMapOutput) MapIndex(k pulumi.StringInput) IPGroupCIDROutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *IPGroupCIDR { return vs[0].(map[string]*IPGroupCIDR)[vs[1].(string)] }).(IPGroupCIDROutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*IPGroupCIDRInput)(nil)).Elem(), &IPGroupCIDR{}) pulumi.RegisterInputType(reflect.TypeOf((*IPGroupCIDRArrayInput)(nil)).Elem(), IPGroupCIDRArray{}) pulumi.RegisterInputType(reflect.TypeOf((*IPGroupCIDRMapInput)(nil)).Elem(), IPGroupCIDRMap{}) pulumi.RegisterOutputType(IPGroupCIDROutput{}) pulumi.RegisterOutputType(IPGroupCIDRArrayOutput{}) pulumi.RegisterOutputType(IPGroupCIDRMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/networkSecurityRule.go
sdk/go/azure/network/networkSecurityRule.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Network Security Rule. // // > **NOTE on Network Security Groups and Network Security Rules:** This provider currently // provides both a standalone Network Security Rule resource, and allows for Network Security Rules to be defined in-line within the Network Security Group resource. // At this time you cannot use a Network Security Group with in-line Network Security Rules in conjunction with any Network Security Rule resources. Doing so will cause a conflict of rule settings and will overwrite rules. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleNetworkSecurityGroup, err := network.NewNetworkSecurityGroup(ctx, "example", &network.NetworkSecurityGroupArgs{ // Name: pulumi.String("acceptanceTestSecurityGroup1"), // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // _, err = network.NewNetworkSecurityRule(ctx, "example", &network.NetworkSecurityRuleArgs{ // Name: pulumi.String("test123"), // Priority: pulumi.Int(100), // Direction: pulumi.String("Outbound"), // Access: pulumi.String("Allow"), // Protocol: pulumi.String("Tcp"), // SourcePortRange: pulumi.String("*"), // DestinationPortRange: pulumi.String("*"), // SourceAddressPrefix: pulumi.String("*"), // DestinationAddressPrefix: pulumi.String("*"), // ResourceGroupName: example.Name, // NetworkSecurityGroupName: exampleNetworkSecurityGroup.Name, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Network Security Rules can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/networkSecurityRule:NetworkSecurityRule rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/networkSecurityGroups/mySecurityGroup/securityRules/rule1 // ``` type NetworkSecurityRule struct { pulumi.CustomResourceState // Specifies whether network traffic is allowed or denied. Possible values are `Allow` and `Deny`. Access pulumi.StringOutput `pulumi:"access"` // A description for this rule. Restricted to 140 characters. Description pulumi.StringPtrOutput `pulumi:"description"` // CIDR or destination IP range or * to match any IP. Tags such as `VirtualNetwork`, `AzureLoadBalancer` and `Internet` can also be used. Besides, it also supports all available Service Tags like ‘Sql.WestEurope‘, ‘Storage.EastUS‘, etc. You can list the available service tags with the CLI: ```shell az network list-service-tags --location westcentralus```. For further information please see [Azure CLI - az network list-service-tags](https://docs.microsoft.com/cli/azure/network?view=azure-cli-latest#az-network-list-service-tags). DestinationAddressPrefix pulumi.StringPtrOutput `pulumi:"destinationAddressPrefix"` // List of destination address prefixes. Tags may not be used. DestinationAddressPrefixes pulumi.StringArrayOutput `pulumi:"destinationAddressPrefixes"` // A List of destination Application Security Group IDs // // > **Note:** One of `destinationAddressPrefix`, `destinationAddressPrefixes` or `destinationApplicationSecurityGroupIds` must be specified. DestinationApplicationSecurityGroupIds pulumi.StringPtrOutput `pulumi:"destinationApplicationSecurityGroupIds"` // Destination Port or Range. Integer or range between `0` and `65535` or `*` to match any. This is required if `destinationPortRanges` is not specified. DestinationPortRange pulumi.StringPtrOutput `pulumi:"destinationPortRange"` // List of destination ports or port ranges. This is required if `destinationPortRange` is not specified. DestinationPortRanges pulumi.StringArrayOutput `pulumi:"destinationPortRanges"` // The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are `Inbound` and `Outbound`. Direction pulumi.StringOutput `pulumi:"direction"` // The name of the security rule. This needs to be unique across all Rules in the Network Security Group. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the Network Security Group that we want to attach the rule to. Changing this forces a new resource to be created. NetworkSecurityGroupName pulumi.StringOutput `pulumi:"networkSecurityGroupName"` // Specifies the priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. Priority pulumi.IntOutput `pulumi:"priority"` // Network protocol this rule applies to. Possible values include `Tcp`, `Udp`, `Icmp`, `Esp`, `Ah` or `*` (which matches all). Protocol pulumi.StringOutput `pulumi:"protocol"` // The name of the resource group in which to create the Network Security Rule. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // CIDR or source IP range or * to match any IP. Tags such as `VirtualNetwork`, `AzureLoadBalancer` and `Internet` can also be used. SourceAddressPrefix pulumi.StringPtrOutput `pulumi:"sourceAddressPrefix"` // List of source address prefixes. Tags may not be used. SourceAddressPrefixes pulumi.StringArrayOutput `pulumi:"sourceAddressPrefixes"` // A List of source Application Security Group IDs // // > **Note:** One of `sourceAddressPrefix`, `sourceAddressPrefixes` or `sourceApplicationSecurityGroupIds` must be specified. SourceApplicationSecurityGroupIds pulumi.StringPtrOutput `pulumi:"sourceApplicationSecurityGroupIds"` // Source Port or Range. Integer or range between `0` and `65535` or `*` to match any. This is required if `sourcePortRanges` is not specified. SourcePortRange pulumi.StringPtrOutput `pulumi:"sourcePortRange"` // List of source ports or port ranges. This is required if `sourcePortRange` is not specified. SourcePortRanges pulumi.StringArrayOutput `pulumi:"sourcePortRanges"` } // NewNetworkSecurityRule registers a new resource with the given unique name, arguments, and options. func NewNetworkSecurityRule(ctx *pulumi.Context, name string, args *NetworkSecurityRuleArgs, opts ...pulumi.ResourceOption) (*NetworkSecurityRule, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Access == nil { return nil, errors.New("invalid value for required argument 'Access'") } if args.Direction == nil { return nil, errors.New("invalid value for required argument 'Direction'") } if args.NetworkSecurityGroupName == nil { return nil, errors.New("invalid value for required argument 'NetworkSecurityGroupName'") } if args.Priority == nil { return nil, errors.New("invalid value for required argument 'Priority'") } if args.Protocol == nil { return nil, errors.New("invalid value for required argument 'Protocol'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkSecurityRule err := ctx.RegisterResource("azure:network/networkSecurityRule:NetworkSecurityRule", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkSecurityRule gets an existing NetworkSecurityRule resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetNetworkSecurityRule(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkSecurityRuleState, opts ...pulumi.ResourceOption) (*NetworkSecurityRule, error) { var resource NetworkSecurityRule err := ctx.ReadResource("azure:network/networkSecurityRule:NetworkSecurityRule", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkSecurityRule resources. type networkSecurityRuleState struct { // Specifies whether network traffic is allowed or denied. Possible values are `Allow` and `Deny`. Access *string `pulumi:"access"` // A description for this rule. Restricted to 140 characters. Description *string `pulumi:"description"` // CIDR or destination IP range or * to match any IP. Tags such as `VirtualNetwork`, `AzureLoadBalancer` and `Internet` can also be used. Besides, it also supports all available Service Tags like ‘Sql.WestEurope‘, ‘Storage.EastUS‘, etc. You can list the available service tags with the CLI: ```shell az network list-service-tags --location westcentralus```. For further information please see [Azure CLI - az network list-service-tags](https://docs.microsoft.com/cli/azure/network?view=azure-cli-latest#az-network-list-service-tags). DestinationAddressPrefix *string `pulumi:"destinationAddressPrefix"` // List of destination address prefixes. Tags may not be used. DestinationAddressPrefixes []string `pulumi:"destinationAddressPrefixes"` // A List of destination Application Security Group IDs // // > **Note:** One of `destinationAddressPrefix`, `destinationAddressPrefixes` or `destinationApplicationSecurityGroupIds` must be specified. DestinationApplicationSecurityGroupIds *string `pulumi:"destinationApplicationSecurityGroupIds"` // Destination Port or Range. Integer or range between `0` and `65535` or `*` to match any. This is required if `destinationPortRanges` is not specified. DestinationPortRange *string `pulumi:"destinationPortRange"` // List of destination ports or port ranges. This is required if `destinationPortRange` is not specified. DestinationPortRanges []string `pulumi:"destinationPortRanges"` // The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are `Inbound` and `Outbound`. Direction *string `pulumi:"direction"` // The name of the security rule. This needs to be unique across all Rules in the Network Security Group. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Network Security Group that we want to attach the rule to. Changing this forces a new resource to be created. NetworkSecurityGroupName *string `pulumi:"networkSecurityGroupName"` // Specifies the priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. Priority *int `pulumi:"priority"` // Network protocol this rule applies to. Possible values include `Tcp`, `Udp`, `Icmp`, `Esp`, `Ah` or `*` (which matches all). Protocol *string `pulumi:"protocol"` // The name of the resource group in which to create the Network Security Rule. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // CIDR or source IP range or * to match any IP. Tags such as `VirtualNetwork`, `AzureLoadBalancer` and `Internet` can also be used. SourceAddressPrefix *string `pulumi:"sourceAddressPrefix"` // List of source address prefixes. Tags may not be used. SourceAddressPrefixes []string `pulumi:"sourceAddressPrefixes"` // A List of source Application Security Group IDs // // > **Note:** One of `sourceAddressPrefix`, `sourceAddressPrefixes` or `sourceApplicationSecurityGroupIds` must be specified. SourceApplicationSecurityGroupIds *string `pulumi:"sourceApplicationSecurityGroupIds"` // Source Port or Range. Integer or range between `0` and `65535` or `*` to match any. This is required if `sourcePortRanges` is not specified. SourcePortRange *string `pulumi:"sourcePortRange"` // List of source ports or port ranges. This is required if `sourcePortRange` is not specified. SourcePortRanges []string `pulumi:"sourcePortRanges"` } type NetworkSecurityRuleState struct { // Specifies whether network traffic is allowed or denied. Possible values are `Allow` and `Deny`. Access pulumi.StringPtrInput // A description for this rule. Restricted to 140 characters. Description pulumi.StringPtrInput // CIDR or destination IP range or * to match any IP. Tags such as `VirtualNetwork`, `AzureLoadBalancer` and `Internet` can also be used. Besides, it also supports all available Service Tags like ‘Sql.WestEurope‘, ‘Storage.EastUS‘, etc. You can list the available service tags with the CLI: ```shell az network list-service-tags --location westcentralus```. For further information please see [Azure CLI - az network list-service-tags](https://docs.microsoft.com/cli/azure/network?view=azure-cli-latest#az-network-list-service-tags). DestinationAddressPrefix pulumi.StringPtrInput // List of destination address prefixes. Tags may not be used. DestinationAddressPrefixes pulumi.StringArrayInput // A List of destination Application Security Group IDs // // > **Note:** One of `destinationAddressPrefix`, `destinationAddressPrefixes` or `destinationApplicationSecurityGroupIds` must be specified. DestinationApplicationSecurityGroupIds pulumi.StringPtrInput // Destination Port or Range. Integer or range between `0` and `65535` or `*` to match any. This is required if `destinationPortRanges` is not specified. DestinationPortRange pulumi.StringPtrInput // List of destination ports or port ranges. This is required if `destinationPortRange` is not specified. DestinationPortRanges pulumi.StringArrayInput // The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are `Inbound` and `Outbound`. Direction pulumi.StringPtrInput // The name of the security rule. This needs to be unique across all Rules in the Network Security Group. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Network Security Group that we want to attach the rule to. Changing this forces a new resource to be created. NetworkSecurityGroupName pulumi.StringPtrInput // Specifies the priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. Priority pulumi.IntPtrInput // Network protocol this rule applies to. Possible values include `Tcp`, `Udp`, `Icmp`, `Esp`, `Ah` or `*` (which matches all). Protocol pulumi.StringPtrInput // The name of the resource group in which to create the Network Security Rule. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // CIDR or source IP range or * to match any IP. Tags such as `VirtualNetwork`, `AzureLoadBalancer` and `Internet` can also be used. SourceAddressPrefix pulumi.StringPtrInput // List of source address prefixes. Tags may not be used. SourceAddressPrefixes pulumi.StringArrayInput // A List of source Application Security Group IDs // // > **Note:** One of `sourceAddressPrefix`, `sourceAddressPrefixes` or `sourceApplicationSecurityGroupIds` must be specified. SourceApplicationSecurityGroupIds pulumi.StringPtrInput // Source Port or Range. Integer or range between `0` and `65535` or `*` to match any. This is required if `sourcePortRanges` is not specified. SourcePortRange pulumi.StringPtrInput // List of source ports or port ranges. This is required if `sourcePortRange` is not specified. SourcePortRanges pulumi.StringArrayInput } func (NetworkSecurityRuleState) ElementType() reflect.Type { return reflect.TypeOf((*networkSecurityRuleState)(nil)).Elem() } type networkSecurityRuleArgs struct { // Specifies whether network traffic is allowed or denied. Possible values are `Allow` and `Deny`. Access string `pulumi:"access"` // A description for this rule. Restricted to 140 characters. Description *string `pulumi:"description"` // CIDR or destination IP range or * to match any IP. Tags such as `VirtualNetwork`, `AzureLoadBalancer` and `Internet` can also be used. Besides, it also supports all available Service Tags like ‘Sql.WestEurope‘, ‘Storage.EastUS‘, etc. You can list the available service tags with the CLI: ```shell az network list-service-tags --location westcentralus```. For further information please see [Azure CLI - az network list-service-tags](https://docs.microsoft.com/cli/azure/network?view=azure-cli-latest#az-network-list-service-tags). DestinationAddressPrefix *string `pulumi:"destinationAddressPrefix"` // List of destination address prefixes. Tags may not be used. DestinationAddressPrefixes []string `pulumi:"destinationAddressPrefixes"` // A List of destination Application Security Group IDs // // > **Note:** One of `destinationAddressPrefix`, `destinationAddressPrefixes` or `destinationApplicationSecurityGroupIds` must be specified. DestinationApplicationSecurityGroupIds *string `pulumi:"destinationApplicationSecurityGroupIds"` // Destination Port or Range. Integer or range between `0` and `65535` or `*` to match any. This is required if `destinationPortRanges` is not specified. DestinationPortRange *string `pulumi:"destinationPortRange"` // List of destination ports or port ranges. This is required if `destinationPortRange` is not specified. DestinationPortRanges []string `pulumi:"destinationPortRanges"` // The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are `Inbound` and `Outbound`. Direction string `pulumi:"direction"` // The name of the security rule. This needs to be unique across all Rules in the Network Security Group. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Network Security Group that we want to attach the rule to. Changing this forces a new resource to be created. NetworkSecurityGroupName string `pulumi:"networkSecurityGroupName"` // Specifies the priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. Priority int `pulumi:"priority"` // Network protocol this rule applies to. Possible values include `Tcp`, `Udp`, `Icmp`, `Esp`, `Ah` or `*` (which matches all). Protocol string `pulumi:"protocol"` // The name of the resource group in which to create the Network Security Rule. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // CIDR or source IP range or * to match any IP. Tags such as `VirtualNetwork`, `AzureLoadBalancer` and `Internet` can also be used. SourceAddressPrefix *string `pulumi:"sourceAddressPrefix"` // List of source address prefixes. Tags may not be used. SourceAddressPrefixes []string `pulumi:"sourceAddressPrefixes"` // A List of source Application Security Group IDs // // > **Note:** One of `sourceAddressPrefix`, `sourceAddressPrefixes` or `sourceApplicationSecurityGroupIds` must be specified. SourceApplicationSecurityGroupIds *string `pulumi:"sourceApplicationSecurityGroupIds"` // Source Port or Range. Integer or range between `0` and `65535` or `*` to match any. This is required if `sourcePortRanges` is not specified. SourcePortRange *string `pulumi:"sourcePortRange"` // List of source ports or port ranges. This is required if `sourcePortRange` is not specified. SourcePortRanges []string `pulumi:"sourcePortRanges"` } // The set of arguments for constructing a NetworkSecurityRule resource. type NetworkSecurityRuleArgs struct { // Specifies whether network traffic is allowed or denied. Possible values are `Allow` and `Deny`. Access pulumi.StringInput // A description for this rule. Restricted to 140 characters. Description pulumi.StringPtrInput // CIDR or destination IP range or * to match any IP. Tags such as `VirtualNetwork`, `AzureLoadBalancer` and `Internet` can also be used. Besides, it also supports all available Service Tags like ‘Sql.WestEurope‘, ‘Storage.EastUS‘, etc. You can list the available service tags with the CLI: ```shell az network list-service-tags --location westcentralus```. For further information please see [Azure CLI - az network list-service-tags](https://docs.microsoft.com/cli/azure/network?view=azure-cli-latest#az-network-list-service-tags). DestinationAddressPrefix pulumi.StringPtrInput // List of destination address prefixes. Tags may not be used. DestinationAddressPrefixes pulumi.StringArrayInput // A List of destination Application Security Group IDs // // > **Note:** One of `destinationAddressPrefix`, `destinationAddressPrefixes` or `destinationApplicationSecurityGroupIds` must be specified. DestinationApplicationSecurityGroupIds pulumi.StringPtrInput // Destination Port or Range. Integer or range between `0` and `65535` or `*` to match any. This is required if `destinationPortRanges` is not specified. DestinationPortRange pulumi.StringPtrInput // List of destination ports or port ranges. This is required if `destinationPortRange` is not specified. DestinationPortRanges pulumi.StringArrayInput // The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are `Inbound` and `Outbound`. Direction pulumi.StringInput // The name of the security rule. This needs to be unique across all Rules in the Network Security Group. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Network Security Group that we want to attach the rule to. Changing this forces a new resource to be created. NetworkSecurityGroupName pulumi.StringInput // Specifies the priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. Priority pulumi.IntInput // Network protocol this rule applies to. Possible values include `Tcp`, `Udp`, `Icmp`, `Esp`, `Ah` or `*` (which matches all). Protocol pulumi.StringInput // The name of the resource group in which to create the Network Security Rule. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // CIDR or source IP range or * to match any IP. Tags such as `VirtualNetwork`, `AzureLoadBalancer` and `Internet` can also be used. SourceAddressPrefix pulumi.StringPtrInput // List of source address prefixes. Tags may not be used. SourceAddressPrefixes pulumi.StringArrayInput // A List of source Application Security Group IDs // // > **Note:** One of `sourceAddressPrefix`, `sourceAddressPrefixes` or `sourceApplicationSecurityGroupIds` must be specified. SourceApplicationSecurityGroupIds pulumi.StringPtrInput // Source Port or Range. Integer or range between `0` and `65535` or `*` to match any. This is required if `sourcePortRanges` is not specified. SourcePortRange pulumi.StringPtrInput // List of source ports or port ranges. This is required if `sourcePortRange` is not specified. SourcePortRanges pulumi.StringArrayInput } func (NetworkSecurityRuleArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkSecurityRuleArgs)(nil)).Elem() } type NetworkSecurityRuleInput interface { pulumi.Input ToNetworkSecurityRuleOutput() NetworkSecurityRuleOutput ToNetworkSecurityRuleOutputWithContext(ctx context.Context) NetworkSecurityRuleOutput } func (*NetworkSecurityRule) ElementType() reflect.Type { return reflect.TypeOf((**NetworkSecurityRule)(nil)).Elem() } func (i *NetworkSecurityRule) ToNetworkSecurityRuleOutput() NetworkSecurityRuleOutput { return i.ToNetworkSecurityRuleOutputWithContext(context.Background()) } func (i *NetworkSecurityRule) ToNetworkSecurityRuleOutputWithContext(ctx context.Context) NetworkSecurityRuleOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkSecurityRuleOutput) } // NetworkSecurityRuleArrayInput is an input type that accepts NetworkSecurityRuleArray and NetworkSecurityRuleArrayOutput values. // You can construct a concrete instance of `NetworkSecurityRuleArrayInput` via: // // NetworkSecurityRuleArray{ NetworkSecurityRuleArgs{...} } type NetworkSecurityRuleArrayInput interface { pulumi.Input ToNetworkSecurityRuleArrayOutput() NetworkSecurityRuleArrayOutput ToNetworkSecurityRuleArrayOutputWithContext(context.Context) NetworkSecurityRuleArrayOutput } type NetworkSecurityRuleArray []NetworkSecurityRuleInput func (NetworkSecurityRuleArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkSecurityRule)(nil)).Elem() } func (i NetworkSecurityRuleArray) ToNetworkSecurityRuleArrayOutput() NetworkSecurityRuleArrayOutput { return i.ToNetworkSecurityRuleArrayOutputWithContext(context.Background()) } func (i NetworkSecurityRuleArray) ToNetworkSecurityRuleArrayOutputWithContext(ctx context.Context) NetworkSecurityRuleArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkSecurityRuleArrayOutput) } // NetworkSecurityRuleMapInput is an input type that accepts NetworkSecurityRuleMap and NetworkSecurityRuleMapOutput values. // You can construct a concrete instance of `NetworkSecurityRuleMapInput` via: // // NetworkSecurityRuleMap{ "key": NetworkSecurityRuleArgs{...} } type NetworkSecurityRuleMapInput interface { pulumi.Input ToNetworkSecurityRuleMapOutput() NetworkSecurityRuleMapOutput ToNetworkSecurityRuleMapOutputWithContext(context.Context) NetworkSecurityRuleMapOutput } type NetworkSecurityRuleMap map[string]NetworkSecurityRuleInput func (NetworkSecurityRuleMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkSecurityRule)(nil)).Elem() } func (i NetworkSecurityRuleMap) ToNetworkSecurityRuleMapOutput() NetworkSecurityRuleMapOutput { return i.ToNetworkSecurityRuleMapOutputWithContext(context.Background()) } func (i NetworkSecurityRuleMap) ToNetworkSecurityRuleMapOutputWithContext(ctx context.Context) NetworkSecurityRuleMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkSecurityRuleMapOutput) } type NetworkSecurityRuleOutput struct{ *pulumi.OutputState } func (NetworkSecurityRuleOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkSecurityRule)(nil)).Elem() } func (o NetworkSecurityRuleOutput) ToNetworkSecurityRuleOutput() NetworkSecurityRuleOutput { return o } func (o NetworkSecurityRuleOutput) ToNetworkSecurityRuleOutputWithContext(ctx context.Context) NetworkSecurityRuleOutput { return o } // Specifies whether network traffic is allowed or denied. Possible values are `Allow` and `Deny`. func (o NetworkSecurityRuleOutput) Access() pulumi.StringOutput { return o.ApplyT(func(v *NetworkSecurityRule) pulumi.StringOutput { return v.Access }).(pulumi.StringOutput) } // A description for this rule. Restricted to 140 characters. func (o NetworkSecurityRuleOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkSecurityRule) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // CIDR or destination IP range or * to match any IP. Tags such as `VirtualNetwork`, `AzureLoadBalancer` and `Internet` can also be used. Besides, it also supports all available Service Tags like ‘Sql.WestEurope‘, ‘Storage.EastUS‘, etc. You can list the available service tags with the CLI: ```shell az network list-service-tags --location westcentralus```. For further information please see [Azure CLI - az network list-service-tags](https://docs.microsoft.com/cli/azure/network?view=azure-cli-latest#az-network-list-service-tags). func (o NetworkSecurityRuleOutput) DestinationAddressPrefix() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkSecurityRule) pulumi.StringPtrOutput { return v.DestinationAddressPrefix }).(pulumi.StringPtrOutput) } // List of destination address prefixes. Tags may not be used. func (o NetworkSecurityRuleOutput) DestinationAddressPrefixes() pulumi.StringArrayOutput { return o.ApplyT(func(v *NetworkSecurityRule) pulumi.StringArrayOutput { return v.DestinationAddressPrefixes }).(pulumi.StringArrayOutput) } // A List of destination Application Security Group IDs // // > **Note:** One of `destinationAddressPrefix`, `destinationAddressPrefixes` or `destinationApplicationSecurityGroupIds` must be specified. func (o NetworkSecurityRuleOutput) DestinationApplicationSecurityGroupIds() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkSecurityRule) pulumi.StringPtrOutput { return v.DestinationApplicationSecurityGroupIds }).(pulumi.StringPtrOutput) } // Destination Port or Range. Integer or range between `0` and `65535` or `*` to match any. This is required if `destinationPortRanges` is not specified. func (o NetworkSecurityRuleOutput) DestinationPortRange() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkSecurityRule) pulumi.StringPtrOutput { return v.DestinationPortRange }).(pulumi.StringPtrOutput) } // List of destination ports or port ranges. This is required if `destinationPortRange` is not specified. func (o NetworkSecurityRuleOutput) DestinationPortRanges() pulumi.StringArrayOutput { return o.ApplyT(func(v *NetworkSecurityRule) pulumi.StringArrayOutput { return v.DestinationPortRanges }).(pulumi.StringArrayOutput) } // The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are `Inbound` and `Outbound`. func (o NetworkSecurityRuleOutput) Direction() pulumi.StringOutput { return o.ApplyT(func(v *NetworkSecurityRule) pulumi.StringOutput { return v.Direction }).(pulumi.StringOutput) } // The name of the security rule. This needs to be unique across all Rules in the Network Security Group. Changing this forces a new resource to be created. func (o NetworkSecurityRuleOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NetworkSecurityRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the Network Security Group that we want to attach the rule to. Changing this forces a new resource to be created. func (o NetworkSecurityRuleOutput) NetworkSecurityGroupName() pulumi.StringOutput { return o.ApplyT(func(v *NetworkSecurityRule) pulumi.StringOutput { return v.NetworkSecurityGroupName }).(pulumi.StringOutput) } // Specifies the priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. func (o NetworkSecurityRuleOutput) Priority() pulumi.IntOutput { return o.ApplyT(func(v *NetworkSecurityRule) pulumi.IntOutput { return v.Priority }).(pulumi.IntOutput) } // Network protocol this rule applies to. Possible values include `Tcp`, `Udp`, `Icmp`, `Esp`, `Ah` or `*` (which matches all). func (o NetworkSecurityRuleOutput) Protocol() pulumi.StringOutput { return o.ApplyT(func(v *NetworkSecurityRule) pulumi.StringOutput { return v.Protocol }).(pulumi.StringOutput) } // The name of the resource group in which to create the Network Security Rule. Changing this forces a new resource to be created. func (o NetworkSecurityRuleOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *NetworkSecurityRule) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // CIDR or source IP range or * to match any IP. Tags such as `VirtualNetwork`, `AzureLoadBalancer` and `Internet` can also be used. func (o NetworkSecurityRuleOutput) SourceAddressPrefix() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkSecurityRule) pulumi.StringPtrOutput { return v.SourceAddressPrefix }).(pulumi.StringPtrOutput) } // List of source address prefixes. Tags may not be used. func (o NetworkSecurityRuleOutput) SourceAddressPrefixes() pulumi.StringArrayOutput {
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
true
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getNetworkManagerNetworkGroup.go
sdk/go/azure/network/getNetworkManagerNetworkGroup.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about a Network Manager Network Group. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // exampleNetworkManager, err := network.NewNetworkManager(ctx, "example", &network.NetworkManagerArgs{ // Name: pulumi.String("example-network-manager"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // Scope: &network.NetworkManagerScopeArgs{ // SubscriptionIds: pulumi.StringArray{ // pulumi.String(current.Id), // }, // }, // ScopeAccesses: pulumi.StringArray{ // pulumi.String("Connectivity"), // pulumi.String("SecurityAdmin"), // }, // Description: pulumi.String("example network manager"), // }) // if err != nil { // return err // } // exampleNetworkManagerNetworkGroup, err := network.NewNetworkManagerNetworkGroup(ctx, "example", &network.NetworkManagerNetworkGroupArgs{ // Name: pulumi.String("example-group"), // NetworkManagerId: exampleNetworkManager.ID(), // }) // if err != nil { // return err // } // _ = network.LookupNetworkManagerNetworkGroupOutput(ctx, network.GetNetworkManagerNetworkGroupOutputArgs{ // Name: exampleNetworkManagerNetworkGroup.Name, // NetworkManagerId: exampleNetworkManager.ID(), // }, nil) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func LookupNetworkManagerNetworkGroup(ctx *pulumi.Context, args *LookupNetworkManagerNetworkGroupArgs, opts ...pulumi.InvokeOption) (*LookupNetworkManagerNetworkGroupResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupNetworkManagerNetworkGroupResult err := ctx.Invoke("azure:network/getNetworkManagerNetworkGroup:getNetworkManagerNetworkGroup", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getNetworkManagerNetworkGroup. type LookupNetworkManagerNetworkGroupArgs struct { // Specifies the name of the Network Manager Network Group. Name string `pulumi:"name"` // Specifies the ID of the Network Manager. NetworkManagerId string `pulumi:"networkManagerId"` } // A collection of values returned by getNetworkManagerNetworkGroup. type LookupNetworkManagerNetworkGroupResult struct { // A description of the Network Manager Network Group. Description string `pulumi:"description"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The member type of the Network Manager Network Group. MemberType string `pulumi:"memberType"` Name string `pulumi:"name"` NetworkManagerId string `pulumi:"networkManagerId"` } func LookupNetworkManagerNetworkGroupOutput(ctx *pulumi.Context, args LookupNetworkManagerNetworkGroupOutputArgs, opts ...pulumi.InvokeOption) LookupNetworkManagerNetworkGroupResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupNetworkManagerNetworkGroupResultOutput, error) { args := v.(LookupNetworkManagerNetworkGroupArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getNetworkManagerNetworkGroup:getNetworkManagerNetworkGroup", args, LookupNetworkManagerNetworkGroupResultOutput{}, options).(LookupNetworkManagerNetworkGroupResultOutput), nil }).(LookupNetworkManagerNetworkGroupResultOutput) } // A collection of arguments for invoking getNetworkManagerNetworkGroup. type LookupNetworkManagerNetworkGroupOutputArgs struct { // Specifies the name of the Network Manager Network Group. Name pulumi.StringInput `pulumi:"name"` // Specifies the ID of the Network Manager. NetworkManagerId pulumi.StringInput `pulumi:"networkManagerId"` } func (LookupNetworkManagerNetworkGroupOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupNetworkManagerNetworkGroupArgs)(nil)).Elem() } // A collection of values returned by getNetworkManagerNetworkGroup. type LookupNetworkManagerNetworkGroupResultOutput struct{ *pulumi.OutputState } func (LookupNetworkManagerNetworkGroupResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupNetworkManagerNetworkGroupResult)(nil)).Elem() } func (o LookupNetworkManagerNetworkGroupResultOutput) ToLookupNetworkManagerNetworkGroupResultOutput() LookupNetworkManagerNetworkGroupResultOutput { return o } func (o LookupNetworkManagerNetworkGroupResultOutput) ToLookupNetworkManagerNetworkGroupResultOutputWithContext(ctx context.Context) LookupNetworkManagerNetworkGroupResultOutput { return o } // A description of the Network Manager Network Group. func (o LookupNetworkManagerNetworkGroupResultOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkManagerNetworkGroupResult) string { return v.Description }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupNetworkManagerNetworkGroupResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkManagerNetworkGroupResult) string { return v.Id }).(pulumi.StringOutput) } // The member type of the Network Manager Network Group. func (o LookupNetworkManagerNetworkGroupResultOutput) MemberType() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkManagerNetworkGroupResult) string { return v.MemberType }).(pulumi.StringOutput) } func (o LookupNetworkManagerNetworkGroupResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkManagerNetworkGroupResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupNetworkManagerNetworkGroupResultOutput) NetworkManagerId() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkManagerNetworkGroupResult) string { return v.NetworkManagerId }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupNetworkManagerNetworkGroupResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getVirtualWan.go
sdk/go/azure/network/getVirtualWan.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Virtual Wan. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.LookupVirtualWan(ctx, &network.LookupVirtualWanArgs{ // Name: "existing", // ResourceGroupName: "existing", // }, nil) // if err != nil { // return err // } // ctx.Export("id", example.Id) // ctx.Export("allowBranchToBranchTraffic", example.AllowBranchToBranchTraffic) // ctx.Export("disableVpnEncryption", example.DisableVpnEncryption) // ctx.Export("location", example.Location) // ctx.Export("office365LocalBreakoutCategory", example.Office365LocalBreakoutCategory) // ctx.Export("sku", example.Sku) // ctx.Export("tags", example.Tags) // ctx.Export("virtualHubs", example.VirtualHubs) // ctx.Export("vpnSites", example.VpnSites) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func LookupVirtualWan(ctx *pulumi.Context, args *LookupVirtualWanArgs, opts ...pulumi.InvokeOption) (*LookupVirtualWanResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupVirtualWanResult err := ctx.Invoke("azure:network/getVirtualWan:getVirtualWan", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getVirtualWan. type LookupVirtualWanArgs struct { // The name of this Virtual Wan. Name string `pulumi:"name"` // The name of the Resource Group where the Virtual Wan exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getVirtualWan. type LookupVirtualWanResult struct { // Is branch to branch traffic is allowed? AllowBranchToBranchTraffic bool `pulumi:"allowBranchToBranchTraffic"` // Is VPN Encryption disabled? DisableVpnEncryption bool `pulumi:"disableVpnEncryption"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The Azure Region where the Virtual Wan exists. Location string `pulumi:"location"` Name string `pulumi:"name"` // The Office365 Local Breakout Category. Office365LocalBreakoutCategory string `pulumi:"office365LocalBreakoutCategory"` ResourceGroupName string `pulumi:"resourceGroupName"` // Type of Virtual Wan (Basic or Standard). Sku string `pulumi:"sku"` // A mapping of tags assigned to the Virtual Wan. Tags map[string]string `pulumi:"tags"` // A list of Virtual Hubs IDs attached to this Virtual WAN. VirtualHubIds []string `pulumi:"virtualHubIds"` // A list of VPN Site IDs attached to this Virtual WAN. VpnSiteIds []string `pulumi:"vpnSiteIds"` } func LookupVirtualWanOutput(ctx *pulumi.Context, args LookupVirtualWanOutputArgs, opts ...pulumi.InvokeOption) LookupVirtualWanResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupVirtualWanResultOutput, error) { args := v.(LookupVirtualWanArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getVirtualWan:getVirtualWan", args, LookupVirtualWanResultOutput{}, options).(LookupVirtualWanResultOutput), nil }).(LookupVirtualWanResultOutput) } // A collection of arguments for invoking getVirtualWan. type LookupVirtualWanOutputArgs struct { // The name of this Virtual Wan. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group where the Virtual Wan exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupVirtualWanOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupVirtualWanArgs)(nil)).Elem() } // A collection of values returned by getVirtualWan. type LookupVirtualWanResultOutput struct{ *pulumi.OutputState } func (LookupVirtualWanResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupVirtualWanResult)(nil)).Elem() } func (o LookupVirtualWanResultOutput) ToLookupVirtualWanResultOutput() LookupVirtualWanResultOutput { return o } func (o LookupVirtualWanResultOutput) ToLookupVirtualWanResultOutputWithContext(ctx context.Context) LookupVirtualWanResultOutput { return o } // Is branch to branch traffic is allowed? func (o LookupVirtualWanResultOutput) AllowBranchToBranchTraffic() pulumi.BoolOutput { return o.ApplyT(func(v LookupVirtualWanResult) bool { return v.AllowBranchToBranchTraffic }).(pulumi.BoolOutput) } // Is VPN Encryption disabled? func (o LookupVirtualWanResultOutput) DisableVpnEncryption() pulumi.BoolOutput { return o.ApplyT(func(v LookupVirtualWanResult) bool { return v.DisableVpnEncryption }).(pulumi.BoolOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupVirtualWanResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualWanResult) string { return v.Id }).(pulumi.StringOutput) } // The Azure Region where the Virtual Wan exists. func (o LookupVirtualWanResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualWanResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupVirtualWanResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualWanResult) string { return v.Name }).(pulumi.StringOutput) } // The Office365 Local Breakout Category. func (o LookupVirtualWanResultOutput) Office365LocalBreakoutCategory() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualWanResult) string { return v.Office365LocalBreakoutCategory }).(pulumi.StringOutput) } func (o LookupVirtualWanResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualWanResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // Type of Virtual Wan (Basic or Standard). func (o LookupVirtualWanResultOutput) Sku() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualWanResult) string { return v.Sku }).(pulumi.StringOutput) } // A mapping of tags assigned to the Virtual Wan. func (o LookupVirtualWanResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupVirtualWanResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // A list of Virtual Hubs IDs attached to this Virtual WAN. func (o LookupVirtualWanResultOutput) VirtualHubIds() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupVirtualWanResult) []string { return v.VirtualHubIds }).(pulumi.StringArrayOutput) } // A list of VPN Site IDs attached to this Virtual WAN. func (o LookupVirtualWanResultOutput) VpnSiteIds() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupVirtualWanResult) []string { return v.VpnSiteIds }).(pulumi.StringArrayOutput) } func init() { pulumi.RegisterOutputType(LookupVirtualWanResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getExpressRouteCircuit.go
sdk/go/azure/network/getExpressRouteCircuit.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing ExpressRoute circuit. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.LookupExpressRouteCircuit(ctx, &network.LookupExpressRouteCircuitArgs{ // ResourceGroupName: exampleAzurermResourceGroup.Name, // Name: exampleAzurermExpressRouteCircuit.Name, // }, nil) // if err != nil { // return err // } // ctx.Export("expressRouteCircuitId", example.Id) // ctx.Export("serviceKey", example.ServiceKey) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func LookupExpressRouteCircuit(ctx *pulumi.Context, args *LookupExpressRouteCircuitArgs, opts ...pulumi.InvokeOption) (*LookupExpressRouteCircuitResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupExpressRouteCircuitResult err := ctx.Invoke("azure:network/getExpressRouteCircuit:getExpressRouteCircuit", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getExpressRouteCircuit. type LookupExpressRouteCircuitArgs struct { // The name of the ExpressRoute circuit. Name string `pulumi:"name"` // The Name of the Resource Group where the ExpressRoute circuit exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getExpressRouteCircuit. type LookupExpressRouteCircuitResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The Azure location where the ExpressRoute circuit exists Location string `pulumi:"location"` Name string `pulumi:"name"` // A `peerings` block for the ExpressRoute circuit as documented below Peerings []GetExpressRouteCircuitPeeringType `pulumi:"peerings"` ResourceGroupName string `pulumi:"resourceGroupName"` // The string needed by the service provider to provision the ExpressRoute circuit. ServiceKey string `pulumi:"serviceKey"` // A `serviceProviderProperties` block for the ExpressRoute circuit as documented below ServiceProviderProperties []GetExpressRouteCircuitServiceProviderProperty `pulumi:"serviceProviderProperties"` // The ExpressRoute circuit provisioning state from your chosen service provider. Possible values are `NotProvisioned`, `Provisioning`, `Provisioned`, and `Deprovisioning`. ServiceProviderProvisioningState string `pulumi:"serviceProviderProvisioningState"` // A `sku` block for the ExpressRoute circuit as documented below. Sku GetExpressRouteCircuitSku `pulumi:"sku"` } func LookupExpressRouteCircuitOutput(ctx *pulumi.Context, args LookupExpressRouteCircuitOutputArgs, opts ...pulumi.InvokeOption) LookupExpressRouteCircuitResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupExpressRouteCircuitResultOutput, error) { args := v.(LookupExpressRouteCircuitArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getExpressRouteCircuit:getExpressRouteCircuit", args, LookupExpressRouteCircuitResultOutput{}, options).(LookupExpressRouteCircuitResultOutput), nil }).(LookupExpressRouteCircuitResultOutput) } // A collection of arguments for invoking getExpressRouteCircuit. type LookupExpressRouteCircuitOutputArgs struct { // The name of the ExpressRoute circuit. Name pulumi.StringInput `pulumi:"name"` // The Name of the Resource Group where the ExpressRoute circuit exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupExpressRouteCircuitOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupExpressRouteCircuitArgs)(nil)).Elem() } // A collection of values returned by getExpressRouteCircuit. type LookupExpressRouteCircuitResultOutput struct{ *pulumi.OutputState } func (LookupExpressRouteCircuitResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupExpressRouteCircuitResult)(nil)).Elem() } func (o LookupExpressRouteCircuitResultOutput) ToLookupExpressRouteCircuitResultOutput() LookupExpressRouteCircuitResultOutput { return o } func (o LookupExpressRouteCircuitResultOutput) ToLookupExpressRouteCircuitResultOutputWithContext(ctx context.Context) LookupExpressRouteCircuitResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o LookupExpressRouteCircuitResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupExpressRouteCircuitResult) string { return v.Id }).(pulumi.StringOutput) } // The Azure location where the ExpressRoute circuit exists func (o LookupExpressRouteCircuitResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupExpressRouteCircuitResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupExpressRouteCircuitResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupExpressRouteCircuitResult) string { return v.Name }).(pulumi.StringOutput) } // A `peerings` block for the ExpressRoute circuit as documented below func (o LookupExpressRouteCircuitResultOutput) Peerings() GetExpressRouteCircuitPeeringTypeArrayOutput { return o.ApplyT(func(v LookupExpressRouteCircuitResult) []GetExpressRouteCircuitPeeringType { return v.Peerings }).(GetExpressRouteCircuitPeeringTypeArrayOutput) } func (o LookupExpressRouteCircuitResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupExpressRouteCircuitResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // The string needed by the service provider to provision the ExpressRoute circuit. func (o LookupExpressRouteCircuitResultOutput) ServiceKey() pulumi.StringOutput { return o.ApplyT(func(v LookupExpressRouteCircuitResult) string { return v.ServiceKey }).(pulumi.StringOutput) } // A `serviceProviderProperties` block for the ExpressRoute circuit as documented below func (o LookupExpressRouteCircuitResultOutput) ServiceProviderProperties() GetExpressRouteCircuitServiceProviderPropertyArrayOutput { return o.ApplyT(func(v LookupExpressRouteCircuitResult) []GetExpressRouteCircuitServiceProviderProperty { return v.ServiceProviderProperties }).(GetExpressRouteCircuitServiceProviderPropertyArrayOutput) } // The ExpressRoute circuit provisioning state from your chosen service provider. Possible values are `NotProvisioned`, `Provisioning`, `Provisioned`, and `Deprovisioning`. func (o LookupExpressRouteCircuitResultOutput) ServiceProviderProvisioningState() pulumi.StringOutput { return o.ApplyT(func(v LookupExpressRouteCircuitResult) string { return v.ServiceProviderProvisioningState }).(pulumi.StringOutput) } // A `sku` block for the ExpressRoute circuit as documented below. func (o LookupExpressRouteCircuitResultOutput) Sku() GetExpressRouteCircuitSkuOutput { return o.ApplyT(func(v LookupExpressRouteCircuitResult) GetExpressRouteCircuitSku { return v.Sku }).(GetExpressRouteCircuitSkuOutput) } func init() { pulumi.RegisterOutputType(LookupExpressRouteCircuitResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/ipgroup.go
sdk/go/azure/network/ipgroup.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an IP group that contains a list of CIDRs and/or IP addresses. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = network.NewIPGroup(ctx, "example", &network.IPGroupArgs{ // Name: pulumi.String("example1-ipgroup"), // Location: example.Location, // ResourceGroupName: example.Name, // Cidrs: pulumi.StringArray{ // pulumi.String("192.168.0.1"), // pulumi.String("172.16.240.0/20"), // pulumi.String("10.48.0.0/12"), // }, // Tags: pulumi.StringMap{ // "environment": pulumi.String("Production"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // IP Groups can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/iPGroup:IPGroup ipgroup1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/ipGroups/myIpGroup // ``` type IPGroup struct { pulumi.CustomResourceState Cidrs pulumi.StringArrayOutput `pulumi:"cidrs"` // A list of ID of Firewall. FirewallIds pulumi.StringArrayOutput `pulumi:"firewallIds"` // A list of ID of Firewall Policy`. FirewallPolicyIds pulumi.StringArrayOutput `pulumi:"firewallPolicyIds"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies the name of the IP group. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the resource group in which to create the IP group. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewIPGroup registers a new resource with the given unique name, arguments, and options. func NewIPGroup(ctx *pulumi.Context, name string, args *IPGroupArgs, opts ...pulumi.ResourceOption) (*IPGroup, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource IPGroup err := ctx.RegisterResource("azure:network/iPGroup:IPGroup", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetIPGroup gets an existing IPGroup resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetIPGroup(ctx *pulumi.Context, name string, id pulumi.IDInput, state *IPGroupState, opts ...pulumi.ResourceOption) (*IPGroup, error) { var resource IPGroup err := ctx.ReadResource("azure:network/iPGroup:IPGroup", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering IPGroup resources. type ipgroupState struct { Cidrs []string `pulumi:"cidrs"` // A list of ID of Firewall. FirewallIds []string `pulumi:"firewallIds"` // A list of ID of Firewall Policy`. FirewallPolicyIds []string `pulumi:"firewallPolicyIds"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of the IP group. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the IP group. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } type IPGroupState struct { Cidrs pulumi.StringArrayInput // A list of ID of Firewall. FirewallIds pulumi.StringArrayInput // A list of ID of Firewall Policy`. FirewallPolicyIds pulumi.StringArrayInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of the IP group. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the IP group. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (IPGroupState) ElementType() reflect.Type { return reflect.TypeOf((*ipgroupState)(nil)).Elem() } type ipgroupArgs struct { Cidrs []string `pulumi:"cidrs"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of the IP group. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the IP group. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a IPGroup resource. type IPGroupArgs struct { Cidrs pulumi.StringArrayInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of the IP group. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the IP group. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (IPGroupArgs) ElementType() reflect.Type { return reflect.TypeOf((*ipgroupArgs)(nil)).Elem() } type IPGroupInput interface { pulumi.Input ToIPGroupOutput() IPGroupOutput ToIPGroupOutputWithContext(ctx context.Context) IPGroupOutput } func (*IPGroup) ElementType() reflect.Type { return reflect.TypeOf((**IPGroup)(nil)).Elem() } func (i *IPGroup) ToIPGroupOutput() IPGroupOutput { return i.ToIPGroupOutputWithContext(context.Background()) } func (i *IPGroup) ToIPGroupOutputWithContext(ctx context.Context) IPGroupOutput { return pulumi.ToOutputWithContext(ctx, i).(IPGroupOutput) } // IPGroupArrayInput is an input type that accepts IPGroupArray and IPGroupArrayOutput values. // You can construct a concrete instance of `IPGroupArrayInput` via: // // IPGroupArray{ IPGroupArgs{...} } type IPGroupArrayInput interface { pulumi.Input ToIPGroupArrayOutput() IPGroupArrayOutput ToIPGroupArrayOutputWithContext(context.Context) IPGroupArrayOutput } type IPGroupArray []IPGroupInput func (IPGroupArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*IPGroup)(nil)).Elem() } func (i IPGroupArray) ToIPGroupArrayOutput() IPGroupArrayOutput { return i.ToIPGroupArrayOutputWithContext(context.Background()) } func (i IPGroupArray) ToIPGroupArrayOutputWithContext(ctx context.Context) IPGroupArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(IPGroupArrayOutput) } // IPGroupMapInput is an input type that accepts IPGroupMap and IPGroupMapOutput values. // You can construct a concrete instance of `IPGroupMapInput` via: // // IPGroupMap{ "key": IPGroupArgs{...} } type IPGroupMapInput interface { pulumi.Input ToIPGroupMapOutput() IPGroupMapOutput ToIPGroupMapOutputWithContext(context.Context) IPGroupMapOutput } type IPGroupMap map[string]IPGroupInput func (IPGroupMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*IPGroup)(nil)).Elem() } func (i IPGroupMap) ToIPGroupMapOutput() IPGroupMapOutput { return i.ToIPGroupMapOutputWithContext(context.Background()) } func (i IPGroupMap) ToIPGroupMapOutputWithContext(ctx context.Context) IPGroupMapOutput { return pulumi.ToOutputWithContext(ctx, i).(IPGroupMapOutput) } type IPGroupOutput struct{ *pulumi.OutputState } func (IPGroupOutput) ElementType() reflect.Type { return reflect.TypeOf((**IPGroup)(nil)).Elem() } func (o IPGroupOutput) ToIPGroupOutput() IPGroupOutput { return o } func (o IPGroupOutput) ToIPGroupOutputWithContext(ctx context.Context) IPGroupOutput { return o } func (o IPGroupOutput) Cidrs() pulumi.StringArrayOutput { return o.ApplyT(func(v *IPGroup) pulumi.StringArrayOutput { return v.Cidrs }).(pulumi.StringArrayOutput) } // A list of ID of Firewall. func (o IPGroupOutput) FirewallIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *IPGroup) pulumi.StringArrayOutput { return v.FirewallIds }).(pulumi.StringArrayOutput) } // A list of ID of Firewall Policy`. func (o IPGroupOutput) FirewallPolicyIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *IPGroup) pulumi.StringArrayOutput { return v.FirewallPolicyIds }).(pulumi.StringArrayOutput) } // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. func (o IPGroupOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *IPGroup) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name of the IP group. Changing this forces a new resource to be created. func (o IPGroupOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *IPGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group in which to create the IP group. Changing this forces a new resource to be created. func (o IPGroupOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *IPGroup) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o IPGroupOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *IPGroup) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type IPGroupArrayOutput struct{ *pulumi.OutputState } func (IPGroupArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*IPGroup)(nil)).Elem() } func (o IPGroupArrayOutput) ToIPGroupArrayOutput() IPGroupArrayOutput { return o } func (o IPGroupArrayOutput) ToIPGroupArrayOutputWithContext(ctx context.Context) IPGroupArrayOutput { return o } func (o IPGroupArrayOutput) Index(i pulumi.IntInput) IPGroupOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *IPGroup { return vs[0].([]*IPGroup)[vs[1].(int)] }).(IPGroupOutput) } type IPGroupMapOutput struct{ *pulumi.OutputState } func (IPGroupMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*IPGroup)(nil)).Elem() } func (o IPGroupMapOutput) ToIPGroupMapOutput() IPGroupMapOutput { return o } func (o IPGroupMapOutput) ToIPGroupMapOutputWithContext(ctx context.Context) IPGroupMapOutput { return o } func (o IPGroupMapOutput) MapIndex(k pulumi.StringInput) IPGroupOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *IPGroup { return vs[0].(map[string]*IPGroup)[vs[1].(string)] }).(IPGroupOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*IPGroupInput)(nil)).Elem(), &IPGroup{}) pulumi.RegisterInputType(reflect.TypeOf((*IPGroupArrayInput)(nil)).Elem(), IPGroupArray{}) pulumi.RegisterInputType(reflect.TypeOf((*IPGroupMapInput)(nil)).Elem(), IPGroupMap{}) pulumi.RegisterOutputType(IPGroupOutput{}) pulumi.RegisterOutputType(IPGroupArrayOutput{}) pulumi.RegisterOutputType(IPGroupMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/firewallNetworkRuleCollection.go
sdk/go/azure/network/firewallNetworkRuleCollection.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Network Rule Collection within an Azure Firewall. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("testvnet"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("AzureFirewallSubnet"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.1.0/24"), // }, // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("testpip"), // Location: example.Location, // ResourceGroupName: example.Name, // AllocationMethod: pulumi.String("Static"), // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // exampleFirewall, err := network.NewFirewall(ctx, "example", &network.FirewallArgs{ // Name: pulumi.String("testfirewall"), // Location: example.Location, // ResourceGroupName: example.Name, // SkuName: pulumi.String("AZFW_VNet"), // SkuTier: pulumi.String("Standard"), // IpConfigurations: network.FirewallIpConfigurationArray{ // &network.FirewallIpConfigurationArgs{ // Name: pulumi.String("configuration"), // SubnetId: exampleSubnet.ID(), // PublicIpAddressId: examplePublicIp.ID(), // }, // }, // }) // if err != nil { // return err // } // _, err = network.NewFirewallNetworkRuleCollection(ctx, "example", &network.FirewallNetworkRuleCollectionArgs{ // Name: pulumi.String("testcollection"), // AzureFirewallName: exampleFirewall.Name, // ResourceGroupName: example.Name, // Priority: pulumi.Int(100), // Action: pulumi.String("Allow"), // Rules: network.FirewallNetworkRuleCollectionRuleArray{ // &network.FirewallNetworkRuleCollectionRuleArgs{ // Name: pulumi.String("testrule"), // SourceAddresses: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // DestinationPorts: pulumi.StringArray{ // pulumi.String("53"), // }, // DestinationAddresses: pulumi.StringArray{ // pulumi.String("8.8.8.8"), // pulumi.String("8.8.4.4"), // }, // Protocols: pulumi.StringArray{ // pulumi.String("TCP"), // pulumi.String("UDP"), // }, // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Azure Firewall Network Rule Collections can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/firewallNetworkRuleCollection:FirewallNetworkRuleCollection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/azureFirewalls/myfirewall/networkRuleCollections/mycollection // ``` type FirewallNetworkRuleCollection struct { pulumi.CustomResourceState // Specifies the action the rule will apply to matching traffic. Possible values are `Allow` and `Deny`. Action pulumi.StringOutput `pulumi:"action"` // Specifies the name of the Firewall in which the Network Rule Collection should be created. Changing this forces a new resource to be created. AzureFirewallName pulumi.StringOutput `pulumi:"azureFirewallName"` // Specifies the name of the Network Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the priority of the rule collection. Possible values are between `100` - `65000`. Priority pulumi.IntOutput `pulumi:"priority"` // Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // One or more `rule` blocks as defined below. Rules FirewallNetworkRuleCollectionRuleArrayOutput `pulumi:"rules"` } // NewFirewallNetworkRuleCollection registers a new resource with the given unique name, arguments, and options. func NewFirewallNetworkRuleCollection(ctx *pulumi.Context, name string, args *FirewallNetworkRuleCollectionArgs, opts ...pulumi.ResourceOption) (*FirewallNetworkRuleCollection, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Action == nil { return nil, errors.New("invalid value for required argument 'Action'") } if args.AzureFirewallName == nil { return nil, errors.New("invalid value for required argument 'AzureFirewallName'") } if args.Priority == nil { return nil, errors.New("invalid value for required argument 'Priority'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Rules == nil { return nil, errors.New("invalid value for required argument 'Rules'") } opts = internal.PkgResourceDefaultOpts(opts) var resource FirewallNetworkRuleCollection err := ctx.RegisterResource("azure:network/firewallNetworkRuleCollection:FirewallNetworkRuleCollection", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetFirewallNetworkRuleCollection gets an existing FirewallNetworkRuleCollection resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetFirewallNetworkRuleCollection(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FirewallNetworkRuleCollectionState, opts ...pulumi.ResourceOption) (*FirewallNetworkRuleCollection, error) { var resource FirewallNetworkRuleCollection err := ctx.ReadResource("azure:network/firewallNetworkRuleCollection:FirewallNetworkRuleCollection", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering FirewallNetworkRuleCollection resources. type firewallNetworkRuleCollectionState struct { // Specifies the action the rule will apply to matching traffic. Possible values are `Allow` and `Deny`. Action *string `pulumi:"action"` // Specifies the name of the Firewall in which the Network Rule Collection should be created. Changing this forces a new resource to be created. AzureFirewallName *string `pulumi:"azureFirewallName"` // Specifies the name of the Network Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the priority of the rule collection. Possible values are between `100` - `65000`. Priority *int `pulumi:"priority"` // Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // One or more `rule` blocks as defined below. Rules []FirewallNetworkRuleCollectionRule `pulumi:"rules"` } type FirewallNetworkRuleCollectionState struct { // Specifies the action the rule will apply to matching traffic. Possible values are `Allow` and `Deny`. Action pulumi.StringPtrInput // Specifies the name of the Firewall in which the Network Rule Collection should be created. Changing this forces a new resource to be created. AzureFirewallName pulumi.StringPtrInput // Specifies the name of the Network Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the priority of the rule collection. Possible values are between `100` - `65000`. Priority pulumi.IntPtrInput // Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // One or more `rule` blocks as defined below. Rules FirewallNetworkRuleCollectionRuleArrayInput } func (FirewallNetworkRuleCollectionState) ElementType() reflect.Type { return reflect.TypeOf((*firewallNetworkRuleCollectionState)(nil)).Elem() } type firewallNetworkRuleCollectionArgs struct { // Specifies the action the rule will apply to matching traffic. Possible values are `Allow` and `Deny`. Action string `pulumi:"action"` // Specifies the name of the Firewall in which the Network Rule Collection should be created. Changing this forces a new resource to be created. AzureFirewallName string `pulumi:"azureFirewallName"` // Specifies the name of the Network Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the priority of the rule collection. Possible values are between `100` - `65000`. Priority int `pulumi:"priority"` // Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // One or more `rule` blocks as defined below. Rules []FirewallNetworkRuleCollectionRule `pulumi:"rules"` } // The set of arguments for constructing a FirewallNetworkRuleCollection resource. type FirewallNetworkRuleCollectionArgs struct { // Specifies the action the rule will apply to matching traffic. Possible values are `Allow` and `Deny`. Action pulumi.StringInput // Specifies the name of the Firewall in which the Network Rule Collection should be created. Changing this forces a new resource to be created. AzureFirewallName pulumi.StringInput // Specifies the name of the Network Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the priority of the rule collection. Possible values are between `100` - `65000`. Priority pulumi.IntInput // Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // One or more `rule` blocks as defined below. Rules FirewallNetworkRuleCollectionRuleArrayInput } func (FirewallNetworkRuleCollectionArgs) ElementType() reflect.Type { return reflect.TypeOf((*firewallNetworkRuleCollectionArgs)(nil)).Elem() } type FirewallNetworkRuleCollectionInput interface { pulumi.Input ToFirewallNetworkRuleCollectionOutput() FirewallNetworkRuleCollectionOutput ToFirewallNetworkRuleCollectionOutputWithContext(ctx context.Context) FirewallNetworkRuleCollectionOutput } func (*FirewallNetworkRuleCollection) ElementType() reflect.Type { return reflect.TypeOf((**FirewallNetworkRuleCollection)(nil)).Elem() } func (i *FirewallNetworkRuleCollection) ToFirewallNetworkRuleCollectionOutput() FirewallNetworkRuleCollectionOutput { return i.ToFirewallNetworkRuleCollectionOutputWithContext(context.Background()) } func (i *FirewallNetworkRuleCollection) ToFirewallNetworkRuleCollectionOutputWithContext(ctx context.Context) FirewallNetworkRuleCollectionOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallNetworkRuleCollectionOutput) } // FirewallNetworkRuleCollectionArrayInput is an input type that accepts FirewallNetworkRuleCollectionArray and FirewallNetworkRuleCollectionArrayOutput values. // You can construct a concrete instance of `FirewallNetworkRuleCollectionArrayInput` via: // // FirewallNetworkRuleCollectionArray{ FirewallNetworkRuleCollectionArgs{...} } type FirewallNetworkRuleCollectionArrayInput interface { pulumi.Input ToFirewallNetworkRuleCollectionArrayOutput() FirewallNetworkRuleCollectionArrayOutput ToFirewallNetworkRuleCollectionArrayOutputWithContext(context.Context) FirewallNetworkRuleCollectionArrayOutput } type FirewallNetworkRuleCollectionArray []FirewallNetworkRuleCollectionInput func (FirewallNetworkRuleCollectionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*FirewallNetworkRuleCollection)(nil)).Elem() } func (i FirewallNetworkRuleCollectionArray) ToFirewallNetworkRuleCollectionArrayOutput() FirewallNetworkRuleCollectionArrayOutput { return i.ToFirewallNetworkRuleCollectionArrayOutputWithContext(context.Background()) } func (i FirewallNetworkRuleCollectionArray) ToFirewallNetworkRuleCollectionArrayOutputWithContext(ctx context.Context) FirewallNetworkRuleCollectionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallNetworkRuleCollectionArrayOutput) } // FirewallNetworkRuleCollectionMapInput is an input type that accepts FirewallNetworkRuleCollectionMap and FirewallNetworkRuleCollectionMapOutput values. // You can construct a concrete instance of `FirewallNetworkRuleCollectionMapInput` via: // // FirewallNetworkRuleCollectionMap{ "key": FirewallNetworkRuleCollectionArgs{...} } type FirewallNetworkRuleCollectionMapInput interface { pulumi.Input ToFirewallNetworkRuleCollectionMapOutput() FirewallNetworkRuleCollectionMapOutput ToFirewallNetworkRuleCollectionMapOutputWithContext(context.Context) FirewallNetworkRuleCollectionMapOutput } type FirewallNetworkRuleCollectionMap map[string]FirewallNetworkRuleCollectionInput func (FirewallNetworkRuleCollectionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FirewallNetworkRuleCollection)(nil)).Elem() } func (i FirewallNetworkRuleCollectionMap) ToFirewallNetworkRuleCollectionMapOutput() FirewallNetworkRuleCollectionMapOutput { return i.ToFirewallNetworkRuleCollectionMapOutputWithContext(context.Background()) } func (i FirewallNetworkRuleCollectionMap) ToFirewallNetworkRuleCollectionMapOutputWithContext(ctx context.Context) FirewallNetworkRuleCollectionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallNetworkRuleCollectionMapOutput) } type FirewallNetworkRuleCollectionOutput struct{ *pulumi.OutputState } func (FirewallNetworkRuleCollectionOutput) ElementType() reflect.Type { return reflect.TypeOf((**FirewallNetworkRuleCollection)(nil)).Elem() } func (o FirewallNetworkRuleCollectionOutput) ToFirewallNetworkRuleCollectionOutput() FirewallNetworkRuleCollectionOutput { return o } func (o FirewallNetworkRuleCollectionOutput) ToFirewallNetworkRuleCollectionOutputWithContext(ctx context.Context) FirewallNetworkRuleCollectionOutput { return o } // Specifies the action the rule will apply to matching traffic. Possible values are `Allow` and `Deny`. func (o FirewallNetworkRuleCollectionOutput) Action() pulumi.StringOutput { return o.ApplyT(func(v *FirewallNetworkRuleCollection) pulumi.StringOutput { return v.Action }).(pulumi.StringOutput) } // Specifies the name of the Firewall in which the Network Rule Collection should be created. Changing this forces a new resource to be created. func (o FirewallNetworkRuleCollectionOutput) AzureFirewallName() pulumi.StringOutput { return o.ApplyT(func(v *FirewallNetworkRuleCollection) pulumi.StringOutput { return v.AzureFirewallName }).(pulumi.StringOutput) } // Specifies the name of the Network Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created. func (o FirewallNetworkRuleCollectionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *FirewallNetworkRuleCollection) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the priority of the rule collection. Possible values are between `100` - `65000`. func (o FirewallNetworkRuleCollectionOutput) Priority() pulumi.IntOutput { return o.ApplyT(func(v *FirewallNetworkRuleCollection) pulumi.IntOutput { return v.Priority }).(pulumi.IntOutput) } // Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created. func (o FirewallNetworkRuleCollectionOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *FirewallNetworkRuleCollection) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // One or more `rule` blocks as defined below. func (o FirewallNetworkRuleCollectionOutput) Rules() FirewallNetworkRuleCollectionRuleArrayOutput { return o.ApplyT(func(v *FirewallNetworkRuleCollection) FirewallNetworkRuleCollectionRuleArrayOutput { return v.Rules }).(FirewallNetworkRuleCollectionRuleArrayOutput) } type FirewallNetworkRuleCollectionArrayOutput struct{ *pulumi.OutputState } func (FirewallNetworkRuleCollectionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*FirewallNetworkRuleCollection)(nil)).Elem() } func (o FirewallNetworkRuleCollectionArrayOutput) ToFirewallNetworkRuleCollectionArrayOutput() FirewallNetworkRuleCollectionArrayOutput { return o } func (o FirewallNetworkRuleCollectionArrayOutput) ToFirewallNetworkRuleCollectionArrayOutputWithContext(ctx context.Context) FirewallNetworkRuleCollectionArrayOutput { return o } func (o FirewallNetworkRuleCollectionArrayOutput) Index(i pulumi.IntInput) FirewallNetworkRuleCollectionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FirewallNetworkRuleCollection { return vs[0].([]*FirewallNetworkRuleCollection)[vs[1].(int)] }).(FirewallNetworkRuleCollectionOutput) } type FirewallNetworkRuleCollectionMapOutput struct{ *pulumi.OutputState } func (FirewallNetworkRuleCollectionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FirewallNetworkRuleCollection)(nil)).Elem() } func (o FirewallNetworkRuleCollectionMapOutput) ToFirewallNetworkRuleCollectionMapOutput() FirewallNetworkRuleCollectionMapOutput { return o } func (o FirewallNetworkRuleCollectionMapOutput) ToFirewallNetworkRuleCollectionMapOutputWithContext(ctx context.Context) FirewallNetworkRuleCollectionMapOutput { return o } func (o FirewallNetworkRuleCollectionMapOutput) MapIndex(k pulumi.StringInput) FirewallNetworkRuleCollectionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FirewallNetworkRuleCollection { return vs[0].(map[string]*FirewallNetworkRuleCollection)[vs[1].(string)] }).(FirewallNetworkRuleCollectionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*FirewallNetworkRuleCollectionInput)(nil)).Elem(), &FirewallNetworkRuleCollection{}) pulumi.RegisterInputType(reflect.TypeOf((*FirewallNetworkRuleCollectionArrayInput)(nil)).Elem(), FirewallNetworkRuleCollectionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*FirewallNetworkRuleCollectionMapInput)(nil)).Elem(), FirewallNetworkRuleCollectionMap{}) pulumi.RegisterOutputType(FirewallNetworkRuleCollectionOutput{}) pulumi.RegisterOutputType(FirewallNetworkRuleCollectionArrayOutput{}) pulumi.RegisterOutputType(FirewallNetworkRuleCollectionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/expressRouteCircuitAuthorization.go
sdk/go/azure/network/expressRouteCircuitAuthorization.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an ExpressRoute Circuit Authorization. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("exprtTest"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleExpressRouteCircuit, err := network.NewExpressRouteCircuit(ctx, "example", &network.ExpressRouteCircuitArgs{ // Name: pulumi.String("expressRoute1"), // ResourceGroupName: example.Name, // Location: example.Location, // ServiceProviderName: pulumi.String("Equinix"), // PeeringLocation: pulumi.String("Silicon Valley"), // BandwidthInMbps: pulumi.Int(50), // Sku: &network.ExpressRouteCircuitSkuArgs{ // Tier: pulumi.String("Standard"), // Family: pulumi.String("MeteredData"), // }, // AllowClassicOperations: pulumi.Bool(false), // Tags: pulumi.StringMap{ // "environment": pulumi.String("Production"), // }, // }) // if err != nil { // return err // } // _, err = network.NewExpressRouteCircuitAuthorization(ctx, "example", &network.ExpressRouteCircuitAuthorizationArgs{ // Name: pulumi.String("exampleERCAuth"), // ExpressRouteCircuitName: exampleExpressRouteCircuit.Name, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // ExpressRoute Circuit Authorizations can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/expressRouteCircuitAuthorization:ExpressRouteCircuitAuthorization auth1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/expressRouteCircuits/myExpressRoute/authorizations/auth1 // ``` type ExpressRouteCircuitAuthorization struct { pulumi.CustomResourceState // The Authorization Key. AuthorizationKey pulumi.StringOutput `pulumi:"authorizationKey"` // The authorization use status. AuthorizationUseStatus pulumi.StringOutput `pulumi:"authorizationUseStatus"` // The name of the Express Route Circuit in which to create the Authorization. Changing this forces a new resource to be created. ExpressRouteCircuitName pulumi.StringOutput `pulumi:"expressRouteCircuitName"` // The name of the ExpressRoute circuit. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the resource group in which to create the ExpressRoute circuit. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` } // NewExpressRouteCircuitAuthorization registers a new resource with the given unique name, arguments, and options. func NewExpressRouteCircuitAuthorization(ctx *pulumi.Context, name string, args *ExpressRouteCircuitAuthorizationArgs, opts ...pulumi.ResourceOption) (*ExpressRouteCircuitAuthorization, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ExpressRouteCircuitName == nil { return nil, errors.New("invalid value for required argument 'ExpressRouteCircuitName'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } secrets := pulumi.AdditionalSecretOutputs([]string{ "authorizationKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource ExpressRouteCircuitAuthorization err := ctx.RegisterResource("azure:network/expressRouteCircuitAuthorization:ExpressRouteCircuitAuthorization", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetExpressRouteCircuitAuthorization gets an existing ExpressRouteCircuitAuthorization resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetExpressRouteCircuitAuthorization(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ExpressRouteCircuitAuthorizationState, opts ...pulumi.ResourceOption) (*ExpressRouteCircuitAuthorization, error) { var resource ExpressRouteCircuitAuthorization err := ctx.ReadResource("azure:network/expressRouteCircuitAuthorization:ExpressRouteCircuitAuthorization", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ExpressRouteCircuitAuthorization resources. type expressRouteCircuitAuthorizationState struct { // The Authorization Key. AuthorizationKey *string `pulumi:"authorizationKey"` // The authorization use status. AuthorizationUseStatus *string `pulumi:"authorizationUseStatus"` // The name of the Express Route Circuit in which to create the Authorization. Changing this forces a new resource to be created. ExpressRouteCircuitName *string `pulumi:"expressRouteCircuitName"` // The name of the ExpressRoute circuit. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the ExpressRoute circuit. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` } type ExpressRouteCircuitAuthorizationState struct { // The Authorization Key. AuthorizationKey pulumi.StringPtrInput // The authorization use status. AuthorizationUseStatus pulumi.StringPtrInput // The name of the Express Route Circuit in which to create the Authorization. Changing this forces a new resource to be created. ExpressRouteCircuitName pulumi.StringPtrInput // The name of the ExpressRoute circuit. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the ExpressRoute circuit. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput } func (ExpressRouteCircuitAuthorizationState) ElementType() reflect.Type { return reflect.TypeOf((*expressRouteCircuitAuthorizationState)(nil)).Elem() } type expressRouteCircuitAuthorizationArgs struct { // The name of the Express Route Circuit in which to create the Authorization. Changing this forces a new resource to be created. ExpressRouteCircuitName string `pulumi:"expressRouteCircuitName"` // The name of the ExpressRoute circuit. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the ExpressRoute circuit. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` } // The set of arguments for constructing a ExpressRouteCircuitAuthorization resource. type ExpressRouteCircuitAuthorizationArgs struct { // The name of the Express Route Circuit in which to create the Authorization. Changing this forces a new resource to be created. ExpressRouteCircuitName pulumi.StringInput // The name of the ExpressRoute circuit. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the ExpressRoute circuit. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput } func (ExpressRouteCircuitAuthorizationArgs) ElementType() reflect.Type { return reflect.TypeOf((*expressRouteCircuitAuthorizationArgs)(nil)).Elem() } type ExpressRouteCircuitAuthorizationInput interface { pulumi.Input ToExpressRouteCircuitAuthorizationOutput() ExpressRouteCircuitAuthorizationOutput ToExpressRouteCircuitAuthorizationOutputWithContext(ctx context.Context) ExpressRouteCircuitAuthorizationOutput } func (*ExpressRouteCircuitAuthorization) ElementType() reflect.Type { return reflect.TypeOf((**ExpressRouteCircuitAuthorization)(nil)).Elem() } func (i *ExpressRouteCircuitAuthorization) ToExpressRouteCircuitAuthorizationOutput() ExpressRouteCircuitAuthorizationOutput { return i.ToExpressRouteCircuitAuthorizationOutputWithContext(context.Background()) } func (i *ExpressRouteCircuitAuthorization) ToExpressRouteCircuitAuthorizationOutputWithContext(ctx context.Context) ExpressRouteCircuitAuthorizationOutput { return pulumi.ToOutputWithContext(ctx, i).(ExpressRouteCircuitAuthorizationOutput) } // ExpressRouteCircuitAuthorizationArrayInput is an input type that accepts ExpressRouteCircuitAuthorizationArray and ExpressRouteCircuitAuthorizationArrayOutput values. // You can construct a concrete instance of `ExpressRouteCircuitAuthorizationArrayInput` via: // // ExpressRouteCircuitAuthorizationArray{ ExpressRouteCircuitAuthorizationArgs{...} } type ExpressRouteCircuitAuthorizationArrayInput interface { pulumi.Input ToExpressRouteCircuitAuthorizationArrayOutput() ExpressRouteCircuitAuthorizationArrayOutput ToExpressRouteCircuitAuthorizationArrayOutputWithContext(context.Context) ExpressRouteCircuitAuthorizationArrayOutput } type ExpressRouteCircuitAuthorizationArray []ExpressRouteCircuitAuthorizationInput func (ExpressRouteCircuitAuthorizationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ExpressRouteCircuitAuthorization)(nil)).Elem() } func (i ExpressRouteCircuitAuthorizationArray) ToExpressRouteCircuitAuthorizationArrayOutput() ExpressRouteCircuitAuthorizationArrayOutput { return i.ToExpressRouteCircuitAuthorizationArrayOutputWithContext(context.Background()) } func (i ExpressRouteCircuitAuthorizationArray) ToExpressRouteCircuitAuthorizationArrayOutputWithContext(ctx context.Context) ExpressRouteCircuitAuthorizationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ExpressRouteCircuitAuthorizationArrayOutput) } // ExpressRouteCircuitAuthorizationMapInput is an input type that accepts ExpressRouteCircuitAuthorizationMap and ExpressRouteCircuitAuthorizationMapOutput values. // You can construct a concrete instance of `ExpressRouteCircuitAuthorizationMapInput` via: // // ExpressRouteCircuitAuthorizationMap{ "key": ExpressRouteCircuitAuthorizationArgs{...} } type ExpressRouteCircuitAuthorizationMapInput interface { pulumi.Input ToExpressRouteCircuitAuthorizationMapOutput() ExpressRouteCircuitAuthorizationMapOutput ToExpressRouteCircuitAuthorizationMapOutputWithContext(context.Context) ExpressRouteCircuitAuthorizationMapOutput } type ExpressRouteCircuitAuthorizationMap map[string]ExpressRouteCircuitAuthorizationInput func (ExpressRouteCircuitAuthorizationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ExpressRouteCircuitAuthorization)(nil)).Elem() } func (i ExpressRouteCircuitAuthorizationMap) ToExpressRouteCircuitAuthorizationMapOutput() ExpressRouteCircuitAuthorizationMapOutput { return i.ToExpressRouteCircuitAuthorizationMapOutputWithContext(context.Background()) } func (i ExpressRouteCircuitAuthorizationMap) ToExpressRouteCircuitAuthorizationMapOutputWithContext(ctx context.Context) ExpressRouteCircuitAuthorizationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ExpressRouteCircuitAuthorizationMapOutput) } type ExpressRouteCircuitAuthorizationOutput struct{ *pulumi.OutputState } func (ExpressRouteCircuitAuthorizationOutput) ElementType() reflect.Type { return reflect.TypeOf((**ExpressRouteCircuitAuthorization)(nil)).Elem() } func (o ExpressRouteCircuitAuthorizationOutput) ToExpressRouteCircuitAuthorizationOutput() ExpressRouteCircuitAuthorizationOutput { return o } func (o ExpressRouteCircuitAuthorizationOutput) ToExpressRouteCircuitAuthorizationOutputWithContext(ctx context.Context) ExpressRouteCircuitAuthorizationOutput { return o } // The Authorization Key. func (o ExpressRouteCircuitAuthorizationOutput) AuthorizationKey() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteCircuitAuthorization) pulumi.StringOutput { return v.AuthorizationKey }).(pulumi.StringOutput) } // The authorization use status. func (o ExpressRouteCircuitAuthorizationOutput) AuthorizationUseStatus() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteCircuitAuthorization) pulumi.StringOutput { return v.AuthorizationUseStatus }).(pulumi.StringOutput) } // The name of the Express Route Circuit in which to create the Authorization. Changing this forces a new resource to be created. func (o ExpressRouteCircuitAuthorizationOutput) ExpressRouteCircuitName() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteCircuitAuthorization) pulumi.StringOutput { return v.ExpressRouteCircuitName }).(pulumi.StringOutput) } // The name of the ExpressRoute circuit. Changing this forces a new resource to be created. func (o ExpressRouteCircuitAuthorizationOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteCircuitAuthorization) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group in which to create the ExpressRoute circuit. Changing this forces a new resource to be created. func (o ExpressRouteCircuitAuthorizationOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteCircuitAuthorization) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } type ExpressRouteCircuitAuthorizationArrayOutput struct{ *pulumi.OutputState } func (ExpressRouteCircuitAuthorizationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ExpressRouteCircuitAuthorization)(nil)).Elem() } func (o ExpressRouteCircuitAuthorizationArrayOutput) ToExpressRouteCircuitAuthorizationArrayOutput() ExpressRouteCircuitAuthorizationArrayOutput { return o } func (o ExpressRouteCircuitAuthorizationArrayOutput) ToExpressRouteCircuitAuthorizationArrayOutputWithContext(ctx context.Context) ExpressRouteCircuitAuthorizationArrayOutput { return o } func (o ExpressRouteCircuitAuthorizationArrayOutput) Index(i pulumi.IntInput) ExpressRouteCircuitAuthorizationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ExpressRouteCircuitAuthorization { return vs[0].([]*ExpressRouteCircuitAuthorization)[vs[1].(int)] }).(ExpressRouteCircuitAuthorizationOutput) } type ExpressRouteCircuitAuthorizationMapOutput struct{ *pulumi.OutputState } func (ExpressRouteCircuitAuthorizationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ExpressRouteCircuitAuthorization)(nil)).Elem() } func (o ExpressRouteCircuitAuthorizationMapOutput) ToExpressRouteCircuitAuthorizationMapOutput() ExpressRouteCircuitAuthorizationMapOutput { return o } func (o ExpressRouteCircuitAuthorizationMapOutput) ToExpressRouteCircuitAuthorizationMapOutputWithContext(ctx context.Context) ExpressRouteCircuitAuthorizationMapOutput { return o } func (o ExpressRouteCircuitAuthorizationMapOutput) MapIndex(k pulumi.StringInput) ExpressRouteCircuitAuthorizationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ExpressRouteCircuitAuthorization { return vs[0].(map[string]*ExpressRouteCircuitAuthorization)[vs[1].(string)] }).(ExpressRouteCircuitAuthorizationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ExpressRouteCircuitAuthorizationInput)(nil)).Elem(), &ExpressRouteCircuitAuthorization{}) pulumi.RegisterInputType(reflect.TypeOf((*ExpressRouteCircuitAuthorizationArrayInput)(nil)).Elem(), ExpressRouteCircuitAuthorizationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ExpressRouteCircuitAuthorizationMapInput)(nil)).Elem(), ExpressRouteCircuitAuthorizationMap{}) pulumi.RegisterOutputType(ExpressRouteCircuitAuthorizationOutput{}) pulumi.RegisterOutputType(ExpressRouteCircuitAuthorizationArrayOutput{}) pulumi.RegisterOutputType(ExpressRouteCircuitAuthorizationMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/expressRouteCircuitPeering.go
sdk/go/azure/network/expressRouteCircuitPeering.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an ExpressRoute Circuit Peering. // // ## Example Usage // // ### Creating A Microsoft Peering) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("exprtTest"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleExpressRouteCircuit, err := network.NewExpressRouteCircuit(ctx, "example", &network.ExpressRouteCircuitArgs{ // Name: pulumi.String("expressRoute1"), // ResourceGroupName: example.Name, // Location: example.Location, // ServiceProviderName: pulumi.String("Equinix"), // PeeringLocation: pulumi.String("Silicon Valley"), // BandwidthInMbps: pulumi.Int(50), // Sku: &network.ExpressRouteCircuitSkuArgs{ // Tier: pulumi.String("Standard"), // Family: pulumi.String("MeteredData"), // }, // AllowClassicOperations: pulumi.Bool(false), // Tags: pulumi.StringMap{ // "environment": pulumi.String("Production"), // }, // }) // if err != nil { // return err // } // _, err = network.NewExpressRouteCircuitPeering(ctx, "example", &network.ExpressRouteCircuitPeeringArgs{ // PeeringType: pulumi.String("MicrosoftPeering"), // ExpressRouteCircuitName: exampleExpressRouteCircuit.Name, // ResourceGroupName: example.Name, // PeerAsn: pulumi.Int(100), // PrimaryPeerAddressPrefix: pulumi.String("123.0.0.0/30"), // SecondaryPeerAddressPrefix: pulumi.String("123.0.0.4/30"), // Ipv4Enabled: pulumi.Bool(true), // VlanId: pulumi.Int(300), // MicrosoftPeeringConfig: &network.ExpressRouteCircuitPeeringMicrosoftPeeringConfigArgs{ // AdvertisedPublicPrefixes: pulumi.StringArray{ // pulumi.String("123.1.0.0/24"), // }, // }, // Ipv6: &network.ExpressRouteCircuitPeeringIpv6Args{ // PrimaryPeerAddressPrefix: pulumi.String("2002:db01::/126"), // SecondaryPeerAddressPrefix: pulumi.String("2003:db01::/126"), // Enabled: pulumi.Bool(true), // MicrosoftPeering: &network.ExpressRouteCircuitPeeringIpv6MicrosoftPeeringArgs{ // AdvertisedPublicPrefixes: pulumi.StringArray{ // pulumi.String("2002:db01::/126"), // }, // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Creating Azure Private Peering) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("exprtTest"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleExpressRouteCircuit, err := network.NewExpressRouteCircuit(ctx, "example", &network.ExpressRouteCircuitArgs{ // Name: pulumi.String("expressRoute1"), // ResourceGroupName: example.Name, // Location: example.Location, // ServiceProviderName: pulumi.String("Equinix"), // PeeringLocation: pulumi.String("Silicon Valley"), // BandwidthInMbps: pulumi.Int(50), // Sku: &network.ExpressRouteCircuitSkuArgs{ // Tier: pulumi.String("Standard"), // Family: pulumi.String("MeteredData"), // }, // AllowClassicOperations: pulumi.Bool(false), // Tags: pulumi.StringMap{ // "environment": pulumi.String("Production"), // }, // }) // if err != nil { // return err // } // _, err = network.NewExpressRouteCircuitPeering(ctx, "example", &network.ExpressRouteCircuitPeeringArgs{ // PeeringType: pulumi.String("AzurePrivatePeering"), // ExpressRouteCircuitName: exampleExpressRouteCircuit.Name, // ResourceGroupName: example.Name, // PeerAsn: pulumi.Int(100), // PrimaryPeerAddressPrefix: pulumi.String("123.0.0.0/30"), // SecondaryPeerAddressPrefix: pulumi.String("123.0.0.4/30"), // Ipv4Enabled: pulumi.Bool(true), // VlanId: pulumi.Int(300), // Ipv6: &network.ExpressRouteCircuitPeeringIpv6Args{ // PrimaryPeerAddressPrefix: pulumi.String("2002:db01::/126"), // SecondaryPeerAddressPrefix: pulumi.String("2003:db01::/126"), // Enabled: pulumi.Bool(true), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // ExpressRoute Circuit Peerings can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/expressRouteCircuitPeering:ExpressRouteCircuitPeering peering1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/expressRouteCircuits/myExpressRoute/peerings/peering1 // ``` type ExpressRouteCircuitPeering struct { pulumi.CustomResourceState // The ASN used by Azure. AzureAsn pulumi.IntOutput `pulumi:"azureAsn"` // The name of the ExpressRoute Circuit in which to create the Peering. Changing this forces a new resource to be created. ExpressRouteCircuitName pulumi.StringOutput `pulumi:"expressRouteCircuitName"` GatewayManagerEtag pulumi.StringOutput `pulumi:"gatewayManagerEtag"` // A boolean value indicating whether the IPv4 peering is enabled. Defaults to `true`. Ipv4Enabled pulumi.BoolPtrOutput `pulumi:"ipv4Enabled"` // A `ipv6` block as defined below. Ipv6 ExpressRouteCircuitPeeringIpv6PtrOutput `pulumi:"ipv6"` // A `microsoftPeeringConfig` block as defined below. Required when `peeringType` is set to `MicrosoftPeering` and config for IPv4. MicrosoftPeeringConfig ExpressRouteCircuitPeeringMicrosoftPeeringConfigPtrOutput `pulumi:"microsoftPeeringConfig"` // The Either a 16-bit or a 32-bit ASN. Can either be public or private. PeerAsn pulumi.IntOutput `pulumi:"peerAsn"` // The type of the ExpressRoute Circuit Peering. Acceptable values include `AzurePrivatePeering`, `AzurePublicPeering` and `MicrosoftPeering`. // // > **Note:** only one Peering of each Type can be created. Attempting to create multiple peerings of the same type will overwrite the original peering. PeeringType pulumi.StringOutput `pulumi:"peeringType"` // The Primary Port used by Azure for this Peering. PrimaryAzurePort pulumi.StringOutput `pulumi:"primaryAzurePort"` // A subnet for the primary link. PrimaryPeerAddressPrefix pulumi.StringPtrOutput `pulumi:"primaryPeerAddressPrefix"` // The name of the resource group in which to create the Express Route Circuit Peering. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The ID of the Route Filter. Only available when `peeringType` is set to `MicrosoftPeering`. // // > **Note:** `ipv6` can be specified when `peeringType` is `MicrosoftPeering` or `AzurePrivatePeering` RouteFilterId pulumi.StringPtrOutput `pulumi:"routeFilterId"` // The Secondary Port used by Azure for this Peering. SecondaryAzurePort pulumi.StringOutput `pulumi:"secondaryAzurePort"` // A subnet for the secondary link. SecondaryPeerAddressPrefix pulumi.StringPtrOutput `pulumi:"secondaryPeerAddressPrefix"` // The shared key. Can be a maximum of 25 characters. SharedKey pulumi.StringPtrOutput `pulumi:"sharedKey"` // A valid VLAN ID to establish this peering on. VlanId pulumi.IntOutput `pulumi:"vlanId"` } // NewExpressRouteCircuitPeering registers a new resource with the given unique name, arguments, and options. func NewExpressRouteCircuitPeering(ctx *pulumi.Context, name string, args *ExpressRouteCircuitPeeringArgs, opts ...pulumi.ResourceOption) (*ExpressRouteCircuitPeering, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ExpressRouteCircuitName == nil { return nil, errors.New("invalid value for required argument 'ExpressRouteCircuitName'") } if args.PeeringType == nil { return nil, errors.New("invalid value for required argument 'PeeringType'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.VlanId == nil { return nil, errors.New("invalid value for required argument 'VlanId'") } if args.SharedKey != nil { args.SharedKey = pulumi.ToSecret(args.SharedKey).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "sharedKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource ExpressRouteCircuitPeering err := ctx.RegisterResource("azure:network/expressRouteCircuitPeering:ExpressRouteCircuitPeering", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetExpressRouteCircuitPeering gets an existing ExpressRouteCircuitPeering resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetExpressRouteCircuitPeering(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ExpressRouteCircuitPeeringState, opts ...pulumi.ResourceOption) (*ExpressRouteCircuitPeering, error) { var resource ExpressRouteCircuitPeering err := ctx.ReadResource("azure:network/expressRouteCircuitPeering:ExpressRouteCircuitPeering", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ExpressRouteCircuitPeering resources. type expressRouteCircuitPeeringState struct { // The ASN used by Azure. AzureAsn *int `pulumi:"azureAsn"` // The name of the ExpressRoute Circuit in which to create the Peering. Changing this forces a new resource to be created. ExpressRouteCircuitName *string `pulumi:"expressRouteCircuitName"` GatewayManagerEtag *string `pulumi:"gatewayManagerEtag"` // A boolean value indicating whether the IPv4 peering is enabled. Defaults to `true`. Ipv4Enabled *bool `pulumi:"ipv4Enabled"` // A `ipv6` block as defined below. Ipv6 *ExpressRouteCircuitPeeringIpv6 `pulumi:"ipv6"` // A `microsoftPeeringConfig` block as defined below. Required when `peeringType` is set to `MicrosoftPeering` and config for IPv4. MicrosoftPeeringConfig *ExpressRouteCircuitPeeringMicrosoftPeeringConfig `pulumi:"microsoftPeeringConfig"` // The Either a 16-bit or a 32-bit ASN. Can either be public or private. PeerAsn *int `pulumi:"peerAsn"` // The type of the ExpressRoute Circuit Peering. Acceptable values include `AzurePrivatePeering`, `AzurePublicPeering` and `MicrosoftPeering`. // // > **Note:** only one Peering of each Type can be created. Attempting to create multiple peerings of the same type will overwrite the original peering. PeeringType *string `pulumi:"peeringType"` // The Primary Port used by Azure for this Peering. PrimaryAzurePort *string `pulumi:"primaryAzurePort"` // A subnet for the primary link. PrimaryPeerAddressPrefix *string `pulumi:"primaryPeerAddressPrefix"` // The name of the resource group in which to create the Express Route Circuit Peering. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The ID of the Route Filter. Only available when `peeringType` is set to `MicrosoftPeering`. // // > **Note:** `ipv6` can be specified when `peeringType` is `MicrosoftPeering` or `AzurePrivatePeering` RouteFilterId *string `pulumi:"routeFilterId"` // The Secondary Port used by Azure for this Peering. SecondaryAzurePort *string `pulumi:"secondaryAzurePort"` // A subnet for the secondary link. SecondaryPeerAddressPrefix *string `pulumi:"secondaryPeerAddressPrefix"` // The shared key. Can be a maximum of 25 characters. SharedKey *string `pulumi:"sharedKey"` // A valid VLAN ID to establish this peering on. VlanId *int `pulumi:"vlanId"` } type ExpressRouteCircuitPeeringState struct { // The ASN used by Azure. AzureAsn pulumi.IntPtrInput // The name of the ExpressRoute Circuit in which to create the Peering. Changing this forces a new resource to be created. ExpressRouteCircuitName pulumi.StringPtrInput GatewayManagerEtag pulumi.StringPtrInput // A boolean value indicating whether the IPv4 peering is enabled. Defaults to `true`. Ipv4Enabled pulumi.BoolPtrInput // A `ipv6` block as defined below. Ipv6 ExpressRouteCircuitPeeringIpv6PtrInput // A `microsoftPeeringConfig` block as defined below. Required when `peeringType` is set to `MicrosoftPeering` and config for IPv4. MicrosoftPeeringConfig ExpressRouteCircuitPeeringMicrosoftPeeringConfigPtrInput // The Either a 16-bit or a 32-bit ASN. Can either be public or private. PeerAsn pulumi.IntPtrInput // The type of the ExpressRoute Circuit Peering. Acceptable values include `AzurePrivatePeering`, `AzurePublicPeering` and `MicrosoftPeering`. // // > **Note:** only one Peering of each Type can be created. Attempting to create multiple peerings of the same type will overwrite the original peering. PeeringType pulumi.StringPtrInput // The Primary Port used by Azure for this Peering. PrimaryAzurePort pulumi.StringPtrInput // A subnet for the primary link. PrimaryPeerAddressPrefix pulumi.StringPtrInput // The name of the resource group in which to create the Express Route Circuit Peering. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The ID of the Route Filter. Only available when `peeringType` is set to `MicrosoftPeering`. // // > **Note:** `ipv6` can be specified when `peeringType` is `MicrosoftPeering` or `AzurePrivatePeering` RouteFilterId pulumi.StringPtrInput // The Secondary Port used by Azure for this Peering. SecondaryAzurePort pulumi.StringPtrInput // A subnet for the secondary link. SecondaryPeerAddressPrefix pulumi.StringPtrInput // The shared key. Can be a maximum of 25 characters. SharedKey pulumi.StringPtrInput // A valid VLAN ID to establish this peering on. VlanId pulumi.IntPtrInput } func (ExpressRouteCircuitPeeringState) ElementType() reflect.Type { return reflect.TypeOf((*expressRouteCircuitPeeringState)(nil)).Elem() } type expressRouteCircuitPeeringArgs struct { // The name of the ExpressRoute Circuit in which to create the Peering. Changing this forces a new resource to be created. ExpressRouteCircuitName string `pulumi:"expressRouteCircuitName"` // A boolean value indicating whether the IPv4 peering is enabled. Defaults to `true`. Ipv4Enabled *bool `pulumi:"ipv4Enabled"` // A `ipv6` block as defined below. Ipv6 *ExpressRouteCircuitPeeringIpv6 `pulumi:"ipv6"` // A `microsoftPeeringConfig` block as defined below. Required when `peeringType` is set to `MicrosoftPeering` and config for IPv4. MicrosoftPeeringConfig *ExpressRouteCircuitPeeringMicrosoftPeeringConfig `pulumi:"microsoftPeeringConfig"` // The Either a 16-bit or a 32-bit ASN. Can either be public or private. PeerAsn *int `pulumi:"peerAsn"` // The type of the ExpressRoute Circuit Peering. Acceptable values include `AzurePrivatePeering`, `AzurePublicPeering` and `MicrosoftPeering`. // // > **Note:** only one Peering of each Type can be created. Attempting to create multiple peerings of the same type will overwrite the original peering. PeeringType string `pulumi:"peeringType"` // A subnet for the primary link. PrimaryPeerAddressPrefix *string `pulumi:"primaryPeerAddressPrefix"` // The name of the resource group in which to create the Express Route Circuit Peering. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The ID of the Route Filter. Only available when `peeringType` is set to `MicrosoftPeering`. // // > **Note:** `ipv6` can be specified when `peeringType` is `MicrosoftPeering` or `AzurePrivatePeering` RouteFilterId *string `pulumi:"routeFilterId"` // A subnet for the secondary link. SecondaryPeerAddressPrefix *string `pulumi:"secondaryPeerAddressPrefix"` // The shared key. Can be a maximum of 25 characters. SharedKey *string `pulumi:"sharedKey"` // A valid VLAN ID to establish this peering on. VlanId int `pulumi:"vlanId"` } // The set of arguments for constructing a ExpressRouteCircuitPeering resource. type ExpressRouteCircuitPeeringArgs struct { // The name of the ExpressRoute Circuit in which to create the Peering. Changing this forces a new resource to be created. ExpressRouteCircuitName pulumi.StringInput // A boolean value indicating whether the IPv4 peering is enabled. Defaults to `true`. Ipv4Enabled pulumi.BoolPtrInput // A `ipv6` block as defined below. Ipv6 ExpressRouteCircuitPeeringIpv6PtrInput // A `microsoftPeeringConfig` block as defined below. Required when `peeringType` is set to `MicrosoftPeering` and config for IPv4. MicrosoftPeeringConfig ExpressRouteCircuitPeeringMicrosoftPeeringConfigPtrInput // The Either a 16-bit or a 32-bit ASN. Can either be public or private. PeerAsn pulumi.IntPtrInput // The type of the ExpressRoute Circuit Peering. Acceptable values include `AzurePrivatePeering`, `AzurePublicPeering` and `MicrosoftPeering`. // // > **Note:** only one Peering of each Type can be created. Attempting to create multiple peerings of the same type will overwrite the original peering. PeeringType pulumi.StringInput // A subnet for the primary link. PrimaryPeerAddressPrefix pulumi.StringPtrInput // The name of the resource group in which to create the Express Route Circuit Peering. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The ID of the Route Filter. Only available when `peeringType` is set to `MicrosoftPeering`. // // > **Note:** `ipv6` can be specified when `peeringType` is `MicrosoftPeering` or `AzurePrivatePeering` RouteFilterId pulumi.StringPtrInput // A subnet for the secondary link. SecondaryPeerAddressPrefix pulumi.StringPtrInput // The shared key. Can be a maximum of 25 characters. SharedKey pulumi.StringPtrInput // A valid VLAN ID to establish this peering on. VlanId pulumi.IntInput } func (ExpressRouteCircuitPeeringArgs) ElementType() reflect.Type { return reflect.TypeOf((*expressRouteCircuitPeeringArgs)(nil)).Elem() } type ExpressRouteCircuitPeeringInput interface { pulumi.Input ToExpressRouteCircuitPeeringOutput() ExpressRouteCircuitPeeringOutput ToExpressRouteCircuitPeeringOutputWithContext(ctx context.Context) ExpressRouteCircuitPeeringOutput } func (*ExpressRouteCircuitPeering) ElementType() reflect.Type { return reflect.TypeOf((**ExpressRouteCircuitPeering)(nil)).Elem() } func (i *ExpressRouteCircuitPeering) ToExpressRouteCircuitPeeringOutput() ExpressRouteCircuitPeeringOutput { return i.ToExpressRouteCircuitPeeringOutputWithContext(context.Background()) } func (i *ExpressRouteCircuitPeering) ToExpressRouteCircuitPeeringOutputWithContext(ctx context.Context) ExpressRouteCircuitPeeringOutput { return pulumi.ToOutputWithContext(ctx, i).(ExpressRouteCircuitPeeringOutput) } // ExpressRouteCircuitPeeringArrayInput is an input type that accepts ExpressRouteCircuitPeeringArray and ExpressRouteCircuitPeeringArrayOutput values. // You can construct a concrete instance of `ExpressRouteCircuitPeeringArrayInput` via: // // ExpressRouteCircuitPeeringArray{ ExpressRouteCircuitPeeringArgs{...} } type ExpressRouteCircuitPeeringArrayInput interface { pulumi.Input ToExpressRouteCircuitPeeringArrayOutput() ExpressRouteCircuitPeeringArrayOutput ToExpressRouteCircuitPeeringArrayOutputWithContext(context.Context) ExpressRouteCircuitPeeringArrayOutput } type ExpressRouteCircuitPeeringArray []ExpressRouteCircuitPeeringInput func (ExpressRouteCircuitPeeringArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ExpressRouteCircuitPeering)(nil)).Elem() } func (i ExpressRouteCircuitPeeringArray) ToExpressRouteCircuitPeeringArrayOutput() ExpressRouteCircuitPeeringArrayOutput { return i.ToExpressRouteCircuitPeeringArrayOutputWithContext(context.Background()) } func (i ExpressRouteCircuitPeeringArray) ToExpressRouteCircuitPeeringArrayOutputWithContext(ctx context.Context) ExpressRouteCircuitPeeringArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ExpressRouteCircuitPeeringArrayOutput) } // ExpressRouteCircuitPeeringMapInput is an input type that accepts ExpressRouteCircuitPeeringMap and ExpressRouteCircuitPeeringMapOutput values. // You can construct a concrete instance of `ExpressRouteCircuitPeeringMapInput` via: // // ExpressRouteCircuitPeeringMap{ "key": ExpressRouteCircuitPeeringArgs{...} } type ExpressRouteCircuitPeeringMapInput interface { pulumi.Input ToExpressRouteCircuitPeeringMapOutput() ExpressRouteCircuitPeeringMapOutput ToExpressRouteCircuitPeeringMapOutputWithContext(context.Context) ExpressRouteCircuitPeeringMapOutput } type ExpressRouteCircuitPeeringMap map[string]ExpressRouteCircuitPeeringInput func (ExpressRouteCircuitPeeringMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ExpressRouteCircuitPeering)(nil)).Elem() } func (i ExpressRouteCircuitPeeringMap) ToExpressRouteCircuitPeeringMapOutput() ExpressRouteCircuitPeeringMapOutput { return i.ToExpressRouteCircuitPeeringMapOutputWithContext(context.Background()) } func (i ExpressRouteCircuitPeeringMap) ToExpressRouteCircuitPeeringMapOutputWithContext(ctx context.Context) ExpressRouteCircuitPeeringMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ExpressRouteCircuitPeeringMapOutput) } type ExpressRouteCircuitPeeringOutput struct{ *pulumi.OutputState } func (ExpressRouteCircuitPeeringOutput) ElementType() reflect.Type { return reflect.TypeOf((**ExpressRouteCircuitPeering)(nil)).Elem() } func (o ExpressRouteCircuitPeeringOutput) ToExpressRouteCircuitPeeringOutput() ExpressRouteCircuitPeeringOutput { return o } func (o ExpressRouteCircuitPeeringOutput) ToExpressRouteCircuitPeeringOutputWithContext(ctx context.Context) ExpressRouteCircuitPeeringOutput { return o } // The ASN used by Azure. func (o ExpressRouteCircuitPeeringOutput) AzureAsn() pulumi.IntOutput { return o.ApplyT(func(v *ExpressRouteCircuitPeering) pulumi.IntOutput { return v.AzureAsn }).(pulumi.IntOutput) } // The name of the ExpressRoute Circuit in which to create the Peering. Changing this forces a new resource to be created. func (o ExpressRouteCircuitPeeringOutput) ExpressRouteCircuitName() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteCircuitPeering) pulumi.StringOutput { return v.ExpressRouteCircuitName }).(pulumi.StringOutput) } func (o ExpressRouteCircuitPeeringOutput) GatewayManagerEtag() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteCircuitPeering) pulumi.StringOutput { return v.GatewayManagerEtag }).(pulumi.StringOutput) } // A boolean value indicating whether the IPv4 peering is enabled. Defaults to `true`. func (o ExpressRouteCircuitPeeringOutput) Ipv4Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ExpressRouteCircuitPeering) pulumi.BoolPtrOutput { return v.Ipv4Enabled }).(pulumi.BoolPtrOutput) } // A `ipv6` block as defined below. func (o ExpressRouteCircuitPeeringOutput) Ipv6() ExpressRouteCircuitPeeringIpv6PtrOutput { return o.ApplyT(func(v *ExpressRouteCircuitPeering) ExpressRouteCircuitPeeringIpv6PtrOutput { return v.Ipv6 }).(ExpressRouteCircuitPeeringIpv6PtrOutput) } // A `microsoftPeeringConfig` block as defined below. Required when `peeringType` is set to `MicrosoftPeering` and config for IPv4. func (o ExpressRouteCircuitPeeringOutput) MicrosoftPeeringConfig() ExpressRouteCircuitPeeringMicrosoftPeeringConfigPtrOutput { return o.ApplyT(func(v *ExpressRouteCircuitPeering) ExpressRouteCircuitPeeringMicrosoftPeeringConfigPtrOutput { return v.MicrosoftPeeringConfig }).(ExpressRouteCircuitPeeringMicrosoftPeeringConfigPtrOutput) } // The Either a 16-bit or a 32-bit ASN. Can either be public or private. func (o ExpressRouteCircuitPeeringOutput) PeerAsn() pulumi.IntOutput { return o.ApplyT(func(v *ExpressRouteCircuitPeering) pulumi.IntOutput { return v.PeerAsn }).(pulumi.IntOutput) } // The type of the ExpressRoute Circuit Peering. Acceptable values include `AzurePrivatePeering`, `AzurePublicPeering` and `MicrosoftPeering`. // // > **Note:** only one Peering of each Type can be created. Attempting to create multiple peerings of the same type will overwrite the original peering. func (o ExpressRouteCircuitPeeringOutput) PeeringType() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteCircuitPeering) pulumi.StringOutput { return v.PeeringType }).(pulumi.StringOutput) } // The Primary Port used by Azure for this Peering. func (o ExpressRouteCircuitPeeringOutput) PrimaryAzurePort() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteCircuitPeering) pulumi.StringOutput { return v.PrimaryAzurePort }).(pulumi.StringOutput) } // A subnet for the primary link. func (o ExpressRouteCircuitPeeringOutput) PrimaryPeerAddressPrefix() pulumi.StringPtrOutput { return o.ApplyT(func(v *ExpressRouteCircuitPeering) pulumi.StringPtrOutput { return v.PrimaryPeerAddressPrefix }).(pulumi.StringPtrOutput) } // The name of the resource group in which to create the Express Route Circuit Peering. Changing this forces a new resource to be created. func (o ExpressRouteCircuitPeeringOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteCircuitPeering) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The ID of the Route Filter. Only available when `peeringType` is set to `MicrosoftPeering`. // // > **Note:** `ipv6` can be specified when `peeringType` is `MicrosoftPeering` or `AzurePrivatePeering` func (o ExpressRouteCircuitPeeringOutput) RouteFilterId() pulumi.StringPtrOutput { return o.ApplyT(func(v *ExpressRouteCircuitPeering) pulumi.StringPtrOutput { return v.RouteFilterId }).(pulumi.StringPtrOutput) } // The Secondary Port used by Azure for this Peering. func (o ExpressRouteCircuitPeeringOutput) SecondaryAzurePort() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteCircuitPeering) pulumi.StringOutput { return v.SecondaryAzurePort }).(pulumi.StringOutput) } // A subnet for the secondary link. func (o ExpressRouteCircuitPeeringOutput) SecondaryPeerAddressPrefix() pulumi.StringPtrOutput { return o.ApplyT(func(v *ExpressRouteCircuitPeering) pulumi.StringPtrOutput { return v.SecondaryPeerAddressPrefix }).(pulumi.StringPtrOutput) } // The shared key. Can be a maximum of 25 characters. func (o ExpressRouteCircuitPeeringOutput) SharedKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *ExpressRouteCircuitPeering) pulumi.StringPtrOutput { return v.SharedKey }).(pulumi.StringPtrOutput) } // A valid VLAN ID to establish this peering on. func (o ExpressRouteCircuitPeeringOutput) VlanId() pulumi.IntOutput { return o.ApplyT(func(v *ExpressRouteCircuitPeering) pulumi.IntOutput { return v.VlanId }).(pulumi.IntOutput) } type ExpressRouteCircuitPeeringArrayOutput struct{ *pulumi.OutputState } func (ExpressRouteCircuitPeeringArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ExpressRouteCircuitPeering)(nil)).Elem() } func (o ExpressRouteCircuitPeeringArrayOutput) ToExpressRouteCircuitPeeringArrayOutput() ExpressRouteCircuitPeeringArrayOutput { return o } func (o ExpressRouteCircuitPeeringArrayOutput) ToExpressRouteCircuitPeeringArrayOutputWithContext(ctx context.Context) ExpressRouteCircuitPeeringArrayOutput { return o } func (o ExpressRouteCircuitPeeringArrayOutput) Index(i pulumi.IntInput) ExpressRouteCircuitPeeringOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ExpressRouteCircuitPeering { return vs[0].([]*ExpressRouteCircuitPeering)[vs[1].(int)] }).(ExpressRouteCircuitPeeringOutput) } type ExpressRouteCircuitPeeringMapOutput struct{ *pulumi.OutputState } func (ExpressRouteCircuitPeeringMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ExpressRouteCircuitPeering)(nil)).Elem() } func (o ExpressRouteCircuitPeeringMapOutput) ToExpressRouteCircuitPeeringMapOutput() ExpressRouteCircuitPeeringMapOutput { return o } func (o ExpressRouteCircuitPeeringMapOutput) ToExpressRouteCircuitPeeringMapOutputWithContext(ctx context.Context) ExpressRouteCircuitPeeringMapOutput { return o } func (o ExpressRouteCircuitPeeringMapOutput) MapIndex(k pulumi.StringInput) ExpressRouteCircuitPeeringOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ExpressRouteCircuitPeering { return vs[0].(map[string]*ExpressRouteCircuitPeering)[vs[1].(string)] }).(ExpressRouteCircuitPeeringOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ExpressRouteCircuitPeeringInput)(nil)).Elem(), &ExpressRouteCircuitPeering{}) pulumi.RegisterInputType(reflect.TypeOf((*ExpressRouteCircuitPeeringArrayInput)(nil)).Elem(), ExpressRouteCircuitPeeringArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ExpressRouteCircuitPeeringMapInput)(nil)).Elem(), ExpressRouteCircuitPeeringMap{}) pulumi.RegisterOutputType(ExpressRouteCircuitPeeringOutput{}) pulumi.RegisterOutputType(ExpressRouteCircuitPeeringArrayOutput{}) pulumi.RegisterOutputType(ExpressRouteCircuitPeeringMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getServiceTags.go
sdk/go/azure/network/getServiceTags.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about Service Tags. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.GetServiceTags(ctx, &network.GetServiceTagsArgs{ // Location: "westcentralus", // Service: "AzureKeyVault", // LocationFilter: pulumi.StringRef("northeurope"), // }, nil) // if err != nil { // return err // } // ctx.Export("addressPrefixes", example.AddressPrefixes) // ctx.Export("ipv4Cidrs", example.Ipv4Cidrs) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func GetServiceTags(ctx *pulumi.Context, args *GetServiceTagsArgs, opts ...pulumi.InvokeOption) (*GetServiceTagsResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetServiceTagsResult err := ctx.Invoke("azure:network/getServiceTags:getServiceTags", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getServiceTags. type GetServiceTagsArgs struct { // The Azure Region where the Service Tags exists. This value is not used to filter the results but for specifying the region to request. For filtering by region use `locationFilter` instead. More information can be found here: [Service Tags URL parameters](https://docs.microsoft.com/rest/api/virtualnetwork/servicetags/list#uri-parameters). Location string `pulumi:"location"` // Changes the scope of the service tags. Can be any value that is also valid for `location`. If this field is empty then all address prefixes are considered instead of only location specific ones. LocationFilter *string `pulumi:"locationFilter"` // The type of the service for which address prefixes will be fetched. Available service tags can be found here: [Available service tags](https://docs.microsoft.com/azure/virtual-network/service-tags-overview#available-service-tags). Service string `pulumi:"service"` } // A collection of values returned by getServiceTags. type GetServiceTagsResult struct { // List of address prefixes for the service type (and optionally a specific region). AddressPrefixes []string `pulumi:"addressPrefixes"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // List of IPv4 addresses for the service type (and optionally a specific region) Ipv4Cidrs []string `pulumi:"ipv4Cidrs"` // List of IPv6 addresses for the service type (and optionally a specific region) Ipv6Cidrs []string `pulumi:"ipv6Cidrs"` Location string `pulumi:"location"` LocationFilter *string `pulumi:"locationFilter"` // The name of this Service Tags block. Name string `pulumi:"name"` Service string `pulumi:"service"` } func GetServiceTagsOutput(ctx *pulumi.Context, args GetServiceTagsOutputArgs, opts ...pulumi.InvokeOption) GetServiceTagsResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetServiceTagsResultOutput, error) { args := v.(GetServiceTagsArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getServiceTags:getServiceTags", args, GetServiceTagsResultOutput{}, options).(GetServiceTagsResultOutput), nil }).(GetServiceTagsResultOutput) } // A collection of arguments for invoking getServiceTags. type GetServiceTagsOutputArgs struct { // The Azure Region where the Service Tags exists. This value is not used to filter the results but for specifying the region to request. For filtering by region use `locationFilter` instead. More information can be found here: [Service Tags URL parameters](https://docs.microsoft.com/rest/api/virtualnetwork/servicetags/list#uri-parameters). Location pulumi.StringInput `pulumi:"location"` // Changes the scope of the service tags. Can be any value that is also valid for `location`. If this field is empty then all address prefixes are considered instead of only location specific ones. LocationFilter pulumi.StringPtrInput `pulumi:"locationFilter"` // The type of the service for which address prefixes will be fetched. Available service tags can be found here: [Available service tags](https://docs.microsoft.com/azure/virtual-network/service-tags-overview#available-service-tags). Service pulumi.StringInput `pulumi:"service"` } func (GetServiceTagsOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetServiceTagsArgs)(nil)).Elem() } // A collection of values returned by getServiceTags. type GetServiceTagsResultOutput struct{ *pulumi.OutputState } func (GetServiceTagsResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetServiceTagsResult)(nil)).Elem() } func (o GetServiceTagsResultOutput) ToGetServiceTagsResultOutput() GetServiceTagsResultOutput { return o } func (o GetServiceTagsResultOutput) ToGetServiceTagsResultOutputWithContext(ctx context.Context) GetServiceTagsResultOutput { return o } // List of address prefixes for the service type (and optionally a specific region). func (o GetServiceTagsResultOutput) AddressPrefixes() pulumi.StringArrayOutput { return o.ApplyT(func(v GetServiceTagsResult) []string { return v.AddressPrefixes }).(pulumi.StringArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o GetServiceTagsResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetServiceTagsResult) string { return v.Id }).(pulumi.StringOutput) } // List of IPv4 addresses for the service type (and optionally a specific region) func (o GetServiceTagsResultOutput) Ipv4Cidrs() pulumi.StringArrayOutput { return o.ApplyT(func(v GetServiceTagsResult) []string { return v.Ipv4Cidrs }).(pulumi.StringArrayOutput) } // List of IPv6 addresses for the service type (and optionally a specific region) func (o GetServiceTagsResultOutput) Ipv6Cidrs() pulumi.StringArrayOutput { return o.ApplyT(func(v GetServiceTagsResult) []string { return v.Ipv6Cidrs }).(pulumi.StringArrayOutput) } func (o GetServiceTagsResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v GetServiceTagsResult) string { return v.Location }).(pulumi.StringOutput) } func (o GetServiceTagsResultOutput) LocationFilter() pulumi.StringPtrOutput { return o.ApplyT(func(v GetServiceTagsResult) *string { return v.LocationFilter }).(pulumi.StringPtrOutput) } // The name of this Service Tags block. func (o GetServiceTagsResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetServiceTagsResult) string { return v.Name }).(pulumi.StringOutput) } func (o GetServiceTagsResultOutput) Service() pulumi.StringOutput { return o.ApplyT(func(v GetServiceTagsResult) string { return v.Service }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(GetServiceTagsResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/networkWatcherFlowLog.go
sdk/go/azure/network/networkWatcherFlowLog.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Network Watcher Flow Log. // // > **Note:** The `network.NetworkWatcherFlowLog` creates a new storage lifecyle management rule that overwrites existing rules. Please make sure to use a `storageAccount` with no existing management rules, until the issue is fixed. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // test, err := network.NewNetworkSecurityGroup(ctx, "test", &network.NetworkSecurityGroupArgs{ // Name: pulumi.String("acctestnsg"), // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // testNetworkWatcher, err := network.NewNetworkWatcher(ctx, "test", &network.NetworkWatcherArgs{ // Name: pulumi.String("acctestnw"), // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // testAccount, err := storage.NewAccount(ctx, "test", &storage.AccountArgs{ // Name: pulumi.String("acctestsa"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountKind: pulumi.String("StorageV2"), // AccountReplicationType: pulumi.String("LRS"), // HttpsTrafficOnlyEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // testAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "test", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("acctestlaw"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // _, err = network.NewNetworkWatcherFlowLog(ctx, "test", &network.NetworkWatcherFlowLogArgs{ // NetworkWatcherName: testNetworkWatcher.Name, // ResourceGroupName: example.Name, // Name: pulumi.String("example-log"), // TargetResourceId: test.ID(), // StorageAccountId: testAccount.ID(), // Enabled: pulumi.Bool(true), // RetentionPolicy: &network.NetworkWatcherFlowLogRetentionPolicyArgs{ // Enabled: pulumi.Bool(true), // Days: pulumi.Int(7), // }, // TrafficAnalytics: &network.NetworkWatcherFlowLogTrafficAnalyticsArgs{ // Enabled: pulumi.Bool(true), // WorkspaceId: testAnalyticsWorkspace.WorkspaceId, // WorkspaceRegion: testAnalyticsWorkspace.Location, // WorkspaceResourceId: testAnalyticsWorkspace.ID(), // IntervalInMinutes: pulumi.Int(10), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Network Watcher Flow Logs can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/networkWatcherFlowLog:NetworkWatcherFlowLog watcher1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/networkWatchers/watcher1/flowLogs/log1 // ``` type NetworkWatcherFlowLog struct { pulumi.CustomResourceState // Should Network Flow Logging be Enabled? Enabled pulumi.BoolOutput `pulumi:"enabled"` // The location where the Network Watcher Flow Log resides. Changing this forces a new resource to be created. Defaults to the `location` of the Network Watcher. Location pulumi.StringOutput `pulumi:"location"` // The name of the Network Watcher Flow Log. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Deprecated: The property `networkSecurityGroupId` has been superseded by `targetResourceId` and will be removed in version 5.0 of the AzureRM Provider. NetworkSecurityGroupId pulumi.StringOutput `pulumi:"networkSecurityGroupId"` // The name of the Network Watcher. Changing this forces a new resource to be created. NetworkWatcherName pulumi.StringOutput `pulumi:"networkWatcherName"` // The name of the resource group in which the Network Watcher was deployed. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A `retentionPolicy` block as documented below. RetentionPolicy NetworkWatcherFlowLogRetentionPolicyOutput `pulumi:"retentionPolicy"` // The ID of the Storage Account where flow logs are stored. StorageAccountId pulumi.StringOutput `pulumi:"storageAccountId"` // A mapping of tags which should be assigned to the Network Watcher Flow Log. Tags pulumi.StringMapOutput `pulumi:"tags"` // The ID of the Resource for which to enable flow logs for. // // > **Note:** As of July 30, 2025, it is no longer possible to create new flow logs for Network Security Groups. TargetResourceId pulumi.StringOutput `pulumi:"targetResourceId"` // A `trafficAnalytics` block as documented below. TrafficAnalytics NetworkWatcherFlowLogTrafficAnalyticsPtrOutput `pulumi:"trafficAnalytics"` // The version (revision) of the flow log. Possible values are `1` and `2`. Defaults to `1`. Version pulumi.IntPtrOutput `pulumi:"version"` } // NewNetworkWatcherFlowLog registers a new resource with the given unique name, arguments, and options. func NewNetworkWatcherFlowLog(ctx *pulumi.Context, name string, args *NetworkWatcherFlowLogArgs, opts ...pulumi.ResourceOption) (*NetworkWatcherFlowLog, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Enabled == nil { return nil, errors.New("invalid value for required argument 'Enabled'") } if args.NetworkWatcherName == nil { return nil, errors.New("invalid value for required argument 'NetworkWatcherName'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.RetentionPolicy == nil { return nil, errors.New("invalid value for required argument 'RetentionPolicy'") } if args.StorageAccountId == nil { return nil, errors.New("invalid value for required argument 'StorageAccountId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkWatcherFlowLog err := ctx.RegisterResource("azure:network/networkWatcherFlowLog:NetworkWatcherFlowLog", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkWatcherFlowLog gets an existing NetworkWatcherFlowLog resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetNetworkWatcherFlowLog(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkWatcherFlowLogState, opts ...pulumi.ResourceOption) (*NetworkWatcherFlowLog, error) { var resource NetworkWatcherFlowLog err := ctx.ReadResource("azure:network/networkWatcherFlowLog:NetworkWatcherFlowLog", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkWatcherFlowLog resources. type networkWatcherFlowLogState struct { // Should Network Flow Logging be Enabled? Enabled *bool `pulumi:"enabled"` // The location where the Network Watcher Flow Log resides. Changing this forces a new resource to be created. Defaults to the `location` of the Network Watcher. Location *string `pulumi:"location"` // The name of the Network Watcher Flow Log. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Deprecated: The property `networkSecurityGroupId` has been superseded by `targetResourceId` and will be removed in version 5.0 of the AzureRM Provider. NetworkSecurityGroupId *string `pulumi:"networkSecurityGroupId"` // The name of the Network Watcher. Changing this forces a new resource to be created. NetworkWatcherName *string `pulumi:"networkWatcherName"` // The name of the resource group in which the Network Watcher was deployed. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A `retentionPolicy` block as documented below. RetentionPolicy *NetworkWatcherFlowLogRetentionPolicy `pulumi:"retentionPolicy"` // The ID of the Storage Account where flow logs are stored. StorageAccountId *string `pulumi:"storageAccountId"` // A mapping of tags which should be assigned to the Network Watcher Flow Log. Tags map[string]string `pulumi:"tags"` // The ID of the Resource for which to enable flow logs for. // // > **Note:** As of July 30, 2025, it is no longer possible to create new flow logs for Network Security Groups. TargetResourceId *string `pulumi:"targetResourceId"` // A `trafficAnalytics` block as documented below. TrafficAnalytics *NetworkWatcherFlowLogTrafficAnalytics `pulumi:"trafficAnalytics"` // The version (revision) of the flow log. Possible values are `1` and `2`. Defaults to `1`. Version *int `pulumi:"version"` } type NetworkWatcherFlowLogState struct { // Should Network Flow Logging be Enabled? Enabled pulumi.BoolPtrInput // The location where the Network Watcher Flow Log resides. Changing this forces a new resource to be created. Defaults to the `location` of the Network Watcher. Location pulumi.StringPtrInput // The name of the Network Watcher Flow Log. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Deprecated: The property `networkSecurityGroupId` has been superseded by `targetResourceId` and will be removed in version 5.0 of the AzureRM Provider. NetworkSecurityGroupId pulumi.StringPtrInput // The name of the Network Watcher. Changing this forces a new resource to be created. NetworkWatcherName pulumi.StringPtrInput // The name of the resource group in which the Network Watcher was deployed. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A `retentionPolicy` block as documented below. RetentionPolicy NetworkWatcherFlowLogRetentionPolicyPtrInput // The ID of the Storage Account where flow logs are stored. StorageAccountId pulumi.StringPtrInput // A mapping of tags which should be assigned to the Network Watcher Flow Log. Tags pulumi.StringMapInput // The ID of the Resource for which to enable flow logs for. // // > **Note:** As of July 30, 2025, it is no longer possible to create new flow logs for Network Security Groups. TargetResourceId pulumi.StringPtrInput // A `trafficAnalytics` block as documented below. TrafficAnalytics NetworkWatcherFlowLogTrafficAnalyticsPtrInput // The version (revision) of the flow log. Possible values are `1` and `2`. Defaults to `1`. Version pulumi.IntPtrInput } func (NetworkWatcherFlowLogState) ElementType() reflect.Type { return reflect.TypeOf((*networkWatcherFlowLogState)(nil)).Elem() } type networkWatcherFlowLogArgs struct { // Should Network Flow Logging be Enabled? Enabled bool `pulumi:"enabled"` // The location where the Network Watcher Flow Log resides. Changing this forces a new resource to be created. Defaults to the `location` of the Network Watcher. Location *string `pulumi:"location"` // The name of the Network Watcher Flow Log. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Deprecated: The property `networkSecurityGroupId` has been superseded by `targetResourceId` and will be removed in version 5.0 of the AzureRM Provider. NetworkSecurityGroupId *string `pulumi:"networkSecurityGroupId"` // The name of the Network Watcher. Changing this forces a new resource to be created. NetworkWatcherName string `pulumi:"networkWatcherName"` // The name of the resource group in which the Network Watcher was deployed. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A `retentionPolicy` block as documented below. RetentionPolicy NetworkWatcherFlowLogRetentionPolicy `pulumi:"retentionPolicy"` // The ID of the Storage Account where flow logs are stored. StorageAccountId string `pulumi:"storageAccountId"` // A mapping of tags which should be assigned to the Network Watcher Flow Log. Tags map[string]string `pulumi:"tags"` // The ID of the Resource for which to enable flow logs for. // // > **Note:** As of July 30, 2025, it is no longer possible to create new flow logs for Network Security Groups. TargetResourceId *string `pulumi:"targetResourceId"` // A `trafficAnalytics` block as documented below. TrafficAnalytics *NetworkWatcherFlowLogTrafficAnalytics `pulumi:"trafficAnalytics"` // The version (revision) of the flow log. Possible values are `1` and `2`. Defaults to `1`. Version *int `pulumi:"version"` } // The set of arguments for constructing a NetworkWatcherFlowLog resource. type NetworkWatcherFlowLogArgs struct { // Should Network Flow Logging be Enabled? Enabled pulumi.BoolInput // The location where the Network Watcher Flow Log resides. Changing this forces a new resource to be created. Defaults to the `location` of the Network Watcher. Location pulumi.StringPtrInput // The name of the Network Watcher Flow Log. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Deprecated: The property `networkSecurityGroupId` has been superseded by `targetResourceId` and will be removed in version 5.0 of the AzureRM Provider. NetworkSecurityGroupId pulumi.StringPtrInput // The name of the Network Watcher. Changing this forces a new resource to be created. NetworkWatcherName pulumi.StringInput // The name of the resource group in which the Network Watcher was deployed. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A `retentionPolicy` block as documented below. RetentionPolicy NetworkWatcherFlowLogRetentionPolicyInput // The ID of the Storage Account where flow logs are stored. StorageAccountId pulumi.StringInput // A mapping of tags which should be assigned to the Network Watcher Flow Log. Tags pulumi.StringMapInput // The ID of the Resource for which to enable flow logs for. // // > **Note:** As of July 30, 2025, it is no longer possible to create new flow logs for Network Security Groups. TargetResourceId pulumi.StringPtrInput // A `trafficAnalytics` block as documented below. TrafficAnalytics NetworkWatcherFlowLogTrafficAnalyticsPtrInput // The version (revision) of the flow log. Possible values are `1` and `2`. Defaults to `1`. Version pulumi.IntPtrInput } func (NetworkWatcherFlowLogArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkWatcherFlowLogArgs)(nil)).Elem() } type NetworkWatcherFlowLogInput interface { pulumi.Input ToNetworkWatcherFlowLogOutput() NetworkWatcherFlowLogOutput ToNetworkWatcherFlowLogOutputWithContext(ctx context.Context) NetworkWatcherFlowLogOutput } func (*NetworkWatcherFlowLog) ElementType() reflect.Type { return reflect.TypeOf((**NetworkWatcherFlowLog)(nil)).Elem() } func (i *NetworkWatcherFlowLog) ToNetworkWatcherFlowLogOutput() NetworkWatcherFlowLogOutput { return i.ToNetworkWatcherFlowLogOutputWithContext(context.Background()) } func (i *NetworkWatcherFlowLog) ToNetworkWatcherFlowLogOutputWithContext(ctx context.Context) NetworkWatcherFlowLogOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkWatcherFlowLogOutput) } // NetworkWatcherFlowLogArrayInput is an input type that accepts NetworkWatcherFlowLogArray and NetworkWatcherFlowLogArrayOutput values. // You can construct a concrete instance of `NetworkWatcherFlowLogArrayInput` via: // // NetworkWatcherFlowLogArray{ NetworkWatcherFlowLogArgs{...} } type NetworkWatcherFlowLogArrayInput interface { pulumi.Input ToNetworkWatcherFlowLogArrayOutput() NetworkWatcherFlowLogArrayOutput ToNetworkWatcherFlowLogArrayOutputWithContext(context.Context) NetworkWatcherFlowLogArrayOutput } type NetworkWatcherFlowLogArray []NetworkWatcherFlowLogInput func (NetworkWatcherFlowLogArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkWatcherFlowLog)(nil)).Elem() } func (i NetworkWatcherFlowLogArray) ToNetworkWatcherFlowLogArrayOutput() NetworkWatcherFlowLogArrayOutput { return i.ToNetworkWatcherFlowLogArrayOutputWithContext(context.Background()) } func (i NetworkWatcherFlowLogArray) ToNetworkWatcherFlowLogArrayOutputWithContext(ctx context.Context) NetworkWatcherFlowLogArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkWatcherFlowLogArrayOutput) } // NetworkWatcherFlowLogMapInput is an input type that accepts NetworkWatcherFlowLogMap and NetworkWatcherFlowLogMapOutput values. // You can construct a concrete instance of `NetworkWatcherFlowLogMapInput` via: // // NetworkWatcherFlowLogMap{ "key": NetworkWatcherFlowLogArgs{...} } type NetworkWatcherFlowLogMapInput interface { pulumi.Input ToNetworkWatcherFlowLogMapOutput() NetworkWatcherFlowLogMapOutput ToNetworkWatcherFlowLogMapOutputWithContext(context.Context) NetworkWatcherFlowLogMapOutput } type NetworkWatcherFlowLogMap map[string]NetworkWatcherFlowLogInput func (NetworkWatcherFlowLogMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkWatcherFlowLog)(nil)).Elem() } func (i NetworkWatcherFlowLogMap) ToNetworkWatcherFlowLogMapOutput() NetworkWatcherFlowLogMapOutput { return i.ToNetworkWatcherFlowLogMapOutputWithContext(context.Background()) } func (i NetworkWatcherFlowLogMap) ToNetworkWatcherFlowLogMapOutputWithContext(ctx context.Context) NetworkWatcherFlowLogMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkWatcherFlowLogMapOutput) } type NetworkWatcherFlowLogOutput struct{ *pulumi.OutputState } func (NetworkWatcherFlowLogOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkWatcherFlowLog)(nil)).Elem() } func (o NetworkWatcherFlowLogOutput) ToNetworkWatcherFlowLogOutput() NetworkWatcherFlowLogOutput { return o } func (o NetworkWatcherFlowLogOutput) ToNetworkWatcherFlowLogOutputWithContext(ctx context.Context) NetworkWatcherFlowLogOutput { return o } // Should Network Flow Logging be Enabled? func (o NetworkWatcherFlowLogOutput) Enabled() pulumi.BoolOutput { return o.ApplyT(func(v *NetworkWatcherFlowLog) pulumi.BoolOutput { return v.Enabled }).(pulumi.BoolOutput) } // The location where the Network Watcher Flow Log resides. Changing this forces a new resource to be created. Defaults to the `location` of the Network Watcher. func (o NetworkWatcherFlowLogOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *NetworkWatcherFlowLog) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name of the Network Watcher Flow Log. Changing this forces a new resource to be created. func (o NetworkWatcherFlowLogOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NetworkWatcherFlowLog) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Deprecated: The property `networkSecurityGroupId` has been superseded by `targetResourceId` and will be removed in version 5.0 of the AzureRM Provider. func (o NetworkWatcherFlowLogOutput) NetworkSecurityGroupId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkWatcherFlowLog) pulumi.StringOutput { return v.NetworkSecurityGroupId }).(pulumi.StringOutput) } // The name of the Network Watcher. Changing this forces a new resource to be created. func (o NetworkWatcherFlowLogOutput) NetworkWatcherName() pulumi.StringOutput { return o.ApplyT(func(v *NetworkWatcherFlowLog) pulumi.StringOutput { return v.NetworkWatcherName }).(pulumi.StringOutput) } // The name of the resource group in which the Network Watcher was deployed. Changing this forces a new resource to be created. func (o NetworkWatcherFlowLogOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *NetworkWatcherFlowLog) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A `retentionPolicy` block as documented below. func (o NetworkWatcherFlowLogOutput) RetentionPolicy() NetworkWatcherFlowLogRetentionPolicyOutput { return o.ApplyT(func(v *NetworkWatcherFlowLog) NetworkWatcherFlowLogRetentionPolicyOutput { return v.RetentionPolicy }).(NetworkWatcherFlowLogRetentionPolicyOutput) } // The ID of the Storage Account where flow logs are stored. func (o NetworkWatcherFlowLogOutput) StorageAccountId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkWatcherFlowLog) pulumi.StringOutput { return v.StorageAccountId }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Network Watcher Flow Log. func (o NetworkWatcherFlowLogOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *NetworkWatcherFlowLog) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The ID of the Resource for which to enable flow logs for. // // > **Note:** As of July 30, 2025, it is no longer possible to create new flow logs for Network Security Groups. func (o NetworkWatcherFlowLogOutput) TargetResourceId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkWatcherFlowLog) pulumi.StringOutput { return v.TargetResourceId }).(pulumi.StringOutput) } // A `trafficAnalytics` block as documented below. func (o NetworkWatcherFlowLogOutput) TrafficAnalytics() NetworkWatcherFlowLogTrafficAnalyticsPtrOutput { return o.ApplyT(func(v *NetworkWatcherFlowLog) NetworkWatcherFlowLogTrafficAnalyticsPtrOutput { return v.TrafficAnalytics }).(NetworkWatcherFlowLogTrafficAnalyticsPtrOutput) } // The version (revision) of the flow log. Possible values are `1` and `2`. Defaults to `1`. func (o NetworkWatcherFlowLogOutput) Version() pulumi.IntPtrOutput { return o.ApplyT(func(v *NetworkWatcherFlowLog) pulumi.IntPtrOutput { return v.Version }).(pulumi.IntPtrOutput) } type NetworkWatcherFlowLogArrayOutput struct{ *pulumi.OutputState } func (NetworkWatcherFlowLogArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkWatcherFlowLog)(nil)).Elem() } func (o NetworkWatcherFlowLogArrayOutput) ToNetworkWatcherFlowLogArrayOutput() NetworkWatcherFlowLogArrayOutput { return o } func (o NetworkWatcherFlowLogArrayOutput) ToNetworkWatcherFlowLogArrayOutputWithContext(ctx context.Context) NetworkWatcherFlowLogArrayOutput { return o } func (o NetworkWatcherFlowLogArrayOutput) Index(i pulumi.IntInput) NetworkWatcherFlowLogOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkWatcherFlowLog { return vs[0].([]*NetworkWatcherFlowLog)[vs[1].(int)] }).(NetworkWatcherFlowLogOutput) } type NetworkWatcherFlowLogMapOutput struct{ *pulumi.OutputState } func (NetworkWatcherFlowLogMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkWatcherFlowLog)(nil)).Elem() } func (o NetworkWatcherFlowLogMapOutput) ToNetworkWatcherFlowLogMapOutput() NetworkWatcherFlowLogMapOutput { return o } func (o NetworkWatcherFlowLogMapOutput) ToNetworkWatcherFlowLogMapOutputWithContext(ctx context.Context) NetworkWatcherFlowLogMapOutput { return o } func (o NetworkWatcherFlowLogMapOutput) MapIndex(k pulumi.StringInput) NetworkWatcherFlowLogOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkWatcherFlowLog { return vs[0].(map[string]*NetworkWatcherFlowLog)[vs[1].(string)] }).(NetworkWatcherFlowLogOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkWatcherFlowLogInput)(nil)).Elem(), &NetworkWatcherFlowLog{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkWatcherFlowLogArrayInput)(nil)).Elem(), NetworkWatcherFlowLogArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkWatcherFlowLogMapInput)(nil)).Elem(), NetworkWatcherFlowLogMap{}) pulumi.RegisterOutputType(NetworkWatcherFlowLogOutput{}) pulumi.RegisterOutputType(NetworkWatcherFlowLogArrayOutput{}) pulumi.RegisterOutputType(NetworkWatcherFlowLogMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getFirewall.go
sdk/go/azure/network/getFirewall.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Azure Firewall. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.LookupFirewall(ctx, &network.LookupFirewallArgs{ // Name: "firewall1", // ResourceGroupName: "firewall-RG", // }, nil) // if err != nil { // return err // } // ctx.Export("firewallPrivateIp", example.IpConfigurations[0].PrivateIpAddress) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func LookupFirewall(ctx *pulumi.Context, args *LookupFirewallArgs, opts ...pulumi.InvokeOption) (*LookupFirewallResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupFirewallResult err := ctx.Invoke("azure:network/getFirewall:getFirewall", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getFirewall. type LookupFirewallArgs struct { // Whether DNS proxy is enabled. It will forward DNS requests to the DNS servers when it is `true`. DnsProxyEnabled *bool `pulumi:"dnsProxyEnabled"` // The name of the Azure Firewall. Name string `pulumi:"name"` // The name of the Resource Group in which the Azure Firewall exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getFirewall. type LookupFirewallResult struct { // Whether DNS proxy is enabled. It will forward DNS requests to the DNS servers when it is `true`. DnsProxyEnabled bool `pulumi:"dnsProxyEnabled"` // The list of DNS servers that the Azure Firewall will direct DNS traffic to for name resolution. DnsServers []string `pulumi:"dnsServers"` // The ID of the Firewall Policy applied to the Azure Firewall. FirewallPolicyId string `pulumi:"firewallPolicyId"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // A `ipConfiguration` block as defined below. IpConfigurations []GetFirewallIpConfiguration `pulumi:"ipConfigurations"` // The Azure location where the Azure Firewall exists. Location string `pulumi:"location"` // A `managementIpConfiguration` block as defined below, which allows force-tunnelling of traffic to be performed by the firewall. ManagementIpConfigurations []GetFirewallManagementIpConfiguration `pulumi:"managementIpConfigurations"` Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // The SKU name of the Azure Firewall. SkuName string `pulumi:"skuName"` // The SKU tier of the Azure Firewall. SkuTier string `pulumi:"skuTier"` // A mapping of tags assigned to the Azure Firewall. Tags map[string]string `pulumi:"tags"` // The operation mode for threat intelligence-based filtering. ThreatIntelMode string `pulumi:"threatIntelMode"` // A `virtualHub` block as defined below. VirtualHubs []GetFirewallVirtualHub `pulumi:"virtualHubs"` // A list of Availability Zones in which this Azure Firewall is located. Zones []string `pulumi:"zones"` } func LookupFirewallOutput(ctx *pulumi.Context, args LookupFirewallOutputArgs, opts ...pulumi.InvokeOption) LookupFirewallResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupFirewallResultOutput, error) { args := v.(LookupFirewallArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getFirewall:getFirewall", args, LookupFirewallResultOutput{}, options).(LookupFirewallResultOutput), nil }).(LookupFirewallResultOutput) } // A collection of arguments for invoking getFirewall. type LookupFirewallOutputArgs struct { // Whether DNS proxy is enabled. It will forward DNS requests to the DNS servers when it is `true`. DnsProxyEnabled pulumi.BoolPtrInput `pulumi:"dnsProxyEnabled"` // The name of the Azure Firewall. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group in which the Azure Firewall exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupFirewallOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupFirewallArgs)(nil)).Elem() } // A collection of values returned by getFirewall. type LookupFirewallResultOutput struct{ *pulumi.OutputState } func (LookupFirewallResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupFirewallResult)(nil)).Elem() } func (o LookupFirewallResultOutput) ToLookupFirewallResultOutput() LookupFirewallResultOutput { return o } func (o LookupFirewallResultOutput) ToLookupFirewallResultOutputWithContext(ctx context.Context) LookupFirewallResultOutput { return o } // Whether DNS proxy is enabled. It will forward DNS requests to the DNS servers when it is `true`. func (o LookupFirewallResultOutput) DnsProxyEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupFirewallResult) bool { return v.DnsProxyEnabled }).(pulumi.BoolOutput) } // The list of DNS servers that the Azure Firewall will direct DNS traffic to for name resolution. func (o LookupFirewallResultOutput) DnsServers() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupFirewallResult) []string { return v.DnsServers }).(pulumi.StringArrayOutput) } // The ID of the Firewall Policy applied to the Azure Firewall. func (o LookupFirewallResultOutput) FirewallPolicyId() pulumi.StringOutput { return o.ApplyT(func(v LookupFirewallResult) string { return v.FirewallPolicyId }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupFirewallResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupFirewallResult) string { return v.Id }).(pulumi.StringOutput) } // A `ipConfiguration` block as defined below. func (o LookupFirewallResultOutput) IpConfigurations() GetFirewallIpConfigurationArrayOutput { return o.ApplyT(func(v LookupFirewallResult) []GetFirewallIpConfiguration { return v.IpConfigurations }).(GetFirewallIpConfigurationArrayOutput) } // The Azure location where the Azure Firewall exists. func (o LookupFirewallResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupFirewallResult) string { return v.Location }).(pulumi.StringOutput) } // A `managementIpConfiguration` block as defined below, which allows force-tunnelling of traffic to be performed by the firewall. func (o LookupFirewallResultOutput) ManagementIpConfigurations() GetFirewallManagementIpConfigurationArrayOutput { return o.ApplyT(func(v LookupFirewallResult) []GetFirewallManagementIpConfiguration { return v.ManagementIpConfigurations }).(GetFirewallManagementIpConfigurationArrayOutput) } func (o LookupFirewallResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupFirewallResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupFirewallResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupFirewallResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // The SKU name of the Azure Firewall. func (o LookupFirewallResultOutput) SkuName() pulumi.StringOutput { return o.ApplyT(func(v LookupFirewallResult) string { return v.SkuName }).(pulumi.StringOutput) } // The SKU tier of the Azure Firewall. func (o LookupFirewallResultOutput) SkuTier() pulumi.StringOutput { return o.ApplyT(func(v LookupFirewallResult) string { return v.SkuTier }).(pulumi.StringOutput) } // A mapping of tags assigned to the Azure Firewall. func (o LookupFirewallResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupFirewallResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The operation mode for threat intelligence-based filtering. func (o LookupFirewallResultOutput) ThreatIntelMode() pulumi.StringOutput { return o.ApplyT(func(v LookupFirewallResult) string { return v.ThreatIntelMode }).(pulumi.StringOutput) } // A `virtualHub` block as defined below. func (o LookupFirewallResultOutput) VirtualHubs() GetFirewallVirtualHubArrayOutput { return o.ApplyT(func(v LookupFirewallResult) []GetFirewallVirtualHub { return v.VirtualHubs }).(GetFirewallVirtualHubArrayOutput) } // A list of Availability Zones in which this Azure Firewall is located. func (o LookupFirewallResultOutput) Zones() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupFirewallResult) []string { return v.Zones }).(pulumi.StringArrayOutput) } func init() { pulumi.RegisterOutputType(LookupFirewallResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getVirtualNetworkGateway.go
sdk/go/azure/network/getVirtualNetworkGateway.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Virtual Network Gateway. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.LookupVirtualNetworkGateway(ctx, &network.LookupVirtualNetworkGatewayArgs{ // Name: "production", // ResourceGroupName: "networking", // }, nil) // if err != nil { // return err // } // ctx.Export("virtualNetworkGatewayId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func LookupVirtualNetworkGateway(ctx *pulumi.Context, args *LookupVirtualNetworkGatewayArgs, opts ...pulumi.InvokeOption) (*LookupVirtualNetworkGatewayResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupVirtualNetworkGatewayResult err := ctx.Invoke("azure:network/getVirtualNetworkGateway:getVirtualNetworkGateway", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getVirtualNetworkGateway. type LookupVirtualNetworkGatewayArgs struct { // Specifies the name of the Virtual Network Gateway. Name string `pulumi:"name"` // Specifies the name of the resource group the Virtual Network Gateway is located in. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getVirtualNetworkGateway. type LookupVirtualNetworkGatewayResult struct { // Is this an Active-Active Gateway? ActiveActive bool `pulumi:"activeActive"` BgpSettings []GetVirtualNetworkGatewayBgpSetting `pulumi:"bgpSettings"` CustomRoutes []GetVirtualNetworkGatewayCustomRoute `pulumi:"customRoutes"` // The ID of the local network gateway // through which outbound Internet traffic from the virtual network in which the // gateway is created will be routed (*forced tunneling*). Refer to the // [Azure documentation on forced tunneling](https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-forced-tunneling-rm). DefaultLocalNetworkGatewayId string `pulumi:"defaultLocalNetworkGatewayId"` // Will BGP (Border Gateway Protocol) will be enabled // for this Virtual Network Gateway. EnableBgp bool `pulumi:"enableBgp"` // The Generation of the Virtual Network Gateway. Generation string `pulumi:"generation"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // One or two `ipConfiguration` blocks documented below. IpConfigurations []GetVirtualNetworkGatewayIpConfiguration `pulumi:"ipConfigurations"` // The location/region where the Virtual Network Gateway is located. Location string `pulumi:"location"` // The user-defined name of the root certificate. Name string `pulumi:"name"` // Whether a private IP will be used for this gateway for connections. PrivateIpAddressEnabled bool `pulumi:"privateIpAddressEnabled"` ResourceGroupName string `pulumi:"resourceGroupName"` // Configuration of the size and capacity of the Virtual Network Gateway. Sku string `pulumi:"sku"` // A mapping of tags assigned to the resource. Tags map[string]string `pulumi:"tags"` // The type of the Virtual Network Gateway. Type string `pulumi:"type"` // A `vpnClientConfiguration` block which is documented below. VpnClientConfigurations []GetVirtualNetworkGatewayVpnClientConfiguration `pulumi:"vpnClientConfigurations"` // The routing type of the Virtual Network Gateway. VpnType string `pulumi:"vpnType"` } func LookupVirtualNetworkGatewayOutput(ctx *pulumi.Context, args LookupVirtualNetworkGatewayOutputArgs, opts ...pulumi.InvokeOption) LookupVirtualNetworkGatewayResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupVirtualNetworkGatewayResultOutput, error) { args := v.(LookupVirtualNetworkGatewayArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getVirtualNetworkGateway:getVirtualNetworkGateway", args, LookupVirtualNetworkGatewayResultOutput{}, options).(LookupVirtualNetworkGatewayResultOutput), nil }).(LookupVirtualNetworkGatewayResultOutput) } // A collection of arguments for invoking getVirtualNetworkGateway. type LookupVirtualNetworkGatewayOutputArgs struct { // Specifies the name of the Virtual Network Gateway. Name pulumi.StringInput `pulumi:"name"` // Specifies the name of the resource group the Virtual Network Gateway is located in. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupVirtualNetworkGatewayOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupVirtualNetworkGatewayArgs)(nil)).Elem() } // A collection of values returned by getVirtualNetworkGateway. type LookupVirtualNetworkGatewayResultOutput struct{ *pulumi.OutputState } func (LookupVirtualNetworkGatewayResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupVirtualNetworkGatewayResult)(nil)).Elem() } func (o LookupVirtualNetworkGatewayResultOutput) ToLookupVirtualNetworkGatewayResultOutput() LookupVirtualNetworkGatewayResultOutput { return o } func (o LookupVirtualNetworkGatewayResultOutput) ToLookupVirtualNetworkGatewayResultOutputWithContext(ctx context.Context) LookupVirtualNetworkGatewayResultOutput { return o } // Is this an Active-Active Gateway? func (o LookupVirtualNetworkGatewayResultOutput) ActiveActive() pulumi.BoolOutput { return o.ApplyT(func(v LookupVirtualNetworkGatewayResult) bool { return v.ActiveActive }).(pulumi.BoolOutput) } func (o LookupVirtualNetworkGatewayResultOutput) BgpSettings() GetVirtualNetworkGatewayBgpSettingArrayOutput { return o.ApplyT(func(v LookupVirtualNetworkGatewayResult) []GetVirtualNetworkGatewayBgpSetting { return v.BgpSettings }).(GetVirtualNetworkGatewayBgpSettingArrayOutput) } func (o LookupVirtualNetworkGatewayResultOutput) CustomRoutes() GetVirtualNetworkGatewayCustomRouteArrayOutput { return o.ApplyT(func(v LookupVirtualNetworkGatewayResult) []GetVirtualNetworkGatewayCustomRoute { return v.CustomRoutes }).(GetVirtualNetworkGatewayCustomRouteArrayOutput) } // The ID of the local network gateway // through which outbound Internet traffic from the virtual network in which the // gateway is created will be routed (*forced tunneling*). Refer to the // [Azure documentation on forced tunneling](https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-forced-tunneling-rm). func (o LookupVirtualNetworkGatewayResultOutput) DefaultLocalNetworkGatewayId() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualNetworkGatewayResult) string { return v.DefaultLocalNetworkGatewayId }).(pulumi.StringOutput) } // Will BGP (Border Gateway Protocol) will be enabled // for this Virtual Network Gateway. func (o LookupVirtualNetworkGatewayResultOutput) EnableBgp() pulumi.BoolOutput { return o.ApplyT(func(v LookupVirtualNetworkGatewayResult) bool { return v.EnableBgp }).(pulumi.BoolOutput) } // The Generation of the Virtual Network Gateway. func (o LookupVirtualNetworkGatewayResultOutput) Generation() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualNetworkGatewayResult) string { return v.Generation }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupVirtualNetworkGatewayResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualNetworkGatewayResult) string { return v.Id }).(pulumi.StringOutput) } // One or two `ipConfiguration` blocks documented below. func (o LookupVirtualNetworkGatewayResultOutput) IpConfigurations() GetVirtualNetworkGatewayIpConfigurationArrayOutput { return o.ApplyT(func(v LookupVirtualNetworkGatewayResult) []GetVirtualNetworkGatewayIpConfiguration { return v.IpConfigurations }).(GetVirtualNetworkGatewayIpConfigurationArrayOutput) } // The location/region where the Virtual Network Gateway is located. func (o LookupVirtualNetworkGatewayResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualNetworkGatewayResult) string { return v.Location }).(pulumi.StringOutput) } // The user-defined name of the root certificate. func (o LookupVirtualNetworkGatewayResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualNetworkGatewayResult) string { return v.Name }).(pulumi.StringOutput) } // Whether a private IP will be used for this gateway for connections. func (o LookupVirtualNetworkGatewayResultOutput) PrivateIpAddressEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupVirtualNetworkGatewayResult) bool { return v.PrivateIpAddressEnabled }).(pulumi.BoolOutput) } func (o LookupVirtualNetworkGatewayResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualNetworkGatewayResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // Configuration of the size and capacity of the Virtual Network Gateway. func (o LookupVirtualNetworkGatewayResultOutput) Sku() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualNetworkGatewayResult) string { return v.Sku }).(pulumi.StringOutput) } // A mapping of tags assigned to the resource. func (o LookupVirtualNetworkGatewayResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupVirtualNetworkGatewayResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The type of the Virtual Network Gateway. func (o LookupVirtualNetworkGatewayResultOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualNetworkGatewayResult) string { return v.Type }).(pulumi.StringOutput) } // A `vpnClientConfiguration` block which is documented below. func (o LookupVirtualNetworkGatewayResultOutput) VpnClientConfigurations() GetVirtualNetworkGatewayVpnClientConfigurationArrayOutput { return o.ApplyT(func(v LookupVirtualNetworkGatewayResult) []GetVirtualNetworkGatewayVpnClientConfiguration { return v.VpnClientConfigurations }).(GetVirtualNetworkGatewayVpnClientConfigurationArrayOutput) } // The routing type of the Virtual Network Gateway. func (o LookupVirtualNetworkGatewayResultOutput) VpnType() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualNetworkGatewayResult) string { return v.VpnType }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupVirtualNetworkGatewayResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/networkManagerVerifierWorkspaceReachabilityAnalysisIntent.go
sdk/go/azure/network/networkManagerVerifierWorkspaceReachabilityAnalysisIntent.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Network Manager Verifier Workspace Reachability Analysis Intent. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // exampleNetworkManager, err := network.NewNetworkManager(ctx, "example", &network.NetworkManagerArgs{ // Name: pulumi.String("example-nm"), // ResourceGroupName: example.Name, // Location: example.Location, // Scope: &network.NetworkManagerScopeArgs{ // SubscriptionIds: pulumi.StringArray{ // pulumi.String(current.Id), // }, // }, // ScopeAccesses: pulumi.StringArray{ // pulumi.String("Connectivity"), // }, // }) // if err != nil { // return err // } // exampleNetworkManagerVerifierWorkspace, err := network.NewNetworkManagerVerifierWorkspace(ctx, "example", &network.NetworkManagerVerifierWorkspaceArgs{ // Name: pulumi.String("example"), // NetworkManagerId: exampleNetworkManager.ID(), // Location: example.Location, // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-network"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("internal"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // }) // if err != nil { // return err // } // exampleNetworkInterface, err := network.NewNetworkInterface(ctx, "example", &network.NetworkInterfaceArgs{ // Name: pulumi.String("example-nic"), // Location: example.Location, // ResourceGroupName: example.Name, // IpConfigurations: network.NetworkInterfaceIpConfigurationArray{ // &network.NetworkInterfaceIpConfigurationArgs{ // Name: pulumi.String("internal"), // SubnetId: exampleSubnet.ID(), // PrivateIpAddressAllocation: pulumi.String("Dynamic"), // }, // }, // }) // if err != nil { // return err // } // exampleLinuxVirtualMachine, err := compute.NewLinuxVirtualMachine(ctx, "example", &compute.LinuxVirtualMachineArgs{ // Name: pulumi.String("example-machine"), // ResourceGroupName: example.Name, // Location: example.Location, // Size: pulumi.String("Standard_B1ls"), // AdminUsername: pulumi.String("adminuser"), // AdminPassword: pulumi.String("P@ssw0rd1234!"), // DisablePasswordAuthentication: pulumi.Bool(false), // NetworkInterfaceIds: pulumi.StringArray{ // exampleNetworkInterface.ID(), // }, // OsDisk: &compute.LinuxVirtualMachineOsDiskArgs{ // Caching: pulumi.String("ReadWrite"), // StorageAccountType: pulumi.String("Standard_LRS"), // }, // SourceImageReference: &compute.LinuxVirtualMachineSourceImageReferenceArgs{ // Publisher: pulumi.String("Canonical"), // Offer: pulumi.String("0001-com-ubuntu-server-jammy"), // Sku: pulumi.String("22_04-lts"), // Version: pulumi.String("latest"), // }, // }) // if err != nil { // return err // } // _, err = network.NewNetworkManagerVerifierWorkspaceReachabilityAnalysisIntent(ctx, "example", &network.NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArgs{ // Name: pulumi.String("example-intent"), // VerifierWorkspaceId: exampleNetworkManagerVerifierWorkspace.ID(), // SourceResourceId: exampleLinuxVirtualMachine.ID(), // DestinationResourceId: exampleLinuxVirtualMachine.ID(), // Description: pulumi.String("example"), // IpTraffic: &network.NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentIpTrafficArgs{ // SourceIps: pulumi.StringArray{ // pulumi.String("10.0.2.1"), // }, // SourcePorts: pulumi.StringArray{ // pulumi.String("80"), // }, // DestinationIps: pulumi.StringArray{ // pulumi.String("10.0.2.2"), // }, // DestinationPorts: pulumi.StringArray{ // pulumi.String("*"), // }, // Protocols: pulumi.StringArray{ // pulumi.String("Any"), // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Network Manager Verifier Workspace Reachability Analysis Intents can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/networkManagerVerifierWorkspaceReachabilityAnalysisIntent:NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/manager1/verifierWorkspaces/workspace1/reachabilityAnalysisIntents/intent1 // ``` type NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent struct { pulumi.CustomResourceState // The description of the resource. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. Description pulumi.StringPtrOutput `pulumi:"description"` // The ID of the destination resource. The value can be the ID of either Public internet, Cosmos DB, Storage Account, SQL Server, Virtual machines, or Subnet. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. DestinationResourceId pulumi.StringOutput `pulumi:"destinationResourceId"` // An `ipTraffic` block as defined below. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. IpTraffic NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentIpTrafficOutput `pulumi:"ipTraffic"` // The name which should be used for this Network Manager Verifier Workspace Reachability Analysis Intent. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the source resource. The value can be the ID of either Public internet, Virtual machines, or Subnet. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. SourceResourceId pulumi.StringOutput `pulumi:"sourceResourceId"` // The ID of the Network Manager Verifier Workspace. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. VerifierWorkspaceId pulumi.StringOutput `pulumi:"verifierWorkspaceId"` } // NewNetworkManagerVerifierWorkspaceReachabilityAnalysisIntent registers a new resource with the given unique name, arguments, and options. func NewNetworkManagerVerifierWorkspaceReachabilityAnalysisIntent(ctx *pulumi.Context, name string, args *NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArgs, opts ...pulumi.ResourceOption) (*NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.DestinationResourceId == nil { return nil, errors.New("invalid value for required argument 'DestinationResourceId'") } if args.IpTraffic == nil { return nil, errors.New("invalid value for required argument 'IpTraffic'") } if args.SourceResourceId == nil { return nil, errors.New("invalid value for required argument 'SourceResourceId'") } if args.VerifierWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'VerifierWorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent err := ctx.RegisterResource("azure:network/networkManagerVerifierWorkspaceReachabilityAnalysisIntent:NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkManagerVerifierWorkspaceReachabilityAnalysisIntent gets an existing NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetNetworkManagerVerifierWorkspaceReachabilityAnalysisIntent(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentState, opts ...pulumi.ResourceOption) (*NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent, error) { var resource NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent err := ctx.ReadResource("azure:network/networkManagerVerifierWorkspaceReachabilityAnalysisIntent:NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent resources. type networkManagerVerifierWorkspaceReachabilityAnalysisIntentState struct { // The description of the resource. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. Description *string `pulumi:"description"` // The ID of the destination resource. The value can be the ID of either Public internet, Cosmos DB, Storage Account, SQL Server, Virtual machines, or Subnet. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. DestinationResourceId *string `pulumi:"destinationResourceId"` // An `ipTraffic` block as defined below. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. IpTraffic *NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentIpTraffic `pulumi:"ipTraffic"` // The name which should be used for this Network Manager Verifier Workspace Reachability Analysis Intent. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. Name *string `pulumi:"name"` // The ID of the source resource. The value can be the ID of either Public internet, Virtual machines, or Subnet. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. SourceResourceId *string `pulumi:"sourceResourceId"` // The ID of the Network Manager Verifier Workspace. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. VerifierWorkspaceId *string `pulumi:"verifierWorkspaceId"` } type NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentState struct { // The description of the resource. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. Description pulumi.StringPtrInput // The ID of the destination resource. The value can be the ID of either Public internet, Cosmos DB, Storage Account, SQL Server, Virtual machines, or Subnet. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. DestinationResourceId pulumi.StringPtrInput // An `ipTraffic` block as defined below. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. IpTraffic NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentIpTrafficPtrInput // The name which should be used for this Network Manager Verifier Workspace Reachability Analysis Intent. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. Name pulumi.StringPtrInput // The ID of the source resource. The value can be the ID of either Public internet, Virtual machines, or Subnet. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. SourceResourceId pulumi.StringPtrInput // The ID of the Network Manager Verifier Workspace. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. VerifierWorkspaceId pulumi.StringPtrInput } func (NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentState) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerVerifierWorkspaceReachabilityAnalysisIntentState)(nil)).Elem() } type networkManagerVerifierWorkspaceReachabilityAnalysisIntentArgs struct { // The description of the resource. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. Description *string `pulumi:"description"` // The ID of the destination resource. The value can be the ID of either Public internet, Cosmos DB, Storage Account, SQL Server, Virtual machines, or Subnet. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. DestinationResourceId string `pulumi:"destinationResourceId"` // An `ipTraffic` block as defined below. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. IpTraffic NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentIpTraffic `pulumi:"ipTraffic"` // The name which should be used for this Network Manager Verifier Workspace Reachability Analysis Intent. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. Name *string `pulumi:"name"` // The ID of the source resource. The value can be the ID of either Public internet, Virtual machines, or Subnet. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. SourceResourceId string `pulumi:"sourceResourceId"` // The ID of the Network Manager Verifier Workspace. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. VerifierWorkspaceId string `pulumi:"verifierWorkspaceId"` } // The set of arguments for constructing a NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent resource. type NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArgs struct { // The description of the resource. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. Description pulumi.StringPtrInput // The ID of the destination resource. The value can be the ID of either Public internet, Cosmos DB, Storage Account, SQL Server, Virtual machines, or Subnet. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. DestinationResourceId pulumi.StringInput // An `ipTraffic` block as defined below. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. IpTraffic NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentIpTrafficInput // The name which should be used for this Network Manager Verifier Workspace Reachability Analysis Intent. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. Name pulumi.StringPtrInput // The ID of the source resource. The value can be the ID of either Public internet, Virtual machines, or Subnet. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. SourceResourceId pulumi.StringInput // The ID of the Network Manager Verifier Workspace. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. VerifierWorkspaceId pulumi.StringInput } func (NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerVerifierWorkspaceReachabilityAnalysisIntentArgs)(nil)).Elem() } type NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentInput interface { pulumi.Input ToNetworkManagerVerifierWorkspaceReachabilityAnalysisIntentOutput() NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentOutput ToNetworkManagerVerifierWorkspaceReachabilityAnalysisIntentOutputWithContext(ctx context.Context) NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentOutput } func (*NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent)(nil)).Elem() } func (i *NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent) ToNetworkManagerVerifierWorkspaceReachabilityAnalysisIntentOutput() NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentOutput { return i.ToNetworkManagerVerifierWorkspaceReachabilityAnalysisIntentOutputWithContext(context.Background()) } func (i *NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent) ToNetworkManagerVerifierWorkspaceReachabilityAnalysisIntentOutputWithContext(ctx context.Context) NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentOutput) } // NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArrayInput is an input type that accepts NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArray and NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArrayOutput values. // You can construct a concrete instance of `NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArrayInput` via: // // NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArray{ NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArgs{...} } type NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArrayInput interface { pulumi.Input ToNetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArrayOutput() NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArrayOutput ToNetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArrayOutputWithContext(context.Context) NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArrayOutput } type NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArray []NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentInput func (NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent)(nil)).Elem() } func (i NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArray) ToNetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArrayOutput() NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArrayOutput { return i.ToNetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArrayOutputWithContext(context.Background()) } func (i NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArray) ToNetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArrayOutputWithContext(ctx context.Context) NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArrayOutput) } // NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMapInput is an input type that accepts NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMap and NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMapOutput values. // You can construct a concrete instance of `NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMapInput` via: // // NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMap{ "key": NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArgs{...} } type NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMapInput interface { pulumi.Input ToNetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMapOutput() NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMapOutput ToNetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMapOutputWithContext(context.Context) NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMapOutput } type NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMap map[string]NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentInput func (NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent)(nil)).Elem() } func (i NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMap) ToNetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMapOutput() NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMapOutput { return i.ToNetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMapOutputWithContext(context.Background()) } func (i NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMap) ToNetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMapOutputWithContext(ctx context.Context) NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMapOutput) } type NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentOutput struct{ *pulumi.OutputState } func (NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent)(nil)).Elem() } func (o NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentOutput) ToNetworkManagerVerifierWorkspaceReachabilityAnalysisIntentOutput() NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentOutput { return o } func (o NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentOutput) ToNetworkManagerVerifierWorkspaceReachabilityAnalysisIntentOutputWithContext(ctx context.Context) NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentOutput { return o } // The description of the resource. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. func (o NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // The ID of the destination resource. The value can be the ID of either Public internet, Cosmos DB, Storage Account, SQL Server, Virtual machines, or Subnet. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. func (o NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentOutput) DestinationResourceId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent) pulumi.StringOutput { return v.DestinationResourceId }).(pulumi.StringOutput) } // An `ipTraffic` block as defined below. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. func (o NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentOutput) IpTraffic() NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentIpTrafficOutput { return o.ApplyT(func(v *NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent) NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentIpTrafficOutput { return v.IpTraffic }).(NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentIpTrafficOutput) } // The name which should be used for this Network Manager Verifier Workspace Reachability Analysis Intent. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. func (o NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the source resource. The value can be the ID of either Public internet, Virtual machines, or Subnet. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. func (o NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentOutput) SourceResourceId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent) pulumi.StringOutput { return v.SourceResourceId }).(pulumi.StringOutput) } // The ID of the Network Manager Verifier Workspace. Changing this forces a new Network Manager Verifier Workspace Reachability Analysis Intent to be created. func (o NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentOutput) VerifierWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent) pulumi.StringOutput { return v.VerifierWorkspaceId }).(pulumi.StringOutput) } type NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArrayOutput struct{ *pulumi.OutputState } func (NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent)(nil)).Elem() } func (o NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArrayOutput) ToNetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArrayOutput() NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArrayOutput { return o } func (o NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArrayOutput) ToNetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArrayOutputWithContext(ctx context.Context) NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArrayOutput { return o } func (o NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArrayOutput) Index(i pulumi.IntInput) NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent { return vs[0].([]*NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent)[vs[1].(int)] }).(NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentOutput) } type NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMapOutput struct{ *pulumi.OutputState } func (NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent)(nil)).Elem() } func (o NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMapOutput) ToNetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMapOutput() NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMapOutput { return o } func (o NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMapOutput) ToNetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMapOutputWithContext(ctx context.Context) NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMapOutput { return o } func (o NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMapOutput) MapIndex(k pulumi.StringInput) NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent { return vs[0].(map[string]*NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent)[vs[1].(string)] }).(NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentInput)(nil)).Elem(), &NetworkManagerVerifierWorkspaceReachabilityAnalysisIntent{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArrayInput)(nil)).Elem(), NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMapInput)(nil)).Elem(), NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMap{}) pulumi.RegisterOutputType(NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentOutput{}) pulumi.RegisterOutputType(NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentArrayOutput{}) pulumi.RegisterOutputType(NetworkManagerVerifierWorkspaceReachabilityAnalysisIntentMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/networkWatcher.go
sdk/go/azure/network/networkWatcher.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Network Watcher. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("production-nwwatcher"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = network.NewNetworkWatcher(ctx, "example", &network.NetworkWatcherArgs{ // Name: pulumi.String("production-nwwatcher"), // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Network Watchers can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/networkWatcher:NetworkWatcher watcher1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/networkWatchers/watcher1 // ``` type NetworkWatcher struct { pulumi.CustomResourceState // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the Network Watcher. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the resource group in which to create the Network Watcher. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewNetworkWatcher registers a new resource with the given unique name, arguments, and options. func NewNetworkWatcher(ctx *pulumi.Context, name string, args *NetworkWatcherArgs, opts ...pulumi.ResourceOption) (*NetworkWatcher, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkWatcher err := ctx.RegisterResource("azure:network/networkWatcher:NetworkWatcher", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkWatcher gets an existing NetworkWatcher resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetNetworkWatcher(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkWatcherState, opts ...pulumi.ResourceOption) (*NetworkWatcher, error) { var resource NetworkWatcher err := ctx.ReadResource("azure:network/networkWatcher:NetworkWatcher", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkWatcher resources. type networkWatcherState struct { // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the Network Watcher. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the Network Watcher. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } type NetworkWatcherState struct { // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the Network Watcher. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the Network Watcher. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (NetworkWatcherState) ElementType() reflect.Type { return reflect.TypeOf((*networkWatcherState)(nil)).Elem() } type networkWatcherArgs struct { // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the Network Watcher. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the Network Watcher. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a NetworkWatcher resource. type NetworkWatcherArgs struct { // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the Network Watcher. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the Network Watcher. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (NetworkWatcherArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkWatcherArgs)(nil)).Elem() } type NetworkWatcherInput interface { pulumi.Input ToNetworkWatcherOutput() NetworkWatcherOutput ToNetworkWatcherOutputWithContext(ctx context.Context) NetworkWatcherOutput } func (*NetworkWatcher) ElementType() reflect.Type { return reflect.TypeOf((**NetworkWatcher)(nil)).Elem() } func (i *NetworkWatcher) ToNetworkWatcherOutput() NetworkWatcherOutput { return i.ToNetworkWatcherOutputWithContext(context.Background()) } func (i *NetworkWatcher) ToNetworkWatcherOutputWithContext(ctx context.Context) NetworkWatcherOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkWatcherOutput) } // NetworkWatcherArrayInput is an input type that accepts NetworkWatcherArray and NetworkWatcherArrayOutput values. // You can construct a concrete instance of `NetworkWatcherArrayInput` via: // // NetworkWatcherArray{ NetworkWatcherArgs{...} } type NetworkWatcherArrayInput interface { pulumi.Input ToNetworkWatcherArrayOutput() NetworkWatcherArrayOutput ToNetworkWatcherArrayOutputWithContext(context.Context) NetworkWatcherArrayOutput } type NetworkWatcherArray []NetworkWatcherInput func (NetworkWatcherArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkWatcher)(nil)).Elem() } func (i NetworkWatcherArray) ToNetworkWatcherArrayOutput() NetworkWatcherArrayOutput { return i.ToNetworkWatcherArrayOutputWithContext(context.Background()) } func (i NetworkWatcherArray) ToNetworkWatcherArrayOutputWithContext(ctx context.Context) NetworkWatcherArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkWatcherArrayOutput) } // NetworkWatcherMapInput is an input type that accepts NetworkWatcherMap and NetworkWatcherMapOutput values. // You can construct a concrete instance of `NetworkWatcherMapInput` via: // // NetworkWatcherMap{ "key": NetworkWatcherArgs{...} } type NetworkWatcherMapInput interface { pulumi.Input ToNetworkWatcherMapOutput() NetworkWatcherMapOutput ToNetworkWatcherMapOutputWithContext(context.Context) NetworkWatcherMapOutput } type NetworkWatcherMap map[string]NetworkWatcherInput func (NetworkWatcherMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkWatcher)(nil)).Elem() } func (i NetworkWatcherMap) ToNetworkWatcherMapOutput() NetworkWatcherMapOutput { return i.ToNetworkWatcherMapOutputWithContext(context.Background()) } func (i NetworkWatcherMap) ToNetworkWatcherMapOutputWithContext(ctx context.Context) NetworkWatcherMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkWatcherMapOutput) } type NetworkWatcherOutput struct{ *pulumi.OutputState } func (NetworkWatcherOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkWatcher)(nil)).Elem() } func (o NetworkWatcherOutput) ToNetworkWatcherOutput() NetworkWatcherOutput { return o } func (o NetworkWatcherOutput) ToNetworkWatcherOutputWithContext(ctx context.Context) NetworkWatcherOutput { return o } // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. func (o NetworkWatcherOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *NetworkWatcher) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name of the Network Watcher. Changing this forces a new resource to be created. func (o NetworkWatcherOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NetworkWatcher) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group in which to create the Network Watcher. Changing this forces a new resource to be created. func (o NetworkWatcherOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *NetworkWatcher) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o NetworkWatcherOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *NetworkWatcher) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type NetworkWatcherArrayOutput struct{ *pulumi.OutputState } func (NetworkWatcherArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkWatcher)(nil)).Elem() } func (o NetworkWatcherArrayOutput) ToNetworkWatcherArrayOutput() NetworkWatcherArrayOutput { return o } func (o NetworkWatcherArrayOutput) ToNetworkWatcherArrayOutputWithContext(ctx context.Context) NetworkWatcherArrayOutput { return o } func (o NetworkWatcherArrayOutput) Index(i pulumi.IntInput) NetworkWatcherOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkWatcher { return vs[0].([]*NetworkWatcher)[vs[1].(int)] }).(NetworkWatcherOutput) } type NetworkWatcherMapOutput struct{ *pulumi.OutputState } func (NetworkWatcherMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkWatcher)(nil)).Elem() } func (o NetworkWatcherMapOutput) ToNetworkWatcherMapOutput() NetworkWatcherMapOutput { return o } func (o NetworkWatcherMapOutput) ToNetworkWatcherMapOutputWithContext(ctx context.Context) NetworkWatcherMapOutput { return o } func (o NetworkWatcherMapOutput) MapIndex(k pulumi.StringInput) NetworkWatcherOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkWatcher { return vs[0].(map[string]*NetworkWatcher)[vs[1].(string)] }).(NetworkWatcherOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkWatcherInput)(nil)).Elem(), &NetworkWatcher{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkWatcherArrayInput)(nil)).Elem(), NetworkWatcherArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkWatcherMapInput)(nil)).Elem(), NetworkWatcherMap{}) pulumi.RegisterOutputType(NetworkWatcherOutput{}) pulumi.RegisterOutputType(NetworkWatcherArrayOutput{}) pulumi.RegisterOutputType(NetworkWatcherMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/virtualNetworkPeering.go
sdk/go/azure/network/virtualNetworkPeering.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a virtual network peering which allows resources to access other // resources in the linked virtual network. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("peeredvnets-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // example_1, err := network.NewVirtualNetwork(ctx, "example-1", &network.VirtualNetworkArgs{ // Name: pulumi.String("peternetwork1"), // ResourceGroupName: example.Name, // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.1.0/24"), // }, // Location: example.Location, // }) // if err != nil { // return err // } // example_2, err := network.NewVirtualNetwork(ctx, "example-2", &network.VirtualNetworkArgs{ // Name: pulumi.String("peternetwork2"), // ResourceGroupName: example.Name, // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // Location: example.Location, // }) // if err != nil { // return err // } // _, err = network.NewVirtualNetworkPeering(ctx, "example-1", &network.VirtualNetworkPeeringArgs{ // Name: pulumi.String("peer1to2"), // ResourceGroupName: example.Name, // VirtualNetworkName: example_1.Name, // RemoteVirtualNetworkId: example_2.ID(), // }) // if err != nil { // return err // } // _, err = network.NewVirtualNetworkPeering(ctx, "example-2", &network.VirtualNetworkPeeringArgs{ // Name: pulumi.String("peer2to1"), // ResourceGroupName: example.Name, // VirtualNetworkName: example_2.Name, // RemoteVirtualNetworkId: example_1.ID(), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Global Virtual Network Peering) // // ### Triggers) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi-std/sdk/go/std" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("peeredvnets-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // example_1, err := network.NewVirtualNetwork(ctx, "example-1", &network.VirtualNetworkArgs{ // Name: pulumi.String("peternetwork1"), // ResourceGroupName: example.Name, // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.1.0/24"), // }, // Location: example.Location, // }) // if err != nil { // return err // } // example_2, err := network.NewVirtualNetwork(ctx, "example-2", &network.VirtualNetworkArgs{ // Name: pulumi.String("peternetwork2"), // ResourceGroupName: example.Name, // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // Location: example.Location, // }) // if err != nil { // return err // } // invokeJoin, err := std.Join(ctx, &std.JoinArgs{ // Separator: ",", // Input: addressSpaces, // }, nil) // if err != nil { // return err // } // _, err = network.NewVirtualNetworkPeering(ctx, "example-1", &network.VirtualNetworkPeeringArgs{ // Name: pulumi.String("peer1to2"), // ResourceGroupName: example.Name, // VirtualNetworkName: example_1.Name, // RemoteVirtualNetworkId: example_2.ID(), // Triggers: pulumi.StringMap{ // "remote_address_space": pulumi.String(example_2.AddressSpaces.ApplyT(func(addressSpaces interface{}) (std.JoinResult, error) { // %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference)).(std.JoinResultOutput).ApplyT(func(invoke std.JoinResult) (*string, error) { // return invoke.Result, nil // }).(pulumi.StringPtrOutput)), // }, // }) // if err != nil { // return err // } // invokeJoin1, err := std.Join(ctx, &std.JoinArgs{ // Separator: ",", // Input: addressSpaces, // }, nil) // if err != nil { // return err // } // _, err = network.NewVirtualNetworkPeering(ctx, "example-2", &network.VirtualNetworkPeeringArgs{ // Name: pulumi.String("peer2to1"), // ResourceGroupName: example.Name, // VirtualNetworkName: example_2.Name, // RemoteVirtualNetworkId: example_1.ID(), // Triggers: pulumi.StringMap{ // "remote_address_space": pulumi.String(example_1.AddressSpaces.ApplyT(func(addressSpaces interface{}) (std.JoinResult, error) { // %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference)).(std.JoinResultOutput).ApplyT(func(invoke std.JoinResult) (*string, error) { // return invoke.Result, nil // }).(pulumi.StringPtrOutput)), // }, // }) // if err != nil { // return err // } // return nil // }) // } // ``` // // ## Note // // Virtual Network peerings cannot be created, updated or deleted concurrently. // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Virtual Network Peerings can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/virtualNetworkPeering:VirtualNetworkPeering examplePeering /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/virtualNetworks/myvnet1/virtualNetworkPeerings/myvnet1peering // ``` type VirtualNetworkPeering struct { pulumi.CustomResourceState // Controls if forwarded traffic from VMs in the remote virtual network is allowed. Defaults to `false`. AllowForwardedTraffic pulumi.BoolPtrOutput `pulumi:"allowForwardedTraffic"` // Controls gatewayLinks can be used in the remote virtual network’s link to the local virtual network. Defaults to `false`. AllowGatewayTransit pulumi.BoolPtrOutput `pulumi:"allowGatewayTransit"` // Controls if the traffic from the local virtual network can reach the remote virtual network. Defaults to `true`. AllowVirtualNetworkAccess pulumi.BoolPtrOutput `pulumi:"allowVirtualNetworkAccess"` // A list of local Subnet names that are Subnet peered with remote Virtual Network. LocalSubnetNames pulumi.StringArrayOutput `pulumi:"localSubnetNames"` // The name of the virtual network peering. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies whether only IPv6 address space is peered for Subnet peering. Changing this forces a new resource to be created. OnlyIpv6PeeringEnabled pulumi.BoolPtrOutput `pulumi:"onlyIpv6PeeringEnabled"` // Specifies whether complete Virtual Network address space is peered. Defaults to `true`. Changing this forces a new resource to be created. PeerCompleteVirtualNetworksEnabled pulumi.BoolPtrOutput `pulumi:"peerCompleteVirtualNetworksEnabled"` // A list of remote Subnet names from remote Virtual Network that are Subnet peered. RemoteSubnetNames pulumi.StringArrayOutput `pulumi:"remoteSubnetNames"` // The full Azure resource ID of the remote virtual network. Changing this forces a new resource to be created. RemoteVirtualNetworkId pulumi.StringOutput `pulumi:"remoteVirtualNetworkId"` // The name of the resource group in which to create the virtual network peering. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A mapping of key values pairs that can be used to sync network routes from the remote virtual network to the local virtual network. See the trigger example for an example on how to set it up. Triggers pulumi.StringMapOutput `pulumi:"triggers"` // Controls if remote gateways can be used on the local virtual network. If the flag is set to `true`, and `allowGatewayTransit` on the remote peering is also `true`, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to `true`. This flag cannot be set if virtual network already has a gateway. Defaults to `false`. // // > **Note:** `useRemoteGateways` must be set to `false` if using Global Virtual Network Peerings. UseRemoteGateways pulumi.BoolPtrOutput `pulumi:"useRemoteGateways"` // The name of the virtual network. Changing this forces a new resource to be created. VirtualNetworkName pulumi.StringOutput `pulumi:"virtualNetworkName"` } // NewVirtualNetworkPeering registers a new resource with the given unique name, arguments, and options. func NewVirtualNetworkPeering(ctx *pulumi.Context, name string, args *VirtualNetworkPeeringArgs, opts ...pulumi.ResourceOption) (*VirtualNetworkPeering, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.RemoteVirtualNetworkId == nil { return nil, errors.New("invalid value for required argument 'RemoteVirtualNetworkId'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.VirtualNetworkName == nil { return nil, errors.New("invalid value for required argument 'VirtualNetworkName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource VirtualNetworkPeering err := ctx.RegisterResource("azure:network/virtualNetworkPeering:VirtualNetworkPeering", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVirtualNetworkPeering gets an existing VirtualNetworkPeering resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetVirtualNetworkPeering(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VirtualNetworkPeeringState, opts ...pulumi.ResourceOption) (*VirtualNetworkPeering, error) { var resource VirtualNetworkPeering err := ctx.ReadResource("azure:network/virtualNetworkPeering:VirtualNetworkPeering", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VirtualNetworkPeering resources. type virtualNetworkPeeringState struct { // Controls if forwarded traffic from VMs in the remote virtual network is allowed. Defaults to `false`. AllowForwardedTraffic *bool `pulumi:"allowForwardedTraffic"` // Controls gatewayLinks can be used in the remote virtual network’s link to the local virtual network. Defaults to `false`. AllowGatewayTransit *bool `pulumi:"allowGatewayTransit"` // Controls if the traffic from the local virtual network can reach the remote virtual network. Defaults to `true`. AllowVirtualNetworkAccess *bool `pulumi:"allowVirtualNetworkAccess"` // A list of local Subnet names that are Subnet peered with remote Virtual Network. LocalSubnetNames []string `pulumi:"localSubnetNames"` // The name of the virtual network peering. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies whether only IPv6 address space is peered for Subnet peering. Changing this forces a new resource to be created. OnlyIpv6PeeringEnabled *bool `pulumi:"onlyIpv6PeeringEnabled"` // Specifies whether complete Virtual Network address space is peered. Defaults to `true`. Changing this forces a new resource to be created. PeerCompleteVirtualNetworksEnabled *bool `pulumi:"peerCompleteVirtualNetworksEnabled"` // A list of remote Subnet names from remote Virtual Network that are Subnet peered. RemoteSubnetNames []string `pulumi:"remoteSubnetNames"` // The full Azure resource ID of the remote virtual network. Changing this forces a new resource to be created. RemoteVirtualNetworkId *string `pulumi:"remoteVirtualNetworkId"` // The name of the resource group in which to create the virtual network peering. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A mapping of key values pairs that can be used to sync network routes from the remote virtual network to the local virtual network. See the trigger example for an example on how to set it up. Triggers map[string]string `pulumi:"triggers"` // Controls if remote gateways can be used on the local virtual network. If the flag is set to `true`, and `allowGatewayTransit` on the remote peering is also `true`, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to `true`. This flag cannot be set if virtual network already has a gateway. Defaults to `false`. // // > **Note:** `useRemoteGateways` must be set to `false` if using Global Virtual Network Peerings. UseRemoteGateways *bool `pulumi:"useRemoteGateways"` // The name of the virtual network. Changing this forces a new resource to be created. VirtualNetworkName *string `pulumi:"virtualNetworkName"` } type VirtualNetworkPeeringState struct { // Controls if forwarded traffic from VMs in the remote virtual network is allowed. Defaults to `false`. AllowForwardedTraffic pulumi.BoolPtrInput // Controls gatewayLinks can be used in the remote virtual network’s link to the local virtual network. Defaults to `false`. AllowGatewayTransit pulumi.BoolPtrInput // Controls if the traffic from the local virtual network can reach the remote virtual network. Defaults to `true`. AllowVirtualNetworkAccess pulumi.BoolPtrInput // A list of local Subnet names that are Subnet peered with remote Virtual Network. LocalSubnetNames pulumi.StringArrayInput // The name of the virtual network peering. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies whether only IPv6 address space is peered for Subnet peering. Changing this forces a new resource to be created. OnlyIpv6PeeringEnabled pulumi.BoolPtrInput // Specifies whether complete Virtual Network address space is peered. Defaults to `true`. Changing this forces a new resource to be created. PeerCompleteVirtualNetworksEnabled pulumi.BoolPtrInput // A list of remote Subnet names from remote Virtual Network that are Subnet peered. RemoteSubnetNames pulumi.StringArrayInput // The full Azure resource ID of the remote virtual network. Changing this forces a new resource to be created. RemoteVirtualNetworkId pulumi.StringPtrInput // The name of the resource group in which to create the virtual network peering. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of key values pairs that can be used to sync network routes from the remote virtual network to the local virtual network. See the trigger example for an example on how to set it up. Triggers pulumi.StringMapInput // Controls if remote gateways can be used on the local virtual network. If the flag is set to `true`, and `allowGatewayTransit` on the remote peering is also `true`, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to `true`. This flag cannot be set if virtual network already has a gateway. Defaults to `false`. // // > **Note:** `useRemoteGateways` must be set to `false` if using Global Virtual Network Peerings. UseRemoteGateways pulumi.BoolPtrInput // The name of the virtual network. Changing this forces a new resource to be created. VirtualNetworkName pulumi.StringPtrInput } func (VirtualNetworkPeeringState) ElementType() reflect.Type { return reflect.TypeOf((*virtualNetworkPeeringState)(nil)).Elem() } type virtualNetworkPeeringArgs struct { // Controls if forwarded traffic from VMs in the remote virtual network is allowed. Defaults to `false`. AllowForwardedTraffic *bool `pulumi:"allowForwardedTraffic"` // Controls gatewayLinks can be used in the remote virtual network’s link to the local virtual network. Defaults to `false`. AllowGatewayTransit *bool `pulumi:"allowGatewayTransit"` // Controls if the traffic from the local virtual network can reach the remote virtual network. Defaults to `true`. AllowVirtualNetworkAccess *bool `pulumi:"allowVirtualNetworkAccess"` // A list of local Subnet names that are Subnet peered with remote Virtual Network. LocalSubnetNames []string `pulumi:"localSubnetNames"` // The name of the virtual network peering. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies whether only IPv6 address space is peered for Subnet peering. Changing this forces a new resource to be created. OnlyIpv6PeeringEnabled *bool `pulumi:"onlyIpv6PeeringEnabled"` // Specifies whether complete Virtual Network address space is peered. Defaults to `true`. Changing this forces a new resource to be created. PeerCompleteVirtualNetworksEnabled *bool `pulumi:"peerCompleteVirtualNetworksEnabled"` // A list of remote Subnet names from remote Virtual Network that are Subnet peered. RemoteSubnetNames []string `pulumi:"remoteSubnetNames"` // The full Azure resource ID of the remote virtual network. Changing this forces a new resource to be created. RemoteVirtualNetworkId string `pulumi:"remoteVirtualNetworkId"` // The name of the resource group in which to create the virtual network peering. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of key values pairs that can be used to sync network routes from the remote virtual network to the local virtual network. See the trigger example for an example on how to set it up. Triggers map[string]string `pulumi:"triggers"` // Controls if remote gateways can be used on the local virtual network. If the flag is set to `true`, and `allowGatewayTransit` on the remote peering is also `true`, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to `true`. This flag cannot be set if virtual network already has a gateway. Defaults to `false`. // // > **Note:** `useRemoteGateways` must be set to `false` if using Global Virtual Network Peerings. UseRemoteGateways *bool `pulumi:"useRemoteGateways"` // The name of the virtual network. Changing this forces a new resource to be created. VirtualNetworkName string `pulumi:"virtualNetworkName"` } // The set of arguments for constructing a VirtualNetworkPeering resource. type VirtualNetworkPeeringArgs struct { // Controls if forwarded traffic from VMs in the remote virtual network is allowed. Defaults to `false`. AllowForwardedTraffic pulumi.BoolPtrInput // Controls gatewayLinks can be used in the remote virtual network’s link to the local virtual network. Defaults to `false`. AllowGatewayTransit pulumi.BoolPtrInput // Controls if the traffic from the local virtual network can reach the remote virtual network. Defaults to `true`. AllowVirtualNetworkAccess pulumi.BoolPtrInput // A list of local Subnet names that are Subnet peered with remote Virtual Network. LocalSubnetNames pulumi.StringArrayInput // The name of the virtual network peering. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies whether only IPv6 address space is peered for Subnet peering. Changing this forces a new resource to be created. OnlyIpv6PeeringEnabled pulumi.BoolPtrInput // Specifies whether complete Virtual Network address space is peered. Defaults to `true`. Changing this forces a new resource to be created. PeerCompleteVirtualNetworksEnabled pulumi.BoolPtrInput // A list of remote Subnet names from remote Virtual Network that are Subnet peered. RemoteSubnetNames pulumi.StringArrayInput // The full Azure resource ID of the remote virtual network. Changing this forces a new resource to be created. RemoteVirtualNetworkId pulumi.StringInput // The name of the resource group in which to create the virtual network peering. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of key values pairs that can be used to sync network routes from the remote virtual network to the local virtual network. See the trigger example for an example on how to set it up. Triggers pulumi.StringMapInput // Controls if remote gateways can be used on the local virtual network. If the flag is set to `true`, and `allowGatewayTransit` on the remote peering is also `true`, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to `true`. This flag cannot be set if virtual network already has a gateway. Defaults to `false`. // // > **Note:** `useRemoteGateways` must be set to `false` if using Global Virtual Network Peerings. UseRemoteGateways pulumi.BoolPtrInput // The name of the virtual network. Changing this forces a new resource to be created. VirtualNetworkName pulumi.StringInput } func (VirtualNetworkPeeringArgs) ElementType() reflect.Type { return reflect.TypeOf((*virtualNetworkPeeringArgs)(nil)).Elem() } type VirtualNetworkPeeringInput interface { pulumi.Input ToVirtualNetworkPeeringOutput() VirtualNetworkPeeringOutput ToVirtualNetworkPeeringOutputWithContext(ctx context.Context) VirtualNetworkPeeringOutput } func (*VirtualNetworkPeering) ElementType() reflect.Type { return reflect.TypeOf((**VirtualNetworkPeering)(nil)).Elem() } func (i *VirtualNetworkPeering) ToVirtualNetworkPeeringOutput() VirtualNetworkPeeringOutput { return i.ToVirtualNetworkPeeringOutputWithContext(context.Background()) } func (i *VirtualNetworkPeering) ToVirtualNetworkPeeringOutputWithContext(ctx context.Context) VirtualNetworkPeeringOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualNetworkPeeringOutput) } // VirtualNetworkPeeringArrayInput is an input type that accepts VirtualNetworkPeeringArray and VirtualNetworkPeeringArrayOutput values. // You can construct a concrete instance of `VirtualNetworkPeeringArrayInput` via: // // VirtualNetworkPeeringArray{ VirtualNetworkPeeringArgs{...} } type VirtualNetworkPeeringArrayInput interface { pulumi.Input ToVirtualNetworkPeeringArrayOutput() VirtualNetworkPeeringArrayOutput ToVirtualNetworkPeeringArrayOutputWithContext(context.Context) VirtualNetworkPeeringArrayOutput } type VirtualNetworkPeeringArray []VirtualNetworkPeeringInput func (VirtualNetworkPeeringArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualNetworkPeering)(nil)).Elem() } func (i VirtualNetworkPeeringArray) ToVirtualNetworkPeeringArrayOutput() VirtualNetworkPeeringArrayOutput { return i.ToVirtualNetworkPeeringArrayOutputWithContext(context.Background()) } func (i VirtualNetworkPeeringArray) ToVirtualNetworkPeeringArrayOutputWithContext(ctx context.Context) VirtualNetworkPeeringArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualNetworkPeeringArrayOutput) } // VirtualNetworkPeeringMapInput is an input type that accepts VirtualNetworkPeeringMap and VirtualNetworkPeeringMapOutput values. // You can construct a concrete instance of `VirtualNetworkPeeringMapInput` via: // // VirtualNetworkPeeringMap{ "key": VirtualNetworkPeeringArgs{...} } type VirtualNetworkPeeringMapInput interface { pulumi.Input ToVirtualNetworkPeeringMapOutput() VirtualNetworkPeeringMapOutput ToVirtualNetworkPeeringMapOutputWithContext(context.Context) VirtualNetworkPeeringMapOutput } type VirtualNetworkPeeringMap map[string]VirtualNetworkPeeringInput func (VirtualNetworkPeeringMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualNetworkPeering)(nil)).Elem() } func (i VirtualNetworkPeeringMap) ToVirtualNetworkPeeringMapOutput() VirtualNetworkPeeringMapOutput { return i.ToVirtualNetworkPeeringMapOutputWithContext(context.Background()) } func (i VirtualNetworkPeeringMap) ToVirtualNetworkPeeringMapOutputWithContext(ctx context.Context) VirtualNetworkPeeringMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualNetworkPeeringMapOutput) } type VirtualNetworkPeeringOutput struct{ *pulumi.OutputState } func (VirtualNetworkPeeringOutput) ElementType() reflect.Type { return reflect.TypeOf((**VirtualNetworkPeering)(nil)).Elem() } func (o VirtualNetworkPeeringOutput) ToVirtualNetworkPeeringOutput() VirtualNetworkPeeringOutput { return o } func (o VirtualNetworkPeeringOutput) ToVirtualNetworkPeeringOutputWithContext(ctx context.Context) VirtualNetworkPeeringOutput { return o } // Controls if forwarded traffic from VMs in the remote virtual network is allowed. Defaults to `false`. func (o VirtualNetworkPeeringOutput) AllowForwardedTraffic() pulumi.BoolPtrOutput { return o.ApplyT(func(v *VirtualNetworkPeering) pulumi.BoolPtrOutput { return v.AllowForwardedTraffic }).(pulumi.BoolPtrOutput) } // Controls gatewayLinks can be used in the remote virtual network’s link to the local virtual network. Defaults to `false`. func (o VirtualNetworkPeeringOutput) AllowGatewayTransit() pulumi.BoolPtrOutput { return o.ApplyT(func(v *VirtualNetworkPeering) pulumi.BoolPtrOutput { return v.AllowGatewayTransit }).(pulumi.BoolPtrOutput) } // Controls if the traffic from the local virtual network can reach the remote virtual network. Defaults to `true`. func (o VirtualNetworkPeeringOutput) AllowVirtualNetworkAccess() pulumi.BoolPtrOutput { return o.ApplyT(func(v *VirtualNetworkPeering) pulumi.BoolPtrOutput { return v.AllowVirtualNetworkAccess }).(pulumi.BoolPtrOutput) } // A list of local Subnet names that are Subnet peered with remote Virtual Network. func (o VirtualNetworkPeeringOutput) LocalSubnetNames() pulumi.StringArrayOutput { return o.ApplyT(func(v *VirtualNetworkPeering) pulumi.StringArrayOutput { return v.LocalSubnetNames }).(pulumi.StringArrayOutput) } // The name of the virtual network peering. Changing this forces a new resource to be created. func (o VirtualNetworkPeeringOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *VirtualNetworkPeering) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies whether only IPv6 address space is peered for Subnet peering. Changing this forces a new resource to be created. func (o VirtualNetworkPeeringOutput) OnlyIpv6PeeringEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *VirtualNetworkPeering) pulumi.BoolPtrOutput { return v.OnlyIpv6PeeringEnabled }).(pulumi.BoolPtrOutput) } // Specifies whether complete Virtual Network address space is peered. Defaults to `true`. Changing this forces a new resource to be created. func (o VirtualNetworkPeeringOutput) PeerCompleteVirtualNetworksEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *VirtualNetworkPeering) pulumi.BoolPtrOutput { return v.PeerCompleteVirtualNetworksEnabled }).(pulumi.BoolPtrOutput) } // A list of remote Subnet names from remote Virtual Network that are Subnet peered. func (o VirtualNetworkPeeringOutput) RemoteSubnetNames() pulumi.StringArrayOutput { return o.ApplyT(func(v *VirtualNetworkPeering) pulumi.StringArrayOutput { return v.RemoteSubnetNames }).(pulumi.StringArrayOutput) } // The full Azure resource ID of the remote virtual network. Changing this forces a new resource to be created. func (o VirtualNetworkPeeringOutput) RemoteVirtualNetworkId() pulumi.StringOutput { return o.ApplyT(func(v *VirtualNetworkPeering) pulumi.StringOutput { return v.RemoteVirtualNetworkId }).(pulumi.StringOutput) } // The name of the resource group in which to create the virtual network peering. Changing this forces a new resource to be created. func (o VirtualNetworkPeeringOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *VirtualNetworkPeering) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of key values pairs that can be used to sync network routes from the remote virtual network to the local virtual network. See the trigger example for an example on how to set it up. func (o VirtualNetworkPeeringOutput) Triggers() pulumi.StringMapOutput { return o.ApplyT(func(v *VirtualNetworkPeering) pulumi.StringMapOutput { return v.Triggers }).(pulumi.StringMapOutput) } // Controls if remote gateways can be used on the local virtual network. If the flag is set to `true`, and `allowGatewayTransit` on the remote peering is also `true`, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to `true`. This flag cannot be set if virtual network already has a gateway. Defaults to `false`. // // > **Note:** `useRemoteGateways` must be set to `false` if using Global Virtual Network Peerings. func (o VirtualNetworkPeeringOutput) UseRemoteGateways() pulumi.BoolPtrOutput { return o.ApplyT(func(v *VirtualNetworkPeering) pulumi.BoolPtrOutput { return v.UseRemoteGateways }).(pulumi.BoolPtrOutput) } // The name of the virtual network. Changing this forces a new resource to be created. func (o VirtualNetworkPeeringOutput) VirtualNetworkName() pulumi.StringOutput { return o.ApplyT(func(v *VirtualNetworkPeering) pulumi.StringOutput { return v.VirtualNetworkName }).(pulumi.StringOutput) } type VirtualNetworkPeeringArrayOutput struct{ *pulumi.OutputState } func (VirtualNetworkPeeringArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualNetworkPeering)(nil)).Elem() } func (o VirtualNetworkPeeringArrayOutput) ToVirtualNetworkPeeringArrayOutput() VirtualNetworkPeeringArrayOutput { return o } func (o VirtualNetworkPeeringArrayOutput) ToVirtualNetworkPeeringArrayOutputWithContext(ctx context.Context) VirtualNetworkPeeringArrayOutput { return o } func (o VirtualNetworkPeeringArrayOutput) Index(i pulumi.IntInput) VirtualNetworkPeeringOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VirtualNetworkPeering { return vs[0].([]*VirtualNetworkPeering)[vs[1].(int)] }).(VirtualNetworkPeeringOutput) } type VirtualNetworkPeeringMapOutput struct{ *pulumi.OutputState } func (VirtualNetworkPeeringMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualNetworkPeering)(nil)).Elem() } func (o VirtualNetworkPeeringMapOutput) ToVirtualNetworkPeeringMapOutput() VirtualNetworkPeeringMapOutput { return o } func (o VirtualNetworkPeeringMapOutput) ToVirtualNetworkPeeringMapOutputWithContext(ctx context.Context) VirtualNetworkPeeringMapOutput { return o } func (o VirtualNetworkPeeringMapOutput) MapIndex(k pulumi.StringInput) VirtualNetworkPeeringOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VirtualNetworkPeering { return vs[0].(map[string]*VirtualNetworkPeering)[vs[1].(string)] }).(VirtualNetworkPeeringOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VirtualNetworkPeeringInput)(nil)).Elem(), &VirtualNetworkPeering{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualNetworkPeeringArrayInput)(nil)).Elem(), VirtualNetworkPeeringArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualNetworkPeeringMapInput)(nil)).Elem(), VirtualNetworkPeeringMap{}) pulumi.RegisterOutputType(VirtualNetworkPeeringOutput{}) pulumi.RegisterOutputType(VirtualNetworkPeeringArrayOutput{}) pulumi.RegisterOutputType(VirtualNetworkPeeringMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/expressRouteGateway.go
sdk/go/azure/network/expressRouteGateway.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an ExpressRoute gateway. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualWan, err := network.NewVirtualWan(ctx, "example", &network.VirtualWanArgs{ // Name: pulumi.String("example-virtualwan"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // exampleVirtualHub, err := network.NewVirtualHub(ctx, "example", &network.VirtualHubArgs{ // Name: pulumi.String("example-virtualhub"), // ResourceGroupName: example.Name, // Location: example.Location, // VirtualWanId: exampleVirtualWan.ID(), // AddressPrefix: pulumi.String("10.0.1.0/24"), // }) // if err != nil { // return err // } // _, err = network.NewExpressRouteGateway(ctx, "example", &network.ExpressRouteGatewayArgs{ // Name: pulumi.String("expressRoute1"), // ResourceGroupName: example.Name, // Location: example.Location, // VirtualHubId: exampleVirtualHub.ID(), // ScaleUnits: pulumi.Int(1), // Tags: pulumi.StringMap{ // "environment": pulumi.String("Production"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // ExpressRoute Gateways can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/expressRouteGateway:ExpressRouteGateway example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/expressRouteGateways/myExpressRouteGateway // ``` type ExpressRouteGateway struct { pulumi.CustomResourceState // Specified whether this gateway accept traffic from non-Virtual WAN networks. Defaults to `false`. AllowNonVirtualWanTraffic pulumi.BoolPtrOutput `pulumi:"allowNonVirtualWanTraffic"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the ExpressRoute gateway. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the resource group in which to create the ExpressRoute gateway. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The number of scale units with which to provision the ExpressRoute gateway. Each scale unit is equal to 2Gbps, with support for up to 10 scale units (20Gbps). ScaleUnits pulumi.IntOutput `pulumi:"scaleUnits"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // The ID of a Virtual HUB within which the ExpressRoute gateway should be created. Changing this forces a new resource to be created. VirtualHubId pulumi.StringOutput `pulumi:"virtualHubId"` } // NewExpressRouteGateway registers a new resource with the given unique name, arguments, and options. func NewExpressRouteGateway(ctx *pulumi.Context, name string, args *ExpressRouteGatewayArgs, opts ...pulumi.ResourceOption) (*ExpressRouteGateway, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.ScaleUnits == nil { return nil, errors.New("invalid value for required argument 'ScaleUnits'") } if args.VirtualHubId == nil { return nil, errors.New("invalid value for required argument 'VirtualHubId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ExpressRouteGateway err := ctx.RegisterResource("azure:network/expressRouteGateway:ExpressRouteGateway", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetExpressRouteGateway gets an existing ExpressRouteGateway resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetExpressRouteGateway(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ExpressRouteGatewayState, opts ...pulumi.ResourceOption) (*ExpressRouteGateway, error) { var resource ExpressRouteGateway err := ctx.ReadResource("azure:network/expressRouteGateway:ExpressRouteGateway", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ExpressRouteGateway resources. type expressRouteGatewayState struct { // Specified whether this gateway accept traffic from non-Virtual WAN networks. Defaults to `false`. AllowNonVirtualWanTraffic *bool `pulumi:"allowNonVirtualWanTraffic"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the ExpressRoute gateway. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the ExpressRoute gateway. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The number of scale units with which to provision the ExpressRoute gateway. Each scale unit is equal to 2Gbps, with support for up to 10 scale units (20Gbps). ScaleUnits *int `pulumi:"scaleUnits"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // The ID of a Virtual HUB within which the ExpressRoute gateway should be created. Changing this forces a new resource to be created. VirtualHubId *string `pulumi:"virtualHubId"` } type ExpressRouteGatewayState struct { // Specified whether this gateway accept traffic from non-Virtual WAN networks. Defaults to `false`. AllowNonVirtualWanTraffic pulumi.BoolPtrInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the ExpressRoute gateway. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the ExpressRoute gateway. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The number of scale units with which to provision the ExpressRoute gateway. Each scale unit is equal to 2Gbps, with support for up to 10 scale units (20Gbps). ScaleUnits pulumi.IntPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The ID of a Virtual HUB within which the ExpressRoute gateway should be created. Changing this forces a new resource to be created. VirtualHubId pulumi.StringPtrInput } func (ExpressRouteGatewayState) ElementType() reflect.Type { return reflect.TypeOf((*expressRouteGatewayState)(nil)).Elem() } type expressRouteGatewayArgs struct { // Specified whether this gateway accept traffic from non-Virtual WAN networks. Defaults to `false`. AllowNonVirtualWanTraffic *bool `pulumi:"allowNonVirtualWanTraffic"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the ExpressRoute gateway. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the ExpressRoute gateway. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The number of scale units with which to provision the ExpressRoute gateway. Each scale unit is equal to 2Gbps, with support for up to 10 scale units (20Gbps). ScaleUnits int `pulumi:"scaleUnits"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // The ID of a Virtual HUB within which the ExpressRoute gateway should be created. Changing this forces a new resource to be created. VirtualHubId string `pulumi:"virtualHubId"` } // The set of arguments for constructing a ExpressRouteGateway resource. type ExpressRouteGatewayArgs struct { // Specified whether this gateway accept traffic from non-Virtual WAN networks. Defaults to `false`. AllowNonVirtualWanTraffic pulumi.BoolPtrInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the ExpressRoute gateway. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the ExpressRoute gateway. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The number of scale units with which to provision the ExpressRoute gateway. Each scale unit is equal to 2Gbps, with support for up to 10 scale units (20Gbps). ScaleUnits pulumi.IntInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The ID of a Virtual HUB within which the ExpressRoute gateway should be created. Changing this forces a new resource to be created. VirtualHubId pulumi.StringInput } func (ExpressRouteGatewayArgs) ElementType() reflect.Type { return reflect.TypeOf((*expressRouteGatewayArgs)(nil)).Elem() } type ExpressRouteGatewayInput interface { pulumi.Input ToExpressRouteGatewayOutput() ExpressRouteGatewayOutput ToExpressRouteGatewayOutputWithContext(ctx context.Context) ExpressRouteGatewayOutput } func (*ExpressRouteGateway) ElementType() reflect.Type { return reflect.TypeOf((**ExpressRouteGateway)(nil)).Elem() } func (i *ExpressRouteGateway) ToExpressRouteGatewayOutput() ExpressRouteGatewayOutput { return i.ToExpressRouteGatewayOutputWithContext(context.Background()) } func (i *ExpressRouteGateway) ToExpressRouteGatewayOutputWithContext(ctx context.Context) ExpressRouteGatewayOutput { return pulumi.ToOutputWithContext(ctx, i).(ExpressRouteGatewayOutput) } // ExpressRouteGatewayArrayInput is an input type that accepts ExpressRouteGatewayArray and ExpressRouteGatewayArrayOutput values. // You can construct a concrete instance of `ExpressRouteGatewayArrayInput` via: // // ExpressRouteGatewayArray{ ExpressRouteGatewayArgs{...} } type ExpressRouteGatewayArrayInput interface { pulumi.Input ToExpressRouteGatewayArrayOutput() ExpressRouteGatewayArrayOutput ToExpressRouteGatewayArrayOutputWithContext(context.Context) ExpressRouteGatewayArrayOutput } type ExpressRouteGatewayArray []ExpressRouteGatewayInput func (ExpressRouteGatewayArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ExpressRouteGateway)(nil)).Elem() } func (i ExpressRouteGatewayArray) ToExpressRouteGatewayArrayOutput() ExpressRouteGatewayArrayOutput { return i.ToExpressRouteGatewayArrayOutputWithContext(context.Background()) } func (i ExpressRouteGatewayArray) ToExpressRouteGatewayArrayOutputWithContext(ctx context.Context) ExpressRouteGatewayArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ExpressRouteGatewayArrayOutput) } // ExpressRouteGatewayMapInput is an input type that accepts ExpressRouteGatewayMap and ExpressRouteGatewayMapOutput values. // You can construct a concrete instance of `ExpressRouteGatewayMapInput` via: // // ExpressRouteGatewayMap{ "key": ExpressRouteGatewayArgs{...} } type ExpressRouteGatewayMapInput interface { pulumi.Input ToExpressRouteGatewayMapOutput() ExpressRouteGatewayMapOutput ToExpressRouteGatewayMapOutputWithContext(context.Context) ExpressRouteGatewayMapOutput } type ExpressRouteGatewayMap map[string]ExpressRouteGatewayInput func (ExpressRouteGatewayMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ExpressRouteGateway)(nil)).Elem() } func (i ExpressRouteGatewayMap) ToExpressRouteGatewayMapOutput() ExpressRouteGatewayMapOutput { return i.ToExpressRouteGatewayMapOutputWithContext(context.Background()) } func (i ExpressRouteGatewayMap) ToExpressRouteGatewayMapOutputWithContext(ctx context.Context) ExpressRouteGatewayMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ExpressRouteGatewayMapOutput) } type ExpressRouteGatewayOutput struct{ *pulumi.OutputState } func (ExpressRouteGatewayOutput) ElementType() reflect.Type { return reflect.TypeOf((**ExpressRouteGateway)(nil)).Elem() } func (o ExpressRouteGatewayOutput) ToExpressRouteGatewayOutput() ExpressRouteGatewayOutput { return o } func (o ExpressRouteGatewayOutput) ToExpressRouteGatewayOutputWithContext(ctx context.Context) ExpressRouteGatewayOutput { return o } // Specified whether this gateway accept traffic from non-Virtual WAN networks. Defaults to `false`. func (o ExpressRouteGatewayOutput) AllowNonVirtualWanTraffic() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ExpressRouteGateway) pulumi.BoolPtrOutput { return v.AllowNonVirtualWanTraffic }).(pulumi.BoolPtrOutput) } // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. func (o ExpressRouteGatewayOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteGateway) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name of the ExpressRoute gateway. Changing this forces a new resource to be created. func (o ExpressRouteGatewayOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteGateway) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group in which to create the ExpressRoute gateway. Changing this forces a new resource to be created. func (o ExpressRouteGatewayOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteGateway) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The number of scale units with which to provision the ExpressRoute gateway. Each scale unit is equal to 2Gbps, with support for up to 10 scale units (20Gbps). func (o ExpressRouteGatewayOutput) ScaleUnits() pulumi.IntOutput { return o.ApplyT(func(v *ExpressRouteGateway) pulumi.IntOutput { return v.ScaleUnits }).(pulumi.IntOutput) } // A mapping of tags to assign to the resource. func (o ExpressRouteGatewayOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *ExpressRouteGateway) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The ID of a Virtual HUB within which the ExpressRoute gateway should be created. Changing this forces a new resource to be created. func (o ExpressRouteGatewayOutput) VirtualHubId() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteGateway) pulumi.StringOutput { return v.VirtualHubId }).(pulumi.StringOutput) } type ExpressRouteGatewayArrayOutput struct{ *pulumi.OutputState } func (ExpressRouteGatewayArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ExpressRouteGateway)(nil)).Elem() } func (o ExpressRouteGatewayArrayOutput) ToExpressRouteGatewayArrayOutput() ExpressRouteGatewayArrayOutput { return o } func (o ExpressRouteGatewayArrayOutput) ToExpressRouteGatewayArrayOutputWithContext(ctx context.Context) ExpressRouteGatewayArrayOutput { return o } func (o ExpressRouteGatewayArrayOutput) Index(i pulumi.IntInput) ExpressRouteGatewayOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ExpressRouteGateway { return vs[0].([]*ExpressRouteGateway)[vs[1].(int)] }).(ExpressRouteGatewayOutput) } type ExpressRouteGatewayMapOutput struct{ *pulumi.OutputState } func (ExpressRouteGatewayMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ExpressRouteGateway)(nil)).Elem() } func (o ExpressRouteGatewayMapOutput) ToExpressRouteGatewayMapOutput() ExpressRouteGatewayMapOutput { return o } func (o ExpressRouteGatewayMapOutput) ToExpressRouteGatewayMapOutputWithContext(ctx context.Context) ExpressRouteGatewayMapOutput { return o } func (o ExpressRouteGatewayMapOutput) MapIndex(k pulumi.StringInput) ExpressRouteGatewayOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ExpressRouteGateway { return vs[0].(map[string]*ExpressRouteGateway)[vs[1].(string)] }).(ExpressRouteGatewayOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ExpressRouteGatewayInput)(nil)).Elem(), &ExpressRouteGateway{}) pulumi.RegisterInputType(reflect.TypeOf((*ExpressRouteGatewayArrayInput)(nil)).Elem(), ExpressRouteGatewayArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ExpressRouteGatewayMapInput)(nil)).Elem(), ExpressRouteGatewayMap{}) pulumi.RegisterOutputType(ExpressRouteGatewayOutput{}) pulumi.RegisterOutputType(ExpressRouteGatewayArrayOutput{}) pulumi.RegisterOutputType(ExpressRouteGatewayMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getPublicIpPrefix.go
sdk/go/azure/network/getPublicIpPrefix.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Public IP Prefix. // // ## Example Usage // // ### Reference An Existing) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.LookupPublicIpPrefix(ctx, &network.LookupPublicIpPrefixArgs{ // Name: "name_of_public_ip", // ResourceGroupName: "name_of_resource_group", // }, nil) // if err != nil { // return err // } // ctx.Export("publicIpPrefix", example.IpPrefix) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func LookupPublicIpPrefix(ctx *pulumi.Context, args *LookupPublicIpPrefixArgs, opts ...pulumi.InvokeOption) (*LookupPublicIpPrefixResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupPublicIpPrefixResult err := ctx.Invoke("azure:network/getPublicIpPrefix:getPublicIpPrefix", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getPublicIpPrefix. type LookupPublicIpPrefixArgs struct { // Specifies the name of the public IP prefix. Name string `pulumi:"name"` // Specifies the name of the resource group. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getPublicIpPrefix. type LookupPublicIpPrefixResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The Public IP address range, in CIDR notation. IpPrefix string `pulumi:"ipPrefix"` // The supported Azure location where the resource exists. Location string `pulumi:"location"` Name string `pulumi:"name"` // The number of bits of the prefix. PrefixLength int `pulumi:"prefixLength"` ResourceGroupName string `pulumi:"resourceGroupName"` // The SKU of the Public IP Prefix. Sku string `pulumi:"sku"` // The SKU Tier of the Public IP. SkuTier string `pulumi:"skuTier"` // A mapping of tags to assigned to the resource. Tags map[string]string `pulumi:"tags"` // A list of Availability Zones in which this Public IP Prefix is located. Zones []string `pulumi:"zones"` } func LookupPublicIpPrefixOutput(ctx *pulumi.Context, args LookupPublicIpPrefixOutputArgs, opts ...pulumi.InvokeOption) LookupPublicIpPrefixResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupPublicIpPrefixResultOutput, error) { args := v.(LookupPublicIpPrefixArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getPublicIpPrefix:getPublicIpPrefix", args, LookupPublicIpPrefixResultOutput{}, options).(LookupPublicIpPrefixResultOutput), nil }).(LookupPublicIpPrefixResultOutput) } // A collection of arguments for invoking getPublicIpPrefix. type LookupPublicIpPrefixOutputArgs struct { // Specifies the name of the public IP prefix. Name pulumi.StringInput `pulumi:"name"` // Specifies the name of the resource group. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupPublicIpPrefixOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupPublicIpPrefixArgs)(nil)).Elem() } // A collection of values returned by getPublicIpPrefix. type LookupPublicIpPrefixResultOutput struct{ *pulumi.OutputState } func (LookupPublicIpPrefixResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupPublicIpPrefixResult)(nil)).Elem() } func (o LookupPublicIpPrefixResultOutput) ToLookupPublicIpPrefixResultOutput() LookupPublicIpPrefixResultOutput { return o } func (o LookupPublicIpPrefixResultOutput) ToLookupPublicIpPrefixResultOutputWithContext(ctx context.Context) LookupPublicIpPrefixResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o LookupPublicIpPrefixResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupPublicIpPrefixResult) string { return v.Id }).(pulumi.StringOutput) } // The Public IP address range, in CIDR notation. func (o LookupPublicIpPrefixResultOutput) IpPrefix() pulumi.StringOutput { return o.ApplyT(func(v LookupPublicIpPrefixResult) string { return v.IpPrefix }).(pulumi.StringOutput) } // The supported Azure location where the resource exists. func (o LookupPublicIpPrefixResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupPublicIpPrefixResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupPublicIpPrefixResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupPublicIpPrefixResult) string { return v.Name }).(pulumi.StringOutput) } // The number of bits of the prefix. func (o LookupPublicIpPrefixResultOutput) PrefixLength() pulumi.IntOutput { return o.ApplyT(func(v LookupPublicIpPrefixResult) int { return v.PrefixLength }).(pulumi.IntOutput) } func (o LookupPublicIpPrefixResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupPublicIpPrefixResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // The SKU of the Public IP Prefix. func (o LookupPublicIpPrefixResultOutput) Sku() pulumi.StringOutput { return o.ApplyT(func(v LookupPublicIpPrefixResult) string { return v.Sku }).(pulumi.StringOutput) } // The SKU Tier of the Public IP. func (o LookupPublicIpPrefixResultOutput) SkuTier() pulumi.StringOutput { return o.ApplyT(func(v LookupPublicIpPrefixResult) string { return v.SkuTier }).(pulumi.StringOutput) } // A mapping of tags to assigned to the resource. func (o LookupPublicIpPrefixResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupPublicIpPrefixResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // A list of Availability Zones in which this Public IP Prefix is located. func (o LookupPublicIpPrefixResultOutput) Zones() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupPublicIpPrefixResult) []string { return v.Zones }).(pulumi.StringArrayOutput) } func init() { pulumi.RegisterOutputType(LookupPublicIpPrefixResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/vpnGatewayConnection.go
sdk/go/azure/network/vpnGatewayConnection.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a VPN Gateway Connection. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualWan, err := network.NewVirtualWan(ctx, "example", &network.VirtualWanArgs{ // Name: pulumi.String("example-vwan"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // exampleVirtualHub, err := network.NewVirtualHub(ctx, "example", &network.VirtualHubArgs{ // Name: pulumi.String("example-hub"), // ResourceGroupName: example.Name, // Location: example.Location, // VirtualWanId: exampleVirtualWan.ID(), // AddressPrefix: pulumi.String("10.0.0.0/24"), // }) // if err != nil { // return err // } // exampleVpnGateway, err := network.NewVpnGateway(ctx, "example", &network.VpnGatewayArgs{ // Name: pulumi.String("example-vpng"), // Location: example.Location, // ResourceGroupName: example.Name, // VirtualHubId: exampleVirtualHub.ID(), // }) // if err != nil { // return err // } // exampleVpnSite, err := network.NewVpnSite(ctx, "example", &network.VpnSiteArgs{ // Name: pulumi.String("example-vpn-site"), // Location: example.Location, // ResourceGroupName: example.Name, // VirtualWanId: exampleVirtualWan.ID(), // Links: network.VpnSiteLinkArray{ // &network.VpnSiteLinkArgs{ // Name: pulumi.String("link1"), // IpAddress: pulumi.String("10.1.0.0"), // }, // &network.VpnSiteLinkArgs{ // Name: pulumi.String("link2"), // IpAddress: pulumi.String("10.2.0.0"), // }, // }, // }) // if err != nil { // return err // } // _, err = network.NewVpnGatewayConnection(ctx, "example", &network.VpnGatewayConnectionArgs{ // Name: pulumi.String("example"), // VpnGatewayId: exampleVpnGateway.ID(), // RemoteVpnSiteId: exampleVpnSite.ID(), // VpnLinks: network.VpnGatewayConnectionVpnLinkArray{ // &network.VpnGatewayConnectionVpnLinkArgs{ // Name: pulumi.String("link1"), // VpnSiteLinkId: exampleVpnSite.Links.ApplyT(func(links []network.VpnSiteLink) (*string, error) { // return &links[0].Id, nil // }).(pulumi.StringPtrOutput), // }, // &network.VpnGatewayConnectionVpnLinkArgs{ // Name: pulumi.String("link2"), // VpnSiteLinkId: exampleVpnSite.Links.ApplyT(func(links []network.VpnSiteLink) (*string, error) { // return &links[1].Id, nil // }).(pulumi.StringPtrOutput), // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // VPN Gateway Connections can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/vpnGatewayConnection:VpnGatewayConnection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/vpnGateways/gateway1/vpnConnections/conn1 // ``` type VpnGatewayConnection struct { pulumi.CustomResourceState // Whether Internet Security is enabled for this VPN Connection. Defaults to `false`. InternetSecurityEnabled pulumi.BoolPtrOutput `pulumi:"internetSecurityEnabled"` // The name which should be used for this VPN Gateway Connection. Changing this forces a new VPN Gateway Connection to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the remote VPN Site, which will connect to the VPN Gateway. Changing this forces a new VPN Gateway Connection to be created. RemoteVpnSiteId pulumi.StringOutput `pulumi:"remoteVpnSiteId"` // A `routing` block as defined below. If this is not specified, there will be a default route table created implicitly. Routing VpnGatewayConnectionRoutingOutput `pulumi:"routing"` // One or more `trafficSelectorPolicy` blocks as defined below. TrafficSelectorPolicies VpnGatewayConnectionTrafficSelectorPolicyArrayOutput `pulumi:"trafficSelectorPolicies"` // The ID of the VPN Gateway that this VPN Gateway Connection belongs to. Changing this forces a new VPN Gateway Connection to be created. VpnGatewayId pulumi.StringOutput `pulumi:"vpnGatewayId"` // One or more `vpnLink` blocks as defined below. VpnLinks VpnGatewayConnectionVpnLinkArrayOutput `pulumi:"vpnLinks"` } // NewVpnGatewayConnection registers a new resource with the given unique name, arguments, and options. func NewVpnGatewayConnection(ctx *pulumi.Context, name string, args *VpnGatewayConnectionArgs, opts ...pulumi.ResourceOption) (*VpnGatewayConnection, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.RemoteVpnSiteId == nil { return nil, errors.New("invalid value for required argument 'RemoteVpnSiteId'") } if args.VpnGatewayId == nil { return nil, errors.New("invalid value for required argument 'VpnGatewayId'") } if args.VpnLinks == nil { return nil, errors.New("invalid value for required argument 'VpnLinks'") } opts = internal.PkgResourceDefaultOpts(opts) var resource VpnGatewayConnection err := ctx.RegisterResource("azure:network/vpnGatewayConnection:VpnGatewayConnection", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVpnGatewayConnection gets an existing VpnGatewayConnection resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetVpnGatewayConnection(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VpnGatewayConnectionState, opts ...pulumi.ResourceOption) (*VpnGatewayConnection, error) { var resource VpnGatewayConnection err := ctx.ReadResource("azure:network/vpnGatewayConnection:VpnGatewayConnection", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VpnGatewayConnection resources. type vpnGatewayConnectionState struct { // Whether Internet Security is enabled for this VPN Connection. Defaults to `false`. InternetSecurityEnabled *bool `pulumi:"internetSecurityEnabled"` // The name which should be used for this VPN Gateway Connection. Changing this forces a new VPN Gateway Connection to be created. Name *string `pulumi:"name"` // The ID of the remote VPN Site, which will connect to the VPN Gateway. Changing this forces a new VPN Gateway Connection to be created. RemoteVpnSiteId *string `pulumi:"remoteVpnSiteId"` // A `routing` block as defined below. If this is not specified, there will be a default route table created implicitly. Routing *VpnGatewayConnectionRouting `pulumi:"routing"` // One or more `trafficSelectorPolicy` blocks as defined below. TrafficSelectorPolicies []VpnGatewayConnectionTrafficSelectorPolicy `pulumi:"trafficSelectorPolicies"` // The ID of the VPN Gateway that this VPN Gateway Connection belongs to. Changing this forces a new VPN Gateway Connection to be created. VpnGatewayId *string `pulumi:"vpnGatewayId"` // One or more `vpnLink` blocks as defined below. VpnLinks []VpnGatewayConnectionVpnLink `pulumi:"vpnLinks"` } type VpnGatewayConnectionState struct { // Whether Internet Security is enabled for this VPN Connection. Defaults to `false`. InternetSecurityEnabled pulumi.BoolPtrInput // The name which should be used for this VPN Gateway Connection. Changing this forces a new VPN Gateway Connection to be created. Name pulumi.StringPtrInput // The ID of the remote VPN Site, which will connect to the VPN Gateway. Changing this forces a new VPN Gateway Connection to be created. RemoteVpnSiteId pulumi.StringPtrInput // A `routing` block as defined below. If this is not specified, there will be a default route table created implicitly. Routing VpnGatewayConnectionRoutingPtrInput // One or more `trafficSelectorPolicy` blocks as defined below. TrafficSelectorPolicies VpnGatewayConnectionTrafficSelectorPolicyArrayInput // The ID of the VPN Gateway that this VPN Gateway Connection belongs to. Changing this forces a new VPN Gateway Connection to be created. VpnGatewayId pulumi.StringPtrInput // One or more `vpnLink` blocks as defined below. VpnLinks VpnGatewayConnectionVpnLinkArrayInput } func (VpnGatewayConnectionState) ElementType() reflect.Type { return reflect.TypeOf((*vpnGatewayConnectionState)(nil)).Elem() } type vpnGatewayConnectionArgs struct { // Whether Internet Security is enabled for this VPN Connection. Defaults to `false`. InternetSecurityEnabled *bool `pulumi:"internetSecurityEnabled"` // The name which should be used for this VPN Gateway Connection. Changing this forces a new VPN Gateway Connection to be created. Name *string `pulumi:"name"` // The ID of the remote VPN Site, which will connect to the VPN Gateway. Changing this forces a new VPN Gateway Connection to be created. RemoteVpnSiteId string `pulumi:"remoteVpnSiteId"` // A `routing` block as defined below. If this is not specified, there will be a default route table created implicitly. Routing *VpnGatewayConnectionRouting `pulumi:"routing"` // One or more `trafficSelectorPolicy` blocks as defined below. TrafficSelectorPolicies []VpnGatewayConnectionTrafficSelectorPolicy `pulumi:"trafficSelectorPolicies"` // The ID of the VPN Gateway that this VPN Gateway Connection belongs to. Changing this forces a new VPN Gateway Connection to be created. VpnGatewayId string `pulumi:"vpnGatewayId"` // One or more `vpnLink` blocks as defined below. VpnLinks []VpnGatewayConnectionVpnLink `pulumi:"vpnLinks"` } // The set of arguments for constructing a VpnGatewayConnection resource. type VpnGatewayConnectionArgs struct { // Whether Internet Security is enabled for this VPN Connection. Defaults to `false`. InternetSecurityEnabled pulumi.BoolPtrInput // The name which should be used for this VPN Gateway Connection. Changing this forces a new VPN Gateway Connection to be created. Name pulumi.StringPtrInput // The ID of the remote VPN Site, which will connect to the VPN Gateway. Changing this forces a new VPN Gateway Connection to be created. RemoteVpnSiteId pulumi.StringInput // A `routing` block as defined below. If this is not specified, there will be a default route table created implicitly. Routing VpnGatewayConnectionRoutingPtrInput // One or more `trafficSelectorPolicy` blocks as defined below. TrafficSelectorPolicies VpnGatewayConnectionTrafficSelectorPolicyArrayInput // The ID of the VPN Gateway that this VPN Gateway Connection belongs to. Changing this forces a new VPN Gateway Connection to be created. VpnGatewayId pulumi.StringInput // One or more `vpnLink` blocks as defined below. VpnLinks VpnGatewayConnectionVpnLinkArrayInput } func (VpnGatewayConnectionArgs) ElementType() reflect.Type { return reflect.TypeOf((*vpnGatewayConnectionArgs)(nil)).Elem() } type VpnGatewayConnectionInput interface { pulumi.Input ToVpnGatewayConnectionOutput() VpnGatewayConnectionOutput ToVpnGatewayConnectionOutputWithContext(ctx context.Context) VpnGatewayConnectionOutput } func (*VpnGatewayConnection) ElementType() reflect.Type { return reflect.TypeOf((**VpnGatewayConnection)(nil)).Elem() } func (i *VpnGatewayConnection) ToVpnGatewayConnectionOutput() VpnGatewayConnectionOutput { return i.ToVpnGatewayConnectionOutputWithContext(context.Background()) } func (i *VpnGatewayConnection) ToVpnGatewayConnectionOutputWithContext(ctx context.Context) VpnGatewayConnectionOutput { return pulumi.ToOutputWithContext(ctx, i).(VpnGatewayConnectionOutput) } // VpnGatewayConnectionArrayInput is an input type that accepts VpnGatewayConnectionArray and VpnGatewayConnectionArrayOutput values. // You can construct a concrete instance of `VpnGatewayConnectionArrayInput` via: // // VpnGatewayConnectionArray{ VpnGatewayConnectionArgs{...} } type VpnGatewayConnectionArrayInput interface { pulumi.Input ToVpnGatewayConnectionArrayOutput() VpnGatewayConnectionArrayOutput ToVpnGatewayConnectionArrayOutputWithContext(context.Context) VpnGatewayConnectionArrayOutput } type VpnGatewayConnectionArray []VpnGatewayConnectionInput func (VpnGatewayConnectionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VpnGatewayConnection)(nil)).Elem() } func (i VpnGatewayConnectionArray) ToVpnGatewayConnectionArrayOutput() VpnGatewayConnectionArrayOutput { return i.ToVpnGatewayConnectionArrayOutputWithContext(context.Background()) } func (i VpnGatewayConnectionArray) ToVpnGatewayConnectionArrayOutputWithContext(ctx context.Context) VpnGatewayConnectionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VpnGatewayConnectionArrayOutput) } // VpnGatewayConnectionMapInput is an input type that accepts VpnGatewayConnectionMap and VpnGatewayConnectionMapOutput values. // You can construct a concrete instance of `VpnGatewayConnectionMapInput` via: // // VpnGatewayConnectionMap{ "key": VpnGatewayConnectionArgs{...} } type VpnGatewayConnectionMapInput interface { pulumi.Input ToVpnGatewayConnectionMapOutput() VpnGatewayConnectionMapOutput ToVpnGatewayConnectionMapOutputWithContext(context.Context) VpnGatewayConnectionMapOutput } type VpnGatewayConnectionMap map[string]VpnGatewayConnectionInput func (VpnGatewayConnectionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VpnGatewayConnection)(nil)).Elem() } func (i VpnGatewayConnectionMap) ToVpnGatewayConnectionMapOutput() VpnGatewayConnectionMapOutput { return i.ToVpnGatewayConnectionMapOutputWithContext(context.Background()) } func (i VpnGatewayConnectionMap) ToVpnGatewayConnectionMapOutputWithContext(ctx context.Context) VpnGatewayConnectionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VpnGatewayConnectionMapOutput) } type VpnGatewayConnectionOutput struct{ *pulumi.OutputState } func (VpnGatewayConnectionOutput) ElementType() reflect.Type { return reflect.TypeOf((**VpnGatewayConnection)(nil)).Elem() } func (o VpnGatewayConnectionOutput) ToVpnGatewayConnectionOutput() VpnGatewayConnectionOutput { return o } func (o VpnGatewayConnectionOutput) ToVpnGatewayConnectionOutputWithContext(ctx context.Context) VpnGatewayConnectionOutput { return o } // Whether Internet Security is enabled for this VPN Connection. Defaults to `false`. func (o VpnGatewayConnectionOutput) InternetSecurityEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *VpnGatewayConnection) pulumi.BoolPtrOutput { return v.InternetSecurityEnabled }).(pulumi.BoolPtrOutput) } // The name which should be used for this VPN Gateway Connection. Changing this forces a new VPN Gateway Connection to be created. func (o VpnGatewayConnectionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *VpnGatewayConnection) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the remote VPN Site, which will connect to the VPN Gateway. Changing this forces a new VPN Gateway Connection to be created. func (o VpnGatewayConnectionOutput) RemoteVpnSiteId() pulumi.StringOutput { return o.ApplyT(func(v *VpnGatewayConnection) pulumi.StringOutput { return v.RemoteVpnSiteId }).(pulumi.StringOutput) } // A `routing` block as defined below. If this is not specified, there will be a default route table created implicitly. func (o VpnGatewayConnectionOutput) Routing() VpnGatewayConnectionRoutingOutput { return o.ApplyT(func(v *VpnGatewayConnection) VpnGatewayConnectionRoutingOutput { return v.Routing }).(VpnGatewayConnectionRoutingOutput) } // One or more `trafficSelectorPolicy` blocks as defined below. func (o VpnGatewayConnectionOutput) TrafficSelectorPolicies() VpnGatewayConnectionTrafficSelectorPolicyArrayOutput { return o.ApplyT(func(v *VpnGatewayConnection) VpnGatewayConnectionTrafficSelectorPolicyArrayOutput { return v.TrafficSelectorPolicies }).(VpnGatewayConnectionTrafficSelectorPolicyArrayOutput) } // The ID of the VPN Gateway that this VPN Gateway Connection belongs to. Changing this forces a new VPN Gateway Connection to be created. func (o VpnGatewayConnectionOutput) VpnGatewayId() pulumi.StringOutput { return o.ApplyT(func(v *VpnGatewayConnection) pulumi.StringOutput { return v.VpnGatewayId }).(pulumi.StringOutput) } // One or more `vpnLink` blocks as defined below. func (o VpnGatewayConnectionOutput) VpnLinks() VpnGatewayConnectionVpnLinkArrayOutput { return o.ApplyT(func(v *VpnGatewayConnection) VpnGatewayConnectionVpnLinkArrayOutput { return v.VpnLinks }).(VpnGatewayConnectionVpnLinkArrayOutput) } type VpnGatewayConnectionArrayOutput struct{ *pulumi.OutputState } func (VpnGatewayConnectionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*VpnGatewayConnection)(nil)).Elem() } func (o VpnGatewayConnectionArrayOutput) ToVpnGatewayConnectionArrayOutput() VpnGatewayConnectionArrayOutput { return o } func (o VpnGatewayConnectionArrayOutput) ToVpnGatewayConnectionArrayOutputWithContext(ctx context.Context) VpnGatewayConnectionArrayOutput { return o } func (o VpnGatewayConnectionArrayOutput) Index(i pulumi.IntInput) VpnGatewayConnectionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VpnGatewayConnection { return vs[0].([]*VpnGatewayConnection)[vs[1].(int)] }).(VpnGatewayConnectionOutput) } type VpnGatewayConnectionMapOutput struct{ *pulumi.OutputState } func (VpnGatewayConnectionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VpnGatewayConnection)(nil)).Elem() } func (o VpnGatewayConnectionMapOutput) ToVpnGatewayConnectionMapOutput() VpnGatewayConnectionMapOutput { return o } func (o VpnGatewayConnectionMapOutput) ToVpnGatewayConnectionMapOutputWithContext(ctx context.Context) VpnGatewayConnectionMapOutput { return o } func (o VpnGatewayConnectionMapOutput) MapIndex(k pulumi.StringInput) VpnGatewayConnectionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VpnGatewayConnection { return vs[0].(map[string]*VpnGatewayConnection)[vs[1].(string)] }).(VpnGatewayConnectionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VpnGatewayConnectionInput)(nil)).Elem(), &VpnGatewayConnection{}) pulumi.RegisterInputType(reflect.TypeOf((*VpnGatewayConnectionArrayInput)(nil)).Elem(), VpnGatewayConnectionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VpnGatewayConnectionMapInput)(nil)).Elem(), VpnGatewayConnectionMap{}) pulumi.RegisterOutputType(VpnGatewayConnectionOutput{}) pulumi.RegisterOutputType(VpnGatewayConnectionArrayOutput{}) pulumi.RegisterOutputType(VpnGatewayConnectionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getTrafficManager.go
sdk/go/azure/network/getTrafficManager.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access the ID of a specified Traffic Manager Geographical Location within the Geographical Hierarchy. // // ## Example Usage // // ### World) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.GetTrafficManager(ctx, &network.GetTrafficManagerArgs{ // Name: "World", // }, nil) // if err != nil { // return err // } // ctx.Export("locationCode", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2022-04-01 func GetTrafficManager(ctx *pulumi.Context, args *GetTrafficManagerArgs, opts ...pulumi.InvokeOption) (*GetTrafficManagerResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetTrafficManagerResult err := ctx.Invoke("azure:network/getTrafficManager:getTrafficManager", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getTrafficManager. type GetTrafficManagerArgs struct { // Specifies the name of the Location, for example `World`, `Europe` or `Germany`. Name string `pulumi:"name"` } // A collection of values returned by getTrafficManager. type GetTrafficManagerResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name string `pulumi:"name"` } func GetTrafficManagerOutput(ctx *pulumi.Context, args GetTrafficManagerOutputArgs, opts ...pulumi.InvokeOption) GetTrafficManagerResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetTrafficManagerResultOutput, error) { args := v.(GetTrafficManagerArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getTrafficManager:getTrafficManager", args, GetTrafficManagerResultOutput{}, options).(GetTrafficManagerResultOutput), nil }).(GetTrafficManagerResultOutput) } // A collection of arguments for invoking getTrafficManager. type GetTrafficManagerOutputArgs struct { // Specifies the name of the Location, for example `World`, `Europe` or `Germany`. Name pulumi.StringInput `pulumi:"name"` } func (GetTrafficManagerOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetTrafficManagerArgs)(nil)).Elem() } // A collection of values returned by getTrafficManager. type GetTrafficManagerResultOutput struct{ *pulumi.OutputState } func (GetTrafficManagerResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetTrafficManagerResult)(nil)).Elem() } func (o GetTrafficManagerResultOutput) ToGetTrafficManagerResultOutput() GetTrafficManagerResultOutput { return o } func (o GetTrafficManagerResultOutput) ToGetTrafficManagerResultOutputWithContext(ctx context.Context) GetTrafficManagerResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o GetTrafficManagerResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetTrafficManagerResult) string { return v.Id }).(pulumi.StringOutput) } func (o GetTrafficManagerResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetTrafficManagerResult) string { return v.Name }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(GetTrafficManagerResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getApplicationSecurityGroup.go
sdk/go/azure/network/getApplicationSecurityGroup.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Application Security Group. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.LookupApplicationSecurityGroup(ctx, &network.LookupApplicationSecurityGroupArgs{ // Name: "tf-appsecuritygroup", // ResourceGroupName: "my-resource-group", // }, nil) // if err != nil { // return err // } // ctx.Export("applicationSecurityGroupId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func LookupApplicationSecurityGroup(ctx *pulumi.Context, args *LookupApplicationSecurityGroupArgs, opts ...pulumi.InvokeOption) (*LookupApplicationSecurityGroupResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupApplicationSecurityGroupResult err := ctx.Invoke("azure:network/getApplicationSecurityGroup:getApplicationSecurityGroup", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getApplicationSecurityGroup. type LookupApplicationSecurityGroupArgs struct { // The name of the Application Security Group. Name string `pulumi:"name"` // The name of the resource group in which the Application Security Group exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getApplicationSecurityGroup. type LookupApplicationSecurityGroupResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The supported Azure location where the Application Security Group exists. Location string `pulumi:"location"` Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags assigned to the resource. Tags map[string]string `pulumi:"tags"` } func LookupApplicationSecurityGroupOutput(ctx *pulumi.Context, args LookupApplicationSecurityGroupOutputArgs, opts ...pulumi.InvokeOption) LookupApplicationSecurityGroupResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupApplicationSecurityGroupResultOutput, error) { args := v.(LookupApplicationSecurityGroupArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getApplicationSecurityGroup:getApplicationSecurityGroup", args, LookupApplicationSecurityGroupResultOutput{}, options).(LookupApplicationSecurityGroupResultOutput), nil }).(LookupApplicationSecurityGroupResultOutput) } // A collection of arguments for invoking getApplicationSecurityGroup. type LookupApplicationSecurityGroupOutputArgs struct { // The name of the Application Security Group. Name pulumi.StringInput `pulumi:"name"` // The name of the resource group in which the Application Security Group exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupApplicationSecurityGroupOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupApplicationSecurityGroupArgs)(nil)).Elem() } // A collection of values returned by getApplicationSecurityGroup. type LookupApplicationSecurityGroupResultOutput struct{ *pulumi.OutputState } func (LookupApplicationSecurityGroupResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupApplicationSecurityGroupResult)(nil)).Elem() } func (o LookupApplicationSecurityGroupResultOutput) ToLookupApplicationSecurityGroupResultOutput() LookupApplicationSecurityGroupResultOutput { return o } func (o LookupApplicationSecurityGroupResultOutput) ToLookupApplicationSecurityGroupResultOutputWithContext(ctx context.Context) LookupApplicationSecurityGroupResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o LookupApplicationSecurityGroupResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupApplicationSecurityGroupResult) string { return v.Id }).(pulumi.StringOutput) } // The supported Azure location where the Application Security Group exists. func (o LookupApplicationSecurityGroupResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupApplicationSecurityGroupResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupApplicationSecurityGroupResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupApplicationSecurityGroupResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupApplicationSecurityGroupResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupApplicationSecurityGroupResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags assigned to the resource. func (o LookupApplicationSecurityGroupResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupApplicationSecurityGroupResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(LookupApplicationSecurityGroupResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getNetworkWatcher.go
sdk/go/azure/network/getNetworkWatcher.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Network Watcher. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.LookupNetworkWatcher(ctx, &network.LookupNetworkWatcherArgs{ // Name: exampleAzurermNetworkWatcher.Name, // ResourceGroupName: exampleAzurermResourceGroup.Name, // }, nil) // if err != nil { // return err // } // ctx.Export("networkWatcherId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func LookupNetworkWatcher(ctx *pulumi.Context, args *LookupNetworkWatcherArgs, opts ...pulumi.InvokeOption) (*LookupNetworkWatcherResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupNetworkWatcherResult err := ctx.Invoke("azure:network/getNetworkWatcher:getNetworkWatcher", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getNetworkWatcher. type LookupNetworkWatcherArgs struct { // Specifies the Name of the Network Watcher. Name string `pulumi:"name"` // Specifies the Name of the Resource Group within which the Network Watcher exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getNetworkWatcher. type LookupNetworkWatcherResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The supported Azure location where the resource exists. Location string `pulumi:"location"` Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags assigned to the resource. Tags map[string]string `pulumi:"tags"` } func LookupNetworkWatcherOutput(ctx *pulumi.Context, args LookupNetworkWatcherOutputArgs, opts ...pulumi.InvokeOption) LookupNetworkWatcherResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupNetworkWatcherResultOutput, error) { args := v.(LookupNetworkWatcherArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getNetworkWatcher:getNetworkWatcher", args, LookupNetworkWatcherResultOutput{}, options).(LookupNetworkWatcherResultOutput), nil }).(LookupNetworkWatcherResultOutput) } // A collection of arguments for invoking getNetworkWatcher. type LookupNetworkWatcherOutputArgs struct { // Specifies the Name of the Network Watcher. Name pulumi.StringInput `pulumi:"name"` // Specifies the Name of the Resource Group within which the Network Watcher exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupNetworkWatcherOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupNetworkWatcherArgs)(nil)).Elem() } // A collection of values returned by getNetworkWatcher. type LookupNetworkWatcherResultOutput struct{ *pulumi.OutputState } func (LookupNetworkWatcherResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupNetworkWatcherResult)(nil)).Elem() } func (o LookupNetworkWatcherResultOutput) ToLookupNetworkWatcherResultOutput() LookupNetworkWatcherResultOutput { return o } func (o LookupNetworkWatcherResultOutput) ToLookupNetworkWatcherResultOutputWithContext(ctx context.Context) LookupNetworkWatcherResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o LookupNetworkWatcherResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkWatcherResult) string { return v.Id }).(pulumi.StringOutput) } // The supported Azure location where the resource exists. func (o LookupNetworkWatcherResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkWatcherResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupNetworkWatcherResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkWatcherResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupNetworkWatcherResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkWatcherResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags assigned to the resource. func (o LookupNetworkWatcherResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupNetworkWatcherResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(LookupNetworkWatcherResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getNetworkDdosProtectionPlan.go
sdk/go/azure/network/getNetworkDdosProtectionPlan.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Azure Network DDoS Protection Plan. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.GetNetworkDdosProtectionPlan(ctx, &network.GetNetworkDdosProtectionPlanArgs{ // Name: exampleAzurermNetworkDdosProtectionPlan.Name, // ResourceGroupName: exampleAzurermNetworkDdosProtectionPlan.ResourceGroupName, // }, nil) // if err != nil { // return err // } // ctx.Export("ddosProtectionPlanId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func GetNetworkDdosProtectionPlan(ctx *pulumi.Context, args *GetNetworkDdosProtectionPlanArgs, opts ...pulumi.InvokeOption) (*GetNetworkDdosProtectionPlanResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetNetworkDdosProtectionPlanResult err := ctx.Invoke("azure:network/getNetworkDdosProtectionPlan:getNetworkDdosProtectionPlan", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getNetworkDdosProtectionPlan. type GetNetworkDdosProtectionPlanArgs struct { // The name of the Network DDoS Protection Plan. Name string `pulumi:"name"` // The name of the resource group where the Network DDoS Protection Plan exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getNetworkDdosProtectionPlan. type GetNetworkDdosProtectionPlanResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // Specifies the supported Azure location where the resource exists. Location string `pulumi:"location"` Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags assigned to the resource. Tags map[string]string `pulumi:"tags"` // A list of IDs of the Virtual Networks associated with this DDoS Protection Plan. VirtualNetworkIds []string `pulumi:"virtualNetworkIds"` } func GetNetworkDdosProtectionPlanOutput(ctx *pulumi.Context, args GetNetworkDdosProtectionPlanOutputArgs, opts ...pulumi.InvokeOption) GetNetworkDdosProtectionPlanResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetNetworkDdosProtectionPlanResultOutput, error) { args := v.(GetNetworkDdosProtectionPlanArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getNetworkDdosProtectionPlan:getNetworkDdosProtectionPlan", args, GetNetworkDdosProtectionPlanResultOutput{}, options).(GetNetworkDdosProtectionPlanResultOutput), nil }).(GetNetworkDdosProtectionPlanResultOutput) } // A collection of arguments for invoking getNetworkDdosProtectionPlan. type GetNetworkDdosProtectionPlanOutputArgs struct { // The name of the Network DDoS Protection Plan. Name pulumi.StringInput `pulumi:"name"` // The name of the resource group where the Network DDoS Protection Plan exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (GetNetworkDdosProtectionPlanOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetNetworkDdosProtectionPlanArgs)(nil)).Elem() } // A collection of values returned by getNetworkDdosProtectionPlan. type GetNetworkDdosProtectionPlanResultOutput struct{ *pulumi.OutputState } func (GetNetworkDdosProtectionPlanResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetNetworkDdosProtectionPlanResult)(nil)).Elem() } func (o GetNetworkDdosProtectionPlanResultOutput) ToGetNetworkDdosProtectionPlanResultOutput() GetNetworkDdosProtectionPlanResultOutput { return o } func (o GetNetworkDdosProtectionPlanResultOutput) ToGetNetworkDdosProtectionPlanResultOutputWithContext(ctx context.Context) GetNetworkDdosProtectionPlanResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o GetNetworkDdosProtectionPlanResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetNetworkDdosProtectionPlanResult) string { return v.Id }).(pulumi.StringOutput) } // Specifies the supported Azure location where the resource exists. func (o GetNetworkDdosProtectionPlanResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v GetNetworkDdosProtectionPlanResult) string { return v.Location }).(pulumi.StringOutput) } func (o GetNetworkDdosProtectionPlanResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetNetworkDdosProtectionPlanResult) string { return v.Name }).(pulumi.StringOutput) } func (o GetNetworkDdosProtectionPlanResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v GetNetworkDdosProtectionPlanResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags assigned to the resource. func (o GetNetworkDdosProtectionPlanResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v GetNetworkDdosProtectionPlanResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // A list of IDs of the Virtual Networks associated with this DDoS Protection Plan. func (o GetNetworkDdosProtectionPlanResultOutput) VirtualNetworkIds() pulumi.StringArrayOutput { return o.ApplyT(func(v GetNetworkDdosProtectionPlanResult) []string { return v.VirtualNetworkIds }).(pulumi.StringArrayOutput) } func init() { pulumi.RegisterOutputType(GetNetworkDdosProtectionPlanResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/networkInterfaceNatRuleAssociation.go
sdk/go/azure/network/networkInterfaceNatRuleAssociation.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages the association between a Network Interface and a Load Balancer's NAT Rule. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/lb" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-network"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("internal"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("example-pip"), // Location: example.Location, // ResourceGroupName: example.Name, // AllocationMethod: pulumi.String("Static"), // }) // if err != nil { // return err // } // exampleLoadBalancer, err := lb.NewLoadBalancer(ctx, "example", &lb.LoadBalancerArgs{ // Name: pulumi.String("example-lb"), // Location: example.Location, // ResourceGroupName: example.Name, // FrontendIpConfigurations: lb.LoadBalancerFrontendIpConfigurationArray{ // &lb.LoadBalancerFrontendIpConfigurationArgs{ // Name: pulumi.String("primary"), // PublicIpAddressId: examplePublicIp.ID(), // }, // }, // }) // if err != nil { // return err // } // exampleNatRule, err := lb.NewNatRule(ctx, "example", &lb.NatRuleArgs{ // ResourceGroupName: example.Name, // LoadbalancerId: exampleLoadBalancer.ID(), // Name: pulumi.String("RDPAccess"), // Protocol: pulumi.String("Tcp"), // FrontendPort: pulumi.Int(3389), // BackendPort: pulumi.Int(3389), // FrontendIpConfigurationName: pulumi.String("primary"), // }) // if err != nil { // return err // } // exampleNetworkInterface, err := network.NewNetworkInterface(ctx, "example", &network.NetworkInterfaceArgs{ // Name: pulumi.String("example-nic"), // Location: example.Location, // ResourceGroupName: example.Name, // IpConfigurations: network.NetworkInterfaceIpConfigurationArray{ // &network.NetworkInterfaceIpConfigurationArgs{ // Name: pulumi.String("testconfiguration1"), // SubnetId: exampleSubnet.ID(), // PrivateIpAddressAllocation: pulumi.String("Dynamic"), // }, // }, // }) // if err != nil { // return err // } // _, err = network.NewNetworkInterfaceNatRuleAssociation(ctx, "example", &network.NetworkInterfaceNatRuleAssociationArgs{ // NetworkInterfaceId: exampleNetworkInterface.ID(), // IpConfigurationName: pulumi.String("testconfiguration1"), // NatRuleId: exampleNatRule.ID(), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Associations between Network Interfaces and Load Balancer NAT Rule can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/networkInterfaceNatRuleAssociation:NetworkInterfaceNatRuleAssociation association1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/networkInterfaces/nic1/ipConfigurations/example|/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/loadBalancers/lb1/inboundNatRules/rule1 // ``` type NetworkInterfaceNatRuleAssociation struct { pulumi.CustomResourceState // The Name of the IP Configuration within the Network Interface which should be connected to the NAT Rule. Changing this forces a new resource to be created. IpConfigurationName pulumi.StringOutput `pulumi:"ipConfigurationName"` // The ID of the Load Balancer NAT Rule which this Network Interface which should be connected to. Changing this forces a new resource to be created. NatRuleId pulumi.StringOutput `pulumi:"natRuleId"` // The ID of the Network Interface. Changing this forces a new resource to be created. NetworkInterfaceId pulumi.StringOutput `pulumi:"networkInterfaceId"` } // NewNetworkInterfaceNatRuleAssociation registers a new resource with the given unique name, arguments, and options. func NewNetworkInterfaceNatRuleAssociation(ctx *pulumi.Context, name string, args *NetworkInterfaceNatRuleAssociationArgs, opts ...pulumi.ResourceOption) (*NetworkInterfaceNatRuleAssociation, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.IpConfigurationName == nil { return nil, errors.New("invalid value for required argument 'IpConfigurationName'") } if args.NatRuleId == nil { return nil, errors.New("invalid value for required argument 'NatRuleId'") } if args.NetworkInterfaceId == nil { return nil, errors.New("invalid value for required argument 'NetworkInterfaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkInterfaceNatRuleAssociation err := ctx.RegisterResource("azure:network/networkInterfaceNatRuleAssociation:NetworkInterfaceNatRuleAssociation", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkInterfaceNatRuleAssociation gets an existing NetworkInterfaceNatRuleAssociation resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetNetworkInterfaceNatRuleAssociation(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkInterfaceNatRuleAssociationState, opts ...pulumi.ResourceOption) (*NetworkInterfaceNatRuleAssociation, error) { var resource NetworkInterfaceNatRuleAssociation err := ctx.ReadResource("azure:network/networkInterfaceNatRuleAssociation:NetworkInterfaceNatRuleAssociation", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkInterfaceNatRuleAssociation resources. type networkInterfaceNatRuleAssociationState struct { // The Name of the IP Configuration within the Network Interface which should be connected to the NAT Rule. Changing this forces a new resource to be created. IpConfigurationName *string `pulumi:"ipConfigurationName"` // The ID of the Load Balancer NAT Rule which this Network Interface which should be connected to. Changing this forces a new resource to be created. NatRuleId *string `pulumi:"natRuleId"` // The ID of the Network Interface. Changing this forces a new resource to be created. NetworkInterfaceId *string `pulumi:"networkInterfaceId"` } type NetworkInterfaceNatRuleAssociationState struct { // The Name of the IP Configuration within the Network Interface which should be connected to the NAT Rule. Changing this forces a new resource to be created. IpConfigurationName pulumi.StringPtrInput // The ID of the Load Balancer NAT Rule which this Network Interface which should be connected to. Changing this forces a new resource to be created. NatRuleId pulumi.StringPtrInput // The ID of the Network Interface. Changing this forces a new resource to be created. NetworkInterfaceId pulumi.StringPtrInput } func (NetworkInterfaceNatRuleAssociationState) ElementType() reflect.Type { return reflect.TypeOf((*networkInterfaceNatRuleAssociationState)(nil)).Elem() } type networkInterfaceNatRuleAssociationArgs struct { // The Name of the IP Configuration within the Network Interface which should be connected to the NAT Rule. Changing this forces a new resource to be created. IpConfigurationName string `pulumi:"ipConfigurationName"` // The ID of the Load Balancer NAT Rule which this Network Interface which should be connected to. Changing this forces a new resource to be created. NatRuleId string `pulumi:"natRuleId"` // The ID of the Network Interface. Changing this forces a new resource to be created. NetworkInterfaceId string `pulumi:"networkInterfaceId"` } // The set of arguments for constructing a NetworkInterfaceNatRuleAssociation resource. type NetworkInterfaceNatRuleAssociationArgs struct { // The Name of the IP Configuration within the Network Interface which should be connected to the NAT Rule. Changing this forces a new resource to be created. IpConfigurationName pulumi.StringInput // The ID of the Load Balancer NAT Rule which this Network Interface which should be connected to. Changing this forces a new resource to be created. NatRuleId pulumi.StringInput // The ID of the Network Interface. Changing this forces a new resource to be created. NetworkInterfaceId pulumi.StringInput } func (NetworkInterfaceNatRuleAssociationArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkInterfaceNatRuleAssociationArgs)(nil)).Elem() } type NetworkInterfaceNatRuleAssociationInput interface { pulumi.Input ToNetworkInterfaceNatRuleAssociationOutput() NetworkInterfaceNatRuleAssociationOutput ToNetworkInterfaceNatRuleAssociationOutputWithContext(ctx context.Context) NetworkInterfaceNatRuleAssociationOutput } func (*NetworkInterfaceNatRuleAssociation) ElementType() reflect.Type { return reflect.TypeOf((**NetworkInterfaceNatRuleAssociation)(nil)).Elem() } func (i *NetworkInterfaceNatRuleAssociation) ToNetworkInterfaceNatRuleAssociationOutput() NetworkInterfaceNatRuleAssociationOutput { return i.ToNetworkInterfaceNatRuleAssociationOutputWithContext(context.Background()) } func (i *NetworkInterfaceNatRuleAssociation) ToNetworkInterfaceNatRuleAssociationOutputWithContext(ctx context.Context) NetworkInterfaceNatRuleAssociationOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkInterfaceNatRuleAssociationOutput) } // NetworkInterfaceNatRuleAssociationArrayInput is an input type that accepts NetworkInterfaceNatRuleAssociationArray and NetworkInterfaceNatRuleAssociationArrayOutput values. // You can construct a concrete instance of `NetworkInterfaceNatRuleAssociationArrayInput` via: // // NetworkInterfaceNatRuleAssociationArray{ NetworkInterfaceNatRuleAssociationArgs{...} } type NetworkInterfaceNatRuleAssociationArrayInput interface { pulumi.Input ToNetworkInterfaceNatRuleAssociationArrayOutput() NetworkInterfaceNatRuleAssociationArrayOutput ToNetworkInterfaceNatRuleAssociationArrayOutputWithContext(context.Context) NetworkInterfaceNatRuleAssociationArrayOutput } type NetworkInterfaceNatRuleAssociationArray []NetworkInterfaceNatRuleAssociationInput func (NetworkInterfaceNatRuleAssociationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkInterfaceNatRuleAssociation)(nil)).Elem() } func (i NetworkInterfaceNatRuleAssociationArray) ToNetworkInterfaceNatRuleAssociationArrayOutput() NetworkInterfaceNatRuleAssociationArrayOutput { return i.ToNetworkInterfaceNatRuleAssociationArrayOutputWithContext(context.Background()) } func (i NetworkInterfaceNatRuleAssociationArray) ToNetworkInterfaceNatRuleAssociationArrayOutputWithContext(ctx context.Context) NetworkInterfaceNatRuleAssociationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkInterfaceNatRuleAssociationArrayOutput) } // NetworkInterfaceNatRuleAssociationMapInput is an input type that accepts NetworkInterfaceNatRuleAssociationMap and NetworkInterfaceNatRuleAssociationMapOutput values. // You can construct a concrete instance of `NetworkInterfaceNatRuleAssociationMapInput` via: // // NetworkInterfaceNatRuleAssociationMap{ "key": NetworkInterfaceNatRuleAssociationArgs{...} } type NetworkInterfaceNatRuleAssociationMapInput interface { pulumi.Input ToNetworkInterfaceNatRuleAssociationMapOutput() NetworkInterfaceNatRuleAssociationMapOutput ToNetworkInterfaceNatRuleAssociationMapOutputWithContext(context.Context) NetworkInterfaceNatRuleAssociationMapOutput } type NetworkInterfaceNatRuleAssociationMap map[string]NetworkInterfaceNatRuleAssociationInput func (NetworkInterfaceNatRuleAssociationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkInterfaceNatRuleAssociation)(nil)).Elem() } func (i NetworkInterfaceNatRuleAssociationMap) ToNetworkInterfaceNatRuleAssociationMapOutput() NetworkInterfaceNatRuleAssociationMapOutput { return i.ToNetworkInterfaceNatRuleAssociationMapOutputWithContext(context.Background()) } func (i NetworkInterfaceNatRuleAssociationMap) ToNetworkInterfaceNatRuleAssociationMapOutputWithContext(ctx context.Context) NetworkInterfaceNatRuleAssociationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkInterfaceNatRuleAssociationMapOutput) } type NetworkInterfaceNatRuleAssociationOutput struct{ *pulumi.OutputState } func (NetworkInterfaceNatRuleAssociationOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkInterfaceNatRuleAssociation)(nil)).Elem() } func (o NetworkInterfaceNatRuleAssociationOutput) ToNetworkInterfaceNatRuleAssociationOutput() NetworkInterfaceNatRuleAssociationOutput { return o } func (o NetworkInterfaceNatRuleAssociationOutput) ToNetworkInterfaceNatRuleAssociationOutputWithContext(ctx context.Context) NetworkInterfaceNatRuleAssociationOutput { return o } // The Name of the IP Configuration within the Network Interface which should be connected to the NAT Rule. Changing this forces a new resource to be created. func (o NetworkInterfaceNatRuleAssociationOutput) IpConfigurationName() pulumi.StringOutput { return o.ApplyT(func(v *NetworkInterfaceNatRuleAssociation) pulumi.StringOutput { return v.IpConfigurationName }).(pulumi.StringOutput) } // The ID of the Load Balancer NAT Rule which this Network Interface which should be connected to. Changing this forces a new resource to be created. func (o NetworkInterfaceNatRuleAssociationOutput) NatRuleId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkInterfaceNatRuleAssociation) pulumi.StringOutput { return v.NatRuleId }).(pulumi.StringOutput) } // The ID of the Network Interface. Changing this forces a new resource to be created. func (o NetworkInterfaceNatRuleAssociationOutput) NetworkInterfaceId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkInterfaceNatRuleAssociation) pulumi.StringOutput { return v.NetworkInterfaceId }).(pulumi.StringOutput) } type NetworkInterfaceNatRuleAssociationArrayOutput struct{ *pulumi.OutputState } func (NetworkInterfaceNatRuleAssociationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkInterfaceNatRuleAssociation)(nil)).Elem() } func (o NetworkInterfaceNatRuleAssociationArrayOutput) ToNetworkInterfaceNatRuleAssociationArrayOutput() NetworkInterfaceNatRuleAssociationArrayOutput { return o } func (o NetworkInterfaceNatRuleAssociationArrayOutput) ToNetworkInterfaceNatRuleAssociationArrayOutputWithContext(ctx context.Context) NetworkInterfaceNatRuleAssociationArrayOutput { return o } func (o NetworkInterfaceNatRuleAssociationArrayOutput) Index(i pulumi.IntInput) NetworkInterfaceNatRuleAssociationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkInterfaceNatRuleAssociation { return vs[0].([]*NetworkInterfaceNatRuleAssociation)[vs[1].(int)] }).(NetworkInterfaceNatRuleAssociationOutput) } type NetworkInterfaceNatRuleAssociationMapOutput struct{ *pulumi.OutputState } func (NetworkInterfaceNatRuleAssociationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkInterfaceNatRuleAssociation)(nil)).Elem() } func (o NetworkInterfaceNatRuleAssociationMapOutput) ToNetworkInterfaceNatRuleAssociationMapOutput() NetworkInterfaceNatRuleAssociationMapOutput { return o } func (o NetworkInterfaceNatRuleAssociationMapOutput) ToNetworkInterfaceNatRuleAssociationMapOutputWithContext(ctx context.Context) NetworkInterfaceNatRuleAssociationMapOutput { return o } func (o NetworkInterfaceNatRuleAssociationMapOutput) MapIndex(k pulumi.StringInput) NetworkInterfaceNatRuleAssociationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkInterfaceNatRuleAssociation { return vs[0].(map[string]*NetworkInterfaceNatRuleAssociation)[vs[1].(string)] }).(NetworkInterfaceNatRuleAssociationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkInterfaceNatRuleAssociationInput)(nil)).Elem(), &NetworkInterfaceNatRuleAssociation{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkInterfaceNatRuleAssociationArrayInput)(nil)).Elem(), NetworkInterfaceNatRuleAssociationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkInterfaceNatRuleAssociationMapInput)(nil)).Elem(), NetworkInterfaceNatRuleAssociationMap{}) pulumi.RegisterOutputType(NetworkInterfaceNatRuleAssociationOutput{}) pulumi.RegisterOutputType(NetworkInterfaceNatRuleAssociationArrayOutput{}) pulumi.RegisterOutputType(NetworkInterfaceNatRuleAssociationMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getRouteTable.go
sdk/go/azure/network/getRouteTable.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Route Table. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := network.LookupRouteTable(ctx, &network.LookupRouteTableArgs{ // Name: "myroutetable", // ResourceGroupName: "some-resource-group", // }, nil) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func LookupRouteTable(ctx *pulumi.Context, args *LookupRouteTableArgs, opts ...pulumi.InvokeOption) (*LookupRouteTableResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupRouteTableResult err := ctx.Invoke("azure:network/getRouteTable:getRouteTable", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getRouteTable. type LookupRouteTableArgs struct { // The name of the Route Table. Name string `pulumi:"name"` // The name of the Resource Group in which the Route Table exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getRouteTable. type LookupRouteTableResult struct { // Boolean flag which controls propagation of routes learned by BGP on that route table. BgpRoutePropagationEnabled bool `pulumi:"bgpRoutePropagationEnabled"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The Azure Region in which the Route Table exists. Location string `pulumi:"location"` // The name of the Route. Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // One or more `route` blocks as documented below. Routes []GetRouteTableRoute `pulumi:"routes"` // The collection of Subnets associated with this route table. Subnets []string `pulumi:"subnets"` // A mapping of tags assigned to the Route Table. Tags map[string]string `pulumi:"tags"` } func LookupRouteTableOutput(ctx *pulumi.Context, args LookupRouteTableOutputArgs, opts ...pulumi.InvokeOption) LookupRouteTableResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupRouteTableResultOutput, error) { args := v.(LookupRouteTableArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getRouteTable:getRouteTable", args, LookupRouteTableResultOutput{}, options).(LookupRouteTableResultOutput), nil }).(LookupRouteTableResultOutput) } // A collection of arguments for invoking getRouteTable. type LookupRouteTableOutputArgs struct { // The name of the Route Table. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group in which the Route Table exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupRouteTableOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupRouteTableArgs)(nil)).Elem() } // A collection of values returned by getRouteTable. type LookupRouteTableResultOutput struct{ *pulumi.OutputState } func (LookupRouteTableResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupRouteTableResult)(nil)).Elem() } func (o LookupRouteTableResultOutput) ToLookupRouteTableResultOutput() LookupRouteTableResultOutput { return o } func (o LookupRouteTableResultOutput) ToLookupRouteTableResultOutputWithContext(ctx context.Context) LookupRouteTableResultOutput { return o } // Boolean flag which controls propagation of routes learned by BGP on that route table. func (o LookupRouteTableResultOutput) BgpRoutePropagationEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupRouteTableResult) bool { return v.BgpRoutePropagationEnabled }).(pulumi.BoolOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupRouteTableResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupRouteTableResult) string { return v.Id }).(pulumi.StringOutput) } // The Azure Region in which the Route Table exists. func (o LookupRouteTableResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupRouteTableResult) string { return v.Location }).(pulumi.StringOutput) } // The name of the Route. func (o LookupRouteTableResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupRouteTableResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupRouteTableResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupRouteTableResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // One or more `route` blocks as documented below. func (o LookupRouteTableResultOutput) Routes() GetRouteTableRouteArrayOutput { return o.ApplyT(func(v LookupRouteTableResult) []GetRouteTableRoute { return v.Routes }).(GetRouteTableRouteArrayOutput) } // The collection of Subnets associated with this route table. func (o LookupRouteTableResultOutput) Subnets() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupRouteTableResult) []string { return v.Subnets }).(pulumi.StringArrayOutput) } // A mapping of tags assigned to the Route Table. func (o LookupRouteTableResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupRouteTableResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(LookupRouteTableResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getPublicIP.go
sdk/go/azure/network/getPublicIP.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Public IP Address. // // ## Example Usage // // ### Reference An Existing) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.GetPublicIP(ctx, &network.GetPublicIPArgs{ // Name: "name_of_public_ip", // ResourceGroupName: "name_of_resource_group", // }, nil) // if err != nil { // return err // } // ctx.Export("domainNameLabel", example.DomainNameLabel) // ctx.Export("publicIpAddress", example.IpAddress) // return nil // }) // } // // ``` // // ### Retrieve The Dynamic Public IP Of A New VM) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("test-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("test-network"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("acctsub"), // ResourceGroupName: exampleResourceGroup.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("test-pip"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // AllocationMethod: pulumi.String("Dynamic"), // IdleTimeoutInMinutes: pulumi.Int(30), // Tags: pulumi.StringMap{ // "environment": pulumi.String("test"), // }, // }) // if err != nil { // return err // } // exampleNetworkInterface, err := network.NewNetworkInterface(ctx, "example", &network.NetworkInterfaceArgs{ // Name: pulumi.String("test-nic"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // IpConfigurations: network.NetworkInterfaceIpConfigurationArray{ // &network.NetworkInterfaceIpConfigurationArgs{ // Name: pulumi.String("testconfiguration1"), // SubnetId: exampleSubnet.ID(), // PrivateIpAddressAllocation: pulumi.String("Static"), // PrivateIpAddress: pulumi.String("10.0.2.5"), // PublicIpAddressId: examplePublicIp.ID(), // }, // }, // }) // if err != nil { // return err // } // exampleVirtualMachine, err := compute.NewVirtualMachine(ctx, "example", &compute.VirtualMachineArgs{ // Name: pulumi.String("test-vm"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // NetworkInterfaceIds: pulumi.StringArray{ // exampleNetworkInterface.ID(), // }, // }) // if err != nil { // return err // } // example := network.GetPublicIPOutput(ctx, network.GetPublicIPOutputArgs{ // Name: examplePublicIp.Name, // ResourceGroupName: exampleVirtualMachine.ResourceGroupName, // }, nil) // ctx.Export("publicIpAddress", example.ApplyT(func(example network.GetPublicIPResult) (*string, error) { // return &example.IpAddress, nil // }).(pulumi.StringPtrOutput)) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func GetPublicIP(ctx *pulumi.Context, args *GetPublicIPArgs, opts ...pulumi.InvokeOption) (*GetPublicIPResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetPublicIPResult err := ctx.Invoke("azure:network/getPublicIP:getPublicIP", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getPublicIP. type GetPublicIPArgs struct { // Specifies the name of the public IP address. Name string `pulumi:"name"` // Specifies the name of the resource group. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getPublicIP. type GetPublicIPResult struct { // The allocation method for this IP address. Possible values are `Static` or `Dynamic`. AllocationMethod string `pulumi:"allocationMethod"` // The DDoS protection mode of the public IP. DdosProtectionMode string `pulumi:"ddosProtectionMode"` // The ID of DDoS protection plan associated with the public IP. DdosProtectionPlanId string `pulumi:"ddosProtectionPlanId"` // The label for the Domain Name. DomainNameLabel string `pulumi:"domainNameLabel"` // Fully qualified domain name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone. Fqdn string `pulumi:"fqdn"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // Specifies the timeout for the TCP idle connection. IdleTimeoutInMinutes int `pulumi:"idleTimeoutInMinutes"` // The IP address value that was allocated. IpAddress string `pulumi:"ipAddress"` // A mapping of tags to assigned to the resource. IpTags map[string]string `pulumi:"ipTags"` // The IP version being used, for example `IPv4` or `IPv6`. IpVersion string `pulumi:"ipVersion"` // The region that this public ip exists. Location string `pulumi:"location"` Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // The fully qualified domain name that resolves to this public IP address. ReverseFqdn string `pulumi:"reverseFqdn"` // The SKU of the Public IP. Sku string `pulumi:"sku"` // A mapping of tags to assigned to the resource. Tags map[string]string `pulumi:"tags"` // A list of Availability Zones in which this Public IP is located. Zones []string `pulumi:"zones"` } func GetPublicIPOutput(ctx *pulumi.Context, args GetPublicIPOutputArgs, opts ...pulumi.InvokeOption) GetPublicIPResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetPublicIPResultOutput, error) { args := v.(GetPublicIPArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getPublicIP:getPublicIP", args, GetPublicIPResultOutput{}, options).(GetPublicIPResultOutput), nil }).(GetPublicIPResultOutput) } // A collection of arguments for invoking getPublicIP. type GetPublicIPOutputArgs struct { // Specifies the name of the public IP address. Name pulumi.StringInput `pulumi:"name"` // Specifies the name of the resource group. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (GetPublicIPOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetPublicIPArgs)(nil)).Elem() } // A collection of values returned by getPublicIP. type GetPublicIPResultOutput struct{ *pulumi.OutputState } func (GetPublicIPResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetPublicIPResult)(nil)).Elem() } func (o GetPublicIPResultOutput) ToGetPublicIPResultOutput() GetPublicIPResultOutput { return o } func (o GetPublicIPResultOutput) ToGetPublicIPResultOutputWithContext(ctx context.Context) GetPublicIPResultOutput { return o } // The allocation method for this IP address. Possible values are `Static` or `Dynamic`. func (o GetPublicIPResultOutput) AllocationMethod() pulumi.StringOutput { return o.ApplyT(func(v GetPublicIPResult) string { return v.AllocationMethod }).(pulumi.StringOutput) } // The DDoS protection mode of the public IP. func (o GetPublicIPResultOutput) DdosProtectionMode() pulumi.StringOutput { return o.ApplyT(func(v GetPublicIPResult) string { return v.DdosProtectionMode }).(pulumi.StringOutput) } // The ID of DDoS protection plan associated with the public IP. func (o GetPublicIPResultOutput) DdosProtectionPlanId() pulumi.StringOutput { return o.ApplyT(func(v GetPublicIPResult) string { return v.DdosProtectionPlanId }).(pulumi.StringOutput) } // The label for the Domain Name. func (o GetPublicIPResultOutput) DomainNameLabel() pulumi.StringOutput { return o.ApplyT(func(v GetPublicIPResult) string { return v.DomainNameLabel }).(pulumi.StringOutput) } // Fully qualified domain name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone. func (o GetPublicIPResultOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v GetPublicIPResult) string { return v.Fqdn }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o GetPublicIPResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetPublicIPResult) string { return v.Id }).(pulumi.StringOutput) } // Specifies the timeout for the TCP idle connection. func (o GetPublicIPResultOutput) IdleTimeoutInMinutes() pulumi.IntOutput { return o.ApplyT(func(v GetPublicIPResult) int { return v.IdleTimeoutInMinutes }).(pulumi.IntOutput) } // The IP address value that was allocated. func (o GetPublicIPResultOutput) IpAddress() pulumi.StringOutput { return o.ApplyT(func(v GetPublicIPResult) string { return v.IpAddress }).(pulumi.StringOutput) } // A mapping of tags to assigned to the resource. func (o GetPublicIPResultOutput) IpTags() pulumi.StringMapOutput { return o.ApplyT(func(v GetPublicIPResult) map[string]string { return v.IpTags }).(pulumi.StringMapOutput) } // The IP version being used, for example `IPv4` or `IPv6`. func (o GetPublicIPResultOutput) IpVersion() pulumi.StringOutput { return o.ApplyT(func(v GetPublicIPResult) string { return v.IpVersion }).(pulumi.StringOutput) } // The region that this public ip exists. func (o GetPublicIPResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v GetPublicIPResult) string { return v.Location }).(pulumi.StringOutput) } func (o GetPublicIPResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetPublicIPResult) string { return v.Name }).(pulumi.StringOutput) } func (o GetPublicIPResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v GetPublicIPResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // The fully qualified domain name that resolves to this public IP address. func (o GetPublicIPResultOutput) ReverseFqdn() pulumi.StringOutput { return o.ApplyT(func(v GetPublicIPResult) string { return v.ReverseFqdn }).(pulumi.StringOutput) } // The SKU of the Public IP. func (o GetPublicIPResultOutput) Sku() pulumi.StringOutput { return o.ApplyT(func(v GetPublicIPResult) string { return v.Sku }).(pulumi.StringOutput) } // A mapping of tags to assigned to the resource. func (o GetPublicIPResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v GetPublicIPResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // A list of Availability Zones in which this Public IP is located. func (o GetPublicIPResultOutput) Zones() pulumi.StringArrayOutput { return o.ApplyT(func(v GetPublicIPResult) []string { return v.Zones }).(pulumi.StringArrayOutput) } func init() { pulumi.RegisterOutputType(GetPublicIPResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/applicationGateway.go
sdk/go/azure/network/applicationGateway.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // ## Example Usage // // ```go // package main // // import ( // // "fmt" // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-network"), // ResourceGroupName: example.Name, // Location: example.Location, // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.254.0.0/16"), // }, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.254.0.0/24"), // }, // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("example-pip"), // ResourceGroupName: example.Name, // Location: example.Location, // AllocationMethod: pulumi.String("Static"), // }) // if err != nil { // return err // } // backendAddressPoolName := exampleVirtualNetwork.Name.ApplyT(func(name string) (string, error) { // return fmt.Sprintf("%v-beap", name), nil // }).(pulumi.StringOutput) // frontendPortName := exampleVirtualNetwork.Name.ApplyT(func(name string) (string, error) { // return fmt.Sprintf("%v-feport", name), nil // }).(pulumi.StringOutput) // frontendIpConfigurationName := exampleVirtualNetwork.Name.ApplyT(func(name string) (string, error) { // return fmt.Sprintf("%v-feip", name), nil // }).(pulumi.StringOutput) // httpSettingName := exampleVirtualNetwork.Name.ApplyT(func(name string) (string, error) { // return fmt.Sprintf("%v-be-htst", name), nil // }).(pulumi.StringOutput) // listenerName := exampleVirtualNetwork.Name.ApplyT(func(name string) (string, error) { // return fmt.Sprintf("%v-httplstn", name), nil // }).(pulumi.StringOutput) // requestRoutingRuleName := exampleVirtualNetwork.Name.ApplyT(func(name string) (string, error) { // return fmt.Sprintf("%v-rqrt", name), nil // }).(pulumi.StringOutput) // _ = exampleVirtualNetwork.Name.ApplyT(func(name string) (string, error) { // return fmt.Sprintf("%v-rdrcfg", name), nil // }).(pulumi.StringOutput) // _, err = network.NewApplicationGateway(ctx, "network", &network.ApplicationGatewayArgs{ // Name: pulumi.String("example-appgateway"), // ResourceGroupName: example.Name, // Location: example.Location, // Sku: &network.ApplicationGatewaySkuArgs{ // Name: pulumi.String("Standard_v2"), // Tier: pulumi.String("Standard_v2"), // Capacity: pulumi.Int(2), // }, // GatewayIpConfigurations: network.ApplicationGatewayGatewayIpConfigurationArray{ // &network.ApplicationGatewayGatewayIpConfigurationArgs{ // Name: pulumi.String("my-gateway-ip-configuration"), // SubnetId: exampleSubnet.ID(), // }, // }, // FrontendPorts: network.ApplicationGatewayFrontendPortArray{ // &network.ApplicationGatewayFrontendPortArgs{ // Name: pulumi.String(frontendPortName), // Port: pulumi.Int(80), // }, // }, // FrontendIpConfigurations: network.ApplicationGatewayFrontendIpConfigurationArray{ // &network.ApplicationGatewayFrontendIpConfigurationArgs{ // Name: pulumi.String(frontendIpConfigurationName), // PublicIpAddressId: examplePublicIp.ID(), // }, // }, // BackendAddressPools: network.ApplicationGatewayBackendAddressPoolArray{ // &network.ApplicationGatewayBackendAddressPoolArgs{ // Name: pulumi.String(backendAddressPoolName), // }, // }, // BackendHttpSettings: network.ApplicationGatewayBackendHttpSettingArray{ // &network.ApplicationGatewayBackendHttpSettingArgs{ // Name: pulumi.String(httpSettingName), // CookieBasedAffinity: pulumi.String("Disabled"), // Path: pulumi.String("/path1/"), // Port: pulumi.Int(80), // Protocol: pulumi.String("Http"), // RequestTimeout: pulumi.Int(60), // }, // }, // HttpListeners: network.ApplicationGatewayHttpListenerArray{ // &network.ApplicationGatewayHttpListenerArgs{ // Name: pulumi.String(listenerName), // FrontendIpConfigurationName: pulumi.String(frontendIpConfigurationName), // FrontendPortName: pulumi.String(frontendPortName), // Protocol: pulumi.String("Http"), // }, // }, // RequestRoutingRules: network.ApplicationGatewayRequestRoutingRuleArray{ // &network.ApplicationGatewayRequestRoutingRuleArgs{ // Name: pulumi.String(requestRoutingRuleName), // Priority: pulumi.Int(9), // RuleType: pulumi.String("Basic"), // HttpListenerName: pulumi.String(listenerName), // BackendAddressPoolName: pulumi.String(backendAddressPoolName), // BackendHttpSettingsName: pulumi.String(httpSettingName), // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Application Gateway's can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/applicationGateway:ApplicationGateway example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/applicationGateways/myGateway1 // ``` type ApplicationGateway struct { pulumi.CustomResourceState // One or more `authenticationCertificate` blocks as defined below. AuthenticationCertificates ApplicationGatewayAuthenticationCertificateArrayOutput `pulumi:"authenticationCertificates"` // An `autoscaleConfiguration` block as defined below. AutoscaleConfiguration ApplicationGatewayAutoscaleConfigurationPtrOutput `pulumi:"autoscaleConfiguration"` // One or more `backendAddressPool` blocks as defined below. BackendAddressPools ApplicationGatewayBackendAddressPoolArrayOutput `pulumi:"backendAddressPools"` // One or more `backendHttpSettings` blocks as defined below. BackendHttpSettings ApplicationGatewayBackendHttpSettingArrayOutput `pulumi:"backendHttpSettings"` // One or more `customErrorConfiguration` blocks as defined below. CustomErrorConfigurations ApplicationGatewayCustomErrorConfigurationArrayOutput `pulumi:"customErrorConfigurations"` // Is HTTP2 enabled on the application gateway resource? Defaults to `false`. EnableHttp2 pulumi.BoolPtrOutput `pulumi:"enableHttp2"` // Is FIPS enabled on the Application Gateway? FipsEnabled pulumi.BoolPtrOutput `pulumi:"fipsEnabled"` // The ID of the Web Application Firewall Policy. FirewallPolicyId pulumi.StringPtrOutput `pulumi:"firewallPolicyId"` // Is the Firewall Policy associated with the Application Gateway? ForceFirewallPolicyAssociation pulumi.BoolPtrOutput `pulumi:"forceFirewallPolicyAssociation"` // One or more `frontendIpConfiguration` blocks as defined below. FrontendIpConfigurations ApplicationGatewayFrontendIpConfigurationArrayOutput `pulumi:"frontendIpConfigurations"` // One or more `frontendPort` blocks as defined below. FrontendPorts ApplicationGatewayFrontendPortArrayOutput `pulumi:"frontendPorts"` // One or more `gatewayIpConfiguration` blocks as defined below. GatewayIpConfigurations ApplicationGatewayGatewayIpConfigurationArrayOutput `pulumi:"gatewayIpConfigurations"` // A `global` block as defined below. Global ApplicationGatewayGlobalPtrOutput `pulumi:"global"` // One or more `httpListener` blocks as defined below. HttpListeners ApplicationGatewayHttpListenerArrayOutput `pulumi:"httpListeners"` // An `identity` block as defined below. Identity ApplicationGatewayIdentityPtrOutput `pulumi:"identity"` // The Azure region where the Application Gateway should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the Application Gateway. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // A list of `privateEndpointConnection` blocks as defined below. PrivateEndpointConnections ApplicationGatewayPrivateEndpointConnectionArrayOutput `pulumi:"privateEndpointConnections"` // One or more `privateLinkConfiguration` blocks as defined below. PrivateLinkConfigurations ApplicationGatewayPrivateLinkConfigurationArrayOutput `pulumi:"privateLinkConfigurations"` // One or more `probe` blocks as defined below. Probes ApplicationGatewayProbeArrayOutput `pulumi:"probes"` // One or more `redirectConfiguration` blocks as defined below. RedirectConfigurations ApplicationGatewayRedirectConfigurationArrayOutput `pulumi:"redirectConfigurations"` // One or more `requestRoutingRule` blocks as defined below. RequestRoutingRules ApplicationGatewayRequestRoutingRuleArrayOutput `pulumi:"requestRoutingRules"` // The name of the resource group in which to the Application Gateway should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // One or more `rewriteRuleSet` blocks as defined below. Only valid for v2 WAF and Standard SKUs. RewriteRuleSets ApplicationGatewayRewriteRuleSetArrayOutput `pulumi:"rewriteRuleSets"` // A `sku` block as defined below. Sku ApplicationGatewaySkuOutput `pulumi:"sku"` // One or more `sslCertificate` blocks as defined below. SslCertificates ApplicationGatewaySslCertificateArrayOutput `pulumi:"sslCertificates"` // a `sslPolicy` block as defined below. SslPolicy ApplicationGatewaySslPolicyOutput `pulumi:"sslPolicy"` // One or more `sslProfile` blocks as defined below. SslProfiles ApplicationGatewaySslProfileArrayOutput `pulumi:"sslProfiles"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // One or more `trustedClientCertificate` blocks as defined below. TrustedClientCertificates ApplicationGatewayTrustedClientCertificateArrayOutput `pulumi:"trustedClientCertificates"` // One or more `trustedRootCertificate` blocks as defined below. TrustedRootCertificates ApplicationGatewayTrustedRootCertificateArrayOutput `pulumi:"trustedRootCertificates"` // One or more `urlPathMap` blocks as defined below. UrlPathMaps ApplicationGatewayUrlPathMapArrayOutput `pulumi:"urlPathMaps"` // A `wafConfiguration` block as defined below. WafConfiguration ApplicationGatewayWafConfigurationPtrOutput `pulumi:"wafConfiguration"` // Specifies a list of Availability Zones in which this Application Gateway should be located. Changing this forces a new Application Gateway to be created. // // > **Note:** Availability Zones are not supported in all regions at this time, please check the [official documentation](https://docs.microsoft.com/azure/availability-zones/az-overview) for more information. They are also only supported for [v2 SKUs](https://docs.microsoft.com/azure/application-gateway/application-gateway-autoscaling-zone-redundant) Zones pulumi.StringArrayOutput `pulumi:"zones"` } // NewApplicationGateway registers a new resource with the given unique name, arguments, and options. func NewApplicationGateway(ctx *pulumi.Context, name string, args *ApplicationGatewayArgs, opts ...pulumi.ResourceOption) (*ApplicationGateway, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.BackendAddressPools == nil { return nil, errors.New("invalid value for required argument 'BackendAddressPools'") } if args.BackendHttpSettings == nil { return nil, errors.New("invalid value for required argument 'BackendHttpSettings'") } if args.FrontendIpConfigurations == nil { return nil, errors.New("invalid value for required argument 'FrontendIpConfigurations'") } if args.FrontendPorts == nil { return nil, errors.New("invalid value for required argument 'FrontendPorts'") } if args.GatewayIpConfigurations == nil { return nil, errors.New("invalid value for required argument 'GatewayIpConfigurations'") } if args.HttpListeners == nil { return nil, errors.New("invalid value for required argument 'HttpListeners'") } if args.RequestRoutingRules == nil { return nil, errors.New("invalid value for required argument 'RequestRoutingRules'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Sku == nil { return nil, errors.New("invalid value for required argument 'Sku'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ApplicationGateway err := ctx.RegisterResource("azure:network/applicationGateway:ApplicationGateway", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetApplicationGateway gets an existing ApplicationGateway resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetApplicationGateway(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ApplicationGatewayState, opts ...pulumi.ResourceOption) (*ApplicationGateway, error) { var resource ApplicationGateway err := ctx.ReadResource("azure:network/applicationGateway:ApplicationGateway", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ApplicationGateway resources. type applicationGatewayState struct { // One or more `authenticationCertificate` blocks as defined below. AuthenticationCertificates []ApplicationGatewayAuthenticationCertificate `pulumi:"authenticationCertificates"` // An `autoscaleConfiguration` block as defined below. AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `pulumi:"autoscaleConfiguration"` // One or more `backendAddressPool` blocks as defined below. BackendAddressPools []ApplicationGatewayBackendAddressPool `pulumi:"backendAddressPools"` // One or more `backendHttpSettings` blocks as defined below. BackendHttpSettings []ApplicationGatewayBackendHttpSetting `pulumi:"backendHttpSettings"` // One or more `customErrorConfiguration` blocks as defined below. CustomErrorConfigurations []ApplicationGatewayCustomErrorConfiguration `pulumi:"customErrorConfigurations"` // Is HTTP2 enabled on the application gateway resource? Defaults to `false`. EnableHttp2 *bool `pulumi:"enableHttp2"` // Is FIPS enabled on the Application Gateway? FipsEnabled *bool `pulumi:"fipsEnabled"` // The ID of the Web Application Firewall Policy. FirewallPolicyId *string `pulumi:"firewallPolicyId"` // Is the Firewall Policy associated with the Application Gateway? ForceFirewallPolicyAssociation *bool `pulumi:"forceFirewallPolicyAssociation"` // One or more `frontendIpConfiguration` blocks as defined below. FrontendIpConfigurations []ApplicationGatewayFrontendIpConfiguration `pulumi:"frontendIpConfigurations"` // One or more `frontendPort` blocks as defined below. FrontendPorts []ApplicationGatewayFrontendPort `pulumi:"frontendPorts"` // One or more `gatewayIpConfiguration` blocks as defined below. GatewayIpConfigurations []ApplicationGatewayGatewayIpConfiguration `pulumi:"gatewayIpConfigurations"` // A `global` block as defined below. Global *ApplicationGatewayGlobal `pulumi:"global"` // One or more `httpListener` blocks as defined below. HttpListeners []ApplicationGatewayHttpListener `pulumi:"httpListeners"` // An `identity` block as defined below. Identity *ApplicationGatewayIdentity `pulumi:"identity"` // The Azure region where the Application Gateway should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the Application Gateway. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A list of `privateEndpointConnection` blocks as defined below. PrivateEndpointConnections []ApplicationGatewayPrivateEndpointConnection `pulumi:"privateEndpointConnections"` // One or more `privateLinkConfiguration` blocks as defined below. PrivateLinkConfigurations []ApplicationGatewayPrivateLinkConfiguration `pulumi:"privateLinkConfigurations"` // One or more `probe` blocks as defined below. Probes []ApplicationGatewayProbe `pulumi:"probes"` // One or more `redirectConfiguration` blocks as defined below. RedirectConfigurations []ApplicationGatewayRedirectConfiguration `pulumi:"redirectConfigurations"` // One or more `requestRoutingRule` blocks as defined below. RequestRoutingRules []ApplicationGatewayRequestRoutingRule `pulumi:"requestRoutingRules"` // The name of the resource group in which to the Application Gateway should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // One or more `rewriteRuleSet` blocks as defined below. Only valid for v2 WAF and Standard SKUs. RewriteRuleSets []ApplicationGatewayRewriteRuleSet `pulumi:"rewriteRuleSets"` // A `sku` block as defined below. Sku *ApplicationGatewaySku `pulumi:"sku"` // One or more `sslCertificate` blocks as defined below. SslCertificates []ApplicationGatewaySslCertificate `pulumi:"sslCertificates"` // a `sslPolicy` block as defined below. SslPolicy *ApplicationGatewaySslPolicy `pulumi:"sslPolicy"` // One or more `sslProfile` blocks as defined below. SslProfiles []ApplicationGatewaySslProfile `pulumi:"sslProfiles"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // One or more `trustedClientCertificate` blocks as defined below. TrustedClientCertificates []ApplicationGatewayTrustedClientCertificate `pulumi:"trustedClientCertificates"` // One or more `trustedRootCertificate` blocks as defined below. TrustedRootCertificates []ApplicationGatewayTrustedRootCertificate `pulumi:"trustedRootCertificates"` // One or more `urlPathMap` blocks as defined below. UrlPathMaps []ApplicationGatewayUrlPathMap `pulumi:"urlPathMaps"` // A `wafConfiguration` block as defined below. WafConfiguration *ApplicationGatewayWafConfiguration `pulumi:"wafConfiguration"` // Specifies a list of Availability Zones in which this Application Gateway should be located. Changing this forces a new Application Gateway to be created. // // > **Note:** Availability Zones are not supported in all regions at this time, please check the [official documentation](https://docs.microsoft.com/azure/availability-zones/az-overview) for more information. They are also only supported for [v2 SKUs](https://docs.microsoft.com/azure/application-gateway/application-gateway-autoscaling-zone-redundant) Zones []string `pulumi:"zones"` } type ApplicationGatewayState struct { // One or more `authenticationCertificate` blocks as defined below. AuthenticationCertificates ApplicationGatewayAuthenticationCertificateArrayInput // An `autoscaleConfiguration` block as defined below. AutoscaleConfiguration ApplicationGatewayAutoscaleConfigurationPtrInput // One or more `backendAddressPool` blocks as defined below. BackendAddressPools ApplicationGatewayBackendAddressPoolArrayInput // One or more `backendHttpSettings` blocks as defined below. BackendHttpSettings ApplicationGatewayBackendHttpSettingArrayInput // One or more `customErrorConfiguration` blocks as defined below. CustomErrorConfigurations ApplicationGatewayCustomErrorConfigurationArrayInput // Is HTTP2 enabled on the application gateway resource? Defaults to `false`. EnableHttp2 pulumi.BoolPtrInput // Is FIPS enabled on the Application Gateway? FipsEnabled pulumi.BoolPtrInput // The ID of the Web Application Firewall Policy. FirewallPolicyId pulumi.StringPtrInput // Is the Firewall Policy associated with the Application Gateway? ForceFirewallPolicyAssociation pulumi.BoolPtrInput // One or more `frontendIpConfiguration` blocks as defined below. FrontendIpConfigurations ApplicationGatewayFrontendIpConfigurationArrayInput // One or more `frontendPort` blocks as defined below. FrontendPorts ApplicationGatewayFrontendPortArrayInput // One or more `gatewayIpConfiguration` blocks as defined below. GatewayIpConfigurations ApplicationGatewayGatewayIpConfigurationArrayInput // A `global` block as defined below. Global ApplicationGatewayGlobalPtrInput // One or more `httpListener` blocks as defined below. HttpListeners ApplicationGatewayHttpListenerArrayInput // An `identity` block as defined below. Identity ApplicationGatewayIdentityPtrInput // The Azure region where the Application Gateway should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the Application Gateway. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A list of `privateEndpointConnection` blocks as defined below. PrivateEndpointConnections ApplicationGatewayPrivateEndpointConnectionArrayInput // One or more `privateLinkConfiguration` blocks as defined below. PrivateLinkConfigurations ApplicationGatewayPrivateLinkConfigurationArrayInput // One or more `probe` blocks as defined below. Probes ApplicationGatewayProbeArrayInput // One or more `redirectConfiguration` blocks as defined below. RedirectConfigurations ApplicationGatewayRedirectConfigurationArrayInput // One or more `requestRoutingRule` blocks as defined below. RequestRoutingRules ApplicationGatewayRequestRoutingRuleArrayInput // The name of the resource group in which to the Application Gateway should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // One or more `rewriteRuleSet` blocks as defined below. Only valid for v2 WAF and Standard SKUs. RewriteRuleSets ApplicationGatewayRewriteRuleSetArrayInput // A `sku` block as defined below. Sku ApplicationGatewaySkuPtrInput // One or more `sslCertificate` blocks as defined below. SslCertificates ApplicationGatewaySslCertificateArrayInput // a `sslPolicy` block as defined below. SslPolicy ApplicationGatewaySslPolicyPtrInput // One or more `sslProfile` blocks as defined below. SslProfiles ApplicationGatewaySslProfileArrayInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // One or more `trustedClientCertificate` blocks as defined below. TrustedClientCertificates ApplicationGatewayTrustedClientCertificateArrayInput // One or more `trustedRootCertificate` blocks as defined below. TrustedRootCertificates ApplicationGatewayTrustedRootCertificateArrayInput // One or more `urlPathMap` blocks as defined below. UrlPathMaps ApplicationGatewayUrlPathMapArrayInput // A `wafConfiguration` block as defined below. WafConfiguration ApplicationGatewayWafConfigurationPtrInput // Specifies a list of Availability Zones in which this Application Gateway should be located. Changing this forces a new Application Gateway to be created. // // > **Note:** Availability Zones are not supported in all regions at this time, please check the [official documentation](https://docs.microsoft.com/azure/availability-zones/az-overview) for more information. They are also only supported for [v2 SKUs](https://docs.microsoft.com/azure/application-gateway/application-gateway-autoscaling-zone-redundant) Zones pulumi.StringArrayInput } func (ApplicationGatewayState) ElementType() reflect.Type { return reflect.TypeOf((*applicationGatewayState)(nil)).Elem() } type applicationGatewayArgs struct { // One or more `authenticationCertificate` blocks as defined below. AuthenticationCertificates []ApplicationGatewayAuthenticationCertificate `pulumi:"authenticationCertificates"` // An `autoscaleConfiguration` block as defined below. AutoscaleConfiguration *ApplicationGatewayAutoscaleConfiguration `pulumi:"autoscaleConfiguration"` // One or more `backendAddressPool` blocks as defined below. BackendAddressPools []ApplicationGatewayBackendAddressPool `pulumi:"backendAddressPools"` // One or more `backendHttpSettings` blocks as defined below. BackendHttpSettings []ApplicationGatewayBackendHttpSetting `pulumi:"backendHttpSettings"` // One or more `customErrorConfiguration` blocks as defined below. CustomErrorConfigurations []ApplicationGatewayCustomErrorConfiguration `pulumi:"customErrorConfigurations"` // Is HTTP2 enabled on the application gateway resource? Defaults to `false`. EnableHttp2 *bool `pulumi:"enableHttp2"` // Is FIPS enabled on the Application Gateway? FipsEnabled *bool `pulumi:"fipsEnabled"` // The ID of the Web Application Firewall Policy. FirewallPolicyId *string `pulumi:"firewallPolicyId"` // Is the Firewall Policy associated with the Application Gateway? ForceFirewallPolicyAssociation *bool `pulumi:"forceFirewallPolicyAssociation"` // One or more `frontendIpConfiguration` blocks as defined below. FrontendIpConfigurations []ApplicationGatewayFrontendIpConfiguration `pulumi:"frontendIpConfigurations"` // One or more `frontendPort` blocks as defined below. FrontendPorts []ApplicationGatewayFrontendPort `pulumi:"frontendPorts"` // One or more `gatewayIpConfiguration` blocks as defined below. GatewayIpConfigurations []ApplicationGatewayGatewayIpConfiguration `pulumi:"gatewayIpConfigurations"` // A `global` block as defined below. Global *ApplicationGatewayGlobal `pulumi:"global"` // One or more `httpListener` blocks as defined below. HttpListeners []ApplicationGatewayHttpListener `pulumi:"httpListeners"` // An `identity` block as defined below. Identity *ApplicationGatewayIdentity `pulumi:"identity"` // The Azure region where the Application Gateway should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the Application Gateway. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // One or more `privateLinkConfiguration` blocks as defined below. PrivateLinkConfigurations []ApplicationGatewayPrivateLinkConfiguration `pulumi:"privateLinkConfigurations"` // One or more `probe` blocks as defined below. Probes []ApplicationGatewayProbe `pulumi:"probes"` // One or more `redirectConfiguration` blocks as defined below. RedirectConfigurations []ApplicationGatewayRedirectConfiguration `pulumi:"redirectConfigurations"` // One or more `requestRoutingRule` blocks as defined below. RequestRoutingRules []ApplicationGatewayRequestRoutingRule `pulumi:"requestRoutingRules"` // The name of the resource group in which to the Application Gateway should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // One or more `rewriteRuleSet` blocks as defined below. Only valid for v2 WAF and Standard SKUs. RewriteRuleSets []ApplicationGatewayRewriteRuleSet `pulumi:"rewriteRuleSets"` // A `sku` block as defined below. Sku ApplicationGatewaySku `pulumi:"sku"` // One or more `sslCertificate` blocks as defined below. SslCertificates []ApplicationGatewaySslCertificate `pulumi:"sslCertificates"` // a `sslPolicy` block as defined below. SslPolicy *ApplicationGatewaySslPolicy `pulumi:"sslPolicy"` // One or more `sslProfile` blocks as defined below. SslProfiles []ApplicationGatewaySslProfile `pulumi:"sslProfiles"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // One or more `trustedClientCertificate` blocks as defined below. TrustedClientCertificates []ApplicationGatewayTrustedClientCertificate `pulumi:"trustedClientCertificates"` // One or more `trustedRootCertificate` blocks as defined below. TrustedRootCertificates []ApplicationGatewayTrustedRootCertificate `pulumi:"trustedRootCertificates"` // One or more `urlPathMap` blocks as defined below. UrlPathMaps []ApplicationGatewayUrlPathMap `pulumi:"urlPathMaps"` // A `wafConfiguration` block as defined below. WafConfiguration *ApplicationGatewayWafConfiguration `pulumi:"wafConfiguration"` // Specifies a list of Availability Zones in which this Application Gateway should be located. Changing this forces a new Application Gateway to be created. // // > **Note:** Availability Zones are not supported in all regions at this time, please check the [official documentation](https://docs.microsoft.com/azure/availability-zones/az-overview) for more information. They are also only supported for [v2 SKUs](https://docs.microsoft.com/azure/application-gateway/application-gateway-autoscaling-zone-redundant) Zones []string `pulumi:"zones"` } // The set of arguments for constructing a ApplicationGateway resource. type ApplicationGatewayArgs struct { // One or more `authenticationCertificate` blocks as defined below. AuthenticationCertificates ApplicationGatewayAuthenticationCertificateArrayInput // An `autoscaleConfiguration` block as defined below. AutoscaleConfiguration ApplicationGatewayAutoscaleConfigurationPtrInput // One or more `backendAddressPool` blocks as defined below. BackendAddressPools ApplicationGatewayBackendAddressPoolArrayInput // One or more `backendHttpSettings` blocks as defined below. BackendHttpSettings ApplicationGatewayBackendHttpSettingArrayInput // One or more `customErrorConfiguration` blocks as defined below. CustomErrorConfigurations ApplicationGatewayCustomErrorConfigurationArrayInput // Is HTTP2 enabled on the application gateway resource? Defaults to `false`. EnableHttp2 pulumi.BoolPtrInput // Is FIPS enabled on the Application Gateway? FipsEnabled pulumi.BoolPtrInput // The ID of the Web Application Firewall Policy. FirewallPolicyId pulumi.StringPtrInput // Is the Firewall Policy associated with the Application Gateway? ForceFirewallPolicyAssociation pulumi.BoolPtrInput // One or more `frontendIpConfiguration` blocks as defined below. FrontendIpConfigurations ApplicationGatewayFrontendIpConfigurationArrayInput // One or more `frontendPort` blocks as defined below. FrontendPorts ApplicationGatewayFrontendPortArrayInput // One or more `gatewayIpConfiguration` blocks as defined below. GatewayIpConfigurations ApplicationGatewayGatewayIpConfigurationArrayInput // A `global` block as defined below. Global ApplicationGatewayGlobalPtrInput // One or more `httpListener` blocks as defined below. HttpListeners ApplicationGatewayHttpListenerArrayInput // An `identity` block as defined below. Identity ApplicationGatewayIdentityPtrInput // The Azure region where the Application Gateway should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the Application Gateway. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // One or more `privateLinkConfiguration` blocks as defined below. PrivateLinkConfigurations ApplicationGatewayPrivateLinkConfigurationArrayInput // One or more `probe` blocks as defined below. Probes ApplicationGatewayProbeArrayInput // One or more `redirectConfiguration` blocks as defined below. RedirectConfigurations ApplicationGatewayRedirectConfigurationArrayInput // One or more `requestRoutingRule` blocks as defined below. RequestRoutingRules ApplicationGatewayRequestRoutingRuleArrayInput // The name of the resource group in which to the Application Gateway should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // One or more `rewriteRuleSet` blocks as defined below. Only valid for v2 WAF and Standard SKUs. RewriteRuleSets ApplicationGatewayRewriteRuleSetArrayInput // A `sku` block as defined below. Sku ApplicationGatewaySkuInput // One or more `sslCertificate` blocks as defined below. SslCertificates ApplicationGatewaySslCertificateArrayInput // a `sslPolicy` block as defined below. SslPolicy ApplicationGatewaySslPolicyPtrInput
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
true
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/ddosProtectionPlan.go
sdk/go/azure/network/ddosProtectionPlan.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an AzureNetwork DDoS Protection Plan. // // > **Note:** Azure only allows `one` DDoS Protection Plan per region. // // > **Note:** The DDoS Protection Plan is a [high-cost service](https://azure.microsoft.com/en-us/pricing/details/ddos-protection/#pricing). Please keep this in mind while testing and learning. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = network.NewDdosProtectionPlan(ctx, "example", &network.DdosProtectionPlanArgs{ // Name: pulumi.String("example-protection-plan"), // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Azure DDoS Protection Plan can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/ddosProtectionPlan:DdosProtectionPlan example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/ddosProtectionPlans/testddospplan // ``` type DdosProtectionPlan struct { pulumi.CustomResourceState // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies the name of the Network DDoS Protection Plan. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // A list of Virtual Network IDs associated with the DDoS Protection Plan. VirtualNetworkIds pulumi.StringArrayOutput `pulumi:"virtualNetworkIds"` } // NewDdosProtectionPlan registers a new resource with the given unique name, arguments, and options. func NewDdosProtectionPlan(ctx *pulumi.Context, name string, args *DdosProtectionPlanArgs, opts ...pulumi.ResourceOption) (*DdosProtectionPlan, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource DdosProtectionPlan err := ctx.RegisterResource("azure:network/ddosProtectionPlan:DdosProtectionPlan", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDdosProtectionPlan gets an existing DdosProtectionPlan resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetDdosProtectionPlan(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DdosProtectionPlanState, opts ...pulumi.ResourceOption) (*DdosProtectionPlan, error) { var resource DdosProtectionPlan err := ctx.ReadResource("azure:network/ddosProtectionPlan:DdosProtectionPlan", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering DdosProtectionPlan resources. type ddosProtectionPlanState struct { // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of the Network DDoS Protection Plan. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // A list of Virtual Network IDs associated with the DDoS Protection Plan. VirtualNetworkIds []string `pulumi:"virtualNetworkIds"` } type DdosProtectionPlanState struct { // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of the Network DDoS Protection Plan. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // A list of Virtual Network IDs associated with the DDoS Protection Plan. VirtualNetworkIds pulumi.StringArrayInput } func (DdosProtectionPlanState) ElementType() reflect.Type { return reflect.TypeOf((*ddosProtectionPlanState)(nil)).Elem() } type ddosProtectionPlanArgs struct { // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of the Network DDoS Protection Plan. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a DdosProtectionPlan resource. type DdosProtectionPlanArgs struct { // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of the Network DDoS Protection Plan. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (DdosProtectionPlanArgs) ElementType() reflect.Type { return reflect.TypeOf((*ddosProtectionPlanArgs)(nil)).Elem() } type DdosProtectionPlanInput interface { pulumi.Input ToDdosProtectionPlanOutput() DdosProtectionPlanOutput ToDdosProtectionPlanOutputWithContext(ctx context.Context) DdosProtectionPlanOutput } func (*DdosProtectionPlan) ElementType() reflect.Type { return reflect.TypeOf((**DdosProtectionPlan)(nil)).Elem() } func (i *DdosProtectionPlan) ToDdosProtectionPlanOutput() DdosProtectionPlanOutput { return i.ToDdosProtectionPlanOutputWithContext(context.Background()) } func (i *DdosProtectionPlan) ToDdosProtectionPlanOutputWithContext(ctx context.Context) DdosProtectionPlanOutput { return pulumi.ToOutputWithContext(ctx, i).(DdosProtectionPlanOutput) } // DdosProtectionPlanArrayInput is an input type that accepts DdosProtectionPlanArray and DdosProtectionPlanArrayOutput values. // You can construct a concrete instance of `DdosProtectionPlanArrayInput` via: // // DdosProtectionPlanArray{ DdosProtectionPlanArgs{...} } type DdosProtectionPlanArrayInput interface { pulumi.Input ToDdosProtectionPlanArrayOutput() DdosProtectionPlanArrayOutput ToDdosProtectionPlanArrayOutputWithContext(context.Context) DdosProtectionPlanArrayOutput } type DdosProtectionPlanArray []DdosProtectionPlanInput func (DdosProtectionPlanArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*DdosProtectionPlan)(nil)).Elem() } func (i DdosProtectionPlanArray) ToDdosProtectionPlanArrayOutput() DdosProtectionPlanArrayOutput { return i.ToDdosProtectionPlanArrayOutputWithContext(context.Background()) } func (i DdosProtectionPlanArray) ToDdosProtectionPlanArrayOutputWithContext(ctx context.Context) DdosProtectionPlanArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DdosProtectionPlanArrayOutput) } // DdosProtectionPlanMapInput is an input type that accepts DdosProtectionPlanMap and DdosProtectionPlanMapOutput values. // You can construct a concrete instance of `DdosProtectionPlanMapInput` via: // // DdosProtectionPlanMap{ "key": DdosProtectionPlanArgs{...} } type DdosProtectionPlanMapInput interface { pulumi.Input ToDdosProtectionPlanMapOutput() DdosProtectionPlanMapOutput ToDdosProtectionPlanMapOutputWithContext(context.Context) DdosProtectionPlanMapOutput } type DdosProtectionPlanMap map[string]DdosProtectionPlanInput func (DdosProtectionPlanMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DdosProtectionPlan)(nil)).Elem() } func (i DdosProtectionPlanMap) ToDdosProtectionPlanMapOutput() DdosProtectionPlanMapOutput { return i.ToDdosProtectionPlanMapOutputWithContext(context.Background()) } func (i DdosProtectionPlanMap) ToDdosProtectionPlanMapOutputWithContext(ctx context.Context) DdosProtectionPlanMapOutput { return pulumi.ToOutputWithContext(ctx, i).(DdosProtectionPlanMapOutput) } type DdosProtectionPlanOutput struct{ *pulumi.OutputState } func (DdosProtectionPlanOutput) ElementType() reflect.Type { return reflect.TypeOf((**DdosProtectionPlan)(nil)).Elem() } func (o DdosProtectionPlanOutput) ToDdosProtectionPlanOutput() DdosProtectionPlanOutput { return o } func (o DdosProtectionPlanOutput) ToDdosProtectionPlanOutputWithContext(ctx context.Context) DdosProtectionPlanOutput { return o } // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. func (o DdosProtectionPlanOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *DdosProtectionPlan) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name of the Network DDoS Protection Plan. Changing this forces a new resource to be created. func (o DdosProtectionPlanOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *DdosProtectionPlan) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. func (o DdosProtectionPlanOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *DdosProtectionPlan) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o DdosProtectionPlanOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *DdosProtectionPlan) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // A list of Virtual Network IDs associated with the DDoS Protection Plan. func (o DdosProtectionPlanOutput) VirtualNetworkIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *DdosProtectionPlan) pulumi.StringArrayOutput { return v.VirtualNetworkIds }).(pulumi.StringArrayOutput) } type DdosProtectionPlanArrayOutput struct{ *pulumi.OutputState } func (DdosProtectionPlanArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*DdosProtectionPlan)(nil)).Elem() } func (o DdosProtectionPlanArrayOutput) ToDdosProtectionPlanArrayOutput() DdosProtectionPlanArrayOutput { return o } func (o DdosProtectionPlanArrayOutput) ToDdosProtectionPlanArrayOutputWithContext(ctx context.Context) DdosProtectionPlanArrayOutput { return o } func (o DdosProtectionPlanArrayOutput) Index(i pulumi.IntInput) DdosProtectionPlanOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DdosProtectionPlan { return vs[0].([]*DdosProtectionPlan)[vs[1].(int)] }).(DdosProtectionPlanOutput) } type DdosProtectionPlanMapOutput struct{ *pulumi.OutputState } func (DdosProtectionPlanMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DdosProtectionPlan)(nil)).Elem() } func (o DdosProtectionPlanMapOutput) ToDdosProtectionPlanMapOutput() DdosProtectionPlanMapOutput { return o } func (o DdosProtectionPlanMapOutput) ToDdosProtectionPlanMapOutputWithContext(ctx context.Context) DdosProtectionPlanMapOutput { return o } func (o DdosProtectionPlanMapOutput) MapIndex(k pulumi.StringInput) DdosProtectionPlanOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DdosProtectionPlan { return vs[0].(map[string]*DdosProtectionPlan)[vs[1].(string)] }).(DdosProtectionPlanOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DdosProtectionPlanInput)(nil)).Elem(), &DdosProtectionPlan{}) pulumi.RegisterInputType(reflect.TypeOf((*DdosProtectionPlanArrayInput)(nil)).Elem(), DdosProtectionPlanArray{}) pulumi.RegisterInputType(reflect.TypeOf((*DdosProtectionPlanMapInput)(nil)).Elem(), DdosProtectionPlanMap{}) pulumi.RegisterOutputType(DdosProtectionPlanOutput{}) pulumi.RegisterOutputType(DdosProtectionPlanArrayOutput{}) pulumi.RegisterOutputType(DdosProtectionPlanMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getVirtualHubConnection.go
sdk/go/azure/network/getVirtualHubConnection.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Uses this data source to access information about an existing Virtual Hub Connection. // // ## Virtual Hub Connection Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.LookupVirtualHubConnection(ctx, &network.LookupVirtualHubConnectionArgs{ // Name: "example-connection", // ResourceGroupName: "example-resources", // VirtualHubName: "example-hub-name", // }, nil) // if err != nil { // return err // } // ctx.Export("virtualHubConnectionId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func LookupVirtualHubConnection(ctx *pulumi.Context, args *LookupVirtualHubConnectionArgs, opts ...pulumi.InvokeOption) (*LookupVirtualHubConnectionResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupVirtualHubConnectionResult err := ctx.Invoke("azure:network/getVirtualHubConnection:getVirtualHubConnection", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getVirtualHubConnection. type LookupVirtualHubConnectionArgs struct { // The name of the Connection which should be retrieved. Name string `pulumi:"name"` // The Name of the Resource Group where the Virtual Hub Connection exists. ResourceGroupName string `pulumi:"resourceGroupName"` // The name of the Virtual Hub where this Connection exists. VirtualHubName string `pulumi:"virtualHubName"` } // A collection of values returned by getVirtualHubConnection. type LookupVirtualHubConnectionResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // Whether Internet Security is enabled to secure internet traffic on this connection InternetSecurityEnabled bool `pulumi:"internetSecurityEnabled"` // The name which is used for this Static Route. Name string `pulumi:"name"` // The ID of the Virtual Network which the Virtual Hub is connected RemoteVirtualNetworkId string `pulumi:"remoteVirtualNetworkId"` ResourceGroupName string `pulumi:"resourceGroupName"` // A `routing` block as defined below. Routings []GetVirtualHubConnectionRouting `pulumi:"routings"` // The ID of the Virtual Hub within which this connection is created VirtualHubId string `pulumi:"virtualHubId"` VirtualHubName string `pulumi:"virtualHubName"` } func LookupVirtualHubConnectionOutput(ctx *pulumi.Context, args LookupVirtualHubConnectionOutputArgs, opts ...pulumi.InvokeOption) LookupVirtualHubConnectionResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupVirtualHubConnectionResultOutput, error) { args := v.(LookupVirtualHubConnectionArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getVirtualHubConnection:getVirtualHubConnection", args, LookupVirtualHubConnectionResultOutput{}, options).(LookupVirtualHubConnectionResultOutput), nil }).(LookupVirtualHubConnectionResultOutput) } // A collection of arguments for invoking getVirtualHubConnection. type LookupVirtualHubConnectionOutputArgs struct { // The name of the Connection which should be retrieved. Name pulumi.StringInput `pulumi:"name"` // The Name of the Resource Group where the Virtual Hub Connection exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` // The name of the Virtual Hub where this Connection exists. VirtualHubName pulumi.StringInput `pulumi:"virtualHubName"` } func (LookupVirtualHubConnectionOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupVirtualHubConnectionArgs)(nil)).Elem() } // A collection of values returned by getVirtualHubConnection. type LookupVirtualHubConnectionResultOutput struct{ *pulumi.OutputState } func (LookupVirtualHubConnectionResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupVirtualHubConnectionResult)(nil)).Elem() } func (o LookupVirtualHubConnectionResultOutput) ToLookupVirtualHubConnectionResultOutput() LookupVirtualHubConnectionResultOutput { return o } func (o LookupVirtualHubConnectionResultOutput) ToLookupVirtualHubConnectionResultOutputWithContext(ctx context.Context) LookupVirtualHubConnectionResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o LookupVirtualHubConnectionResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualHubConnectionResult) string { return v.Id }).(pulumi.StringOutput) } // Whether Internet Security is enabled to secure internet traffic on this connection func (o LookupVirtualHubConnectionResultOutput) InternetSecurityEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupVirtualHubConnectionResult) bool { return v.InternetSecurityEnabled }).(pulumi.BoolOutput) } // The name which is used for this Static Route. func (o LookupVirtualHubConnectionResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualHubConnectionResult) string { return v.Name }).(pulumi.StringOutput) } // The ID of the Virtual Network which the Virtual Hub is connected func (o LookupVirtualHubConnectionResultOutput) RemoteVirtualNetworkId() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualHubConnectionResult) string { return v.RemoteVirtualNetworkId }).(pulumi.StringOutput) } func (o LookupVirtualHubConnectionResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualHubConnectionResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A `routing` block as defined below. func (o LookupVirtualHubConnectionResultOutput) Routings() GetVirtualHubConnectionRoutingArrayOutput { return o.ApplyT(func(v LookupVirtualHubConnectionResult) []GetVirtualHubConnectionRouting { return v.Routings }).(GetVirtualHubConnectionRoutingArrayOutput) } // The ID of the Virtual Hub within which this connection is created func (o LookupVirtualHubConnectionResultOutput) VirtualHubId() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualHubConnectionResult) string { return v.VirtualHubId }).(pulumi.StringOutput) } func (o LookupVirtualHubConnectionResultOutput) VirtualHubName() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualHubConnectionResult) string { return v.VirtualHubName }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupVirtualHubConnectionResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/networkManagerSecurityAdminConfiguration.go
sdk/go/azure/network/networkManagerSecurityAdminConfiguration.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Network Manager Security Admin Configuration. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // exampleNetworkManager, err := network.NewNetworkManager(ctx, "example", &network.NetworkManagerArgs{ // Name: pulumi.String("example-network-manager"), // Location: example.Location, // ResourceGroupName: example.Name, // Scope: &network.NetworkManagerScopeArgs{ // SubscriptionIds: pulumi.StringArray{ // pulumi.String(current.Id), // }, // }, // ScopeAccesses: pulumi.StringArray{ // pulumi.String("Connectivity"), // pulumi.String("SecurityAdmin"), // }, // Description: pulumi.String("example network manager"), // }) // if err != nil { // return err // } // _, err = network.NewNetworkManagerNetworkGroup(ctx, "example", &network.NetworkManagerNetworkGroupArgs{ // Name: pulumi.String("example-network-group"), // NetworkManagerId: exampleNetworkManager.ID(), // }) // if err != nil { // return err // } // _, err = network.NewNetworkManagerSecurityAdminConfiguration(ctx, "example", &network.NetworkManagerSecurityAdminConfigurationArgs{ // Name: pulumi.String("example-admin-conf"), // NetworkManagerId: exampleNetworkManager.ID(), // Description: pulumi.String("example admin conf"), // ApplyOnNetworkIntentPolicyBasedServices: pulumi.String("None"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Network Manager Security Admin Configuration can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/networkManagerSecurityAdminConfiguration:NetworkManagerSecurityAdminConfiguration example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Network/networkManagers/networkManager1/securityAdminConfigurations/configuration1 // ``` type NetworkManagerSecurityAdminConfiguration struct { pulumi.CustomResourceState // A list of network intent policy based services. Possible values are `All`, `None` and `AllowRulesOnly`. Exactly one value should be set. The `All` option requires `Microsoft.Network/AllowAdminRulesOnNipBasedServices` feature registration to Subscription. Please see [this document](https://learn.microsoft.com/en-us/azure/virtual-network-manager/concept-security-admins#network-intent-policies-and-security-admin-rules) for more information. ApplyOnNetworkIntentPolicyBasedServices pulumi.StringPtrOutput `pulumi:"applyOnNetworkIntentPolicyBasedServices"` // A description of the Security Admin Configuration. Description pulumi.StringPtrOutput `pulumi:"description"` // Specifies the name which should be used for this Network Manager Security Admin Configuration. Changing this forces a new Network Manager Security Admin Configuration to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the ID of the Network Manager Security Admin Configuration. Changing this forces a new Network Manager Security Admin Configuration to be created. NetworkManagerId pulumi.StringOutput `pulumi:"networkManagerId"` } // NewNetworkManagerSecurityAdminConfiguration registers a new resource with the given unique name, arguments, and options. func NewNetworkManagerSecurityAdminConfiguration(ctx *pulumi.Context, name string, args *NetworkManagerSecurityAdminConfigurationArgs, opts ...pulumi.ResourceOption) (*NetworkManagerSecurityAdminConfiguration, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.NetworkManagerId == nil { return nil, errors.New("invalid value for required argument 'NetworkManagerId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkManagerSecurityAdminConfiguration err := ctx.RegisterResource("azure:network/networkManagerSecurityAdminConfiguration:NetworkManagerSecurityAdminConfiguration", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkManagerSecurityAdminConfiguration gets an existing NetworkManagerSecurityAdminConfiguration resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetNetworkManagerSecurityAdminConfiguration(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkManagerSecurityAdminConfigurationState, opts ...pulumi.ResourceOption) (*NetworkManagerSecurityAdminConfiguration, error) { var resource NetworkManagerSecurityAdminConfiguration err := ctx.ReadResource("azure:network/networkManagerSecurityAdminConfiguration:NetworkManagerSecurityAdminConfiguration", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkManagerSecurityAdminConfiguration resources. type networkManagerSecurityAdminConfigurationState struct { // A list of network intent policy based services. Possible values are `All`, `None` and `AllowRulesOnly`. Exactly one value should be set. The `All` option requires `Microsoft.Network/AllowAdminRulesOnNipBasedServices` feature registration to Subscription. Please see [this document](https://learn.microsoft.com/en-us/azure/virtual-network-manager/concept-security-admins#network-intent-policies-and-security-admin-rules) for more information. ApplyOnNetworkIntentPolicyBasedServices *string `pulumi:"applyOnNetworkIntentPolicyBasedServices"` // A description of the Security Admin Configuration. Description *string `pulumi:"description"` // Specifies the name which should be used for this Network Manager Security Admin Configuration. Changing this forces a new Network Manager Security Admin Configuration to be created. Name *string `pulumi:"name"` // Specifies the ID of the Network Manager Security Admin Configuration. Changing this forces a new Network Manager Security Admin Configuration to be created. NetworkManagerId *string `pulumi:"networkManagerId"` } type NetworkManagerSecurityAdminConfigurationState struct { // A list of network intent policy based services. Possible values are `All`, `None` and `AllowRulesOnly`. Exactly one value should be set. The `All` option requires `Microsoft.Network/AllowAdminRulesOnNipBasedServices` feature registration to Subscription. Please see [this document](https://learn.microsoft.com/en-us/azure/virtual-network-manager/concept-security-admins#network-intent-policies-and-security-admin-rules) for more information. ApplyOnNetworkIntentPolicyBasedServices pulumi.StringPtrInput // A description of the Security Admin Configuration. Description pulumi.StringPtrInput // Specifies the name which should be used for this Network Manager Security Admin Configuration. Changing this forces a new Network Manager Security Admin Configuration to be created. Name pulumi.StringPtrInput // Specifies the ID of the Network Manager Security Admin Configuration. Changing this forces a new Network Manager Security Admin Configuration to be created. NetworkManagerId pulumi.StringPtrInput } func (NetworkManagerSecurityAdminConfigurationState) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerSecurityAdminConfigurationState)(nil)).Elem() } type networkManagerSecurityAdminConfigurationArgs struct { // A list of network intent policy based services. Possible values are `All`, `None` and `AllowRulesOnly`. Exactly one value should be set. The `All` option requires `Microsoft.Network/AllowAdminRulesOnNipBasedServices` feature registration to Subscription. Please see [this document](https://learn.microsoft.com/en-us/azure/virtual-network-manager/concept-security-admins#network-intent-policies-and-security-admin-rules) for more information. ApplyOnNetworkIntentPolicyBasedServices *string `pulumi:"applyOnNetworkIntentPolicyBasedServices"` // A description of the Security Admin Configuration. Description *string `pulumi:"description"` // Specifies the name which should be used for this Network Manager Security Admin Configuration. Changing this forces a new Network Manager Security Admin Configuration to be created. Name *string `pulumi:"name"` // Specifies the ID of the Network Manager Security Admin Configuration. Changing this forces a new Network Manager Security Admin Configuration to be created. NetworkManagerId string `pulumi:"networkManagerId"` } // The set of arguments for constructing a NetworkManagerSecurityAdminConfiguration resource. type NetworkManagerSecurityAdminConfigurationArgs struct { // A list of network intent policy based services. Possible values are `All`, `None` and `AllowRulesOnly`. Exactly one value should be set. The `All` option requires `Microsoft.Network/AllowAdminRulesOnNipBasedServices` feature registration to Subscription. Please see [this document](https://learn.microsoft.com/en-us/azure/virtual-network-manager/concept-security-admins#network-intent-policies-and-security-admin-rules) for more information. ApplyOnNetworkIntentPolicyBasedServices pulumi.StringPtrInput // A description of the Security Admin Configuration. Description pulumi.StringPtrInput // Specifies the name which should be used for this Network Manager Security Admin Configuration. Changing this forces a new Network Manager Security Admin Configuration to be created. Name pulumi.StringPtrInput // Specifies the ID of the Network Manager Security Admin Configuration. Changing this forces a new Network Manager Security Admin Configuration to be created. NetworkManagerId pulumi.StringInput } func (NetworkManagerSecurityAdminConfigurationArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerSecurityAdminConfigurationArgs)(nil)).Elem() } type NetworkManagerSecurityAdminConfigurationInput interface { pulumi.Input ToNetworkManagerSecurityAdminConfigurationOutput() NetworkManagerSecurityAdminConfigurationOutput ToNetworkManagerSecurityAdminConfigurationOutputWithContext(ctx context.Context) NetworkManagerSecurityAdminConfigurationOutput } func (*NetworkManagerSecurityAdminConfiguration) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerSecurityAdminConfiguration)(nil)).Elem() } func (i *NetworkManagerSecurityAdminConfiguration) ToNetworkManagerSecurityAdminConfigurationOutput() NetworkManagerSecurityAdminConfigurationOutput { return i.ToNetworkManagerSecurityAdminConfigurationOutputWithContext(context.Background()) } func (i *NetworkManagerSecurityAdminConfiguration) ToNetworkManagerSecurityAdminConfigurationOutputWithContext(ctx context.Context) NetworkManagerSecurityAdminConfigurationOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerSecurityAdminConfigurationOutput) } // NetworkManagerSecurityAdminConfigurationArrayInput is an input type that accepts NetworkManagerSecurityAdminConfigurationArray and NetworkManagerSecurityAdminConfigurationArrayOutput values. // You can construct a concrete instance of `NetworkManagerSecurityAdminConfigurationArrayInput` via: // // NetworkManagerSecurityAdminConfigurationArray{ NetworkManagerSecurityAdminConfigurationArgs{...} } type NetworkManagerSecurityAdminConfigurationArrayInput interface { pulumi.Input ToNetworkManagerSecurityAdminConfigurationArrayOutput() NetworkManagerSecurityAdminConfigurationArrayOutput ToNetworkManagerSecurityAdminConfigurationArrayOutputWithContext(context.Context) NetworkManagerSecurityAdminConfigurationArrayOutput } type NetworkManagerSecurityAdminConfigurationArray []NetworkManagerSecurityAdminConfigurationInput func (NetworkManagerSecurityAdminConfigurationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerSecurityAdminConfiguration)(nil)).Elem() } func (i NetworkManagerSecurityAdminConfigurationArray) ToNetworkManagerSecurityAdminConfigurationArrayOutput() NetworkManagerSecurityAdminConfigurationArrayOutput { return i.ToNetworkManagerSecurityAdminConfigurationArrayOutputWithContext(context.Background()) } func (i NetworkManagerSecurityAdminConfigurationArray) ToNetworkManagerSecurityAdminConfigurationArrayOutputWithContext(ctx context.Context) NetworkManagerSecurityAdminConfigurationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerSecurityAdminConfigurationArrayOutput) } // NetworkManagerSecurityAdminConfigurationMapInput is an input type that accepts NetworkManagerSecurityAdminConfigurationMap and NetworkManagerSecurityAdminConfigurationMapOutput values. // You can construct a concrete instance of `NetworkManagerSecurityAdminConfigurationMapInput` via: // // NetworkManagerSecurityAdminConfigurationMap{ "key": NetworkManagerSecurityAdminConfigurationArgs{...} } type NetworkManagerSecurityAdminConfigurationMapInput interface { pulumi.Input ToNetworkManagerSecurityAdminConfigurationMapOutput() NetworkManagerSecurityAdminConfigurationMapOutput ToNetworkManagerSecurityAdminConfigurationMapOutputWithContext(context.Context) NetworkManagerSecurityAdminConfigurationMapOutput } type NetworkManagerSecurityAdminConfigurationMap map[string]NetworkManagerSecurityAdminConfigurationInput func (NetworkManagerSecurityAdminConfigurationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerSecurityAdminConfiguration)(nil)).Elem() } func (i NetworkManagerSecurityAdminConfigurationMap) ToNetworkManagerSecurityAdminConfigurationMapOutput() NetworkManagerSecurityAdminConfigurationMapOutput { return i.ToNetworkManagerSecurityAdminConfigurationMapOutputWithContext(context.Background()) } func (i NetworkManagerSecurityAdminConfigurationMap) ToNetworkManagerSecurityAdminConfigurationMapOutputWithContext(ctx context.Context) NetworkManagerSecurityAdminConfigurationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerSecurityAdminConfigurationMapOutput) } type NetworkManagerSecurityAdminConfigurationOutput struct{ *pulumi.OutputState } func (NetworkManagerSecurityAdminConfigurationOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerSecurityAdminConfiguration)(nil)).Elem() } func (o NetworkManagerSecurityAdminConfigurationOutput) ToNetworkManagerSecurityAdminConfigurationOutput() NetworkManagerSecurityAdminConfigurationOutput { return o } func (o NetworkManagerSecurityAdminConfigurationOutput) ToNetworkManagerSecurityAdminConfigurationOutputWithContext(ctx context.Context) NetworkManagerSecurityAdminConfigurationOutput { return o } // A list of network intent policy based services. Possible values are `All`, `None` and `AllowRulesOnly`. Exactly one value should be set. The `All` option requires `Microsoft.Network/AllowAdminRulesOnNipBasedServices` feature registration to Subscription. Please see [this document](https://learn.microsoft.com/en-us/azure/virtual-network-manager/concept-security-admins#network-intent-policies-and-security-admin-rules) for more information. func (o NetworkManagerSecurityAdminConfigurationOutput) ApplyOnNetworkIntentPolicyBasedServices() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkManagerSecurityAdminConfiguration) pulumi.StringPtrOutput { return v.ApplyOnNetworkIntentPolicyBasedServices }).(pulumi.StringPtrOutput) } // A description of the Security Admin Configuration. func (o NetworkManagerSecurityAdminConfigurationOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkManagerSecurityAdminConfiguration) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // Specifies the name which should be used for this Network Manager Security Admin Configuration. Changing this forces a new Network Manager Security Admin Configuration to be created. func (o NetworkManagerSecurityAdminConfigurationOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerSecurityAdminConfiguration) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the ID of the Network Manager Security Admin Configuration. Changing this forces a new Network Manager Security Admin Configuration to be created. func (o NetworkManagerSecurityAdminConfigurationOutput) NetworkManagerId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerSecurityAdminConfiguration) pulumi.StringOutput { return v.NetworkManagerId }).(pulumi.StringOutput) } type NetworkManagerSecurityAdminConfigurationArrayOutput struct{ *pulumi.OutputState } func (NetworkManagerSecurityAdminConfigurationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerSecurityAdminConfiguration)(nil)).Elem() } func (o NetworkManagerSecurityAdminConfigurationArrayOutput) ToNetworkManagerSecurityAdminConfigurationArrayOutput() NetworkManagerSecurityAdminConfigurationArrayOutput { return o } func (o NetworkManagerSecurityAdminConfigurationArrayOutput) ToNetworkManagerSecurityAdminConfigurationArrayOutputWithContext(ctx context.Context) NetworkManagerSecurityAdminConfigurationArrayOutput { return o } func (o NetworkManagerSecurityAdminConfigurationArrayOutput) Index(i pulumi.IntInput) NetworkManagerSecurityAdminConfigurationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkManagerSecurityAdminConfiguration { return vs[0].([]*NetworkManagerSecurityAdminConfiguration)[vs[1].(int)] }).(NetworkManagerSecurityAdminConfigurationOutput) } type NetworkManagerSecurityAdminConfigurationMapOutput struct{ *pulumi.OutputState } func (NetworkManagerSecurityAdminConfigurationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerSecurityAdminConfiguration)(nil)).Elem() } func (o NetworkManagerSecurityAdminConfigurationMapOutput) ToNetworkManagerSecurityAdminConfigurationMapOutput() NetworkManagerSecurityAdminConfigurationMapOutput { return o } func (o NetworkManagerSecurityAdminConfigurationMapOutput) ToNetworkManagerSecurityAdminConfigurationMapOutputWithContext(ctx context.Context) NetworkManagerSecurityAdminConfigurationMapOutput { return o } func (o NetworkManagerSecurityAdminConfigurationMapOutput) MapIndex(k pulumi.StringInput) NetworkManagerSecurityAdminConfigurationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkManagerSecurityAdminConfiguration { return vs[0].(map[string]*NetworkManagerSecurityAdminConfiguration)[vs[1].(string)] }).(NetworkManagerSecurityAdminConfigurationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerSecurityAdminConfigurationInput)(nil)).Elem(), &NetworkManagerSecurityAdminConfiguration{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerSecurityAdminConfigurationArrayInput)(nil)).Elem(), NetworkManagerSecurityAdminConfigurationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerSecurityAdminConfigurationMapInput)(nil)).Elem(), NetworkManagerSecurityAdminConfigurationMap{}) pulumi.RegisterOutputType(NetworkManagerSecurityAdminConfigurationOutput{}) pulumi.RegisterOutputType(NetworkManagerSecurityAdminConfigurationArrayOutput{}) pulumi.RegisterOutputType(NetworkManagerSecurityAdminConfigurationMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/natGatewayPublicIpPrefixAssociation.go
sdk/go/azure/network/natGatewayPublicIpPrefixAssociation.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages the association between a NAT Gateway and a Public IP Prefix. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // examplePublicIpPrefix, err := network.NewPublicIpPrefix(ctx, "example", &network.PublicIpPrefixArgs{ // Name: pulumi.String("example"), // Location: example.Location, // ResourceGroupName: example.Name, // PrefixLength: pulumi.Int(30), // Zones: pulumi.StringArray{ // pulumi.String("1"), // }, // }) // if err != nil { // return err // } // exampleNatGateway, err := network.NewNatGateway(ctx, "example", &network.NatGatewayArgs{ // Name: pulumi.String("example-NatGateway"), // Location: example.Location, // ResourceGroupName: example.Name, // SkuName: pulumi.String("Standard"), // }) // if err != nil { // return err // } // _, err = network.NewNatGatewayPublicIpPrefixAssociation(ctx, "example", &network.NatGatewayPublicIpPrefixAssociationArgs{ // NatGatewayId: exampleNatGateway.ID(), // PublicIpPrefixId: examplePublicIpPrefix.ID(), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Associations between NAT Gateway and Public IP Prefixes can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/natGatewayPublicIpPrefixAssociation:NatGatewayPublicIpPrefixAssociation example "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/natGateways/gateway1|/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/publicIPPrefixes/myPublicIpPrefix1" // ``` type NatGatewayPublicIpPrefixAssociation struct { pulumi.CustomResourceState // The ID of the NAT Gateway. Changing this forces a new resource to be created. NatGatewayId pulumi.StringOutput `pulumi:"natGatewayId"` // The ID of the Public IP Prefix which this NAT Gateway which should be connected to. Changing this forces a new resource to be created. PublicIpPrefixId pulumi.StringOutput `pulumi:"publicIpPrefixId"` } // NewNatGatewayPublicIpPrefixAssociation registers a new resource with the given unique name, arguments, and options. func NewNatGatewayPublicIpPrefixAssociation(ctx *pulumi.Context, name string, args *NatGatewayPublicIpPrefixAssociationArgs, opts ...pulumi.ResourceOption) (*NatGatewayPublicIpPrefixAssociation, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.NatGatewayId == nil { return nil, errors.New("invalid value for required argument 'NatGatewayId'") } if args.PublicIpPrefixId == nil { return nil, errors.New("invalid value for required argument 'PublicIpPrefixId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NatGatewayPublicIpPrefixAssociation err := ctx.RegisterResource("azure:network/natGatewayPublicIpPrefixAssociation:NatGatewayPublicIpPrefixAssociation", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNatGatewayPublicIpPrefixAssociation gets an existing NatGatewayPublicIpPrefixAssociation resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetNatGatewayPublicIpPrefixAssociation(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NatGatewayPublicIpPrefixAssociationState, opts ...pulumi.ResourceOption) (*NatGatewayPublicIpPrefixAssociation, error) { var resource NatGatewayPublicIpPrefixAssociation err := ctx.ReadResource("azure:network/natGatewayPublicIpPrefixAssociation:NatGatewayPublicIpPrefixAssociation", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NatGatewayPublicIpPrefixAssociation resources. type natGatewayPublicIpPrefixAssociationState struct { // The ID of the NAT Gateway. Changing this forces a new resource to be created. NatGatewayId *string `pulumi:"natGatewayId"` // The ID of the Public IP Prefix which this NAT Gateway which should be connected to. Changing this forces a new resource to be created. PublicIpPrefixId *string `pulumi:"publicIpPrefixId"` } type NatGatewayPublicIpPrefixAssociationState struct { // The ID of the NAT Gateway. Changing this forces a new resource to be created. NatGatewayId pulumi.StringPtrInput // The ID of the Public IP Prefix which this NAT Gateway which should be connected to. Changing this forces a new resource to be created. PublicIpPrefixId pulumi.StringPtrInput } func (NatGatewayPublicIpPrefixAssociationState) ElementType() reflect.Type { return reflect.TypeOf((*natGatewayPublicIpPrefixAssociationState)(nil)).Elem() } type natGatewayPublicIpPrefixAssociationArgs struct { // The ID of the NAT Gateway. Changing this forces a new resource to be created. NatGatewayId string `pulumi:"natGatewayId"` // The ID of the Public IP Prefix which this NAT Gateway which should be connected to. Changing this forces a new resource to be created. PublicIpPrefixId string `pulumi:"publicIpPrefixId"` } // The set of arguments for constructing a NatGatewayPublicIpPrefixAssociation resource. type NatGatewayPublicIpPrefixAssociationArgs struct { // The ID of the NAT Gateway. Changing this forces a new resource to be created. NatGatewayId pulumi.StringInput // The ID of the Public IP Prefix which this NAT Gateway which should be connected to. Changing this forces a new resource to be created. PublicIpPrefixId pulumi.StringInput } func (NatGatewayPublicIpPrefixAssociationArgs) ElementType() reflect.Type { return reflect.TypeOf((*natGatewayPublicIpPrefixAssociationArgs)(nil)).Elem() } type NatGatewayPublicIpPrefixAssociationInput interface { pulumi.Input ToNatGatewayPublicIpPrefixAssociationOutput() NatGatewayPublicIpPrefixAssociationOutput ToNatGatewayPublicIpPrefixAssociationOutputWithContext(ctx context.Context) NatGatewayPublicIpPrefixAssociationOutput } func (*NatGatewayPublicIpPrefixAssociation) ElementType() reflect.Type { return reflect.TypeOf((**NatGatewayPublicIpPrefixAssociation)(nil)).Elem() } func (i *NatGatewayPublicIpPrefixAssociation) ToNatGatewayPublicIpPrefixAssociationOutput() NatGatewayPublicIpPrefixAssociationOutput { return i.ToNatGatewayPublicIpPrefixAssociationOutputWithContext(context.Background()) } func (i *NatGatewayPublicIpPrefixAssociation) ToNatGatewayPublicIpPrefixAssociationOutputWithContext(ctx context.Context) NatGatewayPublicIpPrefixAssociationOutput { return pulumi.ToOutputWithContext(ctx, i).(NatGatewayPublicIpPrefixAssociationOutput) } // NatGatewayPublicIpPrefixAssociationArrayInput is an input type that accepts NatGatewayPublicIpPrefixAssociationArray and NatGatewayPublicIpPrefixAssociationArrayOutput values. // You can construct a concrete instance of `NatGatewayPublicIpPrefixAssociationArrayInput` via: // // NatGatewayPublicIpPrefixAssociationArray{ NatGatewayPublicIpPrefixAssociationArgs{...} } type NatGatewayPublicIpPrefixAssociationArrayInput interface { pulumi.Input ToNatGatewayPublicIpPrefixAssociationArrayOutput() NatGatewayPublicIpPrefixAssociationArrayOutput ToNatGatewayPublicIpPrefixAssociationArrayOutputWithContext(context.Context) NatGatewayPublicIpPrefixAssociationArrayOutput } type NatGatewayPublicIpPrefixAssociationArray []NatGatewayPublicIpPrefixAssociationInput func (NatGatewayPublicIpPrefixAssociationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NatGatewayPublicIpPrefixAssociation)(nil)).Elem() } func (i NatGatewayPublicIpPrefixAssociationArray) ToNatGatewayPublicIpPrefixAssociationArrayOutput() NatGatewayPublicIpPrefixAssociationArrayOutput { return i.ToNatGatewayPublicIpPrefixAssociationArrayOutputWithContext(context.Background()) } func (i NatGatewayPublicIpPrefixAssociationArray) ToNatGatewayPublicIpPrefixAssociationArrayOutputWithContext(ctx context.Context) NatGatewayPublicIpPrefixAssociationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NatGatewayPublicIpPrefixAssociationArrayOutput) } // NatGatewayPublicIpPrefixAssociationMapInput is an input type that accepts NatGatewayPublicIpPrefixAssociationMap and NatGatewayPublicIpPrefixAssociationMapOutput values. // You can construct a concrete instance of `NatGatewayPublicIpPrefixAssociationMapInput` via: // // NatGatewayPublicIpPrefixAssociationMap{ "key": NatGatewayPublicIpPrefixAssociationArgs{...} } type NatGatewayPublicIpPrefixAssociationMapInput interface { pulumi.Input ToNatGatewayPublicIpPrefixAssociationMapOutput() NatGatewayPublicIpPrefixAssociationMapOutput ToNatGatewayPublicIpPrefixAssociationMapOutputWithContext(context.Context) NatGatewayPublicIpPrefixAssociationMapOutput } type NatGatewayPublicIpPrefixAssociationMap map[string]NatGatewayPublicIpPrefixAssociationInput func (NatGatewayPublicIpPrefixAssociationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NatGatewayPublicIpPrefixAssociation)(nil)).Elem() } func (i NatGatewayPublicIpPrefixAssociationMap) ToNatGatewayPublicIpPrefixAssociationMapOutput() NatGatewayPublicIpPrefixAssociationMapOutput { return i.ToNatGatewayPublicIpPrefixAssociationMapOutputWithContext(context.Background()) } func (i NatGatewayPublicIpPrefixAssociationMap) ToNatGatewayPublicIpPrefixAssociationMapOutputWithContext(ctx context.Context) NatGatewayPublicIpPrefixAssociationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NatGatewayPublicIpPrefixAssociationMapOutput) } type NatGatewayPublicIpPrefixAssociationOutput struct{ *pulumi.OutputState } func (NatGatewayPublicIpPrefixAssociationOutput) ElementType() reflect.Type { return reflect.TypeOf((**NatGatewayPublicIpPrefixAssociation)(nil)).Elem() } func (o NatGatewayPublicIpPrefixAssociationOutput) ToNatGatewayPublicIpPrefixAssociationOutput() NatGatewayPublicIpPrefixAssociationOutput { return o } func (o NatGatewayPublicIpPrefixAssociationOutput) ToNatGatewayPublicIpPrefixAssociationOutputWithContext(ctx context.Context) NatGatewayPublicIpPrefixAssociationOutput { return o } // The ID of the NAT Gateway. Changing this forces a new resource to be created. func (o NatGatewayPublicIpPrefixAssociationOutput) NatGatewayId() pulumi.StringOutput { return o.ApplyT(func(v *NatGatewayPublicIpPrefixAssociation) pulumi.StringOutput { return v.NatGatewayId }).(pulumi.StringOutput) } // The ID of the Public IP Prefix which this NAT Gateway which should be connected to. Changing this forces a new resource to be created. func (o NatGatewayPublicIpPrefixAssociationOutput) PublicIpPrefixId() pulumi.StringOutput { return o.ApplyT(func(v *NatGatewayPublicIpPrefixAssociation) pulumi.StringOutput { return v.PublicIpPrefixId }).(pulumi.StringOutput) } type NatGatewayPublicIpPrefixAssociationArrayOutput struct{ *pulumi.OutputState } func (NatGatewayPublicIpPrefixAssociationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NatGatewayPublicIpPrefixAssociation)(nil)).Elem() } func (o NatGatewayPublicIpPrefixAssociationArrayOutput) ToNatGatewayPublicIpPrefixAssociationArrayOutput() NatGatewayPublicIpPrefixAssociationArrayOutput { return o } func (o NatGatewayPublicIpPrefixAssociationArrayOutput) ToNatGatewayPublicIpPrefixAssociationArrayOutputWithContext(ctx context.Context) NatGatewayPublicIpPrefixAssociationArrayOutput { return o } func (o NatGatewayPublicIpPrefixAssociationArrayOutput) Index(i pulumi.IntInput) NatGatewayPublicIpPrefixAssociationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NatGatewayPublicIpPrefixAssociation { return vs[0].([]*NatGatewayPublicIpPrefixAssociation)[vs[1].(int)] }).(NatGatewayPublicIpPrefixAssociationOutput) } type NatGatewayPublicIpPrefixAssociationMapOutput struct{ *pulumi.OutputState } func (NatGatewayPublicIpPrefixAssociationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NatGatewayPublicIpPrefixAssociation)(nil)).Elem() } func (o NatGatewayPublicIpPrefixAssociationMapOutput) ToNatGatewayPublicIpPrefixAssociationMapOutput() NatGatewayPublicIpPrefixAssociationMapOutput { return o } func (o NatGatewayPublicIpPrefixAssociationMapOutput) ToNatGatewayPublicIpPrefixAssociationMapOutputWithContext(ctx context.Context) NatGatewayPublicIpPrefixAssociationMapOutput { return o } func (o NatGatewayPublicIpPrefixAssociationMapOutput) MapIndex(k pulumi.StringInput) NatGatewayPublicIpPrefixAssociationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NatGatewayPublicIpPrefixAssociation { return vs[0].(map[string]*NatGatewayPublicIpPrefixAssociation)[vs[1].(string)] }).(NatGatewayPublicIpPrefixAssociationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NatGatewayPublicIpPrefixAssociationInput)(nil)).Elem(), &NatGatewayPublicIpPrefixAssociation{}) pulumi.RegisterInputType(reflect.TypeOf((*NatGatewayPublicIpPrefixAssociationArrayInput)(nil)).Elem(), NatGatewayPublicIpPrefixAssociationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NatGatewayPublicIpPrefixAssociationMapInput)(nil)).Elem(), NatGatewayPublicIpPrefixAssociationMap{}) pulumi.RegisterOutputType(NatGatewayPublicIpPrefixAssociationOutput{}) pulumi.RegisterOutputType(NatGatewayPublicIpPrefixAssociationArrayOutput{}) pulumi.RegisterOutputType(NatGatewayPublicIpPrefixAssociationMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getNatGateway.go
sdk/go/azure/network/getNatGateway.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing NAT Gateway. // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func LookupNatGateway(ctx *pulumi.Context, args *LookupNatGatewayArgs, opts ...pulumi.InvokeOption) (*LookupNatGatewayResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupNatGatewayResult err := ctx.Invoke("azure:network/getNatGateway:getNatGateway", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getNatGateway. type LookupNatGatewayArgs struct { // Specifies the Name of the NAT Gateway. Name string `pulumi:"name"` // A list of existing Public IP Address resource IDs which the NAT Gateway is using. PublicIpAddressIds []string `pulumi:"publicIpAddressIds"` // A list of existing Public IP Prefix resource IDs which the NAT Gateway is using. PublicIpPrefixIds []string `pulumi:"publicIpPrefixIds"` // Specifies the name of the Resource Group where the NAT Gateway exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getNatGateway. type LookupNatGatewayResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The idle timeout in minutes which is used for the NAT Gateway. IdleTimeoutInMinutes int `pulumi:"idleTimeoutInMinutes"` // The location where the NAT Gateway exists. Location string `pulumi:"location"` Name string `pulumi:"name"` // A list of existing Public IP Address resource IDs which the NAT Gateway is using. PublicIpAddressIds []string `pulumi:"publicIpAddressIds"` // A list of existing Public IP Prefix resource IDs which the NAT Gateway is using. PublicIpPrefixIds []string `pulumi:"publicIpPrefixIds"` ResourceGroupName string `pulumi:"resourceGroupName"` // The Resource GUID of the NAT Gateway. ResourceGuid string `pulumi:"resourceGuid"` // The SKU used by the NAT Gateway. SkuName string `pulumi:"skuName"` // A mapping of tags assigned to the resource. Tags map[string]string `pulumi:"tags"` // A list of Availability Zones which the NAT Gateway exists in. Zones []string `pulumi:"zones"` } func LookupNatGatewayOutput(ctx *pulumi.Context, args LookupNatGatewayOutputArgs, opts ...pulumi.InvokeOption) LookupNatGatewayResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupNatGatewayResultOutput, error) { args := v.(LookupNatGatewayArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getNatGateway:getNatGateway", args, LookupNatGatewayResultOutput{}, options).(LookupNatGatewayResultOutput), nil }).(LookupNatGatewayResultOutput) } // A collection of arguments for invoking getNatGateway. type LookupNatGatewayOutputArgs struct { // Specifies the Name of the NAT Gateway. Name pulumi.StringInput `pulumi:"name"` // A list of existing Public IP Address resource IDs which the NAT Gateway is using. PublicIpAddressIds pulumi.StringArrayInput `pulumi:"publicIpAddressIds"` // A list of existing Public IP Prefix resource IDs which the NAT Gateway is using. PublicIpPrefixIds pulumi.StringArrayInput `pulumi:"publicIpPrefixIds"` // Specifies the name of the Resource Group where the NAT Gateway exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupNatGatewayOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupNatGatewayArgs)(nil)).Elem() } // A collection of values returned by getNatGateway. type LookupNatGatewayResultOutput struct{ *pulumi.OutputState } func (LookupNatGatewayResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupNatGatewayResult)(nil)).Elem() } func (o LookupNatGatewayResultOutput) ToLookupNatGatewayResultOutput() LookupNatGatewayResultOutput { return o } func (o LookupNatGatewayResultOutput) ToLookupNatGatewayResultOutputWithContext(ctx context.Context) LookupNatGatewayResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o LookupNatGatewayResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupNatGatewayResult) string { return v.Id }).(pulumi.StringOutput) } // The idle timeout in minutes which is used for the NAT Gateway. func (o LookupNatGatewayResultOutput) IdleTimeoutInMinutes() pulumi.IntOutput { return o.ApplyT(func(v LookupNatGatewayResult) int { return v.IdleTimeoutInMinutes }).(pulumi.IntOutput) } // The location where the NAT Gateway exists. func (o LookupNatGatewayResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupNatGatewayResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupNatGatewayResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupNatGatewayResult) string { return v.Name }).(pulumi.StringOutput) } // A list of existing Public IP Address resource IDs which the NAT Gateway is using. func (o LookupNatGatewayResultOutput) PublicIpAddressIds() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupNatGatewayResult) []string { return v.PublicIpAddressIds }).(pulumi.StringArrayOutput) } // A list of existing Public IP Prefix resource IDs which the NAT Gateway is using. func (o LookupNatGatewayResultOutput) PublicIpPrefixIds() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupNatGatewayResult) []string { return v.PublicIpPrefixIds }).(pulumi.StringArrayOutput) } func (o LookupNatGatewayResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupNatGatewayResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // The Resource GUID of the NAT Gateway. func (o LookupNatGatewayResultOutput) ResourceGuid() pulumi.StringOutput { return o.ApplyT(func(v LookupNatGatewayResult) string { return v.ResourceGuid }).(pulumi.StringOutput) } // The SKU used by the NAT Gateway. func (o LookupNatGatewayResultOutput) SkuName() pulumi.StringOutput { return o.ApplyT(func(v LookupNatGatewayResult) string { return v.SkuName }).(pulumi.StringOutput) } // A mapping of tags assigned to the resource. func (o LookupNatGatewayResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupNatGatewayResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // A list of Availability Zones which the NAT Gateway exists in. func (o LookupNatGatewayResultOutput) Zones() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupNatGatewayResult) []string { return v.Zones }).(pulumi.StringArrayOutput) } func init() { pulumi.RegisterOutputType(LookupNatGatewayResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/virtualNetwork.go
sdk/go/azure/network/virtualNetwork.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a virtual network including any configured subnets. Each subnet can // optionally be configured with a security group to be associated with the subnet. // // > **NOTE on Virtual Networks and Subnet's:** This provider currently // provides both a standalone Subnet resource, and allows for Subnets to be defined in-line within the Virtual Network resource. // At this time you cannot use a Virtual Network with in-line Subnets in conjunction with any Subnet resources. Doing so will cause a conflict of Subnet configurations and will overwrite Subnet's. // **NOTE on Virtual Networks and DNS Servers:** This provider currently provides both a standalone virtual network DNS Servers resource, and allows for DNS servers to be defined in-line within the Virtual Network resource. // At this time you cannot use a Virtual Network with in-line DNS servers in conjunction with any Virtual Network DNS Servers resources. Doing so will cause a conflict of Virtual Network DNS Servers configurations and will overwrite virtual networks DNS servers. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleNetworkSecurityGroup, err := network.NewNetworkSecurityGroup(ctx, "example", &network.NetworkSecurityGroupArgs{ // Name: pulumi.String("example-security-group"), // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // _, err = network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-network"), // Location: example.Location, // ResourceGroupName: example.Name, // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // DnsServers: pulumi.StringArray{ // pulumi.String("10.0.0.4"), // pulumi.String("10.0.0.5"), // }, // Subnets: network.VirtualNetworkSubnetArray{ // &network.VirtualNetworkSubnetArgs{ // Name: pulumi.String("subnet1"), // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.1.0/24"), // }, // }, // &network.VirtualNetworkSubnetArgs{ // Name: pulumi.String("subnet2"), // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // SecurityGroup: exampleNetworkSecurityGroup.ID(), // }, // }, // Tags: pulumi.StringMap{ // "environment": pulumi.String("Production"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Virtual Networks can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/virtualNetwork:VirtualNetwork exampleNetwork /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/virtualNetworks/myvnet1 // ``` type VirtualNetwork struct { pulumi.CustomResourceState // The address space that is used the virtual network. You can supply more than one address space. // // > **Note:** Exactly one of `addressSpace` or `ipAddressPool` must be specified. AddressSpaces pulumi.StringArrayOutput `pulumi:"addressSpaces"` // The BGP community attribute in format `<as-number>:<community-value>`. // // > **NOTE** The `as-number` segment is the Microsoft ASN, which is always `12076` for now. BgpCommunity pulumi.StringPtrOutput `pulumi:"bgpCommunity"` // A `ddosProtectionPlan` block as documented below. DdosProtectionPlan VirtualNetworkDdosProtectionPlanPtrOutput `pulumi:"ddosProtectionPlan"` // List of IP addresses of DNS servers // // > **NOTE** Since `dnsServers` can be configured both inline and via the separate `network.VirtualNetworkDnsServers` resource, we have to explicitly set it to empty slice (`[]`) to remove it. DnsServers pulumi.StringArrayOutput `pulumi:"dnsServers"` // Specifies the Edge Zone within the Azure Region where this Virtual Network should exist. Changing this forces a new Virtual Network to be created. EdgeZone pulumi.StringPtrOutput `pulumi:"edgeZone"` // A `encryption` block as defined below. Encryption VirtualNetworkEncryptionPtrOutput `pulumi:"encryption"` // The flow timeout in minutes for the Virtual Network, which is used to enable connection tracking for intra-VM flows. Possible values are between `4` and `30` minutes. FlowTimeoutInMinutes pulumi.IntPtrOutput `pulumi:"flowTimeoutInMinutes"` // The GUID of the Virtual Network. Guid pulumi.StringOutput `pulumi:"guid"` // One or more `ipAddressPool` blocks as defined below. Only one association of each IP type(IPv4 or IPv6) is allowed. // // > **Note:** Exactly one of `addressSpace` or `ipAddressPool` must be specified. IpAddressPools VirtualNetworkIpAddressPoolArrayOutput `pulumi:"ipAddressPools"` // The location/region where the virtual network is created. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the virtual network. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The Private Endpoint VNet Policies for the Virtual Network. Possible values are `Disabled` and `Basic`. Defaults to `Disabled`. PrivateEndpointVnetPolicies pulumi.StringPtrOutput `pulumi:"privateEndpointVnetPolicies"` // The name of the resource group in which to create the virtual network. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Can be specified multiple times to define multiple subnets. Each `subnet` block supports fields documented below. // // > **NOTE** Since `subnet` can be configured both inline and via the separate `network.Subnet` resource, we have to explicitly set it to empty slice (`[]`) to remove it. Subnets VirtualNetworkSubnetArrayOutput `pulumi:"subnets"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewVirtualNetwork registers a new resource with the given unique name, arguments, and options. func NewVirtualNetwork(ctx *pulumi.Context, name string, args *VirtualNetworkArgs, opts ...pulumi.ResourceOption) (*VirtualNetwork, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource VirtualNetwork err := ctx.RegisterResource("azure:network/virtualNetwork:VirtualNetwork", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVirtualNetwork gets an existing VirtualNetwork resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetVirtualNetwork(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VirtualNetworkState, opts ...pulumi.ResourceOption) (*VirtualNetwork, error) { var resource VirtualNetwork err := ctx.ReadResource("azure:network/virtualNetwork:VirtualNetwork", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VirtualNetwork resources. type virtualNetworkState struct { // The address space that is used the virtual network. You can supply more than one address space. // // > **Note:** Exactly one of `addressSpace` or `ipAddressPool` must be specified. AddressSpaces []string `pulumi:"addressSpaces"` // The BGP community attribute in format `<as-number>:<community-value>`. // // > **NOTE** The `as-number` segment is the Microsoft ASN, which is always `12076` for now. BgpCommunity *string `pulumi:"bgpCommunity"` // A `ddosProtectionPlan` block as documented below. DdosProtectionPlan *VirtualNetworkDdosProtectionPlan `pulumi:"ddosProtectionPlan"` // List of IP addresses of DNS servers // // > **NOTE** Since `dnsServers` can be configured both inline and via the separate `network.VirtualNetworkDnsServers` resource, we have to explicitly set it to empty slice (`[]`) to remove it. DnsServers []string `pulumi:"dnsServers"` // Specifies the Edge Zone within the Azure Region where this Virtual Network should exist. Changing this forces a new Virtual Network to be created. EdgeZone *string `pulumi:"edgeZone"` // A `encryption` block as defined below. Encryption *VirtualNetworkEncryption `pulumi:"encryption"` // The flow timeout in minutes for the Virtual Network, which is used to enable connection tracking for intra-VM flows. Possible values are between `4` and `30` minutes. FlowTimeoutInMinutes *int `pulumi:"flowTimeoutInMinutes"` // The GUID of the Virtual Network. Guid *string `pulumi:"guid"` // One or more `ipAddressPool` blocks as defined below. Only one association of each IP type(IPv4 or IPv6) is allowed. // // > **Note:** Exactly one of `addressSpace` or `ipAddressPool` must be specified. IpAddressPools []VirtualNetworkIpAddressPool `pulumi:"ipAddressPools"` // The location/region where the virtual network is created. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the virtual network. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The Private Endpoint VNet Policies for the Virtual Network. Possible values are `Disabled` and `Basic`. Defaults to `Disabled`. PrivateEndpointVnetPolicies *string `pulumi:"privateEndpointVnetPolicies"` // The name of the resource group in which to create the virtual network. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Can be specified multiple times to define multiple subnets. Each `subnet` block supports fields documented below. // // > **NOTE** Since `subnet` can be configured both inline and via the separate `network.Subnet` resource, we have to explicitly set it to empty slice (`[]`) to remove it. Subnets []VirtualNetworkSubnet `pulumi:"subnets"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } type VirtualNetworkState struct { // The address space that is used the virtual network. You can supply more than one address space. // // > **Note:** Exactly one of `addressSpace` or `ipAddressPool` must be specified. AddressSpaces pulumi.StringArrayInput // The BGP community attribute in format `<as-number>:<community-value>`. // // > **NOTE** The `as-number` segment is the Microsoft ASN, which is always `12076` for now. BgpCommunity pulumi.StringPtrInput // A `ddosProtectionPlan` block as documented below. DdosProtectionPlan VirtualNetworkDdosProtectionPlanPtrInput // List of IP addresses of DNS servers // // > **NOTE** Since `dnsServers` can be configured both inline and via the separate `network.VirtualNetworkDnsServers` resource, we have to explicitly set it to empty slice (`[]`) to remove it. DnsServers pulumi.StringArrayInput // Specifies the Edge Zone within the Azure Region where this Virtual Network should exist. Changing this forces a new Virtual Network to be created. EdgeZone pulumi.StringPtrInput // A `encryption` block as defined below. Encryption VirtualNetworkEncryptionPtrInput // The flow timeout in minutes for the Virtual Network, which is used to enable connection tracking for intra-VM flows. Possible values are between `4` and `30` minutes. FlowTimeoutInMinutes pulumi.IntPtrInput // The GUID of the Virtual Network. Guid pulumi.StringPtrInput // One or more `ipAddressPool` blocks as defined below. Only one association of each IP type(IPv4 or IPv6) is allowed. // // > **Note:** Exactly one of `addressSpace` or `ipAddressPool` must be specified. IpAddressPools VirtualNetworkIpAddressPoolArrayInput // The location/region where the virtual network is created. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the virtual network. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The Private Endpoint VNet Policies for the Virtual Network. Possible values are `Disabled` and `Basic`. Defaults to `Disabled`. PrivateEndpointVnetPolicies pulumi.StringPtrInput // The name of the resource group in which to create the virtual network. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Can be specified multiple times to define multiple subnets. Each `subnet` block supports fields documented below. // // > **NOTE** Since `subnet` can be configured both inline and via the separate `network.Subnet` resource, we have to explicitly set it to empty slice (`[]`) to remove it. Subnets VirtualNetworkSubnetArrayInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (VirtualNetworkState) ElementType() reflect.Type { return reflect.TypeOf((*virtualNetworkState)(nil)).Elem() } type virtualNetworkArgs struct { // The address space that is used the virtual network. You can supply more than one address space. // // > **Note:** Exactly one of `addressSpace` or `ipAddressPool` must be specified. AddressSpaces []string `pulumi:"addressSpaces"` // The BGP community attribute in format `<as-number>:<community-value>`. // // > **NOTE** The `as-number` segment is the Microsoft ASN, which is always `12076` for now. BgpCommunity *string `pulumi:"bgpCommunity"` // A `ddosProtectionPlan` block as documented below. DdosProtectionPlan *VirtualNetworkDdosProtectionPlan `pulumi:"ddosProtectionPlan"` // List of IP addresses of DNS servers // // > **NOTE** Since `dnsServers` can be configured both inline and via the separate `network.VirtualNetworkDnsServers` resource, we have to explicitly set it to empty slice (`[]`) to remove it. DnsServers []string `pulumi:"dnsServers"` // Specifies the Edge Zone within the Azure Region where this Virtual Network should exist. Changing this forces a new Virtual Network to be created. EdgeZone *string `pulumi:"edgeZone"` // A `encryption` block as defined below. Encryption *VirtualNetworkEncryption `pulumi:"encryption"` // The flow timeout in minutes for the Virtual Network, which is used to enable connection tracking for intra-VM flows. Possible values are between `4` and `30` minutes. FlowTimeoutInMinutes *int `pulumi:"flowTimeoutInMinutes"` // One or more `ipAddressPool` blocks as defined below. Only one association of each IP type(IPv4 or IPv6) is allowed. // // > **Note:** Exactly one of `addressSpace` or `ipAddressPool` must be specified. IpAddressPools []VirtualNetworkIpAddressPool `pulumi:"ipAddressPools"` // The location/region where the virtual network is created. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the virtual network. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The Private Endpoint VNet Policies for the Virtual Network. Possible values are `Disabled` and `Basic`. Defaults to `Disabled`. PrivateEndpointVnetPolicies *string `pulumi:"privateEndpointVnetPolicies"` // The name of the resource group in which to create the virtual network. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Can be specified multiple times to define multiple subnets. Each `subnet` block supports fields documented below. // // > **NOTE** Since `subnet` can be configured both inline and via the separate `network.Subnet` resource, we have to explicitly set it to empty slice (`[]`) to remove it. Subnets []VirtualNetworkSubnet `pulumi:"subnets"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a VirtualNetwork resource. type VirtualNetworkArgs struct { // The address space that is used the virtual network. You can supply more than one address space. // // > **Note:** Exactly one of `addressSpace` or `ipAddressPool` must be specified. AddressSpaces pulumi.StringArrayInput // The BGP community attribute in format `<as-number>:<community-value>`. // // > **NOTE** The `as-number` segment is the Microsoft ASN, which is always `12076` for now. BgpCommunity pulumi.StringPtrInput // A `ddosProtectionPlan` block as documented below. DdosProtectionPlan VirtualNetworkDdosProtectionPlanPtrInput // List of IP addresses of DNS servers // // > **NOTE** Since `dnsServers` can be configured both inline and via the separate `network.VirtualNetworkDnsServers` resource, we have to explicitly set it to empty slice (`[]`) to remove it. DnsServers pulumi.StringArrayInput // Specifies the Edge Zone within the Azure Region where this Virtual Network should exist. Changing this forces a new Virtual Network to be created. EdgeZone pulumi.StringPtrInput // A `encryption` block as defined below. Encryption VirtualNetworkEncryptionPtrInput // The flow timeout in minutes for the Virtual Network, which is used to enable connection tracking for intra-VM flows. Possible values are between `4` and `30` minutes. FlowTimeoutInMinutes pulumi.IntPtrInput // One or more `ipAddressPool` blocks as defined below. Only one association of each IP type(IPv4 or IPv6) is allowed. // // > **Note:** Exactly one of `addressSpace` or `ipAddressPool` must be specified. IpAddressPools VirtualNetworkIpAddressPoolArrayInput // The location/region where the virtual network is created. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the virtual network. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The Private Endpoint VNet Policies for the Virtual Network. Possible values are `Disabled` and `Basic`. Defaults to `Disabled`. PrivateEndpointVnetPolicies pulumi.StringPtrInput // The name of the resource group in which to create the virtual network. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Can be specified multiple times to define multiple subnets. Each `subnet` block supports fields documented below. // // > **NOTE** Since `subnet` can be configured both inline and via the separate `network.Subnet` resource, we have to explicitly set it to empty slice (`[]`) to remove it. Subnets VirtualNetworkSubnetArrayInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (VirtualNetworkArgs) ElementType() reflect.Type { return reflect.TypeOf((*virtualNetworkArgs)(nil)).Elem() } type VirtualNetworkInput interface { pulumi.Input ToVirtualNetworkOutput() VirtualNetworkOutput ToVirtualNetworkOutputWithContext(ctx context.Context) VirtualNetworkOutput } func (*VirtualNetwork) ElementType() reflect.Type { return reflect.TypeOf((**VirtualNetwork)(nil)).Elem() } func (i *VirtualNetwork) ToVirtualNetworkOutput() VirtualNetworkOutput { return i.ToVirtualNetworkOutputWithContext(context.Background()) } func (i *VirtualNetwork) ToVirtualNetworkOutputWithContext(ctx context.Context) VirtualNetworkOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualNetworkOutput) } // VirtualNetworkArrayInput is an input type that accepts VirtualNetworkArray and VirtualNetworkArrayOutput values. // You can construct a concrete instance of `VirtualNetworkArrayInput` via: // // VirtualNetworkArray{ VirtualNetworkArgs{...} } type VirtualNetworkArrayInput interface { pulumi.Input ToVirtualNetworkArrayOutput() VirtualNetworkArrayOutput ToVirtualNetworkArrayOutputWithContext(context.Context) VirtualNetworkArrayOutput } type VirtualNetworkArray []VirtualNetworkInput func (VirtualNetworkArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualNetwork)(nil)).Elem() } func (i VirtualNetworkArray) ToVirtualNetworkArrayOutput() VirtualNetworkArrayOutput { return i.ToVirtualNetworkArrayOutputWithContext(context.Background()) } func (i VirtualNetworkArray) ToVirtualNetworkArrayOutputWithContext(ctx context.Context) VirtualNetworkArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualNetworkArrayOutput) } // VirtualNetworkMapInput is an input type that accepts VirtualNetworkMap and VirtualNetworkMapOutput values. // You can construct a concrete instance of `VirtualNetworkMapInput` via: // // VirtualNetworkMap{ "key": VirtualNetworkArgs{...} } type VirtualNetworkMapInput interface { pulumi.Input ToVirtualNetworkMapOutput() VirtualNetworkMapOutput ToVirtualNetworkMapOutputWithContext(context.Context) VirtualNetworkMapOutput } type VirtualNetworkMap map[string]VirtualNetworkInput func (VirtualNetworkMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualNetwork)(nil)).Elem() } func (i VirtualNetworkMap) ToVirtualNetworkMapOutput() VirtualNetworkMapOutput { return i.ToVirtualNetworkMapOutputWithContext(context.Background()) } func (i VirtualNetworkMap) ToVirtualNetworkMapOutputWithContext(ctx context.Context) VirtualNetworkMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualNetworkMapOutput) } type VirtualNetworkOutput struct{ *pulumi.OutputState } func (VirtualNetworkOutput) ElementType() reflect.Type { return reflect.TypeOf((**VirtualNetwork)(nil)).Elem() } func (o VirtualNetworkOutput) ToVirtualNetworkOutput() VirtualNetworkOutput { return o } func (o VirtualNetworkOutput) ToVirtualNetworkOutputWithContext(ctx context.Context) VirtualNetworkOutput { return o } // The address space that is used the virtual network. You can supply more than one address space. // // > **Note:** Exactly one of `addressSpace` or `ipAddressPool` must be specified. func (o VirtualNetworkOutput) AddressSpaces() pulumi.StringArrayOutput { return o.ApplyT(func(v *VirtualNetwork) pulumi.StringArrayOutput { return v.AddressSpaces }).(pulumi.StringArrayOutput) } // The BGP community attribute in format `<as-number>:<community-value>`. // // > **NOTE** The `as-number` segment is the Microsoft ASN, which is always `12076` for now. func (o VirtualNetworkOutput) BgpCommunity() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualNetwork) pulumi.StringPtrOutput { return v.BgpCommunity }).(pulumi.StringPtrOutput) } // A `ddosProtectionPlan` block as documented below. func (o VirtualNetworkOutput) DdosProtectionPlan() VirtualNetworkDdosProtectionPlanPtrOutput { return o.ApplyT(func(v *VirtualNetwork) VirtualNetworkDdosProtectionPlanPtrOutput { return v.DdosProtectionPlan }).(VirtualNetworkDdosProtectionPlanPtrOutput) } // List of IP addresses of DNS servers // // > **NOTE** Since `dnsServers` can be configured both inline and via the separate `network.VirtualNetworkDnsServers` resource, we have to explicitly set it to empty slice (`[]`) to remove it. func (o VirtualNetworkOutput) DnsServers() pulumi.StringArrayOutput { return o.ApplyT(func(v *VirtualNetwork) pulumi.StringArrayOutput { return v.DnsServers }).(pulumi.StringArrayOutput) } // Specifies the Edge Zone within the Azure Region where this Virtual Network should exist. Changing this forces a new Virtual Network to be created. func (o VirtualNetworkOutput) EdgeZone() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualNetwork) pulumi.StringPtrOutput { return v.EdgeZone }).(pulumi.StringPtrOutput) } // A `encryption` block as defined below. func (o VirtualNetworkOutput) Encryption() VirtualNetworkEncryptionPtrOutput { return o.ApplyT(func(v *VirtualNetwork) VirtualNetworkEncryptionPtrOutput { return v.Encryption }).(VirtualNetworkEncryptionPtrOutput) } // The flow timeout in minutes for the Virtual Network, which is used to enable connection tracking for intra-VM flows. Possible values are between `4` and `30` minutes. func (o VirtualNetworkOutput) FlowTimeoutInMinutes() pulumi.IntPtrOutput { return o.ApplyT(func(v *VirtualNetwork) pulumi.IntPtrOutput { return v.FlowTimeoutInMinutes }).(pulumi.IntPtrOutput) } // The GUID of the Virtual Network. func (o VirtualNetworkOutput) Guid() pulumi.StringOutput { return o.ApplyT(func(v *VirtualNetwork) pulumi.StringOutput { return v.Guid }).(pulumi.StringOutput) } // One or more `ipAddressPool` blocks as defined below. Only one association of each IP type(IPv4 or IPv6) is allowed. // // > **Note:** Exactly one of `addressSpace` or `ipAddressPool` must be specified. func (o VirtualNetworkOutput) IpAddressPools() VirtualNetworkIpAddressPoolArrayOutput { return o.ApplyT(func(v *VirtualNetwork) VirtualNetworkIpAddressPoolArrayOutput { return v.IpAddressPools }).(VirtualNetworkIpAddressPoolArrayOutput) } // The location/region where the virtual network is created. Changing this forces a new resource to be created. func (o VirtualNetworkOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *VirtualNetwork) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name of the virtual network. Changing this forces a new resource to be created. func (o VirtualNetworkOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *VirtualNetwork) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The Private Endpoint VNet Policies for the Virtual Network. Possible values are `Disabled` and `Basic`. Defaults to `Disabled`. func (o VirtualNetworkOutput) PrivateEndpointVnetPolicies() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualNetwork) pulumi.StringPtrOutput { return v.PrivateEndpointVnetPolicies }).(pulumi.StringPtrOutput) } // The name of the resource group in which to create the virtual network. Changing this forces a new resource to be created. func (o VirtualNetworkOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *VirtualNetwork) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Can be specified multiple times to define multiple subnets. Each `subnet` block supports fields documented below. // // > **NOTE** Since `subnet` can be configured both inline and via the separate `network.Subnet` resource, we have to explicitly set it to empty slice (`[]`) to remove it. func (o VirtualNetworkOutput) Subnets() VirtualNetworkSubnetArrayOutput { return o.ApplyT(func(v *VirtualNetwork) VirtualNetworkSubnetArrayOutput { return v.Subnets }).(VirtualNetworkSubnetArrayOutput) } // A mapping of tags to assign to the resource. func (o VirtualNetworkOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *VirtualNetwork) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type VirtualNetworkArrayOutput struct{ *pulumi.OutputState } func (VirtualNetworkArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualNetwork)(nil)).Elem() } func (o VirtualNetworkArrayOutput) ToVirtualNetworkArrayOutput() VirtualNetworkArrayOutput { return o } func (o VirtualNetworkArrayOutput) ToVirtualNetworkArrayOutputWithContext(ctx context.Context) VirtualNetworkArrayOutput { return o } func (o VirtualNetworkArrayOutput) Index(i pulumi.IntInput) VirtualNetworkOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VirtualNetwork { return vs[0].([]*VirtualNetwork)[vs[1].(int)] }).(VirtualNetworkOutput) } type VirtualNetworkMapOutput struct{ *pulumi.OutputState } func (VirtualNetworkMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualNetwork)(nil)).Elem() } func (o VirtualNetworkMapOutput) ToVirtualNetworkMapOutput() VirtualNetworkMapOutput { return o } func (o VirtualNetworkMapOutput) ToVirtualNetworkMapOutputWithContext(ctx context.Context) VirtualNetworkMapOutput { return o } func (o VirtualNetworkMapOutput) MapIndex(k pulumi.StringInput) VirtualNetworkOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VirtualNetwork { return vs[0].(map[string]*VirtualNetwork)[vs[1].(string)] }).(VirtualNetworkOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VirtualNetworkInput)(nil)).Elem(), &VirtualNetwork{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualNetworkArrayInput)(nil)).Elem(), VirtualNetworkArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualNetworkMapInput)(nil)).Elem(), VirtualNetworkMap{}) pulumi.RegisterOutputType(VirtualNetworkOutput{}) pulumi.RegisterOutputType(VirtualNetworkArrayOutput{}) pulumi.RegisterOutputType(VirtualNetworkMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/networkManagerRoutingRule.go
sdk/go/azure/network/networkManagerRoutingRule.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // exampleNetworkManager, err := network.NewNetworkManager(ctx, "example", &network.NetworkManagerArgs{ // Name: pulumi.String("example-network-manager"), // ResourceGroupName: example.Name, // Location: example.Location, // Scope: &network.NetworkManagerScopeArgs{ // SubscriptionIds: pulumi.StringArray{ // pulumi.String(current.Id), // }, // }, // ScopeAccesses: pulumi.StringArray{ // pulumi.String("Routing"), // }, // }) // if err != nil { // return err // } // exampleNetworkManagerNetworkGroup, err := network.NewNetworkManagerNetworkGroup(ctx, "example", &network.NetworkManagerNetworkGroupArgs{ // Name: pulumi.String("example-network-group"), // NetworkManagerId: exampleNetworkManager.ID(), // }) // if err != nil { // return err // } // exampleNetworkManagerRoutingConfiguration, err := network.NewNetworkManagerRoutingConfiguration(ctx, "example", &network.NetworkManagerRoutingConfigurationArgs{ // Name: pulumi.String("example-routing-configuration"), // NetworkManagerId: exampleNetworkManager.ID(), // }) // if err != nil { // return err // } // exampleNetworkManagerRoutingRuleCollection, err := network.NewNetworkManagerRoutingRuleCollection(ctx, "example", &network.NetworkManagerRoutingRuleCollectionArgs{ // Name: pulumi.String("example-routing-rule-collection"), // RoutingConfigurationId: exampleNetworkManagerRoutingConfiguration.ID(), // NetworkGroupIds: pulumi.StringArray{ // exampleNetworkManagerNetworkGroup.ID(), // }, // Description: pulumi.String("example routing rule collection"), // }) // if err != nil { // return err // } // _, err = network.NewNetworkManagerRoutingRule(ctx, "example", &network.NetworkManagerRoutingRuleArgs{ // Name: pulumi.String("example-routing-rule"), // RuleCollectionId: exampleNetworkManagerRoutingRuleCollection.ID(), // Description: pulumi.String("example routing rule"), // Destination: &network.NetworkManagerRoutingRuleDestinationArgs{ // Type: pulumi.String("AddressPrefix"), // Address: pulumi.String("10.0.0.0/24"), // }, // NextHop: &network.NetworkManagerRoutingRuleNextHopArgs{ // Type: pulumi.String("VirtualNetworkGateway"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Network Manager Routing Rules can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/networkManagerRoutingRule:NetworkManagerRoutingRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/manager1/routingConfigurations/conf1/ruleCollections/collection1/rules/rule1 // ``` type NetworkManagerRoutingRule struct { pulumi.CustomResourceState // A description for the routing rule. Description pulumi.StringPtrOutput `pulumi:"description"` // A `destination` block as defined below. Destination NetworkManagerRoutingRuleDestinationOutput `pulumi:"destination"` // The name of the Network Manager Routing Rule. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // A `nextHop` block as defined below. NextHop NetworkManagerRoutingRuleNextHopOutput `pulumi:"nextHop"` // The ID of the Network Manager Routing Rule Collection to which this rule belongs. Changing this forces a new resource to be created. RuleCollectionId pulumi.StringOutput `pulumi:"ruleCollectionId"` } // NewNetworkManagerRoutingRule registers a new resource with the given unique name, arguments, and options. func NewNetworkManagerRoutingRule(ctx *pulumi.Context, name string, args *NetworkManagerRoutingRuleArgs, opts ...pulumi.ResourceOption) (*NetworkManagerRoutingRule, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Destination == nil { return nil, errors.New("invalid value for required argument 'Destination'") } if args.NextHop == nil { return nil, errors.New("invalid value for required argument 'NextHop'") } if args.RuleCollectionId == nil { return nil, errors.New("invalid value for required argument 'RuleCollectionId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkManagerRoutingRule err := ctx.RegisterResource("azure:network/networkManagerRoutingRule:NetworkManagerRoutingRule", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkManagerRoutingRule gets an existing NetworkManagerRoutingRule resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetNetworkManagerRoutingRule(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkManagerRoutingRuleState, opts ...pulumi.ResourceOption) (*NetworkManagerRoutingRule, error) { var resource NetworkManagerRoutingRule err := ctx.ReadResource("azure:network/networkManagerRoutingRule:NetworkManagerRoutingRule", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkManagerRoutingRule resources. type networkManagerRoutingRuleState struct { // A description for the routing rule. Description *string `pulumi:"description"` // A `destination` block as defined below. Destination *NetworkManagerRoutingRuleDestination `pulumi:"destination"` // The name of the Network Manager Routing Rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A `nextHop` block as defined below. NextHop *NetworkManagerRoutingRuleNextHop `pulumi:"nextHop"` // The ID of the Network Manager Routing Rule Collection to which this rule belongs. Changing this forces a new resource to be created. RuleCollectionId *string `pulumi:"ruleCollectionId"` } type NetworkManagerRoutingRuleState struct { // A description for the routing rule. Description pulumi.StringPtrInput // A `destination` block as defined below. Destination NetworkManagerRoutingRuleDestinationPtrInput // The name of the Network Manager Routing Rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A `nextHop` block as defined below. NextHop NetworkManagerRoutingRuleNextHopPtrInput // The ID of the Network Manager Routing Rule Collection to which this rule belongs. Changing this forces a new resource to be created. RuleCollectionId pulumi.StringPtrInput } func (NetworkManagerRoutingRuleState) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerRoutingRuleState)(nil)).Elem() } type networkManagerRoutingRuleArgs struct { // A description for the routing rule. Description *string `pulumi:"description"` // A `destination` block as defined below. Destination NetworkManagerRoutingRuleDestination `pulumi:"destination"` // The name of the Network Manager Routing Rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A `nextHop` block as defined below. NextHop NetworkManagerRoutingRuleNextHop `pulumi:"nextHop"` // The ID of the Network Manager Routing Rule Collection to which this rule belongs. Changing this forces a new resource to be created. RuleCollectionId string `pulumi:"ruleCollectionId"` } // The set of arguments for constructing a NetworkManagerRoutingRule resource. type NetworkManagerRoutingRuleArgs struct { // A description for the routing rule. Description pulumi.StringPtrInput // A `destination` block as defined below. Destination NetworkManagerRoutingRuleDestinationInput // The name of the Network Manager Routing Rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A `nextHop` block as defined below. NextHop NetworkManagerRoutingRuleNextHopInput // The ID of the Network Manager Routing Rule Collection to which this rule belongs. Changing this forces a new resource to be created. RuleCollectionId pulumi.StringInput } func (NetworkManagerRoutingRuleArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerRoutingRuleArgs)(nil)).Elem() } type NetworkManagerRoutingRuleInput interface { pulumi.Input ToNetworkManagerRoutingRuleOutput() NetworkManagerRoutingRuleOutput ToNetworkManagerRoutingRuleOutputWithContext(ctx context.Context) NetworkManagerRoutingRuleOutput } func (*NetworkManagerRoutingRule) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerRoutingRule)(nil)).Elem() } func (i *NetworkManagerRoutingRule) ToNetworkManagerRoutingRuleOutput() NetworkManagerRoutingRuleOutput { return i.ToNetworkManagerRoutingRuleOutputWithContext(context.Background()) } func (i *NetworkManagerRoutingRule) ToNetworkManagerRoutingRuleOutputWithContext(ctx context.Context) NetworkManagerRoutingRuleOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerRoutingRuleOutput) } // NetworkManagerRoutingRuleArrayInput is an input type that accepts NetworkManagerRoutingRuleArray and NetworkManagerRoutingRuleArrayOutput values. // You can construct a concrete instance of `NetworkManagerRoutingRuleArrayInput` via: // // NetworkManagerRoutingRuleArray{ NetworkManagerRoutingRuleArgs{...} } type NetworkManagerRoutingRuleArrayInput interface { pulumi.Input ToNetworkManagerRoutingRuleArrayOutput() NetworkManagerRoutingRuleArrayOutput ToNetworkManagerRoutingRuleArrayOutputWithContext(context.Context) NetworkManagerRoutingRuleArrayOutput } type NetworkManagerRoutingRuleArray []NetworkManagerRoutingRuleInput func (NetworkManagerRoutingRuleArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerRoutingRule)(nil)).Elem() } func (i NetworkManagerRoutingRuleArray) ToNetworkManagerRoutingRuleArrayOutput() NetworkManagerRoutingRuleArrayOutput { return i.ToNetworkManagerRoutingRuleArrayOutputWithContext(context.Background()) } func (i NetworkManagerRoutingRuleArray) ToNetworkManagerRoutingRuleArrayOutputWithContext(ctx context.Context) NetworkManagerRoutingRuleArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerRoutingRuleArrayOutput) } // NetworkManagerRoutingRuleMapInput is an input type that accepts NetworkManagerRoutingRuleMap and NetworkManagerRoutingRuleMapOutput values. // You can construct a concrete instance of `NetworkManagerRoutingRuleMapInput` via: // // NetworkManagerRoutingRuleMap{ "key": NetworkManagerRoutingRuleArgs{...} } type NetworkManagerRoutingRuleMapInput interface { pulumi.Input ToNetworkManagerRoutingRuleMapOutput() NetworkManagerRoutingRuleMapOutput ToNetworkManagerRoutingRuleMapOutputWithContext(context.Context) NetworkManagerRoutingRuleMapOutput } type NetworkManagerRoutingRuleMap map[string]NetworkManagerRoutingRuleInput func (NetworkManagerRoutingRuleMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerRoutingRule)(nil)).Elem() } func (i NetworkManagerRoutingRuleMap) ToNetworkManagerRoutingRuleMapOutput() NetworkManagerRoutingRuleMapOutput { return i.ToNetworkManagerRoutingRuleMapOutputWithContext(context.Background()) } func (i NetworkManagerRoutingRuleMap) ToNetworkManagerRoutingRuleMapOutputWithContext(ctx context.Context) NetworkManagerRoutingRuleMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerRoutingRuleMapOutput) } type NetworkManagerRoutingRuleOutput struct{ *pulumi.OutputState } func (NetworkManagerRoutingRuleOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerRoutingRule)(nil)).Elem() } func (o NetworkManagerRoutingRuleOutput) ToNetworkManagerRoutingRuleOutput() NetworkManagerRoutingRuleOutput { return o } func (o NetworkManagerRoutingRuleOutput) ToNetworkManagerRoutingRuleOutputWithContext(ctx context.Context) NetworkManagerRoutingRuleOutput { return o } // A description for the routing rule. func (o NetworkManagerRoutingRuleOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkManagerRoutingRule) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // A `destination` block as defined below. func (o NetworkManagerRoutingRuleOutput) Destination() NetworkManagerRoutingRuleDestinationOutput { return o.ApplyT(func(v *NetworkManagerRoutingRule) NetworkManagerRoutingRuleDestinationOutput { return v.Destination }).(NetworkManagerRoutingRuleDestinationOutput) } // The name of the Network Manager Routing Rule. Changing this forces a new resource to be created. func (o NetworkManagerRoutingRuleOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerRoutingRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A `nextHop` block as defined below. func (o NetworkManagerRoutingRuleOutput) NextHop() NetworkManagerRoutingRuleNextHopOutput { return o.ApplyT(func(v *NetworkManagerRoutingRule) NetworkManagerRoutingRuleNextHopOutput { return v.NextHop }).(NetworkManagerRoutingRuleNextHopOutput) } // The ID of the Network Manager Routing Rule Collection to which this rule belongs. Changing this forces a new resource to be created. func (o NetworkManagerRoutingRuleOutput) RuleCollectionId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerRoutingRule) pulumi.StringOutput { return v.RuleCollectionId }).(pulumi.StringOutput) } type NetworkManagerRoutingRuleArrayOutput struct{ *pulumi.OutputState } func (NetworkManagerRoutingRuleArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerRoutingRule)(nil)).Elem() } func (o NetworkManagerRoutingRuleArrayOutput) ToNetworkManagerRoutingRuleArrayOutput() NetworkManagerRoutingRuleArrayOutput { return o } func (o NetworkManagerRoutingRuleArrayOutput) ToNetworkManagerRoutingRuleArrayOutputWithContext(ctx context.Context) NetworkManagerRoutingRuleArrayOutput { return o } func (o NetworkManagerRoutingRuleArrayOutput) Index(i pulumi.IntInput) NetworkManagerRoutingRuleOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkManagerRoutingRule { return vs[0].([]*NetworkManagerRoutingRule)[vs[1].(int)] }).(NetworkManagerRoutingRuleOutput) } type NetworkManagerRoutingRuleMapOutput struct{ *pulumi.OutputState } func (NetworkManagerRoutingRuleMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerRoutingRule)(nil)).Elem() } func (o NetworkManagerRoutingRuleMapOutput) ToNetworkManagerRoutingRuleMapOutput() NetworkManagerRoutingRuleMapOutput { return o } func (o NetworkManagerRoutingRuleMapOutput) ToNetworkManagerRoutingRuleMapOutputWithContext(ctx context.Context) NetworkManagerRoutingRuleMapOutput { return o } func (o NetworkManagerRoutingRuleMapOutput) MapIndex(k pulumi.StringInput) NetworkManagerRoutingRuleOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkManagerRoutingRule { return vs[0].(map[string]*NetworkManagerRoutingRule)[vs[1].(string)] }).(NetworkManagerRoutingRuleOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerRoutingRuleInput)(nil)).Elem(), &NetworkManagerRoutingRule{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerRoutingRuleArrayInput)(nil)).Elem(), NetworkManagerRoutingRuleArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerRoutingRuleMapInput)(nil)).Elem(), NetworkManagerRoutingRuleMap{}) pulumi.RegisterOutputType(NetworkManagerRoutingRuleOutput{}) pulumi.RegisterOutputType(NetworkManagerRoutingRuleArrayOutput{}) pulumi.RegisterOutputType(NetworkManagerRoutingRuleMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/networkManagerAdminRuleCollection.go
sdk/go/azure/network/networkManagerAdminRuleCollection.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Network Manager Admin Rule Collection. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // exampleNetworkManager, err := network.NewNetworkManager(ctx, "example", &network.NetworkManagerArgs{ // Name: pulumi.String("example-network-manager"), // Location: example.Location, // ResourceGroupName: example.Name, // Scope: &network.NetworkManagerScopeArgs{ // SubscriptionIds: pulumi.StringArray{ // pulumi.String(current.Id), // }, // }, // ScopeAccesses: pulumi.StringArray{ // pulumi.String("Connectivity"), // pulumi.String("SecurityAdmin"), // }, // Description: pulumi.String("example network manager"), // }) // if err != nil { // return err // } // exampleNetworkManagerNetworkGroup, err := network.NewNetworkManagerNetworkGroup(ctx, "example", &network.NetworkManagerNetworkGroupArgs{ // Name: pulumi.String("example-network-group"), // NetworkManagerId: exampleNetworkManager.ID(), // }) // if err != nil { // return err // } // exampleNetworkManagerSecurityAdminConfiguration, err := network.NewNetworkManagerSecurityAdminConfiguration(ctx, "example", &network.NetworkManagerSecurityAdminConfigurationArgs{ // Name: pulumi.String("example-admin-conf"), // NetworkManagerId: exampleNetworkManager.ID(), // }) // if err != nil { // return err // } // _, err = network.NewNetworkManagerAdminRuleCollection(ctx, "example", &network.NetworkManagerAdminRuleCollectionArgs{ // Name: pulumi.String("example-admin-rule-collection"), // SecurityAdminConfigurationId: exampleNetworkManagerSecurityAdminConfiguration.ID(), // NetworkGroupIds: pulumi.StringArray{ // exampleNetworkManagerNetworkGroup.ID(), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Network Manager Admin Rule Collection can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/networkManagerAdminRuleCollection:NetworkManagerAdminRuleCollection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Network/networkManagers/networkManager1/securityAdminConfigurations/configuration1/ruleCollections/ruleCollection1 // ``` type NetworkManagerAdminRuleCollection struct { pulumi.CustomResourceState // A description of the Network Manager Admin Rule Collection. Description pulumi.StringPtrOutput `pulumi:"description"` // Specifies the name which should be used for this Network Manager Admin Rule Collection. Changing this forces a new Network Manager Admin Rule Collection to be created. Name pulumi.StringOutput `pulumi:"name"` // A list of Network Group ID which this Network Manager Admin Rule Collection applies to. NetworkGroupIds pulumi.StringArrayOutput `pulumi:"networkGroupIds"` // Specifies the ID of the Network Manager Security Admin Configuration. Changing this forces a new Network Manager Admin Rule Collection to be created. SecurityAdminConfigurationId pulumi.StringOutput `pulumi:"securityAdminConfigurationId"` } // NewNetworkManagerAdminRuleCollection registers a new resource with the given unique name, arguments, and options. func NewNetworkManagerAdminRuleCollection(ctx *pulumi.Context, name string, args *NetworkManagerAdminRuleCollectionArgs, opts ...pulumi.ResourceOption) (*NetworkManagerAdminRuleCollection, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.NetworkGroupIds == nil { return nil, errors.New("invalid value for required argument 'NetworkGroupIds'") } if args.SecurityAdminConfigurationId == nil { return nil, errors.New("invalid value for required argument 'SecurityAdminConfigurationId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkManagerAdminRuleCollection err := ctx.RegisterResource("azure:network/networkManagerAdminRuleCollection:NetworkManagerAdminRuleCollection", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkManagerAdminRuleCollection gets an existing NetworkManagerAdminRuleCollection resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetNetworkManagerAdminRuleCollection(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkManagerAdminRuleCollectionState, opts ...pulumi.ResourceOption) (*NetworkManagerAdminRuleCollection, error) { var resource NetworkManagerAdminRuleCollection err := ctx.ReadResource("azure:network/networkManagerAdminRuleCollection:NetworkManagerAdminRuleCollection", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkManagerAdminRuleCollection resources. type networkManagerAdminRuleCollectionState struct { // A description of the Network Manager Admin Rule Collection. Description *string `pulumi:"description"` // Specifies the name which should be used for this Network Manager Admin Rule Collection. Changing this forces a new Network Manager Admin Rule Collection to be created. Name *string `pulumi:"name"` // A list of Network Group ID which this Network Manager Admin Rule Collection applies to. NetworkGroupIds []string `pulumi:"networkGroupIds"` // Specifies the ID of the Network Manager Security Admin Configuration. Changing this forces a new Network Manager Admin Rule Collection to be created. SecurityAdminConfigurationId *string `pulumi:"securityAdminConfigurationId"` } type NetworkManagerAdminRuleCollectionState struct { // A description of the Network Manager Admin Rule Collection. Description pulumi.StringPtrInput // Specifies the name which should be used for this Network Manager Admin Rule Collection. Changing this forces a new Network Manager Admin Rule Collection to be created. Name pulumi.StringPtrInput // A list of Network Group ID which this Network Manager Admin Rule Collection applies to. NetworkGroupIds pulumi.StringArrayInput // Specifies the ID of the Network Manager Security Admin Configuration. Changing this forces a new Network Manager Admin Rule Collection to be created. SecurityAdminConfigurationId pulumi.StringPtrInput } func (NetworkManagerAdminRuleCollectionState) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerAdminRuleCollectionState)(nil)).Elem() } type networkManagerAdminRuleCollectionArgs struct { // A description of the Network Manager Admin Rule Collection. Description *string `pulumi:"description"` // Specifies the name which should be used for this Network Manager Admin Rule Collection. Changing this forces a new Network Manager Admin Rule Collection to be created. Name *string `pulumi:"name"` // A list of Network Group ID which this Network Manager Admin Rule Collection applies to. NetworkGroupIds []string `pulumi:"networkGroupIds"` // Specifies the ID of the Network Manager Security Admin Configuration. Changing this forces a new Network Manager Admin Rule Collection to be created. SecurityAdminConfigurationId string `pulumi:"securityAdminConfigurationId"` } // The set of arguments for constructing a NetworkManagerAdminRuleCollection resource. type NetworkManagerAdminRuleCollectionArgs struct { // A description of the Network Manager Admin Rule Collection. Description pulumi.StringPtrInput // Specifies the name which should be used for this Network Manager Admin Rule Collection. Changing this forces a new Network Manager Admin Rule Collection to be created. Name pulumi.StringPtrInput // A list of Network Group ID which this Network Manager Admin Rule Collection applies to. NetworkGroupIds pulumi.StringArrayInput // Specifies the ID of the Network Manager Security Admin Configuration. Changing this forces a new Network Manager Admin Rule Collection to be created. SecurityAdminConfigurationId pulumi.StringInput } func (NetworkManagerAdminRuleCollectionArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerAdminRuleCollectionArgs)(nil)).Elem() } type NetworkManagerAdminRuleCollectionInput interface { pulumi.Input ToNetworkManagerAdminRuleCollectionOutput() NetworkManagerAdminRuleCollectionOutput ToNetworkManagerAdminRuleCollectionOutputWithContext(ctx context.Context) NetworkManagerAdminRuleCollectionOutput } func (*NetworkManagerAdminRuleCollection) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerAdminRuleCollection)(nil)).Elem() } func (i *NetworkManagerAdminRuleCollection) ToNetworkManagerAdminRuleCollectionOutput() NetworkManagerAdminRuleCollectionOutput { return i.ToNetworkManagerAdminRuleCollectionOutputWithContext(context.Background()) } func (i *NetworkManagerAdminRuleCollection) ToNetworkManagerAdminRuleCollectionOutputWithContext(ctx context.Context) NetworkManagerAdminRuleCollectionOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerAdminRuleCollectionOutput) } // NetworkManagerAdminRuleCollectionArrayInput is an input type that accepts NetworkManagerAdminRuleCollectionArray and NetworkManagerAdminRuleCollectionArrayOutput values. // You can construct a concrete instance of `NetworkManagerAdminRuleCollectionArrayInput` via: // // NetworkManagerAdminRuleCollectionArray{ NetworkManagerAdminRuleCollectionArgs{...} } type NetworkManagerAdminRuleCollectionArrayInput interface { pulumi.Input ToNetworkManagerAdminRuleCollectionArrayOutput() NetworkManagerAdminRuleCollectionArrayOutput ToNetworkManagerAdminRuleCollectionArrayOutputWithContext(context.Context) NetworkManagerAdminRuleCollectionArrayOutput } type NetworkManagerAdminRuleCollectionArray []NetworkManagerAdminRuleCollectionInput func (NetworkManagerAdminRuleCollectionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerAdminRuleCollection)(nil)).Elem() } func (i NetworkManagerAdminRuleCollectionArray) ToNetworkManagerAdminRuleCollectionArrayOutput() NetworkManagerAdminRuleCollectionArrayOutput { return i.ToNetworkManagerAdminRuleCollectionArrayOutputWithContext(context.Background()) } func (i NetworkManagerAdminRuleCollectionArray) ToNetworkManagerAdminRuleCollectionArrayOutputWithContext(ctx context.Context) NetworkManagerAdminRuleCollectionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerAdminRuleCollectionArrayOutput) } // NetworkManagerAdminRuleCollectionMapInput is an input type that accepts NetworkManagerAdminRuleCollectionMap and NetworkManagerAdminRuleCollectionMapOutput values. // You can construct a concrete instance of `NetworkManagerAdminRuleCollectionMapInput` via: // // NetworkManagerAdminRuleCollectionMap{ "key": NetworkManagerAdminRuleCollectionArgs{...} } type NetworkManagerAdminRuleCollectionMapInput interface { pulumi.Input ToNetworkManagerAdminRuleCollectionMapOutput() NetworkManagerAdminRuleCollectionMapOutput ToNetworkManagerAdminRuleCollectionMapOutputWithContext(context.Context) NetworkManagerAdminRuleCollectionMapOutput } type NetworkManagerAdminRuleCollectionMap map[string]NetworkManagerAdminRuleCollectionInput func (NetworkManagerAdminRuleCollectionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerAdminRuleCollection)(nil)).Elem() } func (i NetworkManagerAdminRuleCollectionMap) ToNetworkManagerAdminRuleCollectionMapOutput() NetworkManagerAdminRuleCollectionMapOutput { return i.ToNetworkManagerAdminRuleCollectionMapOutputWithContext(context.Background()) } func (i NetworkManagerAdminRuleCollectionMap) ToNetworkManagerAdminRuleCollectionMapOutputWithContext(ctx context.Context) NetworkManagerAdminRuleCollectionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerAdminRuleCollectionMapOutput) } type NetworkManagerAdminRuleCollectionOutput struct{ *pulumi.OutputState } func (NetworkManagerAdminRuleCollectionOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerAdminRuleCollection)(nil)).Elem() } func (o NetworkManagerAdminRuleCollectionOutput) ToNetworkManagerAdminRuleCollectionOutput() NetworkManagerAdminRuleCollectionOutput { return o } func (o NetworkManagerAdminRuleCollectionOutput) ToNetworkManagerAdminRuleCollectionOutputWithContext(ctx context.Context) NetworkManagerAdminRuleCollectionOutput { return o } // A description of the Network Manager Admin Rule Collection. func (o NetworkManagerAdminRuleCollectionOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkManagerAdminRuleCollection) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // Specifies the name which should be used for this Network Manager Admin Rule Collection. Changing this forces a new Network Manager Admin Rule Collection to be created. func (o NetworkManagerAdminRuleCollectionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerAdminRuleCollection) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A list of Network Group ID which this Network Manager Admin Rule Collection applies to. func (o NetworkManagerAdminRuleCollectionOutput) NetworkGroupIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *NetworkManagerAdminRuleCollection) pulumi.StringArrayOutput { return v.NetworkGroupIds }).(pulumi.StringArrayOutput) } // Specifies the ID of the Network Manager Security Admin Configuration. Changing this forces a new Network Manager Admin Rule Collection to be created. func (o NetworkManagerAdminRuleCollectionOutput) SecurityAdminConfigurationId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerAdminRuleCollection) pulumi.StringOutput { return v.SecurityAdminConfigurationId }).(pulumi.StringOutput) } type NetworkManagerAdminRuleCollectionArrayOutput struct{ *pulumi.OutputState } func (NetworkManagerAdminRuleCollectionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerAdminRuleCollection)(nil)).Elem() } func (o NetworkManagerAdminRuleCollectionArrayOutput) ToNetworkManagerAdminRuleCollectionArrayOutput() NetworkManagerAdminRuleCollectionArrayOutput { return o } func (o NetworkManagerAdminRuleCollectionArrayOutput) ToNetworkManagerAdminRuleCollectionArrayOutputWithContext(ctx context.Context) NetworkManagerAdminRuleCollectionArrayOutput { return o } func (o NetworkManagerAdminRuleCollectionArrayOutput) Index(i pulumi.IntInput) NetworkManagerAdminRuleCollectionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkManagerAdminRuleCollection { return vs[0].([]*NetworkManagerAdminRuleCollection)[vs[1].(int)] }).(NetworkManagerAdminRuleCollectionOutput) } type NetworkManagerAdminRuleCollectionMapOutput struct{ *pulumi.OutputState } func (NetworkManagerAdminRuleCollectionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerAdminRuleCollection)(nil)).Elem() } func (o NetworkManagerAdminRuleCollectionMapOutput) ToNetworkManagerAdminRuleCollectionMapOutput() NetworkManagerAdminRuleCollectionMapOutput { return o } func (o NetworkManagerAdminRuleCollectionMapOutput) ToNetworkManagerAdminRuleCollectionMapOutputWithContext(ctx context.Context) NetworkManagerAdminRuleCollectionMapOutput { return o } func (o NetworkManagerAdminRuleCollectionMapOutput) MapIndex(k pulumi.StringInput) NetworkManagerAdminRuleCollectionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkManagerAdminRuleCollection { return vs[0].(map[string]*NetworkManagerAdminRuleCollection)[vs[1].(string)] }).(NetworkManagerAdminRuleCollectionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerAdminRuleCollectionInput)(nil)).Elem(), &NetworkManagerAdminRuleCollection{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerAdminRuleCollectionArrayInput)(nil)).Elem(), NetworkManagerAdminRuleCollectionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerAdminRuleCollectionMapInput)(nil)).Elem(), NetworkManagerAdminRuleCollectionMap{}) pulumi.RegisterOutputType(NetworkManagerAdminRuleCollectionOutput{}) pulumi.RegisterOutputType(NetworkManagerAdminRuleCollectionArrayOutput{}) pulumi.RegisterOutputType(NetworkManagerAdminRuleCollectionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getVirtualNetworkPeering.go
sdk/go/azure/network/getVirtualNetworkPeering.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing virtual network peering. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.LookupVirtualNetwork(ctx, &network.LookupVirtualNetworkArgs{ // Name: "vnet01", // ResourceGroupName: "networking", // }, nil) // if err != nil { // return err // } // exampleGetVirtualNetworkPeering, err := network.LookupVirtualNetworkPeering(ctx, &network.LookupVirtualNetworkPeeringArgs{ // Name: "peer-vnet01-to-vnet02", // VirtualNetworkId: example.Id, // }, nil) // if err != nil { // return err // } // ctx.Export("id", exampleGetVirtualNetworkPeering.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func LookupVirtualNetworkPeering(ctx *pulumi.Context, args *LookupVirtualNetworkPeeringArgs, opts ...pulumi.InvokeOption) (*LookupVirtualNetworkPeeringResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupVirtualNetworkPeeringResult err := ctx.Invoke("azure:network/getVirtualNetworkPeering:getVirtualNetworkPeering", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getVirtualNetworkPeering. type LookupVirtualNetworkPeeringArgs struct { // The name of this virtual network peering. Name string `pulumi:"name"` // The resource ID of the virtual network. VirtualNetworkId string `pulumi:"virtualNetworkId"` } // A collection of values returned by getVirtualNetworkPeering. type LookupVirtualNetworkPeeringResult struct { // Controls if forwarded traffic from VMs in the remote virtual network is allowed. AllowForwardedTraffic bool `pulumi:"allowForwardedTraffic"` // Controls gatewayLinks can be used in the remote virtual network’s link to the local virtual network. AllowGatewayTransit bool `pulumi:"allowGatewayTransit"` // Controls if the traffic from the local virtual network can reach the remote virtual network. AllowVirtualNetworkAccess bool `pulumi:"allowVirtualNetworkAccess"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name string `pulumi:"name"` // Specifies whether only IPv6 address space is peered for Subnet peering. OnlyIpv6PeeringEnabled bool `pulumi:"onlyIpv6PeeringEnabled"` // Specifies whether complete Virtual Network address space is peered. PeerCompleteVirtualNetworksEnabled bool `pulumi:"peerCompleteVirtualNetworksEnabled"` // The full Azure resource ID of the remote virtual network. RemoteVirtualNetworkId string `pulumi:"remoteVirtualNetworkId"` // Controls if remote gateways can be used on the local virtual network. UseRemoteGateways bool `pulumi:"useRemoteGateways"` VirtualNetworkId string `pulumi:"virtualNetworkId"` } func LookupVirtualNetworkPeeringOutput(ctx *pulumi.Context, args LookupVirtualNetworkPeeringOutputArgs, opts ...pulumi.InvokeOption) LookupVirtualNetworkPeeringResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupVirtualNetworkPeeringResultOutput, error) { args := v.(LookupVirtualNetworkPeeringArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getVirtualNetworkPeering:getVirtualNetworkPeering", args, LookupVirtualNetworkPeeringResultOutput{}, options).(LookupVirtualNetworkPeeringResultOutput), nil }).(LookupVirtualNetworkPeeringResultOutput) } // A collection of arguments for invoking getVirtualNetworkPeering. type LookupVirtualNetworkPeeringOutputArgs struct { // The name of this virtual network peering. Name pulumi.StringInput `pulumi:"name"` // The resource ID of the virtual network. VirtualNetworkId pulumi.StringInput `pulumi:"virtualNetworkId"` } func (LookupVirtualNetworkPeeringOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupVirtualNetworkPeeringArgs)(nil)).Elem() } // A collection of values returned by getVirtualNetworkPeering. type LookupVirtualNetworkPeeringResultOutput struct{ *pulumi.OutputState } func (LookupVirtualNetworkPeeringResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupVirtualNetworkPeeringResult)(nil)).Elem() } func (o LookupVirtualNetworkPeeringResultOutput) ToLookupVirtualNetworkPeeringResultOutput() LookupVirtualNetworkPeeringResultOutput { return o } func (o LookupVirtualNetworkPeeringResultOutput) ToLookupVirtualNetworkPeeringResultOutputWithContext(ctx context.Context) LookupVirtualNetworkPeeringResultOutput { return o } // Controls if forwarded traffic from VMs in the remote virtual network is allowed. func (o LookupVirtualNetworkPeeringResultOutput) AllowForwardedTraffic() pulumi.BoolOutput { return o.ApplyT(func(v LookupVirtualNetworkPeeringResult) bool { return v.AllowForwardedTraffic }).(pulumi.BoolOutput) } // Controls gatewayLinks can be used in the remote virtual network’s link to the local virtual network. func (o LookupVirtualNetworkPeeringResultOutput) AllowGatewayTransit() pulumi.BoolOutput { return o.ApplyT(func(v LookupVirtualNetworkPeeringResult) bool { return v.AllowGatewayTransit }).(pulumi.BoolOutput) } // Controls if the traffic from the local virtual network can reach the remote virtual network. func (o LookupVirtualNetworkPeeringResultOutput) AllowVirtualNetworkAccess() pulumi.BoolOutput { return o.ApplyT(func(v LookupVirtualNetworkPeeringResult) bool { return v.AllowVirtualNetworkAccess }).(pulumi.BoolOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupVirtualNetworkPeeringResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualNetworkPeeringResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupVirtualNetworkPeeringResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualNetworkPeeringResult) string { return v.Name }).(pulumi.StringOutput) } // Specifies whether only IPv6 address space is peered for Subnet peering. func (o LookupVirtualNetworkPeeringResultOutput) OnlyIpv6PeeringEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupVirtualNetworkPeeringResult) bool { return v.OnlyIpv6PeeringEnabled }).(pulumi.BoolOutput) } // Specifies whether complete Virtual Network address space is peered. func (o LookupVirtualNetworkPeeringResultOutput) PeerCompleteVirtualNetworksEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupVirtualNetworkPeeringResult) bool { return v.PeerCompleteVirtualNetworksEnabled }).(pulumi.BoolOutput) } // The full Azure resource ID of the remote virtual network. func (o LookupVirtualNetworkPeeringResultOutput) RemoteVirtualNetworkId() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualNetworkPeeringResult) string { return v.RemoteVirtualNetworkId }).(pulumi.StringOutput) } // Controls if remote gateways can be used on the local virtual network. func (o LookupVirtualNetworkPeeringResultOutput) UseRemoteGateways() pulumi.BoolOutput { return o.ApplyT(func(v LookupVirtualNetworkPeeringResult) bool { return v.UseRemoteGateways }).(pulumi.BoolOutput) } func (o LookupVirtualNetworkPeeringResultOutput) VirtualNetworkId() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualNetworkPeeringResult) string { return v.VirtualNetworkId }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupVirtualNetworkPeeringResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/firewallNatRuleCollection.go
sdk/go/azure/network/firewallNatRuleCollection.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a NAT Rule Collection within an Azure Firewall. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("testvnet"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("AzureFirewallSubnet"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.1.0/24"), // }, // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("testpip"), // Location: example.Location, // ResourceGroupName: example.Name, // AllocationMethod: pulumi.String("Static"), // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // exampleFirewall, err := network.NewFirewall(ctx, "example", &network.FirewallArgs{ // Name: pulumi.String("testfirewall"), // Location: example.Location, // ResourceGroupName: example.Name, // SkuName: pulumi.String("AZFW_VNet"), // SkuTier: pulumi.String("Standard"), // IpConfigurations: network.FirewallIpConfigurationArray{ // &network.FirewallIpConfigurationArgs{ // Name: pulumi.String("configuration"), // SubnetId: exampleSubnet.ID(), // PublicIpAddressId: examplePublicIp.ID(), // }, // }, // }) // if err != nil { // return err // } // _, err = network.NewFirewallNatRuleCollection(ctx, "example", &network.FirewallNatRuleCollectionArgs{ // Name: pulumi.String("testcollection"), // AzureFirewallName: exampleFirewall.Name, // ResourceGroupName: example.Name, // Priority: pulumi.Int(100), // Action: pulumi.String("Dnat"), // Rules: network.FirewallNatRuleCollectionRuleArray{ // &network.FirewallNatRuleCollectionRuleArgs{ // Name: pulumi.String("testrule"), // SourceAddresses: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // DestinationPorts: pulumi.StringArray{ // pulumi.String("53"), // }, // DestinationAddresses: pulumi.StringArray{ // examplePublicIp.IpAddress, // }, // TranslatedPort: pulumi.String("53"), // TranslatedAddress: pulumi.String("8.8.8.8"), // Protocols: pulumi.StringArray{ // pulumi.String("TCP"), // pulumi.String("UDP"), // }, // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Azure Firewall NAT Rule Collections can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/firewallNatRuleCollection:FirewallNatRuleCollection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/azureFirewalls/myfirewall/natRuleCollections/mycollection // ``` type FirewallNatRuleCollection struct { pulumi.CustomResourceState // Specifies the action the rule will apply to matching traffic. Possible values are `Dnat` and `Snat`. Action pulumi.StringOutput `pulumi:"action"` // Specifies the name of the Firewall in which the NAT Rule Collection should be created. Changing this forces a new resource to be created. AzureFirewallName pulumi.StringOutput `pulumi:"azureFirewallName"` // Specifies the name of the NAT Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the priority of the rule collection. Possible values are between `100` - `65000`. Priority pulumi.IntOutput `pulumi:"priority"` // Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // One or more `rule` blocks as defined below. Rules FirewallNatRuleCollectionRuleArrayOutput `pulumi:"rules"` } // NewFirewallNatRuleCollection registers a new resource with the given unique name, arguments, and options. func NewFirewallNatRuleCollection(ctx *pulumi.Context, name string, args *FirewallNatRuleCollectionArgs, opts ...pulumi.ResourceOption) (*FirewallNatRuleCollection, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Action == nil { return nil, errors.New("invalid value for required argument 'Action'") } if args.AzureFirewallName == nil { return nil, errors.New("invalid value for required argument 'AzureFirewallName'") } if args.Priority == nil { return nil, errors.New("invalid value for required argument 'Priority'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Rules == nil { return nil, errors.New("invalid value for required argument 'Rules'") } opts = internal.PkgResourceDefaultOpts(opts) var resource FirewallNatRuleCollection err := ctx.RegisterResource("azure:network/firewallNatRuleCollection:FirewallNatRuleCollection", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetFirewallNatRuleCollection gets an existing FirewallNatRuleCollection resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetFirewallNatRuleCollection(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FirewallNatRuleCollectionState, opts ...pulumi.ResourceOption) (*FirewallNatRuleCollection, error) { var resource FirewallNatRuleCollection err := ctx.ReadResource("azure:network/firewallNatRuleCollection:FirewallNatRuleCollection", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering FirewallNatRuleCollection resources. type firewallNatRuleCollectionState struct { // Specifies the action the rule will apply to matching traffic. Possible values are `Dnat` and `Snat`. Action *string `pulumi:"action"` // Specifies the name of the Firewall in which the NAT Rule Collection should be created. Changing this forces a new resource to be created. AzureFirewallName *string `pulumi:"azureFirewallName"` // Specifies the name of the NAT Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the priority of the rule collection. Possible values are between `100` - `65000`. Priority *int `pulumi:"priority"` // Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // One or more `rule` blocks as defined below. Rules []FirewallNatRuleCollectionRule `pulumi:"rules"` } type FirewallNatRuleCollectionState struct { // Specifies the action the rule will apply to matching traffic. Possible values are `Dnat` and `Snat`. Action pulumi.StringPtrInput // Specifies the name of the Firewall in which the NAT Rule Collection should be created. Changing this forces a new resource to be created. AzureFirewallName pulumi.StringPtrInput // Specifies the name of the NAT Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the priority of the rule collection. Possible values are between `100` - `65000`. Priority pulumi.IntPtrInput // Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // One or more `rule` blocks as defined below. Rules FirewallNatRuleCollectionRuleArrayInput } func (FirewallNatRuleCollectionState) ElementType() reflect.Type { return reflect.TypeOf((*firewallNatRuleCollectionState)(nil)).Elem() } type firewallNatRuleCollectionArgs struct { // Specifies the action the rule will apply to matching traffic. Possible values are `Dnat` and `Snat`. Action string `pulumi:"action"` // Specifies the name of the Firewall in which the NAT Rule Collection should be created. Changing this forces a new resource to be created. AzureFirewallName string `pulumi:"azureFirewallName"` // Specifies the name of the NAT Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the priority of the rule collection. Possible values are between `100` - `65000`. Priority int `pulumi:"priority"` // Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // One or more `rule` blocks as defined below. Rules []FirewallNatRuleCollectionRule `pulumi:"rules"` } // The set of arguments for constructing a FirewallNatRuleCollection resource. type FirewallNatRuleCollectionArgs struct { // Specifies the action the rule will apply to matching traffic. Possible values are `Dnat` and `Snat`. Action pulumi.StringInput // Specifies the name of the Firewall in which the NAT Rule Collection should be created. Changing this forces a new resource to be created. AzureFirewallName pulumi.StringInput // Specifies the name of the NAT Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the priority of the rule collection. Possible values are between `100` - `65000`. Priority pulumi.IntInput // Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // One or more `rule` blocks as defined below. Rules FirewallNatRuleCollectionRuleArrayInput } func (FirewallNatRuleCollectionArgs) ElementType() reflect.Type { return reflect.TypeOf((*firewallNatRuleCollectionArgs)(nil)).Elem() } type FirewallNatRuleCollectionInput interface { pulumi.Input ToFirewallNatRuleCollectionOutput() FirewallNatRuleCollectionOutput ToFirewallNatRuleCollectionOutputWithContext(ctx context.Context) FirewallNatRuleCollectionOutput } func (*FirewallNatRuleCollection) ElementType() reflect.Type { return reflect.TypeOf((**FirewallNatRuleCollection)(nil)).Elem() } func (i *FirewallNatRuleCollection) ToFirewallNatRuleCollectionOutput() FirewallNatRuleCollectionOutput { return i.ToFirewallNatRuleCollectionOutputWithContext(context.Background()) } func (i *FirewallNatRuleCollection) ToFirewallNatRuleCollectionOutputWithContext(ctx context.Context) FirewallNatRuleCollectionOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallNatRuleCollectionOutput) } // FirewallNatRuleCollectionArrayInput is an input type that accepts FirewallNatRuleCollectionArray and FirewallNatRuleCollectionArrayOutput values. // You can construct a concrete instance of `FirewallNatRuleCollectionArrayInput` via: // // FirewallNatRuleCollectionArray{ FirewallNatRuleCollectionArgs{...} } type FirewallNatRuleCollectionArrayInput interface { pulumi.Input ToFirewallNatRuleCollectionArrayOutput() FirewallNatRuleCollectionArrayOutput ToFirewallNatRuleCollectionArrayOutputWithContext(context.Context) FirewallNatRuleCollectionArrayOutput } type FirewallNatRuleCollectionArray []FirewallNatRuleCollectionInput func (FirewallNatRuleCollectionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*FirewallNatRuleCollection)(nil)).Elem() } func (i FirewallNatRuleCollectionArray) ToFirewallNatRuleCollectionArrayOutput() FirewallNatRuleCollectionArrayOutput { return i.ToFirewallNatRuleCollectionArrayOutputWithContext(context.Background()) } func (i FirewallNatRuleCollectionArray) ToFirewallNatRuleCollectionArrayOutputWithContext(ctx context.Context) FirewallNatRuleCollectionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallNatRuleCollectionArrayOutput) } // FirewallNatRuleCollectionMapInput is an input type that accepts FirewallNatRuleCollectionMap and FirewallNatRuleCollectionMapOutput values. // You can construct a concrete instance of `FirewallNatRuleCollectionMapInput` via: // // FirewallNatRuleCollectionMap{ "key": FirewallNatRuleCollectionArgs{...} } type FirewallNatRuleCollectionMapInput interface { pulumi.Input ToFirewallNatRuleCollectionMapOutput() FirewallNatRuleCollectionMapOutput ToFirewallNatRuleCollectionMapOutputWithContext(context.Context) FirewallNatRuleCollectionMapOutput } type FirewallNatRuleCollectionMap map[string]FirewallNatRuleCollectionInput func (FirewallNatRuleCollectionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FirewallNatRuleCollection)(nil)).Elem() } func (i FirewallNatRuleCollectionMap) ToFirewallNatRuleCollectionMapOutput() FirewallNatRuleCollectionMapOutput { return i.ToFirewallNatRuleCollectionMapOutputWithContext(context.Background()) } func (i FirewallNatRuleCollectionMap) ToFirewallNatRuleCollectionMapOutputWithContext(ctx context.Context) FirewallNatRuleCollectionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallNatRuleCollectionMapOutput) } type FirewallNatRuleCollectionOutput struct{ *pulumi.OutputState } func (FirewallNatRuleCollectionOutput) ElementType() reflect.Type { return reflect.TypeOf((**FirewallNatRuleCollection)(nil)).Elem() } func (o FirewallNatRuleCollectionOutput) ToFirewallNatRuleCollectionOutput() FirewallNatRuleCollectionOutput { return o } func (o FirewallNatRuleCollectionOutput) ToFirewallNatRuleCollectionOutputWithContext(ctx context.Context) FirewallNatRuleCollectionOutput { return o } // Specifies the action the rule will apply to matching traffic. Possible values are `Dnat` and `Snat`. func (o FirewallNatRuleCollectionOutput) Action() pulumi.StringOutput { return o.ApplyT(func(v *FirewallNatRuleCollection) pulumi.StringOutput { return v.Action }).(pulumi.StringOutput) } // Specifies the name of the Firewall in which the NAT Rule Collection should be created. Changing this forces a new resource to be created. func (o FirewallNatRuleCollectionOutput) AzureFirewallName() pulumi.StringOutput { return o.ApplyT(func(v *FirewallNatRuleCollection) pulumi.StringOutput { return v.AzureFirewallName }).(pulumi.StringOutput) } // Specifies the name of the NAT Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created. func (o FirewallNatRuleCollectionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *FirewallNatRuleCollection) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the priority of the rule collection. Possible values are between `100` - `65000`. func (o FirewallNatRuleCollectionOutput) Priority() pulumi.IntOutput { return o.ApplyT(func(v *FirewallNatRuleCollection) pulumi.IntOutput { return v.Priority }).(pulumi.IntOutput) } // Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created. func (o FirewallNatRuleCollectionOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *FirewallNatRuleCollection) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // One or more `rule` blocks as defined below. func (o FirewallNatRuleCollectionOutput) Rules() FirewallNatRuleCollectionRuleArrayOutput { return o.ApplyT(func(v *FirewallNatRuleCollection) FirewallNatRuleCollectionRuleArrayOutput { return v.Rules }).(FirewallNatRuleCollectionRuleArrayOutput) } type FirewallNatRuleCollectionArrayOutput struct{ *pulumi.OutputState } func (FirewallNatRuleCollectionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*FirewallNatRuleCollection)(nil)).Elem() } func (o FirewallNatRuleCollectionArrayOutput) ToFirewallNatRuleCollectionArrayOutput() FirewallNatRuleCollectionArrayOutput { return o } func (o FirewallNatRuleCollectionArrayOutput) ToFirewallNatRuleCollectionArrayOutputWithContext(ctx context.Context) FirewallNatRuleCollectionArrayOutput { return o } func (o FirewallNatRuleCollectionArrayOutput) Index(i pulumi.IntInput) FirewallNatRuleCollectionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FirewallNatRuleCollection { return vs[0].([]*FirewallNatRuleCollection)[vs[1].(int)] }).(FirewallNatRuleCollectionOutput) } type FirewallNatRuleCollectionMapOutput struct{ *pulumi.OutputState } func (FirewallNatRuleCollectionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FirewallNatRuleCollection)(nil)).Elem() } func (o FirewallNatRuleCollectionMapOutput) ToFirewallNatRuleCollectionMapOutput() FirewallNatRuleCollectionMapOutput { return o } func (o FirewallNatRuleCollectionMapOutput) ToFirewallNatRuleCollectionMapOutputWithContext(ctx context.Context) FirewallNatRuleCollectionMapOutput { return o } func (o FirewallNatRuleCollectionMapOutput) MapIndex(k pulumi.StringInput) FirewallNatRuleCollectionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FirewallNatRuleCollection { return vs[0].(map[string]*FirewallNatRuleCollection)[vs[1].(string)] }).(FirewallNatRuleCollectionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*FirewallNatRuleCollectionInput)(nil)).Elem(), &FirewallNatRuleCollection{}) pulumi.RegisterInputType(reflect.TypeOf((*FirewallNatRuleCollectionArrayInput)(nil)).Elem(), FirewallNatRuleCollectionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*FirewallNatRuleCollectionMapInput)(nil)).Elem(), FirewallNatRuleCollectionMap{}) pulumi.RegisterOutputType(FirewallNatRuleCollectionOutput{}) pulumi.RegisterOutputType(FirewallNatRuleCollectionArrayOutput{}) pulumi.RegisterOutputType(FirewallNatRuleCollectionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getSubnet.go
sdk/go/azure/network/getSubnet.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Subnet within a Virtual Network. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.LookupSubnet(ctx, &network.LookupSubnetArgs{ // Name: "backend", // VirtualNetworkName: "production", // ResourceGroupName: "networking", // }, nil) // if err != nil { // return err // } // ctx.Export("subnetId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func LookupSubnet(ctx *pulumi.Context, args *LookupSubnetArgs, opts ...pulumi.InvokeOption) (*LookupSubnetResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupSubnetResult err := ctx.Invoke("azure:network/getSubnet:getSubnet", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getSubnet. type LookupSubnetArgs struct { // Specifies the name of the Subnet. Name string `pulumi:"name"` // Specifies the name of the resource group the Virtual Network is located in. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies the name of the Virtual Network this Subnet is located within. VirtualNetworkName string `pulumi:"virtualNetworkName"` } // A collection of values returned by getSubnet. type LookupSubnetResult struct { AddressPrefix string `pulumi:"addressPrefix"` // The address prefixes for the subnet. AddressPrefixes []string `pulumi:"addressPrefixes"` // Is the default outbound access enabled for the subnet. DefaultOutboundAccessEnabled bool `pulumi:"defaultOutboundAccessEnabled"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name string `pulumi:"name"` // The ID of the Network Security Group associated with the subnet. NetworkSecurityGroupId string `pulumi:"networkSecurityGroupId"` // Enable or Disable network policies for the private endpoint on the subnet. PrivateEndpointNetworkPolicies string `pulumi:"privateEndpointNetworkPolicies"` // Enable or Disable network policies for the private link service on the subnet. PrivateLinkServiceNetworkPoliciesEnabled bool `pulumi:"privateLinkServiceNetworkPoliciesEnabled"` ResourceGroupName string `pulumi:"resourceGroupName"` // The ID of the Route Table associated with this subnet. RouteTableId string `pulumi:"routeTableId"` // A list of Service Endpoints within this subnet. ServiceEndpoints []string `pulumi:"serviceEndpoints"` VirtualNetworkName string `pulumi:"virtualNetworkName"` } func LookupSubnetOutput(ctx *pulumi.Context, args LookupSubnetOutputArgs, opts ...pulumi.InvokeOption) LookupSubnetResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupSubnetResultOutput, error) { args := v.(LookupSubnetArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getSubnet:getSubnet", args, LookupSubnetResultOutput{}, options).(LookupSubnetResultOutput), nil }).(LookupSubnetResultOutput) } // A collection of arguments for invoking getSubnet. type LookupSubnetOutputArgs struct { // Specifies the name of the Subnet. Name pulumi.StringInput `pulumi:"name"` // Specifies the name of the resource group the Virtual Network is located in. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` // Specifies the name of the Virtual Network this Subnet is located within. VirtualNetworkName pulumi.StringInput `pulumi:"virtualNetworkName"` } func (LookupSubnetOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupSubnetArgs)(nil)).Elem() } // A collection of values returned by getSubnet. type LookupSubnetResultOutput struct{ *pulumi.OutputState } func (LookupSubnetResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupSubnetResult)(nil)).Elem() } func (o LookupSubnetResultOutput) ToLookupSubnetResultOutput() LookupSubnetResultOutput { return o } func (o LookupSubnetResultOutput) ToLookupSubnetResultOutputWithContext(ctx context.Context) LookupSubnetResultOutput { return o } func (o LookupSubnetResultOutput) AddressPrefix() pulumi.StringOutput { return o.ApplyT(func(v LookupSubnetResult) string { return v.AddressPrefix }).(pulumi.StringOutput) } // The address prefixes for the subnet. func (o LookupSubnetResultOutput) AddressPrefixes() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupSubnetResult) []string { return v.AddressPrefixes }).(pulumi.StringArrayOutput) } // Is the default outbound access enabled for the subnet. func (o LookupSubnetResultOutput) DefaultOutboundAccessEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupSubnetResult) bool { return v.DefaultOutboundAccessEnabled }).(pulumi.BoolOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupSubnetResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupSubnetResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupSubnetResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupSubnetResult) string { return v.Name }).(pulumi.StringOutput) } // The ID of the Network Security Group associated with the subnet. func (o LookupSubnetResultOutput) NetworkSecurityGroupId() pulumi.StringOutput { return o.ApplyT(func(v LookupSubnetResult) string { return v.NetworkSecurityGroupId }).(pulumi.StringOutput) } // Enable or Disable network policies for the private endpoint on the subnet. func (o LookupSubnetResultOutput) PrivateEndpointNetworkPolicies() pulumi.StringOutput { return o.ApplyT(func(v LookupSubnetResult) string { return v.PrivateEndpointNetworkPolicies }).(pulumi.StringOutput) } // Enable or Disable network policies for the private link service on the subnet. func (o LookupSubnetResultOutput) PrivateLinkServiceNetworkPoliciesEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupSubnetResult) bool { return v.PrivateLinkServiceNetworkPoliciesEnabled }).(pulumi.BoolOutput) } func (o LookupSubnetResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupSubnetResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // The ID of the Route Table associated with this subnet. func (o LookupSubnetResultOutput) RouteTableId() pulumi.StringOutput { return o.ApplyT(func(v LookupSubnetResult) string { return v.RouteTableId }).(pulumi.StringOutput) } // A list of Service Endpoints within this subnet. func (o LookupSubnetResultOutput) ServiceEndpoints() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupSubnetResult) []string { return v.ServiceEndpoints }).(pulumi.StringArrayOutput) } func (o LookupSubnetResultOutput) VirtualNetworkName() pulumi.StringOutput { return o.ApplyT(func(v LookupSubnetResult) string { return v.VirtualNetworkName }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupSubnetResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/subnet.go
sdk/go/azure/network/subnet.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a subnet. Subnets represent network segments within the IP space defined by the virtual network. // // > **NOTE on Virtual Networks and Subnet's:** This provider currently // provides both a standalone Subnet resource, and allows for Subnets to be defined in-line within the Virtual Network resource. // At this time you cannot use a Virtual Network with in-line Subnets in conjunction with any Subnet resources. Doing so will cause a conflict of Subnet configurations and will overwrite Subnets. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-vnet"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // _, err = network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("example-subnet"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.1.0/24"), // }, // Delegations: network.SubnetDelegationArray{ // &network.SubnetDelegationArgs{ // Name: pulumi.String("delegation"), // ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{ // Name: pulumi.String("Microsoft.ContainerInstance/containerGroups"), // Actions: pulumi.StringArray{ // pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"), // pulumi.String("Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action"), // }, // }, // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Subnets can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/subnet:Subnet exampleSubnet /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/virtualNetworks/myvnet1/subnets/mysubnet1 // ``` type Subnet struct { pulumi.CustomResourceState // The address prefixes to use for the subnet. // // > **Note:** Exactly one of `addressPrefixes` or `ipAddressPool` must be specified. AddressPrefixes pulumi.StringArrayOutput `pulumi:"addressPrefixes"` // Enable default outbound access to the internet for the subnet. Defaults to `true`. DefaultOutboundAccessEnabled pulumi.BoolPtrOutput `pulumi:"defaultOutboundAccessEnabled"` // One or more `delegation` blocks as defined below. Delegations SubnetDelegationArrayOutput `pulumi:"delegations"` // An `ipAddressPool` block as defined below. // // > **Note:** Exactly one of `addressPrefixes` or `ipAddressPool` must be specified. IpAddressPool SubnetIpAddressPoolPtrOutput `pulumi:"ipAddressPool"` // The name of the subnet. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Enable or Disable network policies for the private endpoint on the subnet. Possible values are `Disabled`, `Enabled`, `NetworkSecurityGroupEnabled` and `RouteTableEnabled`. Defaults to `Disabled`. // // > **NOTE:** If you don't want to use network policies like user-defined Routes and Network Security Groups, you need to set `privateEndpointNetworkPolicies` in the subnet to `Disabled`. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the `network.SubnetNetworkSecurityGroupAssociation` resource. // // > **NOTE:** If you want to use network policies like user-defined Routes and Network Security Groups, you need to set the `privateEndpointNetworkPolicies` in the Subnet to `Enabled`/`NetworkSecurityGroupEnabled`/`RouteTableEnabled`. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the `network.SubnetNetworkSecurityGroupAssociation` resource. // // > **NOTE:** See more details from [Manage network policies for Private Endpoints](https://learn.microsoft.com/en-gb/azure/private-link/disable-private-endpoint-network-policy?tabs=network-policy-portal). PrivateEndpointNetworkPolicies pulumi.StringPtrOutput `pulumi:"privateEndpointNetworkPolicies"` // Enable or Disable network policies for the private link service on the subnet. Defaults to `true`. // // > **NOTE:** When configuring Azure Private Link service, the explicit setting `privateLinkServiceNetworkPoliciesEnabled` must be set to `false` in the subnet since Private Link Service does not support network policies like user-defined Routes and Network Security Groups. This setting only affects the Private Link service. For other resources in the subnet, access is controlled based on the Network Security Group which can be configured using the `network.SubnetNetworkSecurityGroupAssociation` resource. See more details from [Manage network policies for Private Link Services](https://learn.microsoft.com/en-gb/azure/private-link/disable-private-link-service-network-policy?tabs=private-link-network-policy-powershell). PrivateLinkServiceNetworkPoliciesEnabled pulumi.BoolPtrOutput `pulumi:"privateLinkServiceNetworkPoliciesEnabled"` // The name of the resource group in which to create the subnet. This must be the resource group that the virtual network resides in. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The list of IDs of Service Endpoint Policies to associate with the subnet. ServiceEndpointPolicyIds pulumi.StringArrayOutput `pulumi:"serviceEndpointPolicyIds"` // The list of Service endpoints to associate with the subnet. Possible values include: `Microsoft.AzureActiveDirectory`, `Microsoft.AzureCosmosDB`, `Microsoft.ContainerRegistry`, `Microsoft.EventHub`, `Microsoft.KeyVault`, `Microsoft.ServiceBus`, `Microsoft.Sql`, `Microsoft.Storage`, `Microsoft.Storage.Global` and `Microsoft.Web`. // // > **NOTE:** In order to use `Microsoft.Storage.Global` service endpoint (which allows access to virtual networks in other regions), you must enable the `AllowGlobalTagsForStorage` feature in your subscription. This is currently a preview feature, please see the [official documentation](https://learn.microsoft.com/en-us/azure/storage/common/storage-network-security?tabs=azure-cli#enabling-access-to-virtual-networks-in-other-regions-preview) for more information. ServiceEndpoints pulumi.StringArrayOutput `pulumi:"serviceEndpoints"` // The sharing scope of the subnet. Possible value is `Tenant`. // // > **Note:** This property cannot be set if `defaultOutboundAccessEnabled` is set to `true`. // // !> **Note:** The `sharingScope` property is only available to users who have been explicitly registered and granted access by the Azure Networking Product Group. SharingScope pulumi.StringPtrOutput `pulumi:"sharingScope"` // The name of the virtual network to which to attach the subnet. Changing this forces a new resource to be created. VirtualNetworkName pulumi.StringOutput `pulumi:"virtualNetworkName"` } // NewSubnet registers a new resource with the given unique name, arguments, and options. func NewSubnet(ctx *pulumi.Context, name string, args *SubnetArgs, opts ...pulumi.ResourceOption) (*Subnet, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.VirtualNetworkName == nil { return nil, errors.New("invalid value for required argument 'VirtualNetworkName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Subnet err := ctx.RegisterResource("azure:network/subnet:Subnet", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSubnet gets an existing Subnet resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetSubnet(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SubnetState, opts ...pulumi.ResourceOption) (*Subnet, error) { var resource Subnet err := ctx.ReadResource("azure:network/subnet:Subnet", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Subnet resources. type subnetState struct { // The address prefixes to use for the subnet. // // > **Note:** Exactly one of `addressPrefixes` or `ipAddressPool` must be specified. AddressPrefixes []string `pulumi:"addressPrefixes"` // Enable default outbound access to the internet for the subnet. Defaults to `true`. DefaultOutboundAccessEnabled *bool `pulumi:"defaultOutboundAccessEnabled"` // One or more `delegation` blocks as defined below. Delegations []SubnetDelegation `pulumi:"delegations"` // An `ipAddressPool` block as defined below. // // > **Note:** Exactly one of `addressPrefixes` or `ipAddressPool` must be specified. IpAddressPool *SubnetIpAddressPool `pulumi:"ipAddressPool"` // The name of the subnet. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Enable or Disable network policies for the private endpoint on the subnet. Possible values are `Disabled`, `Enabled`, `NetworkSecurityGroupEnabled` and `RouteTableEnabled`. Defaults to `Disabled`. // // > **NOTE:** If you don't want to use network policies like user-defined Routes and Network Security Groups, you need to set `privateEndpointNetworkPolicies` in the subnet to `Disabled`. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the `network.SubnetNetworkSecurityGroupAssociation` resource. // // > **NOTE:** If you want to use network policies like user-defined Routes and Network Security Groups, you need to set the `privateEndpointNetworkPolicies` in the Subnet to `Enabled`/`NetworkSecurityGroupEnabled`/`RouteTableEnabled`. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the `network.SubnetNetworkSecurityGroupAssociation` resource. // // > **NOTE:** See more details from [Manage network policies for Private Endpoints](https://learn.microsoft.com/en-gb/azure/private-link/disable-private-endpoint-network-policy?tabs=network-policy-portal). PrivateEndpointNetworkPolicies *string `pulumi:"privateEndpointNetworkPolicies"` // Enable or Disable network policies for the private link service on the subnet. Defaults to `true`. // // > **NOTE:** When configuring Azure Private Link service, the explicit setting `privateLinkServiceNetworkPoliciesEnabled` must be set to `false` in the subnet since Private Link Service does not support network policies like user-defined Routes and Network Security Groups. This setting only affects the Private Link service. For other resources in the subnet, access is controlled based on the Network Security Group which can be configured using the `network.SubnetNetworkSecurityGroupAssociation` resource. See more details from [Manage network policies for Private Link Services](https://learn.microsoft.com/en-gb/azure/private-link/disable-private-link-service-network-policy?tabs=private-link-network-policy-powershell). PrivateLinkServiceNetworkPoliciesEnabled *bool `pulumi:"privateLinkServiceNetworkPoliciesEnabled"` // The name of the resource group in which to create the subnet. This must be the resource group that the virtual network resides in. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The list of IDs of Service Endpoint Policies to associate with the subnet. ServiceEndpointPolicyIds []string `pulumi:"serviceEndpointPolicyIds"` // The list of Service endpoints to associate with the subnet. Possible values include: `Microsoft.AzureActiveDirectory`, `Microsoft.AzureCosmosDB`, `Microsoft.ContainerRegistry`, `Microsoft.EventHub`, `Microsoft.KeyVault`, `Microsoft.ServiceBus`, `Microsoft.Sql`, `Microsoft.Storage`, `Microsoft.Storage.Global` and `Microsoft.Web`. // // > **NOTE:** In order to use `Microsoft.Storage.Global` service endpoint (which allows access to virtual networks in other regions), you must enable the `AllowGlobalTagsForStorage` feature in your subscription. This is currently a preview feature, please see the [official documentation](https://learn.microsoft.com/en-us/azure/storage/common/storage-network-security?tabs=azure-cli#enabling-access-to-virtual-networks-in-other-regions-preview) for more information. ServiceEndpoints []string `pulumi:"serviceEndpoints"` // The sharing scope of the subnet. Possible value is `Tenant`. // // > **Note:** This property cannot be set if `defaultOutboundAccessEnabled` is set to `true`. // // !> **Note:** The `sharingScope` property is only available to users who have been explicitly registered and granted access by the Azure Networking Product Group. SharingScope *string `pulumi:"sharingScope"` // The name of the virtual network to which to attach the subnet. Changing this forces a new resource to be created. VirtualNetworkName *string `pulumi:"virtualNetworkName"` } type SubnetState struct { // The address prefixes to use for the subnet. // // > **Note:** Exactly one of `addressPrefixes` or `ipAddressPool` must be specified. AddressPrefixes pulumi.StringArrayInput // Enable default outbound access to the internet for the subnet. Defaults to `true`. DefaultOutboundAccessEnabled pulumi.BoolPtrInput // One or more `delegation` blocks as defined below. Delegations SubnetDelegationArrayInput // An `ipAddressPool` block as defined below. // // > **Note:** Exactly one of `addressPrefixes` or `ipAddressPool` must be specified. IpAddressPool SubnetIpAddressPoolPtrInput // The name of the subnet. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Enable or Disable network policies for the private endpoint on the subnet. Possible values are `Disabled`, `Enabled`, `NetworkSecurityGroupEnabled` and `RouteTableEnabled`. Defaults to `Disabled`. // // > **NOTE:** If you don't want to use network policies like user-defined Routes and Network Security Groups, you need to set `privateEndpointNetworkPolicies` in the subnet to `Disabled`. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the `network.SubnetNetworkSecurityGroupAssociation` resource. // // > **NOTE:** If you want to use network policies like user-defined Routes and Network Security Groups, you need to set the `privateEndpointNetworkPolicies` in the Subnet to `Enabled`/`NetworkSecurityGroupEnabled`/`RouteTableEnabled`. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the `network.SubnetNetworkSecurityGroupAssociation` resource. // // > **NOTE:** See more details from [Manage network policies for Private Endpoints](https://learn.microsoft.com/en-gb/azure/private-link/disable-private-endpoint-network-policy?tabs=network-policy-portal). PrivateEndpointNetworkPolicies pulumi.StringPtrInput // Enable or Disable network policies for the private link service on the subnet. Defaults to `true`. // // > **NOTE:** When configuring Azure Private Link service, the explicit setting `privateLinkServiceNetworkPoliciesEnabled` must be set to `false` in the subnet since Private Link Service does not support network policies like user-defined Routes and Network Security Groups. This setting only affects the Private Link service. For other resources in the subnet, access is controlled based on the Network Security Group which can be configured using the `network.SubnetNetworkSecurityGroupAssociation` resource. See more details from [Manage network policies for Private Link Services](https://learn.microsoft.com/en-gb/azure/private-link/disable-private-link-service-network-policy?tabs=private-link-network-policy-powershell). PrivateLinkServiceNetworkPoliciesEnabled pulumi.BoolPtrInput // The name of the resource group in which to create the subnet. This must be the resource group that the virtual network resides in. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The list of IDs of Service Endpoint Policies to associate with the subnet. ServiceEndpointPolicyIds pulumi.StringArrayInput // The list of Service endpoints to associate with the subnet. Possible values include: `Microsoft.AzureActiveDirectory`, `Microsoft.AzureCosmosDB`, `Microsoft.ContainerRegistry`, `Microsoft.EventHub`, `Microsoft.KeyVault`, `Microsoft.ServiceBus`, `Microsoft.Sql`, `Microsoft.Storage`, `Microsoft.Storage.Global` and `Microsoft.Web`. // // > **NOTE:** In order to use `Microsoft.Storage.Global` service endpoint (which allows access to virtual networks in other regions), you must enable the `AllowGlobalTagsForStorage` feature in your subscription. This is currently a preview feature, please see the [official documentation](https://learn.microsoft.com/en-us/azure/storage/common/storage-network-security?tabs=azure-cli#enabling-access-to-virtual-networks-in-other-regions-preview) for more information. ServiceEndpoints pulumi.StringArrayInput // The sharing scope of the subnet. Possible value is `Tenant`. // // > **Note:** This property cannot be set if `defaultOutboundAccessEnabled` is set to `true`. // // !> **Note:** The `sharingScope` property is only available to users who have been explicitly registered and granted access by the Azure Networking Product Group. SharingScope pulumi.StringPtrInput // The name of the virtual network to which to attach the subnet. Changing this forces a new resource to be created. VirtualNetworkName pulumi.StringPtrInput } func (SubnetState) ElementType() reflect.Type { return reflect.TypeOf((*subnetState)(nil)).Elem() } type subnetArgs struct { // The address prefixes to use for the subnet. // // > **Note:** Exactly one of `addressPrefixes` or `ipAddressPool` must be specified. AddressPrefixes []string `pulumi:"addressPrefixes"` // Enable default outbound access to the internet for the subnet. Defaults to `true`. DefaultOutboundAccessEnabled *bool `pulumi:"defaultOutboundAccessEnabled"` // One or more `delegation` blocks as defined below. Delegations []SubnetDelegation `pulumi:"delegations"` // An `ipAddressPool` block as defined below. // // > **Note:** Exactly one of `addressPrefixes` or `ipAddressPool` must be specified. IpAddressPool *SubnetIpAddressPool `pulumi:"ipAddressPool"` // The name of the subnet. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Enable or Disable network policies for the private endpoint on the subnet. Possible values are `Disabled`, `Enabled`, `NetworkSecurityGroupEnabled` and `RouteTableEnabled`. Defaults to `Disabled`. // // > **NOTE:** If you don't want to use network policies like user-defined Routes and Network Security Groups, you need to set `privateEndpointNetworkPolicies` in the subnet to `Disabled`. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the `network.SubnetNetworkSecurityGroupAssociation` resource. // // > **NOTE:** If you want to use network policies like user-defined Routes and Network Security Groups, you need to set the `privateEndpointNetworkPolicies` in the Subnet to `Enabled`/`NetworkSecurityGroupEnabled`/`RouteTableEnabled`. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the `network.SubnetNetworkSecurityGroupAssociation` resource. // // > **NOTE:** See more details from [Manage network policies for Private Endpoints](https://learn.microsoft.com/en-gb/azure/private-link/disable-private-endpoint-network-policy?tabs=network-policy-portal). PrivateEndpointNetworkPolicies *string `pulumi:"privateEndpointNetworkPolicies"` // Enable or Disable network policies for the private link service on the subnet. Defaults to `true`. // // > **NOTE:** When configuring Azure Private Link service, the explicit setting `privateLinkServiceNetworkPoliciesEnabled` must be set to `false` in the subnet since Private Link Service does not support network policies like user-defined Routes and Network Security Groups. This setting only affects the Private Link service. For other resources in the subnet, access is controlled based on the Network Security Group which can be configured using the `network.SubnetNetworkSecurityGroupAssociation` resource. See more details from [Manage network policies for Private Link Services](https://learn.microsoft.com/en-gb/azure/private-link/disable-private-link-service-network-policy?tabs=private-link-network-policy-powershell). PrivateLinkServiceNetworkPoliciesEnabled *bool `pulumi:"privateLinkServiceNetworkPoliciesEnabled"` // The name of the resource group in which to create the subnet. This must be the resource group that the virtual network resides in. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The list of IDs of Service Endpoint Policies to associate with the subnet. ServiceEndpointPolicyIds []string `pulumi:"serviceEndpointPolicyIds"` // The list of Service endpoints to associate with the subnet. Possible values include: `Microsoft.AzureActiveDirectory`, `Microsoft.AzureCosmosDB`, `Microsoft.ContainerRegistry`, `Microsoft.EventHub`, `Microsoft.KeyVault`, `Microsoft.ServiceBus`, `Microsoft.Sql`, `Microsoft.Storage`, `Microsoft.Storage.Global` and `Microsoft.Web`. // // > **NOTE:** In order to use `Microsoft.Storage.Global` service endpoint (which allows access to virtual networks in other regions), you must enable the `AllowGlobalTagsForStorage` feature in your subscription. This is currently a preview feature, please see the [official documentation](https://learn.microsoft.com/en-us/azure/storage/common/storage-network-security?tabs=azure-cli#enabling-access-to-virtual-networks-in-other-regions-preview) for more information. ServiceEndpoints []string `pulumi:"serviceEndpoints"` // The sharing scope of the subnet. Possible value is `Tenant`. // // > **Note:** This property cannot be set if `defaultOutboundAccessEnabled` is set to `true`. // // !> **Note:** The `sharingScope` property is only available to users who have been explicitly registered and granted access by the Azure Networking Product Group. SharingScope *string `pulumi:"sharingScope"` // The name of the virtual network to which to attach the subnet. Changing this forces a new resource to be created. VirtualNetworkName string `pulumi:"virtualNetworkName"` } // The set of arguments for constructing a Subnet resource. type SubnetArgs struct { // The address prefixes to use for the subnet. // // > **Note:** Exactly one of `addressPrefixes` or `ipAddressPool` must be specified. AddressPrefixes pulumi.StringArrayInput // Enable default outbound access to the internet for the subnet. Defaults to `true`. DefaultOutboundAccessEnabled pulumi.BoolPtrInput // One or more `delegation` blocks as defined below. Delegations SubnetDelegationArrayInput // An `ipAddressPool` block as defined below. // // > **Note:** Exactly one of `addressPrefixes` or `ipAddressPool` must be specified. IpAddressPool SubnetIpAddressPoolPtrInput // The name of the subnet. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Enable or Disable network policies for the private endpoint on the subnet. Possible values are `Disabled`, `Enabled`, `NetworkSecurityGroupEnabled` and `RouteTableEnabled`. Defaults to `Disabled`. // // > **NOTE:** If you don't want to use network policies like user-defined Routes and Network Security Groups, you need to set `privateEndpointNetworkPolicies` in the subnet to `Disabled`. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the `network.SubnetNetworkSecurityGroupAssociation` resource. // // > **NOTE:** If you want to use network policies like user-defined Routes and Network Security Groups, you need to set the `privateEndpointNetworkPolicies` in the Subnet to `Enabled`/`NetworkSecurityGroupEnabled`/`RouteTableEnabled`. This setting only applies to Private Endpoints in the Subnet and affects all Private Endpoints in the Subnet. For other resources in the Subnet, access is controlled based via the Network Security Group which can be configured using the `network.SubnetNetworkSecurityGroupAssociation` resource. // // > **NOTE:** See more details from [Manage network policies for Private Endpoints](https://learn.microsoft.com/en-gb/azure/private-link/disable-private-endpoint-network-policy?tabs=network-policy-portal). PrivateEndpointNetworkPolicies pulumi.StringPtrInput // Enable or Disable network policies for the private link service on the subnet. Defaults to `true`. // // > **NOTE:** When configuring Azure Private Link service, the explicit setting `privateLinkServiceNetworkPoliciesEnabled` must be set to `false` in the subnet since Private Link Service does not support network policies like user-defined Routes and Network Security Groups. This setting only affects the Private Link service. For other resources in the subnet, access is controlled based on the Network Security Group which can be configured using the `network.SubnetNetworkSecurityGroupAssociation` resource. See more details from [Manage network policies for Private Link Services](https://learn.microsoft.com/en-gb/azure/private-link/disable-private-link-service-network-policy?tabs=private-link-network-policy-powershell). PrivateLinkServiceNetworkPoliciesEnabled pulumi.BoolPtrInput // The name of the resource group in which to create the subnet. This must be the resource group that the virtual network resides in. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The list of IDs of Service Endpoint Policies to associate with the subnet. ServiceEndpointPolicyIds pulumi.StringArrayInput // The list of Service endpoints to associate with the subnet. Possible values include: `Microsoft.AzureActiveDirectory`, `Microsoft.AzureCosmosDB`, `Microsoft.ContainerRegistry`, `Microsoft.EventHub`, `Microsoft.KeyVault`, `Microsoft.ServiceBus`, `Microsoft.Sql`, `Microsoft.Storage`, `Microsoft.Storage.Global` and `Microsoft.Web`. // // > **NOTE:** In order to use `Microsoft.Storage.Global` service endpoint (which allows access to virtual networks in other regions), you must enable the `AllowGlobalTagsForStorage` feature in your subscription. This is currently a preview feature, please see the [official documentation](https://learn.microsoft.com/en-us/azure/storage/common/storage-network-security?tabs=azure-cli#enabling-access-to-virtual-networks-in-other-regions-preview) for more information. ServiceEndpoints pulumi.StringArrayInput // The sharing scope of the subnet. Possible value is `Tenant`. // // > **Note:** This property cannot be set if `defaultOutboundAccessEnabled` is set to `true`. // // !> **Note:** The `sharingScope` property is only available to users who have been explicitly registered and granted access by the Azure Networking Product Group. SharingScope pulumi.StringPtrInput // The name of the virtual network to which to attach the subnet. Changing this forces a new resource to be created. VirtualNetworkName pulumi.StringInput } func (SubnetArgs) ElementType() reflect.Type { return reflect.TypeOf((*subnetArgs)(nil)).Elem() } type SubnetInput interface { pulumi.Input ToSubnetOutput() SubnetOutput ToSubnetOutputWithContext(ctx context.Context) SubnetOutput } func (*Subnet) ElementType() reflect.Type { return reflect.TypeOf((**Subnet)(nil)).Elem() } func (i *Subnet) ToSubnetOutput() SubnetOutput { return i.ToSubnetOutputWithContext(context.Background()) } func (i *Subnet) ToSubnetOutputWithContext(ctx context.Context) SubnetOutput { return pulumi.ToOutputWithContext(ctx, i).(SubnetOutput) } // SubnetArrayInput is an input type that accepts SubnetArray and SubnetArrayOutput values. // You can construct a concrete instance of `SubnetArrayInput` via: // // SubnetArray{ SubnetArgs{...} } type SubnetArrayInput interface { pulumi.Input ToSubnetArrayOutput() SubnetArrayOutput ToSubnetArrayOutputWithContext(context.Context) SubnetArrayOutput } type SubnetArray []SubnetInput func (SubnetArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Subnet)(nil)).Elem() } func (i SubnetArray) ToSubnetArrayOutput() SubnetArrayOutput { return i.ToSubnetArrayOutputWithContext(context.Background()) } func (i SubnetArray) ToSubnetArrayOutputWithContext(ctx context.Context) SubnetArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SubnetArrayOutput) } // SubnetMapInput is an input type that accepts SubnetMap and SubnetMapOutput values. // You can construct a concrete instance of `SubnetMapInput` via: // // SubnetMap{ "key": SubnetArgs{...} } type SubnetMapInput interface { pulumi.Input ToSubnetMapOutput() SubnetMapOutput ToSubnetMapOutputWithContext(context.Context) SubnetMapOutput } type SubnetMap map[string]SubnetInput func (SubnetMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Subnet)(nil)).Elem() } func (i SubnetMap) ToSubnetMapOutput() SubnetMapOutput { return i.ToSubnetMapOutputWithContext(context.Background()) } func (i SubnetMap) ToSubnetMapOutputWithContext(ctx context.Context) SubnetMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SubnetMapOutput) } type SubnetOutput struct{ *pulumi.OutputState } func (SubnetOutput) ElementType() reflect.Type { return reflect.TypeOf((**Subnet)(nil)).Elem() } func (o SubnetOutput) ToSubnetOutput() SubnetOutput { return o } func (o SubnetOutput) ToSubnetOutputWithContext(ctx context.Context) SubnetOutput { return o } // The address prefixes to use for the subnet. // // > **Note:** Exactly one of `addressPrefixes` or `ipAddressPool` must be specified. func (o SubnetOutput) AddressPrefixes() pulumi.StringArrayOutput { return o.ApplyT(func(v *Subnet) pulumi.StringArrayOutput { return v.AddressPrefixes }).(pulumi.StringArrayOutput) } // Enable default outbound access to the internet for the subnet. Defaults to `true`. func (o SubnetOutput) DefaultOutboundAccessEnabled() pulumi.BoolPtrOutput {
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
true
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/networkConnectionMonitor.go
sdk/go/azure/network/networkConnectionMonitor.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Network Connection Monitor. // // > **NOTE:** Any Network Connection Monitor resource created with API versions 2019-06-01 or earlier (v1) are now incompatible with this provider, which now only supports v2. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-Watcher-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleNetworkWatcher, err := network.NewNetworkWatcher(ctx, "example", &network.NetworkWatcherArgs{ // Name: pulumi.String("example-Watcher"), // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-Vnet"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("example-Subnet"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // }) // if err != nil { // return err // } // exampleNetworkInterface, err := network.NewNetworkInterface(ctx, "example", &network.NetworkInterfaceArgs{ // Name: pulumi.String("example-Nic"), // Location: example.Location, // ResourceGroupName: example.Name, // IpConfigurations: network.NetworkInterfaceIpConfigurationArray{ // &network.NetworkInterfaceIpConfigurationArgs{ // Name: pulumi.String("testconfiguration1"), // SubnetId: exampleSubnet.ID(), // PrivateIpAddressAllocation: pulumi.String("Dynamic"), // }, // }, // }) // if err != nil { // return err // } // exampleVirtualMachine, err := compute.NewVirtualMachine(ctx, "example", &compute.VirtualMachineArgs{ // Name: pulumi.String("example-VM"), // Location: example.Location, // ResourceGroupName: example.Name, // NetworkInterfaceIds: pulumi.StringArray{ // exampleNetworkInterface.ID(), // }, // VmSize: pulumi.String("Standard_D2s_v3"), // StorageImageReference: &compute.VirtualMachineStorageImageReferenceArgs{ // Publisher: pulumi.String("Canonical"), // Offer: pulumi.String("0001-com-ubuntu-server-jammy"), // Sku: pulumi.String("22_04-lts"), // Version: pulumi.String("latest"), // }, // StorageOsDisk: &compute.VirtualMachineStorageOsDiskArgs{ // Name: pulumi.String("osdisk-example01"), // Caching: pulumi.String("ReadWrite"), // CreateOption: pulumi.String("FromImage"), // ManagedDiskType: pulumi.String("Standard_LRS"), // }, // OsProfile: &compute.VirtualMachineOsProfileArgs{ // ComputerName: pulumi.String("hostnametest01"), // AdminUsername: pulumi.String("testadmin"), // AdminPassword: pulumi.String("Password1234!"), // }, // OsProfileLinuxConfig: &compute.VirtualMachineOsProfileLinuxConfigArgs{ // DisablePasswordAuthentication: pulumi.Bool(false), // }, // }) // if err != nil { // return err // } // exampleExtension, err := compute.NewExtension(ctx, "example", &compute.ExtensionArgs{ // Name: pulumi.String("example-VMExtension"), // VirtualMachineId: exampleVirtualMachine.ID(), // Publisher: pulumi.String("Microsoft.Azure.NetworkWatcher"), // Type: pulumi.String("NetworkWatcherAgentLinux"), // TypeHandlerVersion: pulumi.String("1.4"), // AutoUpgradeMinorVersion: pulumi.Bool(true), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-Workspace"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // _, err = network.NewNetworkConnectionMonitor(ctx, "example", &network.NetworkConnectionMonitorArgs{ // Name: pulumi.String("example-Monitor"), // NetworkWatcherId: exampleNetworkWatcher.ID(), // Location: exampleNetworkWatcher.Location, // Endpoints: network.NetworkConnectionMonitorEndpointArray{ // &network.NetworkConnectionMonitorEndpointArgs{ // Name: pulumi.String("source"), // TargetResourceId: exampleVirtualMachine.ID(), // Filter: &network.NetworkConnectionMonitorEndpointFilterArgs{ // Items: network.NetworkConnectionMonitorEndpointFilterItemArray{ // &network.NetworkConnectionMonitorEndpointFilterItemArgs{ // Address: exampleVirtualMachine.ID(), // Type: pulumi.String("AgentAddress"), // }, // }, // Type: pulumi.String("Include"), // }, // }, // &network.NetworkConnectionMonitorEndpointArgs{ // Name: pulumi.String("destination"), // Address: pulumi.String("mycompany.io"), // }, // }, // TestConfigurations: network.NetworkConnectionMonitorTestConfigurationArray{ // &network.NetworkConnectionMonitorTestConfigurationArgs{ // Name: pulumi.String("tcpName"), // Protocol: pulumi.String("Tcp"), // TestFrequencyInSeconds: pulumi.Int(60), // TcpConfiguration: &network.NetworkConnectionMonitorTestConfigurationTcpConfigurationArgs{ // Port: pulumi.Int(80), // }, // }, // }, // TestGroups: network.NetworkConnectionMonitorTestGroupArray{ // &network.NetworkConnectionMonitorTestGroupArgs{ // Name: pulumi.String("exampletg"), // DestinationEndpoints: pulumi.StringArray{ // pulumi.String("destination"), // }, // SourceEndpoints: pulumi.StringArray{ // pulumi.String("source"), // }, // TestConfigurationNames: pulumi.StringArray{ // pulumi.String("tcpName"), // }, // }, // }, // Notes: pulumi.String("examplenote"), // OutputWorkspaceResourceIds: pulumi.StringArray{ // exampleAnalyticsWorkspace.ID(), // }, // }, pulumi.DependsOn([]pulumi.Resource{ // exampleExtension, // })) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Network Connection Monitors can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/networkConnectionMonitor:NetworkConnectionMonitor example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/networkWatchers/watcher1/connectionMonitors/connectionMonitor1 // ``` type NetworkConnectionMonitor struct { pulumi.CustomResourceState // A `endpoint` block as defined below. Endpoints NetworkConnectionMonitorEndpointArrayOutput `pulumi:"endpoints"` // The Azure Region where the Network Connection Monitor should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name which should be used for this Network Connection Monitor. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the Network Watcher. Changing this forces a new resource to be created. NetworkWatcherId pulumi.StringOutput `pulumi:"networkWatcherId"` // The description of the Network Connection Monitor. Notes pulumi.StringPtrOutput `pulumi:"notes"` // A list of IDs of the Log Analytics Workspace which will accept the output from the Network Connection Monitor. OutputWorkspaceResourceIds pulumi.StringArrayOutput `pulumi:"outputWorkspaceResourceIds"` // A mapping of tags which should be assigned to the Network Connection Monitor. Tags pulumi.StringMapOutput `pulumi:"tags"` // A `testConfiguration` block as defined below. TestConfigurations NetworkConnectionMonitorTestConfigurationArrayOutput `pulumi:"testConfigurations"` // A `testGroup` block as defined below. TestGroups NetworkConnectionMonitorTestGroupArrayOutput `pulumi:"testGroups"` } // NewNetworkConnectionMonitor registers a new resource with the given unique name, arguments, and options. func NewNetworkConnectionMonitor(ctx *pulumi.Context, name string, args *NetworkConnectionMonitorArgs, opts ...pulumi.ResourceOption) (*NetworkConnectionMonitor, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Endpoints == nil { return nil, errors.New("invalid value for required argument 'Endpoints'") } if args.NetworkWatcherId == nil { return nil, errors.New("invalid value for required argument 'NetworkWatcherId'") } if args.TestConfigurations == nil { return nil, errors.New("invalid value for required argument 'TestConfigurations'") } if args.TestGroups == nil { return nil, errors.New("invalid value for required argument 'TestGroups'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkConnectionMonitor err := ctx.RegisterResource("azure:network/networkConnectionMonitor:NetworkConnectionMonitor", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkConnectionMonitor gets an existing NetworkConnectionMonitor resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetNetworkConnectionMonitor(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkConnectionMonitorState, opts ...pulumi.ResourceOption) (*NetworkConnectionMonitor, error) { var resource NetworkConnectionMonitor err := ctx.ReadResource("azure:network/networkConnectionMonitor:NetworkConnectionMonitor", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkConnectionMonitor resources. type networkConnectionMonitorState struct { // A `endpoint` block as defined below. Endpoints []NetworkConnectionMonitorEndpoint `pulumi:"endpoints"` // The Azure Region where the Network Connection Monitor should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name which should be used for this Network Connection Monitor. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the Network Watcher. Changing this forces a new resource to be created. NetworkWatcherId *string `pulumi:"networkWatcherId"` // The description of the Network Connection Monitor. Notes *string `pulumi:"notes"` // A list of IDs of the Log Analytics Workspace which will accept the output from the Network Connection Monitor. OutputWorkspaceResourceIds []string `pulumi:"outputWorkspaceResourceIds"` // A mapping of tags which should be assigned to the Network Connection Monitor. Tags map[string]string `pulumi:"tags"` // A `testConfiguration` block as defined below. TestConfigurations []NetworkConnectionMonitorTestConfiguration `pulumi:"testConfigurations"` // A `testGroup` block as defined below. TestGroups []NetworkConnectionMonitorTestGroup `pulumi:"testGroups"` } type NetworkConnectionMonitorState struct { // A `endpoint` block as defined below. Endpoints NetworkConnectionMonitorEndpointArrayInput // The Azure Region where the Network Connection Monitor should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name which should be used for this Network Connection Monitor. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the Network Watcher. Changing this forces a new resource to be created. NetworkWatcherId pulumi.StringPtrInput // The description of the Network Connection Monitor. Notes pulumi.StringPtrInput // A list of IDs of the Log Analytics Workspace which will accept the output from the Network Connection Monitor. OutputWorkspaceResourceIds pulumi.StringArrayInput // A mapping of tags which should be assigned to the Network Connection Monitor. Tags pulumi.StringMapInput // A `testConfiguration` block as defined below. TestConfigurations NetworkConnectionMonitorTestConfigurationArrayInput // A `testGroup` block as defined below. TestGroups NetworkConnectionMonitorTestGroupArrayInput } func (NetworkConnectionMonitorState) ElementType() reflect.Type { return reflect.TypeOf((*networkConnectionMonitorState)(nil)).Elem() } type networkConnectionMonitorArgs struct { // A `endpoint` block as defined below. Endpoints []NetworkConnectionMonitorEndpoint `pulumi:"endpoints"` // The Azure Region where the Network Connection Monitor should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name which should be used for this Network Connection Monitor. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the Network Watcher. Changing this forces a new resource to be created. NetworkWatcherId string `pulumi:"networkWatcherId"` // The description of the Network Connection Monitor. Notes *string `pulumi:"notes"` // A list of IDs of the Log Analytics Workspace which will accept the output from the Network Connection Monitor. OutputWorkspaceResourceIds []string `pulumi:"outputWorkspaceResourceIds"` // A mapping of tags which should be assigned to the Network Connection Monitor. Tags map[string]string `pulumi:"tags"` // A `testConfiguration` block as defined below. TestConfigurations []NetworkConnectionMonitorTestConfiguration `pulumi:"testConfigurations"` // A `testGroup` block as defined below. TestGroups []NetworkConnectionMonitorTestGroup `pulumi:"testGroups"` } // The set of arguments for constructing a NetworkConnectionMonitor resource. type NetworkConnectionMonitorArgs struct { // A `endpoint` block as defined below. Endpoints NetworkConnectionMonitorEndpointArrayInput // The Azure Region where the Network Connection Monitor should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name which should be used for this Network Connection Monitor. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the Network Watcher. Changing this forces a new resource to be created. NetworkWatcherId pulumi.StringInput // The description of the Network Connection Monitor. Notes pulumi.StringPtrInput // A list of IDs of the Log Analytics Workspace which will accept the output from the Network Connection Monitor. OutputWorkspaceResourceIds pulumi.StringArrayInput // A mapping of tags which should be assigned to the Network Connection Monitor. Tags pulumi.StringMapInput // A `testConfiguration` block as defined below. TestConfigurations NetworkConnectionMonitorTestConfigurationArrayInput // A `testGroup` block as defined below. TestGroups NetworkConnectionMonitorTestGroupArrayInput } func (NetworkConnectionMonitorArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkConnectionMonitorArgs)(nil)).Elem() } type NetworkConnectionMonitorInput interface { pulumi.Input ToNetworkConnectionMonitorOutput() NetworkConnectionMonitorOutput ToNetworkConnectionMonitorOutputWithContext(ctx context.Context) NetworkConnectionMonitorOutput } func (*NetworkConnectionMonitor) ElementType() reflect.Type { return reflect.TypeOf((**NetworkConnectionMonitor)(nil)).Elem() } func (i *NetworkConnectionMonitor) ToNetworkConnectionMonitorOutput() NetworkConnectionMonitorOutput { return i.ToNetworkConnectionMonitorOutputWithContext(context.Background()) } func (i *NetworkConnectionMonitor) ToNetworkConnectionMonitorOutputWithContext(ctx context.Context) NetworkConnectionMonitorOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkConnectionMonitorOutput) } // NetworkConnectionMonitorArrayInput is an input type that accepts NetworkConnectionMonitorArray and NetworkConnectionMonitorArrayOutput values. // You can construct a concrete instance of `NetworkConnectionMonitorArrayInput` via: // // NetworkConnectionMonitorArray{ NetworkConnectionMonitorArgs{...} } type NetworkConnectionMonitorArrayInput interface { pulumi.Input ToNetworkConnectionMonitorArrayOutput() NetworkConnectionMonitorArrayOutput ToNetworkConnectionMonitorArrayOutputWithContext(context.Context) NetworkConnectionMonitorArrayOutput } type NetworkConnectionMonitorArray []NetworkConnectionMonitorInput func (NetworkConnectionMonitorArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkConnectionMonitor)(nil)).Elem() } func (i NetworkConnectionMonitorArray) ToNetworkConnectionMonitorArrayOutput() NetworkConnectionMonitorArrayOutput { return i.ToNetworkConnectionMonitorArrayOutputWithContext(context.Background()) } func (i NetworkConnectionMonitorArray) ToNetworkConnectionMonitorArrayOutputWithContext(ctx context.Context) NetworkConnectionMonitorArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkConnectionMonitorArrayOutput) } // NetworkConnectionMonitorMapInput is an input type that accepts NetworkConnectionMonitorMap and NetworkConnectionMonitorMapOutput values. // You can construct a concrete instance of `NetworkConnectionMonitorMapInput` via: // // NetworkConnectionMonitorMap{ "key": NetworkConnectionMonitorArgs{...} } type NetworkConnectionMonitorMapInput interface { pulumi.Input ToNetworkConnectionMonitorMapOutput() NetworkConnectionMonitorMapOutput ToNetworkConnectionMonitorMapOutputWithContext(context.Context) NetworkConnectionMonitorMapOutput } type NetworkConnectionMonitorMap map[string]NetworkConnectionMonitorInput func (NetworkConnectionMonitorMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkConnectionMonitor)(nil)).Elem() } func (i NetworkConnectionMonitorMap) ToNetworkConnectionMonitorMapOutput() NetworkConnectionMonitorMapOutput { return i.ToNetworkConnectionMonitorMapOutputWithContext(context.Background()) } func (i NetworkConnectionMonitorMap) ToNetworkConnectionMonitorMapOutputWithContext(ctx context.Context) NetworkConnectionMonitorMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkConnectionMonitorMapOutput) } type NetworkConnectionMonitorOutput struct{ *pulumi.OutputState } func (NetworkConnectionMonitorOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkConnectionMonitor)(nil)).Elem() } func (o NetworkConnectionMonitorOutput) ToNetworkConnectionMonitorOutput() NetworkConnectionMonitorOutput { return o } func (o NetworkConnectionMonitorOutput) ToNetworkConnectionMonitorOutputWithContext(ctx context.Context) NetworkConnectionMonitorOutput { return o } // A `endpoint` block as defined below. func (o NetworkConnectionMonitorOutput) Endpoints() NetworkConnectionMonitorEndpointArrayOutput { return o.ApplyT(func(v *NetworkConnectionMonitor) NetworkConnectionMonitorEndpointArrayOutput { return v.Endpoints }).(NetworkConnectionMonitorEndpointArrayOutput) } // The Azure Region where the Network Connection Monitor should exist. Changing this forces a new resource to be created. func (o NetworkConnectionMonitorOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *NetworkConnectionMonitor) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name which should be used for this Network Connection Monitor. Changing this forces a new resource to be created. func (o NetworkConnectionMonitorOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NetworkConnectionMonitor) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the Network Watcher. Changing this forces a new resource to be created. func (o NetworkConnectionMonitorOutput) NetworkWatcherId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkConnectionMonitor) pulumi.StringOutput { return v.NetworkWatcherId }).(pulumi.StringOutput) } // The description of the Network Connection Monitor. func (o NetworkConnectionMonitorOutput) Notes() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkConnectionMonitor) pulumi.StringPtrOutput { return v.Notes }).(pulumi.StringPtrOutput) } // A list of IDs of the Log Analytics Workspace which will accept the output from the Network Connection Monitor. func (o NetworkConnectionMonitorOutput) OutputWorkspaceResourceIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *NetworkConnectionMonitor) pulumi.StringArrayOutput { return v.OutputWorkspaceResourceIds }).(pulumi.StringArrayOutput) } // A mapping of tags which should be assigned to the Network Connection Monitor. func (o NetworkConnectionMonitorOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *NetworkConnectionMonitor) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // A `testConfiguration` block as defined below. func (o NetworkConnectionMonitorOutput) TestConfigurations() NetworkConnectionMonitorTestConfigurationArrayOutput { return o.ApplyT(func(v *NetworkConnectionMonitor) NetworkConnectionMonitorTestConfigurationArrayOutput { return v.TestConfigurations }).(NetworkConnectionMonitorTestConfigurationArrayOutput) } // A `testGroup` block as defined below. func (o NetworkConnectionMonitorOutput) TestGroups() NetworkConnectionMonitorTestGroupArrayOutput { return o.ApplyT(func(v *NetworkConnectionMonitor) NetworkConnectionMonitorTestGroupArrayOutput { return v.TestGroups }).(NetworkConnectionMonitorTestGroupArrayOutput) } type NetworkConnectionMonitorArrayOutput struct{ *pulumi.OutputState } func (NetworkConnectionMonitorArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkConnectionMonitor)(nil)).Elem() } func (o NetworkConnectionMonitorArrayOutput) ToNetworkConnectionMonitorArrayOutput() NetworkConnectionMonitorArrayOutput { return o } func (o NetworkConnectionMonitorArrayOutput) ToNetworkConnectionMonitorArrayOutputWithContext(ctx context.Context) NetworkConnectionMonitorArrayOutput { return o } func (o NetworkConnectionMonitorArrayOutput) Index(i pulumi.IntInput) NetworkConnectionMonitorOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkConnectionMonitor { return vs[0].([]*NetworkConnectionMonitor)[vs[1].(int)] }).(NetworkConnectionMonitorOutput) } type NetworkConnectionMonitorMapOutput struct{ *pulumi.OutputState } func (NetworkConnectionMonitorMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkConnectionMonitor)(nil)).Elem() } func (o NetworkConnectionMonitorMapOutput) ToNetworkConnectionMonitorMapOutput() NetworkConnectionMonitorMapOutput { return o } func (o NetworkConnectionMonitorMapOutput) ToNetworkConnectionMonitorMapOutputWithContext(ctx context.Context) NetworkConnectionMonitorMapOutput { return o } func (o NetworkConnectionMonitorMapOutput) MapIndex(k pulumi.StringInput) NetworkConnectionMonitorOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkConnectionMonitor { return vs[0].(map[string]*NetworkConnectionMonitor)[vs[1].(string)] }).(NetworkConnectionMonitorOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkConnectionMonitorInput)(nil)).Elem(), &NetworkConnectionMonitor{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkConnectionMonitorArrayInput)(nil)).Elem(), NetworkConnectionMonitorArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkConnectionMonitorMapInput)(nil)).Elem(), NetworkConnectionMonitorMap{}) pulumi.RegisterOutputType(NetworkConnectionMonitorOutput{}) pulumi.RegisterOutputType(NetworkConnectionMonitorArrayOutput{}) pulumi.RegisterOutputType(NetworkConnectionMonitorMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getGatewayConnection.go
sdk/go/azure/network/getGatewayConnection.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Virtual Network Gateway Connection. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.GetGatewayConnection(ctx, &network.GetGatewayConnectionArgs{ // Name: "production", // ResourceGroupName: "networking", // }, nil) // if err != nil { // return err // } // ctx.Export("virtualNetworkGatewayConnectionId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func GetGatewayConnection(ctx *pulumi.Context, args *GetGatewayConnectionArgs, opts ...pulumi.InvokeOption) (*GetGatewayConnectionResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetGatewayConnectionResult err := ctx.Invoke("azure:network/getGatewayConnection:getGatewayConnection", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getGatewayConnection. type GetGatewayConnectionArgs struct { // Specifies the name of the Virtual Network Gateway Connection. Name string `pulumi:"name"` // Specifies the name of the resource group the Virtual Network Gateway Connection is located in. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getGatewayConnection. type GetGatewayConnectionResult struct { // The authorization key associated with the // Express Route Circuit. This field is present only if the type is an // ExpressRoute connection. AuthorizationKey string `pulumi:"authorizationKey"` ConnectionProtocol string `pulumi:"connectionProtocol"` // The dead peer detection timeout of this connection in seconds. DpdTimeoutSeconds int `pulumi:"dpdTimeoutSeconds"` EgressBytesTransferred int `pulumi:"egressBytesTransferred"` // If `true`, BGP (Border Gateway Protocol) is enabled // for this connection. EnableBgp bool `pulumi:"enableBgp"` // The ID of the Express Route Circuit // (i.e. when `type` is `ExpressRoute`). ExpressRouteCircuitId string `pulumi:"expressRouteCircuitId"` // If `true`, data packets will bypass ExpressRoute Gateway for data forwarding. This is only valid for ExpressRoute connections. ExpressRouteGatewayBypass bool `pulumi:"expressRouteGatewayBypass"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` IngressBytesTransferred int `pulumi:"ingressBytesTransferred"` // (Optional) A `ipsecPolicy` block which is documented below. // Only a single policy can be defined for a connection. For details on // custom policies refer to [the relevant section in the Azure documentation](https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-ipsecikepolicy-rm-powershell). IpsecPolicies []GetGatewayConnectionIpsecPolicy `pulumi:"ipsecPolicies"` // Use private local Azure IP for the connection. LocalAzureIpAddressEnabled bool `pulumi:"localAzureIpAddressEnabled"` // The ID of the local network gateway // when a Site-to-Site connection (i.e. when `type` is `IPsec`). LocalNetworkGatewayId string `pulumi:"localNetworkGatewayId"` // The location/region where the connection is // located. Location string `pulumi:"location"` Name string `pulumi:"name"` // The ID of the peer virtual // network gateway when a VNet-to-VNet connection (i.e. when `type` // is `Vnet2Vnet`). PeerVirtualNetworkGatewayId string `pulumi:"peerVirtualNetworkGatewayId"` // If `true`, data packets will bypass the Express Route gateway when accessing private-links. // This is only valid for ExpressRoute connections, on the conditions described in [the relevant section in the Azure documentation](https://learn.microsoft.com/en-us/azure/expressroute/expressroute-howto-linkvnet-arm#fastpath-virtual-network-peering-user-defined-routes-udrs-and-private-link-support-for-expressroute-direct-connections) PrivateLinkFastPathEnabled bool `pulumi:"privateLinkFastPathEnabled"` ResourceGroupName string `pulumi:"resourceGroupName"` ResourceGuid string `pulumi:"resourceGuid"` // The routing weight. RoutingWeight int `pulumi:"routingWeight"` // The shared IPSec key. SharedKey string `pulumi:"sharedKey"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // One or more `trafficSelectorPolicy` blocks which are documented below. // A `trafficSelectorPolicy` allows to specify a traffic selector policy proposal to be used in a virtual network gateway connection. // For details about traffic selectors refer to [the relevant section in the Azure documentation](https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-connect-multiple-policybased-rm-ps). TrafficSelectorPolicies []GetGatewayConnectionTrafficSelectorPolicy `pulumi:"trafficSelectorPolicies"` // The type of connection. Valid options are `IPsec` // (Site-to-Site), `ExpressRoute` (ExpressRoute), and `Vnet2Vnet` (VNet-to-VNet). Type string `pulumi:"type"` // If `true`, policy-based traffic // selectors are enabled for this connection. Enabling policy-based traffic // selectors requires an `ipsecPolicy` block. UsePolicyBasedTrafficSelectors bool `pulumi:"usePolicyBasedTrafficSelectors"` // The ID of the Virtual Network Gateway // in which the connection is created. VirtualNetworkGatewayId string `pulumi:"virtualNetworkGatewayId"` } func GetGatewayConnectionOutput(ctx *pulumi.Context, args GetGatewayConnectionOutputArgs, opts ...pulumi.InvokeOption) GetGatewayConnectionResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetGatewayConnectionResultOutput, error) { args := v.(GetGatewayConnectionArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getGatewayConnection:getGatewayConnection", args, GetGatewayConnectionResultOutput{}, options).(GetGatewayConnectionResultOutput), nil }).(GetGatewayConnectionResultOutput) } // A collection of arguments for invoking getGatewayConnection. type GetGatewayConnectionOutputArgs struct { // Specifies the name of the Virtual Network Gateway Connection. Name pulumi.StringInput `pulumi:"name"` // Specifies the name of the resource group the Virtual Network Gateway Connection is located in. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (GetGatewayConnectionOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetGatewayConnectionArgs)(nil)).Elem() } // A collection of values returned by getGatewayConnection. type GetGatewayConnectionResultOutput struct{ *pulumi.OutputState } func (GetGatewayConnectionResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetGatewayConnectionResult)(nil)).Elem() } func (o GetGatewayConnectionResultOutput) ToGetGatewayConnectionResultOutput() GetGatewayConnectionResultOutput { return o } func (o GetGatewayConnectionResultOutput) ToGetGatewayConnectionResultOutputWithContext(ctx context.Context) GetGatewayConnectionResultOutput { return o } // The authorization key associated with the // Express Route Circuit. This field is present only if the type is an // ExpressRoute connection. func (o GetGatewayConnectionResultOutput) AuthorizationKey() pulumi.StringOutput { return o.ApplyT(func(v GetGatewayConnectionResult) string { return v.AuthorizationKey }).(pulumi.StringOutput) } func (o GetGatewayConnectionResultOutput) ConnectionProtocol() pulumi.StringOutput { return o.ApplyT(func(v GetGatewayConnectionResult) string { return v.ConnectionProtocol }).(pulumi.StringOutput) } // The dead peer detection timeout of this connection in seconds. func (o GetGatewayConnectionResultOutput) DpdTimeoutSeconds() pulumi.IntOutput { return o.ApplyT(func(v GetGatewayConnectionResult) int { return v.DpdTimeoutSeconds }).(pulumi.IntOutput) } func (o GetGatewayConnectionResultOutput) EgressBytesTransferred() pulumi.IntOutput { return o.ApplyT(func(v GetGatewayConnectionResult) int { return v.EgressBytesTransferred }).(pulumi.IntOutput) } // If `true`, BGP (Border Gateway Protocol) is enabled // for this connection. func (o GetGatewayConnectionResultOutput) EnableBgp() pulumi.BoolOutput { return o.ApplyT(func(v GetGatewayConnectionResult) bool { return v.EnableBgp }).(pulumi.BoolOutput) } // The ID of the Express Route Circuit // (i.e. when `type` is `ExpressRoute`). func (o GetGatewayConnectionResultOutput) ExpressRouteCircuitId() pulumi.StringOutput { return o.ApplyT(func(v GetGatewayConnectionResult) string { return v.ExpressRouteCircuitId }).(pulumi.StringOutput) } // If `true`, data packets will bypass ExpressRoute Gateway for data forwarding. This is only valid for ExpressRoute connections. func (o GetGatewayConnectionResultOutput) ExpressRouteGatewayBypass() pulumi.BoolOutput { return o.ApplyT(func(v GetGatewayConnectionResult) bool { return v.ExpressRouteGatewayBypass }).(pulumi.BoolOutput) } // The provider-assigned unique ID for this managed resource. func (o GetGatewayConnectionResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetGatewayConnectionResult) string { return v.Id }).(pulumi.StringOutput) } func (o GetGatewayConnectionResultOutput) IngressBytesTransferred() pulumi.IntOutput { return o.ApplyT(func(v GetGatewayConnectionResult) int { return v.IngressBytesTransferred }).(pulumi.IntOutput) } // (Optional) A `ipsecPolicy` block which is documented below. // Only a single policy can be defined for a connection. For details on // custom policies refer to [the relevant section in the Azure documentation](https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-ipsecikepolicy-rm-powershell). func (o GetGatewayConnectionResultOutput) IpsecPolicies() GetGatewayConnectionIpsecPolicyArrayOutput { return o.ApplyT(func(v GetGatewayConnectionResult) []GetGatewayConnectionIpsecPolicy { return v.IpsecPolicies }).(GetGatewayConnectionIpsecPolicyArrayOutput) } // Use private local Azure IP for the connection. func (o GetGatewayConnectionResultOutput) LocalAzureIpAddressEnabled() pulumi.BoolOutput { return o.ApplyT(func(v GetGatewayConnectionResult) bool { return v.LocalAzureIpAddressEnabled }).(pulumi.BoolOutput) } // The ID of the local network gateway // when a Site-to-Site connection (i.e. when `type` is `IPsec`). func (o GetGatewayConnectionResultOutput) LocalNetworkGatewayId() pulumi.StringOutput { return o.ApplyT(func(v GetGatewayConnectionResult) string { return v.LocalNetworkGatewayId }).(pulumi.StringOutput) } // The location/region where the connection is // located. func (o GetGatewayConnectionResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v GetGatewayConnectionResult) string { return v.Location }).(pulumi.StringOutput) } func (o GetGatewayConnectionResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetGatewayConnectionResult) string { return v.Name }).(pulumi.StringOutput) } // The ID of the peer virtual // network gateway when a VNet-to-VNet connection (i.e. when `type` // is `Vnet2Vnet`). func (o GetGatewayConnectionResultOutput) PeerVirtualNetworkGatewayId() pulumi.StringOutput { return o.ApplyT(func(v GetGatewayConnectionResult) string { return v.PeerVirtualNetworkGatewayId }).(pulumi.StringOutput) } // If `true`, data packets will bypass the Express Route gateway when accessing private-links. // This is only valid for ExpressRoute connections, on the conditions described in [the relevant section in the Azure documentation](https://learn.microsoft.com/en-us/azure/expressroute/expressroute-howto-linkvnet-arm#fastpath-virtual-network-peering-user-defined-routes-udrs-and-private-link-support-for-expressroute-direct-connections) func (o GetGatewayConnectionResultOutput) PrivateLinkFastPathEnabled() pulumi.BoolOutput { return o.ApplyT(func(v GetGatewayConnectionResult) bool { return v.PrivateLinkFastPathEnabled }).(pulumi.BoolOutput) } func (o GetGatewayConnectionResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v GetGatewayConnectionResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } func (o GetGatewayConnectionResultOutput) ResourceGuid() pulumi.StringOutput { return o.ApplyT(func(v GetGatewayConnectionResult) string { return v.ResourceGuid }).(pulumi.StringOutput) } // The routing weight. func (o GetGatewayConnectionResultOutput) RoutingWeight() pulumi.IntOutput { return o.ApplyT(func(v GetGatewayConnectionResult) int { return v.RoutingWeight }).(pulumi.IntOutput) } // The shared IPSec key. func (o GetGatewayConnectionResultOutput) SharedKey() pulumi.StringOutput { return o.ApplyT(func(v GetGatewayConnectionResult) string { return v.SharedKey }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o GetGatewayConnectionResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v GetGatewayConnectionResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // One or more `trafficSelectorPolicy` blocks which are documented below. // A `trafficSelectorPolicy` allows to specify a traffic selector policy proposal to be used in a virtual network gateway connection. // For details about traffic selectors refer to [the relevant section in the Azure documentation](https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-connect-multiple-policybased-rm-ps). func (o GetGatewayConnectionResultOutput) TrafficSelectorPolicies() GetGatewayConnectionTrafficSelectorPolicyArrayOutput { return o.ApplyT(func(v GetGatewayConnectionResult) []GetGatewayConnectionTrafficSelectorPolicy { return v.TrafficSelectorPolicies }).(GetGatewayConnectionTrafficSelectorPolicyArrayOutput) } // The type of connection. Valid options are `IPsec` // (Site-to-Site), `ExpressRoute` (ExpressRoute), and `Vnet2Vnet` (VNet-to-VNet). func (o GetGatewayConnectionResultOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v GetGatewayConnectionResult) string { return v.Type }).(pulumi.StringOutput) } // If `true`, policy-based traffic // selectors are enabled for this connection. Enabling policy-based traffic // selectors requires an `ipsecPolicy` block. func (o GetGatewayConnectionResultOutput) UsePolicyBasedTrafficSelectors() pulumi.BoolOutput { return o.ApplyT(func(v GetGatewayConnectionResult) bool { return v.UsePolicyBasedTrafficSelectors }).(pulumi.BoolOutput) } // The ID of the Virtual Network Gateway // in which the connection is created. func (o GetGatewayConnectionResultOutput) VirtualNetworkGatewayId() pulumi.StringOutput { return o.ApplyT(func(v GetGatewayConnectionResult) string { return v.VirtualNetworkGatewayId }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(GetGatewayConnectionResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/virtualNetworkGateway.go
sdk/go/azure/network/virtualNetworkGateway.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Virtual Network Gateway to establish secure, cross-premises connectivity. // // > **Note:** Please be aware that provisioning a Virtual Network Gateway takes a long time (between 30 minutes and 1 hour) // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("test"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("test"), // Location: example.Location, // ResourceGroupName: example.Name, // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("GatewaySubnet"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.1.0/24"), // }, // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("test"), // Location: example.Location, // ResourceGroupName: example.Name, // AllocationMethod: pulumi.String("Dynamic"), // }) // if err != nil { // return err // } // _, err = network.NewVirtualNetworkGateway(ctx, "example", &network.VirtualNetworkGatewayArgs{ // Name: pulumi.String("test"), // Location: example.Location, // ResourceGroupName: example.Name, // Type: pulumi.String("Vpn"), // VpnType: pulumi.String("RouteBased"), // ActiveActive: pulumi.Bool(false), // EnableBgp: pulumi.Bool(false), // Sku: pulumi.String("Basic"), // IpConfigurations: network.VirtualNetworkGatewayIpConfigurationArray{ // &network.VirtualNetworkGatewayIpConfigurationArgs{ // Name: pulumi.String("vnetGatewayConfig"), // PublicIpAddressId: examplePublicIp.ID(), // PrivateIpAddressAllocation: pulumi.String("Dynamic"), // SubnetId: exampleSubnet.ID(), // }, // }, // VpnClientConfiguration: &network.VirtualNetworkGatewayVpnClientConfigurationArgs{ // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.2.0.0/24"), // }, // RootCertificates: network.VirtualNetworkGatewayVpnClientConfigurationRootCertificateArray{ // &network.VirtualNetworkGatewayVpnClientConfigurationRootCertificateArgs{ // Name: pulumi.String("DigiCert-Federated-ID-Root-CA"), // PublicCertData: pulumi.String(`MIIDuzCCAqOgAwIBAgIQCHTZWCM+IlfFIRXIvyKSrjANBgkqhkiG9w0BAQsFADBn // // MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 // d3cuZGlnaWNlcnQuY29tMSYwJAYDVQQDEx1EaWdpQ2VydCBGZWRlcmF0ZWQgSUQg // Um9vdCBDQTAeFw0xMzAxMTUxMjAwMDBaFw0zMzAxMTUxMjAwMDBaMGcxCzAJBgNV // BAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdp // Y2VydC5jb20xJjAkBgNVBAMTHURpZ2lDZXJ0IEZlZGVyYXRlZCBJRCBSb290IENB // MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvAEB4pcCqnNNOWE6Ur5j // QPUH+1y1F9KdHTRSza6k5iDlXq1kGS1qAkuKtw9JsiNRrjltmFnzMZRBbX8Tlfl8 // zAhBmb6dDduDGED01kBsTkgywYPxXVTKec0WxYEEF0oMn4wSYNl0lt2eJAKHXjNf // GTwiibdP8CUR2ghSM2sUTI8Nt1Omfc4SMHhGhYD64uJMbX98THQ/4LMGuYegou+d // GTiahfHtjn7AboSEknwAMJHCh5RlYZZ6B1O4QbKJ+34Q0eKgnI3X6Vc9u0zf6DH8 // Dk+4zQDYRRTqTnVO3VT8jzqDlCRuNtq6YvryOWN74/dq8LQhUnXHvFyrsdMaE1X2 // DwIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNV // HQ4EFgQUGRdkFnbGt1EWjKwbUne+5OaZvRYwHwYDVR0jBBgwFoAUGRdkFnbGt1EW // jKwbUne+5OaZvRYwDQYJKoZIhvcNAQELBQADggEBAHcqsHkrjpESqfuVTRiptJfP // 9JbdtWqRTmOf6uJi2c8YVqI6XlKXsD8C1dUUaaHKLUJzvKiazibVuBwMIT84AyqR // QELn3e0BtgEymEygMU569b01ZPxoFSnNXc7qDZBDef8WfqAV/sxkTi8L9BkmFYfL // uGLOhRJOFprPdoDIUBB+tmCl3oDcBy3vnUeOEioz8zAkprcb3GHwHAK+vHmmfgcn // WsfMLH4JCLa/tRYL+Rw/N3ybCkDp00s0WUZ+AoDywSl0Q/ZEnNY0MsFiw6LyIdbq // M/s/1JRtO3bDSzD9TazRVzn2oBqzSa8VgIo5C1nOnoAKJTlsClJKvIhnRlaLQqk= // `), // // }, // }, // RevokedCertificates: network.VirtualNetworkGatewayVpnClientConfigurationRevokedCertificateArray{ // &network.VirtualNetworkGatewayVpnClientConfigurationRevokedCertificateArgs{ // Name: pulumi.String("Verizon-Global-Root-CA"), // Thumbprint: pulumi.String("912198EEF23DCAC40939312FEE97DD560BAE49B1"), // }, // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Virtual Network Gateways can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/virtualNetworkGateway:VirtualNetworkGateway exampleGateway /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup1/providers/Microsoft.Network/virtualNetworkGateways/myGateway1 // ``` type VirtualNetworkGateway struct { pulumi.CustomResourceState // If `true`, an active-active Virtual Network Gateway will be created. An active-active gateway requires a `HighPerformance` or an `UltraPerformance` SKU. If `false`, an active-standby gateway will be created. Defaults to `false`. ActiveActive pulumi.BoolOutput `pulumi:"activeActive"` // Is BGP Route Translation for NAT enabled? Defaults to `false`. BgpRouteTranslationForNatEnabled pulumi.BoolPtrOutput `pulumi:"bgpRouteTranslationForNatEnabled"` // A `bgpSettings` block which is documented below. In this block the BGP specific settings can be defined. BgpSettings VirtualNetworkGatewayBgpSettingsOutput `pulumi:"bgpSettings"` // A `customRoute` block as defined below. Specifies a custom routes address space for a virtual network gateway and a VpnClient. CustomRoute VirtualNetworkGatewayCustomRoutePtrOutput `pulumi:"customRoute"` // The ID of the local network gateway through which outbound Internet traffic from the virtual network in which the gateway is created will be routed (*forced tunnelling*). Refer to the [Azure documentation on forced tunnelling](https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-forced-tunneling-rm). If not specified, forced tunnelling is disabled. DefaultLocalNetworkGatewayId pulumi.StringPtrOutput `pulumi:"defaultLocalNetworkGatewayId"` // Is DNS forwarding enabled? DnsForwardingEnabled pulumi.BoolPtrOutput `pulumi:"dnsForwardingEnabled"` // Specifies the Edge Zone within the Azure Region where this Virtual Network Gateway should exist. Changing this forces a new Virtual Network Gateway to be created. EdgeZone pulumi.StringPtrOutput `pulumi:"edgeZone"` // If `true`, BGP (Border Gateway Protocol) will be enabled for this Virtual Network Gateway. Defaults to `false`. EnableBgp pulumi.BoolOutput `pulumi:"enableBgp"` // The Generation of the Virtual Network gateway. Possible values include `Generation1`, `Generation2` or `None`. Changing this forces a new resource to be created. // // > **Note:** The available values depend on the `type` and `sku` arguments - where `Generation2` is only value for a `sku` larger than `VpnGw2` or `VpnGw2AZ`. Generation pulumi.StringOutput `pulumi:"generation"` // One or more (up to 3) `ipConfiguration` blocks documented below. Changing this forces a new resource to be created. An active-standby gateway requires exactly one `ipConfiguration` block, an active-active gateway requires exactly two `ipConfiguration` blocks whereas an active-active zone redundant gateway with P2S configuration requires exactly three `ipConfiguration` blocks. IpConfigurations VirtualNetworkGatewayIpConfigurationArrayOutput `pulumi:"ipConfigurations"` // Is IP Sec Replay Protection enabled? Defaults to `true`. IpSecReplayProtectionEnabled pulumi.BoolPtrOutput `pulumi:"ipSecReplayProtectionEnabled"` // The location/region where the Virtual Network Gateway is located. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the Virtual Network Gateway. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // One or more `policyGroup` blocks as defined below. PolicyGroups VirtualNetworkGatewayPolicyGroupArrayOutput `pulumi:"policyGroups"` // Should private IP be enabled on this gateway for connections? Changing this forces a new resource to be created. PrivateIpAddressEnabled pulumi.BoolPtrOutput `pulumi:"privateIpAddressEnabled"` // Is remote vnet traffic that is used to configure this gateway to accept traffic from other Azure Virtual Networks enabled? Defaults to `false`. RemoteVnetTrafficEnabled pulumi.BoolPtrOutput `pulumi:"remoteVnetTrafficEnabled"` // The name of the resource group in which to create the Virtual Network Gateway. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Configuration of the size and capacity of the virtual network gateway. Valid options are `Basic`, `Standard`, `HighPerformance`, `UltraPerformance`, `ErGwScale`, `ErGw1AZ`, `ErGw2AZ`, `ErGw3AZ`, `VpnGw1`, `VpnGw2`, `VpnGw3`, `VpnGw4`,`VpnGw5`, `VpnGw1AZ`, `VpnGw2AZ`, `VpnGw3AZ`,`VpnGw4AZ` and `VpnGw5AZ` and depend on the `type`, `vpnType` and `generation` arguments. A `PolicyBased` gateway only supports the `Basic` SKU. Further, the `UltraPerformance` and `ErGwScale` SKU is only supported by an `ExpressRoute` gateway. // // > **Note:** To build a UltraPerformance ExpressRoute Virtual Network gateway, the associated Public IP needs to be SKU "Basic" not "Standard" // // > **Note:** Not all SKUs (e.g. `ErGw1AZ`) are available in all regions. If you see `StatusCode=400 -- Original Error: Code="InvalidGatewaySkuSpecifiedForGatewayDeploymentType"` please try another region. Sku pulumi.StringOutput `pulumi:"sku"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // The type of the Virtual Network Gateway. Valid options are `Vpn` or `ExpressRoute`. Changing the type forces a new resource to be created. Type pulumi.StringOutput `pulumi:"type"` // Is remote vnet traffic that is used to configure this gateway to accept traffic from remote Virtual WAN networks enabled? Defaults to `false`. VirtualWanTrafficEnabled pulumi.BoolPtrOutput `pulumi:"virtualWanTrafficEnabled"` // A `vpnClientConfiguration` block which is documented below. In this block the Virtual Network Gateway can be configured to accept IPSec point-to-site connections. VpnClientConfiguration VirtualNetworkGatewayVpnClientConfigurationPtrOutput `pulumi:"vpnClientConfiguration"` // The routing type of the Virtual Network Gateway. Valid options are `RouteBased` or `PolicyBased`. Defaults to `RouteBased`. Changing this forces a new resource to be created. VpnType pulumi.StringPtrOutput `pulumi:"vpnType"` } // NewVirtualNetworkGateway registers a new resource with the given unique name, arguments, and options. func NewVirtualNetworkGateway(ctx *pulumi.Context, name string, args *VirtualNetworkGatewayArgs, opts ...pulumi.ResourceOption) (*VirtualNetworkGateway, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.IpConfigurations == nil { return nil, errors.New("invalid value for required argument 'IpConfigurations'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Sku == nil { return nil, errors.New("invalid value for required argument 'Sku'") } if args.Type == nil { return nil, errors.New("invalid value for required argument 'Type'") } opts = internal.PkgResourceDefaultOpts(opts) var resource VirtualNetworkGateway err := ctx.RegisterResource("azure:network/virtualNetworkGateway:VirtualNetworkGateway", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVirtualNetworkGateway gets an existing VirtualNetworkGateway resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetVirtualNetworkGateway(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VirtualNetworkGatewayState, opts ...pulumi.ResourceOption) (*VirtualNetworkGateway, error) { var resource VirtualNetworkGateway err := ctx.ReadResource("azure:network/virtualNetworkGateway:VirtualNetworkGateway", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VirtualNetworkGateway resources. type virtualNetworkGatewayState struct { // If `true`, an active-active Virtual Network Gateway will be created. An active-active gateway requires a `HighPerformance` or an `UltraPerformance` SKU. If `false`, an active-standby gateway will be created. Defaults to `false`. ActiveActive *bool `pulumi:"activeActive"` // Is BGP Route Translation for NAT enabled? Defaults to `false`. BgpRouteTranslationForNatEnabled *bool `pulumi:"bgpRouteTranslationForNatEnabled"` // A `bgpSettings` block which is documented below. In this block the BGP specific settings can be defined. BgpSettings *VirtualNetworkGatewayBgpSettings `pulumi:"bgpSettings"` // A `customRoute` block as defined below. Specifies a custom routes address space for a virtual network gateway and a VpnClient. CustomRoute *VirtualNetworkGatewayCustomRoute `pulumi:"customRoute"` // The ID of the local network gateway through which outbound Internet traffic from the virtual network in which the gateway is created will be routed (*forced tunnelling*). Refer to the [Azure documentation on forced tunnelling](https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-forced-tunneling-rm). If not specified, forced tunnelling is disabled. DefaultLocalNetworkGatewayId *string `pulumi:"defaultLocalNetworkGatewayId"` // Is DNS forwarding enabled? DnsForwardingEnabled *bool `pulumi:"dnsForwardingEnabled"` // Specifies the Edge Zone within the Azure Region where this Virtual Network Gateway should exist. Changing this forces a new Virtual Network Gateway to be created. EdgeZone *string `pulumi:"edgeZone"` // If `true`, BGP (Border Gateway Protocol) will be enabled for this Virtual Network Gateway. Defaults to `false`. EnableBgp *bool `pulumi:"enableBgp"` // The Generation of the Virtual Network gateway. Possible values include `Generation1`, `Generation2` or `None`. Changing this forces a new resource to be created. // // > **Note:** The available values depend on the `type` and `sku` arguments - where `Generation2` is only value for a `sku` larger than `VpnGw2` or `VpnGw2AZ`. Generation *string `pulumi:"generation"` // One or more (up to 3) `ipConfiguration` blocks documented below. Changing this forces a new resource to be created. An active-standby gateway requires exactly one `ipConfiguration` block, an active-active gateway requires exactly two `ipConfiguration` blocks whereas an active-active zone redundant gateway with P2S configuration requires exactly three `ipConfiguration` blocks. IpConfigurations []VirtualNetworkGatewayIpConfiguration `pulumi:"ipConfigurations"` // Is IP Sec Replay Protection enabled? Defaults to `true`. IpSecReplayProtectionEnabled *bool `pulumi:"ipSecReplayProtectionEnabled"` // The location/region where the Virtual Network Gateway is located. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the Virtual Network Gateway. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // One or more `policyGroup` blocks as defined below. PolicyGroups []VirtualNetworkGatewayPolicyGroup `pulumi:"policyGroups"` // Should private IP be enabled on this gateway for connections? Changing this forces a new resource to be created. PrivateIpAddressEnabled *bool `pulumi:"privateIpAddressEnabled"` // Is remote vnet traffic that is used to configure this gateway to accept traffic from other Azure Virtual Networks enabled? Defaults to `false`. RemoteVnetTrafficEnabled *bool `pulumi:"remoteVnetTrafficEnabled"` // The name of the resource group in which to create the Virtual Network Gateway. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Configuration of the size and capacity of the virtual network gateway. Valid options are `Basic`, `Standard`, `HighPerformance`, `UltraPerformance`, `ErGwScale`, `ErGw1AZ`, `ErGw2AZ`, `ErGw3AZ`, `VpnGw1`, `VpnGw2`, `VpnGw3`, `VpnGw4`,`VpnGw5`, `VpnGw1AZ`, `VpnGw2AZ`, `VpnGw3AZ`,`VpnGw4AZ` and `VpnGw5AZ` and depend on the `type`, `vpnType` and `generation` arguments. A `PolicyBased` gateway only supports the `Basic` SKU. Further, the `UltraPerformance` and `ErGwScale` SKU is only supported by an `ExpressRoute` gateway. // // > **Note:** To build a UltraPerformance ExpressRoute Virtual Network gateway, the associated Public IP needs to be SKU "Basic" not "Standard" // // > **Note:** Not all SKUs (e.g. `ErGw1AZ`) are available in all regions. If you see `StatusCode=400 -- Original Error: Code="InvalidGatewaySkuSpecifiedForGatewayDeploymentType"` please try another region. Sku *string `pulumi:"sku"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // The type of the Virtual Network Gateway. Valid options are `Vpn` or `ExpressRoute`. Changing the type forces a new resource to be created. Type *string `pulumi:"type"` // Is remote vnet traffic that is used to configure this gateway to accept traffic from remote Virtual WAN networks enabled? Defaults to `false`. VirtualWanTrafficEnabled *bool `pulumi:"virtualWanTrafficEnabled"` // A `vpnClientConfiguration` block which is documented below. In this block the Virtual Network Gateway can be configured to accept IPSec point-to-site connections. VpnClientConfiguration *VirtualNetworkGatewayVpnClientConfiguration `pulumi:"vpnClientConfiguration"` // The routing type of the Virtual Network Gateway. Valid options are `RouteBased` or `PolicyBased`. Defaults to `RouteBased`. Changing this forces a new resource to be created. VpnType *string `pulumi:"vpnType"` } type VirtualNetworkGatewayState struct { // If `true`, an active-active Virtual Network Gateway will be created. An active-active gateway requires a `HighPerformance` or an `UltraPerformance` SKU. If `false`, an active-standby gateway will be created. Defaults to `false`. ActiveActive pulumi.BoolPtrInput // Is BGP Route Translation for NAT enabled? Defaults to `false`. BgpRouteTranslationForNatEnabled pulumi.BoolPtrInput // A `bgpSettings` block which is documented below. In this block the BGP specific settings can be defined. BgpSettings VirtualNetworkGatewayBgpSettingsPtrInput // A `customRoute` block as defined below. Specifies a custom routes address space for a virtual network gateway and a VpnClient. CustomRoute VirtualNetworkGatewayCustomRoutePtrInput // The ID of the local network gateway through which outbound Internet traffic from the virtual network in which the gateway is created will be routed (*forced tunnelling*). Refer to the [Azure documentation on forced tunnelling](https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-forced-tunneling-rm). If not specified, forced tunnelling is disabled. DefaultLocalNetworkGatewayId pulumi.StringPtrInput // Is DNS forwarding enabled? DnsForwardingEnabled pulumi.BoolPtrInput // Specifies the Edge Zone within the Azure Region where this Virtual Network Gateway should exist. Changing this forces a new Virtual Network Gateway to be created. EdgeZone pulumi.StringPtrInput // If `true`, BGP (Border Gateway Protocol) will be enabled for this Virtual Network Gateway. Defaults to `false`. EnableBgp pulumi.BoolPtrInput // The Generation of the Virtual Network gateway. Possible values include `Generation1`, `Generation2` or `None`. Changing this forces a new resource to be created. // // > **Note:** The available values depend on the `type` and `sku` arguments - where `Generation2` is only value for a `sku` larger than `VpnGw2` or `VpnGw2AZ`. Generation pulumi.StringPtrInput // One or more (up to 3) `ipConfiguration` blocks documented below. Changing this forces a new resource to be created. An active-standby gateway requires exactly one `ipConfiguration` block, an active-active gateway requires exactly two `ipConfiguration` blocks whereas an active-active zone redundant gateway with P2S configuration requires exactly three `ipConfiguration` blocks. IpConfigurations VirtualNetworkGatewayIpConfigurationArrayInput // Is IP Sec Replay Protection enabled? Defaults to `true`. IpSecReplayProtectionEnabled pulumi.BoolPtrInput // The location/region where the Virtual Network Gateway is located. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the Virtual Network Gateway. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // One or more `policyGroup` blocks as defined below. PolicyGroups VirtualNetworkGatewayPolicyGroupArrayInput // Should private IP be enabled on this gateway for connections? Changing this forces a new resource to be created. PrivateIpAddressEnabled pulumi.BoolPtrInput // Is remote vnet traffic that is used to configure this gateway to accept traffic from other Azure Virtual Networks enabled? Defaults to `false`. RemoteVnetTrafficEnabled pulumi.BoolPtrInput // The name of the resource group in which to create the Virtual Network Gateway. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Configuration of the size and capacity of the virtual network gateway. Valid options are `Basic`, `Standard`, `HighPerformance`, `UltraPerformance`, `ErGwScale`, `ErGw1AZ`, `ErGw2AZ`, `ErGw3AZ`, `VpnGw1`, `VpnGw2`, `VpnGw3`, `VpnGw4`,`VpnGw5`, `VpnGw1AZ`, `VpnGw2AZ`, `VpnGw3AZ`,`VpnGw4AZ` and `VpnGw5AZ` and depend on the `type`, `vpnType` and `generation` arguments. A `PolicyBased` gateway only supports the `Basic` SKU. Further, the `UltraPerformance` and `ErGwScale` SKU is only supported by an `ExpressRoute` gateway. // // > **Note:** To build a UltraPerformance ExpressRoute Virtual Network gateway, the associated Public IP needs to be SKU "Basic" not "Standard" // // > **Note:** Not all SKUs (e.g. `ErGw1AZ`) are available in all regions. If you see `StatusCode=400 -- Original Error: Code="InvalidGatewaySkuSpecifiedForGatewayDeploymentType"` please try another region. Sku pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The type of the Virtual Network Gateway. Valid options are `Vpn` or `ExpressRoute`. Changing the type forces a new resource to be created. Type pulumi.StringPtrInput // Is remote vnet traffic that is used to configure this gateway to accept traffic from remote Virtual WAN networks enabled? Defaults to `false`. VirtualWanTrafficEnabled pulumi.BoolPtrInput // A `vpnClientConfiguration` block which is documented below. In this block the Virtual Network Gateway can be configured to accept IPSec point-to-site connections. VpnClientConfiguration VirtualNetworkGatewayVpnClientConfigurationPtrInput // The routing type of the Virtual Network Gateway. Valid options are `RouteBased` or `PolicyBased`. Defaults to `RouteBased`. Changing this forces a new resource to be created. VpnType pulumi.StringPtrInput } func (VirtualNetworkGatewayState) ElementType() reflect.Type { return reflect.TypeOf((*virtualNetworkGatewayState)(nil)).Elem() } type virtualNetworkGatewayArgs struct { // If `true`, an active-active Virtual Network Gateway will be created. An active-active gateway requires a `HighPerformance` or an `UltraPerformance` SKU. If `false`, an active-standby gateway will be created. Defaults to `false`. ActiveActive *bool `pulumi:"activeActive"` // Is BGP Route Translation for NAT enabled? Defaults to `false`. BgpRouteTranslationForNatEnabled *bool `pulumi:"bgpRouteTranslationForNatEnabled"` // A `bgpSettings` block which is documented below. In this block the BGP specific settings can be defined. BgpSettings *VirtualNetworkGatewayBgpSettings `pulumi:"bgpSettings"` // A `customRoute` block as defined below. Specifies a custom routes address space for a virtual network gateway and a VpnClient. CustomRoute *VirtualNetworkGatewayCustomRoute `pulumi:"customRoute"` // The ID of the local network gateway through which outbound Internet traffic from the virtual network in which the gateway is created will be routed (*forced tunnelling*). Refer to the [Azure documentation on forced tunnelling](https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-forced-tunneling-rm). If not specified, forced tunnelling is disabled. DefaultLocalNetworkGatewayId *string `pulumi:"defaultLocalNetworkGatewayId"` // Is DNS forwarding enabled? DnsForwardingEnabled *bool `pulumi:"dnsForwardingEnabled"` // Specifies the Edge Zone within the Azure Region where this Virtual Network Gateway should exist. Changing this forces a new Virtual Network Gateway to be created. EdgeZone *string `pulumi:"edgeZone"` // If `true`, BGP (Border Gateway Protocol) will be enabled for this Virtual Network Gateway. Defaults to `false`. EnableBgp *bool `pulumi:"enableBgp"` // The Generation of the Virtual Network gateway. Possible values include `Generation1`, `Generation2` or `None`. Changing this forces a new resource to be created. // // > **Note:** The available values depend on the `type` and `sku` arguments - where `Generation2` is only value for a `sku` larger than `VpnGw2` or `VpnGw2AZ`. Generation *string `pulumi:"generation"` // One or more (up to 3) `ipConfiguration` blocks documented below. Changing this forces a new resource to be created. An active-standby gateway requires exactly one `ipConfiguration` block, an active-active gateway requires exactly two `ipConfiguration` blocks whereas an active-active zone redundant gateway with P2S configuration requires exactly three `ipConfiguration` blocks. IpConfigurations []VirtualNetworkGatewayIpConfiguration `pulumi:"ipConfigurations"` // Is IP Sec Replay Protection enabled? Defaults to `true`. IpSecReplayProtectionEnabled *bool `pulumi:"ipSecReplayProtectionEnabled"` // The location/region where the Virtual Network Gateway is located. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the Virtual Network Gateway. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // One or more `policyGroup` blocks as defined below. PolicyGroups []VirtualNetworkGatewayPolicyGroup `pulumi:"policyGroups"` // Should private IP be enabled on this gateway for connections? Changing this forces a new resource to be created. PrivateIpAddressEnabled *bool `pulumi:"privateIpAddressEnabled"` // Is remote vnet traffic that is used to configure this gateway to accept traffic from other Azure Virtual Networks enabled? Defaults to `false`. RemoteVnetTrafficEnabled *bool `pulumi:"remoteVnetTrafficEnabled"` // The name of the resource group in which to create the Virtual Network Gateway. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Configuration of the size and capacity of the virtual network gateway. Valid options are `Basic`, `Standard`, `HighPerformance`, `UltraPerformance`, `ErGwScale`, `ErGw1AZ`, `ErGw2AZ`, `ErGw3AZ`, `VpnGw1`, `VpnGw2`, `VpnGw3`, `VpnGw4`,`VpnGw5`, `VpnGw1AZ`, `VpnGw2AZ`, `VpnGw3AZ`,`VpnGw4AZ` and `VpnGw5AZ` and depend on the `type`, `vpnType` and `generation` arguments. A `PolicyBased` gateway only supports the `Basic` SKU. Further, the `UltraPerformance` and `ErGwScale` SKU is only supported by an `ExpressRoute` gateway. // // > **Note:** To build a UltraPerformance ExpressRoute Virtual Network gateway, the associated Public IP needs to be SKU "Basic" not "Standard" // // > **Note:** Not all SKUs (e.g. `ErGw1AZ`) are available in all regions. If you see `StatusCode=400 -- Original Error: Code="InvalidGatewaySkuSpecifiedForGatewayDeploymentType"` please try another region. Sku string `pulumi:"sku"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // The type of the Virtual Network Gateway. Valid options are `Vpn` or `ExpressRoute`. Changing the type forces a new resource to be created. Type string `pulumi:"type"` // Is remote vnet traffic that is used to configure this gateway to accept traffic from remote Virtual WAN networks enabled? Defaults to `false`. VirtualWanTrafficEnabled *bool `pulumi:"virtualWanTrafficEnabled"` // A `vpnClientConfiguration` block which is documented below. In this block the Virtual Network Gateway can be configured to accept IPSec point-to-site connections. VpnClientConfiguration *VirtualNetworkGatewayVpnClientConfiguration `pulumi:"vpnClientConfiguration"` // The routing type of the Virtual Network Gateway. Valid options are `RouteBased` or `PolicyBased`. Defaults to `RouteBased`. Changing this forces a new resource to be created. VpnType *string `pulumi:"vpnType"` } // The set of arguments for constructing a VirtualNetworkGateway resource. type VirtualNetworkGatewayArgs struct { // If `true`, an active-active Virtual Network Gateway will be created. An active-active gateway requires a `HighPerformance` or an `UltraPerformance` SKU. If `false`, an active-standby gateway will be created. Defaults to `false`. ActiveActive pulumi.BoolPtrInput // Is BGP Route Translation for NAT enabled? Defaults to `false`. BgpRouteTranslationForNatEnabled pulumi.BoolPtrInput // A `bgpSettings` block which is documented below. In this block the BGP specific settings can be defined. BgpSettings VirtualNetworkGatewayBgpSettingsPtrInput // A `customRoute` block as defined below. Specifies a custom routes address space for a virtual network gateway and a VpnClient. CustomRoute VirtualNetworkGatewayCustomRoutePtrInput // The ID of the local network gateway through which outbound Internet traffic from the virtual network in which the gateway is created will be routed (*forced tunnelling*). Refer to the [Azure documentation on forced tunnelling](https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-forced-tunneling-rm). If not specified, forced tunnelling is disabled. DefaultLocalNetworkGatewayId pulumi.StringPtrInput // Is DNS forwarding enabled? DnsForwardingEnabled pulumi.BoolPtrInput // Specifies the Edge Zone within the Azure Region where this Virtual Network Gateway should exist. Changing this forces a new Virtual Network Gateway to be created. EdgeZone pulumi.StringPtrInput // If `true`, BGP (Border Gateway Protocol) will be enabled for this Virtual Network Gateway. Defaults to `false`. EnableBgp pulumi.BoolPtrInput // The Generation of the Virtual Network gateway. Possible values include `Generation1`, `Generation2` or `None`. Changing this forces a new resource to be created. // // > **Note:** The available values depend on the `type` and `sku` arguments - where `Generation2` is only value for a `sku` larger than `VpnGw2` or `VpnGw2AZ`. Generation pulumi.StringPtrInput // One or more (up to 3) `ipConfiguration` blocks documented below. Changing this forces a new resource to be created. An active-standby gateway requires exactly one `ipConfiguration` block, an active-active gateway requires exactly two `ipConfiguration` blocks whereas an active-active zone redundant gateway with P2S configuration requires exactly three `ipConfiguration` blocks. IpConfigurations VirtualNetworkGatewayIpConfigurationArrayInput // Is IP Sec Replay Protection enabled? Defaults to `true`. IpSecReplayProtectionEnabled pulumi.BoolPtrInput
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
true
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/networkManagerIpamPool.go
sdk/go/azure/network/networkManagerIpamPool.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Network Manager IP Address Management (IPAM) Pool. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // exampleNetworkManager, err := network.NewNetworkManager(ctx, "example", &network.NetworkManagerArgs{ // Name: pulumi.String("example-network-manager"), // Location: example.Location, // ResourceGroupName: example.Name, // Scope: &network.NetworkManagerScopeArgs{ // SubscriptionIds: pulumi.StringArray{ // pulumi.String(current.Id), // }, // }, // ScopeAccesses: pulumi.StringArray{ // pulumi.String("Connectivity"), // pulumi.String("SecurityAdmin"), // }, // }) // if err != nil { // return err // } // _, err = network.NewNetworkManagerIpamPool(ctx, "example", &network.NetworkManagerIpamPoolArgs{ // Name: pulumi.String("example-ipam-pool"), // Location: pulumi.String("West Europe"), // NetworkManagerId: exampleNetworkManager.ID(), // DisplayName: pulumi.String("example-pool"), // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.0.0/24"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Network Manager IPAM Pools can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/networkManagerIpamPool:NetworkManagerIpamPool example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/manager1/ipamPools/pool1 // ``` type NetworkManagerIpamPool struct { pulumi.CustomResourceState // Specifies a list of IPv4 or IPv6 IP address prefixes. Changing this forces a new Network Manager IPAM Pool to be created. AddressPrefixes pulumi.StringArrayOutput `pulumi:"addressPrefixes"` // The description of the Network Manager IPAM Pool. Description pulumi.StringPtrOutput `pulumi:"description"` // The display name for the Network Manager IPAM Pool. DisplayName pulumi.StringPtrOutput `pulumi:"displayName"` // The Azure Region where the Network Manager IPAM Pool should exist. Changing this forces a new Network Manager IPAM Pool to be created. Location pulumi.StringOutput `pulumi:"location"` // The name which should be used for this Network Manager IPAM Pool. Changing this forces a new Network Manager IPAM Pool to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the parent Network Manager. Changing this forces a new Network Manager IPAM Pool to be created. NetworkManagerId pulumi.StringOutput `pulumi:"networkManagerId"` // The name of the parent IPAM Pool. Changing this forces a new Network Manager IPAM Pool to be created. ParentPoolName pulumi.StringPtrOutput `pulumi:"parentPoolName"` // A mapping of tags which should be assigned to the Network Manager IPAM Pool. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewNetworkManagerIpamPool registers a new resource with the given unique name, arguments, and options. func NewNetworkManagerIpamPool(ctx *pulumi.Context, name string, args *NetworkManagerIpamPoolArgs, opts ...pulumi.ResourceOption) (*NetworkManagerIpamPool, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.AddressPrefixes == nil { return nil, errors.New("invalid value for required argument 'AddressPrefixes'") } if args.NetworkManagerId == nil { return nil, errors.New("invalid value for required argument 'NetworkManagerId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkManagerIpamPool err := ctx.RegisterResource("azure:network/networkManagerIpamPool:NetworkManagerIpamPool", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkManagerIpamPool gets an existing NetworkManagerIpamPool resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetNetworkManagerIpamPool(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkManagerIpamPoolState, opts ...pulumi.ResourceOption) (*NetworkManagerIpamPool, error) { var resource NetworkManagerIpamPool err := ctx.ReadResource("azure:network/networkManagerIpamPool:NetworkManagerIpamPool", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkManagerIpamPool resources. type networkManagerIpamPoolState struct { // Specifies a list of IPv4 or IPv6 IP address prefixes. Changing this forces a new Network Manager IPAM Pool to be created. AddressPrefixes []string `pulumi:"addressPrefixes"` // The description of the Network Manager IPAM Pool. Description *string `pulumi:"description"` // The display name for the Network Manager IPAM Pool. DisplayName *string `pulumi:"displayName"` // The Azure Region where the Network Manager IPAM Pool should exist. Changing this forces a new Network Manager IPAM Pool to be created. Location *string `pulumi:"location"` // The name which should be used for this Network Manager IPAM Pool. Changing this forces a new Network Manager IPAM Pool to be created. Name *string `pulumi:"name"` // The ID of the parent Network Manager. Changing this forces a new Network Manager IPAM Pool to be created. NetworkManagerId *string `pulumi:"networkManagerId"` // The name of the parent IPAM Pool. Changing this forces a new Network Manager IPAM Pool to be created. ParentPoolName *string `pulumi:"parentPoolName"` // A mapping of tags which should be assigned to the Network Manager IPAM Pool. Tags map[string]string `pulumi:"tags"` } type NetworkManagerIpamPoolState struct { // Specifies a list of IPv4 or IPv6 IP address prefixes. Changing this forces a new Network Manager IPAM Pool to be created. AddressPrefixes pulumi.StringArrayInput // The description of the Network Manager IPAM Pool. Description pulumi.StringPtrInput // The display name for the Network Manager IPAM Pool. DisplayName pulumi.StringPtrInput // The Azure Region where the Network Manager IPAM Pool should exist. Changing this forces a new Network Manager IPAM Pool to be created. Location pulumi.StringPtrInput // The name which should be used for this Network Manager IPAM Pool. Changing this forces a new Network Manager IPAM Pool to be created. Name pulumi.StringPtrInput // The ID of the parent Network Manager. Changing this forces a new Network Manager IPAM Pool to be created. NetworkManagerId pulumi.StringPtrInput // The name of the parent IPAM Pool. Changing this forces a new Network Manager IPAM Pool to be created. ParentPoolName pulumi.StringPtrInput // A mapping of tags which should be assigned to the Network Manager IPAM Pool. Tags pulumi.StringMapInput } func (NetworkManagerIpamPoolState) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerIpamPoolState)(nil)).Elem() } type networkManagerIpamPoolArgs struct { // Specifies a list of IPv4 or IPv6 IP address prefixes. Changing this forces a new Network Manager IPAM Pool to be created. AddressPrefixes []string `pulumi:"addressPrefixes"` // The description of the Network Manager IPAM Pool. Description *string `pulumi:"description"` // The display name for the Network Manager IPAM Pool. DisplayName *string `pulumi:"displayName"` // The Azure Region where the Network Manager IPAM Pool should exist. Changing this forces a new Network Manager IPAM Pool to be created. Location *string `pulumi:"location"` // The name which should be used for this Network Manager IPAM Pool. Changing this forces a new Network Manager IPAM Pool to be created. Name *string `pulumi:"name"` // The ID of the parent Network Manager. Changing this forces a new Network Manager IPAM Pool to be created. NetworkManagerId string `pulumi:"networkManagerId"` // The name of the parent IPAM Pool. Changing this forces a new Network Manager IPAM Pool to be created. ParentPoolName *string `pulumi:"parentPoolName"` // A mapping of tags which should be assigned to the Network Manager IPAM Pool. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a NetworkManagerIpamPool resource. type NetworkManagerIpamPoolArgs struct { // Specifies a list of IPv4 or IPv6 IP address prefixes. Changing this forces a new Network Manager IPAM Pool to be created. AddressPrefixes pulumi.StringArrayInput // The description of the Network Manager IPAM Pool. Description pulumi.StringPtrInput // The display name for the Network Manager IPAM Pool. DisplayName pulumi.StringPtrInput // The Azure Region where the Network Manager IPAM Pool should exist. Changing this forces a new Network Manager IPAM Pool to be created. Location pulumi.StringPtrInput // The name which should be used for this Network Manager IPAM Pool. Changing this forces a new Network Manager IPAM Pool to be created. Name pulumi.StringPtrInput // The ID of the parent Network Manager. Changing this forces a new Network Manager IPAM Pool to be created. NetworkManagerId pulumi.StringInput // The name of the parent IPAM Pool. Changing this forces a new Network Manager IPAM Pool to be created. ParentPoolName pulumi.StringPtrInput // A mapping of tags which should be assigned to the Network Manager IPAM Pool. Tags pulumi.StringMapInput } func (NetworkManagerIpamPoolArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerIpamPoolArgs)(nil)).Elem() } type NetworkManagerIpamPoolInput interface { pulumi.Input ToNetworkManagerIpamPoolOutput() NetworkManagerIpamPoolOutput ToNetworkManagerIpamPoolOutputWithContext(ctx context.Context) NetworkManagerIpamPoolOutput } func (*NetworkManagerIpamPool) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerIpamPool)(nil)).Elem() } func (i *NetworkManagerIpamPool) ToNetworkManagerIpamPoolOutput() NetworkManagerIpamPoolOutput { return i.ToNetworkManagerIpamPoolOutputWithContext(context.Background()) } func (i *NetworkManagerIpamPool) ToNetworkManagerIpamPoolOutputWithContext(ctx context.Context) NetworkManagerIpamPoolOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerIpamPoolOutput) } // NetworkManagerIpamPoolArrayInput is an input type that accepts NetworkManagerIpamPoolArray and NetworkManagerIpamPoolArrayOutput values. // You can construct a concrete instance of `NetworkManagerIpamPoolArrayInput` via: // // NetworkManagerIpamPoolArray{ NetworkManagerIpamPoolArgs{...} } type NetworkManagerIpamPoolArrayInput interface { pulumi.Input ToNetworkManagerIpamPoolArrayOutput() NetworkManagerIpamPoolArrayOutput ToNetworkManagerIpamPoolArrayOutputWithContext(context.Context) NetworkManagerIpamPoolArrayOutput } type NetworkManagerIpamPoolArray []NetworkManagerIpamPoolInput func (NetworkManagerIpamPoolArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerIpamPool)(nil)).Elem() } func (i NetworkManagerIpamPoolArray) ToNetworkManagerIpamPoolArrayOutput() NetworkManagerIpamPoolArrayOutput { return i.ToNetworkManagerIpamPoolArrayOutputWithContext(context.Background()) } func (i NetworkManagerIpamPoolArray) ToNetworkManagerIpamPoolArrayOutputWithContext(ctx context.Context) NetworkManagerIpamPoolArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerIpamPoolArrayOutput) } // NetworkManagerIpamPoolMapInput is an input type that accepts NetworkManagerIpamPoolMap and NetworkManagerIpamPoolMapOutput values. // You can construct a concrete instance of `NetworkManagerIpamPoolMapInput` via: // // NetworkManagerIpamPoolMap{ "key": NetworkManagerIpamPoolArgs{...} } type NetworkManagerIpamPoolMapInput interface { pulumi.Input ToNetworkManagerIpamPoolMapOutput() NetworkManagerIpamPoolMapOutput ToNetworkManagerIpamPoolMapOutputWithContext(context.Context) NetworkManagerIpamPoolMapOutput } type NetworkManagerIpamPoolMap map[string]NetworkManagerIpamPoolInput func (NetworkManagerIpamPoolMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerIpamPool)(nil)).Elem() } func (i NetworkManagerIpamPoolMap) ToNetworkManagerIpamPoolMapOutput() NetworkManagerIpamPoolMapOutput { return i.ToNetworkManagerIpamPoolMapOutputWithContext(context.Background()) } func (i NetworkManagerIpamPoolMap) ToNetworkManagerIpamPoolMapOutputWithContext(ctx context.Context) NetworkManagerIpamPoolMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerIpamPoolMapOutput) } type NetworkManagerIpamPoolOutput struct{ *pulumi.OutputState } func (NetworkManagerIpamPoolOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerIpamPool)(nil)).Elem() } func (o NetworkManagerIpamPoolOutput) ToNetworkManagerIpamPoolOutput() NetworkManagerIpamPoolOutput { return o } func (o NetworkManagerIpamPoolOutput) ToNetworkManagerIpamPoolOutputWithContext(ctx context.Context) NetworkManagerIpamPoolOutput { return o } // Specifies a list of IPv4 or IPv6 IP address prefixes. Changing this forces a new Network Manager IPAM Pool to be created. func (o NetworkManagerIpamPoolOutput) AddressPrefixes() pulumi.StringArrayOutput { return o.ApplyT(func(v *NetworkManagerIpamPool) pulumi.StringArrayOutput { return v.AddressPrefixes }).(pulumi.StringArrayOutput) } // The description of the Network Manager IPAM Pool. func (o NetworkManagerIpamPoolOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkManagerIpamPool) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // The display name for the Network Manager IPAM Pool. func (o NetworkManagerIpamPoolOutput) DisplayName() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkManagerIpamPool) pulumi.StringPtrOutput { return v.DisplayName }).(pulumi.StringPtrOutput) } // The Azure Region where the Network Manager IPAM Pool should exist. Changing this forces a new Network Manager IPAM Pool to be created. func (o NetworkManagerIpamPoolOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerIpamPool) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name which should be used for this Network Manager IPAM Pool. Changing this forces a new Network Manager IPAM Pool to be created. func (o NetworkManagerIpamPoolOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerIpamPool) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the parent Network Manager. Changing this forces a new Network Manager IPAM Pool to be created. func (o NetworkManagerIpamPoolOutput) NetworkManagerId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerIpamPool) pulumi.StringOutput { return v.NetworkManagerId }).(pulumi.StringOutput) } // The name of the parent IPAM Pool. Changing this forces a new Network Manager IPAM Pool to be created. func (o NetworkManagerIpamPoolOutput) ParentPoolName() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkManagerIpamPool) pulumi.StringPtrOutput { return v.ParentPoolName }).(pulumi.StringPtrOutput) } // A mapping of tags which should be assigned to the Network Manager IPAM Pool. func (o NetworkManagerIpamPoolOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *NetworkManagerIpamPool) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type NetworkManagerIpamPoolArrayOutput struct{ *pulumi.OutputState } func (NetworkManagerIpamPoolArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerIpamPool)(nil)).Elem() } func (o NetworkManagerIpamPoolArrayOutput) ToNetworkManagerIpamPoolArrayOutput() NetworkManagerIpamPoolArrayOutput { return o } func (o NetworkManagerIpamPoolArrayOutput) ToNetworkManagerIpamPoolArrayOutputWithContext(ctx context.Context) NetworkManagerIpamPoolArrayOutput { return o } func (o NetworkManagerIpamPoolArrayOutput) Index(i pulumi.IntInput) NetworkManagerIpamPoolOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkManagerIpamPool { return vs[0].([]*NetworkManagerIpamPool)[vs[1].(int)] }).(NetworkManagerIpamPoolOutput) } type NetworkManagerIpamPoolMapOutput struct{ *pulumi.OutputState } func (NetworkManagerIpamPoolMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerIpamPool)(nil)).Elem() } func (o NetworkManagerIpamPoolMapOutput) ToNetworkManagerIpamPoolMapOutput() NetworkManagerIpamPoolMapOutput { return o } func (o NetworkManagerIpamPoolMapOutput) ToNetworkManagerIpamPoolMapOutputWithContext(ctx context.Context) NetworkManagerIpamPoolMapOutput { return o } func (o NetworkManagerIpamPoolMapOutput) MapIndex(k pulumi.StringInput) NetworkManagerIpamPoolOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkManagerIpamPool { return vs[0].(map[string]*NetworkManagerIpamPool)[vs[1].(string)] }).(NetworkManagerIpamPoolOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerIpamPoolInput)(nil)).Elem(), &NetworkManagerIpamPool{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerIpamPoolArrayInput)(nil)).Elem(), NetworkManagerIpamPoolArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerIpamPoolMapInput)(nil)).Elem(), NetworkManagerIpamPoolMap{}) pulumi.RegisterOutputType(NetworkManagerIpamPoolOutput{}) pulumi.RegisterOutputType(NetworkManagerIpamPoolArrayOutput{}) pulumi.RegisterOutputType(NetworkManagerIpamPoolMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/networkManager.go
sdk/go/azure/network/networkManager.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Network Manager. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // _, err = network.NewNetworkManager(ctx, "example", &network.NetworkManagerArgs{ // Name: pulumi.String("example-network-manager"), // Location: example.Location, // ResourceGroupName: example.Name, // Scope: &network.NetworkManagerScopeArgs{ // SubscriptionIds: pulumi.StringArray{ // pulumi.String(current.Id), // }, // }, // ScopeAccesses: pulumi.StringArray{ // pulumi.String("Connectivity"), // pulumi.String("SecurityAdmin"), // }, // Description: pulumi.String("example network manager"), // Tags: pulumi.StringMap{ // "foo": pulumi.String("bar"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Network Manager can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/networkManager:NetworkManager example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Network/networkManagers/networkManager1 // ``` type NetworkManager struct { pulumi.CustomResourceState // One or more `crossTenantScopes` blocks as defined below. CrossTenantScopes NetworkManagerCrossTenantScopeArrayOutput `pulumi:"crossTenantScopes"` // A description of the Network Manager. Description pulumi.StringPtrOutput `pulumi:"description"` // Specifies the Azure Region where the Network Manager should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies the name which should be used for this Network Manager. Changing this forces a new Network Manager to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the name of the Resource Group where the Network Manager should exist. Changing this forces a new Network Manager to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A `scope` block as defined below. Scope NetworkManagerScopeOutput `pulumi:"scope"` // A list of configuration deployment types. Possible values are `Connectivity`, `SecurityAdmin` and `Routing`, which specify whether Connectivity Configuration, Security Admin Configuration or Routing Configuration are allowed for the Network Manager. ScopeAccesses pulumi.StringArrayOutput `pulumi:"scopeAccesses"` // A mapping of tags which should be assigned to the Network Manager. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewNetworkManager registers a new resource with the given unique name, arguments, and options. func NewNetworkManager(ctx *pulumi.Context, name string, args *NetworkManagerArgs, opts ...pulumi.ResourceOption) (*NetworkManager, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Scope == nil { return nil, errors.New("invalid value for required argument 'Scope'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkManager err := ctx.RegisterResource("azure:network/networkManager:NetworkManager", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkManager gets an existing NetworkManager resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetNetworkManager(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkManagerState, opts ...pulumi.ResourceOption) (*NetworkManager, error) { var resource NetworkManager err := ctx.ReadResource("azure:network/networkManager:NetworkManager", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkManager resources. type networkManagerState struct { // One or more `crossTenantScopes` blocks as defined below. CrossTenantScopes []NetworkManagerCrossTenantScope `pulumi:"crossTenantScopes"` // A description of the Network Manager. Description *string `pulumi:"description"` // Specifies the Azure Region where the Network Manager should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name which should be used for this Network Manager. Changing this forces a new Network Manager to be created. Name *string `pulumi:"name"` // Specifies the name of the Resource Group where the Network Manager should exist. Changing this forces a new Network Manager to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A `scope` block as defined below. Scope *NetworkManagerScope `pulumi:"scope"` // A list of configuration deployment types. Possible values are `Connectivity`, `SecurityAdmin` and `Routing`, which specify whether Connectivity Configuration, Security Admin Configuration or Routing Configuration are allowed for the Network Manager. ScopeAccesses []string `pulumi:"scopeAccesses"` // A mapping of tags which should be assigned to the Network Manager. Tags map[string]string `pulumi:"tags"` } type NetworkManagerState struct { // One or more `crossTenantScopes` blocks as defined below. CrossTenantScopes NetworkManagerCrossTenantScopeArrayInput // A description of the Network Manager. Description pulumi.StringPtrInput // Specifies the Azure Region where the Network Manager should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name which should be used for this Network Manager. Changing this forces a new Network Manager to be created. Name pulumi.StringPtrInput // Specifies the name of the Resource Group where the Network Manager should exist. Changing this forces a new Network Manager to be created. ResourceGroupName pulumi.StringPtrInput // A `scope` block as defined below. Scope NetworkManagerScopePtrInput // A list of configuration deployment types. Possible values are `Connectivity`, `SecurityAdmin` and `Routing`, which specify whether Connectivity Configuration, Security Admin Configuration or Routing Configuration are allowed for the Network Manager. ScopeAccesses pulumi.StringArrayInput // A mapping of tags which should be assigned to the Network Manager. Tags pulumi.StringMapInput } func (NetworkManagerState) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerState)(nil)).Elem() } type networkManagerArgs struct { // A description of the Network Manager. Description *string `pulumi:"description"` // Specifies the Azure Region where the Network Manager should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name which should be used for this Network Manager. Changing this forces a new Network Manager to be created. Name *string `pulumi:"name"` // Specifies the name of the Resource Group where the Network Manager should exist. Changing this forces a new Network Manager to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A `scope` block as defined below. Scope NetworkManagerScope `pulumi:"scope"` // A list of configuration deployment types. Possible values are `Connectivity`, `SecurityAdmin` and `Routing`, which specify whether Connectivity Configuration, Security Admin Configuration or Routing Configuration are allowed for the Network Manager. ScopeAccesses []string `pulumi:"scopeAccesses"` // A mapping of tags which should be assigned to the Network Manager. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a NetworkManager resource. type NetworkManagerArgs struct { // A description of the Network Manager. Description pulumi.StringPtrInput // Specifies the Azure Region where the Network Manager should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name which should be used for this Network Manager. Changing this forces a new Network Manager to be created. Name pulumi.StringPtrInput // Specifies the name of the Resource Group where the Network Manager should exist. Changing this forces a new Network Manager to be created. ResourceGroupName pulumi.StringInput // A `scope` block as defined below. Scope NetworkManagerScopeInput // A list of configuration deployment types. Possible values are `Connectivity`, `SecurityAdmin` and `Routing`, which specify whether Connectivity Configuration, Security Admin Configuration or Routing Configuration are allowed for the Network Manager. ScopeAccesses pulumi.StringArrayInput // A mapping of tags which should be assigned to the Network Manager. Tags pulumi.StringMapInput } func (NetworkManagerArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerArgs)(nil)).Elem() } type NetworkManagerInput interface { pulumi.Input ToNetworkManagerOutput() NetworkManagerOutput ToNetworkManagerOutputWithContext(ctx context.Context) NetworkManagerOutput } func (*NetworkManager) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManager)(nil)).Elem() } func (i *NetworkManager) ToNetworkManagerOutput() NetworkManagerOutput { return i.ToNetworkManagerOutputWithContext(context.Background()) } func (i *NetworkManager) ToNetworkManagerOutputWithContext(ctx context.Context) NetworkManagerOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerOutput) } // NetworkManagerArrayInput is an input type that accepts NetworkManagerArray and NetworkManagerArrayOutput values. // You can construct a concrete instance of `NetworkManagerArrayInput` via: // // NetworkManagerArray{ NetworkManagerArgs{...} } type NetworkManagerArrayInput interface { pulumi.Input ToNetworkManagerArrayOutput() NetworkManagerArrayOutput ToNetworkManagerArrayOutputWithContext(context.Context) NetworkManagerArrayOutput } type NetworkManagerArray []NetworkManagerInput func (NetworkManagerArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManager)(nil)).Elem() } func (i NetworkManagerArray) ToNetworkManagerArrayOutput() NetworkManagerArrayOutput { return i.ToNetworkManagerArrayOutputWithContext(context.Background()) } func (i NetworkManagerArray) ToNetworkManagerArrayOutputWithContext(ctx context.Context) NetworkManagerArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerArrayOutput) } // NetworkManagerMapInput is an input type that accepts NetworkManagerMap and NetworkManagerMapOutput values. // You can construct a concrete instance of `NetworkManagerMapInput` via: // // NetworkManagerMap{ "key": NetworkManagerArgs{...} } type NetworkManagerMapInput interface { pulumi.Input ToNetworkManagerMapOutput() NetworkManagerMapOutput ToNetworkManagerMapOutputWithContext(context.Context) NetworkManagerMapOutput } type NetworkManagerMap map[string]NetworkManagerInput func (NetworkManagerMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManager)(nil)).Elem() } func (i NetworkManagerMap) ToNetworkManagerMapOutput() NetworkManagerMapOutput { return i.ToNetworkManagerMapOutputWithContext(context.Background()) } func (i NetworkManagerMap) ToNetworkManagerMapOutputWithContext(ctx context.Context) NetworkManagerMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerMapOutput) } type NetworkManagerOutput struct{ *pulumi.OutputState } func (NetworkManagerOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManager)(nil)).Elem() } func (o NetworkManagerOutput) ToNetworkManagerOutput() NetworkManagerOutput { return o } func (o NetworkManagerOutput) ToNetworkManagerOutputWithContext(ctx context.Context) NetworkManagerOutput { return o } // One or more `crossTenantScopes` blocks as defined below. func (o NetworkManagerOutput) CrossTenantScopes() NetworkManagerCrossTenantScopeArrayOutput { return o.ApplyT(func(v *NetworkManager) NetworkManagerCrossTenantScopeArrayOutput { return v.CrossTenantScopes }).(NetworkManagerCrossTenantScopeArrayOutput) } // A description of the Network Manager. func (o NetworkManagerOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkManager) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // Specifies the Azure Region where the Network Manager should exist. Changing this forces a new resource to be created. func (o NetworkManagerOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManager) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name which should be used for this Network Manager. Changing this forces a new Network Manager to be created. func (o NetworkManagerOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManager) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the name of the Resource Group where the Network Manager should exist. Changing this forces a new Network Manager to be created. func (o NetworkManagerOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManager) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A `scope` block as defined below. func (o NetworkManagerOutput) Scope() NetworkManagerScopeOutput { return o.ApplyT(func(v *NetworkManager) NetworkManagerScopeOutput { return v.Scope }).(NetworkManagerScopeOutput) } // A list of configuration deployment types. Possible values are `Connectivity`, `SecurityAdmin` and `Routing`, which specify whether Connectivity Configuration, Security Admin Configuration or Routing Configuration are allowed for the Network Manager. func (o NetworkManagerOutput) ScopeAccesses() pulumi.StringArrayOutput { return o.ApplyT(func(v *NetworkManager) pulumi.StringArrayOutput { return v.ScopeAccesses }).(pulumi.StringArrayOutput) } // A mapping of tags which should be assigned to the Network Manager. func (o NetworkManagerOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *NetworkManager) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type NetworkManagerArrayOutput struct{ *pulumi.OutputState } func (NetworkManagerArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManager)(nil)).Elem() } func (o NetworkManagerArrayOutput) ToNetworkManagerArrayOutput() NetworkManagerArrayOutput { return o } func (o NetworkManagerArrayOutput) ToNetworkManagerArrayOutputWithContext(ctx context.Context) NetworkManagerArrayOutput { return o } func (o NetworkManagerArrayOutput) Index(i pulumi.IntInput) NetworkManagerOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkManager { return vs[0].([]*NetworkManager)[vs[1].(int)] }).(NetworkManagerOutput) } type NetworkManagerMapOutput struct{ *pulumi.OutputState } func (NetworkManagerMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManager)(nil)).Elem() } func (o NetworkManagerMapOutput) ToNetworkManagerMapOutput() NetworkManagerMapOutput { return o } func (o NetworkManagerMapOutput) ToNetworkManagerMapOutputWithContext(ctx context.Context) NetworkManagerMapOutput { return o } func (o NetworkManagerMapOutput) MapIndex(k pulumi.StringInput) NetworkManagerOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkManager { return vs[0].(map[string]*NetworkManager)[vs[1].(string)] }).(NetworkManagerOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerInput)(nil)).Elem(), &NetworkManager{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerArrayInput)(nil)).Elem(), NetworkManagerArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerMapInput)(nil)).Elem(), NetworkManagerMap{}) pulumi.RegisterOutputType(NetworkManagerOutput{}) pulumi.RegisterOutputType(NetworkManagerArrayOutput{}) pulumi.RegisterOutputType(NetworkManagerMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/trafficManagerExternalEndpoint.go
sdk/go/azure/network/trafficManagerExternalEndpoint.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an External Endpoint within a Traffic Manager Profile. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleTrafficManagerProfile, err := network.NewTrafficManagerProfile(ctx, "example", &network.TrafficManagerProfileArgs{ // Name: pulumi.String("example-profile"), // ResourceGroupName: example.Name, // TrafficRoutingMethod: pulumi.String("Weighted"), // DnsConfig: &network.TrafficManagerProfileDnsConfigArgs{ // RelativeName: pulumi.String("example-profile"), // Ttl: pulumi.Int(100), // }, // MonitorConfig: &network.TrafficManagerProfileMonitorConfigArgs{ // Protocol: pulumi.String("HTTP"), // Port: pulumi.Int(80), // Path: pulumi.String("/"), // IntervalInSeconds: pulumi.Int(30), // TimeoutInSeconds: pulumi.Int(9), // ToleratedNumberOfFailures: pulumi.Int(3), // }, // Tags: pulumi.StringMap{ // "environment": pulumi.String("Production"), // }, // }) // if err != nil { // return err // } // _, err = network.NewTrafficManagerExternalEndpoint(ctx, "example", &network.TrafficManagerExternalEndpointArgs{ // Name: pulumi.String("example-endpoint"), // ProfileId: exampleTrafficManagerProfile.ID(), // AlwaysServeEnabled: pulumi.Bool(true), // Weight: pulumi.Int(100), // Target: pulumi.String("www.example.com"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2022-04-01 // // ## Import // // External Endpoints can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/trafficManagerExternalEndpoint:TrafficManagerExternalEndpoint example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-group/providers/Microsoft.Network/trafficManagerProfiles/example-profile/ExternalEndpoints/example-endpoint // ``` type TrafficManagerExternalEndpoint struct { pulumi.CustomResourceState // If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method. Defaults to `false`. AlwaysServeEnabled pulumi.BoolPtrOutput `pulumi:"alwaysServeEnabled"` // One or more `customHeader` blocks as defined below. CustomHeaders TrafficManagerExternalEndpointCustomHeaderArrayOutput `pulumi:"customHeaders"` // Is the endpoint enabled? Defaults to `true`. Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` // Specifies the Azure location of the Endpoint, this must be specified for Profiles using the `Performance` routing method. EndpointLocation pulumi.StringOutput `pulumi:"endpointLocation"` // A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault). GeoMappings pulumi.StringArrayOutput `pulumi:"geoMappings"` // The name of the External Endpoint. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation. Priority pulumi.IntOutput `pulumi:"priority"` // The ID of the Traffic Manager Profile that this External Endpoint should be created within. Changing this forces a new resource to be created. ProfileId pulumi.StringOutput `pulumi:"profileId"` // One or more `subnet` blocks as defined below. Changing this forces a new resource to be created. Subnets TrafficManagerExternalEndpointSubnetArrayOutput `pulumi:"subnets"` // The FQDN DNS name of the target. Target pulumi.StringOutput `pulumi:"target"` // Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`. Weight pulumi.IntPtrOutput `pulumi:"weight"` } // NewTrafficManagerExternalEndpoint registers a new resource with the given unique name, arguments, and options. func NewTrafficManagerExternalEndpoint(ctx *pulumi.Context, name string, args *TrafficManagerExternalEndpointArgs, opts ...pulumi.ResourceOption) (*TrafficManagerExternalEndpoint, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ProfileId == nil { return nil, errors.New("invalid value for required argument 'ProfileId'") } if args.Target == nil { return nil, errors.New("invalid value for required argument 'Target'") } opts = internal.PkgResourceDefaultOpts(opts) var resource TrafficManagerExternalEndpoint err := ctx.RegisterResource("azure:network/trafficManagerExternalEndpoint:TrafficManagerExternalEndpoint", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetTrafficManagerExternalEndpoint gets an existing TrafficManagerExternalEndpoint resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetTrafficManagerExternalEndpoint(ctx *pulumi.Context, name string, id pulumi.IDInput, state *TrafficManagerExternalEndpointState, opts ...pulumi.ResourceOption) (*TrafficManagerExternalEndpoint, error) { var resource TrafficManagerExternalEndpoint err := ctx.ReadResource("azure:network/trafficManagerExternalEndpoint:TrafficManagerExternalEndpoint", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering TrafficManagerExternalEndpoint resources. type trafficManagerExternalEndpointState struct { // If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method. Defaults to `false`. AlwaysServeEnabled *bool `pulumi:"alwaysServeEnabled"` // One or more `customHeader` blocks as defined below. CustomHeaders []TrafficManagerExternalEndpointCustomHeader `pulumi:"customHeaders"` // Is the endpoint enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // Specifies the Azure location of the Endpoint, this must be specified for Profiles using the `Performance` routing method. EndpointLocation *string `pulumi:"endpointLocation"` // A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault). GeoMappings []string `pulumi:"geoMappings"` // The name of the External Endpoint. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation. Priority *int `pulumi:"priority"` // The ID of the Traffic Manager Profile that this External Endpoint should be created within. Changing this forces a new resource to be created. ProfileId *string `pulumi:"profileId"` // One or more `subnet` blocks as defined below. Changing this forces a new resource to be created. Subnets []TrafficManagerExternalEndpointSubnet `pulumi:"subnets"` // The FQDN DNS name of the target. Target *string `pulumi:"target"` // Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`. Weight *int `pulumi:"weight"` } type TrafficManagerExternalEndpointState struct { // If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method. Defaults to `false`. AlwaysServeEnabled pulumi.BoolPtrInput // One or more `customHeader` blocks as defined below. CustomHeaders TrafficManagerExternalEndpointCustomHeaderArrayInput // Is the endpoint enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // Specifies the Azure location of the Endpoint, this must be specified for Profiles using the `Performance` routing method. EndpointLocation pulumi.StringPtrInput // A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault). GeoMappings pulumi.StringArrayInput // The name of the External Endpoint. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation. Priority pulumi.IntPtrInput // The ID of the Traffic Manager Profile that this External Endpoint should be created within. Changing this forces a new resource to be created. ProfileId pulumi.StringPtrInput // One or more `subnet` blocks as defined below. Changing this forces a new resource to be created. Subnets TrafficManagerExternalEndpointSubnetArrayInput // The FQDN DNS name of the target. Target pulumi.StringPtrInput // Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`. Weight pulumi.IntPtrInput } func (TrafficManagerExternalEndpointState) ElementType() reflect.Type { return reflect.TypeOf((*trafficManagerExternalEndpointState)(nil)).Elem() } type trafficManagerExternalEndpointArgs struct { // If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method. Defaults to `false`. AlwaysServeEnabled *bool `pulumi:"alwaysServeEnabled"` // One or more `customHeader` blocks as defined below. CustomHeaders []TrafficManagerExternalEndpointCustomHeader `pulumi:"customHeaders"` // Is the endpoint enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // Specifies the Azure location of the Endpoint, this must be specified for Profiles using the `Performance` routing method. EndpointLocation *string `pulumi:"endpointLocation"` // A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault). GeoMappings []string `pulumi:"geoMappings"` // The name of the External Endpoint. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation. Priority *int `pulumi:"priority"` // The ID of the Traffic Manager Profile that this External Endpoint should be created within. Changing this forces a new resource to be created. ProfileId string `pulumi:"profileId"` // One or more `subnet` blocks as defined below. Changing this forces a new resource to be created. Subnets []TrafficManagerExternalEndpointSubnet `pulumi:"subnets"` // The FQDN DNS name of the target. Target string `pulumi:"target"` // Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`. Weight *int `pulumi:"weight"` } // The set of arguments for constructing a TrafficManagerExternalEndpoint resource. type TrafficManagerExternalEndpointArgs struct { // If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method. Defaults to `false`. AlwaysServeEnabled pulumi.BoolPtrInput // One or more `customHeader` blocks as defined below. CustomHeaders TrafficManagerExternalEndpointCustomHeaderArrayInput // Is the endpoint enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // Specifies the Azure location of the Endpoint, this must be specified for Profiles using the `Performance` routing method. EndpointLocation pulumi.StringPtrInput // A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault). GeoMappings pulumi.StringArrayInput // The name of the External Endpoint. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation. Priority pulumi.IntPtrInput // The ID of the Traffic Manager Profile that this External Endpoint should be created within. Changing this forces a new resource to be created. ProfileId pulumi.StringInput // One or more `subnet` blocks as defined below. Changing this forces a new resource to be created. Subnets TrafficManagerExternalEndpointSubnetArrayInput // The FQDN DNS name of the target. Target pulumi.StringInput // Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`. Weight pulumi.IntPtrInput } func (TrafficManagerExternalEndpointArgs) ElementType() reflect.Type { return reflect.TypeOf((*trafficManagerExternalEndpointArgs)(nil)).Elem() } type TrafficManagerExternalEndpointInput interface { pulumi.Input ToTrafficManagerExternalEndpointOutput() TrafficManagerExternalEndpointOutput ToTrafficManagerExternalEndpointOutputWithContext(ctx context.Context) TrafficManagerExternalEndpointOutput } func (*TrafficManagerExternalEndpoint) ElementType() reflect.Type { return reflect.TypeOf((**TrafficManagerExternalEndpoint)(nil)).Elem() } func (i *TrafficManagerExternalEndpoint) ToTrafficManagerExternalEndpointOutput() TrafficManagerExternalEndpointOutput { return i.ToTrafficManagerExternalEndpointOutputWithContext(context.Background()) } func (i *TrafficManagerExternalEndpoint) ToTrafficManagerExternalEndpointOutputWithContext(ctx context.Context) TrafficManagerExternalEndpointOutput { return pulumi.ToOutputWithContext(ctx, i).(TrafficManagerExternalEndpointOutput) } // TrafficManagerExternalEndpointArrayInput is an input type that accepts TrafficManagerExternalEndpointArray and TrafficManagerExternalEndpointArrayOutput values. // You can construct a concrete instance of `TrafficManagerExternalEndpointArrayInput` via: // // TrafficManagerExternalEndpointArray{ TrafficManagerExternalEndpointArgs{...} } type TrafficManagerExternalEndpointArrayInput interface { pulumi.Input ToTrafficManagerExternalEndpointArrayOutput() TrafficManagerExternalEndpointArrayOutput ToTrafficManagerExternalEndpointArrayOutputWithContext(context.Context) TrafficManagerExternalEndpointArrayOutput } type TrafficManagerExternalEndpointArray []TrafficManagerExternalEndpointInput func (TrafficManagerExternalEndpointArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*TrafficManagerExternalEndpoint)(nil)).Elem() } func (i TrafficManagerExternalEndpointArray) ToTrafficManagerExternalEndpointArrayOutput() TrafficManagerExternalEndpointArrayOutput { return i.ToTrafficManagerExternalEndpointArrayOutputWithContext(context.Background()) } func (i TrafficManagerExternalEndpointArray) ToTrafficManagerExternalEndpointArrayOutputWithContext(ctx context.Context) TrafficManagerExternalEndpointArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(TrafficManagerExternalEndpointArrayOutput) } // TrafficManagerExternalEndpointMapInput is an input type that accepts TrafficManagerExternalEndpointMap and TrafficManagerExternalEndpointMapOutput values. // You can construct a concrete instance of `TrafficManagerExternalEndpointMapInput` via: // // TrafficManagerExternalEndpointMap{ "key": TrafficManagerExternalEndpointArgs{...} } type TrafficManagerExternalEndpointMapInput interface { pulumi.Input ToTrafficManagerExternalEndpointMapOutput() TrafficManagerExternalEndpointMapOutput ToTrafficManagerExternalEndpointMapOutputWithContext(context.Context) TrafficManagerExternalEndpointMapOutput } type TrafficManagerExternalEndpointMap map[string]TrafficManagerExternalEndpointInput func (TrafficManagerExternalEndpointMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*TrafficManagerExternalEndpoint)(nil)).Elem() } func (i TrafficManagerExternalEndpointMap) ToTrafficManagerExternalEndpointMapOutput() TrafficManagerExternalEndpointMapOutput { return i.ToTrafficManagerExternalEndpointMapOutputWithContext(context.Background()) } func (i TrafficManagerExternalEndpointMap) ToTrafficManagerExternalEndpointMapOutputWithContext(ctx context.Context) TrafficManagerExternalEndpointMapOutput { return pulumi.ToOutputWithContext(ctx, i).(TrafficManagerExternalEndpointMapOutput) } type TrafficManagerExternalEndpointOutput struct{ *pulumi.OutputState } func (TrafficManagerExternalEndpointOutput) ElementType() reflect.Type { return reflect.TypeOf((**TrafficManagerExternalEndpoint)(nil)).Elem() } func (o TrafficManagerExternalEndpointOutput) ToTrafficManagerExternalEndpointOutput() TrafficManagerExternalEndpointOutput { return o } func (o TrafficManagerExternalEndpointOutput) ToTrafficManagerExternalEndpointOutputWithContext(ctx context.Context) TrafficManagerExternalEndpointOutput { return o } // If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method. Defaults to `false`. func (o TrafficManagerExternalEndpointOutput) AlwaysServeEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *TrafficManagerExternalEndpoint) pulumi.BoolPtrOutput { return v.AlwaysServeEnabled }).(pulumi.BoolPtrOutput) } // One or more `customHeader` blocks as defined below. func (o TrafficManagerExternalEndpointOutput) CustomHeaders() TrafficManagerExternalEndpointCustomHeaderArrayOutput { return o.ApplyT(func(v *TrafficManagerExternalEndpoint) TrafficManagerExternalEndpointCustomHeaderArrayOutput { return v.CustomHeaders }).(TrafficManagerExternalEndpointCustomHeaderArrayOutput) } // Is the endpoint enabled? Defaults to `true`. func (o TrafficManagerExternalEndpointOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *TrafficManagerExternalEndpoint) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput) } // Specifies the Azure location of the Endpoint, this must be specified for Profiles using the `Performance` routing method. func (o TrafficManagerExternalEndpointOutput) EndpointLocation() pulumi.StringOutput { return o.ApplyT(func(v *TrafficManagerExternalEndpoint) pulumi.StringOutput { return v.EndpointLocation }).(pulumi.StringOutput) } // A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault). func (o TrafficManagerExternalEndpointOutput) GeoMappings() pulumi.StringArrayOutput { return o.ApplyT(func(v *TrafficManagerExternalEndpoint) pulumi.StringArrayOutput { return v.GeoMappings }).(pulumi.StringArrayOutput) } // The name of the External Endpoint. Changing this forces a new resource to be created. func (o TrafficManagerExternalEndpointOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *TrafficManagerExternalEndpoint) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation. func (o TrafficManagerExternalEndpointOutput) Priority() pulumi.IntOutput { return o.ApplyT(func(v *TrafficManagerExternalEndpoint) pulumi.IntOutput { return v.Priority }).(pulumi.IntOutput) } // The ID of the Traffic Manager Profile that this External Endpoint should be created within. Changing this forces a new resource to be created. func (o TrafficManagerExternalEndpointOutput) ProfileId() pulumi.StringOutput { return o.ApplyT(func(v *TrafficManagerExternalEndpoint) pulumi.StringOutput { return v.ProfileId }).(pulumi.StringOutput) } // One or more `subnet` blocks as defined below. Changing this forces a new resource to be created. func (o TrafficManagerExternalEndpointOutput) Subnets() TrafficManagerExternalEndpointSubnetArrayOutput { return o.ApplyT(func(v *TrafficManagerExternalEndpoint) TrafficManagerExternalEndpointSubnetArrayOutput { return v.Subnets }).(TrafficManagerExternalEndpointSubnetArrayOutput) } // The FQDN DNS name of the target. func (o TrafficManagerExternalEndpointOutput) Target() pulumi.StringOutput { return o.ApplyT(func(v *TrafficManagerExternalEndpoint) pulumi.StringOutput { return v.Target }).(pulumi.StringOutput) } // Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`. func (o TrafficManagerExternalEndpointOutput) Weight() pulumi.IntPtrOutput { return o.ApplyT(func(v *TrafficManagerExternalEndpoint) pulumi.IntPtrOutput { return v.Weight }).(pulumi.IntPtrOutput) } type TrafficManagerExternalEndpointArrayOutput struct{ *pulumi.OutputState } func (TrafficManagerExternalEndpointArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*TrafficManagerExternalEndpoint)(nil)).Elem() } func (o TrafficManagerExternalEndpointArrayOutput) ToTrafficManagerExternalEndpointArrayOutput() TrafficManagerExternalEndpointArrayOutput { return o } func (o TrafficManagerExternalEndpointArrayOutput) ToTrafficManagerExternalEndpointArrayOutputWithContext(ctx context.Context) TrafficManagerExternalEndpointArrayOutput { return o } func (o TrafficManagerExternalEndpointArrayOutput) Index(i pulumi.IntInput) TrafficManagerExternalEndpointOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TrafficManagerExternalEndpoint { return vs[0].([]*TrafficManagerExternalEndpoint)[vs[1].(int)] }).(TrafficManagerExternalEndpointOutput) } type TrafficManagerExternalEndpointMapOutput struct{ *pulumi.OutputState } func (TrafficManagerExternalEndpointMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*TrafficManagerExternalEndpoint)(nil)).Elem() } func (o TrafficManagerExternalEndpointMapOutput) ToTrafficManagerExternalEndpointMapOutput() TrafficManagerExternalEndpointMapOutput { return o } func (o TrafficManagerExternalEndpointMapOutput) ToTrafficManagerExternalEndpointMapOutputWithContext(ctx context.Context) TrafficManagerExternalEndpointMapOutput { return o } func (o TrafficManagerExternalEndpointMapOutput) MapIndex(k pulumi.StringInput) TrafficManagerExternalEndpointOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TrafficManagerExternalEndpoint { return vs[0].(map[string]*TrafficManagerExternalEndpoint)[vs[1].(string)] }).(TrafficManagerExternalEndpointOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*TrafficManagerExternalEndpointInput)(nil)).Elem(), &TrafficManagerExternalEndpoint{}) pulumi.RegisterInputType(reflect.TypeOf((*TrafficManagerExternalEndpointArrayInput)(nil)).Elem(), TrafficManagerExternalEndpointArray{}) pulumi.RegisterInputType(reflect.TypeOf((*TrafficManagerExternalEndpointMapInput)(nil)).Elem(), TrafficManagerExternalEndpointMap{}) pulumi.RegisterOutputType(TrafficManagerExternalEndpointOutput{}) pulumi.RegisterOutputType(TrafficManagerExternalEndpointArrayOutput{}) pulumi.RegisterOutputType(TrafficManagerExternalEndpointMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getRouteFilter.go
sdk/go/azure/network/getRouteFilter.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Route Filter. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.LookupRouteFilter(ctx, &network.LookupRouteFilterArgs{ // Name: "existing", // ResourceGroupName: "existing", // }, nil) // if err != nil { // return err // } // ctx.Export("id", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func LookupRouteFilter(ctx *pulumi.Context, args *LookupRouteFilterArgs, opts ...pulumi.InvokeOption) (*LookupRouteFilterResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupRouteFilterResult err := ctx.Invoke("azure:network/getRouteFilter:getRouteFilter", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getRouteFilter. type LookupRouteFilterArgs struct { // The Name of this Route Filter. Name string `pulumi:"name"` // The name of the Resource Group where the Route Filter exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getRouteFilter. type LookupRouteFilterResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The Azure Region where the Route Filter exists. Location string `pulumi:"location"` // The Name of Route Filter Rule Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // A `rule` block as defined below. Rules []GetRouteFilterRule `pulumi:"rules"` // A mapping of tags assigned to the Route Filter. Tags map[string]string `pulumi:"tags"` } func LookupRouteFilterOutput(ctx *pulumi.Context, args LookupRouteFilterOutputArgs, opts ...pulumi.InvokeOption) LookupRouteFilterResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupRouteFilterResultOutput, error) { args := v.(LookupRouteFilterArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getRouteFilter:getRouteFilter", args, LookupRouteFilterResultOutput{}, options).(LookupRouteFilterResultOutput), nil }).(LookupRouteFilterResultOutput) } // A collection of arguments for invoking getRouteFilter. type LookupRouteFilterOutputArgs struct { // The Name of this Route Filter. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group where the Route Filter exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupRouteFilterOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupRouteFilterArgs)(nil)).Elem() } // A collection of values returned by getRouteFilter. type LookupRouteFilterResultOutput struct{ *pulumi.OutputState } func (LookupRouteFilterResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupRouteFilterResult)(nil)).Elem() } func (o LookupRouteFilterResultOutput) ToLookupRouteFilterResultOutput() LookupRouteFilterResultOutput { return o } func (o LookupRouteFilterResultOutput) ToLookupRouteFilterResultOutputWithContext(ctx context.Context) LookupRouteFilterResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o LookupRouteFilterResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupRouteFilterResult) string { return v.Id }).(pulumi.StringOutput) } // The Azure Region where the Route Filter exists. func (o LookupRouteFilterResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupRouteFilterResult) string { return v.Location }).(pulumi.StringOutput) } // The Name of Route Filter Rule func (o LookupRouteFilterResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupRouteFilterResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupRouteFilterResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupRouteFilterResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A `rule` block as defined below. func (o LookupRouteFilterResultOutput) Rules() GetRouteFilterRuleArrayOutput { return o.ApplyT(func(v LookupRouteFilterResult) []GetRouteFilterRule { return v.Rules }).(GetRouteFilterRuleArrayOutput) } // A mapping of tags assigned to the Route Filter. func (o LookupRouteFilterResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupRouteFilterResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(LookupRouteFilterResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getNetworkManagerConnectivityConfiguration.go
sdk/go/azure/network/getNetworkManagerConnectivityConfiguration.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Network Manager Connectivity Configuration. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.LookupNetworkManagerConnectivityConfiguration(ctx, &network.LookupNetworkManagerConnectivityConfigurationArgs{ // Name: "existing", // NetworkManagerId: "TODO", // }, nil) // if err != nil { // return err // } // ctx.Export("id", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func LookupNetworkManagerConnectivityConfiguration(ctx *pulumi.Context, args *LookupNetworkManagerConnectivityConfigurationArgs, opts ...pulumi.InvokeOption) (*LookupNetworkManagerConnectivityConfigurationResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupNetworkManagerConnectivityConfigurationResult err := ctx.Invoke("azure:network/getNetworkManagerConnectivityConfiguration:getNetworkManagerConnectivityConfiguration", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getNetworkManagerConnectivityConfiguration. type LookupNetworkManagerConnectivityConfigurationArgs struct { // The name of this Network Manager Connectivity Configuration. Name string `pulumi:"name"` // The ID of the Network Manager. NetworkManagerId string `pulumi:"networkManagerId"` } // A collection of values returned by getNetworkManagerConnectivityConfiguration. type LookupNetworkManagerConnectivityConfigurationResult struct { // An `appliesToGroup` block as defined below. AppliesToGroups []GetNetworkManagerConnectivityConfigurationAppliesToGroup `pulumi:"appliesToGroups"` // The connectivity topology type. ConnectivityTopology string `pulumi:"connectivityTopology"` // Whether to current existing Virtual Network Peering in the Connectivity Configuration affected scope. DeleteExistingPeeringEnabled bool `pulumi:"deleteExistingPeeringEnabled"` // The description of the Connectivity Configuration. Description string `pulumi:"description"` // Whether global mesh is supported. GlobalMeshEnabled bool `pulumi:"globalMeshEnabled"` // A `hub` block as defined below. Hubs []GetNetworkManagerConnectivityConfigurationHub `pulumi:"hubs"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name string `pulumi:"name"` NetworkManagerId string `pulumi:"networkManagerId"` } func LookupNetworkManagerConnectivityConfigurationOutput(ctx *pulumi.Context, args LookupNetworkManagerConnectivityConfigurationOutputArgs, opts ...pulumi.InvokeOption) LookupNetworkManagerConnectivityConfigurationResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupNetworkManagerConnectivityConfigurationResultOutput, error) { args := v.(LookupNetworkManagerConnectivityConfigurationArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getNetworkManagerConnectivityConfiguration:getNetworkManagerConnectivityConfiguration", args, LookupNetworkManagerConnectivityConfigurationResultOutput{}, options).(LookupNetworkManagerConnectivityConfigurationResultOutput), nil }).(LookupNetworkManagerConnectivityConfigurationResultOutput) } // A collection of arguments for invoking getNetworkManagerConnectivityConfiguration. type LookupNetworkManagerConnectivityConfigurationOutputArgs struct { // The name of this Network Manager Connectivity Configuration. Name pulumi.StringInput `pulumi:"name"` // The ID of the Network Manager. NetworkManagerId pulumi.StringInput `pulumi:"networkManagerId"` } func (LookupNetworkManagerConnectivityConfigurationOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupNetworkManagerConnectivityConfigurationArgs)(nil)).Elem() } // A collection of values returned by getNetworkManagerConnectivityConfiguration. type LookupNetworkManagerConnectivityConfigurationResultOutput struct{ *pulumi.OutputState } func (LookupNetworkManagerConnectivityConfigurationResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupNetworkManagerConnectivityConfigurationResult)(nil)).Elem() } func (o LookupNetworkManagerConnectivityConfigurationResultOutput) ToLookupNetworkManagerConnectivityConfigurationResultOutput() LookupNetworkManagerConnectivityConfigurationResultOutput { return o } func (o LookupNetworkManagerConnectivityConfigurationResultOutput) ToLookupNetworkManagerConnectivityConfigurationResultOutputWithContext(ctx context.Context) LookupNetworkManagerConnectivityConfigurationResultOutput { return o } // An `appliesToGroup` block as defined below. func (o LookupNetworkManagerConnectivityConfigurationResultOutput) AppliesToGroups() GetNetworkManagerConnectivityConfigurationAppliesToGroupArrayOutput { return o.ApplyT(func(v LookupNetworkManagerConnectivityConfigurationResult) []GetNetworkManagerConnectivityConfigurationAppliesToGroup { return v.AppliesToGroups }).(GetNetworkManagerConnectivityConfigurationAppliesToGroupArrayOutput) } // The connectivity topology type. func (o LookupNetworkManagerConnectivityConfigurationResultOutput) ConnectivityTopology() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkManagerConnectivityConfigurationResult) string { return v.ConnectivityTopology }).(pulumi.StringOutput) } // Whether to current existing Virtual Network Peering in the Connectivity Configuration affected scope. func (o LookupNetworkManagerConnectivityConfigurationResultOutput) DeleteExistingPeeringEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupNetworkManagerConnectivityConfigurationResult) bool { return v.DeleteExistingPeeringEnabled }).(pulumi.BoolOutput) } // The description of the Connectivity Configuration. func (o LookupNetworkManagerConnectivityConfigurationResultOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkManagerConnectivityConfigurationResult) string { return v.Description }).(pulumi.StringOutput) } // Whether global mesh is supported. func (o LookupNetworkManagerConnectivityConfigurationResultOutput) GlobalMeshEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupNetworkManagerConnectivityConfigurationResult) bool { return v.GlobalMeshEnabled }).(pulumi.BoolOutput) } // A `hub` block as defined below. func (o LookupNetworkManagerConnectivityConfigurationResultOutput) Hubs() GetNetworkManagerConnectivityConfigurationHubArrayOutput { return o.ApplyT(func(v LookupNetworkManagerConnectivityConfigurationResult) []GetNetworkManagerConnectivityConfigurationHub { return v.Hubs }).(GetNetworkManagerConnectivityConfigurationHubArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupNetworkManagerConnectivityConfigurationResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkManagerConnectivityConfigurationResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupNetworkManagerConnectivityConfigurationResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkManagerConnectivityConfigurationResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupNetworkManagerConnectivityConfigurationResultOutput) NetworkManagerId() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkManagerConnectivityConfigurationResult) string { return v.NetworkManagerId }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupNetworkManagerConnectivityConfigurationResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/routeMap.go
sdk/go/azure/network/routeMap.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Route Map. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualWan, err := network.NewVirtualWan(ctx, "example", &network.VirtualWanArgs{ // Name: pulumi.String("example-vwan"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // exampleVirtualHub, err := network.NewVirtualHub(ctx, "example", &network.VirtualHubArgs{ // Name: pulumi.String("example-vhub"), // ResourceGroupName: example.Name, // Location: example.Location, // VirtualWanId: exampleVirtualWan.ID(), // AddressPrefix: pulumi.String("10.0.1.0/24"), // }) // if err != nil { // return err // } // _, err = network.NewRouteMapResource(ctx, "example", &network.RouteMapResourceArgs{ // Name: pulumi.String("example-rm"), // VirtualHubId: exampleVirtualHub.ID(), // Rules: network.RouteMapRuleArray{ // &network.RouteMapRuleArgs{ // Name: pulumi.String("rule1"), // NextStepIfMatched: pulumi.String("Continue"), // Actions: network.RouteMapRuleActionArray{ // &network.RouteMapRuleActionArgs{ // Type: pulumi.String("Add"), // Parameters: network.RouteMapRuleActionParameterArray{ // &network.RouteMapRuleActionParameterArgs{ // AsPaths: pulumi.StringArray{ // pulumi.String("22334"), // }, // }, // }, // }, // }, // MatchCriterions: network.RouteMapRuleMatchCriterionArray{ // &network.RouteMapRuleMatchCriterionArgs{ // MatchCondition: pulumi.String("Contains"), // RoutePrefixes: pulumi.StringArray{ // pulumi.String("10.0.0.0/8"), // }, // }, // }, // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Route Maps can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/routeMap:RouteMap example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Network/virtualHubs/virtualHub1/routeMaps/routeMap1 // ``` type RouteMapResource struct { pulumi.CustomResourceState // The name which should be used for this Route Map. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // A `rule` block as defined below. Rules RouteMapRuleArrayOutput `pulumi:"rules"` // The resource ID of the Virtual Hub. Changing this forces a new resource to be created. VirtualHubId pulumi.StringOutput `pulumi:"virtualHubId"` } // NewRouteMapResource registers a new resource with the given unique name, arguments, and options. func NewRouteMapResource(ctx *pulumi.Context, name string, args *RouteMapResourceArgs, opts ...pulumi.ResourceOption) (*RouteMapResource, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.VirtualHubId == nil { return nil, errors.New("invalid value for required argument 'VirtualHubId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource RouteMapResource err := ctx.RegisterResource("azure:network/routeMap:RouteMap", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetRouteMapResource gets an existing RouteMapResource resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetRouteMapResource(ctx *pulumi.Context, name string, id pulumi.IDInput, state *RouteMapResourceState, opts ...pulumi.ResourceOption) (*RouteMapResource, error) { var resource RouteMapResource err := ctx.ReadResource("azure:network/routeMap:RouteMap", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering RouteMapResource resources. type routeMapResourceState struct { // The name which should be used for this Route Map. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A `rule` block as defined below. Rules []RouteMapRule `pulumi:"rules"` // The resource ID of the Virtual Hub. Changing this forces a new resource to be created. VirtualHubId *string `pulumi:"virtualHubId"` } type RouteMapResourceState struct { // The name which should be used for this Route Map. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A `rule` block as defined below. Rules RouteMapRuleArrayInput // The resource ID of the Virtual Hub. Changing this forces a new resource to be created. VirtualHubId pulumi.StringPtrInput } func (RouteMapResourceState) ElementType() reflect.Type { return reflect.TypeOf((*routeMapResourceState)(nil)).Elem() } type routeMapResourceArgs struct { // The name which should be used for this Route Map. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A `rule` block as defined below. Rules []RouteMapRule `pulumi:"rules"` // The resource ID of the Virtual Hub. Changing this forces a new resource to be created. VirtualHubId string `pulumi:"virtualHubId"` } // The set of arguments for constructing a RouteMapResource resource. type RouteMapResourceArgs struct { // The name which should be used for this Route Map. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A `rule` block as defined below. Rules RouteMapRuleArrayInput // The resource ID of the Virtual Hub. Changing this forces a new resource to be created. VirtualHubId pulumi.StringInput } func (RouteMapResourceArgs) ElementType() reflect.Type { return reflect.TypeOf((*routeMapResourceArgs)(nil)).Elem() } type RouteMapResourceInput interface { pulumi.Input ToRouteMapResourceOutput() RouteMapResourceOutput ToRouteMapResourceOutputWithContext(ctx context.Context) RouteMapResourceOutput } func (*RouteMapResource) ElementType() reflect.Type { return reflect.TypeOf((**RouteMapResource)(nil)).Elem() } func (i *RouteMapResource) ToRouteMapResourceOutput() RouteMapResourceOutput { return i.ToRouteMapResourceOutputWithContext(context.Background()) } func (i *RouteMapResource) ToRouteMapResourceOutputWithContext(ctx context.Context) RouteMapResourceOutput { return pulumi.ToOutputWithContext(ctx, i).(RouteMapResourceOutput) } // RouteMapResourceArrayInput is an input type that accepts RouteMapResourceArray and RouteMapResourceArrayOutput values. // You can construct a concrete instance of `RouteMapResourceArrayInput` via: // // RouteMapResourceArray{ RouteMapResourceArgs{...} } type RouteMapResourceArrayInput interface { pulumi.Input ToRouteMapResourceArrayOutput() RouteMapResourceArrayOutput ToRouteMapResourceArrayOutputWithContext(context.Context) RouteMapResourceArrayOutput } type RouteMapResourceArray []RouteMapResourceInput func (RouteMapResourceArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*RouteMapResource)(nil)).Elem() } func (i RouteMapResourceArray) ToRouteMapResourceArrayOutput() RouteMapResourceArrayOutput { return i.ToRouteMapResourceArrayOutputWithContext(context.Background()) } func (i RouteMapResourceArray) ToRouteMapResourceArrayOutputWithContext(ctx context.Context) RouteMapResourceArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(RouteMapResourceArrayOutput) } // RouteMapResourceMapInput is an input type that accepts RouteMapResourceMap and RouteMapResourceMapOutput values. // You can construct a concrete instance of `RouteMapResourceMapInput` via: // // RouteMapResourceMap{ "key": RouteMapResourceArgs{...} } type RouteMapResourceMapInput interface { pulumi.Input ToRouteMapResourceMapOutput() RouteMapResourceMapOutput ToRouteMapResourceMapOutputWithContext(context.Context) RouteMapResourceMapOutput } type RouteMapResourceMap map[string]RouteMapResourceInput func (RouteMapResourceMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*RouteMapResource)(nil)).Elem() } func (i RouteMapResourceMap) ToRouteMapResourceMapOutput() RouteMapResourceMapOutput { return i.ToRouteMapResourceMapOutputWithContext(context.Background()) } func (i RouteMapResourceMap) ToRouteMapResourceMapOutputWithContext(ctx context.Context) RouteMapResourceMapOutput { return pulumi.ToOutputWithContext(ctx, i).(RouteMapResourceMapOutput) } type RouteMapResourceOutput struct{ *pulumi.OutputState } func (RouteMapResourceOutput) ElementType() reflect.Type { return reflect.TypeOf((**RouteMapResource)(nil)).Elem() } func (o RouteMapResourceOutput) ToRouteMapResourceOutput() RouteMapResourceOutput { return o } func (o RouteMapResourceOutput) ToRouteMapResourceOutputWithContext(ctx context.Context) RouteMapResourceOutput { return o } // The name which should be used for this Route Map. Changing this forces a new resource to be created. func (o RouteMapResourceOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *RouteMapResource) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A `rule` block as defined below. func (o RouteMapResourceOutput) Rules() RouteMapRuleArrayOutput { return o.ApplyT(func(v *RouteMapResource) RouteMapRuleArrayOutput { return v.Rules }).(RouteMapRuleArrayOutput) } // The resource ID of the Virtual Hub. Changing this forces a new resource to be created. func (o RouteMapResourceOutput) VirtualHubId() pulumi.StringOutput { return o.ApplyT(func(v *RouteMapResource) pulumi.StringOutput { return v.VirtualHubId }).(pulumi.StringOutput) } type RouteMapResourceArrayOutput struct{ *pulumi.OutputState } func (RouteMapResourceArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*RouteMapResource)(nil)).Elem() } func (o RouteMapResourceArrayOutput) ToRouteMapResourceArrayOutput() RouteMapResourceArrayOutput { return o } func (o RouteMapResourceArrayOutput) ToRouteMapResourceArrayOutputWithContext(ctx context.Context) RouteMapResourceArrayOutput { return o } func (o RouteMapResourceArrayOutput) Index(i pulumi.IntInput) RouteMapResourceOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *RouteMapResource { return vs[0].([]*RouteMapResource)[vs[1].(int)] }).(RouteMapResourceOutput) } type RouteMapResourceMapOutput struct{ *pulumi.OutputState } func (RouteMapResourceMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*RouteMapResource)(nil)).Elem() } func (o RouteMapResourceMapOutput) ToRouteMapResourceMapOutput() RouteMapResourceMapOutput { return o } func (o RouteMapResourceMapOutput) ToRouteMapResourceMapOutputWithContext(ctx context.Context) RouteMapResourceMapOutput { return o } func (o RouteMapResourceMapOutput) MapIndex(k pulumi.StringInput) RouteMapResourceOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *RouteMapResource { return vs[0].(map[string]*RouteMapResource)[vs[1].(string)] }).(RouteMapResourceOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*RouteMapResourceInput)(nil)).Elem(), &RouteMapResource{}) pulumi.RegisterInputType(reflect.TypeOf((*RouteMapResourceArrayInput)(nil)).Elem(), RouteMapResourceArray{}) pulumi.RegisterInputType(reflect.TypeOf((*RouteMapResourceMapInput)(nil)).Elem(), RouteMapResourceMap{}) pulumi.RegisterOutputType(RouteMapResourceOutput{}) pulumi.RegisterOutputType(RouteMapResourceArrayOutput{}) pulumi.RegisterOutputType(RouteMapResourceMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getIpGroup.go
sdk/go/azure/network/getIpGroup.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing IP Group. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.GetIpGroup(ctx, &network.GetIpGroupArgs{ // Name: "example1-ipgroup", // ResourceGroupName: "example-rg", // }, nil) // if err != nil { // return err // } // ctx.Export("cidrs", example.Cidrs) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func GetIpGroup(ctx *pulumi.Context, args *GetIpGroupArgs, opts ...pulumi.InvokeOption) (*GetIpGroupResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetIpGroupResult err := ctx.Invoke("azure:network/getIpGroup:getIpGroup", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getIpGroup. type GetIpGroupArgs struct { // Specifies the Name of the IP Group. Name string `pulumi:"name"` // Specifies the Name of the Resource Group within which the IP Group exists ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getIpGroup. type GetIpGroupResult struct { // A list of CIDRs or IP addresses. Cidrs []string `pulumi:"cidrs"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The supported Azure location where the resource exists. Location string `pulumi:"location"` Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags assigned to the resource. Tags map[string]string `pulumi:"tags"` } func GetIpGroupOutput(ctx *pulumi.Context, args GetIpGroupOutputArgs, opts ...pulumi.InvokeOption) GetIpGroupResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetIpGroupResultOutput, error) { args := v.(GetIpGroupArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getIpGroup:getIpGroup", args, GetIpGroupResultOutput{}, options).(GetIpGroupResultOutput), nil }).(GetIpGroupResultOutput) } // A collection of arguments for invoking getIpGroup. type GetIpGroupOutputArgs struct { // Specifies the Name of the IP Group. Name pulumi.StringInput `pulumi:"name"` // Specifies the Name of the Resource Group within which the IP Group exists ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (GetIpGroupOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetIpGroupArgs)(nil)).Elem() } // A collection of values returned by getIpGroup. type GetIpGroupResultOutput struct{ *pulumi.OutputState } func (GetIpGroupResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetIpGroupResult)(nil)).Elem() } func (o GetIpGroupResultOutput) ToGetIpGroupResultOutput() GetIpGroupResultOutput { return o } func (o GetIpGroupResultOutput) ToGetIpGroupResultOutputWithContext(ctx context.Context) GetIpGroupResultOutput { return o } // A list of CIDRs or IP addresses. func (o GetIpGroupResultOutput) Cidrs() pulumi.StringArrayOutput { return o.ApplyT(func(v GetIpGroupResult) []string { return v.Cidrs }).(pulumi.StringArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o GetIpGroupResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetIpGroupResult) string { return v.Id }).(pulumi.StringOutput) } // The supported Azure location where the resource exists. func (o GetIpGroupResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v GetIpGroupResult) string { return v.Location }).(pulumi.StringOutput) } func (o GetIpGroupResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetIpGroupResult) string { return v.Name }).(pulumi.StringOutput) } func (o GetIpGroupResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v GetIpGroupResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags assigned to the resource. func (o GetIpGroupResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v GetIpGroupResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(GetIpGroupResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getFirewallPolicy.go
sdk/go/azure/network/getFirewallPolicy.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Firewall Policy. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.LookupFirewallPolicy(ctx, &network.LookupFirewallPolicyArgs{ // Name: "existing", // ResourceGroupName: "existing", // }, nil) // if err != nil { // return err // } // ctx.Export("id", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func LookupFirewallPolicy(ctx *pulumi.Context, args *LookupFirewallPolicyArgs, opts ...pulumi.InvokeOption) (*LookupFirewallPolicyResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupFirewallPolicyResult err := ctx.Invoke("azure:network/getFirewallPolicy:getFirewallPolicy", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getFirewallPolicy. type LookupFirewallPolicyArgs struct { // The name of this Firewall Policy. Name string `pulumi:"name"` // The name of the Resource Group where the Firewall Policy exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getFirewallPolicy. type LookupFirewallPolicyResult struct { BasePolicyId string `pulumi:"basePolicyId"` ChildPolicies []string `pulumi:"childPolicies"` Dns []GetFirewallPolicyDn `pulumi:"dns"` Firewalls []string `pulumi:"firewalls"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Location string `pulumi:"location"` Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` RuleCollectionGroups []string `pulumi:"ruleCollectionGroups"` // A mapping of tags assigned to the Firewall Policy. Tags map[string]string `pulumi:"tags"` ThreatIntelligenceAllowlists []GetFirewallPolicyThreatIntelligenceAllowlist `pulumi:"threatIntelligenceAllowlists"` ThreatIntelligenceMode string `pulumi:"threatIntelligenceMode"` } func LookupFirewallPolicyOutput(ctx *pulumi.Context, args LookupFirewallPolicyOutputArgs, opts ...pulumi.InvokeOption) LookupFirewallPolicyResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupFirewallPolicyResultOutput, error) { args := v.(LookupFirewallPolicyArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getFirewallPolicy:getFirewallPolicy", args, LookupFirewallPolicyResultOutput{}, options).(LookupFirewallPolicyResultOutput), nil }).(LookupFirewallPolicyResultOutput) } // A collection of arguments for invoking getFirewallPolicy. type LookupFirewallPolicyOutputArgs struct { // The name of this Firewall Policy. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group where the Firewall Policy exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupFirewallPolicyOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupFirewallPolicyArgs)(nil)).Elem() } // A collection of values returned by getFirewallPolicy. type LookupFirewallPolicyResultOutput struct{ *pulumi.OutputState } func (LookupFirewallPolicyResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupFirewallPolicyResult)(nil)).Elem() } func (o LookupFirewallPolicyResultOutput) ToLookupFirewallPolicyResultOutput() LookupFirewallPolicyResultOutput { return o } func (o LookupFirewallPolicyResultOutput) ToLookupFirewallPolicyResultOutputWithContext(ctx context.Context) LookupFirewallPolicyResultOutput { return o } func (o LookupFirewallPolicyResultOutput) BasePolicyId() pulumi.StringOutput { return o.ApplyT(func(v LookupFirewallPolicyResult) string { return v.BasePolicyId }).(pulumi.StringOutput) } func (o LookupFirewallPolicyResultOutput) ChildPolicies() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupFirewallPolicyResult) []string { return v.ChildPolicies }).(pulumi.StringArrayOutput) } func (o LookupFirewallPolicyResultOutput) Dns() GetFirewallPolicyDnArrayOutput { return o.ApplyT(func(v LookupFirewallPolicyResult) []GetFirewallPolicyDn { return v.Dns }).(GetFirewallPolicyDnArrayOutput) } func (o LookupFirewallPolicyResultOutput) Firewalls() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupFirewallPolicyResult) []string { return v.Firewalls }).(pulumi.StringArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupFirewallPolicyResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupFirewallPolicyResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupFirewallPolicyResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupFirewallPolicyResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupFirewallPolicyResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupFirewallPolicyResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupFirewallPolicyResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupFirewallPolicyResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } func (o LookupFirewallPolicyResultOutput) RuleCollectionGroups() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupFirewallPolicyResult) []string { return v.RuleCollectionGroups }).(pulumi.StringArrayOutput) } // A mapping of tags assigned to the Firewall Policy. func (o LookupFirewallPolicyResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupFirewallPolicyResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func (o LookupFirewallPolicyResultOutput) ThreatIntelligenceAllowlists() GetFirewallPolicyThreatIntelligenceAllowlistArrayOutput { return o.ApplyT(func(v LookupFirewallPolicyResult) []GetFirewallPolicyThreatIntelligenceAllowlist { return v.ThreatIntelligenceAllowlists }).(GetFirewallPolicyThreatIntelligenceAllowlistArrayOutput) } func (o LookupFirewallPolicyResultOutput) ThreatIntelligenceMode() pulumi.StringOutput { return o.ApplyT(func(v LookupFirewallPolicyResult) string { return v.ThreatIntelligenceMode }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupFirewallPolicyResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/virtualNetworkDnsServers.go
sdk/go/azure/network/virtualNetworkDnsServers.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-vnet"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // Location: example.Location, // ResourceGroupName: example.Name, // Subnets: network.VirtualNetworkSubnetArray{ // &network.VirtualNetworkSubnetArgs{ // Name: pulumi.String("subnet1"), // AddressPrefix: "10.0.1.0/24", // }, // }, // }) // if err != nil { // return err // } // _, err = network.NewVirtualNetworkDnsServers(ctx, "example", &network.VirtualNetworkDnsServersArgs{ // VirtualNetworkId: exampleVirtualNetwork.ID(), // DnsServers: pulumi.StringArray{ // pulumi.String("10.7.7.2"), // pulumi.String("10.7.7.7"), // pulumi.String("10.7.7.1"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Virtual Network DNS Servers can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/virtualNetworkDnsServers:VirtualNetworkDnsServers exampleNetwork /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/virtualNetworks/myvnet1/dnsServers/default // ``` type VirtualNetworkDnsServers struct { pulumi.CustomResourceState // List of IP addresses of DNS servers DnsServers pulumi.StringArrayOutput `pulumi:"dnsServers"` // The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created. VirtualNetworkId pulumi.StringOutput `pulumi:"virtualNetworkId"` } // NewVirtualNetworkDnsServers registers a new resource with the given unique name, arguments, and options. func NewVirtualNetworkDnsServers(ctx *pulumi.Context, name string, args *VirtualNetworkDnsServersArgs, opts ...pulumi.ResourceOption) (*VirtualNetworkDnsServers, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.VirtualNetworkId == nil { return nil, errors.New("invalid value for required argument 'VirtualNetworkId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource VirtualNetworkDnsServers err := ctx.RegisterResource("azure:network/virtualNetworkDnsServers:VirtualNetworkDnsServers", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVirtualNetworkDnsServers gets an existing VirtualNetworkDnsServers resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetVirtualNetworkDnsServers(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VirtualNetworkDnsServersState, opts ...pulumi.ResourceOption) (*VirtualNetworkDnsServers, error) { var resource VirtualNetworkDnsServers err := ctx.ReadResource("azure:network/virtualNetworkDnsServers:VirtualNetworkDnsServers", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VirtualNetworkDnsServers resources. type virtualNetworkDnsServersState struct { // List of IP addresses of DNS servers DnsServers []string `pulumi:"dnsServers"` // The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created. VirtualNetworkId *string `pulumi:"virtualNetworkId"` } type VirtualNetworkDnsServersState struct { // List of IP addresses of DNS servers DnsServers pulumi.StringArrayInput // The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created. VirtualNetworkId pulumi.StringPtrInput } func (VirtualNetworkDnsServersState) ElementType() reflect.Type { return reflect.TypeOf((*virtualNetworkDnsServersState)(nil)).Elem() } type virtualNetworkDnsServersArgs struct { // List of IP addresses of DNS servers DnsServers []string `pulumi:"dnsServers"` // The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created. VirtualNetworkId string `pulumi:"virtualNetworkId"` } // The set of arguments for constructing a VirtualNetworkDnsServers resource. type VirtualNetworkDnsServersArgs struct { // List of IP addresses of DNS servers DnsServers pulumi.StringArrayInput // The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created. VirtualNetworkId pulumi.StringInput } func (VirtualNetworkDnsServersArgs) ElementType() reflect.Type { return reflect.TypeOf((*virtualNetworkDnsServersArgs)(nil)).Elem() } type VirtualNetworkDnsServersInput interface { pulumi.Input ToVirtualNetworkDnsServersOutput() VirtualNetworkDnsServersOutput ToVirtualNetworkDnsServersOutputWithContext(ctx context.Context) VirtualNetworkDnsServersOutput } func (*VirtualNetworkDnsServers) ElementType() reflect.Type { return reflect.TypeOf((**VirtualNetworkDnsServers)(nil)).Elem() } func (i *VirtualNetworkDnsServers) ToVirtualNetworkDnsServersOutput() VirtualNetworkDnsServersOutput { return i.ToVirtualNetworkDnsServersOutputWithContext(context.Background()) } func (i *VirtualNetworkDnsServers) ToVirtualNetworkDnsServersOutputWithContext(ctx context.Context) VirtualNetworkDnsServersOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualNetworkDnsServersOutput) } // VirtualNetworkDnsServersArrayInput is an input type that accepts VirtualNetworkDnsServersArray and VirtualNetworkDnsServersArrayOutput values. // You can construct a concrete instance of `VirtualNetworkDnsServersArrayInput` via: // // VirtualNetworkDnsServersArray{ VirtualNetworkDnsServersArgs{...} } type VirtualNetworkDnsServersArrayInput interface { pulumi.Input ToVirtualNetworkDnsServersArrayOutput() VirtualNetworkDnsServersArrayOutput ToVirtualNetworkDnsServersArrayOutputWithContext(context.Context) VirtualNetworkDnsServersArrayOutput } type VirtualNetworkDnsServersArray []VirtualNetworkDnsServersInput func (VirtualNetworkDnsServersArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualNetworkDnsServers)(nil)).Elem() } func (i VirtualNetworkDnsServersArray) ToVirtualNetworkDnsServersArrayOutput() VirtualNetworkDnsServersArrayOutput { return i.ToVirtualNetworkDnsServersArrayOutputWithContext(context.Background()) } func (i VirtualNetworkDnsServersArray) ToVirtualNetworkDnsServersArrayOutputWithContext(ctx context.Context) VirtualNetworkDnsServersArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualNetworkDnsServersArrayOutput) } // VirtualNetworkDnsServersMapInput is an input type that accepts VirtualNetworkDnsServersMap and VirtualNetworkDnsServersMapOutput values. // You can construct a concrete instance of `VirtualNetworkDnsServersMapInput` via: // // VirtualNetworkDnsServersMap{ "key": VirtualNetworkDnsServersArgs{...} } type VirtualNetworkDnsServersMapInput interface { pulumi.Input ToVirtualNetworkDnsServersMapOutput() VirtualNetworkDnsServersMapOutput ToVirtualNetworkDnsServersMapOutputWithContext(context.Context) VirtualNetworkDnsServersMapOutput } type VirtualNetworkDnsServersMap map[string]VirtualNetworkDnsServersInput func (VirtualNetworkDnsServersMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualNetworkDnsServers)(nil)).Elem() } func (i VirtualNetworkDnsServersMap) ToVirtualNetworkDnsServersMapOutput() VirtualNetworkDnsServersMapOutput { return i.ToVirtualNetworkDnsServersMapOutputWithContext(context.Background()) } func (i VirtualNetworkDnsServersMap) ToVirtualNetworkDnsServersMapOutputWithContext(ctx context.Context) VirtualNetworkDnsServersMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualNetworkDnsServersMapOutput) } type VirtualNetworkDnsServersOutput struct{ *pulumi.OutputState } func (VirtualNetworkDnsServersOutput) ElementType() reflect.Type { return reflect.TypeOf((**VirtualNetworkDnsServers)(nil)).Elem() } func (o VirtualNetworkDnsServersOutput) ToVirtualNetworkDnsServersOutput() VirtualNetworkDnsServersOutput { return o } func (o VirtualNetworkDnsServersOutput) ToVirtualNetworkDnsServersOutputWithContext(ctx context.Context) VirtualNetworkDnsServersOutput { return o } // List of IP addresses of DNS servers func (o VirtualNetworkDnsServersOutput) DnsServers() pulumi.StringArrayOutput { return o.ApplyT(func(v *VirtualNetworkDnsServers) pulumi.StringArrayOutput { return v.DnsServers }).(pulumi.StringArrayOutput) } // The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created. func (o VirtualNetworkDnsServersOutput) VirtualNetworkId() pulumi.StringOutput { return o.ApplyT(func(v *VirtualNetworkDnsServers) pulumi.StringOutput { return v.VirtualNetworkId }).(pulumi.StringOutput) } type VirtualNetworkDnsServersArrayOutput struct{ *pulumi.OutputState } func (VirtualNetworkDnsServersArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualNetworkDnsServers)(nil)).Elem() } func (o VirtualNetworkDnsServersArrayOutput) ToVirtualNetworkDnsServersArrayOutput() VirtualNetworkDnsServersArrayOutput { return o } func (o VirtualNetworkDnsServersArrayOutput) ToVirtualNetworkDnsServersArrayOutputWithContext(ctx context.Context) VirtualNetworkDnsServersArrayOutput { return o } func (o VirtualNetworkDnsServersArrayOutput) Index(i pulumi.IntInput) VirtualNetworkDnsServersOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VirtualNetworkDnsServers { return vs[0].([]*VirtualNetworkDnsServers)[vs[1].(int)] }).(VirtualNetworkDnsServersOutput) } type VirtualNetworkDnsServersMapOutput struct{ *pulumi.OutputState } func (VirtualNetworkDnsServersMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualNetworkDnsServers)(nil)).Elem() } func (o VirtualNetworkDnsServersMapOutput) ToVirtualNetworkDnsServersMapOutput() VirtualNetworkDnsServersMapOutput { return o } func (o VirtualNetworkDnsServersMapOutput) ToVirtualNetworkDnsServersMapOutputWithContext(ctx context.Context) VirtualNetworkDnsServersMapOutput { return o } func (o VirtualNetworkDnsServersMapOutput) MapIndex(k pulumi.StringInput) VirtualNetworkDnsServersOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VirtualNetworkDnsServers { return vs[0].(map[string]*VirtualNetworkDnsServers)[vs[1].(string)] }).(VirtualNetworkDnsServersOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VirtualNetworkDnsServersInput)(nil)).Elem(), &VirtualNetworkDnsServers{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualNetworkDnsServersArrayInput)(nil)).Elem(), VirtualNetworkDnsServersArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualNetworkDnsServersMapInput)(nil)).Elem(), VirtualNetworkDnsServersMap{}) pulumi.RegisterOutputType(VirtualNetworkDnsServersOutput{}) pulumi.RegisterOutputType(VirtualNetworkDnsServersArrayOutput{}) pulumi.RegisterOutputType(VirtualNetworkDnsServersMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/networkManagerManagementGroupConnection.go
sdk/go/azure/network/networkManagerManagementGroupConnection.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Network Manager Management Group Connection which may cross tenants. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/management" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := management.NewGroup(ctx, "example", nil) // if err != nil { // return err // } // alt, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{ // SubscriptionId: pulumi.StringRef("00000000-0000-0000-0000-000000000000"), // }, nil) // if err != nil { // return err // } // _, err = management.NewGroupSubscriptionAssociation(ctx, "example", &management.GroupSubscriptionAssociationArgs{ // ManagementGroupId: example.ID(), // SubscriptionId: pulumi.String(alt.Id), // }) // if err != nil { // return err // } // current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // currentGetClientConfig, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // networkContributor, err := authorization.NewAssignment(ctx, "network_contributor", &authorization.AssignmentArgs{ // Scope: example.ID(), // RoleDefinitionName: pulumi.String("Network Contributor"), // PrincipalId: pulumi.String(currentGetClientConfig.ObjectId), // }) // if err != nil { // return err // } // exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleNetworkManager, err := network.NewNetworkManager(ctx, "example", &network.NetworkManagerArgs{ // Name: pulumi.String("example-networkmanager"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // Scope: &network.NetworkManagerScopeArgs{ // SubscriptionIds: pulumi.StringArray{ // pulumi.String(current.Id), // }, // }, // ScopeAccesses: pulumi.StringArray{ // pulumi.String("SecurityAdmin"), // }, // }) // if err != nil { // return err // } // _, err = network.NewNetworkManagerManagementGroupConnection(ctx, "example", &network.NetworkManagerManagementGroupConnectionArgs{ // Name: pulumi.String("example-nmmgc"), // ManagementGroupId: example.ID(), // NetworkManagerId: exampleNetworkManager.ID(), // Description: pulumi.String("example"), // }, pulumi.DependsOn([]pulumi.Resource{ // networkContributor, // })) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Management` - 2025-01-01 // // ## Import // // Network Manager Management Group Connection can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/networkManagerManagementGroupConnection:NetworkManagerManagementGroupConnection example /providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/networkManagerConnections/networkManagerConnection1 // ``` type NetworkManagerManagementGroupConnection struct { pulumi.CustomResourceState // The Connection state of the Network Manager Management Group Connection. ConnectionState pulumi.StringOutput `pulumi:"connectionState"` // A description of the Network Manager Management Group Connection. Description pulumi.StringPtrOutput `pulumi:"description"` // Specifies the ID of the target Management Group. Changing this forces a new resource to be created. ManagementGroupId pulumi.StringOutput `pulumi:"managementGroupId"` // Specifies the name which should be used for this Network Manager Management Group Connection. Changing this forces a new Network Manager Management Group Connection to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the ID of the Network Manager which the Management Group is connected to. Changing this forces a new resource to be created. NetworkManagerId pulumi.StringOutput `pulumi:"networkManagerId"` } // NewNetworkManagerManagementGroupConnection registers a new resource with the given unique name, arguments, and options. func NewNetworkManagerManagementGroupConnection(ctx *pulumi.Context, name string, args *NetworkManagerManagementGroupConnectionArgs, opts ...pulumi.ResourceOption) (*NetworkManagerManagementGroupConnection, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ManagementGroupId == nil { return nil, errors.New("invalid value for required argument 'ManagementGroupId'") } if args.NetworkManagerId == nil { return nil, errors.New("invalid value for required argument 'NetworkManagerId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkManagerManagementGroupConnection err := ctx.RegisterResource("azure:network/networkManagerManagementGroupConnection:NetworkManagerManagementGroupConnection", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkManagerManagementGroupConnection gets an existing NetworkManagerManagementGroupConnection resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetNetworkManagerManagementGroupConnection(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkManagerManagementGroupConnectionState, opts ...pulumi.ResourceOption) (*NetworkManagerManagementGroupConnection, error) { var resource NetworkManagerManagementGroupConnection err := ctx.ReadResource("azure:network/networkManagerManagementGroupConnection:NetworkManagerManagementGroupConnection", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkManagerManagementGroupConnection resources. type networkManagerManagementGroupConnectionState struct { // The Connection state of the Network Manager Management Group Connection. ConnectionState *string `pulumi:"connectionState"` // A description of the Network Manager Management Group Connection. Description *string `pulumi:"description"` // Specifies the ID of the target Management Group. Changing this forces a new resource to be created. ManagementGroupId *string `pulumi:"managementGroupId"` // Specifies the name which should be used for this Network Manager Management Group Connection. Changing this forces a new Network Manager Management Group Connection to be created. Name *string `pulumi:"name"` // Specifies the ID of the Network Manager which the Management Group is connected to. Changing this forces a new resource to be created. NetworkManagerId *string `pulumi:"networkManagerId"` } type NetworkManagerManagementGroupConnectionState struct { // The Connection state of the Network Manager Management Group Connection. ConnectionState pulumi.StringPtrInput // A description of the Network Manager Management Group Connection. Description pulumi.StringPtrInput // Specifies the ID of the target Management Group. Changing this forces a new resource to be created. ManagementGroupId pulumi.StringPtrInput // Specifies the name which should be used for this Network Manager Management Group Connection. Changing this forces a new Network Manager Management Group Connection to be created. Name pulumi.StringPtrInput // Specifies the ID of the Network Manager which the Management Group is connected to. Changing this forces a new resource to be created. NetworkManagerId pulumi.StringPtrInput } func (NetworkManagerManagementGroupConnectionState) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerManagementGroupConnectionState)(nil)).Elem() } type networkManagerManagementGroupConnectionArgs struct { // A description of the Network Manager Management Group Connection. Description *string `pulumi:"description"` // Specifies the ID of the target Management Group. Changing this forces a new resource to be created. ManagementGroupId string `pulumi:"managementGroupId"` // Specifies the name which should be used for this Network Manager Management Group Connection. Changing this forces a new Network Manager Management Group Connection to be created. Name *string `pulumi:"name"` // Specifies the ID of the Network Manager which the Management Group is connected to. Changing this forces a new resource to be created. NetworkManagerId string `pulumi:"networkManagerId"` } // The set of arguments for constructing a NetworkManagerManagementGroupConnection resource. type NetworkManagerManagementGroupConnectionArgs struct { // A description of the Network Manager Management Group Connection. Description pulumi.StringPtrInput // Specifies the ID of the target Management Group. Changing this forces a new resource to be created. ManagementGroupId pulumi.StringInput // Specifies the name which should be used for this Network Manager Management Group Connection. Changing this forces a new Network Manager Management Group Connection to be created. Name pulumi.StringPtrInput // Specifies the ID of the Network Manager which the Management Group is connected to. Changing this forces a new resource to be created. NetworkManagerId pulumi.StringInput } func (NetworkManagerManagementGroupConnectionArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerManagementGroupConnectionArgs)(nil)).Elem() } type NetworkManagerManagementGroupConnectionInput interface { pulumi.Input ToNetworkManagerManagementGroupConnectionOutput() NetworkManagerManagementGroupConnectionOutput ToNetworkManagerManagementGroupConnectionOutputWithContext(ctx context.Context) NetworkManagerManagementGroupConnectionOutput } func (*NetworkManagerManagementGroupConnection) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerManagementGroupConnection)(nil)).Elem() } func (i *NetworkManagerManagementGroupConnection) ToNetworkManagerManagementGroupConnectionOutput() NetworkManagerManagementGroupConnectionOutput { return i.ToNetworkManagerManagementGroupConnectionOutputWithContext(context.Background()) } func (i *NetworkManagerManagementGroupConnection) ToNetworkManagerManagementGroupConnectionOutputWithContext(ctx context.Context) NetworkManagerManagementGroupConnectionOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerManagementGroupConnectionOutput) } // NetworkManagerManagementGroupConnectionArrayInput is an input type that accepts NetworkManagerManagementGroupConnectionArray and NetworkManagerManagementGroupConnectionArrayOutput values. // You can construct a concrete instance of `NetworkManagerManagementGroupConnectionArrayInput` via: // // NetworkManagerManagementGroupConnectionArray{ NetworkManagerManagementGroupConnectionArgs{...} } type NetworkManagerManagementGroupConnectionArrayInput interface { pulumi.Input ToNetworkManagerManagementGroupConnectionArrayOutput() NetworkManagerManagementGroupConnectionArrayOutput ToNetworkManagerManagementGroupConnectionArrayOutputWithContext(context.Context) NetworkManagerManagementGroupConnectionArrayOutput } type NetworkManagerManagementGroupConnectionArray []NetworkManagerManagementGroupConnectionInput func (NetworkManagerManagementGroupConnectionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerManagementGroupConnection)(nil)).Elem() } func (i NetworkManagerManagementGroupConnectionArray) ToNetworkManagerManagementGroupConnectionArrayOutput() NetworkManagerManagementGroupConnectionArrayOutput { return i.ToNetworkManagerManagementGroupConnectionArrayOutputWithContext(context.Background()) } func (i NetworkManagerManagementGroupConnectionArray) ToNetworkManagerManagementGroupConnectionArrayOutputWithContext(ctx context.Context) NetworkManagerManagementGroupConnectionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerManagementGroupConnectionArrayOutput) } // NetworkManagerManagementGroupConnectionMapInput is an input type that accepts NetworkManagerManagementGroupConnectionMap and NetworkManagerManagementGroupConnectionMapOutput values. // You can construct a concrete instance of `NetworkManagerManagementGroupConnectionMapInput` via: // // NetworkManagerManagementGroupConnectionMap{ "key": NetworkManagerManagementGroupConnectionArgs{...} } type NetworkManagerManagementGroupConnectionMapInput interface { pulumi.Input ToNetworkManagerManagementGroupConnectionMapOutput() NetworkManagerManagementGroupConnectionMapOutput ToNetworkManagerManagementGroupConnectionMapOutputWithContext(context.Context) NetworkManagerManagementGroupConnectionMapOutput } type NetworkManagerManagementGroupConnectionMap map[string]NetworkManagerManagementGroupConnectionInput func (NetworkManagerManagementGroupConnectionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerManagementGroupConnection)(nil)).Elem() } func (i NetworkManagerManagementGroupConnectionMap) ToNetworkManagerManagementGroupConnectionMapOutput() NetworkManagerManagementGroupConnectionMapOutput { return i.ToNetworkManagerManagementGroupConnectionMapOutputWithContext(context.Background()) } func (i NetworkManagerManagementGroupConnectionMap) ToNetworkManagerManagementGroupConnectionMapOutputWithContext(ctx context.Context) NetworkManagerManagementGroupConnectionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerManagementGroupConnectionMapOutput) } type NetworkManagerManagementGroupConnectionOutput struct{ *pulumi.OutputState } func (NetworkManagerManagementGroupConnectionOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerManagementGroupConnection)(nil)).Elem() } func (o NetworkManagerManagementGroupConnectionOutput) ToNetworkManagerManagementGroupConnectionOutput() NetworkManagerManagementGroupConnectionOutput { return o } func (o NetworkManagerManagementGroupConnectionOutput) ToNetworkManagerManagementGroupConnectionOutputWithContext(ctx context.Context) NetworkManagerManagementGroupConnectionOutput { return o } // The Connection state of the Network Manager Management Group Connection. func (o NetworkManagerManagementGroupConnectionOutput) ConnectionState() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerManagementGroupConnection) pulumi.StringOutput { return v.ConnectionState }).(pulumi.StringOutput) } // A description of the Network Manager Management Group Connection. func (o NetworkManagerManagementGroupConnectionOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkManagerManagementGroupConnection) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // Specifies the ID of the target Management Group. Changing this forces a new resource to be created. func (o NetworkManagerManagementGroupConnectionOutput) ManagementGroupId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerManagementGroupConnection) pulumi.StringOutput { return v.ManagementGroupId }).(pulumi.StringOutput) } // Specifies the name which should be used for this Network Manager Management Group Connection. Changing this forces a new Network Manager Management Group Connection to be created. func (o NetworkManagerManagementGroupConnectionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerManagementGroupConnection) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the ID of the Network Manager which the Management Group is connected to. Changing this forces a new resource to be created. func (o NetworkManagerManagementGroupConnectionOutput) NetworkManagerId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerManagementGroupConnection) pulumi.StringOutput { return v.NetworkManagerId }).(pulumi.StringOutput) } type NetworkManagerManagementGroupConnectionArrayOutput struct{ *pulumi.OutputState } func (NetworkManagerManagementGroupConnectionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerManagementGroupConnection)(nil)).Elem() } func (o NetworkManagerManagementGroupConnectionArrayOutput) ToNetworkManagerManagementGroupConnectionArrayOutput() NetworkManagerManagementGroupConnectionArrayOutput { return o } func (o NetworkManagerManagementGroupConnectionArrayOutput) ToNetworkManagerManagementGroupConnectionArrayOutputWithContext(ctx context.Context) NetworkManagerManagementGroupConnectionArrayOutput { return o } func (o NetworkManagerManagementGroupConnectionArrayOutput) Index(i pulumi.IntInput) NetworkManagerManagementGroupConnectionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkManagerManagementGroupConnection { return vs[0].([]*NetworkManagerManagementGroupConnection)[vs[1].(int)] }).(NetworkManagerManagementGroupConnectionOutput) } type NetworkManagerManagementGroupConnectionMapOutput struct{ *pulumi.OutputState } func (NetworkManagerManagementGroupConnectionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerManagementGroupConnection)(nil)).Elem() } func (o NetworkManagerManagementGroupConnectionMapOutput) ToNetworkManagerManagementGroupConnectionMapOutput() NetworkManagerManagementGroupConnectionMapOutput { return o } func (o NetworkManagerManagementGroupConnectionMapOutput) ToNetworkManagerManagementGroupConnectionMapOutputWithContext(ctx context.Context) NetworkManagerManagementGroupConnectionMapOutput { return o } func (o NetworkManagerManagementGroupConnectionMapOutput) MapIndex(k pulumi.StringInput) NetworkManagerManagementGroupConnectionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkManagerManagementGroupConnection { return vs[0].(map[string]*NetworkManagerManagementGroupConnection)[vs[1].(string)] }).(NetworkManagerManagementGroupConnectionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerManagementGroupConnectionInput)(nil)).Elem(), &NetworkManagerManagementGroupConnection{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerManagementGroupConnectionArrayInput)(nil)).Elem(), NetworkManagerManagementGroupConnectionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerManagementGroupConnectionMapInput)(nil)).Elem(), NetworkManagerManagementGroupConnectionMap{}) pulumi.RegisterOutputType(NetworkManagerManagementGroupConnectionOutput{}) pulumi.RegisterOutputType(NetworkManagerManagementGroupConnectionArrayOutput{}) pulumi.RegisterOutputType(NetworkManagerManagementGroupConnectionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/pointToPointVpnGateway.go
sdk/go/azure/network/pointToPointVpnGateway.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Point-to-Site VPN Gateway. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualWan, err := network.NewVirtualWan(ctx, "example", &network.VirtualWanArgs{ // Name: pulumi.String("example-virtualwan"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // exampleVirtualHub, err := network.NewVirtualHub(ctx, "example", &network.VirtualHubArgs{ // Name: pulumi.String("example-virtualhub"), // ResourceGroupName: example.Name, // Location: example.Location, // VirtualWanId: exampleVirtualWan.ID(), // AddressPrefix: pulumi.String("10.0.0.0/23"), // }) // if err != nil { // return err // } // exampleVpnServerConfiguration, err := network.NewVpnServerConfiguration(ctx, "example", &network.VpnServerConfigurationArgs{ // Name: pulumi.String("example-config"), // ResourceGroupName: example.Name, // Location: example.Location, // VpnAuthenticationTypes: pulumi.StringArray{ // pulumi.String("Certificate"), // }, // ClientRootCertificates: network.VpnServerConfigurationClientRootCertificateArray{ // &network.VpnServerConfigurationClientRootCertificateArgs{ // Name: pulumi.String("DigiCert-Federated-ID-Root-CA"), // PublicCertData: pulumi.String(`MIIDuzCCAqOgAwIBAgIQCHTZWCM+IlfFIRXIvyKSrjANBgkqhkiG9w0BAQsFADBn // // MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 // d3cuZGlnaWNlcnQuY29tMSYwJAYDVQQDEx1EaWdpQ2VydCBGZWRlcmF0ZWQgSUQg // Um9vdCBDQTAeFw0xMzAxMTUxMjAwMDBaFw0zMzAxMTUxMjAwMDBaMGcxCzAJBgNV // BAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdp // Y2VydC5jb20xJjAkBgNVBAMTHURpZ2lDZXJ0IEZlZGVyYXRlZCBJRCBSb290IENB // MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvAEB4pcCqnNNOWE6Ur5j // QPUH+1y1F9KdHTRSza6k5iDlXq1kGS1qAkuKtw9JsiNRrjltmFnzMZRBbX8Tlfl8 // zAhBmb6dDduDGED01kBsTkgywYPxXVTKec0WxYEEF0oMn4wSYNl0lt2eJAKHXjNf // GTwiibdP8CUR2ghSM2sUTI8Nt1Omfc4SMHhGhYD64uJMbX98THQ/4LMGuYegou+d // GTiahfHtjn7AboSEknwAMJHCh5RlYZZ6B1O4QbKJ+34Q0eKgnI3X6Vc9u0zf6DH8 // Dk+4zQDYRRTqTnVO3VT8jzqDlCRuNtq6YvryOWN74/dq8LQhUnXHvFyrsdMaE1X2 // DwIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNV // HQ4EFgQUGRdkFnbGt1EWjKwbUne+5OaZvRYwHwYDVR0jBBgwFoAUGRdkFnbGt1EW // jKwbUne+5OaZvRYwDQYJKoZIhvcNAQELBQADggEBAHcqsHkrjpESqfuVTRiptJfP // 9JbdtWqRTmOf6uJi2c8YVqI6XlKXsD8C1dUUaaHKLUJzvKiazibVuBwMIT84AyqR // QELn3e0BtgEymEygMU569b01ZPxoFSnNXc7qDZBDef8WfqAV/sxkTi8L9BkmFYfL // uGLOhRJOFprPdoDIUBB+tmCl3oDcBy3vnUeOEioz8zAkprcb3GHwHAK+vHmmfgcn // WsfMLH4JCLa/tRYL+Rw/N3ybCkDp00s0WUZ+AoDywSl0Q/ZEnNY0MsFiw6LyIdbq // M/s/1JRtO3bDSzD9TazRVzn2oBqzSa8VgIo5C1nOnoAKJTlsClJKvIhnRlaLQqk= // `), // // }, // }, // }) // if err != nil { // return err // } // _, err = network.NewPointToPointVpnGateway(ctx, "example", &network.PointToPointVpnGatewayArgs{ // Name: pulumi.String("example-vpn-gateway"), // Location: example.Location, // ResourceGroupName: example.Name, // VirtualHubId: exampleVirtualHub.ID(), // VpnServerConfigurationId: exampleVpnServerConfiguration.ID(), // ScaleUnit: pulumi.Int(1), // ConnectionConfigurations: network.PointToPointVpnGatewayConnectionConfigurationArray{ // &network.PointToPointVpnGatewayConnectionConfigurationArgs{ // Name: pulumi.String("example-gateway-config"), // VpnClientAddressPool: &network.PointToPointVpnGatewayConnectionConfigurationVpnClientAddressPoolArgs{ // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // }, // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Point-to-Site VPN Gateway's can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/pointToPointVpnGateway:PointToPointVpnGateway example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/p2sVpnGateways/gateway1 // ``` type PointToPointVpnGateway struct { pulumi.CustomResourceState // A `connectionConfiguration` block as defined below. ConnectionConfigurations PointToPointVpnGatewayConnectionConfigurationArrayOutput `pulumi:"connectionConfigurations"` // A list of IP Addresses of DNS Servers for the Point-to-Site VPN Gateway. DnsServers pulumi.StringArrayOutput `pulumi:"dnsServers"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies the name of the Point-to-Site VPN Gateway. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the resource group in which to create the Point-to-Site VPN Gateway. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Is the Routing Preference for the Public IP Interface of the VPN Gateway enabled? Defaults to `false`. Changing this forces a new resource to be created. RoutingPreferenceInternetEnabled pulumi.BoolPtrOutput `pulumi:"routingPreferenceInternetEnabled"` // The [Scale Unit](https://docs.microsoft.com/azure/virtual-wan/virtual-wan-faq#what-is-a-virtual-wan-gateway-scale-unit) for this Point-to-Site VPN Gateway. ScaleUnit pulumi.IntOutput `pulumi:"scaleUnit"` // A mapping of tags to assign to the Point-to-Site VPN Gateway. Tags pulumi.StringMapOutput `pulumi:"tags"` // The ID of the Virtual Hub where this Point-to-Site VPN Gateway should exist. Changing this forces a new resource to be created. VirtualHubId pulumi.StringOutput `pulumi:"virtualHubId"` // The ID of the VPN Server Configuration which this Point-to-Site VPN Gateway should use. Changing this forces a new resource to be created. VpnServerConfigurationId pulumi.StringOutput `pulumi:"vpnServerConfigurationId"` } // NewPointToPointVpnGateway registers a new resource with the given unique name, arguments, and options. func NewPointToPointVpnGateway(ctx *pulumi.Context, name string, args *PointToPointVpnGatewayArgs, opts ...pulumi.ResourceOption) (*PointToPointVpnGateway, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ConnectionConfigurations == nil { return nil, errors.New("invalid value for required argument 'ConnectionConfigurations'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.ScaleUnit == nil { return nil, errors.New("invalid value for required argument 'ScaleUnit'") } if args.VirtualHubId == nil { return nil, errors.New("invalid value for required argument 'VirtualHubId'") } if args.VpnServerConfigurationId == nil { return nil, errors.New("invalid value for required argument 'VpnServerConfigurationId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource PointToPointVpnGateway err := ctx.RegisterResource("azure:network/pointToPointVpnGateway:PointToPointVpnGateway", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetPointToPointVpnGateway gets an existing PointToPointVpnGateway resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetPointToPointVpnGateway(ctx *pulumi.Context, name string, id pulumi.IDInput, state *PointToPointVpnGatewayState, opts ...pulumi.ResourceOption) (*PointToPointVpnGateway, error) { var resource PointToPointVpnGateway err := ctx.ReadResource("azure:network/pointToPointVpnGateway:PointToPointVpnGateway", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering PointToPointVpnGateway resources. type pointToPointVpnGatewayState struct { // A `connectionConfiguration` block as defined below. ConnectionConfigurations []PointToPointVpnGatewayConnectionConfiguration `pulumi:"connectionConfigurations"` // A list of IP Addresses of DNS Servers for the Point-to-Site VPN Gateway. DnsServers []string `pulumi:"dnsServers"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of the Point-to-Site VPN Gateway. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the Point-to-Site VPN Gateway. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Is the Routing Preference for the Public IP Interface of the VPN Gateway enabled? Defaults to `false`. Changing this forces a new resource to be created. RoutingPreferenceInternetEnabled *bool `pulumi:"routingPreferenceInternetEnabled"` // The [Scale Unit](https://docs.microsoft.com/azure/virtual-wan/virtual-wan-faq#what-is-a-virtual-wan-gateway-scale-unit) for this Point-to-Site VPN Gateway. ScaleUnit *int `pulumi:"scaleUnit"` // A mapping of tags to assign to the Point-to-Site VPN Gateway. Tags map[string]string `pulumi:"tags"` // The ID of the Virtual Hub where this Point-to-Site VPN Gateway should exist. Changing this forces a new resource to be created. VirtualHubId *string `pulumi:"virtualHubId"` // The ID of the VPN Server Configuration which this Point-to-Site VPN Gateway should use. Changing this forces a new resource to be created. VpnServerConfigurationId *string `pulumi:"vpnServerConfigurationId"` } type PointToPointVpnGatewayState struct { // A `connectionConfiguration` block as defined below. ConnectionConfigurations PointToPointVpnGatewayConnectionConfigurationArrayInput // A list of IP Addresses of DNS Servers for the Point-to-Site VPN Gateway. DnsServers pulumi.StringArrayInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of the Point-to-Site VPN Gateway. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the Point-to-Site VPN Gateway. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Is the Routing Preference for the Public IP Interface of the VPN Gateway enabled? Defaults to `false`. Changing this forces a new resource to be created. RoutingPreferenceInternetEnabled pulumi.BoolPtrInput // The [Scale Unit](https://docs.microsoft.com/azure/virtual-wan/virtual-wan-faq#what-is-a-virtual-wan-gateway-scale-unit) for this Point-to-Site VPN Gateway. ScaleUnit pulumi.IntPtrInput // A mapping of tags to assign to the Point-to-Site VPN Gateway. Tags pulumi.StringMapInput // The ID of the Virtual Hub where this Point-to-Site VPN Gateway should exist. Changing this forces a new resource to be created. VirtualHubId pulumi.StringPtrInput // The ID of the VPN Server Configuration which this Point-to-Site VPN Gateway should use. Changing this forces a new resource to be created. VpnServerConfigurationId pulumi.StringPtrInput } func (PointToPointVpnGatewayState) ElementType() reflect.Type { return reflect.TypeOf((*pointToPointVpnGatewayState)(nil)).Elem() } type pointToPointVpnGatewayArgs struct { // A `connectionConfiguration` block as defined below. ConnectionConfigurations []PointToPointVpnGatewayConnectionConfiguration `pulumi:"connectionConfigurations"` // A list of IP Addresses of DNS Servers for the Point-to-Site VPN Gateway. DnsServers []string `pulumi:"dnsServers"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of the Point-to-Site VPN Gateway. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the Point-to-Site VPN Gateway. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Is the Routing Preference for the Public IP Interface of the VPN Gateway enabled? Defaults to `false`. Changing this forces a new resource to be created. RoutingPreferenceInternetEnabled *bool `pulumi:"routingPreferenceInternetEnabled"` // The [Scale Unit](https://docs.microsoft.com/azure/virtual-wan/virtual-wan-faq#what-is-a-virtual-wan-gateway-scale-unit) for this Point-to-Site VPN Gateway. ScaleUnit int `pulumi:"scaleUnit"` // A mapping of tags to assign to the Point-to-Site VPN Gateway. Tags map[string]string `pulumi:"tags"` // The ID of the Virtual Hub where this Point-to-Site VPN Gateway should exist. Changing this forces a new resource to be created. VirtualHubId string `pulumi:"virtualHubId"` // The ID of the VPN Server Configuration which this Point-to-Site VPN Gateway should use. Changing this forces a new resource to be created. VpnServerConfigurationId string `pulumi:"vpnServerConfigurationId"` } // The set of arguments for constructing a PointToPointVpnGateway resource. type PointToPointVpnGatewayArgs struct { // A `connectionConfiguration` block as defined below. ConnectionConfigurations PointToPointVpnGatewayConnectionConfigurationArrayInput // A list of IP Addresses of DNS Servers for the Point-to-Site VPN Gateway. DnsServers pulumi.StringArrayInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of the Point-to-Site VPN Gateway. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the Point-to-Site VPN Gateway. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Is the Routing Preference for the Public IP Interface of the VPN Gateway enabled? Defaults to `false`. Changing this forces a new resource to be created. RoutingPreferenceInternetEnabled pulumi.BoolPtrInput // The [Scale Unit](https://docs.microsoft.com/azure/virtual-wan/virtual-wan-faq#what-is-a-virtual-wan-gateway-scale-unit) for this Point-to-Site VPN Gateway. ScaleUnit pulumi.IntInput // A mapping of tags to assign to the Point-to-Site VPN Gateway. Tags pulumi.StringMapInput // The ID of the Virtual Hub where this Point-to-Site VPN Gateway should exist. Changing this forces a new resource to be created. VirtualHubId pulumi.StringInput // The ID of the VPN Server Configuration which this Point-to-Site VPN Gateway should use. Changing this forces a new resource to be created. VpnServerConfigurationId pulumi.StringInput } func (PointToPointVpnGatewayArgs) ElementType() reflect.Type { return reflect.TypeOf((*pointToPointVpnGatewayArgs)(nil)).Elem() } type PointToPointVpnGatewayInput interface { pulumi.Input ToPointToPointVpnGatewayOutput() PointToPointVpnGatewayOutput ToPointToPointVpnGatewayOutputWithContext(ctx context.Context) PointToPointVpnGatewayOutput } func (*PointToPointVpnGateway) ElementType() reflect.Type { return reflect.TypeOf((**PointToPointVpnGateway)(nil)).Elem() } func (i *PointToPointVpnGateway) ToPointToPointVpnGatewayOutput() PointToPointVpnGatewayOutput { return i.ToPointToPointVpnGatewayOutputWithContext(context.Background()) } func (i *PointToPointVpnGateway) ToPointToPointVpnGatewayOutputWithContext(ctx context.Context) PointToPointVpnGatewayOutput { return pulumi.ToOutputWithContext(ctx, i).(PointToPointVpnGatewayOutput) } // PointToPointVpnGatewayArrayInput is an input type that accepts PointToPointVpnGatewayArray and PointToPointVpnGatewayArrayOutput values. // You can construct a concrete instance of `PointToPointVpnGatewayArrayInput` via: // // PointToPointVpnGatewayArray{ PointToPointVpnGatewayArgs{...} } type PointToPointVpnGatewayArrayInput interface { pulumi.Input ToPointToPointVpnGatewayArrayOutput() PointToPointVpnGatewayArrayOutput ToPointToPointVpnGatewayArrayOutputWithContext(context.Context) PointToPointVpnGatewayArrayOutput } type PointToPointVpnGatewayArray []PointToPointVpnGatewayInput func (PointToPointVpnGatewayArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*PointToPointVpnGateway)(nil)).Elem() } func (i PointToPointVpnGatewayArray) ToPointToPointVpnGatewayArrayOutput() PointToPointVpnGatewayArrayOutput { return i.ToPointToPointVpnGatewayArrayOutputWithContext(context.Background()) } func (i PointToPointVpnGatewayArray) ToPointToPointVpnGatewayArrayOutputWithContext(ctx context.Context) PointToPointVpnGatewayArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(PointToPointVpnGatewayArrayOutput) } // PointToPointVpnGatewayMapInput is an input type that accepts PointToPointVpnGatewayMap and PointToPointVpnGatewayMapOutput values. // You can construct a concrete instance of `PointToPointVpnGatewayMapInput` via: // // PointToPointVpnGatewayMap{ "key": PointToPointVpnGatewayArgs{...} } type PointToPointVpnGatewayMapInput interface { pulumi.Input ToPointToPointVpnGatewayMapOutput() PointToPointVpnGatewayMapOutput ToPointToPointVpnGatewayMapOutputWithContext(context.Context) PointToPointVpnGatewayMapOutput } type PointToPointVpnGatewayMap map[string]PointToPointVpnGatewayInput func (PointToPointVpnGatewayMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*PointToPointVpnGateway)(nil)).Elem() } func (i PointToPointVpnGatewayMap) ToPointToPointVpnGatewayMapOutput() PointToPointVpnGatewayMapOutput { return i.ToPointToPointVpnGatewayMapOutputWithContext(context.Background()) } func (i PointToPointVpnGatewayMap) ToPointToPointVpnGatewayMapOutputWithContext(ctx context.Context) PointToPointVpnGatewayMapOutput { return pulumi.ToOutputWithContext(ctx, i).(PointToPointVpnGatewayMapOutput) } type PointToPointVpnGatewayOutput struct{ *pulumi.OutputState } func (PointToPointVpnGatewayOutput) ElementType() reflect.Type { return reflect.TypeOf((**PointToPointVpnGateway)(nil)).Elem() } func (o PointToPointVpnGatewayOutput) ToPointToPointVpnGatewayOutput() PointToPointVpnGatewayOutput { return o } func (o PointToPointVpnGatewayOutput) ToPointToPointVpnGatewayOutputWithContext(ctx context.Context) PointToPointVpnGatewayOutput { return o } // A `connectionConfiguration` block as defined below. func (o PointToPointVpnGatewayOutput) ConnectionConfigurations() PointToPointVpnGatewayConnectionConfigurationArrayOutput { return o.ApplyT(func(v *PointToPointVpnGateway) PointToPointVpnGatewayConnectionConfigurationArrayOutput { return v.ConnectionConfigurations }).(PointToPointVpnGatewayConnectionConfigurationArrayOutput) } // A list of IP Addresses of DNS Servers for the Point-to-Site VPN Gateway. func (o PointToPointVpnGatewayOutput) DnsServers() pulumi.StringArrayOutput { return o.ApplyT(func(v *PointToPointVpnGateway) pulumi.StringArrayOutput { return v.DnsServers }).(pulumi.StringArrayOutput) } // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. func (o PointToPointVpnGatewayOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *PointToPointVpnGateway) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name of the Point-to-Site VPN Gateway. Changing this forces a new resource to be created. func (o PointToPointVpnGatewayOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *PointToPointVpnGateway) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group in which to create the Point-to-Site VPN Gateway. Changing this forces a new resource to be created. func (o PointToPointVpnGatewayOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *PointToPointVpnGateway) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Is the Routing Preference for the Public IP Interface of the VPN Gateway enabled? Defaults to `false`. Changing this forces a new resource to be created. func (o PointToPointVpnGatewayOutput) RoutingPreferenceInternetEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *PointToPointVpnGateway) pulumi.BoolPtrOutput { return v.RoutingPreferenceInternetEnabled }).(pulumi.BoolPtrOutput) } // The [Scale Unit](https://docs.microsoft.com/azure/virtual-wan/virtual-wan-faq#what-is-a-virtual-wan-gateway-scale-unit) for this Point-to-Site VPN Gateway. func (o PointToPointVpnGatewayOutput) ScaleUnit() pulumi.IntOutput { return o.ApplyT(func(v *PointToPointVpnGateway) pulumi.IntOutput { return v.ScaleUnit }).(pulumi.IntOutput) } // A mapping of tags to assign to the Point-to-Site VPN Gateway. func (o PointToPointVpnGatewayOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *PointToPointVpnGateway) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The ID of the Virtual Hub where this Point-to-Site VPN Gateway should exist. Changing this forces a new resource to be created. func (o PointToPointVpnGatewayOutput) VirtualHubId() pulumi.StringOutput { return o.ApplyT(func(v *PointToPointVpnGateway) pulumi.StringOutput { return v.VirtualHubId }).(pulumi.StringOutput) } // The ID of the VPN Server Configuration which this Point-to-Site VPN Gateway should use. Changing this forces a new resource to be created. func (o PointToPointVpnGatewayOutput) VpnServerConfigurationId() pulumi.StringOutput { return o.ApplyT(func(v *PointToPointVpnGateway) pulumi.StringOutput { return v.VpnServerConfigurationId }).(pulumi.StringOutput) } type PointToPointVpnGatewayArrayOutput struct{ *pulumi.OutputState } func (PointToPointVpnGatewayArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*PointToPointVpnGateway)(nil)).Elem() } func (o PointToPointVpnGatewayArrayOutput) ToPointToPointVpnGatewayArrayOutput() PointToPointVpnGatewayArrayOutput { return o } func (o PointToPointVpnGatewayArrayOutput) ToPointToPointVpnGatewayArrayOutputWithContext(ctx context.Context) PointToPointVpnGatewayArrayOutput { return o } func (o PointToPointVpnGatewayArrayOutput) Index(i pulumi.IntInput) PointToPointVpnGatewayOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PointToPointVpnGateway { return vs[0].([]*PointToPointVpnGateway)[vs[1].(int)] }).(PointToPointVpnGatewayOutput) } type PointToPointVpnGatewayMapOutput struct{ *pulumi.OutputState } func (PointToPointVpnGatewayMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*PointToPointVpnGateway)(nil)).Elem() } func (o PointToPointVpnGatewayMapOutput) ToPointToPointVpnGatewayMapOutput() PointToPointVpnGatewayMapOutput { return o } func (o PointToPointVpnGatewayMapOutput) ToPointToPointVpnGatewayMapOutputWithContext(ctx context.Context) PointToPointVpnGatewayMapOutput { return o } func (o PointToPointVpnGatewayMapOutput) MapIndex(k pulumi.StringInput) PointToPointVpnGatewayOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PointToPointVpnGateway { return vs[0].(map[string]*PointToPointVpnGateway)[vs[1].(string)] }).(PointToPointVpnGatewayOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*PointToPointVpnGatewayInput)(nil)).Elem(), &PointToPointVpnGateway{}) pulumi.RegisterInputType(reflect.TypeOf((*PointToPointVpnGatewayArrayInput)(nil)).Elem(), PointToPointVpnGatewayArray{}) pulumi.RegisterInputType(reflect.TypeOf((*PointToPointVpnGatewayMapInput)(nil)).Elem(), PointToPointVpnGatewayMap{}) pulumi.RegisterOutputType(PointToPointVpnGatewayOutput{}) pulumi.RegisterOutputType(PointToPointVpnGatewayArrayOutput{}) pulumi.RegisterOutputType(PointToPointVpnGatewayMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/routingIntent.go
sdk/go/azure/network/routingIntent.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Virtual Hub Routing Intent. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualWan, err := network.NewVirtualWan(ctx, "example", &network.VirtualWanArgs{ // Name: pulumi.String("example-vwan"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // exampleVirtualHub, err := network.NewVirtualHub(ctx, "example", &network.VirtualHubArgs{ // Name: pulumi.String("example-vhub"), // ResourceGroupName: example.Name, // Location: example.Location, // VirtualWanId: exampleVirtualWan.ID(), // AddressPrefix: pulumi.String("10.0.1.0/24"), // }) // if err != nil { // return err // } // exampleFirewall, err := network.NewFirewall(ctx, "example", &network.FirewallArgs{ // Name: pulumi.String("example-fw"), // Location: example.Location, // ResourceGroupName: example.Name, // SkuName: pulumi.String("AZFW_Hub"), // SkuTier: pulumi.String("Standard"), // VirtualHub: &network.FirewallVirtualHubArgs{ // VirtualHubId: exampleVirtualHub.ID(), // PublicIpCount: pulumi.Int(1), // }, // }) // if err != nil { // return err // } // _, err = network.NewRoutingIntent(ctx, "example", &network.RoutingIntentArgs{ // Name: pulumi.String("example-routingintent"), // VirtualHubId: exampleVirtualHub.ID(), // RoutingPolicies: network.RoutingIntentRoutingPolicyArray{ // &network.RoutingIntentRoutingPolicyArgs{ // Name: pulumi.String("InternetTrafficPolicy"), // Destinations: pulumi.StringArray{ // pulumi.String("Internet"), // }, // NextHop: exampleFirewall.ID(), // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Virtual Hub Routing Intents can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/routingIntent:RoutingIntent example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Network/virtualHubs/virtualHub1/routingIntent/routingIntent1 // ``` type RoutingIntent struct { pulumi.CustomResourceState // The name which should be used for this Virtual Hub Routing Intent. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // One or more `routingPolicy` blocks as defined below. RoutingPolicies RoutingIntentRoutingPolicyArrayOutput `pulumi:"routingPolicies"` // The resource ID of the Virtual Hub. Changing this forces a new resource to be created. VirtualHubId pulumi.StringOutput `pulumi:"virtualHubId"` } // NewRoutingIntent registers a new resource with the given unique name, arguments, and options. func NewRoutingIntent(ctx *pulumi.Context, name string, args *RoutingIntentArgs, opts ...pulumi.ResourceOption) (*RoutingIntent, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.RoutingPolicies == nil { return nil, errors.New("invalid value for required argument 'RoutingPolicies'") } if args.VirtualHubId == nil { return nil, errors.New("invalid value for required argument 'VirtualHubId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource RoutingIntent err := ctx.RegisterResource("azure:network/routingIntent:RoutingIntent", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetRoutingIntent gets an existing RoutingIntent resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetRoutingIntent(ctx *pulumi.Context, name string, id pulumi.IDInput, state *RoutingIntentState, opts ...pulumi.ResourceOption) (*RoutingIntent, error) { var resource RoutingIntent err := ctx.ReadResource("azure:network/routingIntent:RoutingIntent", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering RoutingIntent resources. type routingIntentState struct { // The name which should be used for this Virtual Hub Routing Intent. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // One or more `routingPolicy` blocks as defined below. RoutingPolicies []RoutingIntentRoutingPolicy `pulumi:"routingPolicies"` // The resource ID of the Virtual Hub. Changing this forces a new resource to be created. VirtualHubId *string `pulumi:"virtualHubId"` } type RoutingIntentState struct { // The name which should be used for this Virtual Hub Routing Intent. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // One or more `routingPolicy` blocks as defined below. RoutingPolicies RoutingIntentRoutingPolicyArrayInput // The resource ID of the Virtual Hub. Changing this forces a new resource to be created. VirtualHubId pulumi.StringPtrInput } func (RoutingIntentState) ElementType() reflect.Type { return reflect.TypeOf((*routingIntentState)(nil)).Elem() } type routingIntentArgs struct { // The name which should be used for this Virtual Hub Routing Intent. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // One or more `routingPolicy` blocks as defined below. RoutingPolicies []RoutingIntentRoutingPolicy `pulumi:"routingPolicies"` // The resource ID of the Virtual Hub. Changing this forces a new resource to be created. VirtualHubId string `pulumi:"virtualHubId"` } // The set of arguments for constructing a RoutingIntent resource. type RoutingIntentArgs struct { // The name which should be used for this Virtual Hub Routing Intent. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // One or more `routingPolicy` blocks as defined below. RoutingPolicies RoutingIntentRoutingPolicyArrayInput // The resource ID of the Virtual Hub. Changing this forces a new resource to be created. VirtualHubId pulumi.StringInput } func (RoutingIntentArgs) ElementType() reflect.Type { return reflect.TypeOf((*routingIntentArgs)(nil)).Elem() } type RoutingIntentInput interface { pulumi.Input ToRoutingIntentOutput() RoutingIntentOutput ToRoutingIntentOutputWithContext(ctx context.Context) RoutingIntentOutput } func (*RoutingIntent) ElementType() reflect.Type { return reflect.TypeOf((**RoutingIntent)(nil)).Elem() } func (i *RoutingIntent) ToRoutingIntentOutput() RoutingIntentOutput { return i.ToRoutingIntentOutputWithContext(context.Background()) } func (i *RoutingIntent) ToRoutingIntentOutputWithContext(ctx context.Context) RoutingIntentOutput { return pulumi.ToOutputWithContext(ctx, i).(RoutingIntentOutput) } // RoutingIntentArrayInput is an input type that accepts RoutingIntentArray and RoutingIntentArrayOutput values. // You can construct a concrete instance of `RoutingIntentArrayInput` via: // // RoutingIntentArray{ RoutingIntentArgs{...} } type RoutingIntentArrayInput interface { pulumi.Input ToRoutingIntentArrayOutput() RoutingIntentArrayOutput ToRoutingIntentArrayOutputWithContext(context.Context) RoutingIntentArrayOutput } type RoutingIntentArray []RoutingIntentInput func (RoutingIntentArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*RoutingIntent)(nil)).Elem() } func (i RoutingIntentArray) ToRoutingIntentArrayOutput() RoutingIntentArrayOutput { return i.ToRoutingIntentArrayOutputWithContext(context.Background()) } func (i RoutingIntentArray) ToRoutingIntentArrayOutputWithContext(ctx context.Context) RoutingIntentArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(RoutingIntentArrayOutput) } // RoutingIntentMapInput is an input type that accepts RoutingIntentMap and RoutingIntentMapOutput values. // You can construct a concrete instance of `RoutingIntentMapInput` via: // // RoutingIntentMap{ "key": RoutingIntentArgs{...} } type RoutingIntentMapInput interface { pulumi.Input ToRoutingIntentMapOutput() RoutingIntentMapOutput ToRoutingIntentMapOutputWithContext(context.Context) RoutingIntentMapOutput } type RoutingIntentMap map[string]RoutingIntentInput func (RoutingIntentMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*RoutingIntent)(nil)).Elem() } func (i RoutingIntentMap) ToRoutingIntentMapOutput() RoutingIntentMapOutput { return i.ToRoutingIntentMapOutputWithContext(context.Background()) } func (i RoutingIntentMap) ToRoutingIntentMapOutputWithContext(ctx context.Context) RoutingIntentMapOutput { return pulumi.ToOutputWithContext(ctx, i).(RoutingIntentMapOutput) } type RoutingIntentOutput struct{ *pulumi.OutputState } func (RoutingIntentOutput) ElementType() reflect.Type { return reflect.TypeOf((**RoutingIntent)(nil)).Elem() } func (o RoutingIntentOutput) ToRoutingIntentOutput() RoutingIntentOutput { return o } func (o RoutingIntentOutput) ToRoutingIntentOutputWithContext(ctx context.Context) RoutingIntentOutput { return o } // The name which should be used for this Virtual Hub Routing Intent. Changing this forces a new resource to be created. func (o RoutingIntentOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *RoutingIntent) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // One or more `routingPolicy` blocks as defined below. func (o RoutingIntentOutput) RoutingPolicies() RoutingIntentRoutingPolicyArrayOutput { return o.ApplyT(func(v *RoutingIntent) RoutingIntentRoutingPolicyArrayOutput { return v.RoutingPolicies }).(RoutingIntentRoutingPolicyArrayOutput) } // The resource ID of the Virtual Hub. Changing this forces a new resource to be created. func (o RoutingIntentOutput) VirtualHubId() pulumi.StringOutput { return o.ApplyT(func(v *RoutingIntent) pulumi.StringOutput { return v.VirtualHubId }).(pulumi.StringOutput) } type RoutingIntentArrayOutput struct{ *pulumi.OutputState } func (RoutingIntentArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*RoutingIntent)(nil)).Elem() } func (o RoutingIntentArrayOutput) ToRoutingIntentArrayOutput() RoutingIntentArrayOutput { return o } func (o RoutingIntentArrayOutput) ToRoutingIntentArrayOutputWithContext(ctx context.Context) RoutingIntentArrayOutput { return o } func (o RoutingIntentArrayOutput) Index(i pulumi.IntInput) RoutingIntentOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *RoutingIntent { return vs[0].([]*RoutingIntent)[vs[1].(int)] }).(RoutingIntentOutput) } type RoutingIntentMapOutput struct{ *pulumi.OutputState } func (RoutingIntentMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*RoutingIntent)(nil)).Elem() } func (o RoutingIntentMapOutput) ToRoutingIntentMapOutput() RoutingIntentMapOutput { return o } func (o RoutingIntentMapOutput) ToRoutingIntentMapOutputWithContext(ctx context.Context) RoutingIntentMapOutput { return o } func (o RoutingIntentMapOutput) MapIndex(k pulumi.StringInput) RoutingIntentOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *RoutingIntent { return vs[0].(map[string]*RoutingIntent)[vs[1].(string)] }).(RoutingIntentOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*RoutingIntentInput)(nil)).Elem(), &RoutingIntent{}) pulumi.RegisterInputType(reflect.TypeOf((*RoutingIntentArrayInput)(nil)).Elem(), RoutingIntentArray{}) pulumi.RegisterInputType(reflect.TypeOf((*RoutingIntentMapInput)(nil)).Elem(), RoutingIntentMap{}) pulumi.RegisterOutputType(RoutingIntentOutput{}) pulumi.RegisterOutputType(RoutingIntentArrayOutput{}) pulumi.RegisterOutputType(RoutingIntentMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getNetworkManager.go
sdk/go/azure/network/getNetworkManager.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about a Network Manager. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // exampleNetworkManager, err := network.NewNetworkManager(ctx, "example", &network.NetworkManagerArgs{ // Name: pulumi.String("example-network-manager"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // Scope: &network.NetworkManagerScopeArgs{ // SubscriptionIds: pulumi.StringArray{ // pulumi.String(current.Id), // }, // }, // ScopeAccesses: pulumi.StringArray{ // pulumi.String("Connectivity"), // pulumi.String("SecurityAdmin"), // }, // Description: pulumi.String("example network manager"), // }) // if err != nil { // return err // } // _ = network.LookupNetworkManagerOutput(ctx, network.GetNetworkManagerOutputArgs{ // Name: exampleNetworkManager.Name, // ResourceGroupName: exampleNetworkManager.ResourceGroupName, // }, nil) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func LookupNetworkManager(ctx *pulumi.Context, args *LookupNetworkManagerArgs, opts ...pulumi.InvokeOption) (*LookupNetworkManagerResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupNetworkManagerResult err := ctx.Invoke("azure:network/getNetworkManager:getNetworkManager", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getNetworkManager. type LookupNetworkManagerArgs struct { // The name of the Network Manager. Name string `pulumi:"name"` // The Name of the Resource Group where the Network Manager exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getNetworkManager. type LookupNetworkManagerResult struct { // One or more `crossTenantScopes` blocks as defined below. CrossTenantScopes []GetNetworkManagerCrossTenantScope `pulumi:"crossTenantScopes"` // A description of the Network Manager. Description string `pulumi:"description"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The Azure Region where the Network Manager exists. Location string `pulumi:"location"` Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // A list of configuration deployment type configured on the Network Manager. ScopeAccesses []string `pulumi:"scopeAccesses"` // A `scope` block as defined below. Scopes []GetNetworkManagerScope `pulumi:"scopes"` // A mapping of tags assigned to the Network Manager. Tags map[string]string `pulumi:"tags"` } func LookupNetworkManagerOutput(ctx *pulumi.Context, args LookupNetworkManagerOutputArgs, opts ...pulumi.InvokeOption) LookupNetworkManagerResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupNetworkManagerResultOutput, error) { args := v.(LookupNetworkManagerArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getNetworkManager:getNetworkManager", args, LookupNetworkManagerResultOutput{}, options).(LookupNetworkManagerResultOutput), nil }).(LookupNetworkManagerResultOutput) } // A collection of arguments for invoking getNetworkManager. type LookupNetworkManagerOutputArgs struct { // The name of the Network Manager. Name pulumi.StringInput `pulumi:"name"` // The Name of the Resource Group where the Network Manager exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupNetworkManagerOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupNetworkManagerArgs)(nil)).Elem() } // A collection of values returned by getNetworkManager. type LookupNetworkManagerResultOutput struct{ *pulumi.OutputState } func (LookupNetworkManagerResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupNetworkManagerResult)(nil)).Elem() } func (o LookupNetworkManagerResultOutput) ToLookupNetworkManagerResultOutput() LookupNetworkManagerResultOutput { return o } func (o LookupNetworkManagerResultOutput) ToLookupNetworkManagerResultOutputWithContext(ctx context.Context) LookupNetworkManagerResultOutput { return o } // One or more `crossTenantScopes` blocks as defined below. func (o LookupNetworkManagerResultOutput) CrossTenantScopes() GetNetworkManagerCrossTenantScopeArrayOutput { return o.ApplyT(func(v LookupNetworkManagerResult) []GetNetworkManagerCrossTenantScope { return v.CrossTenantScopes }).(GetNetworkManagerCrossTenantScopeArrayOutput) } // A description of the Network Manager. func (o LookupNetworkManagerResultOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkManagerResult) string { return v.Description }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupNetworkManagerResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkManagerResult) string { return v.Id }).(pulumi.StringOutput) } // The Azure Region where the Network Manager exists. func (o LookupNetworkManagerResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkManagerResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupNetworkManagerResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkManagerResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupNetworkManagerResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkManagerResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A list of configuration deployment type configured on the Network Manager. func (o LookupNetworkManagerResultOutput) ScopeAccesses() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupNetworkManagerResult) []string { return v.ScopeAccesses }).(pulumi.StringArrayOutput) } // A `scope` block as defined below. func (o LookupNetworkManagerResultOutput) Scopes() GetNetworkManagerScopeArrayOutput { return o.ApplyT(func(v LookupNetworkManagerResult) []GetNetworkManagerScope { return v.Scopes }).(GetNetworkManagerScopeArrayOutput) } // A mapping of tags assigned to the Network Manager. func (o LookupNetworkManagerResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupNetworkManagerResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(LookupNetworkManagerResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getIpGroups.go
sdk/go/azure/network/getIpGroups.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about existing IP Groups. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.GetIpGroups(ctx, &network.GetIpGroupsArgs{ // Name: "existing", // ResourceGroupName: "existing", // }, nil) // if err != nil { // return err // } // ctx.Export("ids", example.Ids) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func GetIpGroups(ctx *pulumi.Context, args *GetIpGroupsArgs, opts ...pulumi.InvokeOption) (*GetIpGroupsResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetIpGroupsResult err := ctx.Invoke("azure:network/getIpGroups:getIpGroups", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getIpGroups. type GetIpGroupsArgs struct { // A substring to match some number of IP Groups. Name string `pulumi:"name"` // The name of the Resource Group where the IP Groups exist. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getIpGroups. type GetIpGroupsResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // A list of IP Group IDs. Ids []string `pulumi:"ids"` Location string `pulumi:"location"` Name string `pulumi:"name"` // A list of IP Group Names. Names []string `pulumi:"names"` ResourceGroupName string `pulumi:"resourceGroupName"` Tags map[string]string `pulumi:"tags"` } func GetIpGroupsOutput(ctx *pulumi.Context, args GetIpGroupsOutputArgs, opts ...pulumi.InvokeOption) GetIpGroupsResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetIpGroupsResultOutput, error) { args := v.(GetIpGroupsArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getIpGroups:getIpGroups", args, GetIpGroupsResultOutput{}, options).(GetIpGroupsResultOutput), nil }).(GetIpGroupsResultOutput) } // A collection of arguments for invoking getIpGroups. type GetIpGroupsOutputArgs struct { // A substring to match some number of IP Groups. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group where the IP Groups exist. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (GetIpGroupsOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetIpGroupsArgs)(nil)).Elem() } // A collection of values returned by getIpGroups. type GetIpGroupsResultOutput struct{ *pulumi.OutputState } func (GetIpGroupsResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetIpGroupsResult)(nil)).Elem() } func (o GetIpGroupsResultOutput) ToGetIpGroupsResultOutput() GetIpGroupsResultOutput { return o } func (o GetIpGroupsResultOutput) ToGetIpGroupsResultOutputWithContext(ctx context.Context) GetIpGroupsResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o GetIpGroupsResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetIpGroupsResult) string { return v.Id }).(pulumi.StringOutput) } // A list of IP Group IDs. func (o GetIpGroupsResultOutput) Ids() pulumi.StringArrayOutput { return o.ApplyT(func(v GetIpGroupsResult) []string { return v.Ids }).(pulumi.StringArrayOutput) } func (o GetIpGroupsResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v GetIpGroupsResult) string { return v.Location }).(pulumi.StringOutput) } func (o GetIpGroupsResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetIpGroupsResult) string { return v.Name }).(pulumi.StringOutput) } // A list of IP Group Names. func (o GetIpGroupsResultOutput) Names() pulumi.StringArrayOutput { return o.ApplyT(func(v GetIpGroupsResult) []string { return v.Names }).(pulumi.StringArrayOutput) } func (o GetIpGroupsResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v GetIpGroupsResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } func (o GetIpGroupsResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v GetIpGroupsResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(GetIpGroupsResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/networkManagerIpamPoolStaticCidr.go
sdk/go/azure/network/networkManagerIpamPoolStaticCidr.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Network Manager IPAM Pool Static CIDR. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // exampleNetworkManager, err := network.NewNetworkManager(ctx, "example", &network.NetworkManagerArgs{ // Name: pulumi.String("example-nm"), // ResourceGroupName: example.Name, // Location: example.Location, // Scope: &network.NetworkManagerScopeArgs{ // SubscriptionIds: pulumi.StringArray{ // pulumi.String(current.Id), // }, // }, // }) // if err != nil { // return err // } // exampleNetworkManagerIpamPool, err := network.NewNetworkManagerIpamPool(ctx, "example", &network.NetworkManagerIpamPoolArgs{ // Name: pulumi.String("example-ipampool"), // NetworkManagerId: exampleNetworkManager.ID(), // Location: example.Location, // DisplayName: pulumi.String("ipampool1"), // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.0.0/24"), // }, // }) // if err != nil { // return err // } // _, err = network.NewNetworkManagerIpamPoolStaticCidr(ctx, "example", &network.NetworkManagerIpamPoolStaticCidrArgs{ // Name: pulumi.String("example-ipsc"), // IpamPoolId: exampleNetworkManagerIpamPool.ID(), // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.0.0/26"), // pulumi.String("10.0.0.128/27"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Network Manager IPAM Pool Static CIDRs can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/networkManagerIpamPoolStaticCidr:NetworkManagerIpamPoolStaticCidr example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/manager1/ipamPools/pool1/staticCidrs/cidr1 // ``` type NetworkManagerIpamPoolStaticCidr struct { pulumi.CustomResourceState // Specifies a list of IPv4 or IPv6 IP address prefixes which will be allocated to the Static CIDR. // // > **Note:** Exactly one of `addressPrefixes` or `numberOfIpAddressesToAllocate` must be specified. AddressPrefixes pulumi.StringArrayOutput `pulumi:"addressPrefixes"` // The ID of the Network Manager IP Address Management (IPAM) Pool. Changing this forces a new Network Manager IPAM Pool Static CIDR to be created. IpamPoolId pulumi.StringOutput `pulumi:"ipamPoolId"` // The name which should be used for this Network Manager IPAM Pool Static CIDR. Changing this forces a new Network Manager IPAM Pool Static CIDR to be created. Name pulumi.StringOutput `pulumi:"name"` // The number of IP addresses to allocate to the Static CIDR. The value must be a string representing a positive integer which is a positive power of 2, e.g., `"16"`. // // > **Note:** Exactly one of `addressPrefixes` or `numberOfIpAddressesToAllocate` must be specified. NumberOfIpAddressesToAllocate pulumi.StringPtrOutput `pulumi:"numberOfIpAddressesToAllocate"` } // NewNetworkManagerIpamPoolStaticCidr registers a new resource with the given unique name, arguments, and options. func NewNetworkManagerIpamPoolStaticCidr(ctx *pulumi.Context, name string, args *NetworkManagerIpamPoolStaticCidrArgs, opts ...pulumi.ResourceOption) (*NetworkManagerIpamPoolStaticCidr, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.IpamPoolId == nil { return nil, errors.New("invalid value for required argument 'IpamPoolId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkManagerIpamPoolStaticCidr err := ctx.RegisterResource("azure:network/networkManagerIpamPoolStaticCidr:NetworkManagerIpamPoolStaticCidr", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkManagerIpamPoolStaticCidr gets an existing NetworkManagerIpamPoolStaticCidr resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetNetworkManagerIpamPoolStaticCidr(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkManagerIpamPoolStaticCidrState, opts ...pulumi.ResourceOption) (*NetworkManagerIpamPoolStaticCidr, error) { var resource NetworkManagerIpamPoolStaticCidr err := ctx.ReadResource("azure:network/networkManagerIpamPoolStaticCidr:NetworkManagerIpamPoolStaticCidr", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkManagerIpamPoolStaticCidr resources. type networkManagerIpamPoolStaticCidrState struct { // Specifies a list of IPv4 or IPv6 IP address prefixes which will be allocated to the Static CIDR. // // > **Note:** Exactly one of `addressPrefixes` or `numberOfIpAddressesToAllocate` must be specified. AddressPrefixes []string `pulumi:"addressPrefixes"` // The ID of the Network Manager IP Address Management (IPAM) Pool. Changing this forces a new Network Manager IPAM Pool Static CIDR to be created. IpamPoolId *string `pulumi:"ipamPoolId"` // The name which should be used for this Network Manager IPAM Pool Static CIDR. Changing this forces a new Network Manager IPAM Pool Static CIDR to be created. Name *string `pulumi:"name"` // The number of IP addresses to allocate to the Static CIDR. The value must be a string representing a positive integer which is a positive power of 2, e.g., `"16"`. // // > **Note:** Exactly one of `addressPrefixes` or `numberOfIpAddressesToAllocate` must be specified. NumberOfIpAddressesToAllocate *string `pulumi:"numberOfIpAddressesToAllocate"` } type NetworkManagerIpamPoolStaticCidrState struct { // Specifies a list of IPv4 or IPv6 IP address prefixes which will be allocated to the Static CIDR. // // > **Note:** Exactly one of `addressPrefixes` or `numberOfIpAddressesToAllocate` must be specified. AddressPrefixes pulumi.StringArrayInput // The ID of the Network Manager IP Address Management (IPAM) Pool. Changing this forces a new Network Manager IPAM Pool Static CIDR to be created. IpamPoolId pulumi.StringPtrInput // The name which should be used for this Network Manager IPAM Pool Static CIDR. Changing this forces a new Network Manager IPAM Pool Static CIDR to be created. Name pulumi.StringPtrInput // The number of IP addresses to allocate to the Static CIDR. The value must be a string representing a positive integer which is a positive power of 2, e.g., `"16"`. // // > **Note:** Exactly one of `addressPrefixes` or `numberOfIpAddressesToAllocate` must be specified. NumberOfIpAddressesToAllocate pulumi.StringPtrInput } func (NetworkManagerIpamPoolStaticCidrState) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerIpamPoolStaticCidrState)(nil)).Elem() } type networkManagerIpamPoolStaticCidrArgs struct { // Specifies a list of IPv4 or IPv6 IP address prefixes which will be allocated to the Static CIDR. // // > **Note:** Exactly one of `addressPrefixes` or `numberOfIpAddressesToAllocate` must be specified. AddressPrefixes []string `pulumi:"addressPrefixes"` // The ID of the Network Manager IP Address Management (IPAM) Pool. Changing this forces a new Network Manager IPAM Pool Static CIDR to be created. IpamPoolId string `pulumi:"ipamPoolId"` // The name which should be used for this Network Manager IPAM Pool Static CIDR. Changing this forces a new Network Manager IPAM Pool Static CIDR to be created. Name *string `pulumi:"name"` // The number of IP addresses to allocate to the Static CIDR. The value must be a string representing a positive integer which is a positive power of 2, e.g., `"16"`. // // > **Note:** Exactly one of `addressPrefixes` or `numberOfIpAddressesToAllocate` must be specified. NumberOfIpAddressesToAllocate *string `pulumi:"numberOfIpAddressesToAllocate"` } // The set of arguments for constructing a NetworkManagerIpamPoolStaticCidr resource. type NetworkManagerIpamPoolStaticCidrArgs struct { // Specifies a list of IPv4 or IPv6 IP address prefixes which will be allocated to the Static CIDR. // // > **Note:** Exactly one of `addressPrefixes` or `numberOfIpAddressesToAllocate` must be specified. AddressPrefixes pulumi.StringArrayInput // The ID of the Network Manager IP Address Management (IPAM) Pool. Changing this forces a new Network Manager IPAM Pool Static CIDR to be created. IpamPoolId pulumi.StringInput // The name which should be used for this Network Manager IPAM Pool Static CIDR. Changing this forces a new Network Manager IPAM Pool Static CIDR to be created. Name pulumi.StringPtrInput // The number of IP addresses to allocate to the Static CIDR. The value must be a string representing a positive integer which is a positive power of 2, e.g., `"16"`. // // > **Note:** Exactly one of `addressPrefixes` or `numberOfIpAddressesToAllocate` must be specified. NumberOfIpAddressesToAllocate pulumi.StringPtrInput } func (NetworkManagerIpamPoolStaticCidrArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerIpamPoolStaticCidrArgs)(nil)).Elem() } type NetworkManagerIpamPoolStaticCidrInput interface { pulumi.Input ToNetworkManagerIpamPoolStaticCidrOutput() NetworkManagerIpamPoolStaticCidrOutput ToNetworkManagerIpamPoolStaticCidrOutputWithContext(ctx context.Context) NetworkManagerIpamPoolStaticCidrOutput } func (*NetworkManagerIpamPoolStaticCidr) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerIpamPoolStaticCidr)(nil)).Elem() } func (i *NetworkManagerIpamPoolStaticCidr) ToNetworkManagerIpamPoolStaticCidrOutput() NetworkManagerIpamPoolStaticCidrOutput { return i.ToNetworkManagerIpamPoolStaticCidrOutputWithContext(context.Background()) } func (i *NetworkManagerIpamPoolStaticCidr) ToNetworkManagerIpamPoolStaticCidrOutputWithContext(ctx context.Context) NetworkManagerIpamPoolStaticCidrOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerIpamPoolStaticCidrOutput) } // NetworkManagerIpamPoolStaticCidrArrayInput is an input type that accepts NetworkManagerIpamPoolStaticCidrArray and NetworkManagerIpamPoolStaticCidrArrayOutput values. // You can construct a concrete instance of `NetworkManagerIpamPoolStaticCidrArrayInput` via: // // NetworkManagerIpamPoolStaticCidrArray{ NetworkManagerIpamPoolStaticCidrArgs{...} } type NetworkManagerIpamPoolStaticCidrArrayInput interface { pulumi.Input ToNetworkManagerIpamPoolStaticCidrArrayOutput() NetworkManagerIpamPoolStaticCidrArrayOutput ToNetworkManagerIpamPoolStaticCidrArrayOutputWithContext(context.Context) NetworkManagerIpamPoolStaticCidrArrayOutput } type NetworkManagerIpamPoolStaticCidrArray []NetworkManagerIpamPoolStaticCidrInput func (NetworkManagerIpamPoolStaticCidrArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerIpamPoolStaticCidr)(nil)).Elem() } func (i NetworkManagerIpamPoolStaticCidrArray) ToNetworkManagerIpamPoolStaticCidrArrayOutput() NetworkManagerIpamPoolStaticCidrArrayOutput { return i.ToNetworkManagerIpamPoolStaticCidrArrayOutputWithContext(context.Background()) } func (i NetworkManagerIpamPoolStaticCidrArray) ToNetworkManagerIpamPoolStaticCidrArrayOutputWithContext(ctx context.Context) NetworkManagerIpamPoolStaticCidrArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerIpamPoolStaticCidrArrayOutput) } // NetworkManagerIpamPoolStaticCidrMapInput is an input type that accepts NetworkManagerIpamPoolStaticCidrMap and NetworkManagerIpamPoolStaticCidrMapOutput values. // You can construct a concrete instance of `NetworkManagerIpamPoolStaticCidrMapInput` via: // // NetworkManagerIpamPoolStaticCidrMap{ "key": NetworkManagerIpamPoolStaticCidrArgs{...} } type NetworkManagerIpamPoolStaticCidrMapInput interface { pulumi.Input ToNetworkManagerIpamPoolStaticCidrMapOutput() NetworkManagerIpamPoolStaticCidrMapOutput ToNetworkManagerIpamPoolStaticCidrMapOutputWithContext(context.Context) NetworkManagerIpamPoolStaticCidrMapOutput } type NetworkManagerIpamPoolStaticCidrMap map[string]NetworkManagerIpamPoolStaticCidrInput func (NetworkManagerIpamPoolStaticCidrMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerIpamPoolStaticCidr)(nil)).Elem() } func (i NetworkManagerIpamPoolStaticCidrMap) ToNetworkManagerIpamPoolStaticCidrMapOutput() NetworkManagerIpamPoolStaticCidrMapOutput { return i.ToNetworkManagerIpamPoolStaticCidrMapOutputWithContext(context.Background()) } func (i NetworkManagerIpamPoolStaticCidrMap) ToNetworkManagerIpamPoolStaticCidrMapOutputWithContext(ctx context.Context) NetworkManagerIpamPoolStaticCidrMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerIpamPoolStaticCidrMapOutput) } type NetworkManagerIpamPoolStaticCidrOutput struct{ *pulumi.OutputState } func (NetworkManagerIpamPoolStaticCidrOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerIpamPoolStaticCidr)(nil)).Elem() } func (o NetworkManagerIpamPoolStaticCidrOutput) ToNetworkManagerIpamPoolStaticCidrOutput() NetworkManagerIpamPoolStaticCidrOutput { return o } func (o NetworkManagerIpamPoolStaticCidrOutput) ToNetworkManagerIpamPoolStaticCidrOutputWithContext(ctx context.Context) NetworkManagerIpamPoolStaticCidrOutput { return o } // Specifies a list of IPv4 or IPv6 IP address prefixes which will be allocated to the Static CIDR. // // > **Note:** Exactly one of `addressPrefixes` or `numberOfIpAddressesToAllocate` must be specified. func (o NetworkManagerIpamPoolStaticCidrOutput) AddressPrefixes() pulumi.StringArrayOutput { return o.ApplyT(func(v *NetworkManagerIpamPoolStaticCidr) pulumi.StringArrayOutput { return v.AddressPrefixes }).(pulumi.StringArrayOutput) } // The ID of the Network Manager IP Address Management (IPAM) Pool. Changing this forces a new Network Manager IPAM Pool Static CIDR to be created. func (o NetworkManagerIpamPoolStaticCidrOutput) IpamPoolId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerIpamPoolStaticCidr) pulumi.StringOutput { return v.IpamPoolId }).(pulumi.StringOutput) } // The name which should be used for this Network Manager IPAM Pool Static CIDR. Changing this forces a new Network Manager IPAM Pool Static CIDR to be created. func (o NetworkManagerIpamPoolStaticCidrOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerIpamPoolStaticCidr) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The number of IP addresses to allocate to the Static CIDR. The value must be a string representing a positive integer which is a positive power of 2, e.g., `"16"`. // // > **Note:** Exactly one of `addressPrefixes` or `numberOfIpAddressesToAllocate` must be specified. func (o NetworkManagerIpamPoolStaticCidrOutput) NumberOfIpAddressesToAllocate() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkManagerIpamPoolStaticCidr) pulumi.StringPtrOutput { return v.NumberOfIpAddressesToAllocate }).(pulumi.StringPtrOutput) } type NetworkManagerIpamPoolStaticCidrArrayOutput struct{ *pulumi.OutputState } func (NetworkManagerIpamPoolStaticCidrArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerIpamPoolStaticCidr)(nil)).Elem() } func (o NetworkManagerIpamPoolStaticCidrArrayOutput) ToNetworkManagerIpamPoolStaticCidrArrayOutput() NetworkManagerIpamPoolStaticCidrArrayOutput { return o } func (o NetworkManagerIpamPoolStaticCidrArrayOutput) ToNetworkManagerIpamPoolStaticCidrArrayOutputWithContext(ctx context.Context) NetworkManagerIpamPoolStaticCidrArrayOutput { return o } func (o NetworkManagerIpamPoolStaticCidrArrayOutput) Index(i pulumi.IntInput) NetworkManagerIpamPoolStaticCidrOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkManagerIpamPoolStaticCidr { return vs[0].([]*NetworkManagerIpamPoolStaticCidr)[vs[1].(int)] }).(NetworkManagerIpamPoolStaticCidrOutput) } type NetworkManagerIpamPoolStaticCidrMapOutput struct{ *pulumi.OutputState } func (NetworkManagerIpamPoolStaticCidrMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerIpamPoolStaticCidr)(nil)).Elem() } func (o NetworkManagerIpamPoolStaticCidrMapOutput) ToNetworkManagerIpamPoolStaticCidrMapOutput() NetworkManagerIpamPoolStaticCidrMapOutput { return o } func (o NetworkManagerIpamPoolStaticCidrMapOutput) ToNetworkManagerIpamPoolStaticCidrMapOutputWithContext(ctx context.Context) NetworkManagerIpamPoolStaticCidrMapOutput { return o } func (o NetworkManagerIpamPoolStaticCidrMapOutput) MapIndex(k pulumi.StringInput) NetworkManagerIpamPoolStaticCidrOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkManagerIpamPoolStaticCidr { return vs[0].(map[string]*NetworkManagerIpamPoolStaticCidr)[vs[1].(string)] }).(NetworkManagerIpamPoolStaticCidrOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerIpamPoolStaticCidrInput)(nil)).Elem(), &NetworkManagerIpamPoolStaticCidr{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerIpamPoolStaticCidrArrayInput)(nil)).Elem(), NetworkManagerIpamPoolStaticCidrArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerIpamPoolStaticCidrMapInput)(nil)).Elem(), NetworkManagerIpamPoolStaticCidrMap{}) pulumi.RegisterOutputType(NetworkManagerIpamPoolStaticCidrOutput{}) pulumi.RegisterOutputType(NetworkManagerIpamPoolStaticCidrArrayOutput{}) pulumi.RegisterOutputType(NetworkManagerIpamPoolStaticCidrMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/virtualNetworkGatewayConnection.go
sdk/go/azure/network/virtualNetworkGatewayConnection.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a connection in an existing Virtual Network Gateway. // // ## Example Usage // // ### Site-to-Site connection // // The following example shows a connection between an Azure virtual network // and an on-premises VPN device and network. // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("test"), // Location: pulumi.String("West US"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("test"), // Location: example.Location, // ResourceGroupName: example.Name, // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("GatewaySubnet"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.1.0/24"), // }, // }) // if err != nil { // return err // } // onpremise, err := network.NewLocalNetworkGateway(ctx, "onpremise", &network.LocalNetworkGatewayArgs{ // Name: pulumi.String("onpremise"), // Location: example.Location, // ResourceGroupName: example.Name, // GatewayAddress: pulumi.String("168.62.225.23"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.1.1.0/24"), // }, // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("test"), // Location: example.Location, // ResourceGroupName: example.Name, // AllocationMethod: pulumi.String("Dynamic"), // }) // if err != nil { // return err // } // exampleVirtualNetworkGateway, err := network.NewVirtualNetworkGateway(ctx, "example", &network.VirtualNetworkGatewayArgs{ // Name: pulumi.String("test"), // Location: example.Location, // ResourceGroupName: example.Name, // Type: pulumi.String("Vpn"), // VpnType: pulumi.String("RouteBased"), // ActiveActive: pulumi.Bool(false), // EnableBgp: pulumi.Bool(false), // Sku: pulumi.String("Basic"), // IpConfigurations: network.VirtualNetworkGatewayIpConfigurationArray{ // &network.VirtualNetworkGatewayIpConfigurationArgs{ // PublicIpAddressId: examplePublicIp.ID(), // PrivateIpAddressAllocation: pulumi.String("Dynamic"), // SubnetId: exampleSubnet.ID(), // }, // }, // }) // if err != nil { // return err // } // _, err = network.NewVirtualNetworkGatewayConnection(ctx, "onpremise", &network.VirtualNetworkGatewayConnectionArgs{ // Name: pulumi.String("onpremise"), // Location: example.Location, // ResourceGroupName: example.Name, // Type: pulumi.String("IPsec"), // VirtualNetworkGatewayId: exampleVirtualNetworkGateway.ID(), // LocalNetworkGatewayId: onpremise.ID(), // SharedKey: pulumi.String("4-v3ry-53cr37-1p53c-5h4r3d-k3y"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### VNet-to-VNet connection // // The following example shows a connection between two Azure virtual network // in different locations/regions. // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // us, err := core.NewResourceGroup(ctx, "us", &core.ResourceGroupArgs{ // Name: pulumi.String("us"), // Location: pulumi.String("East US"), // }) // if err != nil { // return err // } // usVirtualNetwork, err := network.NewVirtualNetwork(ctx, "us", &network.VirtualNetworkArgs{ // Name: pulumi.String("us"), // Location: us.Location, // ResourceGroupName: us.Name, // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // }) // if err != nil { // return err // } // usGateway, err := network.NewSubnet(ctx, "us_gateway", &network.SubnetArgs{ // Name: pulumi.String("GatewaySubnet"), // ResourceGroupName: us.Name, // VirtualNetworkName: usVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.1.0/24"), // }, // }) // if err != nil { // return err // } // usPublicIp, err := network.NewPublicIp(ctx, "us", &network.PublicIpArgs{ // Name: pulumi.String("us"), // Location: us.Location, // ResourceGroupName: us.Name, // AllocationMethod: pulumi.String("Dynamic"), // }) // if err != nil { // return err // } // usVirtualNetworkGateway, err := network.NewVirtualNetworkGateway(ctx, "us", &network.VirtualNetworkGatewayArgs{ // Name: pulumi.String("us-gateway"), // Location: us.Location, // ResourceGroupName: us.Name, // Type: pulumi.String("Vpn"), // VpnType: pulumi.String("RouteBased"), // Sku: pulumi.String("Basic"), // IpConfigurations: network.VirtualNetworkGatewayIpConfigurationArray{ // &network.VirtualNetworkGatewayIpConfigurationArgs{ // PublicIpAddressId: usPublicIp.ID(), // PrivateIpAddressAllocation: pulumi.String("Dynamic"), // SubnetId: usGateway.ID(), // }, // }, // }) // if err != nil { // return err // } // europe, err := core.NewResourceGroup(ctx, "europe", &core.ResourceGroupArgs{ // Name: pulumi.String("europe"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // europeVirtualNetwork, err := network.NewVirtualNetwork(ctx, "europe", &network.VirtualNetworkArgs{ // Name: pulumi.String("europe"), // Location: europe.Location, // ResourceGroupName: europe.Name, // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.1.0.0/16"), // }, // }) // if err != nil { // return err // } // europeGateway, err := network.NewSubnet(ctx, "europe_gateway", &network.SubnetArgs{ // Name: pulumi.String("GatewaySubnet"), // ResourceGroupName: europe.Name, // VirtualNetworkName: europeVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.1.1.0/24"), // }, // }) // if err != nil { // return err // } // europePublicIp, err := network.NewPublicIp(ctx, "europe", &network.PublicIpArgs{ // Name: pulumi.String("europe"), // Location: europe.Location, // ResourceGroupName: europe.Name, // AllocationMethod: pulumi.String("Dynamic"), // }) // if err != nil { // return err // } // europeVirtualNetworkGateway, err := network.NewVirtualNetworkGateway(ctx, "europe", &network.VirtualNetworkGatewayArgs{ // Name: pulumi.String("europe-gateway"), // Location: europe.Location, // ResourceGroupName: europe.Name, // Type: pulumi.String("Vpn"), // VpnType: pulumi.String("RouteBased"), // Sku: pulumi.String("Basic"), // IpConfigurations: network.VirtualNetworkGatewayIpConfigurationArray{ // &network.VirtualNetworkGatewayIpConfigurationArgs{ // PublicIpAddressId: europePublicIp.ID(), // PrivateIpAddressAllocation: pulumi.String("Dynamic"), // SubnetId: europeGateway.ID(), // }, // }, // }) // if err != nil { // return err // } // _, err = network.NewVirtualNetworkGatewayConnection(ctx, "us_to_europe", &network.VirtualNetworkGatewayConnectionArgs{ // Name: pulumi.String("us-to-europe"), // Location: us.Location, // ResourceGroupName: us.Name, // Type: pulumi.String("Vnet2Vnet"), // VirtualNetworkGatewayId: usVirtualNetworkGateway.ID(), // PeerVirtualNetworkGatewayId: europeVirtualNetworkGateway.ID(), // SharedKey: pulumi.String("4-v3ry-53cr37-1p53c-5h4r3d-k3y"), // }) // if err != nil { // return err // } // _, err = network.NewVirtualNetworkGatewayConnection(ctx, "europe_to_us", &network.VirtualNetworkGatewayConnectionArgs{ // Name: pulumi.String("europe-to-us"), // Location: europe.Location, // ResourceGroupName: europe.Name, // Type: pulumi.String("Vnet2Vnet"), // VirtualNetworkGatewayId: europeVirtualNetworkGateway.ID(), // PeerVirtualNetworkGatewayId: usVirtualNetworkGateway.ID(), // SharedKey: pulumi.String("4-v3ry-53cr37-1p53c-5h4r3d-k3y"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Virtual Network Gateway Connections can be imported using their `resource id`, e.g. // // ```sh // $ pulumi import azure:network/virtualNetworkGatewayConnection:VirtualNetworkGatewayConnection exampleConnection /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup1/providers/Microsoft.Network/connections/myConnection1 // ``` type VirtualNetworkGatewayConnection struct { pulumi.CustomResourceState // The authorization key associated with the Express Route Circuit. This field is required only if the type is an ExpressRoute connection. AuthorizationKey pulumi.StringPtrOutput `pulumi:"authorizationKey"` // Connection mode to use. Possible values are `Default`, `InitiatorOnly` and `ResponderOnly`. Defaults to `Default`. Changing this value will force a resource to be created. ConnectionMode pulumi.StringPtrOutput `pulumi:"connectionMode"` // The IKE protocol version to use. Possible values are `IKEv1` and `IKEv2`, values are `IKEv1` and `IKEv2`. Defaults to `IKEv2`. Changing this forces a new resource to be created. // > **Note:** Only valid for `IPSec` connections on virtual network gateways with SKU `VpnGw1`, `VpnGw2`, `VpnGw3`, `VpnGw1AZ`, `VpnGw2AZ` or `VpnGw3AZ`. ConnectionProtocol pulumi.StringOutput `pulumi:"connectionProtocol"` // A `customBgpAddresses` block which is documented below. // The block can only be used on `IPSec` / `activeactive` connections, // For details about see [the relevant section in the Azure documentation](https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-aws-bgp). CustomBgpAddresses VirtualNetworkGatewayConnectionCustomBgpAddressesPtrOutput `pulumi:"customBgpAddresses"` // The dead peer detection timeout of this connection in seconds. Changing this forces a new resource to be created. DpdTimeoutSeconds pulumi.IntPtrOutput `pulumi:"dpdTimeoutSeconds"` // A list of the egress NAT Rule Ids. EgressNatRuleIds pulumi.StringArrayOutput `pulumi:"egressNatRuleIds"` // If `true`, BGP (Border Gateway Protocol) is enabled for this connection. Defaults to `false`. EnableBgp pulumi.BoolOutput `pulumi:"enableBgp"` // The ID of the Express Route Circuit when creating an ExpressRoute connection (i.e. when `type` is `ExpressRoute`). The Express Route Circuit can be in the same or in a different subscription. Changing this forces a new resource to be created. ExpressRouteCircuitId pulumi.StringPtrOutput `pulumi:"expressRouteCircuitId"` // If `true`, data packets will bypass ExpressRoute Gateway for data forwarding This is only valid for ExpressRoute connections. ExpressRouteGatewayBypass pulumi.BoolOutput `pulumi:"expressRouteGatewayBypass"` // A list of the ingress NAT Rule Ids. IngressNatRuleIds pulumi.StringArrayOutput `pulumi:"ingressNatRuleIds"` // A `ipsecPolicy` block which is documented below. // Only a single policy can be defined for a connection. For details on // custom policies refer to [the relevant section in the Azure documentation](https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-ipsecikepolicy-rm-powershell). IpsecPolicy VirtualNetworkGatewayConnectionIpsecPolicyPtrOutput `pulumi:"ipsecPolicy"` // Use private local Azure IP for the connection. Changing this forces a new resource to be created. LocalAzureIpAddressEnabled pulumi.BoolPtrOutput `pulumi:"localAzureIpAddressEnabled"` // The ID of the local network gateway when creating Site-to-Site connection (i.e. when `type` is `IPsec`). LocalNetworkGatewayId pulumi.StringPtrOutput `pulumi:"localNetworkGatewayId"` // The location/region where the connection is located. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the connection. Changing the name forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the peer virtual network gateway when creating a VNet-to-VNet connection (i.e. when `type` is `Vnet2Vnet`). The peer Virtual Network Gateway can be in the same or in a different subscription. Changing this forces a new resource to be created. PeerVirtualNetworkGatewayId pulumi.StringPtrOutput `pulumi:"peerVirtualNetworkGatewayId"` // Bypass the Express Route gateway when accessing private-links. When enabled `expressRouteGatewayBypass` must be set to `true`. Defaults to `false`. PrivateLinkFastPathEnabled pulumi.BoolPtrOutput `pulumi:"privateLinkFastPathEnabled"` // The name of the resource group in which to create the connection Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The routing weight. Defaults to `10`. RoutingWeight pulumi.IntOutput `pulumi:"routingWeight"` // The shared IPSec key. A key could be provided if a Site-to-Site, VNet-to-VNet or ExpressRoute connection is created. SharedKey pulumi.StringOutput `pulumi:"sharedKey"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // One or more `trafficSelectorPolicy` blocks which are documented below. // A `trafficSelectorPolicy` allows to specify a traffic selector policy proposal to be used in a virtual network gateway connection. // For details about traffic selectors refer to [the relevant section in the Azure documentation](https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-connect-multiple-policybased-rm-ps). TrafficSelectorPolicy VirtualNetworkGatewayConnectionTrafficSelectorPolicyPtrOutput `pulumi:"trafficSelectorPolicy"` // The type of connection. Valid options are `IPsec` (Site-to-Site), `ExpressRoute` (ExpressRoute), and `Vnet2Vnet` (VNet-to-VNet). Each connection type requires different mandatory arguments (refer to the examples above). Changing this forces a new resource to be created. Type pulumi.StringOutput `pulumi:"type"` // If `true`, policy-based traffic selectors are enabled for this connection. Enabling policy-based traffic selectors requires an `ipsecPolicy` block. Defaults to `false`. UsePolicyBasedTrafficSelectors pulumi.BoolOutput `pulumi:"usePolicyBasedTrafficSelectors"` // The ID of the Virtual Network Gateway in which the connection will be created. Changing this forces a new resource to be created. VirtualNetworkGatewayId pulumi.StringOutput `pulumi:"virtualNetworkGatewayId"` } // NewVirtualNetworkGatewayConnection registers a new resource with the given unique name, arguments, and options. func NewVirtualNetworkGatewayConnection(ctx *pulumi.Context, name string, args *VirtualNetworkGatewayConnectionArgs, opts ...pulumi.ResourceOption) (*VirtualNetworkGatewayConnection, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Type == nil { return nil, errors.New("invalid value for required argument 'Type'") } if args.VirtualNetworkGatewayId == nil { return nil, errors.New("invalid value for required argument 'VirtualNetworkGatewayId'") } if args.AuthorizationKey != nil { args.AuthorizationKey = pulumi.ToSecret(args.AuthorizationKey).(pulumi.StringPtrInput) } if args.SharedKey != nil { args.SharedKey = pulumi.ToSecret(args.SharedKey).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "authorizationKey", "sharedKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource VirtualNetworkGatewayConnection err := ctx.RegisterResource("azure:network/virtualNetworkGatewayConnection:VirtualNetworkGatewayConnection", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVirtualNetworkGatewayConnection gets an existing VirtualNetworkGatewayConnection resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetVirtualNetworkGatewayConnection(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VirtualNetworkGatewayConnectionState, opts ...pulumi.ResourceOption) (*VirtualNetworkGatewayConnection, error) { var resource VirtualNetworkGatewayConnection err := ctx.ReadResource("azure:network/virtualNetworkGatewayConnection:VirtualNetworkGatewayConnection", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VirtualNetworkGatewayConnection resources. type virtualNetworkGatewayConnectionState struct { // The authorization key associated with the Express Route Circuit. This field is required only if the type is an ExpressRoute connection. AuthorizationKey *string `pulumi:"authorizationKey"` // Connection mode to use. Possible values are `Default`, `InitiatorOnly` and `ResponderOnly`. Defaults to `Default`. Changing this value will force a resource to be created. ConnectionMode *string `pulumi:"connectionMode"` // The IKE protocol version to use. Possible values are `IKEv1` and `IKEv2`, values are `IKEv1` and `IKEv2`. Defaults to `IKEv2`. Changing this forces a new resource to be created. // > **Note:** Only valid for `IPSec` connections on virtual network gateways with SKU `VpnGw1`, `VpnGw2`, `VpnGw3`, `VpnGw1AZ`, `VpnGw2AZ` or `VpnGw3AZ`. ConnectionProtocol *string `pulumi:"connectionProtocol"` // A `customBgpAddresses` block which is documented below. // The block can only be used on `IPSec` / `activeactive` connections, // For details about see [the relevant section in the Azure documentation](https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-aws-bgp). CustomBgpAddresses *VirtualNetworkGatewayConnectionCustomBgpAddresses `pulumi:"customBgpAddresses"` // The dead peer detection timeout of this connection in seconds. Changing this forces a new resource to be created. DpdTimeoutSeconds *int `pulumi:"dpdTimeoutSeconds"` // A list of the egress NAT Rule Ids. EgressNatRuleIds []string `pulumi:"egressNatRuleIds"` // If `true`, BGP (Border Gateway Protocol) is enabled for this connection. Defaults to `false`. EnableBgp *bool `pulumi:"enableBgp"` // The ID of the Express Route Circuit when creating an ExpressRoute connection (i.e. when `type` is `ExpressRoute`). The Express Route Circuit can be in the same or in a different subscription. Changing this forces a new resource to be created. ExpressRouteCircuitId *string `pulumi:"expressRouteCircuitId"` // If `true`, data packets will bypass ExpressRoute Gateway for data forwarding This is only valid for ExpressRoute connections. ExpressRouteGatewayBypass *bool `pulumi:"expressRouteGatewayBypass"` // A list of the ingress NAT Rule Ids. IngressNatRuleIds []string `pulumi:"ingressNatRuleIds"` // A `ipsecPolicy` block which is documented below. // Only a single policy can be defined for a connection. For details on // custom policies refer to [the relevant section in the Azure documentation](https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-ipsecikepolicy-rm-powershell). IpsecPolicy *VirtualNetworkGatewayConnectionIpsecPolicy `pulumi:"ipsecPolicy"` // Use private local Azure IP for the connection. Changing this forces a new resource to be created. LocalAzureIpAddressEnabled *bool `pulumi:"localAzureIpAddressEnabled"` // The ID of the local network gateway when creating Site-to-Site connection (i.e. when `type` is `IPsec`). LocalNetworkGatewayId *string `pulumi:"localNetworkGatewayId"` // The location/region where the connection is located. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the connection. Changing the name forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the peer virtual network gateway when creating a VNet-to-VNet connection (i.e. when `type` is `Vnet2Vnet`). The peer Virtual Network Gateway can be in the same or in a different subscription. Changing this forces a new resource to be created. PeerVirtualNetworkGatewayId *string `pulumi:"peerVirtualNetworkGatewayId"` // Bypass the Express Route gateway when accessing private-links. When enabled `expressRouteGatewayBypass` must be set to `true`. Defaults to `false`. PrivateLinkFastPathEnabled *bool `pulumi:"privateLinkFastPathEnabled"` // The name of the resource group in which to create the connection Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The routing weight. Defaults to `10`. RoutingWeight *int `pulumi:"routingWeight"` // The shared IPSec key. A key could be provided if a Site-to-Site, VNet-to-VNet or ExpressRoute connection is created. SharedKey *string `pulumi:"sharedKey"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // One or more `trafficSelectorPolicy` blocks which are documented below. // A `trafficSelectorPolicy` allows to specify a traffic selector policy proposal to be used in a virtual network gateway connection. // For details about traffic selectors refer to [the relevant section in the Azure documentation](https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-connect-multiple-policybased-rm-ps). TrafficSelectorPolicy *VirtualNetworkGatewayConnectionTrafficSelectorPolicy `pulumi:"trafficSelectorPolicy"` // The type of connection. Valid options are `IPsec` (Site-to-Site), `ExpressRoute` (ExpressRoute), and `Vnet2Vnet` (VNet-to-VNet). Each connection type requires different mandatory arguments (refer to the examples above). Changing this forces a new resource to be created. Type *string `pulumi:"type"` // If `true`, policy-based traffic selectors are enabled for this connection. Enabling policy-based traffic selectors requires an `ipsecPolicy` block. Defaults to `false`. UsePolicyBasedTrafficSelectors *bool `pulumi:"usePolicyBasedTrafficSelectors"` // The ID of the Virtual Network Gateway in which the connection will be created. Changing this forces a new resource to be created. VirtualNetworkGatewayId *string `pulumi:"virtualNetworkGatewayId"` } type VirtualNetworkGatewayConnectionState struct { // The authorization key associated with the Express Route Circuit. This field is required only if the type is an ExpressRoute connection. AuthorizationKey pulumi.StringPtrInput // Connection mode to use. Possible values are `Default`, `InitiatorOnly` and `ResponderOnly`. Defaults to `Default`. Changing this value will force a resource to be created. ConnectionMode pulumi.StringPtrInput // The IKE protocol version to use. Possible values are `IKEv1` and `IKEv2`, values are `IKEv1` and `IKEv2`. Defaults to `IKEv2`. Changing this forces a new resource to be created. // > **Note:** Only valid for `IPSec` connections on virtual network gateways with SKU `VpnGw1`, `VpnGw2`, `VpnGw3`, `VpnGw1AZ`, `VpnGw2AZ` or `VpnGw3AZ`. ConnectionProtocol pulumi.StringPtrInput // A `customBgpAddresses` block which is documented below. // The block can only be used on `IPSec` / `activeactive` connections, // For details about see [the relevant section in the Azure documentation](https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-aws-bgp). CustomBgpAddresses VirtualNetworkGatewayConnectionCustomBgpAddressesPtrInput // The dead peer detection timeout of this connection in seconds. Changing this forces a new resource to be created. DpdTimeoutSeconds pulumi.IntPtrInput // A list of the egress NAT Rule Ids. EgressNatRuleIds pulumi.StringArrayInput // If `true`, BGP (Border Gateway Protocol) is enabled for this connection. Defaults to `false`. EnableBgp pulumi.BoolPtrInput // The ID of the Express Route Circuit when creating an ExpressRoute connection (i.e. when `type` is `ExpressRoute`). The Express Route Circuit can be in the same or in a different subscription. Changing this forces a new resource to be created. ExpressRouteCircuitId pulumi.StringPtrInput // If `true`, data packets will bypass ExpressRoute Gateway for data forwarding This is only valid for ExpressRoute connections. ExpressRouteGatewayBypass pulumi.BoolPtrInput // A list of the ingress NAT Rule Ids. IngressNatRuleIds pulumi.StringArrayInput // A `ipsecPolicy` block which is documented below. // Only a single policy can be defined for a connection. For details on // custom policies refer to [the relevant section in the Azure documentation](https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-ipsecikepolicy-rm-powershell). IpsecPolicy VirtualNetworkGatewayConnectionIpsecPolicyPtrInput // Use private local Azure IP for the connection. Changing this forces a new resource to be created. LocalAzureIpAddressEnabled pulumi.BoolPtrInput // The ID of the local network gateway when creating Site-to-Site connection (i.e. when `type` is `IPsec`). LocalNetworkGatewayId pulumi.StringPtrInput // The location/region where the connection is located. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the connection. Changing the name forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the peer virtual network gateway when creating a VNet-to-VNet connection (i.e. when `type` is `Vnet2Vnet`). The peer Virtual Network Gateway can be in the same or in a different subscription. Changing this forces a new resource to be created. PeerVirtualNetworkGatewayId pulumi.StringPtrInput // Bypass the Express Route gateway when accessing private-links. When enabled `expressRouteGatewayBypass` must be set to `true`. Defaults to `false`. PrivateLinkFastPathEnabled pulumi.BoolPtrInput // The name of the resource group in which to create the connection Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The routing weight. Defaults to `10`. RoutingWeight pulumi.IntPtrInput // The shared IPSec key. A key could be provided if a Site-to-Site, VNet-to-VNet or ExpressRoute connection is created. SharedKey pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // One or more `trafficSelectorPolicy` blocks which are documented below. // A `trafficSelectorPolicy` allows to specify a traffic selector policy proposal to be used in a virtual network gateway connection. // For details about traffic selectors refer to [the relevant section in the Azure documentation](https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-connect-multiple-policybased-rm-ps). TrafficSelectorPolicy VirtualNetworkGatewayConnectionTrafficSelectorPolicyPtrInput // The type of connection. Valid options are `IPsec` (Site-to-Site), `ExpressRoute` (ExpressRoute), and `Vnet2Vnet` (VNet-to-VNet). Each connection type requires different mandatory arguments (refer to the examples above). Changing this forces a new resource to be created. Type pulumi.StringPtrInput // If `true`, policy-based traffic selectors are enabled for this connection. Enabling policy-based traffic selectors requires an `ipsecPolicy` block. Defaults to `false`. UsePolicyBasedTrafficSelectors pulumi.BoolPtrInput // The ID of the Virtual Network Gateway in which the connection will be created. Changing this forces a new resource to be created. VirtualNetworkGatewayId pulumi.StringPtrInput } func (VirtualNetworkGatewayConnectionState) ElementType() reflect.Type { return reflect.TypeOf((*virtualNetworkGatewayConnectionState)(nil)).Elem() } type virtualNetworkGatewayConnectionArgs struct { // The authorization key associated with the Express Route Circuit. This field is required only if the type is an ExpressRoute connection. AuthorizationKey *string `pulumi:"authorizationKey"` // Connection mode to use. Possible values are `Default`, `InitiatorOnly` and `ResponderOnly`. Defaults to `Default`. Changing this value will force a resource to be created. ConnectionMode *string `pulumi:"connectionMode"` // The IKE protocol version to use. Possible values are `IKEv1` and `IKEv2`, values are `IKEv1` and `IKEv2`. Defaults to `IKEv2`. Changing this forces a new resource to be created. // > **Note:** Only valid for `IPSec` connections on virtual network gateways with SKU `VpnGw1`, `VpnGw2`, `VpnGw3`, `VpnGw1AZ`, `VpnGw2AZ` or `VpnGw3AZ`. ConnectionProtocol *string `pulumi:"connectionProtocol"` // A `customBgpAddresses` block which is documented below. // The block can only be used on `IPSec` / `activeactive` connections, // For details about see [the relevant section in the Azure documentation](https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-aws-bgp). CustomBgpAddresses *VirtualNetworkGatewayConnectionCustomBgpAddresses `pulumi:"customBgpAddresses"` // The dead peer detection timeout of this connection in seconds. Changing this forces a new resource to be created. DpdTimeoutSeconds *int `pulumi:"dpdTimeoutSeconds"` // A list of the egress NAT Rule Ids. EgressNatRuleIds []string `pulumi:"egressNatRuleIds"` // If `true`, BGP (Border Gateway Protocol) is enabled for this connection. Defaults to `false`. EnableBgp *bool `pulumi:"enableBgp"` // The ID of the Express Route Circuit when creating an ExpressRoute connection (i.e. when `type` is `ExpressRoute`). The Express Route Circuit can be in the same or in a different subscription. Changing this forces a new resource to be created. ExpressRouteCircuitId *string `pulumi:"expressRouteCircuitId"` // If `true`, data packets will bypass ExpressRoute Gateway for data forwarding This is only valid for ExpressRoute connections. ExpressRouteGatewayBypass *bool `pulumi:"expressRouteGatewayBypass"` // A list of the ingress NAT Rule Ids. IngressNatRuleIds []string `pulumi:"ingressNatRuleIds"` // A `ipsecPolicy` block which is documented below. // Only a single policy can be defined for a connection. For details on // custom policies refer to [the relevant section in the Azure documentation](https://docs.microsoft.com/azure/vpn-gateway/vpn-gateway-ipsecikepolicy-rm-powershell). IpsecPolicy *VirtualNetworkGatewayConnectionIpsecPolicy `pulumi:"ipsecPolicy"` // Use private local Azure IP for the connection. Changing this forces a new resource to be created. LocalAzureIpAddressEnabled *bool `pulumi:"localAzureIpAddressEnabled"` // The ID of the local network gateway when creating Site-to-Site connection (i.e. when `type` is `IPsec`). LocalNetworkGatewayId *string `pulumi:"localNetworkGatewayId"` // The location/region where the connection is located. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the connection. Changing the name forces a new resource to be created. Name *string `pulumi:"name"`
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
true
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/natGatewayPublicIpAssociation.go
sdk/go/azure/network/natGatewayPublicIpAssociation.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages the association between a NAT Gateway and a Public IP. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("example-PIP"), // Location: example.Location, // ResourceGroupName: example.Name, // AllocationMethod: pulumi.String("Static"), // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // exampleNatGateway, err := network.NewNatGateway(ctx, "example", &network.NatGatewayArgs{ // Name: pulumi.String("example-NatGateway"), // Location: example.Location, // ResourceGroupName: example.Name, // SkuName: pulumi.String("Standard"), // }) // if err != nil { // return err // } // _, err = network.NewNatGatewayPublicIpAssociation(ctx, "example", &network.NatGatewayPublicIpAssociationArgs{ // NatGatewayId: exampleNatGateway.ID(), // PublicIpAddressId: examplePublicIp.ID(), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Associations between NAT Gateway and Public IP Addresses can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/natGatewayPublicIpAssociation:NatGatewayPublicIpAssociation example "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/natGateways/gateway1|/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/publicIPAddresses/myPublicIpAddress1" // ``` type NatGatewayPublicIpAssociation struct { pulumi.CustomResourceState // The ID of the NAT Gateway. Changing this forces a new resource to be created. NatGatewayId pulumi.StringOutput `pulumi:"natGatewayId"` // The ID of the Public IP which this NAT Gateway which should be connected to. Changing this forces a new resource to be created. PublicIpAddressId pulumi.StringOutput `pulumi:"publicIpAddressId"` } // NewNatGatewayPublicIpAssociation registers a new resource with the given unique name, arguments, and options. func NewNatGatewayPublicIpAssociation(ctx *pulumi.Context, name string, args *NatGatewayPublicIpAssociationArgs, opts ...pulumi.ResourceOption) (*NatGatewayPublicIpAssociation, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.NatGatewayId == nil { return nil, errors.New("invalid value for required argument 'NatGatewayId'") } if args.PublicIpAddressId == nil { return nil, errors.New("invalid value for required argument 'PublicIpAddressId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NatGatewayPublicIpAssociation err := ctx.RegisterResource("azure:network/natGatewayPublicIpAssociation:NatGatewayPublicIpAssociation", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNatGatewayPublicIpAssociation gets an existing NatGatewayPublicIpAssociation resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetNatGatewayPublicIpAssociation(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NatGatewayPublicIpAssociationState, opts ...pulumi.ResourceOption) (*NatGatewayPublicIpAssociation, error) { var resource NatGatewayPublicIpAssociation err := ctx.ReadResource("azure:network/natGatewayPublicIpAssociation:NatGatewayPublicIpAssociation", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NatGatewayPublicIpAssociation resources. type natGatewayPublicIpAssociationState struct { // The ID of the NAT Gateway. Changing this forces a new resource to be created. NatGatewayId *string `pulumi:"natGatewayId"` // The ID of the Public IP which this NAT Gateway which should be connected to. Changing this forces a new resource to be created. PublicIpAddressId *string `pulumi:"publicIpAddressId"` } type NatGatewayPublicIpAssociationState struct { // The ID of the NAT Gateway. Changing this forces a new resource to be created. NatGatewayId pulumi.StringPtrInput // The ID of the Public IP which this NAT Gateway which should be connected to. Changing this forces a new resource to be created. PublicIpAddressId pulumi.StringPtrInput } func (NatGatewayPublicIpAssociationState) ElementType() reflect.Type { return reflect.TypeOf((*natGatewayPublicIpAssociationState)(nil)).Elem() } type natGatewayPublicIpAssociationArgs struct { // The ID of the NAT Gateway. Changing this forces a new resource to be created. NatGatewayId string `pulumi:"natGatewayId"` // The ID of the Public IP which this NAT Gateway which should be connected to. Changing this forces a new resource to be created. PublicIpAddressId string `pulumi:"publicIpAddressId"` } // The set of arguments for constructing a NatGatewayPublicIpAssociation resource. type NatGatewayPublicIpAssociationArgs struct { // The ID of the NAT Gateway. Changing this forces a new resource to be created. NatGatewayId pulumi.StringInput // The ID of the Public IP which this NAT Gateway which should be connected to. Changing this forces a new resource to be created. PublicIpAddressId pulumi.StringInput } func (NatGatewayPublicIpAssociationArgs) ElementType() reflect.Type { return reflect.TypeOf((*natGatewayPublicIpAssociationArgs)(nil)).Elem() } type NatGatewayPublicIpAssociationInput interface { pulumi.Input ToNatGatewayPublicIpAssociationOutput() NatGatewayPublicIpAssociationOutput ToNatGatewayPublicIpAssociationOutputWithContext(ctx context.Context) NatGatewayPublicIpAssociationOutput } func (*NatGatewayPublicIpAssociation) ElementType() reflect.Type { return reflect.TypeOf((**NatGatewayPublicIpAssociation)(nil)).Elem() } func (i *NatGatewayPublicIpAssociation) ToNatGatewayPublicIpAssociationOutput() NatGatewayPublicIpAssociationOutput { return i.ToNatGatewayPublicIpAssociationOutputWithContext(context.Background()) } func (i *NatGatewayPublicIpAssociation) ToNatGatewayPublicIpAssociationOutputWithContext(ctx context.Context) NatGatewayPublicIpAssociationOutput { return pulumi.ToOutputWithContext(ctx, i).(NatGatewayPublicIpAssociationOutput) } // NatGatewayPublicIpAssociationArrayInput is an input type that accepts NatGatewayPublicIpAssociationArray and NatGatewayPublicIpAssociationArrayOutput values. // You can construct a concrete instance of `NatGatewayPublicIpAssociationArrayInput` via: // // NatGatewayPublicIpAssociationArray{ NatGatewayPublicIpAssociationArgs{...} } type NatGatewayPublicIpAssociationArrayInput interface { pulumi.Input ToNatGatewayPublicIpAssociationArrayOutput() NatGatewayPublicIpAssociationArrayOutput ToNatGatewayPublicIpAssociationArrayOutputWithContext(context.Context) NatGatewayPublicIpAssociationArrayOutput } type NatGatewayPublicIpAssociationArray []NatGatewayPublicIpAssociationInput func (NatGatewayPublicIpAssociationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NatGatewayPublicIpAssociation)(nil)).Elem() } func (i NatGatewayPublicIpAssociationArray) ToNatGatewayPublicIpAssociationArrayOutput() NatGatewayPublicIpAssociationArrayOutput { return i.ToNatGatewayPublicIpAssociationArrayOutputWithContext(context.Background()) } func (i NatGatewayPublicIpAssociationArray) ToNatGatewayPublicIpAssociationArrayOutputWithContext(ctx context.Context) NatGatewayPublicIpAssociationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NatGatewayPublicIpAssociationArrayOutput) } // NatGatewayPublicIpAssociationMapInput is an input type that accepts NatGatewayPublicIpAssociationMap and NatGatewayPublicIpAssociationMapOutput values. // You can construct a concrete instance of `NatGatewayPublicIpAssociationMapInput` via: // // NatGatewayPublicIpAssociationMap{ "key": NatGatewayPublicIpAssociationArgs{...} } type NatGatewayPublicIpAssociationMapInput interface { pulumi.Input ToNatGatewayPublicIpAssociationMapOutput() NatGatewayPublicIpAssociationMapOutput ToNatGatewayPublicIpAssociationMapOutputWithContext(context.Context) NatGatewayPublicIpAssociationMapOutput } type NatGatewayPublicIpAssociationMap map[string]NatGatewayPublicIpAssociationInput func (NatGatewayPublicIpAssociationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NatGatewayPublicIpAssociation)(nil)).Elem() } func (i NatGatewayPublicIpAssociationMap) ToNatGatewayPublicIpAssociationMapOutput() NatGatewayPublicIpAssociationMapOutput { return i.ToNatGatewayPublicIpAssociationMapOutputWithContext(context.Background()) } func (i NatGatewayPublicIpAssociationMap) ToNatGatewayPublicIpAssociationMapOutputWithContext(ctx context.Context) NatGatewayPublicIpAssociationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NatGatewayPublicIpAssociationMapOutput) } type NatGatewayPublicIpAssociationOutput struct{ *pulumi.OutputState } func (NatGatewayPublicIpAssociationOutput) ElementType() reflect.Type { return reflect.TypeOf((**NatGatewayPublicIpAssociation)(nil)).Elem() } func (o NatGatewayPublicIpAssociationOutput) ToNatGatewayPublicIpAssociationOutput() NatGatewayPublicIpAssociationOutput { return o } func (o NatGatewayPublicIpAssociationOutput) ToNatGatewayPublicIpAssociationOutputWithContext(ctx context.Context) NatGatewayPublicIpAssociationOutput { return o } // The ID of the NAT Gateway. Changing this forces a new resource to be created. func (o NatGatewayPublicIpAssociationOutput) NatGatewayId() pulumi.StringOutput { return o.ApplyT(func(v *NatGatewayPublicIpAssociation) pulumi.StringOutput { return v.NatGatewayId }).(pulumi.StringOutput) } // The ID of the Public IP which this NAT Gateway which should be connected to. Changing this forces a new resource to be created. func (o NatGatewayPublicIpAssociationOutput) PublicIpAddressId() pulumi.StringOutput { return o.ApplyT(func(v *NatGatewayPublicIpAssociation) pulumi.StringOutput { return v.PublicIpAddressId }).(pulumi.StringOutput) } type NatGatewayPublicIpAssociationArrayOutput struct{ *pulumi.OutputState } func (NatGatewayPublicIpAssociationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NatGatewayPublicIpAssociation)(nil)).Elem() } func (o NatGatewayPublicIpAssociationArrayOutput) ToNatGatewayPublicIpAssociationArrayOutput() NatGatewayPublicIpAssociationArrayOutput { return o } func (o NatGatewayPublicIpAssociationArrayOutput) ToNatGatewayPublicIpAssociationArrayOutputWithContext(ctx context.Context) NatGatewayPublicIpAssociationArrayOutput { return o } func (o NatGatewayPublicIpAssociationArrayOutput) Index(i pulumi.IntInput) NatGatewayPublicIpAssociationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NatGatewayPublicIpAssociation { return vs[0].([]*NatGatewayPublicIpAssociation)[vs[1].(int)] }).(NatGatewayPublicIpAssociationOutput) } type NatGatewayPublicIpAssociationMapOutput struct{ *pulumi.OutputState } func (NatGatewayPublicIpAssociationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NatGatewayPublicIpAssociation)(nil)).Elem() } func (o NatGatewayPublicIpAssociationMapOutput) ToNatGatewayPublicIpAssociationMapOutput() NatGatewayPublicIpAssociationMapOutput { return o } func (o NatGatewayPublicIpAssociationMapOutput) ToNatGatewayPublicIpAssociationMapOutputWithContext(ctx context.Context) NatGatewayPublicIpAssociationMapOutput { return o } func (o NatGatewayPublicIpAssociationMapOutput) MapIndex(k pulumi.StringInput) NatGatewayPublicIpAssociationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NatGatewayPublicIpAssociation { return vs[0].(map[string]*NatGatewayPublicIpAssociation)[vs[1].(string)] }).(NatGatewayPublicIpAssociationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NatGatewayPublicIpAssociationInput)(nil)).Elem(), &NatGatewayPublicIpAssociation{}) pulumi.RegisterInputType(reflect.TypeOf((*NatGatewayPublicIpAssociationArrayInput)(nil)).Elem(), NatGatewayPublicIpAssociationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NatGatewayPublicIpAssociationMapInput)(nil)).Elem(), NatGatewayPublicIpAssociationMap{}) pulumi.RegisterOutputType(NatGatewayPublicIpAssociationOutput{}) pulumi.RegisterOutputType(NatGatewayPublicIpAssociationArrayOutput{}) pulumi.RegisterOutputType(NatGatewayPublicIpAssociationMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/expressRouteCircuitConnection.go
sdk/go/azure/network/expressRouteCircuitConnection.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Express Route Circuit Connection. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleExpressRoutePort, err := network.NewExpressRoutePort(ctx, "example", &network.ExpressRoutePortArgs{ // Name: pulumi.String("example-erport"), // ResourceGroupName: example.Name, // Location: example.Location, // PeeringLocation: pulumi.String("Equinix-Seattle-SE2"), // BandwidthInGbps: pulumi.Int(10), // Encapsulation: pulumi.String("Dot1Q"), // }) // if err != nil { // return err // } // exampleExpressRouteCircuit, err := network.NewExpressRouteCircuit(ctx, "example", &network.ExpressRouteCircuitArgs{ // Name: pulumi.String("example-ercircuit"), // Location: example.Location, // ResourceGroupName: example.Name, // ExpressRoutePortId: exampleExpressRoutePort.ID(), // BandwidthInGbps: pulumi.Float64(5), // Sku: &network.ExpressRouteCircuitSkuArgs{ // Tier: pulumi.String("Standard"), // Family: pulumi.String("MeteredData"), // }, // }) // if err != nil { // return err // } // example2, err := network.NewExpressRoutePort(ctx, "example2", &network.ExpressRoutePortArgs{ // Name: pulumi.String("example-erport2"), // ResourceGroupName: example.Name, // Location: example.Location, // PeeringLocation: pulumi.String("Allied-Toronto-King-West"), // BandwidthInGbps: pulumi.Int(10), // Encapsulation: pulumi.String("Dot1Q"), // }) // if err != nil { // return err // } // example2ExpressRouteCircuit, err := network.NewExpressRouteCircuit(ctx, "example2", &network.ExpressRouteCircuitArgs{ // Name: pulumi.String("example-ercircuit2"), // Location: example.Location, // ResourceGroupName: example.Name, // ExpressRoutePortId: example2.ID(), // BandwidthInGbps: pulumi.Float64(5), // Sku: &network.ExpressRouteCircuitSkuArgs{ // Tier: pulumi.String("Standard"), // Family: pulumi.String("MeteredData"), // }, // }) // if err != nil { // return err // } // exampleExpressRouteCircuitPeering, err := network.NewExpressRouteCircuitPeering(ctx, "example", &network.ExpressRouteCircuitPeeringArgs{ // PeeringType: pulumi.String("AzurePrivatePeering"), // ExpressRouteCircuitName: exampleExpressRouteCircuit.Name, // ResourceGroupName: example.Name, // SharedKey: pulumi.String("ItsASecret"), // PeerAsn: pulumi.Int(100), // PrimaryPeerAddressPrefix: pulumi.String("192.168.1.0/30"), // SecondaryPeerAddressPrefix: pulumi.String("192.168.1.0/30"), // VlanId: pulumi.Int(100), // }) // if err != nil { // return err // } // example2ExpressRouteCircuitPeering, err := network.NewExpressRouteCircuitPeering(ctx, "example2", &network.ExpressRouteCircuitPeeringArgs{ // PeeringType: pulumi.String("AzurePrivatePeering"), // ExpressRouteCircuitName: example2ExpressRouteCircuit.Name, // ResourceGroupName: example.Name, // SharedKey: pulumi.String("ItsASecret"), // PeerAsn: pulumi.Int(100), // PrimaryPeerAddressPrefix: pulumi.String("192.168.1.0/30"), // SecondaryPeerAddressPrefix: pulumi.String("192.168.1.0/30"), // VlanId: pulumi.Int(100), // }) // if err != nil { // return err // } // _, err = network.NewExpressRouteCircuitConnection(ctx, "example", &network.ExpressRouteCircuitConnectionArgs{ // Name: pulumi.String("example-ercircuitconnection"), // PeeringId: exampleExpressRouteCircuitPeering.ID(), // PeerPeeringId: example2ExpressRouteCircuitPeering.ID(), // AddressPrefixIpv4: pulumi.String("192.169.9.0/29"), // AuthorizationKey: pulumi.String("846a1918-b7a2-4917-b43c-8c4cdaee006a"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Express Route Circuit Connections can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/expressRouteCircuitConnection:ExpressRouteCircuitConnection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/expressRouteCircuits/circuit1/peerings/peering1/connections/connection1 // ``` type ExpressRouteCircuitConnection struct { pulumi.CustomResourceState // The IPv4 address space from which to allocate customer address for global reach. Changing this forces a new Express Route Circuit Connection to be created. AddressPrefixIpv4 pulumi.StringOutput `pulumi:"addressPrefixIpv4"` // The IPv6 address space from which to allocate customer addresses for global reach. // // > **Note:** `addressPrefixIpv6` cannot be set when ExpressRoute Circuit Connection with ExpressRoute Circuit based on ExpressRoute Port. AddressPrefixIpv6 pulumi.StringPtrOutput `pulumi:"addressPrefixIpv6"` // The authorization key which is associated with the Express Route Circuit Connection. AuthorizationKey pulumi.StringPtrOutput `pulumi:"authorizationKey"` // The name which should be used for this Express Route Circuit Connection. Changing this forces a new Express Route Circuit Connection to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the peered Express Route Circuit Private Peering. Changing this forces a new Express Route Circuit Connection to be created. PeerPeeringId pulumi.StringOutput `pulumi:"peerPeeringId"` // The ID of the Express Route Circuit Private Peering that this Express Route Circuit Connection connects with. Changing this forces a new Express Route Circuit Connection to be created. PeeringId pulumi.StringOutput `pulumi:"peeringId"` } // NewExpressRouteCircuitConnection registers a new resource with the given unique name, arguments, and options. func NewExpressRouteCircuitConnection(ctx *pulumi.Context, name string, args *ExpressRouteCircuitConnectionArgs, opts ...pulumi.ResourceOption) (*ExpressRouteCircuitConnection, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.AddressPrefixIpv4 == nil { return nil, errors.New("invalid value for required argument 'AddressPrefixIpv4'") } if args.PeerPeeringId == nil { return nil, errors.New("invalid value for required argument 'PeerPeeringId'") } if args.PeeringId == nil { return nil, errors.New("invalid value for required argument 'PeeringId'") } if args.AuthorizationKey != nil { args.AuthorizationKey = pulumi.ToSecret(args.AuthorizationKey).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "authorizationKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource ExpressRouteCircuitConnection err := ctx.RegisterResource("azure:network/expressRouteCircuitConnection:ExpressRouteCircuitConnection", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetExpressRouteCircuitConnection gets an existing ExpressRouteCircuitConnection resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetExpressRouteCircuitConnection(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ExpressRouteCircuitConnectionState, opts ...pulumi.ResourceOption) (*ExpressRouteCircuitConnection, error) { var resource ExpressRouteCircuitConnection err := ctx.ReadResource("azure:network/expressRouteCircuitConnection:ExpressRouteCircuitConnection", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ExpressRouteCircuitConnection resources. type expressRouteCircuitConnectionState struct { // The IPv4 address space from which to allocate customer address for global reach. Changing this forces a new Express Route Circuit Connection to be created. AddressPrefixIpv4 *string `pulumi:"addressPrefixIpv4"` // The IPv6 address space from which to allocate customer addresses for global reach. // // > **Note:** `addressPrefixIpv6` cannot be set when ExpressRoute Circuit Connection with ExpressRoute Circuit based on ExpressRoute Port. AddressPrefixIpv6 *string `pulumi:"addressPrefixIpv6"` // The authorization key which is associated with the Express Route Circuit Connection. AuthorizationKey *string `pulumi:"authorizationKey"` // The name which should be used for this Express Route Circuit Connection. Changing this forces a new Express Route Circuit Connection to be created. Name *string `pulumi:"name"` // The ID of the peered Express Route Circuit Private Peering. Changing this forces a new Express Route Circuit Connection to be created. PeerPeeringId *string `pulumi:"peerPeeringId"` // The ID of the Express Route Circuit Private Peering that this Express Route Circuit Connection connects with. Changing this forces a new Express Route Circuit Connection to be created. PeeringId *string `pulumi:"peeringId"` } type ExpressRouteCircuitConnectionState struct { // The IPv4 address space from which to allocate customer address for global reach. Changing this forces a new Express Route Circuit Connection to be created. AddressPrefixIpv4 pulumi.StringPtrInput // The IPv6 address space from which to allocate customer addresses for global reach. // // > **Note:** `addressPrefixIpv6` cannot be set when ExpressRoute Circuit Connection with ExpressRoute Circuit based on ExpressRoute Port. AddressPrefixIpv6 pulumi.StringPtrInput // The authorization key which is associated with the Express Route Circuit Connection. AuthorizationKey pulumi.StringPtrInput // The name which should be used for this Express Route Circuit Connection. Changing this forces a new Express Route Circuit Connection to be created. Name pulumi.StringPtrInput // The ID of the peered Express Route Circuit Private Peering. Changing this forces a new Express Route Circuit Connection to be created. PeerPeeringId pulumi.StringPtrInput // The ID of the Express Route Circuit Private Peering that this Express Route Circuit Connection connects with. Changing this forces a new Express Route Circuit Connection to be created. PeeringId pulumi.StringPtrInput } func (ExpressRouteCircuitConnectionState) ElementType() reflect.Type { return reflect.TypeOf((*expressRouteCircuitConnectionState)(nil)).Elem() } type expressRouteCircuitConnectionArgs struct { // The IPv4 address space from which to allocate customer address for global reach. Changing this forces a new Express Route Circuit Connection to be created. AddressPrefixIpv4 string `pulumi:"addressPrefixIpv4"` // The IPv6 address space from which to allocate customer addresses for global reach. // // > **Note:** `addressPrefixIpv6` cannot be set when ExpressRoute Circuit Connection with ExpressRoute Circuit based on ExpressRoute Port. AddressPrefixIpv6 *string `pulumi:"addressPrefixIpv6"` // The authorization key which is associated with the Express Route Circuit Connection. AuthorizationKey *string `pulumi:"authorizationKey"` // The name which should be used for this Express Route Circuit Connection. Changing this forces a new Express Route Circuit Connection to be created. Name *string `pulumi:"name"` // The ID of the peered Express Route Circuit Private Peering. Changing this forces a new Express Route Circuit Connection to be created. PeerPeeringId string `pulumi:"peerPeeringId"` // The ID of the Express Route Circuit Private Peering that this Express Route Circuit Connection connects with. Changing this forces a new Express Route Circuit Connection to be created. PeeringId string `pulumi:"peeringId"` } // The set of arguments for constructing a ExpressRouteCircuitConnection resource. type ExpressRouteCircuitConnectionArgs struct { // The IPv4 address space from which to allocate customer address for global reach. Changing this forces a new Express Route Circuit Connection to be created. AddressPrefixIpv4 pulumi.StringInput // The IPv6 address space from which to allocate customer addresses for global reach. // // > **Note:** `addressPrefixIpv6` cannot be set when ExpressRoute Circuit Connection with ExpressRoute Circuit based on ExpressRoute Port. AddressPrefixIpv6 pulumi.StringPtrInput // The authorization key which is associated with the Express Route Circuit Connection. AuthorizationKey pulumi.StringPtrInput // The name which should be used for this Express Route Circuit Connection. Changing this forces a new Express Route Circuit Connection to be created. Name pulumi.StringPtrInput // The ID of the peered Express Route Circuit Private Peering. Changing this forces a new Express Route Circuit Connection to be created. PeerPeeringId pulumi.StringInput // The ID of the Express Route Circuit Private Peering that this Express Route Circuit Connection connects with. Changing this forces a new Express Route Circuit Connection to be created. PeeringId pulumi.StringInput } func (ExpressRouteCircuitConnectionArgs) ElementType() reflect.Type { return reflect.TypeOf((*expressRouteCircuitConnectionArgs)(nil)).Elem() } type ExpressRouteCircuitConnectionInput interface { pulumi.Input ToExpressRouteCircuitConnectionOutput() ExpressRouteCircuitConnectionOutput ToExpressRouteCircuitConnectionOutputWithContext(ctx context.Context) ExpressRouteCircuitConnectionOutput } func (*ExpressRouteCircuitConnection) ElementType() reflect.Type { return reflect.TypeOf((**ExpressRouteCircuitConnection)(nil)).Elem() } func (i *ExpressRouteCircuitConnection) ToExpressRouteCircuitConnectionOutput() ExpressRouteCircuitConnectionOutput { return i.ToExpressRouteCircuitConnectionOutputWithContext(context.Background()) } func (i *ExpressRouteCircuitConnection) ToExpressRouteCircuitConnectionOutputWithContext(ctx context.Context) ExpressRouteCircuitConnectionOutput { return pulumi.ToOutputWithContext(ctx, i).(ExpressRouteCircuitConnectionOutput) } // ExpressRouteCircuitConnectionArrayInput is an input type that accepts ExpressRouteCircuitConnectionArray and ExpressRouteCircuitConnectionArrayOutput values. // You can construct a concrete instance of `ExpressRouteCircuitConnectionArrayInput` via: // // ExpressRouteCircuitConnectionArray{ ExpressRouteCircuitConnectionArgs{...} } type ExpressRouteCircuitConnectionArrayInput interface { pulumi.Input ToExpressRouteCircuitConnectionArrayOutput() ExpressRouteCircuitConnectionArrayOutput ToExpressRouteCircuitConnectionArrayOutputWithContext(context.Context) ExpressRouteCircuitConnectionArrayOutput } type ExpressRouteCircuitConnectionArray []ExpressRouteCircuitConnectionInput func (ExpressRouteCircuitConnectionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ExpressRouteCircuitConnection)(nil)).Elem() } func (i ExpressRouteCircuitConnectionArray) ToExpressRouteCircuitConnectionArrayOutput() ExpressRouteCircuitConnectionArrayOutput { return i.ToExpressRouteCircuitConnectionArrayOutputWithContext(context.Background()) } func (i ExpressRouteCircuitConnectionArray) ToExpressRouteCircuitConnectionArrayOutputWithContext(ctx context.Context) ExpressRouteCircuitConnectionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ExpressRouteCircuitConnectionArrayOutput) } // ExpressRouteCircuitConnectionMapInput is an input type that accepts ExpressRouteCircuitConnectionMap and ExpressRouteCircuitConnectionMapOutput values. // You can construct a concrete instance of `ExpressRouteCircuitConnectionMapInput` via: // // ExpressRouteCircuitConnectionMap{ "key": ExpressRouteCircuitConnectionArgs{...} } type ExpressRouteCircuitConnectionMapInput interface { pulumi.Input ToExpressRouteCircuitConnectionMapOutput() ExpressRouteCircuitConnectionMapOutput ToExpressRouteCircuitConnectionMapOutputWithContext(context.Context) ExpressRouteCircuitConnectionMapOutput } type ExpressRouteCircuitConnectionMap map[string]ExpressRouteCircuitConnectionInput func (ExpressRouteCircuitConnectionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ExpressRouteCircuitConnection)(nil)).Elem() } func (i ExpressRouteCircuitConnectionMap) ToExpressRouteCircuitConnectionMapOutput() ExpressRouteCircuitConnectionMapOutput { return i.ToExpressRouteCircuitConnectionMapOutputWithContext(context.Background()) } func (i ExpressRouteCircuitConnectionMap) ToExpressRouteCircuitConnectionMapOutputWithContext(ctx context.Context) ExpressRouteCircuitConnectionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ExpressRouteCircuitConnectionMapOutput) } type ExpressRouteCircuitConnectionOutput struct{ *pulumi.OutputState } func (ExpressRouteCircuitConnectionOutput) ElementType() reflect.Type { return reflect.TypeOf((**ExpressRouteCircuitConnection)(nil)).Elem() } func (o ExpressRouteCircuitConnectionOutput) ToExpressRouteCircuitConnectionOutput() ExpressRouteCircuitConnectionOutput { return o } func (o ExpressRouteCircuitConnectionOutput) ToExpressRouteCircuitConnectionOutputWithContext(ctx context.Context) ExpressRouteCircuitConnectionOutput { return o } // The IPv4 address space from which to allocate customer address for global reach. Changing this forces a new Express Route Circuit Connection to be created. func (o ExpressRouteCircuitConnectionOutput) AddressPrefixIpv4() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteCircuitConnection) pulumi.StringOutput { return v.AddressPrefixIpv4 }).(pulumi.StringOutput) } // The IPv6 address space from which to allocate customer addresses for global reach. // // > **Note:** `addressPrefixIpv6` cannot be set when ExpressRoute Circuit Connection with ExpressRoute Circuit based on ExpressRoute Port. func (o ExpressRouteCircuitConnectionOutput) AddressPrefixIpv6() pulumi.StringPtrOutput { return o.ApplyT(func(v *ExpressRouteCircuitConnection) pulumi.StringPtrOutput { return v.AddressPrefixIpv6 }).(pulumi.StringPtrOutput) } // The authorization key which is associated with the Express Route Circuit Connection. func (o ExpressRouteCircuitConnectionOutput) AuthorizationKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *ExpressRouteCircuitConnection) pulumi.StringPtrOutput { return v.AuthorizationKey }).(pulumi.StringPtrOutput) } // The name which should be used for this Express Route Circuit Connection. Changing this forces a new Express Route Circuit Connection to be created. func (o ExpressRouteCircuitConnectionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteCircuitConnection) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the peered Express Route Circuit Private Peering. Changing this forces a new Express Route Circuit Connection to be created. func (o ExpressRouteCircuitConnectionOutput) PeerPeeringId() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteCircuitConnection) pulumi.StringOutput { return v.PeerPeeringId }).(pulumi.StringOutput) } // The ID of the Express Route Circuit Private Peering that this Express Route Circuit Connection connects with. Changing this forces a new Express Route Circuit Connection to be created. func (o ExpressRouteCircuitConnectionOutput) PeeringId() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteCircuitConnection) pulumi.StringOutput { return v.PeeringId }).(pulumi.StringOutput) } type ExpressRouteCircuitConnectionArrayOutput struct{ *pulumi.OutputState } func (ExpressRouteCircuitConnectionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ExpressRouteCircuitConnection)(nil)).Elem() } func (o ExpressRouteCircuitConnectionArrayOutput) ToExpressRouteCircuitConnectionArrayOutput() ExpressRouteCircuitConnectionArrayOutput { return o } func (o ExpressRouteCircuitConnectionArrayOutput) ToExpressRouteCircuitConnectionArrayOutputWithContext(ctx context.Context) ExpressRouteCircuitConnectionArrayOutput { return o } func (o ExpressRouteCircuitConnectionArrayOutput) Index(i pulumi.IntInput) ExpressRouteCircuitConnectionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ExpressRouteCircuitConnection { return vs[0].([]*ExpressRouteCircuitConnection)[vs[1].(int)] }).(ExpressRouteCircuitConnectionOutput) } type ExpressRouteCircuitConnectionMapOutput struct{ *pulumi.OutputState } func (ExpressRouteCircuitConnectionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ExpressRouteCircuitConnection)(nil)).Elem() } func (o ExpressRouteCircuitConnectionMapOutput) ToExpressRouteCircuitConnectionMapOutput() ExpressRouteCircuitConnectionMapOutput { return o } func (o ExpressRouteCircuitConnectionMapOutput) ToExpressRouteCircuitConnectionMapOutputWithContext(ctx context.Context) ExpressRouteCircuitConnectionMapOutput { return o } func (o ExpressRouteCircuitConnectionMapOutput) MapIndex(k pulumi.StringInput) ExpressRouteCircuitConnectionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ExpressRouteCircuitConnection { return vs[0].(map[string]*ExpressRouteCircuitConnection)[vs[1].(string)] }).(ExpressRouteCircuitConnectionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ExpressRouteCircuitConnectionInput)(nil)).Elem(), &ExpressRouteCircuitConnection{}) pulumi.RegisterInputType(reflect.TypeOf((*ExpressRouteCircuitConnectionArrayInput)(nil)).Elem(), ExpressRouteCircuitConnectionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ExpressRouteCircuitConnectionMapInput)(nil)).Elem(), ExpressRouteCircuitConnectionMap{}) pulumi.RegisterOutputType(ExpressRouteCircuitConnectionOutput{}) pulumi.RegisterOutputType(ExpressRouteCircuitConnectionArrayOutput{}) pulumi.RegisterOutputType(ExpressRouteCircuitConnectionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getVirtualNetwork.go
sdk/go/azure/network/getVirtualNetwork.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Virtual Network. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.LookupVirtualNetwork(ctx, &network.LookupVirtualNetworkArgs{ // Name: "production", // ResourceGroupName: "networking", // }, nil) // if err != nil { // return err // } // ctx.Export("virtualNetworkId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func LookupVirtualNetwork(ctx *pulumi.Context, args *LookupVirtualNetworkArgs, opts ...pulumi.InvokeOption) (*LookupVirtualNetworkResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupVirtualNetworkResult err := ctx.Invoke("azure:network/getVirtualNetwork:getVirtualNetwork", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getVirtualNetwork. type LookupVirtualNetworkArgs struct { // Specifies the name of the Virtual Network. Name string `pulumi:"name"` // Specifies the name of the resource group the Virtual Network is located in. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getVirtualNetwork. type LookupVirtualNetworkResult struct { // The list of address spaces used by the virtual network. AddressSpaces []string `pulumi:"addressSpaces"` // The list of DNS servers used by the virtual network. DnsServers []string `pulumi:"dnsServers"` // The GUID of the virtual network. Guid string `pulumi:"guid"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // Location of the virtual network. Location string `pulumi:"location"` Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // The list of name of the subnets that are attached to this virtual network. Subnets []string `pulumi:"subnets"` // A mapping of tags to assigned to the resource. Tags map[string]string `pulumi:"tags"` // A mapping of name - virtual network id of the virtual network peerings. VnetPeerings map[string]string `pulumi:"vnetPeerings"` // A list of virtual network peerings IP addresses. VnetPeeringsAddresses []string `pulumi:"vnetPeeringsAddresses"` } func LookupVirtualNetworkOutput(ctx *pulumi.Context, args LookupVirtualNetworkOutputArgs, opts ...pulumi.InvokeOption) LookupVirtualNetworkResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupVirtualNetworkResultOutput, error) { args := v.(LookupVirtualNetworkArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getVirtualNetwork:getVirtualNetwork", args, LookupVirtualNetworkResultOutput{}, options).(LookupVirtualNetworkResultOutput), nil }).(LookupVirtualNetworkResultOutput) } // A collection of arguments for invoking getVirtualNetwork. type LookupVirtualNetworkOutputArgs struct { // Specifies the name of the Virtual Network. Name pulumi.StringInput `pulumi:"name"` // Specifies the name of the resource group the Virtual Network is located in. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupVirtualNetworkOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupVirtualNetworkArgs)(nil)).Elem() } // A collection of values returned by getVirtualNetwork. type LookupVirtualNetworkResultOutput struct{ *pulumi.OutputState } func (LookupVirtualNetworkResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupVirtualNetworkResult)(nil)).Elem() } func (o LookupVirtualNetworkResultOutput) ToLookupVirtualNetworkResultOutput() LookupVirtualNetworkResultOutput { return o } func (o LookupVirtualNetworkResultOutput) ToLookupVirtualNetworkResultOutputWithContext(ctx context.Context) LookupVirtualNetworkResultOutput { return o } // The list of address spaces used by the virtual network. func (o LookupVirtualNetworkResultOutput) AddressSpaces() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupVirtualNetworkResult) []string { return v.AddressSpaces }).(pulumi.StringArrayOutput) } // The list of DNS servers used by the virtual network. func (o LookupVirtualNetworkResultOutput) DnsServers() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupVirtualNetworkResult) []string { return v.DnsServers }).(pulumi.StringArrayOutput) } // The GUID of the virtual network. func (o LookupVirtualNetworkResultOutput) Guid() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualNetworkResult) string { return v.Guid }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupVirtualNetworkResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualNetworkResult) string { return v.Id }).(pulumi.StringOutput) } // Location of the virtual network. func (o LookupVirtualNetworkResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualNetworkResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupVirtualNetworkResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualNetworkResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupVirtualNetworkResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualNetworkResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // The list of name of the subnets that are attached to this virtual network. func (o LookupVirtualNetworkResultOutput) Subnets() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupVirtualNetworkResult) []string { return v.Subnets }).(pulumi.StringArrayOutput) } // A mapping of tags to assigned to the resource. func (o LookupVirtualNetworkResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupVirtualNetworkResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // A mapping of name - virtual network id of the virtual network peerings. func (o LookupVirtualNetworkResultOutput) VnetPeerings() pulumi.StringMapOutput { return o.ApplyT(func(v LookupVirtualNetworkResult) map[string]string { return v.VnetPeerings }).(pulumi.StringMapOutput) } // A list of virtual network peerings IP addresses. func (o LookupVirtualNetworkResultOutput) VnetPeeringsAddresses() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupVirtualNetworkResult) []string { return v.VnetPeeringsAddresses }).(pulumi.StringArrayOutput) } func init() { pulumi.RegisterOutputType(LookupVirtualNetworkResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/vnpGatewayNatRule.go
sdk/go/azure/network/vnpGatewayNatRule.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a VPN Gateway NAT Rule. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualWan, err := network.NewVirtualWan(ctx, "example", &network.VirtualWanArgs{ // Name: pulumi.String("example-vwan"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // exampleVirtualHub, err := network.NewVirtualHub(ctx, "example", &network.VirtualHubArgs{ // Name: pulumi.String("example-vhub"), // ResourceGroupName: example.Name, // Location: example.Location, // AddressPrefix: pulumi.String("10.0.1.0/24"), // VirtualWanId: exampleVirtualWan.ID(), // }) // if err != nil { // return err // } // exampleVpnGateway, err := network.NewVpnGateway(ctx, "example", &network.VpnGatewayArgs{ // Name: pulumi.String("example-vpngateway"), // Location: example.Location, // ResourceGroupName: example.Name, // VirtualHubId: exampleVirtualHub.ID(), // }) // if err != nil { // return err // } // _, err = network.NewVnpGatewayNatRule(ctx, "example", &network.VnpGatewayNatRuleArgs{ // Name: pulumi.String("example-vpngatewaynatrule"), // VpnGatewayId: exampleVpnGateway.ID(), // ExternalMappings: network.VnpGatewayNatRuleExternalMappingArray{ // &network.VnpGatewayNatRuleExternalMappingArgs{ // AddressSpace: pulumi.String("192.168.21.0/26"), // }, // }, // InternalMappings: network.VnpGatewayNatRuleInternalMappingArray{ // &network.VnpGatewayNatRuleInternalMappingArgs{ // AddressSpace: pulumi.String("10.4.0.0/26"), // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // VPN Gateway NAT Rules can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/vnpGatewayNatRule:VnpGatewayNatRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.Network/vpnGateways/vpnGateway1/natRules/natRule1 // ``` type VnpGatewayNatRule struct { pulumi.CustomResourceState // One of more `externalMapping` blocks as defined below. ExternalMappings VnpGatewayNatRuleExternalMappingArrayOutput `pulumi:"externalMappings"` // One of more `internalMapping` blocks as defined below. InternalMappings VnpGatewayNatRuleInternalMappingArrayOutput `pulumi:"internalMappings"` // The ID of the IP Configuration this VPN Gateway NAT Rule applies to. Possible values are `Instance0` and `Instance1`. IpConfigurationId pulumi.StringPtrOutput `pulumi:"ipConfigurationId"` // The source NAT direction of the VPN NAT. Possible values are `EgressSnat` and `IngressSnat`. Defaults to `EgressSnat`. Changing this forces a new resource to be created. Mode pulumi.StringPtrOutput `pulumi:"mode"` // The name which should be used for this VPN Gateway NAT Rule. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The type of the VPN Gateway NAT Rule. Possible values are `Dynamic` and `Static`. Defaults to `Static`. Changing this forces a new resource to be created. Type pulumi.StringPtrOutput `pulumi:"type"` // The ID of the VPN Gateway that this VPN Gateway NAT Rule belongs to. Changing this forces a new resource to be created. VpnGatewayId pulumi.StringOutput `pulumi:"vpnGatewayId"` } // NewVnpGatewayNatRule registers a new resource with the given unique name, arguments, and options. func NewVnpGatewayNatRule(ctx *pulumi.Context, name string, args *VnpGatewayNatRuleArgs, opts ...pulumi.ResourceOption) (*VnpGatewayNatRule, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.VpnGatewayId == nil { return nil, errors.New("invalid value for required argument 'VpnGatewayId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource VnpGatewayNatRule err := ctx.RegisterResource("azure:network/vnpGatewayNatRule:VnpGatewayNatRule", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVnpGatewayNatRule gets an existing VnpGatewayNatRule resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetVnpGatewayNatRule(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VnpGatewayNatRuleState, opts ...pulumi.ResourceOption) (*VnpGatewayNatRule, error) { var resource VnpGatewayNatRule err := ctx.ReadResource("azure:network/vnpGatewayNatRule:VnpGatewayNatRule", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VnpGatewayNatRule resources. type vnpGatewayNatRuleState struct { // One of more `externalMapping` blocks as defined below. ExternalMappings []VnpGatewayNatRuleExternalMapping `pulumi:"externalMappings"` // One of more `internalMapping` blocks as defined below. InternalMappings []VnpGatewayNatRuleInternalMapping `pulumi:"internalMappings"` // The ID of the IP Configuration this VPN Gateway NAT Rule applies to. Possible values are `Instance0` and `Instance1`. IpConfigurationId *string `pulumi:"ipConfigurationId"` // The source NAT direction of the VPN NAT. Possible values are `EgressSnat` and `IngressSnat`. Defaults to `EgressSnat`. Changing this forces a new resource to be created. Mode *string `pulumi:"mode"` // The name which should be used for this VPN Gateway NAT Rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The type of the VPN Gateway NAT Rule. Possible values are `Dynamic` and `Static`. Defaults to `Static`. Changing this forces a new resource to be created. Type *string `pulumi:"type"` // The ID of the VPN Gateway that this VPN Gateway NAT Rule belongs to. Changing this forces a new resource to be created. VpnGatewayId *string `pulumi:"vpnGatewayId"` } type VnpGatewayNatRuleState struct { // One of more `externalMapping` blocks as defined below. ExternalMappings VnpGatewayNatRuleExternalMappingArrayInput // One of more `internalMapping` blocks as defined below. InternalMappings VnpGatewayNatRuleInternalMappingArrayInput // The ID of the IP Configuration this VPN Gateway NAT Rule applies to. Possible values are `Instance0` and `Instance1`. IpConfigurationId pulumi.StringPtrInput // The source NAT direction of the VPN NAT. Possible values are `EgressSnat` and `IngressSnat`. Defaults to `EgressSnat`. Changing this forces a new resource to be created. Mode pulumi.StringPtrInput // The name which should be used for this VPN Gateway NAT Rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The type of the VPN Gateway NAT Rule. Possible values are `Dynamic` and `Static`. Defaults to `Static`. Changing this forces a new resource to be created. Type pulumi.StringPtrInput // The ID of the VPN Gateway that this VPN Gateway NAT Rule belongs to. Changing this forces a new resource to be created. VpnGatewayId pulumi.StringPtrInput } func (VnpGatewayNatRuleState) ElementType() reflect.Type { return reflect.TypeOf((*vnpGatewayNatRuleState)(nil)).Elem() } type vnpGatewayNatRuleArgs struct { // One of more `externalMapping` blocks as defined below. ExternalMappings []VnpGatewayNatRuleExternalMapping `pulumi:"externalMappings"` // One of more `internalMapping` blocks as defined below. InternalMappings []VnpGatewayNatRuleInternalMapping `pulumi:"internalMappings"` // The ID of the IP Configuration this VPN Gateway NAT Rule applies to. Possible values are `Instance0` and `Instance1`. IpConfigurationId *string `pulumi:"ipConfigurationId"` // The source NAT direction of the VPN NAT. Possible values are `EgressSnat` and `IngressSnat`. Defaults to `EgressSnat`. Changing this forces a new resource to be created. Mode *string `pulumi:"mode"` // The name which should be used for this VPN Gateway NAT Rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The type of the VPN Gateway NAT Rule. Possible values are `Dynamic` and `Static`. Defaults to `Static`. Changing this forces a new resource to be created. Type *string `pulumi:"type"` // The ID of the VPN Gateway that this VPN Gateway NAT Rule belongs to. Changing this forces a new resource to be created. VpnGatewayId string `pulumi:"vpnGatewayId"` } // The set of arguments for constructing a VnpGatewayNatRule resource. type VnpGatewayNatRuleArgs struct { // One of more `externalMapping` blocks as defined below. ExternalMappings VnpGatewayNatRuleExternalMappingArrayInput // One of more `internalMapping` blocks as defined below. InternalMappings VnpGatewayNatRuleInternalMappingArrayInput // The ID of the IP Configuration this VPN Gateway NAT Rule applies to. Possible values are `Instance0` and `Instance1`. IpConfigurationId pulumi.StringPtrInput // The source NAT direction of the VPN NAT. Possible values are `EgressSnat` and `IngressSnat`. Defaults to `EgressSnat`. Changing this forces a new resource to be created. Mode pulumi.StringPtrInput // The name which should be used for this VPN Gateway NAT Rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The type of the VPN Gateway NAT Rule. Possible values are `Dynamic` and `Static`. Defaults to `Static`. Changing this forces a new resource to be created. Type pulumi.StringPtrInput // The ID of the VPN Gateway that this VPN Gateway NAT Rule belongs to. Changing this forces a new resource to be created. VpnGatewayId pulumi.StringInput } func (VnpGatewayNatRuleArgs) ElementType() reflect.Type { return reflect.TypeOf((*vnpGatewayNatRuleArgs)(nil)).Elem() } type VnpGatewayNatRuleInput interface { pulumi.Input ToVnpGatewayNatRuleOutput() VnpGatewayNatRuleOutput ToVnpGatewayNatRuleOutputWithContext(ctx context.Context) VnpGatewayNatRuleOutput } func (*VnpGatewayNatRule) ElementType() reflect.Type { return reflect.TypeOf((**VnpGatewayNatRule)(nil)).Elem() } func (i *VnpGatewayNatRule) ToVnpGatewayNatRuleOutput() VnpGatewayNatRuleOutput { return i.ToVnpGatewayNatRuleOutputWithContext(context.Background()) } func (i *VnpGatewayNatRule) ToVnpGatewayNatRuleOutputWithContext(ctx context.Context) VnpGatewayNatRuleOutput { return pulumi.ToOutputWithContext(ctx, i).(VnpGatewayNatRuleOutput) } // VnpGatewayNatRuleArrayInput is an input type that accepts VnpGatewayNatRuleArray and VnpGatewayNatRuleArrayOutput values. // You can construct a concrete instance of `VnpGatewayNatRuleArrayInput` via: // // VnpGatewayNatRuleArray{ VnpGatewayNatRuleArgs{...} } type VnpGatewayNatRuleArrayInput interface { pulumi.Input ToVnpGatewayNatRuleArrayOutput() VnpGatewayNatRuleArrayOutput ToVnpGatewayNatRuleArrayOutputWithContext(context.Context) VnpGatewayNatRuleArrayOutput } type VnpGatewayNatRuleArray []VnpGatewayNatRuleInput func (VnpGatewayNatRuleArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VnpGatewayNatRule)(nil)).Elem() } func (i VnpGatewayNatRuleArray) ToVnpGatewayNatRuleArrayOutput() VnpGatewayNatRuleArrayOutput { return i.ToVnpGatewayNatRuleArrayOutputWithContext(context.Background()) } func (i VnpGatewayNatRuleArray) ToVnpGatewayNatRuleArrayOutputWithContext(ctx context.Context) VnpGatewayNatRuleArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VnpGatewayNatRuleArrayOutput) } // VnpGatewayNatRuleMapInput is an input type that accepts VnpGatewayNatRuleMap and VnpGatewayNatRuleMapOutput values. // You can construct a concrete instance of `VnpGatewayNatRuleMapInput` via: // // VnpGatewayNatRuleMap{ "key": VnpGatewayNatRuleArgs{...} } type VnpGatewayNatRuleMapInput interface { pulumi.Input ToVnpGatewayNatRuleMapOutput() VnpGatewayNatRuleMapOutput ToVnpGatewayNatRuleMapOutputWithContext(context.Context) VnpGatewayNatRuleMapOutput } type VnpGatewayNatRuleMap map[string]VnpGatewayNatRuleInput func (VnpGatewayNatRuleMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VnpGatewayNatRule)(nil)).Elem() } func (i VnpGatewayNatRuleMap) ToVnpGatewayNatRuleMapOutput() VnpGatewayNatRuleMapOutput { return i.ToVnpGatewayNatRuleMapOutputWithContext(context.Background()) } func (i VnpGatewayNatRuleMap) ToVnpGatewayNatRuleMapOutputWithContext(ctx context.Context) VnpGatewayNatRuleMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VnpGatewayNatRuleMapOutput) } type VnpGatewayNatRuleOutput struct{ *pulumi.OutputState } func (VnpGatewayNatRuleOutput) ElementType() reflect.Type { return reflect.TypeOf((**VnpGatewayNatRule)(nil)).Elem() } func (o VnpGatewayNatRuleOutput) ToVnpGatewayNatRuleOutput() VnpGatewayNatRuleOutput { return o } func (o VnpGatewayNatRuleOutput) ToVnpGatewayNatRuleOutputWithContext(ctx context.Context) VnpGatewayNatRuleOutput { return o } // One of more `externalMapping` blocks as defined below. func (o VnpGatewayNatRuleOutput) ExternalMappings() VnpGatewayNatRuleExternalMappingArrayOutput { return o.ApplyT(func(v *VnpGatewayNatRule) VnpGatewayNatRuleExternalMappingArrayOutput { return v.ExternalMappings }).(VnpGatewayNatRuleExternalMappingArrayOutput) } // One of more `internalMapping` blocks as defined below. func (o VnpGatewayNatRuleOutput) InternalMappings() VnpGatewayNatRuleInternalMappingArrayOutput { return o.ApplyT(func(v *VnpGatewayNatRule) VnpGatewayNatRuleInternalMappingArrayOutput { return v.InternalMappings }).(VnpGatewayNatRuleInternalMappingArrayOutput) } // The ID of the IP Configuration this VPN Gateway NAT Rule applies to. Possible values are `Instance0` and `Instance1`. func (o VnpGatewayNatRuleOutput) IpConfigurationId() pulumi.StringPtrOutput { return o.ApplyT(func(v *VnpGatewayNatRule) pulumi.StringPtrOutput { return v.IpConfigurationId }).(pulumi.StringPtrOutput) } // The source NAT direction of the VPN NAT. Possible values are `EgressSnat` and `IngressSnat`. Defaults to `EgressSnat`. Changing this forces a new resource to be created. func (o VnpGatewayNatRuleOutput) Mode() pulumi.StringPtrOutput { return o.ApplyT(func(v *VnpGatewayNatRule) pulumi.StringPtrOutput { return v.Mode }).(pulumi.StringPtrOutput) } // The name which should be used for this VPN Gateway NAT Rule. Changing this forces a new resource to be created. func (o VnpGatewayNatRuleOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *VnpGatewayNatRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The type of the VPN Gateway NAT Rule. Possible values are `Dynamic` and `Static`. Defaults to `Static`. Changing this forces a new resource to be created. func (o VnpGatewayNatRuleOutput) Type() pulumi.StringPtrOutput { return o.ApplyT(func(v *VnpGatewayNatRule) pulumi.StringPtrOutput { return v.Type }).(pulumi.StringPtrOutput) } // The ID of the VPN Gateway that this VPN Gateway NAT Rule belongs to. Changing this forces a new resource to be created. func (o VnpGatewayNatRuleOutput) VpnGatewayId() pulumi.StringOutput { return o.ApplyT(func(v *VnpGatewayNatRule) pulumi.StringOutput { return v.VpnGatewayId }).(pulumi.StringOutput) } type VnpGatewayNatRuleArrayOutput struct{ *pulumi.OutputState } func (VnpGatewayNatRuleArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*VnpGatewayNatRule)(nil)).Elem() } func (o VnpGatewayNatRuleArrayOutput) ToVnpGatewayNatRuleArrayOutput() VnpGatewayNatRuleArrayOutput { return o } func (o VnpGatewayNatRuleArrayOutput) ToVnpGatewayNatRuleArrayOutputWithContext(ctx context.Context) VnpGatewayNatRuleArrayOutput { return o } func (o VnpGatewayNatRuleArrayOutput) Index(i pulumi.IntInput) VnpGatewayNatRuleOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VnpGatewayNatRule { return vs[0].([]*VnpGatewayNatRule)[vs[1].(int)] }).(VnpGatewayNatRuleOutput) } type VnpGatewayNatRuleMapOutput struct{ *pulumi.OutputState } func (VnpGatewayNatRuleMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VnpGatewayNatRule)(nil)).Elem() } func (o VnpGatewayNatRuleMapOutput) ToVnpGatewayNatRuleMapOutput() VnpGatewayNatRuleMapOutput { return o } func (o VnpGatewayNatRuleMapOutput) ToVnpGatewayNatRuleMapOutputWithContext(ctx context.Context) VnpGatewayNatRuleMapOutput { return o } func (o VnpGatewayNatRuleMapOutput) MapIndex(k pulumi.StringInput) VnpGatewayNatRuleOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VnpGatewayNatRule { return vs[0].(map[string]*VnpGatewayNatRule)[vs[1].(string)] }).(VnpGatewayNatRuleOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VnpGatewayNatRuleInput)(nil)).Elem(), &VnpGatewayNatRule{}) pulumi.RegisterInputType(reflect.TypeOf((*VnpGatewayNatRuleArrayInput)(nil)).Elem(), VnpGatewayNatRuleArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VnpGatewayNatRuleMapInput)(nil)).Elem(), VnpGatewayNatRuleMap{}) pulumi.RegisterOutputType(VnpGatewayNatRuleOutput{}) pulumi.RegisterOutputType(VnpGatewayNatRuleArrayOutput{}) pulumi.RegisterOutputType(VnpGatewayNatRuleMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/routeTable.go
sdk/go/azure/network/routeTable.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Route Table // // > **NOTE on Route Tables and Routes:** There is both a standalone `route` resource, and allows for Routes to be defined in-line within the `routeTable` resource. // At this time you cannot use a Route Table with in-line Routes in conjunction with any Route resources. Doing so will cause a conflict of Route configurations and will overwrite Routes. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = network.NewRouteTable(ctx, "example", &network.RouteTableArgs{ // Name: pulumi.String("example-route-table"), // Location: example.Location, // ResourceGroupName: example.Name, // Routes: network.RouteTableRouteArray{ // &network.RouteTableRouteArgs{ // Name: pulumi.String("route1"), // AddressPrefix: pulumi.String("10.1.0.0/16"), // NextHopType: pulumi.String("VnetLocal"), // }, // }, // Tags: pulumi.StringMap{ // "environment": pulumi.String("Production"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Route Tables can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/routeTable:RouteTable example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/routeTables/mytable1 // ``` type RouteTable struct { pulumi.CustomResourceState // Boolean flag which controls propagation of routes learned by BGP on that route table. Defaults to `true`. BgpRoutePropagationEnabled pulumi.BoolPtrOutput `pulumi:"bgpRoutePropagationEnabled"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the route. Name pulumi.StringOutput `pulumi:"name"` // The name of the resource group in which to create the route table. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A list of objects representing routes. Each object accepts the arguments documented below. // // > **NOTE** Since `route` can be configured both inline and via the separate `network.Route` resource, we have to explicitly set it to empty slice (`[]`) to remove it. Routes RouteTableRouteArrayOutput `pulumi:"routes"` // The collection of Subnets associated with this route table. Subnets pulumi.StringArrayOutput `pulumi:"subnets"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewRouteTable registers a new resource with the given unique name, arguments, and options. func NewRouteTable(ctx *pulumi.Context, name string, args *RouteTableArgs, opts ...pulumi.ResourceOption) (*RouteTable, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource RouteTable err := ctx.RegisterResource("azure:network/routeTable:RouteTable", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetRouteTable gets an existing RouteTable resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetRouteTable(ctx *pulumi.Context, name string, id pulumi.IDInput, state *RouteTableState, opts ...pulumi.ResourceOption) (*RouteTable, error) { var resource RouteTable err := ctx.ReadResource("azure:network/routeTable:RouteTable", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering RouteTable resources. type routeTableState struct { // Boolean flag which controls propagation of routes learned by BGP on that route table. Defaults to `true`. BgpRoutePropagationEnabled *bool `pulumi:"bgpRoutePropagationEnabled"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the route. Name *string `pulumi:"name"` // The name of the resource group in which to create the route table. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A list of objects representing routes. Each object accepts the arguments documented below. // // > **NOTE** Since `route` can be configured both inline and via the separate `network.Route` resource, we have to explicitly set it to empty slice (`[]`) to remove it. Routes []RouteTableRoute `pulumi:"routes"` // The collection of Subnets associated with this route table. Subnets []string `pulumi:"subnets"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } type RouteTableState struct { // Boolean flag which controls propagation of routes learned by BGP on that route table. Defaults to `true`. BgpRoutePropagationEnabled pulumi.BoolPtrInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the route. Name pulumi.StringPtrInput // The name of the resource group in which to create the route table. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A list of objects representing routes. Each object accepts the arguments documented below. // // > **NOTE** Since `route` can be configured both inline and via the separate `network.Route` resource, we have to explicitly set it to empty slice (`[]`) to remove it. Routes RouteTableRouteArrayInput // The collection of Subnets associated with this route table. Subnets pulumi.StringArrayInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (RouteTableState) ElementType() reflect.Type { return reflect.TypeOf((*routeTableState)(nil)).Elem() } type routeTableArgs struct { // Boolean flag which controls propagation of routes learned by BGP on that route table. Defaults to `true`. BgpRoutePropagationEnabled *bool `pulumi:"bgpRoutePropagationEnabled"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the route. Name *string `pulumi:"name"` // The name of the resource group in which to create the route table. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A list of objects representing routes. Each object accepts the arguments documented below. // // > **NOTE** Since `route` can be configured both inline and via the separate `network.Route` resource, we have to explicitly set it to empty slice (`[]`) to remove it. Routes []RouteTableRoute `pulumi:"routes"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a RouteTable resource. type RouteTableArgs struct { // Boolean flag which controls propagation of routes learned by BGP on that route table. Defaults to `true`. BgpRoutePropagationEnabled pulumi.BoolPtrInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the route. Name pulumi.StringPtrInput // The name of the resource group in which to create the route table. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A list of objects representing routes. Each object accepts the arguments documented below. // // > **NOTE** Since `route` can be configured both inline and via the separate `network.Route` resource, we have to explicitly set it to empty slice (`[]`) to remove it. Routes RouteTableRouteArrayInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (RouteTableArgs) ElementType() reflect.Type { return reflect.TypeOf((*routeTableArgs)(nil)).Elem() } type RouteTableInput interface { pulumi.Input ToRouteTableOutput() RouteTableOutput ToRouteTableOutputWithContext(ctx context.Context) RouteTableOutput } func (*RouteTable) ElementType() reflect.Type { return reflect.TypeOf((**RouteTable)(nil)).Elem() } func (i *RouteTable) ToRouteTableOutput() RouteTableOutput { return i.ToRouteTableOutputWithContext(context.Background()) } func (i *RouteTable) ToRouteTableOutputWithContext(ctx context.Context) RouteTableOutput { return pulumi.ToOutputWithContext(ctx, i).(RouteTableOutput) } // RouteTableArrayInput is an input type that accepts RouteTableArray and RouteTableArrayOutput values. // You can construct a concrete instance of `RouteTableArrayInput` via: // // RouteTableArray{ RouteTableArgs{...} } type RouteTableArrayInput interface { pulumi.Input ToRouteTableArrayOutput() RouteTableArrayOutput ToRouteTableArrayOutputWithContext(context.Context) RouteTableArrayOutput } type RouteTableArray []RouteTableInput func (RouteTableArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*RouteTable)(nil)).Elem() } func (i RouteTableArray) ToRouteTableArrayOutput() RouteTableArrayOutput { return i.ToRouteTableArrayOutputWithContext(context.Background()) } func (i RouteTableArray) ToRouteTableArrayOutputWithContext(ctx context.Context) RouteTableArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(RouteTableArrayOutput) } // RouteTableMapInput is an input type that accepts RouteTableMap and RouteTableMapOutput values. // You can construct a concrete instance of `RouteTableMapInput` via: // // RouteTableMap{ "key": RouteTableArgs{...} } type RouteTableMapInput interface { pulumi.Input ToRouteTableMapOutput() RouteTableMapOutput ToRouteTableMapOutputWithContext(context.Context) RouteTableMapOutput } type RouteTableMap map[string]RouteTableInput func (RouteTableMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*RouteTable)(nil)).Elem() } func (i RouteTableMap) ToRouteTableMapOutput() RouteTableMapOutput { return i.ToRouteTableMapOutputWithContext(context.Background()) } func (i RouteTableMap) ToRouteTableMapOutputWithContext(ctx context.Context) RouteTableMapOutput { return pulumi.ToOutputWithContext(ctx, i).(RouteTableMapOutput) } type RouteTableOutput struct{ *pulumi.OutputState } func (RouteTableOutput) ElementType() reflect.Type { return reflect.TypeOf((**RouteTable)(nil)).Elem() } func (o RouteTableOutput) ToRouteTableOutput() RouteTableOutput { return o } func (o RouteTableOutput) ToRouteTableOutputWithContext(ctx context.Context) RouteTableOutput { return o } // Boolean flag which controls propagation of routes learned by BGP on that route table. Defaults to `true`. func (o RouteTableOutput) BgpRoutePropagationEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *RouteTable) pulumi.BoolPtrOutput { return v.BgpRoutePropagationEnabled }).(pulumi.BoolPtrOutput) } // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. func (o RouteTableOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *RouteTable) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name of the route. func (o RouteTableOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *RouteTable) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group in which to create the route table. Changing this forces a new resource to be created. func (o RouteTableOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *RouteTable) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A list of objects representing routes. Each object accepts the arguments documented below. // // > **NOTE** Since `route` can be configured both inline and via the separate `network.Route` resource, we have to explicitly set it to empty slice (`[]`) to remove it. func (o RouteTableOutput) Routes() RouteTableRouteArrayOutput { return o.ApplyT(func(v *RouteTable) RouteTableRouteArrayOutput { return v.Routes }).(RouteTableRouteArrayOutput) } // The collection of Subnets associated with this route table. func (o RouteTableOutput) Subnets() pulumi.StringArrayOutput { return o.ApplyT(func(v *RouteTable) pulumi.StringArrayOutput { return v.Subnets }).(pulumi.StringArrayOutput) } // A mapping of tags to assign to the resource. func (o RouteTableOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *RouteTable) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type RouteTableArrayOutput struct{ *pulumi.OutputState } func (RouteTableArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*RouteTable)(nil)).Elem() } func (o RouteTableArrayOutput) ToRouteTableArrayOutput() RouteTableArrayOutput { return o } func (o RouteTableArrayOutput) ToRouteTableArrayOutputWithContext(ctx context.Context) RouteTableArrayOutput { return o } func (o RouteTableArrayOutput) Index(i pulumi.IntInput) RouteTableOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *RouteTable { return vs[0].([]*RouteTable)[vs[1].(int)] }).(RouteTableOutput) } type RouteTableMapOutput struct{ *pulumi.OutputState } func (RouteTableMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*RouteTable)(nil)).Elem() } func (o RouteTableMapOutput) ToRouteTableMapOutput() RouteTableMapOutput { return o } func (o RouteTableMapOutput) ToRouteTableMapOutputWithContext(ctx context.Context) RouteTableMapOutput { return o } func (o RouteTableMapOutput) MapIndex(k pulumi.StringInput) RouteTableOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *RouteTable { return vs[0].(map[string]*RouteTable)[vs[1].(string)] }).(RouteTableOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*RouteTableInput)(nil)).Elem(), &RouteTable{}) pulumi.RegisterInputType(reflect.TypeOf((*RouteTableArrayInput)(nil)).Elem(), RouteTableArray{}) pulumi.RegisterInputType(reflect.TypeOf((*RouteTableMapInput)(nil)).Elem(), RouteTableMap{}) pulumi.RegisterOutputType(RouteTableOutput{}) pulumi.RegisterOutputType(RouteTableArrayOutput{}) pulumi.RegisterOutputType(RouteTableMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getVirtualHubRouteTable.go
sdk/go/azure/network/getVirtualHubRouteTable.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Uses this data source to access information about an existing Virtual Hub Route Table. // // ## Virtual Hub Route Table Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := network.LookupVirtualHubRouteTable(ctx, &network.LookupVirtualHubRouteTableArgs{ // Name: "example-hub-route-table", // ResourceGroupName: "example-resources", // VirtualHubName: "example-hub-name", // }, nil) // if err != nil { // return err // } // ctx.Export("virtualHubRouteTableId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func LookupVirtualHubRouteTable(ctx *pulumi.Context, args *LookupVirtualHubRouteTableArgs, opts ...pulumi.InvokeOption) (*LookupVirtualHubRouteTableResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupVirtualHubRouteTableResult err := ctx.Invoke("azure:network/getVirtualHubRouteTable:getVirtualHubRouteTable", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getVirtualHubRouteTable. type LookupVirtualHubRouteTableArgs struct { // The name of the Virtual Hub Route Table. Name string `pulumi:"name"` // The Name of the Resource Group where the Virtual Hub Route Table exists. ResourceGroupName string `pulumi:"resourceGroupName"` // The name which should be used for Virtual Hub Route Table. VirtualHubName string `pulumi:"virtualHubName"` } // A collection of values returned by getVirtualHubRouteTable. type LookupVirtualHubRouteTableResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // List of labels associated with this route table. Labels []string `pulumi:"labels"` // The name which is used for this route. Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // A `route` block as defined below. Routes []GetVirtualHubRouteTableRouteType `pulumi:"routes"` // The ID of the Virtual Hub within which this route table is created VirtualHubId string `pulumi:"virtualHubId"` VirtualHubName string `pulumi:"virtualHubName"` } func LookupVirtualHubRouteTableOutput(ctx *pulumi.Context, args LookupVirtualHubRouteTableOutputArgs, opts ...pulumi.InvokeOption) LookupVirtualHubRouteTableResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupVirtualHubRouteTableResultOutput, error) { args := v.(LookupVirtualHubRouteTableArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getVirtualHubRouteTable:getVirtualHubRouteTable", args, LookupVirtualHubRouteTableResultOutput{}, options).(LookupVirtualHubRouteTableResultOutput), nil }).(LookupVirtualHubRouteTableResultOutput) } // A collection of arguments for invoking getVirtualHubRouteTable. type LookupVirtualHubRouteTableOutputArgs struct { // The name of the Virtual Hub Route Table. Name pulumi.StringInput `pulumi:"name"` // The Name of the Resource Group where the Virtual Hub Route Table exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` // The name which should be used for Virtual Hub Route Table. VirtualHubName pulumi.StringInput `pulumi:"virtualHubName"` } func (LookupVirtualHubRouteTableOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupVirtualHubRouteTableArgs)(nil)).Elem() } // A collection of values returned by getVirtualHubRouteTable. type LookupVirtualHubRouteTableResultOutput struct{ *pulumi.OutputState } func (LookupVirtualHubRouteTableResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupVirtualHubRouteTableResult)(nil)).Elem() } func (o LookupVirtualHubRouteTableResultOutput) ToLookupVirtualHubRouteTableResultOutput() LookupVirtualHubRouteTableResultOutput { return o } func (o LookupVirtualHubRouteTableResultOutput) ToLookupVirtualHubRouteTableResultOutputWithContext(ctx context.Context) LookupVirtualHubRouteTableResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o LookupVirtualHubRouteTableResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualHubRouteTableResult) string { return v.Id }).(pulumi.StringOutput) } // List of labels associated with this route table. func (o LookupVirtualHubRouteTableResultOutput) Labels() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupVirtualHubRouteTableResult) []string { return v.Labels }).(pulumi.StringArrayOutput) } // The name which is used for this route. func (o LookupVirtualHubRouteTableResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualHubRouteTableResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupVirtualHubRouteTableResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualHubRouteTableResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A `route` block as defined below. func (o LookupVirtualHubRouteTableResultOutput) Routes() GetVirtualHubRouteTableRouteTypeArrayOutput { return o.ApplyT(func(v LookupVirtualHubRouteTableResult) []GetVirtualHubRouteTableRouteType { return v.Routes }).(GetVirtualHubRouteTableRouteTypeArrayOutput) } // The ID of the Virtual Hub within which this route table is created func (o LookupVirtualHubRouteTableResultOutput) VirtualHubId() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualHubRouteTableResult) string { return v.VirtualHubId }).(pulumi.StringOutput) } func (o LookupVirtualHubRouteTableResultOutput) VirtualHubName() pulumi.StringOutput { return o.ApplyT(func(v LookupVirtualHubRouteTableResult) string { return v.VirtualHubName }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupVirtualHubRouteTableResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/routeFilter.go
sdk/go/azure/network/routeFilter.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Route Filter. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := network.NewRouteFilter(ctx, "example", &network.RouteFilterArgs{ // Name: pulumi.String("example"), // ResourceGroupName: pulumi.String("example"), // Location: pulumi.String("East US"), // Rule: &network.RouteFilterRuleArgs{ // Name: pulumi.String("rule"), // Access: pulumi.String("Allow"), // RuleType: pulumi.String("Community"), // Communities: pulumi.StringArray{ // pulumi.String("12076:52004"), // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Route Filters can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/routeFilter:RouteFilter example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/routeFilters/routeFilter1 // ``` type RouteFilter struct { pulumi.CustomResourceState // The Azure Region where the Route Filter should exist. Changing this forces a new Route Filter to be created. Location pulumi.StringOutput `pulumi:"location"` // The Name which should be used for this Route Filter. Name pulumi.StringOutput `pulumi:"name"` // The name of the Resource Group where the Route Filter should exist. Changing this forces a new Route Filter to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A `rule` block as defined below. Rule RouteFilterRuleOutput `pulumi:"rule"` // A mapping of tags which should be assigned to the Route Filter. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewRouteFilter registers a new resource with the given unique name, arguments, and options. func NewRouteFilter(ctx *pulumi.Context, name string, args *RouteFilterArgs, opts ...pulumi.ResourceOption) (*RouteFilter, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource RouteFilter err := ctx.RegisterResource("azure:network/routeFilter:RouteFilter", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetRouteFilter gets an existing RouteFilter resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetRouteFilter(ctx *pulumi.Context, name string, id pulumi.IDInput, state *RouteFilterState, opts ...pulumi.ResourceOption) (*RouteFilter, error) { var resource RouteFilter err := ctx.ReadResource("azure:network/routeFilter:RouteFilter", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering RouteFilter resources. type routeFilterState struct { // The Azure Region where the Route Filter should exist. Changing this forces a new Route Filter to be created. Location *string `pulumi:"location"` // The Name which should be used for this Route Filter. Name *string `pulumi:"name"` // The name of the Resource Group where the Route Filter should exist. Changing this forces a new Route Filter to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A `rule` block as defined below. Rule *RouteFilterRule `pulumi:"rule"` // A mapping of tags which should be assigned to the Route Filter. Tags map[string]string `pulumi:"tags"` } type RouteFilterState struct { // The Azure Region where the Route Filter should exist. Changing this forces a new Route Filter to be created. Location pulumi.StringPtrInput // The Name which should be used for this Route Filter. Name pulumi.StringPtrInput // The name of the Resource Group where the Route Filter should exist. Changing this forces a new Route Filter to be created. ResourceGroupName pulumi.StringPtrInput // A `rule` block as defined below. Rule RouteFilterRulePtrInput // A mapping of tags which should be assigned to the Route Filter. Tags pulumi.StringMapInput } func (RouteFilterState) ElementType() reflect.Type { return reflect.TypeOf((*routeFilterState)(nil)).Elem() } type routeFilterArgs struct { // The Azure Region where the Route Filter should exist. Changing this forces a new Route Filter to be created. Location *string `pulumi:"location"` // The Name which should be used for this Route Filter. Name *string `pulumi:"name"` // The name of the Resource Group where the Route Filter should exist. Changing this forces a new Route Filter to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A `rule` block as defined below. Rule *RouteFilterRule `pulumi:"rule"` // A mapping of tags which should be assigned to the Route Filter. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a RouteFilter resource. type RouteFilterArgs struct { // The Azure Region where the Route Filter should exist. Changing this forces a new Route Filter to be created. Location pulumi.StringPtrInput // The Name which should be used for this Route Filter. Name pulumi.StringPtrInput // The name of the Resource Group where the Route Filter should exist. Changing this forces a new Route Filter to be created. ResourceGroupName pulumi.StringInput // A `rule` block as defined below. Rule RouteFilterRulePtrInput // A mapping of tags which should be assigned to the Route Filter. Tags pulumi.StringMapInput } func (RouteFilterArgs) ElementType() reflect.Type { return reflect.TypeOf((*routeFilterArgs)(nil)).Elem() } type RouteFilterInput interface { pulumi.Input ToRouteFilterOutput() RouteFilterOutput ToRouteFilterOutputWithContext(ctx context.Context) RouteFilterOutput } func (*RouteFilter) ElementType() reflect.Type { return reflect.TypeOf((**RouteFilter)(nil)).Elem() } func (i *RouteFilter) ToRouteFilterOutput() RouteFilterOutput { return i.ToRouteFilterOutputWithContext(context.Background()) } func (i *RouteFilter) ToRouteFilterOutputWithContext(ctx context.Context) RouteFilterOutput { return pulumi.ToOutputWithContext(ctx, i).(RouteFilterOutput) } // RouteFilterArrayInput is an input type that accepts RouteFilterArray and RouteFilterArrayOutput values. // You can construct a concrete instance of `RouteFilterArrayInput` via: // // RouteFilterArray{ RouteFilterArgs{...} } type RouteFilterArrayInput interface { pulumi.Input ToRouteFilterArrayOutput() RouteFilterArrayOutput ToRouteFilterArrayOutputWithContext(context.Context) RouteFilterArrayOutput } type RouteFilterArray []RouteFilterInput func (RouteFilterArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*RouteFilter)(nil)).Elem() } func (i RouteFilterArray) ToRouteFilterArrayOutput() RouteFilterArrayOutput { return i.ToRouteFilterArrayOutputWithContext(context.Background()) } func (i RouteFilterArray) ToRouteFilterArrayOutputWithContext(ctx context.Context) RouteFilterArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(RouteFilterArrayOutput) } // RouteFilterMapInput is an input type that accepts RouteFilterMap and RouteFilterMapOutput values. // You can construct a concrete instance of `RouteFilterMapInput` via: // // RouteFilterMap{ "key": RouteFilterArgs{...} } type RouteFilterMapInput interface { pulumi.Input ToRouteFilterMapOutput() RouteFilterMapOutput ToRouteFilterMapOutputWithContext(context.Context) RouteFilterMapOutput } type RouteFilterMap map[string]RouteFilterInput func (RouteFilterMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*RouteFilter)(nil)).Elem() } func (i RouteFilterMap) ToRouteFilterMapOutput() RouteFilterMapOutput { return i.ToRouteFilterMapOutputWithContext(context.Background()) } func (i RouteFilterMap) ToRouteFilterMapOutputWithContext(ctx context.Context) RouteFilterMapOutput { return pulumi.ToOutputWithContext(ctx, i).(RouteFilterMapOutput) } type RouteFilterOutput struct{ *pulumi.OutputState } func (RouteFilterOutput) ElementType() reflect.Type { return reflect.TypeOf((**RouteFilter)(nil)).Elem() } func (o RouteFilterOutput) ToRouteFilterOutput() RouteFilterOutput { return o } func (o RouteFilterOutput) ToRouteFilterOutputWithContext(ctx context.Context) RouteFilterOutput { return o } // The Azure Region where the Route Filter should exist. Changing this forces a new Route Filter to be created. func (o RouteFilterOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *RouteFilter) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The Name which should be used for this Route Filter. func (o RouteFilterOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *RouteFilter) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the Resource Group where the Route Filter should exist. Changing this forces a new Route Filter to be created. func (o RouteFilterOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *RouteFilter) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A `rule` block as defined below. func (o RouteFilterOutput) Rule() RouteFilterRuleOutput { return o.ApplyT(func(v *RouteFilter) RouteFilterRuleOutput { return v.Rule }).(RouteFilterRuleOutput) } // A mapping of tags which should be assigned to the Route Filter. func (o RouteFilterOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *RouteFilter) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type RouteFilterArrayOutput struct{ *pulumi.OutputState } func (RouteFilterArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*RouteFilter)(nil)).Elem() } func (o RouteFilterArrayOutput) ToRouteFilterArrayOutput() RouteFilterArrayOutput { return o } func (o RouteFilterArrayOutput) ToRouteFilterArrayOutputWithContext(ctx context.Context) RouteFilterArrayOutput { return o } func (o RouteFilterArrayOutput) Index(i pulumi.IntInput) RouteFilterOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *RouteFilter { return vs[0].([]*RouteFilter)[vs[1].(int)] }).(RouteFilterOutput) } type RouteFilterMapOutput struct{ *pulumi.OutputState } func (RouteFilterMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*RouteFilter)(nil)).Elem() } func (o RouteFilterMapOutput) ToRouteFilterMapOutput() RouteFilterMapOutput { return o } func (o RouteFilterMapOutput) ToRouteFilterMapOutputWithContext(ctx context.Context) RouteFilterMapOutput { return o } func (o RouteFilterMapOutput) MapIndex(k pulumi.StringInput) RouteFilterOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *RouteFilter { return vs[0].(map[string]*RouteFilter)[vs[1].(string)] }).(RouteFilterOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*RouteFilterInput)(nil)).Elem(), &RouteFilter{}) pulumi.RegisterInputType(reflect.TypeOf((*RouteFilterArrayInput)(nil)).Elem(), RouteFilterArray{}) pulumi.RegisterInputType(reflect.TypeOf((*RouteFilterMapInput)(nil)).Elem(), RouteFilterMap{}) pulumi.RegisterOutputType(RouteFilterOutput{}) pulumi.RegisterOutputType(RouteFilterArrayOutput{}) pulumi.RegisterOutputType(RouteFilterMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/networkInterface.go
sdk/go/azure/network/networkInterface.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Network Interface. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-network"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("internal"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // }) // if err != nil { // return err // } // _, err = network.NewNetworkInterface(ctx, "example", &network.NetworkInterfaceArgs{ // Name: pulumi.String("example-nic"), // Location: example.Location, // ResourceGroupName: example.Name, // IpConfigurations: network.NetworkInterfaceIpConfigurationArray{ // &network.NetworkInterfaceIpConfigurationArgs{ // Name: pulumi.String("internal"), // SubnetId: exampleSubnet.ID(), // PrivateIpAddressAllocation: pulumi.String("Dynamic"), // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Network Interfaces can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/networkInterface:NetworkInterface example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/networkInterfaces/nic1 // ``` type NetworkInterface struct { pulumi.CustomResourceState // Should Accelerated Networking be enabled? Defaults to `false`. // // > **Note:** Only certain Virtual Machine sizes are supported for Accelerated Networking - [more information can be found in this document](https://docs.microsoft.com/azure/virtual-network/create-vm-accelerated-networking-cli). // // > **Note:** To use Accelerated Networking in an Availability Set, the Availability Set must be deployed onto an Accelerated Networking enabled cluster. AcceleratedNetworkingEnabled pulumi.BoolPtrOutput `pulumi:"acceleratedNetworkingEnabled"` // If the Virtual Machine using this Network Interface is part of an Availability Set, then this list will have the union of all DNS servers from all Network Interfaces that are part of the Availability Set. AppliedDnsServers pulumi.StringArrayOutput `pulumi:"appliedDnsServers"` // Specifies the auxiliary mode used to enable network high-performance feature on Network Virtual Appliances (NVAs). This feature offers competitive performance in Connections Per Second (CPS) optimization, along with improvements to handling large amounts of simultaneous connections. Possible values are `AcceleratedConnections`, `Floating`, `MaxConnections` and `None`. // // > **Note:** `auxiliaryMode` is in **Preview** and requires that the preview is enabled - [more information can be found in the Azure documentation](https://learn.microsoft.com/azure/networking/nva-accelerated-connections#prerequisites). AuxiliaryMode pulumi.StringPtrOutput `pulumi:"auxiliaryMode"` // Specifies the SKU used for the network high-performance feature on Network Virtual Appliances (NVAs). Possible values are `A8`, `A4`, `A1`, `A2` and `None`. // // > **Note:** `auxiliarySku` is in **Preview** and requires that the preview is enabled - [more information can be found in the Azure documentation](https://learn.microsoft.com/azure/networking/nva-accelerated-connections#prerequisites). AuxiliarySku pulumi.StringPtrOutput `pulumi:"auxiliarySku"` // A list of IP Addresses defining the DNS Servers which should be used for this Network Interface. // // > **Note:** Configuring DNS Servers on the Network Interface will override the DNS Servers defined on the Virtual Network. DnsServers pulumi.StringArrayOutput `pulumi:"dnsServers"` // Specifies the Edge Zone within the Azure Region where this Network Interface should exist. Changing this forces a new Network Interface to be created. EdgeZone pulumi.StringPtrOutput `pulumi:"edgeZone"` // The (relative) DNS Name used for internal communications between Virtual Machines in the same Virtual Network. InternalDnsNameLabel pulumi.StringPtrOutput `pulumi:"internalDnsNameLabel"` // Even if `internalDnsNameLabel` is not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value of `internalDomainNameSuffix`. InternalDomainNameSuffix pulumi.StringOutput `pulumi:"internalDomainNameSuffix"` // One or more `ipConfiguration` blocks as defined below. IpConfigurations NetworkInterfaceIpConfigurationArrayOutput `pulumi:"ipConfigurations"` // Should IP Forwarding be enabled? Defaults to `false`. IpForwardingEnabled pulumi.BoolPtrOutput `pulumi:"ipForwardingEnabled"` // The location where the Network Interface should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The Media Access Control (MAC) Address of the Network Interface. MacAddress pulumi.StringOutput `pulumi:"macAddress"` // The name of the Network Interface. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The first private IP address of the network interface. PrivateIpAddress pulumi.StringOutput `pulumi:"privateIpAddress"` // The private IP addresses of the network interface. PrivateIpAddresses pulumi.StringArrayOutput `pulumi:"privateIpAddresses"` // The name of the Resource Group in which to create the Network Interface. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // The ID of the Virtual Machine which this Network Interface is connected to. VirtualMachineId pulumi.StringOutput `pulumi:"virtualMachineId"` } // NewNetworkInterface registers a new resource with the given unique name, arguments, and options. func NewNetworkInterface(ctx *pulumi.Context, name string, args *NetworkInterfaceArgs, opts ...pulumi.ResourceOption) (*NetworkInterface, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.IpConfigurations == nil { return nil, errors.New("invalid value for required argument 'IpConfigurations'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkInterface err := ctx.RegisterResource("azure:network/networkInterface:NetworkInterface", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkInterface gets an existing NetworkInterface resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetNetworkInterface(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkInterfaceState, opts ...pulumi.ResourceOption) (*NetworkInterface, error) { var resource NetworkInterface err := ctx.ReadResource("azure:network/networkInterface:NetworkInterface", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkInterface resources. type networkInterfaceState struct { // Should Accelerated Networking be enabled? Defaults to `false`. // // > **Note:** Only certain Virtual Machine sizes are supported for Accelerated Networking - [more information can be found in this document](https://docs.microsoft.com/azure/virtual-network/create-vm-accelerated-networking-cli). // // > **Note:** To use Accelerated Networking in an Availability Set, the Availability Set must be deployed onto an Accelerated Networking enabled cluster. AcceleratedNetworkingEnabled *bool `pulumi:"acceleratedNetworkingEnabled"` // If the Virtual Machine using this Network Interface is part of an Availability Set, then this list will have the union of all DNS servers from all Network Interfaces that are part of the Availability Set. AppliedDnsServers []string `pulumi:"appliedDnsServers"` // Specifies the auxiliary mode used to enable network high-performance feature on Network Virtual Appliances (NVAs). This feature offers competitive performance in Connections Per Second (CPS) optimization, along with improvements to handling large amounts of simultaneous connections. Possible values are `AcceleratedConnections`, `Floating`, `MaxConnections` and `None`. // // > **Note:** `auxiliaryMode` is in **Preview** and requires that the preview is enabled - [more information can be found in the Azure documentation](https://learn.microsoft.com/azure/networking/nva-accelerated-connections#prerequisites). AuxiliaryMode *string `pulumi:"auxiliaryMode"` // Specifies the SKU used for the network high-performance feature on Network Virtual Appliances (NVAs). Possible values are `A8`, `A4`, `A1`, `A2` and `None`. // // > **Note:** `auxiliarySku` is in **Preview** and requires that the preview is enabled - [more information can be found in the Azure documentation](https://learn.microsoft.com/azure/networking/nva-accelerated-connections#prerequisites). AuxiliarySku *string `pulumi:"auxiliarySku"` // A list of IP Addresses defining the DNS Servers which should be used for this Network Interface. // // > **Note:** Configuring DNS Servers on the Network Interface will override the DNS Servers defined on the Virtual Network. DnsServers []string `pulumi:"dnsServers"` // Specifies the Edge Zone within the Azure Region where this Network Interface should exist. Changing this forces a new Network Interface to be created. EdgeZone *string `pulumi:"edgeZone"` // The (relative) DNS Name used for internal communications between Virtual Machines in the same Virtual Network. InternalDnsNameLabel *string `pulumi:"internalDnsNameLabel"` // Even if `internalDnsNameLabel` is not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value of `internalDomainNameSuffix`. InternalDomainNameSuffix *string `pulumi:"internalDomainNameSuffix"` // One or more `ipConfiguration` blocks as defined below. IpConfigurations []NetworkInterfaceIpConfiguration `pulumi:"ipConfigurations"` // Should IP Forwarding be enabled? Defaults to `false`. IpForwardingEnabled *bool `pulumi:"ipForwardingEnabled"` // The location where the Network Interface should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The Media Access Control (MAC) Address of the Network Interface. MacAddress *string `pulumi:"macAddress"` // The name of the Network Interface. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The first private IP address of the network interface. PrivateIpAddress *string `pulumi:"privateIpAddress"` // The private IP addresses of the network interface. PrivateIpAddresses []string `pulumi:"privateIpAddresses"` // The name of the Resource Group in which to create the Network Interface. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // The ID of the Virtual Machine which this Network Interface is connected to. VirtualMachineId *string `pulumi:"virtualMachineId"` } type NetworkInterfaceState struct { // Should Accelerated Networking be enabled? Defaults to `false`. // // > **Note:** Only certain Virtual Machine sizes are supported for Accelerated Networking - [more information can be found in this document](https://docs.microsoft.com/azure/virtual-network/create-vm-accelerated-networking-cli). // // > **Note:** To use Accelerated Networking in an Availability Set, the Availability Set must be deployed onto an Accelerated Networking enabled cluster. AcceleratedNetworkingEnabled pulumi.BoolPtrInput // If the Virtual Machine using this Network Interface is part of an Availability Set, then this list will have the union of all DNS servers from all Network Interfaces that are part of the Availability Set. AppliedDnsServers pulumi.StringArrayInput // Specifies the auxiliary mode used to enable network high-performance feature on Network Virtual Appliances (NVAs). This feature offers competitive performance in Connections Per Second (CPS) optimization, along with improvements to handling large amounts of simultaneous connections. Possible values are `AcceleratedConnections`, `Floating`, `MaxConnections` and `None`. // // > **Note:** `auxiliaryMode` is in **Preview** and requires that the preview is enabled - [more information can be found in the Azure documentation](https://learn.microsoft.com/azure/networking/nva-accelerated-connections#prerequisites). AuxiliaryMode pulumi.StringPtrInput // Specifies the SKU used for the network high-performance feature on Network Virtual Appliances (NVAs). Possible values are `A8`, `A4`, `A1`, `A2` and `None`. // // > **Note:** `auxiliarySku` is in **Preview** and requires that the preview is enabled - [more information can be found in the Azure documentation](https://learn.microsoft.com/azure/networking/nva-accelerated-connections#prerequisites). AuxiliarySku pulumi.StringPtrInput // A list of IP Addresses defining the DNS Servers which should be used for this Network Interface. // // > **Note:** Configuring DNS Servers on the Network Interface will override the DNS Servers defined on the Virtual Network. DnsServers pulumi.StringArrayInput // Specifies the Edge Zone within the Azure Region where this Network Interface should exist. Changing this forces a new Network Interface to be created. EdgeZone pulumi.StringPtrInput // The (relative) DNS Name used for internal communications between Virtual Machines in the same Virtual Network. InternalDnsNameLabel pulumi.StringPtrInput // Even if `internalDnsNameLabel` is not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value of `internalDomainNameSuffix`. InternalDomainNameSuffix pulumi.StringPtrInput // One or more `ipConfiguration` blocks as defined below. IpConfigurations NetworkInterfaceIpConfigurationArrayInput // Should IP Forwarding be enabled? Defaults to `false`. IpForwardingEnabled pulumi.BoolPtrInput // The location where the Network Interface should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The Media Access Control (MAC) Address of the Network Interface. MacAddress pulumi.StringPtrInput // The name of the Network Interface. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The first private IP address of the network interface. PrivateIpAddress pulumi.StringPtrInput // The private IP addresses of the network interface. PrivateIpAddresses pulumi.StringArrayInput // The name of the Resource Group in which to create the Network Interface. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The ID of the Virtual Machine which this Network Interface is connected to. VirtualMachineId pulumi.StringPtrInput } func (NetworkInterfaceState) ElementType() reflect.Type { return reflect.TypeOf((*networkInterfaceState)(nil)).Elem() } type networkInterfaceArgs struct { // Should Accelerated Networking be enabled? Defaults to `false`. // // > **Note:** Only certain Virtual Machine sizes are supported for Accelerated Networking - [more information can be found in this document](https://docs.microsoft.com/azure/virtual-network/create-vm-accelerated-networking-cli). // // > **Note:** To use Accelerated Networking in an Availability Set, the Availability Set must be deployed onto an Accelerated Networking enabled cluster. AcceleratedNetworkingEnabled *bool `pulumi:"acceleratedNetworkingEnabled"` // Specifies the auxiliary mode used to enable network high-performance feature on Network Virtual Appliances (NVAs). This feature offers competitive performance in Connections Per Second (CPS) optimization, along with improvements to handling large amounts of simultaneous connections. Possible values are `AcceleratedConnections`, `Floating`, `MaxConnections` and `None`. // // > **Note:** `auxiliaryMode` is in **Preview** and requires that the preview is enabled - [more information can be found in the Azure documentation](https://learn.microsoft.com/azure/networking/nva-accelerated-connections#prerequisites). AuxiliaryMode *string `pulumi:"auxiliaryMode"` // Specifies the SKU used for the network high-performance feature on Network Virtual Appliances (NVAs). Possible values are `A8`, `A4`, `A1`, `A2` and `None`. // // > **Note:** `auxiliarySku` is in **Preview** and requires that the preview is enabled - [more information can be found in the Azure documentation](https://learn.microsoft.com/azure/networking/nva-accelerated-connections#prerequisites). AuxiliarySku *string `pulumi:"auxiliarySku"` // A list of IP Addresses defining the DNS Servers which should be used for this Network Interface. // // > **Note:** Configuring DNS Servers on the Network Interface will override the DNS Servers defined on the Virtual Network. DnsServers []string `pulumi:"dnsServers"` // Specifies the Edge Zone within the Azure Region where this Network Interface should exist. Changing this forces a new Network Interface to be created. EdgeZone *string `pulumi:"edgeZone"` // The (relative) DNS Name used for internal communications between Virtual Machines in the same Virtual Network. InternalDnsNameLabel *string `pulumi:"internalDnsNameLabel"` // One or more `ipConfiguration` blocks as defined below. IpConfigurations []NetworkInterfaceIpConfiguration `pulumi:"ipConfigurations"` // Should IP Forwarding be enabled? Defaults to `false`. IpForwardingEnabled *bool `pulumi:"ipForwardingEnabled"` // The location where the Network Interface should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the Network Interface. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group in which to create the Network Interface. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a NetworkInterface resource. type NetworkInterfaceArgs struct { // Should Accelerated Networking be enabled? Defaults to `false`. // // > **Note:** Only certain Virtual Machine sizes are supported for Accelerated Networking - [more information can be found in this document](https://docs.microsoft.com/azure/virtual-network/create-vm-accelerated-networking-cli). // // > **Note:** To use Accelerated Networking in an Availability Set, the Availability Set must be deployed onto an Accelerated Networking enabled cluster. AcceleratedNetworkingEnabled pulumi.BoolPtrInput // Specifies the auxiliary mode used to enable network high-performance feature on Network Virtual Appliances (NVAs). This feature offers competitive performance in Connections Per Second (CPS) optimization, along with improvements to handling large amounts of simultaneous connections. Possible values are `AcceleratedConnections`, `Floating`, `MaxConnections` and `None`. // // > **Note:** `auxiliaryMode` is in **Preview** and requires that the preview is enabled - [more information can be found in the Azure documentation](https://learn.microsoft.com/azure/networking/nva-accelerated-connections#prerequisites). AuxiliaryMode pulumi.StringPtrInput // Specifies the SKU used for the network high-performance feature on Network Virtual Appliances (NVAs). Possible values are `A8`, `A4`, `A1`, `A2` and `None`. // // > **Note:** `auxiliarySku` is in **Preview** and requires that the preview is enabled - [more information can be found in the Azure documentation](https://learn.microsoft.com/azure/networking/nva-accelerated-connections#prerequisites). AuxiliarySku pulumi.StringPtrInput // A list of IP Addresses defining the DNS Servers which should be used for this Network Interface. // // > **Note:** Configuring DNS Servers on the Network Interface will override the DNS Servers defined on the Virtual Network. DnsServers pulumi.StringArrayInput // Specifies the Edge Zone within the Azure Region where this Network Interface should exist. Changing this forces a new Network Interface to be created. EdgeZone pulumi.StringPtrInput // The (relative) DNS Name used for internal communications between Virtual Machines in the same Virtual Network. InternalDnsNameLabel pulumi.StringPtrInput // One or more `ipConfiguration` blocks as defined below. IpConfigurations NetworkInterfaceIpConfigurationArrayInput // Should IP Forwarding be enabled? Defaults to `false`. IpForwardingEnabled pulumi.BoolPtrInput // The location where the Network Interface should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the Network Interface. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group in which to create the Network Interface. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (NetworkInterfaceArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkInterfaceArgs)(nil)).Elem() } type NetworkInterfaceInput interface { pulumi.Input ToNetworkInterfaceOutput() NetworkInterfaceOutput ToNetworkInterfaceOutputWithContext(ctx context.Context) NetworkInterfaceOutput } func (*NetworkInterface) ElementType() reflect.Type { return reflect.TypeOf((**NetworkInterface)(nil)).Elem() } func (i *NetworkInterface) ToNetworkInterfaceOutput() NetworkInterfaceOutput { return i.ToNetworkInterfaceOutputWithContext(context.Background()) } func (i *NetworkInterface) ToNetworkInterfaceOutputWithContext(ctx context.Context) NetworkInterfaceOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkInterfaceOutput) } // NetworkInterfaceArrayInput is an input type that accepts NetworkInterfaceArray and NetworkInterfaceArrayOutput values. // You can construct a concrete instance of `NetworkInterfaceArrayInput` via: // // NetworkInterfaceArray{ NetworkInterfaceArgs{...} } type NetworkInterfaceArrayInput interface { pulumi.Input ToNetworkInterfaceArrayOutput() NetworkInterfaceArrayOutput ToNetworkInterfaceArrayOutputWithContext(context.Context) NetworkInterfaceArrayOutput } type NetworkInterfaceArray []NetworkInterfaceInput func (NetworkInterfaceArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkInterface)(nil)).Elem() } func (i NetworkInterfaceArray) ToNetworkInterfaceArrayOutput() NetworkInterfaceArrayOutput { return i.ToNetworkInterfaceArrayOutputWithContext(context.Background()) } func (i NetworkInterfaceArray) ToNetworkInterfaceArrayOutputWithContext(ctx context.Context) NetworkInterfaceArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkInterfaceArrayOutput) } // NetworkInterfaceMapInput is an input type that accepts NetworkInterfaceMap and NetworkInterfaceMapOutput values. // You can construct a concrete instance of `NetworkInterfaceMapInput` via: // // NetworkInterfaceMap{ "key": NetworkInterfaceArgs{...} } type NetworkInterfaceMapInput interface { pulumi.Input ToNetworkInterfaceMapOutput() NetworkInterfaceMapOutput ToNetworkInterfaceMapOutputWithContext(context.Context) NetworkInterfaceMapOutput } type NetworkInterfaceMap map[string]NetworkInterfaceInput func (NetworkInterfaceMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkInterface)(nil)).Elem() } func (i NetworkInterfaceMap) ToNetworkInterfaceMapOutput() NetworkInterfaceMapOutput { return i.ToNetworkInterfaceMapOutputWithContext(context.Background()) } func (i NetworkInterfaceMap) ToNetworkInterfaceMapOutputWithContext(ctx context.Context) NetworkInterfaceMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkInterfaceMapOutput) } type NetworkInterfaceOutput struct{ *pulumi.OutputState } func (NetworkInterfaceOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkInterface)(nil)).Elem() } func (o NetworkInterfaceOutput) ToNetworkInterfaceOutput() NetworkInterfaceOutput { return o } func (o NetworkInterfaceOutput) ToNetworkInterfaceOutputWithContext(ctx context.Context) NetworkInterfaceOutput { return o } // Should Accelerated Networking be enabled? Defaults to `false`. // // > **Note:** Only certain Virtual Machine sizes are supported for Accelerated Networking - [more information can be found in this document](https://docs.microsoft.com/azure/virtual-network/create-vm-accelerated-networking-cli). // // > **Note:** To use Accelerated Networking in an Availability Set, the Availability Set must be deployed onto an Accelerated Networking enabled cluster. func (o NetworkInterfaceOutput) AcceleratedNetworkingEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *NetworkInterface) pulumi.BoolPtrOutput { return v.AcceleratedNetworkingEnabled }).(pulumi.BoolPtrOutput) } // If the Virtual Machine using this Network Interface is part of an Availability Set, then this list will have the union of all DNS servers from all Network Interfaces that are part of the Availability Set. func (o NetworkInterfaceOutput) AppliedDnsServers() pulumi.StringArrayOutput { return o.ApplyT(func(v *NetworkInterface) pulumi.StringArrayOutput { return v.AppliedDnsServers }).(pulumi.StringArrayOutput) } // Specifies the auxiliary mode used to enable network high-performance feature on Network Virtual Appliances (NVAs). This feature offers competitive performance in Connections Per Second (CPS) optimization, along with improvements to handling large amounts of simultaneous connections. Possible values are `AcceleratedConnections`, `Floating`, `MaxConnections` and `None`. // // > **Note:** `auxiliaryMode` is in **Preview** and requires that the preview is enabled - [more information can be found in the Azure documentation](https://learn.microsoft.com/azure/networking/nva-accelerated-connections#prerequisites). func (o NetworkInterfaceOutput) AuxiliaryMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkInterface) pulumi.StringPtrOutput { return v.AuxiliaryMode }).(pulumi.StringPtrOutput) } // Specifies the SKU used for the network high-performance feature on Network Virtual Appliances (NVAs). Possible values are `A8`, `A4`, `A1`, `A2` and `None`. // // > **Note:** `auxiliarySku` is in **Preview** and requires that the preview is enabled - [more information can be found in the Azure documentation](https://learn.microsoft.com/azure/networking/nva-accelerated-connections#prerequisites). func (o NetworkInterfaceOutput) AuxiliarySku() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkInterface) pulumi.StringPtrOutput { return v.AuxiliarySku }).(pulumi.StringPtrOutput) } // A list of IP Addresses defining the DNS Servers which should be used for this Network Interface. // // > **Note:** Configuring DNS Servers on the Network Interface will override the DNS Servers defined on the Virtual Network. func (o NetworkInterfaceOutput) DnsServers() pulumi.StringArrayOutput { return o.ApplyT(func(v *NetworkInterface) pulumi.StringArrayOutput { return v.DnsServers }).(pulumi.StringArrayOutput) } // Specifies the Edge Zone within the Azure Region where this Network Interface should exist. Changing this forces a new Network Interface to be created. func (o NetworkInterfaceOutput) EdgeZone() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkInterface) pulumi.StringPtrOutput { return v.EdgeZone }).(pulumi.StringPtrOutput) } // The (relative) DNS Name used for internal communications between Virtual Machines in the same Virtual Network. func (o NetworkInterfaceOutput) InternalDnsNameLabel() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkInterface) pulumi.StringPtrOutput { return v.InternalDnsNameLabel }).(pulumi.StringPtrOutput) } // Even if `internalDnsNameLabel` is not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value of `internalDomainNameSuffix`. func (o NetworkInterfaceOutput) InternalDomainNameSuffix() pulumi.StringOutput { return o.ApplyT(func(v *NetworkInterface) pulumi.StringOutput { return v.InternalDomainNameSuffix }).(pulumi.StringOutput) } // One or more `ipConfiguration` blocks as defined below. func (o NetworkInterfaceOutput) IpConfigurations() NetworkInterfaceIpConfigurationArrayOutput { return o.ApplyT(func(v *NetworkInterface) NetworkInterfaceIpConfigurationArrayOutput { return v.IpConfigurations }).(NetworkInterfaceIpConfigurationArrayOutput) } // Should IP Forwarding be enabled? Defaults to `false`. func (o NetworkInterfaceOutput) IpForwardingEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *NetworkInterface) pulumi.BoolPtrOutput { return v.IpForwardingEnabled }).(pulumi.BoolPtrOutput) } // The location where the Network Interface should exist. Changing this forces a new resource to be created. func (o NetworkInterfaceOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *NetworkInterface) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The Media Access Control (MAC) Address of the Network Interface. func (o NetworkInterfaceOutput) MacAddress() pulumi.StringOutput { return o.ApplyT(func(v *NetworkInterface) pulumi.StringOutput { return v.MacAddress }).(pulumi.StringOutput) } // The name of the Network Interface. Changing this forces a new resource to be created. func (o NetworkInterfaceOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NetworkInterface) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The first private IP address of the network interface. func (o NetworkInterfaceOutput) PrivateIpAddress() pulumi.StringOutput { return o.ApplyT(func(v *NetworkInterface) pulumi.StringOutput { return v.PrivateIpAddress }).(pulumi.StringOutput) } // The private IP addresses of the network interface. func (o NetworkInterfaceOutput) PrivateIpAddresses() pulumi.StringArrayOutput { return o.ApplyT(func(v *NetworkInterface) pulumi.StringArrayOutput { return v.PrivateIpAddresses }).(pulumi.StringArrayOutput) } // The name of the Resource Group in which to create the Network Interface. Changing this forces a new resource to be created. func (o NetworkInterfaceOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *NetworkInterface) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o NetworkInterfaceOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *NetworkInterface) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The ID of the Virtual Machine which this Network Interface is connected to.
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
true
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/subnetRouteTableAssociation.go
sdk/go/azure/network/subnetRouteTableAssociation.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Associates a Route Table with a Subnet within a Virtual Network. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-network"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("frontend"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // }) // if err != nil { // return err // } // exampleRouteTable, err := network.NewRouteTable(ctx, "example", &network.RouteTableArgs{ // Name: pulumi.String("example-routetable"), // Location: example.Location, // ResourceGroupName: example.Name, // Routes: network.RouteTableRouteArray{ // &network.RouteTableRouteArgs{ // Name: pulumi.String("example"), // AddressPrefix: pulumi.String("10.100.0.0/14"), // NextHopType: pulumi.String("VirtualAppliance"), // NextHopInIpAddress: pulumi.String("10.10.1.1"), // }, // }, // }) // if err != nil { // return err // } // _, err = network.NewSubnetRouteTableAssociation(ctx, "example", &network.SubnetRouteTableAssociationArgs{ // SubnetId: exampleSubnet.ID(), // RouteTableId: exampleRouteTable.ID(), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Subnet Route Table Associations can be imported using the `resource id` of the Subnet, e.g. // // ```sh // $ pulumi import azure:network/subnetRouteTableAssociation:SubnetRouteTableAssociation association1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/virtualNetworks/myvnet1/subnets/mysubnet1 // ``` type SubnetRouteTableAssociation struct { pulumi.CustomResourceState // The ID of the Route Table which should be associated with the Subnet. Changing this forces a new resource to be created. RouteTableId pulumi.StringOutput `pulumi:"routeTableId"` // The ID of the Subnet. Changing this forces a new resource to be created. SubnetId pulumi.StringOutput `pulumi:"subnetId"` } // NewSubnetRouteTableAssociation registers a new resource with the given unique name, arguments, and options. func NewSubnetRouteTableAssociation(ctx *pulumi.Context, name string, args *SubnetRouteTableAssociationArgs, opts ...pulumi.ResourceOption) (*SubnetRouteTableAssociation, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.RouteTableId == nil { return nil, errors.New("invalid value for required argument 'RouteTableId'") } if args.SubnetId == nil { return nil, errors.New("invalid value for required argument 'SubnetId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource SubnetRouteTableAssociation err := ctx.RegisterResource("azure:network/subnetRouteTableAssociation:SubnetRouteTableAssociation", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSubnetRouteTableAssociation gets an existing SubnetRouteTableAssociation resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetSubnetRouteTableAssociation(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SubnetRouteTableAssociationState, opts ...pulumi.ResourceOption) (*SubnetRouteTableAssociation, error) { var resource SubnetRouteTableAssociation err := ctx.ReadResource("azure:network/subnetRouteTableAssociation:SubnetRouteTableAssociation", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering SubnetRouteTableAssociation resources. type subnetRouteTableAssociationState struct { // The ID of the Route Table which should be associated with the Subnet. Changing this forces a new resource to be created. RouteTableId *string `pulumi:"routeTableId"` // The ID of the Subnet. Changing this forces a new resource to be created. SubnetId *string `pulumi:"subnetId"` } type SubnetRouteTableAssociationState struct { // The ID of the Route Table which should be associated with the Subnet. Changing this forces a new resource to be created. RouteTableId pulumi.StringPtrInput // The ID of the Subnet. Changing this forces a new resource to be created. SubnetId pulumi.StringPtrInput } func (SubnetRouteTableAssociationState) ElementType() reflect.Type { return reflect.TypeOf((*subnetRouteTableAssociationState)(nil)).Elem() } type subnetRouteTableAssociationArgs struct { // The ID of the Route Table which should be associated with the Subnet. Changing this forces a new resource to be created. RouteTableId string `pulumi:"routeTableId"` // The ID of the Subnet. Changing this forces a new resource to be created. SubnetId string `pulumi:"subnetId"` } // The set of arguments for constructing a SubnetRouteTableAssociation resource. type SubnetRouteTableAssociationArgs struct { // The ID of the Route Table which should be associated with the Subnet. Changing this forces a new resource to be created. RouteTableId pulumi.StringInput // The ID of the Subnet. Changing this forces a new resource to be created. SubnetId pulumi.StringInput } func (SubnetRouteTableAssociationArgs) ElementType() reflect.Type { return reflect.TypeOf((*subnetRouteTableAssociationArgs)(nil)).Elem() } type SubnetRouteTableAssociationInput interface { pulumi.Input ToSubnetRouteTableAssociationOutput() SubnetRouteTableAssociationOutput ToSubnetRouteTableAssociationOutputWithContext(ctx context.Context) SubnetRouteTableAssociationOutput } func (*SubnetRouteTableAssociation) ElementType() reflect.Type { return reflect.TypeOf((**SubnetRouteTableAssociation)(nil)).Elem() } func (i *SubnetRouteTableAssociation) ToSubnetRouteTableAssociationOutput() SubnetRouteTableAssociationOutput { return i.ToSubnetRouteTableAssociationOutputWithContext(context.Background()) } func (i *SubnetRouteTableAssociation) ToSubnetRouteTableAssociationOutputWithContext(ctx context.Context) SubnetRouteTableAssociationOutput { return pulumi.ToOutputWithContext(ctx, i).(SubnetRouteTableAssociationOutput) } // SubnetRouteTableAssociationArrayInput is an input type that accepts SubnetRouteTableAssociationArray and SubnetRouteTableAssociationArrayOutput values. // You can construct a concrete instance of `SubnetRouteTableAssociationArrayInput` via: // // SubnetRouteTableAssociationArray{ SubnetRouteTableAssociationArgs{...} } type SubnetRouteTableAssociationArrayInput interface { pulumi.Input ToSubnetRouteTableAssociationArrayOutput() SubnetRouteTableAssociationArrayOutput ToSubnetRouteTableAssociationArrayOutputWithContext(context.Context) SubnetRouteTableAssociationArrayOutput } type SubnetRouteTableAssociationArray []SubnetRouteTableAssociationInput func (SubnetRouteTableAssociationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*SubnetRouteTableAssociation)(nil)).Elem() } func (i SubnetRouteTableAssociationArray) ToSubnetRouteTableAssociationArrayOutput() SubnetRouteTableAssociationArrayOutput { return i.ToSubnetRouteTableAssociationArrayOutputWithContext(context.Background()) } func (i SubnetRouteTableAssociationArray) ToSubnetRouteTableAssociationArrayOutputWithContext(ctx context.Context) SubnetRouteTableAssociationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SubnetRouteTableAssociationArrayOutput) } // SubnetRouteTableAssociationMapInput is an input type that accepts SubnetRouteTableAssociationMap and SubnetRouteTableAssociationMapOutput values. // You can construct a concrete instance of `SubnetRouteTableAssociationMapInput` via: // // SubnetRouteTableAssociationMap{ "key": SubnetRouteTableAssociationArgs{...} } type SubnetRouteTableAssociationMapInput interface { pulumi.Input ToSubnetRouteTableAssociationMapOutput() SubnetRouteTableAssociationMapOutput ToSubnetRouteTableAssociationMapOutputWithContext(context.Context) SubnetRouteTableAssociationMapOutput } type SubnetRouteTableAssociationMap map[string]SubnetRouteTableAssociationInput func (SubnetRouteTableAssociationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SubnetRouteTableAssociation)(nil)).Elem() } func (i SubnetRouteTableAssociationMap) ToSubnetRouteTableAssociationMapOutput() SubnetRouteTableAssociationMapOutput { return i.ToSubnetRouteTableAssociationMapOutputWithContext(context.Background()) } func (i SubnetRouteTableAssociationMap) ToSubnetRouteTableAssociationMapOutputWithContext(ctx context.Context) SubnetRouteTableAssociationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SubnetRouteTableAssociationMapOutput) } type SubnetRouteTableAssociationOutput struct{ *pulumi.OutputState } func (SubnetRouteTableAssociationOutput) ElementType() reflect.Type { return reflect.TypeOf((**SubnetRouteTableAssociation)(nil)).Elem() } func (o SubnetRouteTableAssociationOutput) ToSubnetRouteTableAssociationOutput() SubnetRouteTableAssociationOutput { return o } func (o SubnetRouteTableAssociationOutput) ToSubnetRouteTableAssociationOutputWithContext(ctx context.Context) SubnetRouteTableAssociationOutput { return o } // The ID of the Route Table which should be associated with the Subnet. Changing this forces a new resource to be created. func (o SubnetRouteTableAssociationOutput) RouteTableId() pulumi.StringOutput { return o.ApplyT(func(v *SubnetRouteTableAssociation) pulumi.StringOutput { return v.RouteTableId }).(pulumi.StringOutput) } // The ID of the Subnet. Changing this forces a new resource to be created. func (o SubnetRouteTableAssociationOutput) SubnetId() pulumi.StringOutput { return o.ApplyT(func(v *SubnetRouteTableAssociation) pulumi.StringOutput { return v.SubnetId }).(pulumi.StringOutput) } type SubnetRouteTableAssociationArrayOutput struct{ *pulumi.OutputState } func (SubnetRouteTableAssociationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*SubnetRouteTableAssociation)(nil)).Elem() } func (o SubnetRouteTableAssociationArrayOutput) ToSubnetRouteTableAssociationArrayOutput() SubnetRouteTableAssociationArrayOutput { return o } func (o SubnetRouteTableAssociationArrayOutput) ToSubnetRouteTableAssociationArrayOutputWithContext(ctx context.Context) SubnetRouteTableAssociationArrayOutput { return o } func (o SubnetRouteTableAssociationArrayOutput) Index(i pulumi.IntInput) SubnetRouteTableAssociationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SubnetRouteTableAssociation { return vs[0].([]*SubnetRouteTableAssociation)[vs[1].(int)] }).(SubnetRouteTableAssociationOutput) } type SubnetRouteTableAssociationMapOutput struct{ *pulumi.OutputState } func (SubnetRouteTableAssociationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SubnetRouteTableAssociation)(nil)).Elem() } func (o SubnetRouteTableAssociationMapOutput) ToSubnetRouteTableAssociationMapOutput() SubnetRouteTableAssociationMapOutput { return o } func (o SubnetRouteTableAssociationMapOutput) ToSubnetRouteTableAssociationMapOutputWithContext(ctx context.Context) SubnetRouteTableAssociationMapOutput { return o } func (o SubnetRouteTableAssociationMapOutput) MapIndex(k pulumi.StringInput) SubnetRouteTableAssociationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SubnetRouteTableAssociation { return vs[0].(map[string]*SubnetRouteTableAssociation)[vs[1].(string)] }).(SubnetRouteTableAssociationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SubnetRouteTableAssociationInput)(nil)).Elem(), &SubnetRouteTableAssociation{}) pulumi.RegisterInputType(reflect.TypeOf((*SubnetRouteTableAssociationArrayInput)(nil)).Elem(), SubnetRouteTableAssociationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SubnetRouteTableAssociationMapInput)(nil)).Elem(), SubnetRouteTableAssociationMap{}) pulumi.RegisterOutputType(SubnetRouteTableAssociationOutput{}) pulumi.RegisterOutputType(SubnetRouteTableAssociationArrayOutput{}) pulumi.RegisterOutputType(SubnetRouteTableAssociationMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false